From 84d9c66039c86d981f4d219424074021c6d91667 Mon Sep 17 00:00:00 2001 From: itutu-tienday Date: Fri, 12 Apr 2024 18:39:13 +0900 Subject: [PATCH 1/2] build frontend --- frontend/build/asset-manifest.json | 6 +++--- frontend/build/index.html | 2 +- .../build/static/js/{main.c38d1373.js => main.79663488.js} | 4 ++-- ...c38d1373.js.LICENSE.txt => main.79663488.js.LICENSE.txt} | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename frontend/build/static/js/{main.c38d1373.js => main.79663488.js} (92%) rename frontend/build/static/js/{main.c38d1373.js.LICENSE.txt => main.79663488.js.LICENSE.txt} (100%) diff --git a/frontend/build/asset-manifest.json b/frontend/build/asset-manifest.json index 9aa1d63d5..ad2329579 100644 --- a/frontend/build/asset-manifest.json +++ b/frontend/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.7039f299.css", - "main.js": "/static/js/main.c38d1373.js", + "main.js": "/static/js/main.79663488.js", "static/js/522.7dc20eab.chunk.js": "/static/js/522.7dc20eab.chunk.js", "static/media/logo.png": "/static/media/logo.e44efe3246aecc6d6219.png", "index.html": "/index.html" }, "entrypoints": [ "static/css/main.7039f299.css", - "static/js/main.c38d1373.js" + "static/js/main.79663488.js" ] -} \ No newline at end of file +} diff --git a/frontend/build/index.html b/frontend/build/index.html index 2b18e63c2..03aad5f20 100644 --- a/frontend/build/index.html +++ b/frontend/build/index.html @@ -1 +1 @@ -Digital Marmoset Brain
\ No newline at end of file +Digital Marmoset Brain
diff --git a/frontend/build/static/js/main.c38d1373.js b/frontend/build/static/js/main.79663488.js similarity index 92% rename from frontend/build/static/js/main.c38d1373.js rename to frontend/build/static/js/main.79663488.js index 83022a4bd..28f99edef 100644 --- a/frontend/build/static/js/main.c38d1373.js +++ b/frontend/build/static/js/main.79663488.js @@ -1,2 +1,2 @@ -/*! For license information please see main.c38d1373.js.LICENSE.txt */ -(()=>{var e={5296:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ie});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(b,--y):0,g--,10===x&&(g=1,m--),x}function S(){return x=y2||A(x)>3?"":" "}function R(e,t){for(;--t&&S()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return C(e,M()+(t<6&&32==T()&&32==S()))}function L(e){for(;S();)switch(x){case e:return y;case 34:case 39:34!==e&&39!==e&&L(x);break;case 40:41===e&&L(e);break;case 92:S()}return y}function j(e,t){for(;S()&&e+x!==57&&(e+x!==84||47!==T()););return"/*"+C(t,y-1)+"*"+o(47===e?e:S())}function D(e){for(;!A(T());)S();return C(e,y)}var z="-ms-",N="-moz-",F="-webkit-",B="comm",Z="rule",U="decl",V="@keyframes";function H(e,t){for(var r="",n=h(e),i=0;i0&&f(N)-v&&p(x>32?K(N+";",n,r,v-1):K(l(N," ","")+";",n,r,v-2),h);break;case 59:N+=";";default:if(p(z=Y(N,t,r,m,g,i,d,E,I=[],L=[],v),a),123===A)if(0===g)q(N,t,z,z,I,a,v,d,L);else switch(99===y&&110===u(N,3)?100:y){case 100:case 108:case 109:case 115:q(e,z,z,n&&p(Y(e,z,z,0,0,i,d,E,i,I=[],v),L),i,L,v,d,n?I:L);break;default:q(N,z,z,z,[""],L,0,d,L)}}m=g=x=0,w=C=1,E=N="",v=s;break;case 58:v=1+f(N),x=b;default:if(w<1)if(123==A)--w;else if(125==A&&0==w++&&125==k())continue;switch(N+=o(A),A*w){case 38:C=g>0?1:(N+="\f",-1);break;case 44:d[m++]=(f(N)-1)*C,C=1;break;case 64:45===T()&&(N+=O(S())),y=T(),g=v=f(E=N+=D(M())),A++;break;case 45:45===b&&2==f(N)&&(w=0)}}return a}function Y(e,t,r,n,o,a,c,u,f,p,m){for(var g=o-1,v=0===o?a:[""],y=h(v),x=0,b=0,_=0;x0?v[k]+" "+S:l(S,/&\f/g,v[k])))&&(f[_++]=T);return w(e,t,r,0===o?Z:u,f,p,m)}function X(e,t,r){return w(e,t,r,B,o(x),d(e,2,-2),0)}function K(e,t,r,n){return w(e,t,r,U,d(e,0,n),d(e,n+1,-1),n)}var $=function(e,t,r){for(var n=0,i=0;n=i,i=T(),38===n&&12===i&&(t[r]=1),!A(i);)S();return C(e,y)},J=function(e,t){return I(function(e,t){var r=-1,n=44;do{switch(A(n)){case 0:38===n&&12===T()&&(t[r]=1),e[r]+=$(y-1,t,r);break;case 2:e[r]+=O(n);break;case 4:if(44===n){e[++r]=58===T()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=o(n)}}while(n=S());return e}(E(e),t))},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(r))&&!n){Q.set(e,!0);for(var i=[],o=J(t,i),a=r.props,s=0,l=0;s6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+N+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?re(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===u(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+z+e+e}return e}var ne=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=re(e.value,e.length);break;case V:return H([_(e,{value:l(e.value,"@","@"+F)})],n);case Z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([_(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return H([_(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,z+"input-$1")]})],n)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||ne;var o,a,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{Z:()=>n})},3346:(e,t,r)=>{"use strict";r.d(t,{T:()=>l,i:()=>o,w:()=>s});var n=r(47313),i=r(5296),o=(r(21086),r(85696),!0),a=n.createContext("undefined"!==typeof HTMLElement?(0,i.Z)({key:"css"}):null);a.Provider;var s=function(e){return(0,n.forwardRef)((function(t,r){var i=(0,n.useContext)(a);return e(t,i,r)}))};o||(s=function(e){return function(t){var r=(0,n.useContext)(a);return null===r?(r=(0,i.Z)({key:"css"}),n.createElement(a.Provider,{value:r},e(t,r))):e(t,r)}});var l=n.createContext({})},21086:(e,t,r)=>{"use strict";r.d(t,{O:()=>p});var n={animationIterationCount:1,aspectRatio: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},i=r(91816),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,i.Z)((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(a,(function(e,t,r){return f={name:t,styles:r,next:f},t}))}return 1===n[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,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 f={name:r.name,styles:r.styles,next:f},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)f={name:n.name,styles:n.styles,next:f},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:f}}},85696:(e,t,r)=>{"use strict";var n;r.d(t,{L:()=>a,j:()=>s});var i=r(47313),o=!!(n||(n=r.t(i,2))).useInsertionEffect&&(n||(n=r.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},54911:(e,t,r)=>{"use strict";r.d(t,{My:()=>o,fp:()=>n,hC:()=>i});function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}var i=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},o=function(e,t,r){i(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},99932:(e,t,r)=>{"use strict";var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:l},u)},d),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3050:(e,t,r)=>{"use strict";var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:l},u)},d),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},14281:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"}),"AccountCircle");t.Z=a},15962:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree");t.Z=a},5211:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=a},44661:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M8 11h8v2H8zm12.1 1H22c0-2.76-2.24-5-5-5h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1zM3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM19 12h-2v3h-3v2h3v3h2v-3h3v-2h-3z"}),"AddLink");t.Z=a},59344:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2h-3zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8h-3zM5 19l3-4 2 3 3-4 4 5H5z"}),"AddPhotoAlternate");t.Z=a},86753:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-5h2v5zm4 0h-2v-3h2v3zm0-5h-2v-2h2v2zm4 5h-2V7h2v10z"}),"Analytics");t.Z=a},69883:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");t.Z=a},54406:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");t.Z=a},48617:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM19 19H5V5h14v14z"}),"AssignmentOutlined");t.Z=a},91385:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");t.Z=a},84764:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"}),"Block");t.Z=a},81195:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");t.Z=a},68728:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=a},16450:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");t.Z=a},37957:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"CheckCircleOutline");t.Z=a},37850:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"}),"CheckCircleRounded");t.Z=a},5982:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 7H2v2h9V7zm0 8H2v2h9v-2zm5.34-4L12.8 7.46l1.41-1.41 2.12 2.12 4.24-4.24L22 5.34 16.34 11zm0 8-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L22 13.34 16.34 19z"}),"ChecklistRtl");t.Z=a},54045:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.Z=a},11198:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=a},38966:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("path",{d:"M5 5h2v3h10V5h2v5h2V5c0-1.1-.9-2-2-2h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v-2H5V5zm7-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"},"0"),(0,o.jsx)("path",{d:"M20.3 18.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S12 14 12 16.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l2.7 2.7 1.4-1.4-2.7-2.7zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5z"},"1")],"ContentPasteSearch");t.Z=a},51765:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");t.Z=a},51997:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=a},96217:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");t.Z=a},51642:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"}),"Domain");t.Z=a},64292:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=a},65954:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},57822:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");t.Z=a},59236:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");t.Z=a},6306:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},51671:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"}),"Folder");t.Z=a},82715:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAdd");t.Z=a},22575:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}),"Groups");t.Z=a},64661:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule");t.Z=a},53512:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}),"InsertDriveFileOutlined");t.Z=a},29428:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");t.Z=a},3665:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");t.Z=a},36859:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}),"KeyboardBackspace");t.Z=a},42854:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"}),"Logout");t.Z=a},35449:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("circle",{cx:"10",cy:"8",r:"4"},"0"),(0,o.jsx)("path",{d:"M10.67 13.02c-.22-.01-.44-.02-.67-.02-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.79-1.13-1.26-2.51-1.26-4 0-1.07.25-2.07.67-2.98zM20.75 16c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},"1")],"ManageAccounts");t.Z=a},61317:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.Z=a},30129:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"}),"Portrait");t.Z=a},79236:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");t.Z=a},66119:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 8.17 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.87 20 13.48 20 12c0-3.35-2.07-6.22-5-7.41V5c0 1.1-.9 2-2 2h-2v1.17zm10.19 13.02-1.41 1.41-2.27-2.27C15.93 21.39 14.04 22 12 22 6.48 22 2 17.52 2 12c0-2.04.61-3.93 1.66-5.51L1.39 4.22 2.8 2.81l18.39 18.38zM11 18c-1.1 0-2-.9-2-2v-1l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.08 3.05 7.44 7 7.93V18z"}),"PublicOff");t.Z=a},84389:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");t.Z=a},2630:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),"Reply");t.Z=a},4787:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82z"}),"Route");t.Z=a},82495:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.Z=a},19630:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("path",{d:"M18 2h-8L4 8v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 2v16H6V8.83L10.83 4H18z"},"0"),(0,o.jsx)("path",{d:"m16 13-4 4-4-4 1.41-1.41L11 13.17V9.02L13 9v4.17l1.59-1.59L16 13z"},"1")],"SimCardDownloadOutlined");t.Z=a},13002:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");t.Z=a},99123:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"Tune");t.Z=a},10237:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=a},22611:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.Z=a},19009:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M2.74 18c-.77 1.33.19 3 1.73 3h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18zM11 11v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zm0 5h2v2h-2z"}),"WarningAmberRounded");t.Z=a},5878:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"}),"Web");t.Z=a},45045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(28095)},89994:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},23837:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},24929:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},69850:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},2316:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"}},51293:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},96745:(e,t,r)=>{"use strict";r.d(t,{Z:()=>L});var n=r(87462),i=r(63366),o=r(77219),a=r(13019),s=r(9456),l=r(63232),c=r(63649);var u=r(17551);const d={black:"#000",white:"#fff"};var f=r(24929),h=r(2316),p=r(51293),m=r(69850),g=r(89994);const v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var y=r(23837);const x=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function _(e,t,r,n){const i=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,u.$n)(e.main,i):"dark"===t&&(e.dark=(0,u._j)(e.main,o)))}function k(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:s=.2}=e,l=(0,i.Z)(e,x),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g.Z[200],light:g.Z[50],dark:g.Z[400]}:{main:g.Z[700],light:g.Z[400],dark:g.Z[800]}}(t),k=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h.Z[200],light:h.Z[50],dark:h.Z[400]}:{main:h.Z[500],light:h.Z[300],dark:h.Z[700]}}(t),S=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p.Z[500],light:p.Z[300],dark:p.Z[700]}:{main:p.Z[700],light:p.Z[400],dark:p.Z[800]}}(t),T=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y.Z[400],light:y.Z[300],dark:y.Z[700]}:{main:y.Z[800],light:y.Z[500],dark:y.Z[900]}}(t),C=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m.Z[400],light:m.Z[300],dark:m.Z[700]}:{main:"#ed6c02",light:m.Z[500],dark:m.Z[900]}}(t);function A(e){return(0,u.mi)(e,w.text.primary)>=r?w.text.primary:b.text.primary}const E=e=>{let{color:t,name:r,mainShade:i=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,n.Z)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.Z)(11,r?" (".concat(r,")"):"",i));if("string"!==typeof t.main)throw new Error((0,o.Z)(12,r?" (".concat(r,")"):"",JSON.stringify(t.main)));return _(t,"light",a,s),_(t,"dark",l,s),t.contrastText||(t.contrastText=A(t.main)),t},I={dark:w,light:b};return(0,a.Z)((0,n.Z)({common:(0,n.Z)({},d),mode:t,primary:E({color:c,name:"primary"}),secondary:E({color:k,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:E({color:S,name:"error"}),warning:E({color:C,name:"warning"}),info:E({color:T,name:"info"}),success:E({color:M,name:"success"}),grey:f.Z,contrastThreshold:r,getContrastText:A,augmentColor:E,tonalOffset:s},I[t]),l)}const S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const T={textTransform:"uppercase"},M='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){const r="function"===typeof t?t(e):t,{fontFamily:o=M,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:h,pxToRem:p}=r,m=(0,i.Z)(r,S);const g=s/14,v=p||(e=>"".concat(e/f*g,"rem")),y=(e,t,r,i,a)=>{return(0,n.Z)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:r},o===M?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},a,h);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,T),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,T),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.Z)((0,n.Z)({htmlFontSize:f,pxToRem:v,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},x),m,{clone:!1})}function A(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const E=["none",A(0,2,1,-1,0,1,1,0,0,1,3,0),A(0,3,1,-2,0,2,2,0,0,1,5,0),A(0,3,3,-2,0,3,4,0,0,1,8,0),A(0,2,4,-1,0,4,5,0,0,1,10,0),A(0,3,5,-1,0,5,8,0,0,1,14,0),A(0,3,5,-1,0,6,10,0,0,1,18,0),A(0,4,5,-2,0,7,10,1,0,2,16,1),A(0,5,5,-3,0,8,10,1,0,3,14,2),A(0,5,6,-3,0,9,12,1,0,3,16,2),A(0,6,6,-3,0,10,14,1,0,4,18,3),A(0,6,7,-4,0,11,15,1,0,4,20,3),A(0,7,8,-4,0,12,17,2,0,5,22,4),A(0,7,8,-4,0,13,19,2,0,5,24,4),A(0,7,9,-4,0,14,21,2,0,5,26,4),A(0,8,9,-5,0,15,22,2,0,6,28,5),A(0,8,10,-5,0,16,24,2,0,6,30,5),A(0,8,11,-5,0,17,26,2,0,6,32,5),A(0,9,11,-5,0,18,28,2,0,7,34,6),A(0,9,12,-6,0,19,29,2,0,7,36,6),A(0,10,13,-6,0,20,31,3,0,8,38,7),A(0,10,13,-6,0,21,33,3,0,8,40,7),A(0,10,14,-6,0,22,35,3,0,8,42,7),A(0,11,14,-7,0,23,36,3,0,9,44,8),A(0,11,15,-7,0,24,38,3,0,9,46,8)];var I=r(75829);const O={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:r={},transitions:u={},typography:d={}}=e,f=(0,i.Z)(e,P);if(e.vars)throw new Error((0,o.Z)(18));const h=k(r),p=(0,s.Z)(e);let m=(0,a.Z)(p,{mixins:(g=p.breakpoints,v=t,(0,n.Z)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:h,shadows:E.slice(),typography:C(h,d),transitions:(0,I.ZP)(u),zIndex:(0,n.Z)({},O)});var g,v;m=(0,a.Z)(m,f);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b(0,a.Z)(e,t)),m),m.unstable_sxConfig=(0,n.Z)({},l.Z,null==f?void 0:f.unstable_sxConfig),m.unstable_sx=function(e){return(0,c.Z)({sx:e,theme:this})},m}const L=R},75829:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>u,x9:()=>s});var n=r(63366),i=r(87462);const o=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,i.Z)({},a,e.easing),r=(0,i.Z)({},s,e.duration);return(0,i.Z)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=r.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,n.Z)(i,o);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof a?a:l(a)," ").concat(s," ").concat("string"===typeof c?c:l(c)))).join(",")}},e,{easing:t,duration:r})}},72248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(96745).Z)()},72951:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="$$material"},17592:(e,t,r)=>{"use strict";r.d(t,{Dz:()=>s,FO:()=>a,ZP:()=>l});var n=r(36541),i=r(72248),o=r(72951);const a=e=>(0,n.x9)(e)&&"classes"!==e,s=n.x9,l=(0,n.ZP)({themeId:o.Z,defaultTheme:i.Z,rootShouldForwardProp:a})},77342:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50118),i=r(72248),o=r(72951);function a(e){let{props:t,name:r}=e;return(0,n.Z)({props:t,name:r,defaultTheme:i.Z,themeId:o.Z})}},91615:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(88831).Z},85038:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(84246).Z},81171:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(87462),i=r(47313),o=r(63366),a=r(94146),s=r(21921),l=r(91615),c=r(77342),u=r(17592),d=r(77430),f=r(32298);function h(e){return(0,f.Z)("MuiSvgIcon",e)}(0,d.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=r(46417);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t["color".concat((0,l.Z)(r.color))],t["fontSize".concat((0,l.Z)(r.fontSize))]]}})((e=>{let{theme:t,ownerState:r}=e;var n,i,o,a,s,l,c,u,d,f,h,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:r.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(i=n.create)?void 0:i.call(n,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[r.fontSize],color:null!=(f=null==(h=(t.vars||t).palette)||null==(h=h[r.color])?void 0:h.main)?f:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[r.color]}})),v=i.forwardRef((function(e,t){const r=(0,c.Z)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:f="inherit",component:v="svg",fontSize:y="medium",htmlColor:x,inheritViewBox:b=!1,titleAccess:w,viewBox:_="0 0 24 24"}=r,k=(0,o.Z)(r,m),S=i.isValidElement(u)&&"svg"===u.type,T=(0,n.Z)({},r,{color:f,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:_,hasSvgAsChild:S}),M={};b||(M.viewBox=_);const C=(e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.Z)(t)),"fontSize".concat((0,l.Z)(r))]};return(0,s.Z)(i,h,n)})(T);return(0,p.jsxs)(g,(0,n.Z)({as:v,className:(0,a.Z)(C.root,d),focusable:"false",color:x,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},M,k,S&&u.props,{ownerState:T,children:[S?u.props.children:u,w?(0,p.jsx)("title",{children:w}):null]}))}));v.muiName="SvgIcon";const y=v;function x(e,t){function r(r,i){return(0,p.jsx)(y,(0,n.Z)({"data-testid":"".concat(t,"Icon"),ref:i},r,{children:e}))}return r.muiName=y.muiName,i.memo(i.forwardRef(r))}},88706:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(81636).Z},28095:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>i.Z,createChainedFunction:()=>o.Z,createSvgIcon:()=>a.Z,debounce:()=>s.Z,deprecatedPropType:()=>l,isMuiElement:()=>c.Z,ownerDocument:()=>u.Z,ownerWindow:()=>d.Z,requirePropFactory:()=>f,setRef:()=>h,unstable_ClassNameGenerator:()=>w,unstable_useEnhancedEffect:()=>p.Z,unstable_useId:()=>m.Z,unsupportedProp:()=>g,useControlled:()=>v.Z,useEventCallback:()=>y.Z,useForkRef:()=>x.Z,useIsFocusVisible:()=>b.Z});var n=r(41271),i=r(91615),o=r(85038),a=r(81171),s=r(88706);const l=function(e,t){return()=>null};var c=r(27816),u=r(6106),d=r(23533);r(87462);const f=function(e,t){return()=>null};const h=r(89265).Z;var p=r(24993),m=r(17677);const g=function(e,t,r,n,i){return null};var v=r(53800),y=r(73236),x=r(86983),b=r(47037);const w={configure:e=>{n.Z.configure(e)}}},27816:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);const i=function(e,t){var r,i;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},6106:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(42504).Z},23533:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(8929).Z},53800:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(35422).Z},24993:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(55094).Z},73236:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(76182).Z},86983:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(71577).Z},17677:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(28334).Z},47037:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(95669).Z},84472:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>y,Co:()=>x});var n=r(87462),i=r(47313),o=r(91816),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=r(3346),c=r(54911),u=r(21086),d=r(85696),f=s,h=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?f:h},m=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof n&&r&&(n=e.__emotion_forwardProp),n},g=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,c.hC)(t,r,n),(0,d.L)((function(){return(0,c.My)(t,r,n)})),null},v=function e(t,r){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==r&&(o=r.label,a=r.target);var f=m(t,r,s),h=f||p(d),v=!h("as");return function(){var y=arguments,x=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&x.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)x.push.apply(x,y);else{0,x.push(y[0][0]);for(var b=y.length,w=1;w{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},54929:(e,t,r)=>{"use strict";r.d(t,{L7:()=>l,P$:()=>u,VO:()=>i,W8:()=>s,dt:()=>c,k9:()=>a});var n=r(13019);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||o;return t.reduce(((n,i,o)=>(n[e.up(e.keys[o])]=r(t[o]),n)),{})}if("object"===typeof t){const e=n.breakpoints||o;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){n[e.up(o)]=r(t[o],o)}else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o(0,n.Z)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:r,base:n}=e;const i=n||function(e,t){if("object"!==typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach(((t,n)=>{n{null!=e[t]&&(r[t]=!0)})),r}(t,r),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce(((e,r,n)=>(Array.isArray(t)?(e[r]=null!=t[n]?t[n]:t[a],a=n):"object"===typeof t?(e[r]=null!=t[r]?t[r]:t[a],a=r):e[r]=t,e)),{})}},17551:(e,t,r)=>{"use strict";r.d(t,{$n:()=>d,Fq:()=>c,_j:()=>u,mi:()=>l});var n=r(77219);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,n.Z)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===r){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,n.Z)(10,i))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:r,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==t.indexOf("color")?"".concat(r," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(t,"(").concat(n,")")}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,s=n*Math.min(i,1-i),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)};let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){const r=s(e),n=s(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return a(e)}},36541:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>T,x9:()=>x});var n=r(63366),i=r(87462),o=r(84472),a=r(13019),s=r(9456),l=r(88831);const c=["variant"];function u(e){return 0===e.length}function d(e){const{variant:t}=e,r=(0,n.Z)(e,c);let i=t||"";return Object.keys(r).sort().forEach((t=>{i+="color"===t?u(i)?e[t]:(0,l.Z)(e[t]):"".concat(u(i)?t:(0,l.Z)(t)).concat((0,l.Z)(e[t].toString()))})),i}var f=r(63649);const h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];const p=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,m=e=>{const t={};return e&&e.forEach((e=>{const r=d(e.props);t[r]=e.style})),t},g=(e,t)=>{let r=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants),m(r)},v=(e,t,r)=>{const{ownerState:n={}}=e,i=[];return r&&r.forEach((r=>{let o=!0;Object.keys(r.props).forEach((t=>{n[t]!==r.props[t]&&e[t]!==r.props[t]&&(o=!1)})),o&&i.push(t[d(r.props)])})),i},y=(e,t,r,n)=>{var i;const o=null==r||null==(i=r.components)||null==(i=i[n])?void 0:i.variants;return v(e,t,o)};function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const b=(0,s.Z)(),w=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function _(e){let{defaultTheme:t,theme:r,themeId:n}=e;return i=r,0===Object.keys(i).length?t:r[n]||r;var i}function k(e){return e?(t,r)=>r[e]:null}const S=e=>{let{styledArg:t,props:r,defaultTheme:n,themeId:o}=e;const a=t((0,i.Z)({},r,{theme:_((0,i.Z)({},r,{defaultTheme:n,themeId:o}))}));let s;if(a&&a.variants&&(s=a.variants,delete a.variants),s){return[a,...v(r,m(s),s)]}return a};function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:r=b,rootShouldForwardProp:s=x,slotShouldForwardProp:l=x}=e,c=e=>(0,f.Z)((0,i.Z)({},e,{theme:_((0,i.Z)({},e,{defaultTheme:r,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Co)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:f,skipVariantsResolver:b,skipSx:T,overridesResolver:M=k(w(f))}=u,C=(0,n.Z)(u,h),A=void 0!==b?b:f&&"Root"!==f&&"root"!==f||!1,E=T||!1;let I=x;"Root"===f||"root"===f?I=s:f?I=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(I=void 0);const O=(0,o.ZP)(e,(0,i.Z)({shouldForwardProp:I,label:undefined},C)),P=function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),l=1;l{if("function"===typeof e&&e.__emotion_real!==e)return n=>S({styledArg:e,props:n,defaultTheme:r,themeId:t});if((0,a.P)(e)){let t,r=e;return e&&e.variants&&(t=e.variants,delete r.variants,r=r=>{let n=e;return v(r,m(t),t).forEach((e=>{n=(0,a.Z)(n,e)})),n}),r}return e})):[];let f=n;if((0,a.P)(n)){let e;n&&n.variants&&(e=n.variants,delete f.variants,f=t=>{let r=n;return v(t,m(e),e).forEach((e=>{r=(0,a.Z)(r,e)})),r})}else"function"===typeof n&&n.__emotion_real!==n&&(f=e=>S({styledArg:n,props:e,defaultTheme:r,themeId:t}));d&&M&&u.push((e=>{const n=_((0,i.Z)({},e,{defaultTheme:r,themeId:t})),o=p(d,n);if(o){const t={};return Object.entries(o).forEach((r=>{let[o,a]=r;t[o]="function"===typeof a?a((0,i.Z)({},e,{theme:n})):a})),M(e,t)}return null})),d&&!A&&u.push((e=>{const n=_((0,i.Z)({},e,{defaultTheme:r,themeId:t}));return y(e,g(d,n),n,d)})),E||u.push(c);const h=u.length-s.length;if(Array.isArray(n)&&h>0){const e=new Array(h).fill("");f=[...n,...e],f.raw=[...n.raw,...e]}const x=O(f,...u);return e.muiName&&(x.muiName=e.muiName),x};return O.withConfig&&(P.withConfig=O.withConfig),P}}},9456:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(87462),i=r(63366),o=r(13019);const a=["values","unit","step"],s=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,n.Z)({},e,{[t.key]:t.val})),{})};const l={borderRadius:4};var c=r(86886);var u=r(63649),d=r(63232);const f=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:r={},spacing:h,shape:p={}}=e,m=(0,i.Z)(e,f),g=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5}=e,l=(0,i.Z)(e,a),c=s(t),u=Object.keys(c);function d(e){const n="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(n).concat(r,")")}function f(e){const n="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(n-o/100).concat(r,")")}function h(e,n){const i=u.indexOf(n);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(r,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[u[i]]?t[u[i]]:n)-o/100).concat(r,")")}return(0,n.Z)({keys:u,values:c,up:d,down:f,between:h,only:function(e){return u.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,c.hB)({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n{const r=t(e);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return r.mui=!0,r}(h);let y=(0,o.Z)({breakpoints:g,direction:"ltr",components:{},palette:(0,n.Z)({mode:"light"},r),spacing:v,shape:(0,n.Z)({},l,p)},m);for(var x=arguments.length,b=new Array(x>1?x-1:0),w=1;w(0,o.Z)(e,t)),y),y.unstable_sxConfig=(0,n.Z)({},d.Z,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,u.Z)({sx:e,theme:this})},y}},77330:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(13019);const i=function(e,t){return t?(0,n.Z)(e,t,{clone:!1}):e}},86886:(e,t,r)=>{"use strict";r.d(t,{hB:()=>p,eI:()=>h,NA:()=>m,e6:()=>y,o3:()=>x});var n=r(54929),i=r(46428),o=r(77330);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return r=>(void 0===t[r]&&(t[r]=e(r)),t[r])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,r]=e.split(""),n=a[t],i=s[r]||"";return Array.isArray(i)?i.map((e=>n+e)):[n+i]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...u,...d];function h(e,t,r,n){var o;const a=null!=(o=(0,i.DW)(e,t,!1))?o:r;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function p(e){return h(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}function g(e,t,r,i){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=m(t,r),e)),{})}(c(r),i),a=e[r];return(0,n.k9)(e,a,o)}function v(e,t){const r=p(e.theme);return Object.keys(e).map((n=>g(e,t,n,r))).reduce(o.Z,{})}function y(e){return v(e,u)}function x(e){return v(e,d)}function b(e){return v(e,f)}y.propTypes={},y.filterProps=u,x.propTypes={},x.filterProps=d,b.propTypes={},b.filterProps=f},46428:(e,t,r)=>{"use strict";r.d(t,{DW:()=>o,Jq:()=>a,ZP:()=>s});var n=r(88831),i=r(54929);function o(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&r){const r="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;return n="function"===typeof e?e(r):Array.isArray(e)?e[r]||i:o(e,r)||i,t&&(n=t(n,i,e)),n}const s=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,s)||{};return(0,i.k9)(e,c,(e=>{let i=a(u,l,e);return e===i&&"string"===typeof e&&(i=a(u,l,"".concat(t).concat("default"===e?"":(0,n.Z)(e)),e)),!1===r?i:{[r]:i}}))};return c.propTypes={},c.filterProps=[t],c}},63232:(e,t,r)=>{"use strict";r.d(t,{Z:()=>L});var n=r(86886),i=r(46428),o=r(77330);const a=function(){for(var e=arguments.length,t=new Array(e),r=0;r(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),i=e=>Object.keys(e).reduce(((t,r)=>n[r]?(0,o.Z)(t,n[r](e)):t),{});return i.propTypes={},i.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),i};var s=r(54929);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.ZP)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),f=c("borderRight",l),h=c("borderBottom",l),p=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),x=c("borderLeftColor"),b=c("outline",l),w=c("outlineColor"),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,r)}return null};_.propTypes={},_.filterProps=["borderRadius"];a(u,d,f,h,p,m,g,v,y,x,_,b,w);const k=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.eI)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.gap,r)}return null};k.propTypes={},k.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.eI)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.columnGap,r)}return null};S.propTypes={},S.filterProps=["columnGap"];const T=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.eI)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.rowGap,r)}return null};T.propTypes={},T.filterProps=["rowGap"];a(k,S,T,(0,i.ZP)({prop:"gridColumn"}),(0,i.ZP)({prop:"gridRow"}),(0,i.ZP)({prop:"gridAutoFlow"}),(0,i.ZP)({prop:"gridAutoColumns"}),(0,i.ZP)({prop:"gridAutoRows"}),(0,i.ZP)({prop:"gridTemplateColumns"}),(0,i.ZP)({prop:"gridTemplateRows"}),(0,i.ZP)({prop:"gridTemplateAreas"}),(0,i.ZP)({prop:"gridArea"}));function M(e,t){return"grey"===t?t:e}a((0,i.ZP)({prop:"color",themeKey:"palette",transform:M}),(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:M}));function C(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const A=(0,i.ZP)({prop:"width",transform:C}),E=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const i=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||s.VO[t];return i?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:C(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};E.filterProps=["maxWidth"];const I=(0,i.ZP)({prop:"minWidth",transform:C}),O=(0,i.ZP)({prop:"height",transform:C}),P=(0,i.ZP)({prop:"maxHeight",transform:C}),R=(0,i.ZP)({prop:"minHeight",transform:C}),L=((0,i.ZP)({prop:"size",cssProperty:"width",transform:C}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:C}),a(A,E,I,O,P,R,(0,i.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:n.o3},pt:{style:n.o3},pr:{style:n.o3},pb:{style:n.o3},pl:{style:n.o3},px:{style:n.o3},py:{style:n.o3},padding:{style:n.o3},paddingTop:{style:n.o3},paddingRight:{style:n.o3},paddingBottom:{style:n.o3},paddingLeft:{style:n.o3},paddingX:{style:n.o3},paddingY:{style:n.o3},paddingInline:{style:n.o3},paddingInlineStart:{style:n.o3},paddingInlineEnd:{style:n.o3},paddingBlock:{style:n.o3},paddingBlockStart:{style:n.o3},paddingBlockEnd:{style:n.o3},m:{style:n.e6},mt:{style:n.e6},mr:{style:n.e6},mb:{style:n.e6},ml:{style:n.e6},mx:{style:n.e6},my:{style:n.e6},margin:{style:n.e6},marginTop:{style:n.e6},marginRight:{style:n.e6},marginBottom:{style:n.e6},marginLeft:{style:n.e6},marginX:{style:n.e6},marginY:{style:n.e6},marginInline:{style:n.e6},marginInlineStart:{style:n.e6},marginInlineEnd:{style:n.e6},marginBlock:{style:n.e6},marginBlockStart:{style:n.e6},marginBlockEnd:{style:n.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:k},rowGap:{style:T},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:C},maxWidth:{style:E},minWidth:{transform:C},height:{transform:C},maxHeight:{transform:C},minHeight:{transform:C},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},63649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(88831),i=r(77330),o=r(46428),a=r(54929),s=r(63232);const l=function(){function e(e,t,r,i){const s={[e]:t,theme:r},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:f}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const h=(0,o.DW)(r,u)||{};if(f)return f(s);return(0,a.k9)(s,t,(t=>{let r=(0,o.Jq)(h,d,t);return t===r&&"string"===typeof t&&(r=(0,o.Jq)(h,d,"".concat(e).concat("default"===t?"":(0,n.Z)(t)),t)),!1===c?r:{[c]:r}}))}return function t(r){var n;const{sx:o,theme:l={}}=r||{};if(!o)return null;const c=null!=(n=l.unstable_sxConfig)?n:s.Z;function u(r){let n=r;if("function"===typeof r)n=r(l);else if("object"!==typeof r)return r;if(!n)return null;const o=(0,a.W8)(l.breakpoints),s=Object.keys(o);let u=o;return Object.keys(n).forEach((r=>{const o=(s=n[r],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==o&&void 0!==o)if("object"===typeof o)if(c[r])u=(0,i.Z)(u,e(r,o,l,c));else{const e=(0,a.k9)({theme:l},o,(e=>({[r]:e})));!function(){for(var e=arguments.length,t=new Array(e),r=0;re.concat(Object.keys(t))),[]),i=new Set(n);return t.every((e=>i.size===Object.keys(e).length))}(e,o)?u=(0,i.Z)(u,e):u[r]=t({sx:o,theme:l})}else u=(0,i.Z)(u,e(r,o,l,c))})),(0,a.L7)(s,u)}return Array.isArray(o)?o.map(u):u(o)}}();l.filterProps=["sx"];const c=l},86728:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(9456),i=r(14976);const o=(0,n.Z)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;return(0,i.Z)(e)}},50118:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(29023);var i=r(86728);function o(e){let{props:t,name:r,defaultTheme:o,themeId:a}=e,s=(0,i.Z)(o);a&&(s=s[a]||s);const l=function(e){const{theme:t,name:r,props:i}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.Z)(t.components[r].defaultProps,i):i}({theme:s,name:r,props:t});return l}},14976:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(3346);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=n.useContext(i.T);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},41271:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});const n=e=>e,i=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},88831:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(77219);function i(e){if("string"!==typeof e)throw new Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},21921:(e,t,r)=>{"use strict";function n(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const n={};return Object.keys(e).forEach((i=>{n[i]=e[i].reduce(((e,n)=>{if(n){const i=t(n);""!==i&&e.push(i),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}r.d(t,{Z:()=>n})},84246:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;rnull==t?e:function(){for(var r=arguments.length,n=new Array(r),i=0;i{}))}r.d(t,{Z:()=>n})},81636:(e,t,r)=>{"use strict";function n(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;o{e.apply(this,i)}),r)}return n.clear=()=>{clearTimeout(t)},n}r.d(t,{Z:()=>n})},13019:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,Z:()=>a});var n=r(87462);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function o(e){if(!i(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=o(e[r])})),t}function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=r.clone?(0,n.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((n=>{"__proto__"!==n&&(i(t[n])&&n in e&&i(e[n])?s[n]=a(e[n],t[n],r):r.clone?s[n]=i(t[n])?o(t[n]):t[n]:s[n]=t[n])})),s}},77219:(e,t,r)=>{"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rn})},32298:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(41271);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o=i[t];return o?"".concat(r,"-").concat(o):"".concat(n.Z.generate(e),"-").concat(t)}},77430:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(32298);function i(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach((t=>{i[t]=(0,n.Z)(e,t,r)})),i}},42504:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:()=>n})},8929:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(42504);function i(e){return(0,n.Z)(e).defaultView||window}},29023:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(87462);function i(e,t){const r=(0,n.Z)({},t);return Object.keys(e).forEach((o=>{if(o.toString().match(/^(components|slots)$/))r[o]=(0,n.Z)({},e[o],r[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];r[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(r[o]=(0,n.Z)({},s),Object.keys(a).forEach((e=>{r[o][e]=i(a[e],s[e])}))):r[o]=s:r[o]=a}else void 0===r[o]&&(r[o]=e[o])})),r}},89265:(e,t,r)=>{"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:()=>n})},35422:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);function i(e){let{controlled:t,default:r,name:i,state:o="value"}=e;const{current:a}=n.useRef(void 0!==t),[s,l]=n.useState(r);return[a?t:s,n.useCallback((e=>{a||l(e)}),[])]}},55094:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);const i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect},76182:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(55094);const o=function(e){const t=n.useRef(e);return(0,i.Z)((()=>{t.current=e})),n.useRef((function(){return(0,t.current)(...arguments)})).current}},71577:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(89265);function o(){for(var e=arguments.length,t=new Array(e),r=0;rt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,i.Z)(t,e)}))}),t)}},28334:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>s});var i=r(47313);let o=0;const a=(n||(n=r.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,r]=i.useState(e),n=e||t;return i.useEffect((()=>{null==t&&(o+=1,r("mui-".concat(o)))}),[t]),n}(e)}},95669:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(47313);let i,o=!0,a=!1;const s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(r){}return o||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!s[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function f(){const e=n.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(i),i=window.setTimeout((()=>{a=!1}),100),t.current=!1,!0)},ref:e}}},6954:(e,t,r)=>{"use strict";r.r(t),r.d(t,{sankeyCenter:()=>f,sankeyCircular:()=>I,sankeyJustify:()=>d,sankeyLeft:()=>c,sankeyRight:()=>u});var n=r(74104),i=r(71326),o=r(86978),a=r(30544),s=r.n(a);function l(e){return e.target.depth}function c(e){return e.depth}function u(e,t){return t-1-e.height}function d(e,t){return e.sourceLinks.length?e.depth:t-1}function f(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.VV)(e.sourceLinks,l)-1:0}function h(e){return function(){return e}}var p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function m(e,t){return v(e.source,t.source)||e.index-t.index}function g(e,t){return v(e.target,t.target)||e.index-t.index}function v(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function y(e){return e.value}function x(e){return(e.y0+e.y1)/2}function b(e){return x(e.source)}function w(e){return x(e.target)}function _(e){return e.index}function k(e){return e.nodes}function S(e){return e.links}function T(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function M(e,t){return t(e)}var C=25,A=10,E=.3;function I(){var e,t,r=0,o=0,a=1,l=1,c=24,u=_,f=d,M=k,I=S,P=32,L=2,j=null;function z(){var d={nodes:M.apply(null,arguments),links:I.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,u);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==("undefined"===typeof n?"undefined":p(n))&&(n=e.source=T(t,n)),"object"!==("undefined"===typeof i?"undefined":p(i))&&(i=e.target=T(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(d),function(e,t,r){var n=0;if(null===r){for(var i=[],o=0;o0;--p)g(h*=.99,d),_();function m(i){if(t){var u=1/0;f.forEach((function(e){var r=l*t/(e.length+1);u=r0?t+C+A:t,bottom:r=r>0?r+C+A:r,left:o=o>0?o+C+A:o,right:i=i>0?i+C+A:i}}(s),p=function(e,t){var i=(0,n.Fp)(e.nodes,(function(e){return e.column})),s=a-r,u=l-o,d=s+t.right+t.left,f=u+t.top+t.bottom,h=s/d,p=u/f;return r=r*h+t.left,a=0==t.right?a:a*h,o=o*p+t.top,l*=p,e.nodes.forEach((function(e){e.x0=r+e.column*((a-r-c)/i),e.x1=e.x0+c})),p}(s,h);d*=p,s.links.forEach((function(e){e.width=e.value*d})),f.forEach((function(e){var t=e.length;e.forEach((function(e,r){e.depth==f.length-1&&1==t||0==e.depth&&1==t?(e.y0=l/2-e.value*d,e.y1=e.y0+e.value*d):e.partOfCycle?0==R(e,i)?(e.y0=l/2+r,e.y1=e.y0+e.value*d):"top"==e.circularLinkType?(e.y0=o+r,e.y1=e.y0+e.value*d):(e.y0=l-e.value*d-r,e.y1=e.y0+e.value*d):0==h.top||0==h.bottom?(e.y0=(l-o)/t*r,e.y1=e.y0+e.value*d):(e.y0=(l-o)/2-t/2+r,e.y1=e.y0+e.value*d)}))}))}function g(e,t){var r=f.length;f.forEach((function(i){var o=i.length,a=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&R(i,t)>0);else if(0==a&&1==o)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else if(a==r-1&&1==o)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else{var c=(0,n.J6)(i.sourceLinks,w),u=(0,n.J6)(i.targetLinks,b),d=((c&&u?(c+u)/2:c||u)-x(i))*e;i.y0+=d,i.y1+=d}}))}))}function _(){f.forEach((function(t){var r,n,i,a=o,s=t.length;for(t.sort(v),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+e;if((n=a-e-l)>0)for(a=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=t[i]).y1+e-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(d,P,u),N(d);for(var h=0;h<4;h++)X(d,l,u),K(d,l,u),G(d,o,l,u),X(d,l,u),K(d,l,u);return function(e,t,r){var i=e.nodes,o=e.links,a=!1,s=!1;if(o.forEach((function(e){"top"==e.circularLinkType?a=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==a||0==s){var l=(0,n.VV)(i,(function(e){return e.y0})),c=(r-t)/((0,n.Fp)(i,(function(e){return e.y1}))-l);i.forEach((function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t})),o.forEach((function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c}))}}(d,o,l),D(d,L,l,u),d}function N(e){e.nodes.forEach((function(e){e.sourceLinks.sort(g),e.targetLinks.sort(m)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return z.nodeId=function(e){return arguments.length?(u="function"===typeof e?e:h(e),z):u},z.nodeAlign=function(e){return arguments.length?(f="function"===typeof e?e:h(e),z):f},z.nodeWidth=function(e){return arguments.length?(c=+e,z):c},z.nodePadding=function(t){return arguments.length?(e=+t,z):e},z.nodes=function(e){return arguments.length?(M="function"===typeof e?e:h(e),z):M},z.links=function(e){return arguments.length?(I="function"===typeof e?e:h(e),z):I},z.size=function(e){return arguments.length?(r=o=0,a=+e[0],l=+e[1],z):[a-r,l-o]},z.extent=function(e){return arguments.length?(r=+e[0][0],a=+e[1][0],o=+e[0][1],l=+e[1][1],z):[[r,o],[a,l]]},z.iterations=function(e){return arguments.length?(P=+e,z):P},z.circularLinkGap=function(e){return arguments.length?(L=+e,z):L},z.nodePaddingRatio=function(e){return arguments.length?(t=+e,z):t},z.sortNodes=function(e){return arguments.length?(j=e,z):j},z.update=function(e){return O(e,u),N(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y11||i>1)}function j(e,t,r){return e.sort(z),e.forEach((function(n,i){var o,a,s=0;if(Q(n,r)&&L(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;la.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),e}function D(e,t,r,i){var a=(0,n.VV)(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),j(e.links.filter((function(e){return"top"==e.circularLinkType})),t,i),j(e.links.filter((function(e){return"bottom"==e.circularLinkType})),t,i),e.links.forEach((function(n){if(n.circular){if(n.circularPathData.arcRadius=n.width+A,n.circularPathData.leftNodeBuffer=5,n.circularPathData.rightNodeBuffer=5,n.circularPathData.sourceWidth=n.source.x1-n.source.x0,n.circularPathData.sourceX=n.source.x0+n.circularPathData.sourceWidth,n.circularPathData.targetX=n.target.x0,n.circularPathData.sourceY=n.y0,n.circularPathData.targetY=n.y1,Q(n,i)&&L(n))n.circularPathData.leftSmallArcRadius=A+n.width/2,n.circularPathData.leftLargeArcRadius=A+n.width/2,n.circularPathData.rightSmallArcRadius=A+n.width/2,n.circularPathData.rightLargeArcRadius=A+n.width/2,"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=n.source.y1+C+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=n.source.y0-C-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius);else{var s=n.source.column,l=n.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==n.circularLinkType?c.sort(F):c.sort(N);var u=0;c.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.leftSmallArcRadius=A+n.width/2+u,n.circularPathData.leftLargeArcRadius=A+n.width/2+r*t+u),u+=e.width})),s=n.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==n.circularLinkType?c.sort(Z):c.sort(B),u=0,c.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.rightSmallArcRadius=A+n.width/2+u,n.circularPathData.rightLargeArcRadius=A+n.width/2+r*t+u),u+=e.width})),"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=Math.max(r,n.source.y1,n.target.y1)+C+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=a-C-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius)}n.circularPathData.leftInnerExtent=n.circularPathData.sourceX+n.circularPathData.leftNodeBuffer,n.circularPathData.rightInnerExtent=n.circularPathData.targetX-n.circularPathData.rightNodeBuffer,n.circularPathData.leftFullExtent=n.circularPathData.sourceX+n.circularPathData.leftLargeArcRadius+n.circularPathData.leftNodeBuffer,n.circularPathData.rightFullExtent=n.circularPathData.targetX-n.circularPathData.rightLargeArcRadius-n.circularPathData.rightNodeBuffer}if(n.circular)n.path=function(e){var t="";t="top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY;return t}(n);else{var d=(0,o.h5)().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));n.path=d(n)}}))}function z(e,t){return U(e)==U(t)?"bottom"==e.circularLinkType?F(e,t):N(e,t):U(t)-U(e)}function N(e,t){return e.y0-t.y0}function F(e,t){return t.y0-e.y0}function B(e,t){return e.y1-t.y1}function Z(e,t){return t.y1-e.y1}function U(e){return e.target.column-e.source.column}function V(e){return e.target.x0-e.source.x1}function H(e,t){var r=P(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1+n:e.y1-n}function W(e,t){var r=P(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1-n:e.y1+n}function G(e,t,r,n){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var o=i.source.column+1,a=i.target.column-1,s=1,l=a-o+1;for(s=1;o<=a;o++,s++)e.nodes.forEach((function(a){if(a.column==o){var c,u=s/(l+1),d=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),h=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=d*i.y0+f*i.y0+h*i.y1+p*i.y1,g=m-i.width/2,v=m+i.width/2;g>a.y0&&ga.y0&&va.y1)&&(c=v-a.y0+10,a=Y(a,c,t,r),e.nodes.forEach((function(e){M(e,n)!=M(a,n)&&e.column==a.column&&e.y0a.y1&&Y(e,c,t,r)})))}}))}}))}function q(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1)}function Y(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function X(e,t,r,n){e.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var o=e.links.filter((function(e){return M(e.source,r)==M(i,r)})),a=o.length;a>1&&o.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!$(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=W(t,e);return e.y1-r}if(t.target.column>e.target.column)return W(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;o.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),o.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!$(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function Q(e,t){return M(e.source,t)==M(e.target,t)}},22854:(e,t,r)=>{"use strict";r.r(t),r.d(t,{sankey:()=>_,sankeyCenter:()=>c,sankeyJustify:()=>l,sankeyLeft:()=>a,sankeyLinkHorizontal:()=>M,sankeyRight:()=>s});var n=r(74104),i=r(71326);function o(e){return e.target.depth}function a(e){return e.depth}function s(e,t){return t-1-e.height}function l(e,t){return e.sourceLinks.length?e.depth:t-1}function c(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.VV)(e.sourceLinks,o)-1:0}function u(e){return function(){return e}}function d(e,t){return h(e.source,t.source)||e.index-t.index}function f(e,t){return h(e.target,t.target)||e.index-t.index}function h(e,t){return e.y0-t.y0}function p(e){return e.value}function m(e){return(e.y0+e.y1)/2}function g(e){return m(e.source)*e.value}function v(e){return m(e.target)*e.value}function y(e){return e.index}function x(e){return e.nodes}function b(e){return e.links}function w(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function _(){var e=0,t=0,r=1,o=1,a=24,s=8,c=y,_=l,k=x,S=b,T=32,M=2/3;function C(){var l={nodes:k.apply(null,arguments),links:S.apply(null,arguments)};return function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,c);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==typeof n&&(n=e.source=w(t,n)),"object"!==typeof i&&(i=e.target=w(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(l),function(e){e.nodes.forEach((function(e){e.value=Math.max((0,n.Sm)(e.sourceLinks,p),(0,n.Sm)(e.targetLinks,p))}))}(l),function(t){var n,i,o;for(n=t.nodes,i=[],o=0;n.length;++o,n=i,i=[])n.forEach((function(e){e.depth=o,e.sourceLinks.forEach((function(e){i.indexOf(e.target)<0&&i.push(e.target)}))}));for(n=t.nodes,i=[],o=0;n.length;++o,n=i,i=[])n.forEach((function(e){e.height=o,e.targetLinks.forEach((function(e){i.indexOf(e.source)<0&&i.push(e.source)}))}));var s=(r-e-a)/(o-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(o-1,Math.floor(_.call(null,t,o))))*s)+a}))}(l),function(e){var r=(0,i.b1)().key((function(e){return e.x0})).sortKeys(n.j2).entries(e.nodes).map((function(e){return e.values}));c(),f();for(var a=1,l=T;l>0;--l)d(a*=.99),f(),u(a),f();function c(){var i=(0,n.Fp)(r,(function(e){return e.length})),a=M*(o-t)/(i-1);s>a&&(s=a);var l=(0,n.VV)(r,(function(e){return(o-t-(e.length-1)*s)/(0,n.Sm)(e,p)}));r.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*l}))})),e.links.forEach((function(e){e.width=e.value*l}))}function u(e){r.forEach((function(t){t.forEach((function(t){if(t.targetLinks.length){var r=((0,n.Sm)(t.targetLinks,g)/(0,n.Sm)(t.targetLinks,p)-m(t))*e;t.y0+=r,t.y1+=r}}))}))}function d(e){r.slice().reverse().forEach((function(t){t.forEach((function(t){if(t.sourceLinks.length){var r=((0,n.Sm)(t.sourceLinks,v)/(0,n.Sm)(t.sourceLinks,p)-m(t))*e;t.y0+=r,t.y1+=r}}))}))}function f(){r.forEach((function(e){var r,n,i,a=t,l=e.length;for(e.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+s;if((n=a-s-o)>0)for(a=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=e[i]).y1+s-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(l),A(l),l}function A(e){e.nodes.forEach((function(e){e.sourceLinks.sort(f),e.targetLinks.sort(d)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return C.update=function(e){return A(e),e},C.nodeId=function(e){return arguments.length?(c="function"===typeof e?e:u(e),C):c},C.nodeAlign=function(e){return arguments.length?(_="function"===typeof e?e:u(e),C):_},C.nodeWidth=function(e){return arguments.length?(a=+e,C):a},C.nodePadding=function(e){return arguments.length?(s=+e,C):s},C.nodes=function(e){return arguments.length?(k="function"===typeof e?e:u(e),C):k},C.links=function(e){return arguments.length?(S="function"===typeof e?e:u(e),C):S},C.size=function(n){return arguments.length?(e=t=0,r=+n[0],o=+n[1],C):[r-e,o-t]},C.extent=function(n){return arguments.length?(e=+n[0][0],r=+n[1][0],t=+n[0][1],o=+n[1][1],C):[[e,t],[r,o]]},C.iterations=function(e){return arguments.length?(T=+e,C):T},C}var k=r(86978);function S(e){return[e.source.x1,e.y0]}function T(e){return[e.target.x0,e.y1]}function M(){return(0,k.h5)().source(S).target(T)}},8996:(e,t,r)=>{var n,i;(function(){var o={version:"3.8.0"},a=[].slice,s=function(e){return a.call(e)},l=self.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(yo){s=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(xo){var d=this.Element.prototype,f=d.setAttribute,h=d.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){m.call(this,e,t+"",r)}}function g(e,t){return et?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(e,t){return te?1:t>=e?0:NaN},o.min=function(e,t){var r,n,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(e,t){var r,n,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(e,t){var r,n,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);function w(e){return e.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(e){return x(1===e.length?function(t,r){return g(e(t),r)}:e)},o.shuffle=function(e,t,r){(o=arguments.length)<3&&(r=e.length,o<2&&(t=0));for(var n,i,o=r-t;o;)i=Math.random()*o--|0,n=e[o+t],e[o+t]=e[i+t],e[i+t]=n;return e},o.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},o.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--a]=n[t];return r};var _=Math.abs;function k(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function S(){this._=Object.create(null)}o.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r===1/0)throw new Error("infinite range");var n,i=[],o=function(e){var t=1;for(;e*t%1;)t*=10;return t}(_(r)),a=-1;if(e*=o,t*=o,(r*=o)<0)for(;(n=e+r*++a)>t;)i.push(n/o);else for(;(n=e+r*++a)=n.length)return t?t.call(r,o):e?o.sort(e):o;for(var l,c,u,d,f=-1,h=o.length,p=n[s++],m=new S;++f=n.length)return e;var r=[],o=i[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),o?r.sort((function(e,t){return o(e.key,t.key)})):r}return r.map=function(e,t){return a(t,e,0)},r.entries=function(e){return s(a(o.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return i[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},o.set=function(e){var t=new L;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},o.event=null,o.requote=function(e){return e.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function q(e){return G(e,$),e}var Y=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},K=function(e,t){var r=e.matches||e[z(e,"matchesSelector")];return K=function(e,t){return r.call(e,t)},K(e,t)};"function"===typeof Sizzle&&(Y=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,K=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var $=o.selection.prototype=[];function J(e){return"function"===typeof e?e:function(){return Y(e,this)}}function Q(e){return"function"===typeof e?e:function(){return X(e,this)}}$.select=function(e){var t,r,n,i,o=[];e=J(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},$.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node();return(e=o.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},$.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node(),n=(e=oe(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},$.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,i));var l=xe.get(e);function c(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return l&&(e=l,a=we),i?t?function(){var i=a(t,s(arguments));c.call(this),this.addEventListener(e,this[n]=i,i.$=r),i._=t}:c:t?F:function(){var t,r=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var n in this)if(t=n.match(r)){var i=this[n];this.removeEventListener(t[1],i,i.$),delete this[n]}}}o.selection.enter=ge,o.selection.enter.prototype=ve,ve.append=$.append,ve.empty=$.empty,ve.node=$.node,ve.call=$.call,ve.size=$.size,ve.select=function(e){for(var t,r,n,i,o,a=[],s=-1,l=this.length;++s=t&&(t=i+1);!(a=s[t])&&++t1?Re:e<-1?-Re:Math.asin(e)}function ze(e){return((e=Math.exp(e))+1/e)/2}var Ne=Math.SQRT2;o.interpolateZoom=function(e,t){var r,n,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],c=t[2],u=s-i,d=l-o,f=u*u+d*d;if(f0&&(e=e.transition().duration(m)),e.call(_.event)}function C(){s&&s.domain(a.range().map((function(e){return(e-f.x)/f.k})).map(a.invert)),d&&d.domain(c.range().map((function(e){return(e-f.y)/f.k})).map(c.invert))}function A(e){g++||e({type:"zoomstart"})}function E(e){C(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function I(e){--g||(e({type:"zoomend"}),t=null)}function O(){var e=this,t=w.of(e,arguments),r=0,n=o.select(u(e)).on(y,(function(){r=1,T(o.mouse(e),i),E(t)})).on(x,(function(){n.on(y,null).on(x,null),a(r),I(t)})),i=k(o.mouse(e)),a=Se(e);Ji.call(e),A(t)}function P(){var e,t=this,r=w.of(t,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,u=[],d=o.select(t),h=Se(t);function p(){var r=o.touches(t);return e=f.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=k(e))})),r}function m(){var e=o.event.target;o.select(e).on(l,g).on(c,y),u.push(e);for(var r=o.event.changedTouches,s=0,d=r.length;s1){v=h[0];var x=h[1],b=v[0]-x[0],w=v[1]-x[1];a=b*b+w*w}}function g(){var s,l,c,u,d=o.touches(t);Ji.call(t);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+t):r+t-r*t),new at(o(e+120),o(e),o(e-120))}function Ge(e,t,r){return this instanceof Ge?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof Ge?new Ge(e.h,e.c,e.l):rt(e instanceof Xe?e.l:(e=ht((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ge(e,t,r)}He.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,this.l/e)},He.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,e*this.l)},He.rgb=function(){return We(this.h,this.s,this.l)},o.hcl=Ge;var qe=Ge.prototype=new Ue;function Ye(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(r,Math.cos(e*=Le)*t,Math.sin(e)*t)}function Xe(e,t,r){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof Ge?Ye(e.h,e.c,e.l):ht((e=at(e)).r,e.g,e.b):new Xe(e,t,r)}qe.brighter=function(e){return new Ge(this.h,this.c,Math.min(100,this.l+Ke*(arguments.length?e:1)))},qe.darker=function(e){return new Ge(this.h,this.c,Math.max(0,this.l-Ke*(arguments.length?e:1)))},qe.rgb=function(){return Ye(this.h,this.c,this.l).rgb()},o.lab=Xe;var Ke=18,$e=.95047,Je=1,Qe=1.08883,et=Xe.prototype=new Ue;function tt(e,t,r){var n=(e+16)/116,i=n+t/500,o=n-r/200;return new at(ot(3.2404542*(i=nt(i)*$e)-1.5371385*(n=nt(n)*Je)-.4985314*(o=nt(o)*Qe)),ot(-.969266*i+1.8760108*n+.041556*o),ot(.0556434*i-.2040259*n+1.0572252*o))}function rt(e,t,r){return e>0?new Ge(Math.atan2(r,t)*je,Math.sqrt(t*t+r*r),e):new Ge(NaN,NaN,e)}function nt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function it(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ot(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e,t,r){return this instanceof at?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof at?new at(e.r,e.g,e.b):dt(""+e,at,We):new at(e,t,r)}function st(e){return new at(e>>16,e>>8&255,255&e)}function lt(e){return st(e)+""}et.brighter=function(e){return new Xe(Math.min(100,this.l+Ke*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Xe(Math.max(0,this.l-Ke*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},o.rgb=at;var ct=at.prototype=new Ue;function ut(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function dt(e,t,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.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 t(mt(i[0]),mt(i[1]),mt(i[2]))}return(o=gt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function ft(e,t,r){var n,i,o=Math.min(e/=255,t/=255,r/=255),a=Math.max(e,t,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=e==a?(t-r)/s+(t0&&l<1?0:n),new Ve(n,i,l)}function ht(e,t,r){var n=it((.4124564*(e=pt(e))+.3575761*(t=pt(t))+.1804375*(r=pt(r)))/$e),i=it((.2126729*e+.7151522*t+.072175*r)/Je);return Xe(116*i-16,500*(n-i),200*(i-it((.0193339*e+.119192*t+.9503041*r)/Qe)))}function pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function mt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ct.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(i,c)}catch(yo){return void a.error.call(i,yo)}a.load.call(i,e)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,c)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(u=e,i):u},i.response=function(e){return r=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"===typeof n&&(o=n,n=null),c.open(r,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}gt.forEach((function(e,t){gt.set(e,st(t))})),o.functor=vt,o.xhr=yt(j),o.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=xt(e,t,null==r?o:a(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?o:a(e)):r},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(kt),kt=setTimeout(Mt,t)),_t=0):(_t=1,St(Mt))}function Ct(){for(var e=Date.now(),t=bt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function At(){for(var e,t=bt,r=1/0;t;)t.c?(t.t1&&(t=e[o[a-2]],r=e[o[a-1]],n=e[s],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function Pt(e,t){return e[0]-t[0]||e[1]-t[1]}o.timer=function(){Tt.apply(this,arguments)},o.timer.flush=function(){Ct(),At()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},o.geom={},o.geom.hull=function(e){var t=Et,r=It;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=vt(t),o=vt(r),a=e.length,s=[],l=[];for(n=0;n=0;--n)h.push(e[s[c[n]][2]]);for(n=+d;nAe)s=s.L;else{if(!((i=o-Kt(s,a))>Ae)){n>-Ae?(t=s.P,r=s):i>-Ae?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Wt(e);if(Ft.insert(t,l),t||r){if(t===r)return tr(t),r=Wt(t.site),Ft.insert(l,r),l.edge=r.edge=ir(t.site,l.site),er(t),void er(r);if(r){tr(t),tr(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=r.site,m=p.x-u,g=p.y-d,v=2*(f*g-h*m),y=f*f+h*h,x=m*m+g*g,b={x:(g*y-h*x)/v+u,y:(f*x-m*y)/v+d};ar(r.edge,c,p,b),l.edge=ir(c,e,null,b),r.edge=ir(e,p,null,b),er(t),er(r)}else l.edge=ir(t.site,l.site)}}function Xt(e,t){var r=e.site,n=r.x,i=r.y,o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-t;if(!c)return s;var u=s-n,d=1/o-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-l+c/2+i-o/2)))/d+n:(n+s)/2}function Kt(e,t){var r=e.N;if(r)return Xt(r,t);var n=e.site;return n.y===t?n.x:1/0}function $t(e){this.site=e,this.edges=[]}function Jt(e,t){return t.angle-e.angle}function Qt(){cr(this),this.x=this.y=this.arc=this.site=this.cy=null}function er(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,u=o.x-a,d=2*(l*(g=o.y-s)-c*u);if(!(d>=-Ee)){var f=l*l+c*c,h=u*u+g*g,p=(g*f-c*h)/d,m=(l*h-u*f)/d,g=m+s,v=Vt.pop()||new Qt;v.arc=e,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.circle=v;for(var y=null,x=Zt._;x;)if(v.y=s)return;if(f>p){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(f>p){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(t/=f,f<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=i-l,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t0)){if(t/=h,h<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=o-c,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>u&&(u=t)}else if(h>0){if(t0&&(e.a={x:l+u*f,y:c+u*h}),d<1&&(e.b={x:l+d*f,y:c+d*h}),e}}}}}),l=a.length;l--;)(!rr(t=a[l],e)||!s(t)||_(t.a.x-t.b.x)Ae||_(i-r)>Ae)&&(s.splice(a,0,new sr(or(o.site,u,_(n-d)Ae?{x:d,y:_(t-d)Ae?{x:_(r-p)Ae?{x:f,y:_(t-f)Ae?{x:_(r-h)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Ae)*Ae,y:Math.round(i(e,t)/Ae)*Ae,i:t}}))}return a.links=function(e){return hr(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return hr(s(e)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort(Jt),u=-1,d=c.length,f=c[d-1].edge,h=f.l===l?f.r:f.l;++uo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:wr(r,n)})),o=Sr.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(d=0;dm&&(m=x),b>g&&(g=b),c.push(x),u.push(b)}var w=m-h,k=g-p;function S(e,t,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(_(l-r)+_(c-n)<.01)T(e,t,r,n,i,o,a,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,l,c,i,o,a,s),T(e,t,r,n,i,o,a,s)}else e.x=r,e.y=n,e.point=t}else T(e,t,r,n,i,o,a,s)}function T(e,t,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),u=r>=l,d=n>=c,f=d<<1|u;e.leaf=!1,u?i=l:a=l,d?o=c:s=c,S(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,o,a,s)}w>k?g=p+w:m=h+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){S(M,e,+v(e,++d),+y(e,d),h,p,m,g)}};if(M.visit=function(e){yr(e,M,h,p,m,g)},M.find=function(e){return function(e,t,r,n,i,o,a){var s,l=1/0;return function e(c,u,d,f,h){if(!(u>o||d>a||f=w)<<1|t>=b,k=_+4;_=0&&!(r=o.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function jr(e){return 1-Math.cos(e*Re)}function Dr(e){return Math.pow(2,10*(e-1))}function zr(e){return 1-Math.sqrt(1-e*e)}function Nr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Br(e){var t,r,n,i=[e.a,e.b],o=[e.c,e.d],a=Ur(i),s=Zr(i,o),l=Ur(((t=o)[0]+=(n=-s)*(r=i)[0],t[1]+=n*r[1],t))||0;i[0]*o[1]=0?e.slice(0,r):e,i=r>=0?e.slice(r+1):"in";return n=Ar.get(n)||Cr,i=Er.get(i)||j,t=i(n.apply(null,a.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var r=e.h,n=e.c,i=e.l,a=t.h-r,s=t.c-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.c:n);isNaN(a)?(a=0,r=isNaN(r)?t.h:r):a>180?a-=360:a<-180&&(a+=360);return function(e){return Ye(r+a*e,n+s*e,i+l*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var r=e.h,n=e.s,i=e.l,a=t.h-r,s=t.s-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.s:n);isNaN(a)?(a=0,r=isNaN(r)?t.h:r):a>180?a-=360:a<-180&&(a+=360);return function(e){return We(r+a*e,n+s*e,i+l*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var r=e.l,n=e.a,i=e.b,a=t.l-r,s=t.a-n,l=t.b-i;return function(e){return tt(r+a*e,n+s*e,i+l*e)+""}},o.interpolateRound=Fr,o.transform=function(e){var t=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new Br(r?r.matrix:Vr)})(e)},Br.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vr={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(e){return e.length?e.pop()+",":""}function Wr(e,t){var r=[],n=[];return e=o.transform(e),t=o.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:wr(e[0],t[0])},{i:i-2,x:wr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:wr(e,t)})):t&&r.push(Hr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:wr(e,t)}):t&&r.push(Hr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:wr(e[0],t[0])},{i:i-2,x:wr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Hr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,i=-1,o=n.length;++i0?r=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:r=0})):t>0&&(l.start({type:"start",alpha:r=t}),e=Tt(s.tick)),s):r},s.start=function(){var e,t,r,o=v.length,l=y.length,u=c[0],p=c[1];for(e=0;e=0;)r.push(i[n])}function sn(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return sn(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(an(e,(function(e){e.children&&(e.value=0)})),sn(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function r(e,t,n,i){var o=e.children;if(e.x=t,e.y=e.depth*i,e.dx=n,e.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=t);return n}function wn(e){return e.reduce(_n,0)}function _n(e,t){return e+t[1]}function kn(e,t){return Sn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Sn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,o=[];++r<=t;)o[r]=i*r+n;return o}function Tn(e){return[o.min(e),o.max(e)]}function Mn(e,t){return e.value-t.value}function Cn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function An(e,t){e._pack_next=t,t._pack_prev=e}function En(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function In(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,o,a,s,l,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(On),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(Ln(r,n,i=t[2]),x(i),Cn(r,i),r._pack_prev=i,Cn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=d[0]&&l<=d[1]&&((s=c[o.bisect(f,l,1,p)-1]).y+=m,s.push(i[a]));return c}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(r=vt(e),i):r},i.bins=function(e){return arguments.length?(n="number"===typeof e?function(t){return Sn(t,e)}:vt(e),i):n},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(Mn),r=0,n=[1,1];function i(i,o){var a=t.call(this,i,o),s=a[0],l=n[0],c=n[1],u=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(s.x=s.y=0,sn(s,(function(e){e.r=+u(e.value)})),sn(s,In),r){var d=r*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;sn(s,(function(e){e.r+=d})),sn(s,In),sn(s,(function(e){e.r-=d}))}return Rn(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(e){return arguments.length?(n=e,i):n},i.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(r=+e,i):r},on(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=jn,r=[1,1],n=null;function i(i,o){var c=e.call(this,i,o),u=c[0],d=function(e){var t,r={A:null,children:[e]},n=[r];for(;null!=(t=n.pop());)for(var i,o=t.children,a=0,s=o.length;ah.x&&(h=e),e.depth>p.depth&&(p=e)}));var m=t(f,h)/2-f.x,g=r[0]/(h.x+t(h,f)/2+m),v=r[1]/(p.depth||1);an(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r.length){!function(e){var t,r=0,n=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var o=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,o=e,a=e,s=r,l=o.parent.children[0],c=o.m,u=a.m,d=s.m,f=l.m;s=zn(s),o=Dn(o),s&&o;)l=Dn(l),(a=zn(a)).a=e,(i=s.z+d-o.z-c+t(s._,o._))>0&&(Nn(Fn(s,e,n),e,i),c+=i,u+=i),d+=s.m,c+=o.m,f+=l.m,u+=a.m;s&&!zn(a)&&(a.t=s,a.m+=d-u),o&&!Dn(l)&&(l.t=o,l.m+=c-f,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e)?l:null,i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:l,i):n?r:null},on(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=jn,r=[1,1],n=!1;function i(i,a){var s,l=e.call(this,i,a),c=l[0],u=0;sn(c,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(r)):(e.x=s?u+=t(e,s):0,e.y=0,s=e)}));var d=Bn(c),f=Zn(c),h=d.x-t(d,f)/2,p=f.x+t(f,d)/2;return sn(c,n?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e),i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null!=(r=e),i):n?r:null},on(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=Un,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,i=-1,o=e.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=h(s,m))<=f?(c.pop(),f=n):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=a(e),i=t.slice(),o=[];for(u(i,n.dx*n.dy/e.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(p(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);t.forEach(f)}}function h(e,t){for(var r,n=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=r));return t*=t,(n*=n)?Math.max(t*i*c/n,n/(t*o*c)):1/0}function p(e,t,n,i){var o,a=-1,s=e.length,l=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((i||u>n.dy)&&(u=n.dy);++an.dx)&&(u=n.dx);++a1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Kn:Gn,l=n?qr:Gr;return i=a(e,t,l,r),o=a(t,e,l,Tr),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},s.range=function(e){return arguments.length?(t=e,a()):t},s.rangeRound=function(e){return s.range(e).interpolate(Fr)},s.clamp=function(e){return arguments.length?(n=e,a()):n},s.interpolate=function(e){return arguments.length?(r=e,a()):r},s.ticks=function(t){return ti(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Qn(e,t),a()},s.copy=function(){return $n(e,t,r,n)},a()}function Jn(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Qn(e,t){return qn(e,Yn(ei(e,t)[2])),qn(e,Yn(ei(e,t)[2])),e}function ei(e,t){null==t&&(t=10);var r=Hn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),o=t/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.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 ti(e,t){return o.range.apply(o,ei(e,t))}o.scale.linear=function(){return $n([0,1],[0,1],Tr,!1)};function ri(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),a):t},a.nice=function(){var t=qn(n.map(i),r?Math:ni);return e.domain(t),n=t.map(o),a},a.ticks=function(){var e=Hn(n),a=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)a.push(o(c)*f);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.copy=function(){return ri(e.copy(),t,r,n)},Jn(a,e)}o.scale.log=function(){return ri(o.scale.linear().domain([0,1]),10,!0,[1,10])};var ni={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ii(e,t,r){var n=oi(t),i=oi(1/t);function o(t){return e(n(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),o):r},o.ticks=function(e){return ti(r,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},o.nice=function(e){return o.domain(Qn(r,e))},o.exponent=function(a){return arguments.length?(n=oi(t=a),i=oi(1/t),e.domain(r.map(n)),o):t},o.copy=function(){return ii(e.copy(),t,r)},Jn(o,e)}function oi(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ai(e,t){var r,n,i;function a(i){return n[((r.get(i)||("range"===t.t?r.set(i,e.push(i)):NaN))-1)%n.length]}function s(t,r){return o.range(e.length).map((function(e){return t+r*e}))}return a.domain=function(n){if(!arguments.length)return e;e=[],r=new S;for(var i,o=-1,s=n.length;++o0?r[n-1]:e[0],nd?0:1;if(c=Pe)return l(c,h)+(s?l(s,1-h):"")+"Z";var p,m,g,v,y,x,b,w,_,k,S,T,M=0,C=0,A=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===gi?Math.sqrt(s*s+c*c):+n.apply(this,arguments),h||(C*=-1),c&&(C=De(g/c*Math.sin(v))),s&&(M=De(g/s*Math.sin(v)))),c){y=c*Math.cos(u+C),x=c*Math.sin(u+C),b=c*Math.cos(d-C),w=c*Math.sin(d-C);var E=Math.abs(d-u-2*C)<=Ie?0:1;if(C&&_i(y,x,b,w)===h^E){var I=(u+d)/2;y=c*Math.cos(I),x=c*Math.sin(I),b=w=null}}else y=x=0;if(s){_=s*Math.cos(d-M),k=s*Math.sin(d-M),S=s*Math.cos(u+M),T=s*Math.sin(u+M);var O=Math.abs(u-d+2*M)<=Ie?0:1;if(M&&_i(_,k,S,T)===1-h^O){var P=(u+d)/2;_=s*Math.cos(P),k=s*Math.sin(P),S=T=null}}else _=k=0;if(f>Ae&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function ki(e,t,r,n,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=e[0]+l,d=e[1]+c,f=t[0]+l,h=t[1]+c,p=(u+f)/2,m=(d+h)/2,g=f-u,v=h-d,y=g*g+v*v,x=r-n,b=u*h-f*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),_=(b*v-g*w)/y,k=(-b*g-v*w)/y,S=(b*v+g*w)/y,T=(-b*g+v*w)/y,M=_-p,C=k-m,A=S-p,E=T-m;return M*M+C*C>A*A+E*E&&(_=S,k=T),[[_-l,k-c],[_*r/x,k*r/x]]}function Si(){return!0}function Ti(e){var t=Et,r=It,n=Si,i=Ci,o=i.key,a=.7;function s(o){var s,l=[],c=[],u=-1,d=o.length,f=vt(t),h=vt(r);function p(){l.push("M",i(e(c),a))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":Ei,"step-after":Ii,basis:Ri,"basis-open":function(e){if(e.length<4)return Ci(e);var t,r=[],n=-1,i=e.length,o=[0],a=[0];for(;++n<3;)t=e[n],o.push(t[0]),a.push(t[1]);r.push(Li(zi,o)+","+Li(zi,a)),--n;for(;++n9&&(i=3*t/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function Ci(e){return e.length>1?e.join("L"):e+"Z"}function Ai(e){return e.join("L")+"Z"}function Ei(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],o=e[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cIe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return o.radius=function(e){return arguments.length?(r=vt(e),o):r},o.source=function(t){return arguments.length?(e=vt(t),o):e},o.target=function(e){return arguments.length?(t=vt(e),o):t},o.startAngle=function(e){return arguments.length?(n=vt(e),o):n},o.endAngle=function(e){return arguments.length?(i=vt(e),o):i},o},o.svg.diagonal=function(){var e=Ui,t=Vi,r=Wi;function n(n,i){var o=e.call(this,n,i),a=t.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=vt(t),n):e},n.target=function(e){return arguments.length?(t=vt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=Wi,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Re;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},o.svg.symbol=function(){var e=qi,t=Gi;function r(r,n){return(Xi.get(e.call(this,r,n))||Yi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=vt(t),r):e},r.size=function(e){return arguments.length?(t=vt(e),r):t},r};var Xi=o.map({circle:Yi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*$i)),r=t*$i;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});o.svg.symbolTypes=Xi.keys();var Ki=Math.sqrt(3),$i=Math.tan(30*Le);$.transition=function(e){for(var t,r,n=to||++io,i=so(e),o=[],a=ro||{time:Date.now(),ease:Lr,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(e,a);if(o>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(o=i.time,a=Tt((function(e){var t=d.delay;if(a.t=t+o,t<=e)return f(e-t);a.c=f}),0,o),d=u[n]={tween:new S,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}no.call=$.call,no.empty=$.empty,no.node=$.node,no.size=$.size,o.transition=function(e,t){return e&&e.transition?to?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=no,no.select=function(e){var t,r,n,i=this.id,o=this.namespace,a=[];e=J(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=o.select(o.event.target),x=r.of(v,arguments),b=o.select(v),w=y.datum(),_=!/^(n|s)$/.test(w)&&n,k=!/^(e|w)$/.test(w)&&i,S=y.classed("extent"),T=Se(v),M=o.mouse(v),C=o.select(u(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(S||(d=null,M[0]-=a[1],M[1]-=s[1],S=2),U())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==S&&(M[0]+=a[1],M[1]+=s[1],S=0,U())}));if(o.event.changedTouches?C.on("touchmove.brush",I).on("touchend.brush",P):C.on("mousemove.brush",I).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),S)M[0]=a[0]-M[0],M[1]=s[0]-M[1];else if(w){var A=+/w$/.test(w),E=+/^n/.test(w);g=[a[1-A]-M[0],s[1-E]-M[1]],M[0]=a[A],M[1]=s[E]}else o.event.altKey&&(d=M.slice());function I(){var e=o.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),S||(o.event.altKey?(d||(d=[(a[0]+a[1])/2,(s[0]+s[1])/2]),M[0]=a[+(e[0]{"use strict";e.exports=r(43168)},43168:(e,t,r)=>{"use strict";const n=r(63479),i=r(88060),o=r(86840),a=r(88810),s=r(49147),l=r(25218),c=r(86749),u=r(57710),d=r(2166),f=r(39489);function h(e,t){let[r,n,o,a]=t,s=1/(o-r),l=1/(a-n),c=new Array(e.length);for(let u=0,d=e.length/2;u>>1;t.dtype||(t.dtype="array"),"string"===typeof t.dtype?p=new(d(t.dtype))(g):t.dtype&&(p=t.dtype,Array.isArray(p)&&(p.length=g));for(let n=0;nr||s>1073741824){for(let e=0;er+i||S>l||T=C)return;if(a===s)return;let c=v[o];void 0===s&&(s=c.length);for(let v=a;v=p&&r<=g&&n>=m&&n<=w&&A.push(t)}let u=y[o],d=u[4*a+0],f=u[4*a+1],h=u[4*a+2],x=u[4*a+3],b=function(e,t){let r=null,n=0;for(;null===r;)if(r=e[4*t+n],n++,n>e.length)return null;return r}(u,a+1),_=.5*i,E=o+1;t(r,n,_,E,d,f||h||x||b),t(r,n+_,_,E,f,h||x||b),t(r+_,n,_,E,h,x||b),t(r+_,n+_,_,E,x,b)}(0,0,1,0,0,1),A},p;function _(e,t,r){let n=1,i=.5,o=.5,a=.5;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400),i=6378137;function o(e){var t=0;if(e&&e.length>0){t+=Math.abs(a(e[0]));for(var r=1;r2){for(l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400);function i(e){var t=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400),i=r(1949);t.default=function(e,t){void 0===t&&(t={});var r=0,o=0,a=0;return n.coordEach(e,(function(e){r+=e[0],o+=e[1],a++}),!0),i.point([r/a,o/a],t.properties)}},1949:(e,t)=>{"use strict";function r(e,t,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=t||{},n.geometry=e,n}function n(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(e[0])||!h(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function i(e,t,n){void 0===n&&(n={});for(var i=0,o=e;i=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return f(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=f,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/i*o},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},6400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1949);function i(e,t,r){if(null!==e)for(var n,o,a,s,l,c,u,d,f=0,h=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,v=m?e.features.length:1,y=0;yc||h>u||p>d)return l=i,c=r,u=h,d=p,void(a=0);var m=n.lineString([l,i],e.properties);if(!1===t(m,r,o,p,a))return!1;a++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s{e.exports=function(e){var t=0,r=0,n=0,i=0;return e.map((function(e){var o=(e=e.slice())[0],a=o.toUpperCase();if(o!=a)switch(e[0]=a,o){case"a":e[6]+=n,e[7]+=i;break;case"v":e[1]+=i;break;case"h":e[1]+=n;break;default:for(var s=1;s{"use strict";e.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;ni&&(i=e[a]),e[a]{"use strict";e.exports=function(e,t,r){if("function"===typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!==typeof t)throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(88810);e.exports=function(e,t,r){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1);null==r&&(r=n(e,t));for(var i=0;i{e.exports=function(e,t){var r="number"===typeof e,n="number"===typeof t;r&&!n?(t=e,e=0):r||n||(e=0,t=0);var i=(t|=0)-(e|=0);if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),a=0,s=e;a{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}var x="",b="",w="",_="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function S(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function T(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(e,t,r){var n="",i="",o=0,a="",s=!1,l=T(e),c=l.split("\n"),u=T(t).split("\n"),d=0,f="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var h=c[0].length+u[0].length;if(h<=10){if(("object"!==m(e)||null===e)&&("object"!==m(t)||null===t)&&(0!==e||0!==t))return"".concat(k[r],"\n\n")+"".concat(c[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r){if(h<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;c[0][d]===u[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}}for(var p=c[c.length-1],g=u[u.length-1];p===g&&(d++<2?a="\n ".concat(p).concat(a):n=p,c.pop(),u.pop(),0!==c.length&&0!==u.length);)p=c[c.length-1],g=u[u.length-1];var v=Math.max(c.length,u.length);if(0===v){var S=l.split("\n");if(S.length>30)for(S[26]="".concat(x,"...").concat(_);S.length>27;)S.pop();return"".concat(k.notIdentical,"\n\n").concat(S.join("\n"),"\n")}d>3&&(a="\n".concat(x,"...").concat(_).concat(a),s=!0),""!==n&&(a="\n ".concat(n).concat(a),n="");var M=0,C=k[r]+"\n".concat(b,"+ actual").concat(_," ").concat(w,"- expected").concat(_),A=" ".concat(x,"...").concat(_," Lines skipped");for(d=0;d1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(u[d-2]),M++),i+="\n ".concat(u[d-1]),M++),o=d,n+="\n".concat(w,"-").concat(_," ").concat(u[d]),M++;else if(u.length1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(c[d-2]),M++),i+="\n ".concat(c[d-1]),M++),o=d,i+="\n".concat(b,"+").concat(_," ").concat(c[d]),M++;else{var I=u[d],O=c[d],P=O!==I&&(!y(O,",")||O.slice(0,-1)!==I);P&&y(I,",")&&I.slice(0,-1)===O&&(P=!1,O+=","),P?(E>1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(c[d-2]),M++),i+="\n ".concat(c[d-1]),M++),o=d,i+="\n".concat(b,"+").concat(_," ").concat(O),n+="\n".concat(w,"-").concat(_," ").concat(I),M+=2):(i+=n,n="",1!==E&&0!==d||(i+="\n ".concat(O),M++))}if(M>20&&d30)for(h[26]="".concat(x,"...").concat(_);h.length>27;)h.pop();t=1===h.length?s.call(this,"".concat(f," ").concat(h[0])):s.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var p=T(o),g="",y=k[n];"notDeepEqual"===n||"notEqual"===n?(p="".concat(k[n],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(T(a)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===n||"equal"===n?p="".concat(y,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(n," ").concat(g)),t=s.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=d,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=a,t.operator=n,Error.captureStackTrace&&Error.captureStackTrace(c(t),i),t.stack,t.name="AssertionError",l(t)}return r=u,(n=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&a(r.prototype,n),o&&a(r,o),Object.defineProperty(r,"prototype",{writable:!1}),u}(u(Error),g.custom);e.exports=C},13905:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,s,l;if(void 0===c&&(c=r(75205)),c("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))l="The ".concat(e," ").concat(o," ").concat(h(t,"type"));else{var u=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(h(t,"type"))}return l+=". Received type ".concat(n(i))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(97736));var i=u.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=d},88527:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function L(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),u=0,d=l>0?a-4:a;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t);1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},63479:e=>{"use strict";function t(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>=0?(o=a,i=a-1):n=a+1}return o}function r(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>0?(o=a,i=a-1):n=a+1}return o}function n(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<0?(o=a,n=a+1):i=a-1}return o}function i(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<=0?(o=a,n=a+1):i=a-1}return o}function o(e,t,r,n,i){for(;n<=i;){var o=n+i>>>1,a=e[o],s=void 0!==r?r(a,t):a-t;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(e,t,r,n,i,o){return"function"===typeof r?o(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,o){return a(e,r,n,i,o,t)},gt:function(e,t,n,i,o){return a(e,t,n,i,o,r)},lt:function(e,t,r,i,o){return a(e,t,r,i,o,n)},le:function(e,t,r,n,o){return a(e,t,r,n,o,i)},eq:function(e,t,r,n,i){return a(e,t,r,n,i,o)}}},34789:(e,t)=>{"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},42990:e=>{"use strict";e.exports=function(e,n){n||(n={});var i,o,a,s,l,c,u,d,f,h,p,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=e,c=n.stride?n.stride:Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=(d=e).getContext("2d"),i=d.width,o=d.height,s=(f=u.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e,i=(d=e.canvas).width,o=d.height,s=(f=u.getImageData(0,0,i,o)).data,c=4):window.ImageData&&e instanceof window.ImageData&&(f=e,i=e.width,o=e.height,s=f.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),h=0,p=Math.floor(l.length/c);h{"use strict";const n=r(2470),i=r(60545),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,r)}function c(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||K(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r);for(let l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function A(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function j(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function U(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(o+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(o+1)-1).concat(n,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(n):">= ".concat(t).concat(n," and <= ").concat(r).concat(n),new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i),n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Y(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!==e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"===typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},44680:(e,t,r)=>{"use strict";var n=r(28476),i=r(59962),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"===typeof r&&o(e,".prototype.")>-1?i(r):r}},59962:(e,t,r)=>{"use strict";var n=r(1199),i=r(28476),o=r(51267),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(h){u=null}e.exports=function(e){if("function"!==typeof e)throw new a("a function is required");var t=c(n,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},88060:e=>{e.exports=function(e,t,r){return tr?r:e:et?t:e}},10127:(e,t,r)=>{"use strict";var n=r(88060);function i(e,t){null==t&&(t=!0);var r=e[0],i=e[1],o=e[2],a=e[3];return null==a&&(a=t?1:255),t&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(a=255&n(a,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(e,t){var r=(e=+e)>>>24,n=(16711680&e)>>>16,i=(65280&e)>>>8,o=255&e;return!1===t?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},81238:e=>{"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]}},47367:(e,t,r)=>{"use strict";var n=r(76772),i=r(2166);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=Math.min(Math.max(Math.floor(255*e[0]),0),255),r[1]=Math.min(Math.max(Math.floor(255*e[1]),0),255),r[2]=Math.min(Math.max(Math.floor(255*e[2]),0),255),r[3]=null==e[3]?255:Math.min(Math.max(Math.floor(255*e[3]),0),255)),r)}},87473:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},76772:(e,t,r)=>{"use strict";var n=r(87473);e.exports=function(e){var t;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var r=n(e);if(!r.space)return[];var i=[0,0,0],o="h"===r.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(r.values[0],i[0]),o[0]),t[1]=Math.min(Math.max(r.values[1],i[1]),o[1]),t[2]=Math.min(Math.max(r.values[2],i[2]),o[2]),"h"===r.space[0]&&(t=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return o=255*l,[o,o,o];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*o;return i}(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}},71739:e=>{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]}]}},36839:(e,t,r)=>{"use strict";var n=r(71739),i=r(66212);function o(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function a(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,c,u,d,f,h,p,m;e||(e={});h=(e.nshades||72)-1,f=e.format||"hex",(d=e.colormap)||(d="jet");if("string"===typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");u=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>h+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1];t=u.map((function(e){return Math.round(e.index*h)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m{e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},77420:(e,t,r)=>{"use strict";e.exports={parse:r(79531),stringify:r(62196)}},65054:(e,t,r)=>{"use strict";var n=r(40402);e.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==n.indexOf(e)}}},79531:(e,t,r)=>{"use strict";var n=r(37228),i=r(38732),o=r(41901),a=r(15659),s=r(96209),l=r(83794),c=r(93116),u=r(65054).isSize;e.exports=f;var d=f.cache={};function f(e){if("string"!==typeof e)throw new Error("Font argument must be a string.");if(d[e])return d[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(e))return d[e]={system:e};for(var t,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(e,/\s+/);t=f.shift();){if(-1!==i.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){r[e]=t})),d[e]=r;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===a.indexOf(t)){if(u(t)){var p=c(t,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=h(p[1]):"/"===f[0]&&(f.shift(),r.lineHeight=h(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),d[e]=r}throw new Error("Unknown or unsupported font token: "+t)}r.weight=t}else r.stretch=t;else r.variant=t;else r.style=t}throw new Error("Missing required font-size.")}function h(e){var t=parseFloat(e);return t.toString()===e?t:e}},62196:(e,t,r)=>{"use strict";var n=r(49147),i=r(65054).isSize,o=m(r(38732)),a=m(r(41901)),s=m(r(15659)),l=m(r(96209)),c=m(r(83794)),u={normal:1,"small-caps":1},d={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",h="serif";function p(e,t){if(e&&!t[e]&&!o[e])throw Error("Unknown keyword `"+e+"`");return e}function m(e){for(var t={},r=0;r{"use strict";var n,i=r(33138),o=r(48769),a=r(57251),s=r(27113),l=r(65843),c=r(74157),u=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,i=o(t)&&a(t.value);return delete(n=s(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&f.call(this,e)?i:(t.value=u.call(i,r.resolveContext?r.resolveContext(this):this),d(this,e,t),this[e])},n},e.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&a(t.resolveContext),c(e,(function(e,r){return n(r,e,t)}))}},15351:(e,t,r)=>{"use strict";var n=r(33138),i=r(10912),o=r(30402),a=r(65843),s=r(77009);(e.exports=function(e,t){var r,i,l,c,u;return arguments.length<2||"string"!==typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(r=s.call(e,"c"),i=s.call(e,"e"),l=s.call(e,"w")):(r=l=!0,i=!1),u={value:t,configurable:r,enumerable:i,writable:l},c?o(a(c),u):u}).gs=function(e,t,r){var l,c,u,d;return"string"!==typeof e?(u=r,r=t,t=e,e=null):u=arguments[3],n(t)?i(t)?n(r)?i(r)||(u=r,r=void 0):r=void 0:(u=t,t=r=void 0):t=void 0,n(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),d={get:t,set:r,configurable:l,enumerable:c},u?o(a(u),d):d}},74104:(e,t,r)=>{"use strict";function n(e,t){return et?1:e>=t?0:NaN}r.d(t,{j2:()=>n,Fp:()=>a,J6:()=>l,TS:()=>c,VV:()=>u,w6:()=>d,Sm:()=>f});var i=function(e){var t;return 1===e.length&&(t=e,e=function(e,r){return n(t(e),r)}),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}(n);i.right,i.left;var o=Array.prototype;o.slice,o.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function a(e,t){var r,n,i=e.length,o=-1;if(null==t){for(;++o=r)for(n=r;++on&&(n=r)}else for(;++o=r)for(n=r;++on&&(n=r);return n}function s(e){return null===e?NaN:+e}function l(e,t){var r,n=e.length,i=n,o=-1,a=0;if(null==t)for(;++o=0;)for(t=(n=e[i]).length;--t>=0;)r[--a]=n[t];return r}function u(e,t){var r,n,i=e.length,o=-1;if(null==t){for(;++o=r)for(n=r;++or&&(n=r)}else for(;++o=r)for(n=r;++or&&(n=r);return n}function d(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),o=new Array(i);++n{"use strict";r.d(t,{UI:()=>a,b1:()=>s});var n="$";function i(){}function o(e,t){var r=new i;if(e instanceof i)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,o=-1,a=e.length;if(null==t)for(;++o=n.length)return null!=e&&r.sort(e),null!=t?t(r):r;for(var c,u,d,f=-1,h=r.length,p=n[i++],m=a(),g=s();++fn.length)return e;var o,a=i[r-1];return null!=t&&r>=n.length?o=e.entries():(o=[],e.each((function(e,t){o.push({key:t,values:s(e,r)})}))),null!=a?o.sort((function(e,t){return a(e.key,t.key)})):o}return r={object:function(e){return o(e,0,l,c)},map:function(e){return o(e,0,u,d)},entries:function(e){return s(o(e,0,u,d),0)},key:function(e){return n.push(e),r},sortKeys:function(e){return i[n.length-1]=e,r},sortValues:function(t){return e=t,r},rollup:function(e){return t=e,r}}}function l(){return{}}function c(e,t,r){e[t]=r}function u(){return a()}function d(e,t,r){e.set(t,r)}function f(){}var h=a.prototype;function p(e,t){var r=new f;if(e instanceof f)e.each((function(e){r.add(e)}));else if(e){var n=-1,i=e.length;if(null==t)for(;++n{"use strict";function n(e,t){var r;function n(){var n,i,o=r.length,a=0,s=0;for(n=0;n=(o=(m+v)/2))?m=o:v=o,(u=r>=(a=(g+y)/2))?g=a:y=a,i=h,!(h=h[d=u<<1|c]))return i[d]=p,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&r===l)return p.next=h,i?i[d]=p:e._root=p,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=r>=(a=(g+y)/2))?g=a:y=a}while((d=u<<1|c)===(f=(l>=a)<<1|s>=o));return i[f]=h,i[d]=p,e}function s(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function l(e){return e[0]}function c(e){return e[1]}function u(e,t,r){var n=new d(null==t?l:t,null==r?c:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function d(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function f(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}r.r(t),r.d(t,{forceCenter:()=>n,forceCollide:()=>g,forceLink:()=>b,forceManyBody:()=>K,forceRadial:()=>$,forceSimulation:()=>X,forceX:()=>J,forceY:()=>Q});var h=u.prototype=d.prototype;function p(e){return e.x+e.vx}function m(e){return e.y+e.vy}function g(e){var t,r,n=1,a=1;function s(){for(var e,i,s,c,d,f,h,g=t.length,v=0;vc+p||id+p||as.index){var m=c-l.x-l.vx,g=d-l.y-l.vy,v=m*m+g*g;ve.r&&(e.r=e[t].r)}function c(){if(t){var n,i,o=t.length;for(r=new Array(o),n=0;nd&&(d=n),if&&(f=i));if(c>d||u>f)return this;for(this.cover(c,u).cover(d,f),r=0;re||e>=i||n>t||t>=o;)switch(s=(th||(o=c.y0)>p||(a=c.x1)=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=x*x+b*b;if(w=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=h,!(h=h[d=u<<1|c]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,f=d)}for(;h.data!==e;)if(n=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(r?r[f]=h:this._root=h),this):(this._root=i,this)},h.removeAll=function(e){for(var t=0,r=e.length;t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var r,n,i=new Array(r),o=0;o=0&&t._call.call(null,e),t=t._next;--E}()}finally{E=0,function(){var e,t,r=C,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:C=t);A=e,H(n)}(),L=0}}function V(){var e=D.now(),t=e-R;t>P&&(j-=t,R=e)}function H(e){E||(I&&(I=clearTimeout(I)),e-L>24?(e<1/0&&(I=setTimeout(U,e-D.now()-j)),O&&(O=clearInterval(O))):(O||(R=D.now(),O=setInterval(V,P)),E=1,z(U)))}function W(e){return e.x}function G(e){return e.y}B.prototype=Z.prototype={constructor:B,restart:function(e,t,r){if("function"!==typeof e)throw new TypeError("callback is not a function");r=(null==r?N():+r)+(null==t?0:+t),this._next||A===this||(A?A._next=this:C=this,A=this),this._call=e,this._time=r,H()},stop:function(){this._call&&(this._call=null,this._time=1/0,H())}};var q=10,Y=Math.PI*(3-Math.sqrt(5));function X(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=(0,v.UI)(),l=Z(u),c=M("tick","end");function u(){d(),c.call("tick",t),r1?(null==r?s.remove(e):s.set(e,h(r)),t):s.get(e)},find:function(t,r,n){var i,o,a,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(c.on(e,r),t):c.on(e)}}}function K(){var e,t,r,n,a=i(-30),s=1,l=1/0,c=.81;function d(n){var i,o=e.length,a=u(e,W,G).visitAfter(h);for(r=n,i=0;i=l)){(e.data!==t||e.next)&&(0===d&&(p+=(d=o())*d),0===f&&(p+=(f=o())*f),p{"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{WU:()=>f,FF:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(e){if(!(t=o.exec(e)))throw new Error("invalid format: "+e);var t;return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,t){var r=n(e,t);if(!r)return e+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.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};const c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,t){var r=n(e,t);if(!r)return e+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(e,Math.max(0,t+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var d,f,h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function m(e){var t,r,o=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),s=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",d=void 0===e.decimal?".":e.decimal+"",f=void 0===e.numerals?u:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=a(e)).fill,r=e.align,n=e.sign,u=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,w=e.trim,_=e.type;"n"===_?(x=!0,_="g"):c[_]||(void 0===b&&(b=12),w=!0,_="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var k="$"===u?s:"#"===u&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S="$"===u?l:/[%p]/.test(_)?m:"",T=c[_],M=/[defgprs%]/.test(_);function C(e){var a,s,l,c=k,u=S;if("c"===_)u=T(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:T(Math.abs(e),b),w&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),m&&0===+e&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===_?p[8+i/3]:"")+u+(m&&"("===n?")":""),M)for(a=-1,s=e.length;++a(l=e.charCodeAt(a))||l>57){u=(46===l?d+e.slice(a+1):e.slice(a))+u,e=e.slice(0,a);break}}x&&!h&&(e=o(e,1/0));var C=c.length+e.length+u.length,A=C>1)+c+e+u+A.slice(C);break;default:e=A+c+e+u}return f(e)}return b=void 0===b?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),C.toString=function(){return e+""},C}return{format:y,formatPrefix:function(e,t){var r,i=y(((e=a(e)).type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=p[8+o/3];return function(e){return i(s*e)+l}}}}d=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),f=d.format,d.formatPrefix},25715:(e,t,r)=>{"use strict";r.r(t),r.d(t,{geoAiry:()=>j,geoAiryRaw:()=>L,geoAitoff:()=>z,geoAitoffRaw:()=>D,geoArmadillo:()=>F,geoArmadilloRaw:()=>N,geoAugust:()=>Z,geoAugustRaw:()=>B,geoBaker:()=>W,geoBakerRaw:()=>H,geoBerghaus:()=>Y,geoBerghausRaw:()=>q,geoBertin1953:()=>re,geoBertin1953Raw:()=>te,geoBoggs:()=>ue,geoBoggsRaw:()=>ce,geoBonne:()=>me,geoBonneRaw:()=>pe,geoBottomley:()=>ve,geoBottomleyRaw:()=>ge,geoBromley:()=>xe,geoBromleyRaw:()=>ye,geoChamberlin:()=>Ae,geoChamberlinAfrica:()=>Ce,geoChamberlinRaw:()=>Te,geoCollignon:()=>Ie,geoCollignonRaw:()=>Ee,geoCraig:()=>Pe,geoCraigRaw:()=>Oe,geoCraster:()=>je,geoCrasterRaw:()=>Le,geoCylindricalEqualArea:()=>ze,geoCylindricalEqualAreaRaw:()=>De,geoCylindricalStereographic:()=>Fe,geoCylindricalStereographicRaw:()=>Ne,geoEckert1:()=>Ze,geoEckert1Raw:()=>Be,geoEckert2:()=>Ve,geoEckert2Raw:()=>Ue,geoEckert3:()=>We,geoEckert3Raw:()=>He,geoEckert4:()=>qe,geoEckert4Raw:()=>Ge,geoEckert5:()=>Xe,geoEckert5Raw:()=>Ye,geoEckert6:()=>$e,geoEckert6Raw:()=>Ke,geoEisenlohr:()=>et,geoEisenlohrRaw:()=>Qe,geoFahey:()=>nt,geoFaheyRaw:()=>rt,geoFoucaut:()=>ot,geoFoucautRaw:()=>it,geoFoucautSinusoidal:()=>st,geoFoucautSinusoidalRaw:()=>at,geoGilbert:()=>ft,geoGingery:()=>gt,geoGingeryRaw:()=>ht,geoGinzburg4:()=>xt,geoGinzburg4Raw:()=>yt,geoGinzburg5:()=>wt,geoGinzburg5Raw:()=>bt,geoGinzburg6:()=>kt,geoGinzburg6Raw:()=>_t,geoGinzburg8:()=>Tt,geoGinzburg8Raw:()=>St,geoGinzburg9:()=>Ct,geoGinzburg9Raw:()=>Mt,geoGringorten:()=>It,geoGringortenQuincuncial:()=>oi,geoGringortenRaw:()=>Et,geoGuyou:()=>Lt,geoGuyouRaw:()=>Rt,geoHammer:()=>J,geoHammerRaw:()=>K,geoHammerRetroazimuthal:()=>Nt,geoHammerRetroazimuthalRaw:()=>Dt,geoHealpix:()=>qt,geoHealpixRaw:()=>Vt,geoHill:()=>Xt,geoHillRaw:()=>Yt,geoHomolosine:()=>tr,geoHomolosineRaw:()=>er,geoHufnagel:()=>nr,geoHufnagelRaw:()=>rr,geoHyperelliptical:()=>sr,geoHyperellipticalRaw:()=>ar,geoInterrupt:()=>ur,geoInterruptedBoggs:()=>fr,geoInterruptedHomolosine:()=>pr,geoInterruptedMollweide:()=>gr,geoInterruptedMollweideHemispheres:()=>yr,geoInterruptedQuarticAuthalic:()=>dn,geoInterruptedSinuMollweide:()=>br,geoInterruptedSinusoidal:()=>_r,geoKavrayskiy7:()=>Sr,geoKavrayskiy7Raw:()=>kr,geoLagrange:()=>Mr,geoLagrangeRaw:()=>Tr,geoLarrivee:()=>Er,geoLarriveeRaw:()=>Ar,geoLaskowski:()=>Or,geoLaskowskiRaw:()=>Ir,geoLittrow:()=>Rr,geoLittrowRaw:()=>Pr,geoLoximuthal:()=>jr,geoLoximuthalRaw:()=>Lr,geoMiller:()=>zr,geoMillerRaw:()=>Dr,geoModifiedStereographic:()=>Xr,geoModifiedStereographicAlaska:()=>Hr,geoModifiedStereographicGs48:()=>Wr,geoModifiedStereographicGs50:()=>Gr,geoModifiedStereographicLee:()=>Yr,geoModifiedStereographicMiller:()=>qr,geoModifiedStereographicRaw:()=>Nr,geoMollweide:()=>ae,geoMollweideRaw:()=>oe,geoMtFlatPolarParabolic:()=>Qr,geoMtFlatPolarParabolicRaw:()=>Jr,geoMtFlatPolarQuartic:()=>tn,geoMtFlatPolarQuarticRaw:()=>en,geoMtFlatPolarSinusoidal:()=>nn,geoMtFlatPolarSinusoidalRaw:()=>rn,geoNaturalEarth:()=>on.Z,geoNaturalEarth2:()=>sn,geoNaturalEarth2Raw:()=>an,geoNaturalEarthRaw:()=>on.K,geoNellHammer:()=>cn,geoNellHammerRaw:()=>ln,geoNicolosi:()=>hn,geoNicolosiRaw:()=>fn,geoPatterson:()=>Sn,geoPattersonRaw:()=>kn,geoPeirceQuincuncial:()=>ai,geoPierceQuincuncial:()=>ai,geoPolyconic:()=>Mn,geoPolyconicRaw:()=>Tn,geoPolyhedral:()=>Rn,geoPolyhedralButterfly:()=>Bn,geoPolyhedralCollignon:()=>Vn,geoPolyhedralWaterman:()=>Hn,geoProject:()=>Xn,geoQuantize:()=>si,geoQuincuncial:()=>ii,geoRectangularPolyconic:()=>ci,geoRectangularPolyconicRaw:()=>li,geoRobinson:()=>fi,geoRobinsonRaw:()=>di,geoSatellite:()=>pi,geoSatelliteRaw:()=>hi,geoSinuMollweide:()=>Qt,geoSinuMollweideRaw:()=>Jt,geoSinusoidal:()=>he,geoSinusoidalRaw:()=>fe,geoStitch:()=>Ri,geoTimes:()=>ji,geoTimesRaw:()=>Li,geoTwoPointAzimuthal:()=>Fi,geoTwoPointAzimuthalRaw:()=>zi,geoTwoPointAzimuthalUsa:()=>Ni,geoTwoPointEquidistant:()=>Ui,geoTwoPointEquidistantRaw:()=>Bi,geoTwoPointEquidistantUsa:()=>Zi,geoVanDerGrinten:()=>Hi,geoVanDerGrinten2:()=>Gi,geoVanDerGrinten2Raw:()=>Wi,geoVanDerGrinten3:()=>Yi,geoVanDerGrinten3Raw:()=>qi,geoVanDerGrinten4:()=>Ki,geoVanDerGrinten4Raw:()=>Xi,geoVanDerGrintenRaw:()=>Vi,geoWagner:()=>Ji,geoWagner4:()=>no,geoWagner4Raw:()=>ro,geoWagner6:()=>oo,geoWagner6Raw:()=>io,geoWagner7:()=>Qi,geoWagnerRaw:()=>$i,geoWiechel:()=>so,geoWiechelRaw:()=>ao,geoWinkel3:()=>co,geoWinkel3Raw:()=>lo});var n=r(43792),i=Math.abs,o=Math.atan,a=Math.atan2,s=(Math.ceil,Math.cos),l=Math.exp,c=Math.floor,u=Math.log,d=Math.max,f=Math.min,h=Math.pow,p=Math.round,m=Math.sign||function(e){return e>0?1:e<0?-1:0},g=Math.sin,v=Math.tan,y=1e-6,x=1e-12,b=Math.PI,w=b/2,_=b/4,k=Math.SQRT1_2,S=O(2),T=O(b),M=2*b,C=180/b,A=b/180;function E(e){return e>1?w:e<-1?-w:Math.asin(e)}function I(e){return e>1?0:e<-1?b:Math.acos(e)}function O(e){return e>0?Math.sqrt(e):0}function P(e){return(l(e)-l(-e))/2}function R(e){return(l(e)+l(-e))/2}function L(e){var t=v(e/2),r=2*u(s(e/2))/(t*t);function n(e,t){var n=s(e),i=s(t),o=g(t),a=i*n,l=-((1-a?u((1+a)/2)/(1-a):-.5)+r/(1+a));return[l*i*g(e),l*o]}return n.invert=function(t,n){var o,l=O(t*t+n*n),c=-e/2,d=50;if(!l)return[0,0];do{var f=c/2,h=s(f),p=g(f),m=p/h,v=-u(i(h));c-=o=(2/m*v-r*m-l)/(-v/(p*p)+1-r/(2*h*h))*(h<0?.7:1)}while(i(o)>y&&--d>0);var x=g(c);return[a(t*x,l*s(c)),E(n*x/l)]},n}function j(){var e=w,t=(0,n.r)(L),r=t(e);return r.radius=function(r){return arguments.length?t(e=r*A):e*C},r.scale(179.976).clipAngle(147)}function D(e,t){var r=s(t),n=function(e){return e?e/Math.sin(e):1}(I(r*s(e/=2)));return[2*r*g(e)*n,g(t)*n]}function z(){return(0,n.Z)(D).scale(152.63)}function N(e){var t=g(e),r=s(e),n=e>=0?1:-1,o=v(n*e),l=(1+t-r)/2;function c(e,i){var c=s(i),u=s(e/=2);return[(1+c)*g(e),(n*i>-a(u,o)-.001?0:10*-n)+l+g(i)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,d=0,f=50;do{var h=s(u),p=g(u),m=s(d),v=g(d),x=1+m,b=x*p-e,w=l+v*r-x*t*h-c,_=x*h/2,k=-p*v,S=t*x*p/2,T=r*m+t*h*v,M=k*S-T*_,C=(w*k-b*T)/M/2,A=(b*S-w*_)/M;i(A)>2&&(A/=2),u-=C,d-=A}while((i(C)>y||i(A)>y)&&--f>0);return n*d>-a(s(u),o)-.001?[2*u,d]:null},c}function F(){var e=20*A,t=e>=0?1:-1,r=v(t*e),i=(0,n.r)(N),o=i(e),l=o.stream;return o.parallel=function(n){return arguments.length?(r=v((t=(e=n*A)>=0?1:-1)*e),i(e)):e*C},o.stream=function(n){var i=o.rotate(),c=l(n),u=(o.rotate([0,0]),l(n)),d=o.precision();return o.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var n=-180*t;t*n<180;n+=90*t)u.point(n,90*t);if(e)for(;t*(n-=3*t*d)>=-180;)u.point(n,t*-a(s(n*A/2),r)*C);u.lineEnd(),u.polygonEnd()},c},o.scale(218.695).center([0,28.0974])}function B(e,t){var r=v(t/2),n=O(1-r*r),i=1+n*s(e/=2),o=g(e)*n/i,a=r/i,l=o*o,c=a*a;return[4/3*o*(3+l-3*c),4/3*a*(3+3*l-c)]}function Z(){return(0,n.Z)(B).scale(66.1603)}D.invert=function(e,t){if(!(e*e+4*t*t>b*b+y)){var r=e,n=t,o=25;do{var a,l=g(r),c=g(r/2),u=s(r/2),d=g(n),f=s(n),h=g(2*n),p=d*d,m=f*f,v=c*c,x=1-m*u*u,w=x?I(f*u)*O(a=1/x):a=0,_=2*w*f*c-e,k=w*d-t,S=a*(m*v+w*f*u*p),T=a*(.5*l*h-2*w*d*c),M=.25*a*(h*c-w*d*m*l),C=a*(p*u+w*v*f),A=T*M-C*S;if(!A)break;var E=(k*T-_*C)/A,P=(_*M-k*S)/A;r-=E,n-=P}while((i(E)>y||i(P)>y)&&--o>0);return[r,n]}},B.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r=1+e*e+t*t,n=O((r-O(r*r-4*t*t))/2),o=E(n)/3,l=n?function(e){return u(e+O(e*e-1))}(i(t/n))/3:function(e){return u(e+O(e*e+1))}(i(e))/3,c=s(o),d=R(l),f=d*d-c*c;return[2*m(e)*a(P(l)*c,.25-f),2*m(t)*a(d*g(o),.25+f)]};var U=O(8),V=u(1+S);function H(e,t){var r=i(t);return r<_?[e,u(v(_+t/2))]:[e*s(r)*(2*S-1/g(r)),m(t)*(2*S*(r-_)-u(v(r/2)))]}function W(){return(0,n.Z)(H).scale(112.314)}H.invert=function(e,t){if((n=i(t))x&&--c>0);return[e/(s(a)*(U-1/g(a))),m(t)*a]};var G=r(10136);function q(e){var t=2*b/e;function r(e,r){var n=(0,G.N)(e,r);if(i(e)>w){var o=a(n[1],n[0]),l=O(n[0]*n[0]+n[1]*n[1]),c=t*p((o-w)/t)+w,u=a(g(o-=c),2-s(o));o=c+E(b/l*g(u))-u,n[0]=l*s(o),n[1]=l*g(o)}return n}return r.invert=function(e,r){var n=O(e*e+r*r);if(n>w){var i=a(r,e),l=t*p((i-w)/t)+w,c=i>l?-1:1,u=n*s(l-i),d=1/v(c*I((u-b)/O(b*(b-2*u)+n*n)));i=l+2*o((d+c*O(d*d-3))/3),e=n*s(i),r=n*g(i)}return G.N.invert(e,r)},r}function Y(){var e=5,t=(0,n.r)(q),r=t(e),i=r.stream,o=.01,l=-s(o*A),c=g(o*A);return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),u=i(t),d=(r.rotate([0,0]),i(t));return r.rotate(n),u.sphere=function(){d.polygonStart(),d.lineStart();for(var t=0,r=360/e,n=2*b/e,i=90-180/e,u=w;t0&&i(n)>y);return s<0?NaN:r}function ee(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=x),function(n,o,a,s){var l,c,u;a=void 0===a?0:+a,s=void 0===s?0:+s;for(var d=0;dl)a-=c/=2,s-=u/=2;else{l=m;var g=(a>0?-1:1)*r,v=(s>0?-1:1)*r,y=e(a+g,s),x=e(a,s+v),b=(y[0]-f[0])/g,w=(y[1]-f[1])/g,_=(x[0]-f[0])/v,k=(x[1]-f[1])/v,S=k*b-w*_,T=(i(S)<.5?.5:1)/S;if(a+=c=(p*_-h*k)*T,s+=u=(h*w-p*b)*T,i(c)0&&(i[1]*=1+o/1.5*i[0]*i[0]),i}return t.invert=ee(t),t}function re(){return(0,n.Z)(te()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ne(e,t){var r,n=e*g(t),o=30;do{t-=r=(t+g(t)-n)/(1+s(t))}while(i(r)>y&&--o>0);return t/2}function ie(e,t,r){function n(n,i){return[e*n*s(i=ne(r,i)),t*g(i)]}return n.invert=function(n,i){return i=E(i/t),[n/(e*s(i)),E((2*i+g(2*i))/r)]},n}$.invert=function(e,t){var r=2*E(t/2);return[e*s(r/2)/s(r),r]};var oe=ie(S/w,S,b);function ae(){return(0,n.Z)(oe).scale(169.529)}var se=2.00276,le=1.11072;function ce(e,t){var r=ne(b,t);return[se*e/(1/s(t)+le/s(r)),(t+S*g(r))/se]}function ue(){return(0,n.Z)(ce).scale(160.857)}function de(e){var t=0,r=(0,n.r)(e),i=r(t);return i.parallel=function(e){return arguments.length?r(t=e*A):t*C},i}function fe(e,t){return[e*s(t),t]}function he(){return(0,n.Z)(fe).scale(152.63)}function pe(e){if(!e)return fe;var t=1/v(e);function r(r,n){var i=t+e-n,o=i?r*s(n)/i:i;return[i*g(o),t-i*s(o)]}return r.invert=function(r,n){var i=O(r*r+(n=t-n)*n),o=t+e-i;return[i/s(o)*a(r,n),o]},r}function me(){return de(pe).scale(123.082).center([0,26.1441]).parallel(45)}function ge(e){function t(t,r){var n=w-r,i=n?t*e*g(n)/n:n;return[n*g(i)/e,w-n*s(i)]}return t.invert=function(t,r){var n=t*e,i=w-r,o=O(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/e,w-o]},t}function ve(){var e=.5,t=(0,n.r)(ge),r=t(e);return r.fraction=function(r){return arguments.length?t(e=+r):e},r.scale(158.837)}ce.invert=function(e,t){var r,n,o=se*t,a=t<0?-_:_,l=25;do{n=o-S*g(a),a-=r=(g(2*a)+2*a-b*g(n))/(2*s(2*a)+2+b*s(n)*S*s(a))}while(i(r)>y&&--l>0);return n=o-S*g(a),[e*(1/s(n)+le/s(a))/se,n]},fe.invert=function(e,t){return[e/s(t),t]};var ye=ie(1,4/b,b);function xe(){return(0,n.Z)(ye).scale(152.63)}var be=r(90903),we=r(83706);function _e(e,t,r,n,o,l){var c,u=s(l);if(i(e)>1||i(l)>1)c=I(r*o+t*n*u);else{var d=g(e/2),f=g(l/2);c=2*E(O(d*d+t*n*f*f))}return i(c)>y?[c,a(n*g(l),t*o-r*n*u)]:[0,0]}function ke(e,t,r){return I((e*e+t*t-r*r)/(2*e*t))}function Se(e){return e-2*b*c((e+b)/(2*b))}function Te(e,t,r){for(var n,i=[[e[0],e[1],g(e[1]),s(e[1])],[t[0],t[1],g(t[1]),s(t[1])],[r[0],r[1],g(r[1]),s(r[1])]],o=i[2],a=0;a<3;++a,o=n)n=i[a],o.v=_e(n[1]-o[1],o[3],o[2],n[3],n[2],n[0]-o[0]),o.point=[0,0];var l=ke(i[0].v[0],i[2].v[0],i[1].v[0]),c=ke(i[0].v[0],i[1].v[0],i[2].v[0]),u=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var d=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(e,t){var r,n=g(t),o=s(t),a=new Array(3);for(r=0;r<3;++r){var l=i[r];if(a[r]=_e(t-l[1],l[3],l[2],o,n,e-l[0]),!a[r][0])return l.point;a[r][1]=Se(a[r][1]-l.v[1])}var f=d.slice();for(r=0;r<3;++r){var h=2==r?0:r+1,p=ke(i[r].v[0],a[r][0],a[h][0]);a[r][1]<0&&(p=-p),r?1==r?(p=c-p,f[0]-=a[r][0]*s(p),f[1]-=a[r][0]*g(p)):(p=u-p,f[0]+=a[r][0]*s(p),f[1]+=a[r][0]*g(p)):(f[0]+=a[r][0]*s(p),f[1]-=a[r][0]*g(p))}return f[0]/=3,f[1]/=3,f}}function Me(e){return e[0]*=A,e[1]*=A,e}function Ce(){return Ae([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ae(e,t,r){var i=(0,be.Z)({type:"MultiPoint",coordinates:[e,t,r]}),o=[-i[0],-i[1]],a=(0,we.Z)(o),s=Te(Me(a(e)),Me(a(t)),Me(a(r)));s.invert=ee(s);var l=(0,n.Z)(s).rotate(o),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(a(e)):a.invert(c())},l.clipAngle(90)}function Ee(e,t){var r=O(1-g(t));return[2/T*e*r,T*(1-r)]}function Ie(){return(0,n.Z)(Ee).scale(95.6464).center([0,30])}function Oe(e){var t=v(e);function r(e,r){return[e,(e?e/g(e):1)*(g(r)*s(e)-t*s(r))]}return r.invert=t?function(e,r){e&&(r*=g(e)/e);var n=s(e);return[e,2*a(O(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,E(e?t*v(e)/e:t)]},r}function Pe(){return de(Oe).scale(249.828).clipAngle(90)}Ee.invert=function(e,t){var r=(r=t/T-1)*r;return[r>0?e*O(b/r)/2:0,E(1-r)]};var Re=O(3);function Le(e,t){return[Re*e*(2*s(2*t/3)-1)/T,Re*T*g(t/3)]}function je(){return(0,n.Z)(Le).scale(156.19)}function De(e){var t=s(e);function r(e,r){return[e*t,g(r)/t]}return r.invert=function(e,r){return[e/t,E(r*t)]},r}function ze(){return de(De).parallel(38.58).scale(195.044)}function Ne(e){var t=s(e);function r(e,r){return[e*t,(1+t)*v(r/2)]}return r.invert=function(e,r){return[e/t,2*o(r/(1+t))]},r}function Fe(){return de(Ne).scale(124.75)}function Be(e,t){var r=O(8/(3*b));return[r*e*(1-i(t)/b),r*t]}function Ze(){return(0,n.Z)(Be).scale(165.664)}function Ue(e,t){var r=O(4-3*g(i(t)));return[2/O(6*b)*e*r,m(t)*O(2*b/3)*(2-r)]}function Ve(){return(0,n.Z)(Ue).scale(165.664)}function He(e,t){var r=O(b*(4+b));return[2/r*e*(1+O(1-4*t*t/(b*b))),4/r*t]}function We(){return(0,n.Z)(He).scale(180.739)}function Ge(e,t){var r=(2+w)*g(t);t/=2;for(var n=0,o=1/0;n<10&&i(o)>y;n++){var a=s(t);t-=o=(t+g(t)*(a+2)-r)/(2*a*(1+a))}return[2/O(b*(4+b))*e*(1+s(t)),2*O(b/(4+b))*g(t)]}function qe(){return(0,n.Z)(Ge).scale(180.739)}function Ye(e,t){return[e*(1+s(t))/O(2+b),2*t/O(2+b)]}function Xe(){return(0,n.Z)(Ye).scale(173.044)}function Ke(e,t){for(var r=(1+w)*g(t),n=0,o=1/0;n<10&&i(o)>y;n++)t-=o=(t+g(t)-r)/(1+s(t));return r=O(2+b),[e*(1+s(t))/r,2*t/r]}function $e(){return(0,n.Z)(Ke).scale(173.044)}Le.invert=function(e,t){var r=3*E(t/(Re*T));return[T*e/(Re*(2*s(2*r/3)-1)),r]},Be.invert=function(e,t){var r=O(8/(3*b)),n=t/r;return[e/(r*(1-i(n)/b)),n]},Ue.invert=function(e,t){var r=2-i(t)/O(2*b/3);return[e*O(6*b)/(2*r),m(t)*E((4-r*r)/3)]},He.invert=function(e,t){var r=O(b*(4+b))/2;return[e*r/(1+O(1-t*t*(4+b)/(4*b))),t*r/2]},Ge.invert=function(e,t){var r=t*O((4+b)/b)/2,n=E(r),i=s(n);return[e/(2/O(b*(4+b))*(1+i)),E((n+r*(i+2))/(2+w))]},Ye.invert=function(e,t){var r=O(2+b),n=t*r/2;return[r*e/(1+s(n)),n]},Ke.invert=function(e,t){var r=1+w,n=O(r/2);return[2*e*n/(1+s(t*=n)),E((t+g(t))/r)]};var Je=3+2*S;function Qe(e,t){var r=g(e/=2),n=s(e),i=O(s(t)),a=s(t/=2),l=g(t)/(a+S*n*i),c=O(2/(1+l*l)),d=O((S*a+(n+r)*i)/(S*a+(n-r)*i));return[Je*(c*(d-1/d)-2*u(d)),Je*(c*l*(d+1/d)-2*o(l))]}function et(){return(0,n.Z)(Qe).scale(62.5271)}Qe.invert=function(e,t){if(!(r=B.invert(e/1.2,1.065*t)))return null;var r,n=r[0],a=r[1],l=20;e/=Je,t/=Je;do{var c=n/2,h=a/2,p=g(c),m=s(c),v=g(h),x=s(h),b=s(a),_=O(b),T=v/(x+S*m*_),M=T*T,C=O(2/(1+M)),A=(S*x+(m+p)*_)/(S*x+(m-p)*_),E=O(A),I=E-1/E,P=E+1/E,R=C*I-2*u(E)-e,L=C*T*P-2*o(T)-t,j=v&&k*_*p*M/v,D=(S*m*x+_)/(2*(x+S*m*_)*(x+S*m*_)*_),z=-.5*T*C*C*C,N=z*j,F=z*D,Z=(Z=2*x+S*_*(m-p))*Z*E,U=(S*m*x*_+b)/Z,V=-S*p*v/(_*Z),H=I*N-2*U/E+C*(U+U/A),W=I*F-2*V/E+C*(V+V/A),G=T*P*N-2*j/(1+M)+C*P*j+C*T*(U-U/A),q=T*P*F-2*D/(1+M)+C*P*D+C*T*(V-V/A),Y=W*G-q*H;if(!Y)break;var X=(L*W-R*q)/Y,K=(R*G-L*H)/Y;n-=X,a=d(-w,f(w,a-K))}while((i(X)>y||i(K)>y)&&--l>0);return i(i(a)-w)n){var f=O(d),h=a(u,c),m=r*p(h/r),v=h-m,x=e*s(v),_=(e*g(v)-v*g(x))/(w-x),k=pt(v,_),S=(b-e)/mt(k,x,b);c=f;var T,M=50;do{c-=T=(e+mt(k,x,c)*S-f)/(k(c)*S)}while(i(T)>y&&--M>0);u=v*g(c),cn){var c=O(l),u=a(o,t),d=r*p(u/r),f=u-d;t=c*s(f),o=c*g(f);for(var h=t-w,m=g(t),v=o/m,y=ty||i(h)>y)&&--v>0);return[p,m]},u}var yt=vt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xt(){return(0,n.Z)(yt).scale(149.995)}var bt=vt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function wt(){return(0,n.Z)(bt).scale(153.93)}var _t=vt(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return(0,n.Z)(_t).scale(130.945)}function St(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}function Tt(){return(0,n.Z)(St).scale(131.747)}St.invert=function(e,t){var r,n=e,o=t,a=50;do{var s=o*o;o-=r=(o*(1+s/12)-t)/(1+s/4)}while(i(r)>y&&--a>0);a=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>y&&--a>0);return[n,o]};var Mt=vt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ct(){return(0,n.Z)(Mt).scale(131.087)}function At(e){var t=e(w,0)[0]-e(-w,0)[0];function r(r,n){var i=r>0?-.5:.5,o=e(r+i*b,n);return o[0]-=i*t,o}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,o=e.invert(r+i*t,n),a=o[0]-i*b;return a<-b?a+=2*b:a>b&&(a-=2*b),o[0]=a,o}),r}function Et(e,t){var r=m(e),n=m(t),o=s(t),l=s(e)*o,c=g(e)*o,u=g(n*t);e=i(a(c,u)),t=E(l),i(e-w)>y&&(e%=w);var d=function(e,t){if(t===w)return[0,0];var r,n,o=g(t),a=o*o,l=a*a,c=1+l,u=1+3*l,d=1-l,f=E(1/O(c)),h=d+a*c*f,p=(1-o)/h,m=O(p),v=p*c,x=O(v),_=m*d;if(0===e)return[0,-(_+a*x)];var k,S=s(t),T=1/S,M=2*o*S,C=(-3*a+f*u)*M,A=(-h*S-(1-o)*C)/(h*h),I=a*c*A+p*u*M,P=-T*M,R=-T*I,L=-2*T*(d*(.5*A/m)-2*a*m*M),j=4*e/b;if(e>.222*b||t.175*b){if(r=(_+a*O(v*(1+l)-_*_))/(1+l),e>b/4)return[r,r];var D=r,z=.5*r;r=.5*(z+D),n=50;do{var N=r*(L+P*O(v-r*r))+R*E(r/x)-j;if(!N)break;N<0?z=r:D=r,r=.5*(z+D)}while(i(D-z)>y&&--n>0)}else{r=y,n=25;do{var F=r*r,B=O(v-F),Z=L+P*B,U=r*Z+R*E(r/x)-j;r-=k=B?U/(Z+(R-P*F)/B):0}while(i(k)>y&&--n>0)}return[r,-_-a*O(v-r*r)]}(e>b/4?w-e:e,t);return e>b/4&&(u=d[0],d[0]=-d[1],d[1]=-u),d[0]*=r,d[1]*=-n,d}function It(){return(0,n.Z)(At(Et)).scale(239.75)}function Ot(e,t){var r,n,a,c,u,d;if(t=1-y)return r=(1-t)/4,a=1/(n=R(e)),[(c=((d=l(2*(d=e)))-1)/(d+1))+r*((u=n*P(e))-e)/(n*n),a-r*c*a*(u-e),a+r*c*a*(u+e),2*o(l(e))-w+r*(u-e)/n];var f=[1,0,0,0,0,0,0,0,0],h=[O(t),0,0,0,0,0,0,0,0],p=0;for(n=O(1-t),u=1;i(h[p]/f[p])>y&&p<8;)r=f[p++],h[p]=(r-n)/2,f[p]=(r+n)/2,n=O(r*n),u*=2;a=u*f[p]*e;do{a=(E(c=h[p]*g(n=a)/f[p])+a)/2}while(--p);return[g(a),c=s(a),c/s(a-n),a]}function Pt(e,t){if(!t)return e;if(1===t)return u(v(e/2+_));for(var r=1,n=O(1-t),a=O(t),s=0;i(a)>y;s++){if(e%b){var l=o(n*v(e)/r);l<0&&(l+=b),e+=l+~~(e/b)*b}else e+=e;a=(r+n)/2,n=O(r*n),a=((r=a)-n)/2}return e/(h(2,s)*r)}function Rt(e,t){var r=(S-1)/(S+1),n=O(1-r*r),c=Pt(w,n*n),d=u(v(b/4+i(t)/2)),f=l(-1*d)/O(r),h=function(e,t){var r=e*e,n=t+1,i=1-r-t*t;return[.5*((e>=0?w:-w)-a(i,2*e)),-.25*u(i*i+4*r)+.5*u(n*n+r)]}(f*s(-1*e),f*g(-1*e)),p=function(e,t,r){var n=i(e),a=P(i(t));if(n){var s=1/g(n),l=1/(v(n)*v(n)),c=-(l+r*(a*a*s*s)-1+r),u=(-c+O(c*c-(r-1)*l*4))/2;return[Pt(o(1/O(u)),r)*m(e),Pt(o(O((u/l-1)/r)),1-r)*m(t)]}return[0,Pt(o(a),1-r)*m(t)]}(h[0],h[1],n*n);return[-p[1],(t>=0?1:-1)*(.5*c-p[0])]}function Lt(){return(0,n.Z)(At(Rt)).scale(151.496)}Et.invert=function(e,t){i(e)>1&&(e=2*m(e)-e),i(t)>1&&(t=2*m(t)-t);var r=m(e),n=m(t),o=-r*e,l=-n*t,c=l/o<1,u=function(e,t){var r=0,n=1,o=.5,a=50;for(;;){var l=o*o,c=O(o),u=E(1/O(1+l)),d=1-l+o*(1+l)*u,f=(1-c)/d,h=O(f),p=f*(1+l),m=h*(1-l),g=O(p-e*e),v=t+m+o*g;if(i(n-r)0?r=o:n=o,o=.5*(r+n)}if(!a)return null;var y=E(c),w=s(y),_=1/w,k=2*c*w,S=(-d*w-(-3*o+u*(1+3*l))*k*(1-c))/(d*d),T=.5*S/h,M=(1-l)*T-2*o*h*k;return[b/4*(e*(-2*_*M+-_*k*g)+-_*(o*(1+l)*S+f*(1+3*l)*k)*E(e/O(p))),y]}(c?l:o,c?o:l),d=u[0],f=u[1],h=s(f);return c&&(d=-w-d),[r*(a(g(d)*h,-g(f))+b),n*E(s(d)*h)]},Rt.invert=function(e,t){var r=(S-1)/(S+1),n=O(1-r*r),i=function(e,t,r){var n,i,o;return e?(n=Ot(e,r),t?(o=(i=Ot(t,1-r))[1]*i[1]+r*n[0]*n[0]*i[0]*i[0],[[n[0]*i[2]/o,n[1]*n[2]*i[0]*i[1]/o],[n[1]*i[1]/o,-n[0]*n[2]*i[0]*i[2]/o],[n[2]*i[1]*i[2]/o,-r*n[0]*n[1]*i[0]/o]]):[[n[0],0],[n[1],0],[n[2],0]]):[[0,(i=Ot(t,1-r))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Pt(w,n*n)-t,-e,n*n),s=function(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}(i[0],i[1]);return[a(s[1],s[0])/-1,2*o(l(-.5*u(r*s[0]*s[0]+r*s[1]*s[1])))-w]};var jt=r(12727);function Dt(e){var t=g(e),r=s(e),n=zt(e);function o(e,o){var a=n(e,o);e=a[0],o=a[1];var l=g(o),c=s(o),u=s(e),d=I(t*l+r*c*u),f=g(d),h=i(f)>y?d/f:1;return[h*r*g(e),(i(e)>w?h:-h)*(t*c-r*l*u)]}return n.invert=zt(-e),o.invert=function(e,r){var i=O(e*e+r*r),o=-g(i),l=s(i),c=i*l,u=-r*o,d=i*t,f=O(c*c+u*u-d*d),h=a(c*d+u*f,u*d-c*f),p=(i>w?-1:1)*a(e*o,i*s(h)*l+r*g(h)*o);return n.invert(p,h)},o}function zt(e){var t=g(e),r=s(e);return function(e,n){var i=s(n),o=s(e)*i,l=g(e)*i,c=g(n);return[a(l,o*r-c*t),E(c*r+o*t)]}}function Nt(){var e=0,t=(0,n.r)(Dt),r=t(e),i=r.rotate,o=r.stream,a=(0,jt.Z)();return r.parallel=function(n){if(!arguments.length)return e*C;var i=r.rotate();return t(e=n*A).rotate(i)},r.rotate=function(t){return arguments.length?(i.call(r,[t[0],t[1]-e*C]),a.center([-t[0],-t[1]]),r):((t=i.call(r))[1]+=e*C,t)},r.stream=function(e){return(e=o(e)).sphere=function(){e.polygonStart();var t,r=a.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},r.scale(79.4187).parallel(45).clipAngle(179.999)}var Ft=r(74104),Bt=r(93321),Zt=E(1-1/3)*C,Ut=De(0);function Vt(e){var t=Zt*A,r=Ee(b,t)[0]-Ee(-b,t)[0],n=Ut(0,t)[1],o=Ee(0,t)[1],a=T-o,s=M/e,l=4/M,u=n+a*a*4/M;function h(h,p){var m,g=i(p);if(g>t){var v=f(e-1,d(0,c((h+b)/s)));(m=Ee(h+=b*(e-1)/e-v*s,g))[0]=m[0]*M/r-M*(e-1)/(2*e)+v*M/e,m[1]=n+4*(m[1]-o)*a/M,p<0&&(m[1]=-m[1])}else m=Ut(h,p);return m[0]*=l,m[1]/=u,m}return h.invert=function(t,h){t/=l;var p=i(h*=u);if(p>n){var m=f(e-1,d(0,c((t+b)/s)));t=(t+b*(e-1)/e-m*s)*r/M;var g=Ee.invert(t,.25*(p-n)*M/a+o);return g[0]-=b*(e-1)/e-m*s,h<0&&(g[1]=-g[1]),g}return Ut.invert(t,h)},h}function Ht(e,t){return[e,1&t?90-y:Zt]}function Wt(e,t){return[e,1&t?-90+y:-Zt]}function Gt(e){return[e[0]*(1-y),e[1]]}function qt(){var e=4,t=(0,n.r)(Vt),r=t(e),i=r.stream;return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),o=i(t),a=(r.rotate([0,0]),i(t));return r.rotate(n),o.sphere=function(){(0,Bt.Z)(function(e){var t=[].concat((0,Ft.w6)(-180,180+e/2,e).map(Ht),(0,Ft.w6)(180,-180-e/2,-e).map(Wt));return{type:"Polygon",coordinates:[180===e?t.map(Gt):t]}}(180/e),a)},o},r.scale(239.75)}function Yt(e){var t,r=1+e,n=E(g(1/r)),o=2*O(b/(t=b+4*n*r)),l=.5*o*(r+O(e*(2+e))),c=e*e,u=r*r;function d(d,f){var h,p,m=1-g(f);if(m&&m<2){var v,y=w-f,_=25;do{var k=g(y),S=s(y),T=n+a(k,r-S),M=1+u-2*r*S;y-=v=(y-c*n-r*k+M*T-.5*m*t)/(2*r*k*T)}while(i(v)>x&&--_>0);h=o*O(M),p=d*T/b}else h=o*(e+m),p=d*n/b;return[h*g(p),l-h*s(p)]}return d.invert=function(e,i){var s=e*e+(i-=l)*i,d=(1+u-s/(o*o))/(2*r),f=I(d),h=g(f),p=n+a(h,r-d);return[E(e/O(s))*b/p,E(1-2*(f-c*n-r*h+(1+u-2*r*d)*p)/t)]},d}function Xt(){var e=1,t=(0,n.r)(Yt),r=t(e);return r.ratio=function(r){return arguments.length?t(e=+r):e},r.scale(167.774).center([0,18.67])}var Kt=.7109889596207567,$t=.0528035274542;function Jt(e,t){return t>-Kt?((e=oe(e,t))[1]+=$t,e):fe(e,t)}function Qt(){return(0,n.Z)(Jt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function er(e,t){return i(t)>Kt?((e=oe(e,t))[1]-=t>0?$t:-$t,e):fe(e,t)}function tr(){return(0,n.Z)(er).scale(152.63)}function rr(e,t,r,n){var i=O(4*b/(2*r+(1+e-t/2)*g(2*r)+(e+t)/2*g(4*r)+t/2*g(6*r))),o=O(n*g(r)*O((1+e*s(2*r)+t*s(4*r))/(1+e+t))),a=r*c(1);function l(r){return O(1+e*s(2*r)+t*s(4*r))}function c(n){var i=n*r;return(2*i+(1+e-t/2)*g(2*i)+(e+t)/2*g(4*i)+t/2*g(6*i))/r}function u(e){return l(e)*g(e)}var d=function(e,t){var n=r*Q(c,a*g(t)/r,t/b);isNaN(n)&&(n=r*m(t));var u=i*l(n);return[u*o*e/b*s(n),u/o*g(n)]};return d.invert=function(e,t){var n=Q(u,t*o/i);return[e*b/(s(n)*i*o*l(n)),E(r*c(n/r)/a)]},0===r&&(i=O(n/b),(d=function(e,t){return[e*i,g(t)/i]}).invert=function(e,t){return[e/i,E(t*i)]}),d}function nr(){var e=1,t=0,r=45*A,i=2,o=(0,n.r)(rr),a=o(e,t,r,i);return a.a=function(n){return arguments.length?o(e=+n,t,r,i):e},a.b=function(n){return arguments.length?o(e,t=+n,r,i):t},a.psiMax=function(n){return arguments.length?o(e,t,r=+n*A,i):r*C},a.ratio=function(n){return arguments.length?o(e,t,r,i=+n):i},a.scale(180.739)}function ir(e,t,r,n,i,o,a,s,l,c,u){if(u.nanEncountered)return NaN;var d,f,h,p,m,g,v,y,x,b;if(f=e(t+.25*(d=r-t)),h=e(r-.25*d),isNaN(f))u.nanEncountered=!0;else{if(!isNaN(h))return b=((g=(p=d*(n+4*f+i)/12)+(m=d*(i+4*h+o)/12))-a)/15,c>l?(u.maxDepthCount++,g+b):Math.abs(b)e?r=n:t=n,n=t+r>>1}while(n>t);var i=c[n+1]-c[n];return i&&(i=(e-c[n+1])/i),(n+1+i)/s}var f=2*d(1)/b*a/r,p=function(e,t){var r=d(i(g(t))),o=n(r)*e;return r/=f,[o,t>=0?r:-r]};return p.invert=function(e,t){var r;return i(t*=f)<1&&(r=m(t)*E(o(i(t))*a)),[e/n(i(t)),r]},p}function sr(){var e=0,t=2.5,r=1.183136,i=(0,n.r)(ar),o=i(e,t,r);return o.alpha=function(n){return arguments.length?i(e=+n,t,r):e},o.k=function(n){return arguments.length?i(e,t=+n,r):t},o.gamma=function(n){return arguments.length?i(e,t,r=+n):r},o.scale(152.63)}function lr(e,t){return i(e[0]-t[0])o[a][2][0];++a);var l=e(r-o[a][1][0],n);return l[0]+=e(o[a][1][0],i*n>i*o[a][0][1]?o[a][0][1]:n)[0],l}r?a.invert=r(a):e.invert&&(a.invert=function(r,n){for(var i=o[+(n<0)],s=t[+(n<0)],l=0,c=i.length;l=0;--s)r=(t=e[1][s])[0][0],n=t[0][1],i=t[1][1],o=t[2][0],a=t[2][1],l.push(cr([[o-y,a-y],[o-y,i+y],[r+y,i+y],[r+y,n-y]],30));return{type:"Polygon",coordinates:[(0,Ft.TS)(l)]}}(r),t=r.map((function(e){return e.map((function(e){return[[e[0][0]*A,e[0][1]*A],[e[1][0]*A,e[1][1]*A],[e[2][0]*A,e[2][1]*A]]}))})),o=t.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],a=e(t[1][0],t[1][1])[1];return o>a&&(r=o,o=a,a=r),[[n,o],[i,a]]}))})),s):t.map((function(e){return e.map((function(e){return[[e[0][0]*C,e[0][1]*C],[e[1][0]*C,e[1][1]*C],[e[2][0]*C,e[2][1]*C]]}))}))},null!=t&&s.lobes(t),s}Jt.invert=function(e,t){return t>-Kt?oe.invert(e,t-$t):fe.invert(e,t)},er.invert=function(e,t){return i(t)>Kt?oe.invert(e,t+(t>0?$t:-$t)):fe.invert(e,t)};var dr=[[[[-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]]]];function fr(){return ur(ce,dr).scale(160.857)}var hr=[[[[-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]]]];function pr(){return ur(er,hr).scale(152.63)}var mr=[[[[-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]]]];function gr(){return ur(oe,mr).scale(169.529)}var vr=[[[[-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 yr(){return ur(oe,vr).scale(169.529).rotate([20,0])}var xr=[[[[-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]]]];function br(){return ur(Jt,xr,ee).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var wr=[[[[-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 _r(){return ur(fe,wr).scale(152.63).rotate([-20,0])}function kr(e,t){return[3/M*e*O(b*b/3-t*t),t]}function Sr(){return(0,n.Z)(kr).scale(158.837)}function Tr(e){function t(t,r){if(i(i(r)-w)2)return null;var o=(t/=2)*t,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,E((l-1)/(l+1))]},t}function Mr(){var e=.5,t=(0,n.r)(Tr),r=t(e);return r.spacing=function(r){return arguments.length?t(e=+r):e},r.scale(124.75)}kr.invert=function(e,t){return[M/3*e/O(b*b/3-t*t),t]};var Cr=b/S;function Ar(e,t){return[e*(1+O(s(t)))/2,t/(s(t/2)*s(e/6))]}function Er(){return(0,n.Z)(Ar).scale(97.2672)}function Ir(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function Or(){return(0,n.Z)(Ir).scale(139.98)}function Pr(e,t){return[g(e)/s(t),v(t)*s(e)]}function Rr(){return(0,n.Z)(Pr).scale(144.049).clipAngle(89.999)}function Lr(e){var t=s(e),r=v(_+e/2);function n(n,o){var a=o-e,s=i(a)=0;)f=(d=e[u])[0]+l*(i=f)-c*h,h=d[1]+l*h+c*i;return[f=l*(i=f)-c*h,h=l*h+c*i]}return r.invert=function(r,n){var l=20,c=r,u=n;do{for(var d,f=t,h=e[f],p=h[0],m=h[1],v=0,x=0;--f>=0;)v=p+c*(d=v)-u*x,x=m+c*x+u*d,p=(h=e[f])[0]+c*(d=p)-u*m,m=h[1]+c*m+u*d;var b,w,_=(v=p+c*(d=v)-u*x)*v+(x=m+c*x+u*d)*x;c-=b=((p=c*(d=p)-u*m-r)*v+(m=c*m+u*d-n)*x)/_,u-=w=(m*v-p*x)/_}while(i(b)+i(w)>y*y&&--l>0);if(l){var k=O(c*c+u*u),S=2*o(.5*k),T=g(S);return[a(c*T,k*s(S)),k?E(u*T/k):0]}},r}Ar.invert=function(e,t){var r=i(e),n=i(t),o=y,a=w;ny||i(x)>y)&&--o>0);return o&&[r,n]},Pr.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,o=e?k*O((i-O(i*i-4*r))/r):1/O(n);return[E(e*o),m(t)*I(o)]},Dr.invert=function(e,t){return[e,2.5*o(l(.8*t))-.625*b]};var Fr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Br=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Zr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ur=[[.9245,0],[0,0],[.01943,0]],Vr=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hr(){return Xr(Fr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Wr(){return Xr(Br,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Gr(){return Xr(Zr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function qr(){return Xr(Ur,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Yr(){return Xr(Vr,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xr(e,t){var r=(0,n.Z)(Nr(e)).rotate(t).clipAngle(90),i=(0,we.Z)(t),o=r.center;return delete r.rotate,r.center=function(e){return arguments.length?o(i(e)):i.invert(o())},r}var Kr=O(6),$r=O(7);function Jr(e,t){var r=E(7*g(t)/(3*Kr));return[Kr*e*(2*s(2*r/3)-1)/$r,9*g(r/3)/$r]}function Qr(){return(0,n.Z)(Jr).scale(164.859)}function en(e,t){for(var r,n=(1+k)*g(t),o=t,a=0;a<25&&(o-=r=(g(o/2)+g(o)-n)/(.5*s(o/2)+s(o)),!(i(r)x&&--l>0);return[e/(.84719-.13063*(n=s*s)+(a=n*(o=n*n))*a*(.05494*n-.04515-.02326*o+.00331*a)),s]},ln.invert=function(e,t){for(var r=t/2,n=0,o=1/0;n<10&&i(o)>y;++n){var a=s(t/2);t-=o=(t-v(t/2)-r)/(1-.5/(a*a))}return[2*e/(1+s(t)),t]};var un=[[[[-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 dn(){return ur(K(1/0),un).rotate([20,0]).scale(152.63)}function fn(e,t){var r=g(t),n=s(t),o=m(e);if(0===e||i(t)===w)return[0,t];if(0===t)return[e,0];if(i(e)===w)return[e*n,w*r];var a=b/(2*e)-2*e/b,l=2*t/b,c=(1-l*l)/(r-l),u=a*a,d=c*c,f=1+u/d,h=1+d/u,p=(a*r/c-a/2)/f,v=(d*r/u+c/2)/h,y=v*v-(d*r*r/u+c*r-1)/h;return[w*(p+O(p*p+n*n/f)*o),w*(v+O(y<0?0:y)*m(-t*a)*o)]}function hn(){return(0,n.Z)(fn).scale(127.267)}fn.invert=function(e,t){var r=(e/=w)*e,n=r+(t/=w)*t,i=b*b;return[e?(n-1+O((1-n)*(1-n)+4*r))/(2*e)*w:0,Q((function(e){return n*(b*g(e)-2*e)*b+4*e*e*(t-g(e))+2*b*e-i*t}),0)]};var pn=1.0148,mn=.23185,gn=-.14499,vn=.02406,yn=pn,xn=5*mn,bn=7*gn,wn=9*vn,_n=1.790857183;function kn(e,t){var r=t*t;return[e,t*(pn+r*r*(mn+r*(gn+vn*r)))]}function Sn(){return(0,n.Z)(kn).scale(139.319)}function Tn(e,t){if(i(t)_n?t=_n:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var o=n*n;n-=r=(n*(pn+o*o*(mn+o*(gn+vn*o)))-t)/(yn+o*o*(xn+o*(bn+wn*o)))}while(i(r)>y);return[e,n]},Tn.invert=function(e,t){if(i(t)y&&--a>0);return l=v(o),[(i(t)=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(o)return[o,r];o=r}}}(t.face,r.face),i=En(n.map(r.project),n.map(t.project));t.transform=r.transform?In(r.transform,i):i;for(var o=r.edges,a=0,s=o.length;a0?[-t[0],0]:[180-t[0],180])};var t=Fn.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,r){var n=t[e];n&&(n.children||(n.children=[])).push(t[r])})),Rn(t[0],(function(e,r){return t[e<-b/2?r<0?6:4:e<0?r<0?2:0:en^h>n&&r<(f-c)*(n-u)/(h-u)+c&&(i=!i)}return i}(e[0],r))return e.push(t),!0}))||e.push([t])})),ei=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function ii(e){var t=e(w,0)[0]-e(-w,0)[0];function r(r,n){var o=i(r)0?r-b:r+b,n),s=(a[0]-a[1])*k,l=(a[0]+a[1])*k;if(o)return[s,l];var c=t*k,u=s>0^l>0?-1:1;return[u*s-m(l)*c,u*l-m(s)*c]}return e.invert&&(r.invert=function(r,n){var o=(r+n)*k,a=(n-r)*k,s=i(o)<.5*t&&i(a)<.5*t;if(!s){var l=t*k,c=o>0^a>0?-1:1,u=-c*r+(a>0?1:-1)*l,d=-c*n+(o>0?1:-1)*l;o=(-u-d)*k,a=(u-d)*k}var f=e.invert(o,a);return s||(f[0]+=o>0?b:-b),f}),(0,n.Z)(r).rotate([-90,-90,45]).clipAngle(179.999)}function oi(){return ii(Et).scale(176.423)}function ai(){return ii(Rt).scale(111.48)}function si(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function r(e){var r=e.length,n=2,i=new Array(r);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);n2||o[0]!=t[0]||o[1]!=t[1])&&(n.push(o),t=o)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function o(e){return e.map(i)}function a(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:n(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:o(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(o)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return a(e)}return e}function li(e){var t=g(e);function r(r,n){var i=t?v(r*t/2)/t:r/2;if(!n)return[2*i,-e];var a=2*o(i*g(n)),l=1/v(n);return[g(a)*l,n+(1-s(a))*l-e]}return r.invert=function(r,n){if(i(n+=e)y&&--u>0);var p=r*(d=v(c)),m=v(i(n)0?w:-w)*(d+a*(p-l)/2+a*a*(p-2*d+l)/2)]}function fi(){return(0,n.Z)(di).scale(152.63)}function hi(e,t){var r=function(e){function t(t,r){var n=s(r),i=(e-1)/(e-n*s(t));return[i*n*g(t),i*g(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=O(n),o=(e-O(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[a(t*o,i*O(1-o*o)),i?E(r*o/i):0]},t}(e);if(!t)return r;var n=s(t),i=g(t);function o(t,o){var a=r(t,o),s=a[1],l=s*i/(e-1)+n;return[a[0]*n/l,s/l]}return o.invert=function(t,o){var a=(e-1)/(e-1-o*i);return r.invert(a*t,a*o*n)},o}function pi(){var e=2,t=0,r=(0,n.r)(hi),i=r(e,t);return i.distance=function(n){return arguments.length?r(e=+n,t):e},i.tilt=function(n){return arguments.length?r(e,t=n*A):t*C},i.scale(432.147).clipAngle(I(1/e)*C-1e-6)}ui.forEach((function(e){e[1]*=1.0144})),di.invert=function(e,t){var r=t/w,n=90*r,o=f(18,i(n/5)),a=d(0,c(o));do{var s=ui[a][1],l=ui[a+1][1],u=ui[f(19,a+2)][1],h=u-s,p=u-2*l+s,m=2*(i(r)-l)/h,g=p/h,v=m*(1-g*m*(1-2*g*m));if(v>=0||1===a){n=(t>=0?5:-5)*(v+o);var y,b=50;do{v=(o=f(18,i(n)/5))-(a=c(o)),s=ui[a][1],l=ui[a+1][1],u=ui[f(19,a+2)][1],n-=(y=(t>=0?w:-w)*(l+v*(u-s)/2+v*v*(u-2*l+s)/2)-t)*C}while(i(y)>x&&--b>0);break}}while(--a>=0);var _=ui[a][0],k=ui[a+1][0],S=ui[f(19,a+2)][0];return[e/(k+v*(S-_)/2+v*v*(S-2*k+_)/2),n*A]};var mi=1e-4,gi=1e4,vi=-180,yi=vi+mi,xi=180,bi=xi-mi,wi=-90,_i=wi+mi,ki=90,Si=ki-mi;function Ti(e){return e.length>0}function Mi(e){return e===wi||e===ki?[0,e]:[vi,(t=e,Math.floor(t*gi)/gi)];var t}function Ci(e){var t=e[0],r=e[1],n=!1;return t<=yi?(t=vi,n=!0):t>=bi&&(t=xi,n=!0),r<=_i?(r=wi,n=!0):r>=Si&&(r=ki,n=!0),n?[t,r]:e}function Ai(e){return e.map(Ci)}function Ei(e,t,r){for(var n=0,i=e.length;n=bi||u<=_i||u>=Si){o[a]=Ci(l);for(var d=a+1;dyi&&h_i&&p=s)break;r.push({index:-1,polygon:t,ring:o=o.slice(d-1)}),o[0]=Mi(o[0][1]),a=-1,s=o.length}}}}function Ii(e){var t,r,n,i,o,a,s=e.length,l={},c={};for(t=0;t0?b-l:l)*C],u=(0,n.Z)(e(s)).rotate(c),d=(0,we.Z)(c),f=u.center;return delete u.rotate,u.center=function(e){return arguments.length?f(d(e)):d.invert(f())},u.clipAngle(90)}function zi(e){var t=s(e);function r(e,r){var n=(0,zn.M)(e,r);return n[0]*=t,n}return r.invert=function(e,r){return zn.M.invert(e/t,r)},r}function Ni(){return Fi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Fi(e,t){return Di(zi,e,t)}function Bi(e){if(!(e*=2))return G.N;var t=-e/2,r=-t,n=e*e,i=v(r),o=.5/g(r);function l(i,o){var a=I(s(o)*s(i-t)),l=I(s(o)*s(i-r));return[((a*=a)-(l*=l))/(2*e),(o<0?-1:1)*O(4*n*l-(n-a+l)*(n-a+l))/(2*e)]}return l.invert=function(e,n){var l,c,u=n*n,d=s(O(u+(l=e+t)*l)),f=s(O(u+(l=e+r)*l));return[a(c=d-f,l=(d+f)*i),(n<0?-1:1)*I(O(l*l+c*c)*o)]},l}function Zi(){return Ui([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Ui(e,t){return Di(Bi,e,t)}function Vi(e,t){if(i(t)y&&--l>0);return[m(e)*(O(o*o+4)+o)*b/4,w*s]};var eo=4*b+3*O(3),to=2*O(2*b*O(3)/eo),ro=ie(to*O(3)/b,to,eo/6);function no(){return(0,n.Z)(ro).scale(176.84)}function io(e,t){return[e*O(1-3*t*t/(b*b)),t]}function oo(){return(0,n.Z)(io).scale(152.63)}function ao(e,t){var r=s(t),n=s(e)*r,i=1-n,o=s(e=a(g(e)*r,-g(t))),l=g(e);return[l*(r=O(1-n*n))-o*i,-o*r-l*i]}function so(){return(0,n.Z)(ao).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function lo(e,t){var r=D(e,t);return[(r[0]+e/w)/2,(r[1]+t)/2]}function co(){return(0,n.Z)(lo).scale(158.837)}io.invert=function(e,t){return[e/O(1-3*t*t/(b*b)),t]},ao.invert=function(e,t){var r=(e*e+t*t)/-2,n=O(-r*(2+r)),i=t*r+e*n,o=e*r-t*n,s=O(o*o+i*i);return[a(n*i,s*(1+r)),s?-E(n*o/s):0]},lo.invert=function(e,t){var r=e,n=t,o=25;do{var a,l=s(n),c=g(n),u=g(2*n),d=c*c,f=l*l,h=g(r),p=s(r/2),m=g(r/2),v=m*m,x=1-f*p*p,b=x?I(l*p)*O(a=1/x):a=0,_=.5*(2*b*l*m+r/w)-e,k=.5*(b*c+n)-t,S=.5*a*(f*v+b*l*p*d)+.5/w,T=a*(h*u/4-b*c*m),M=.125*a*(u*m-b*c*f*h),C=.5*a*(d*p+b*v*l)+.5,A=T*M-C*S,E=(k*T-_*C)/A,P=(_*M-k*S)/A;r-=E,n-=P}while((i(E)>y||i(P)>y)&&--o>0);return[r,n]}},91272:(e,t,r)=>{"use strict";function n(){return new i}function i(){this.reset()}r.d(t,{Z:()=>n}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){a(o,e,this.t),a(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new i;function a(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}},74629:(e,t,r)=>{"use strict";r.d(t,{L9:()=>f,ZP:()=>x,gL:()=>p});var n,i,o,a,s,l=r(91272),c=r(23400),u=r(80473),d=r(93321),f=(0,l.Z)(),h=(0,l.Z)(),p={point:u.Z,lineStart:u.Z,lineEnd:u.Z,polygonStart:function(){f.reset(),p.lineStart=m,p.lineEnd=g},polygonEnd:function(){var e=+f;h.add(e<0?c.BZ+e:e),this.lineStart=this.lineEnd=this.point=u.Z},sphere:function(){h.add(c.BZ)}};function m(){p.point=v}function g(){y(n,i)}function v(e,t){p.point=y,n=e,i=t,e*=c.uR,t*=c.uR,o=e,a=(0,c.mC)(t=t/2+c.pu),s=(0,c.O$)(t)}function y(e,t){e*=c.uR,t=(t*=c.uR)/2+c.pu;var r=e-o,n=r>=0?1:-1,i=n*r,l=(0,c.mC)(t),u=(0,c.O$)(t),d=s*u,h=a*l+d*(0,c.mC)(i),p=d*n*(0,c.O$)(i);f.add((0,c.fv)(p,h)),o=e,a=l,s=u}function x(e){return h.reset(),(0,d.Z)(e,p),2*h}},32057:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n,i,o,a,s,l,c,u,d,f,h=r(91272),p=r(74629),m=r(68299),g=r(23400),v=r(93321),y=(0,h.Z)(),x={point:b,lineStart:_,lineEnd:k,polygonStart:function(){x.point=S,x.lineStart=T,x.lineEnd=M,y.reset(),p.gL.polygonStart()},polygonEnd:function(){p.gL.polygonEnd(),x.point=b,x.lineStart=_,x.lineEnd=k,p.L9<0?(n=-(o=180),i=-(a=90)):y>g.Ho?a=90:y<-g.Ho&&(i=-90),f[0]=n,f[1]=o},sphere:function(){n=-(o=180),i=-(a=90)}};function b(e,t){d.push(f=[n=e,o=e]),ta&&(a=t)}function w(e,t){var r=(0,m.Og)([e*g.uR,t*g.uR]);if(u){var l=(0,m.T5)(u,r),c=[l[1],-l[0],0],h=(0,m.T5)(c,l);(0,m.iJ)(h),h=(0,m.Y1)(h);var p,v=e-s,y=v>0?1:-1,x=h[0]*g.RW*y,b=(0,g.Wn)(v)>180;b^(y*sa&&(a=p):b^(y*s<(x=(x+360)%360-180)&&xa&&(a=t)),b?eC(n,o)&&(o=e):C(e,o)>C(n,o)&&(n=e):o>=n?(eo&&(o=e)):e>s?C(n,e)>C(n,o)&&(o=e):C(e,o)>C(n,o)&&(n=e)}else d.push(f=[n=e,o=e]);ta&&(a=t),u=r,s=e}function _(){x.point=w}function k(){f[0]=n,f[1]=o,x.point=b,u=null}function S(e,t){if(u){var r=e-s;y.add((0,g.Wn)(r)>180?r+(r>0?360:-360):r)}else l=e,c=t;p.gL.point(e,t),w(e,t)}function T(){p.gL.lineStart()}function M(){S(l,c),p.gL.lineEnd(),(0,g.Wn)(y)>g.Ho&&(n=-(o=180)),f[0]=n,f[1]=o,u=null}function C(e,t){return(t-=e)<0?t+360:t}function A(e,t){return e[0]-t[0]}function E(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tC(s[0],s[1])&&(s[1]=l[1]),C(l[0],s[1])>C(s[0],s[1])&&(s[0]=l[0])):c.push(s=l);for(u=-1/0,t=0,s=c[r=c.length-1];t<=r;s=l,++t)l=c[t],(h=C(s[1],l[0]))>u&&(u=h,n=l[0],o=s[1])}return d=f=null,n===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,i],[o,a]]}},68299:(e,t,r)=>{"use strict";r.d(t,{Og:()=>o,T:()=>c,T5:()=>s,Y1:()=>i,iJ:()=>u,j9:()=>a,s0:()=>l});var n=r(23400);function i(e){return[(0,n.fv)(e[1],e[0]),(0,n.ZR)(e[2])]}function o(e){var t=e[0],r=e[1],i=(0,n.mC)(r);return[i*(0,n.mC)(t),i*(0,n.O$)(t),(0,n.O$)(r)]}function a(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function c(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function u(e){var t=(0,n._b)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},90903:(e,t,r)=>{"use strict";r.d(t,{Z:()=>R});var n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x=r(23400),b=r(80473),w=r(93321),_={sphere:b.Z,point:k,lineStart:T,lineEnd:A,polygonStart:function(){_.lineStart=E,_.lineEnd=I},polygonEnd:function(){_.lineStart=T,_.lineEnd=A}};function k(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t);S(r*(0,x.mC)(e),r*(0,x.O$)(e),(0,x.O$)(t))}function S(e,t,r){++n,o+=(e-o)/n,a+=(t-a)/n,s+=(r-s)/n}function T(){_.point=M}function M(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t);g=r*(0,x.mC)(e),v=r*(0,x.O$)(e),y=(0,x.O$)(t),_.point=C,S(g,v,y)}function C(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t),n=r*(0,x.mC)(e),o=r*(0,x.O$)(e),a=(0,x.O$)(t),s=(0,x.fv)((0,x._b)((s=v*a-y*o)*s+(s=y*n-g*a)*s+(s=g*o-v*n)*s),g*n+v*o+y*a);i+=s,l+=s*(g+(g=n)),c+=s*(v+(v=o)),u+=s*(y+(y=a)),S(g,v,y)}function A(){_.point=k}function E(){_.point=O}function I(){P(p,m),_.point=k}function O(e,t){p=e,m=t,e*=x.uR,t*=x.uR,_.point=P;var r=(0,x.mC)(t);g=r*(0,x.mC)(e),v=r*(0,x.O$)(e),y=(0,x.O$)(t),S(g,v,y)}function P(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t),n=r*(0,x.mC)(e),o=r*(0,x.O$)(e),a=(0,x.O$)(t),s=v*a-y*o,p=y*n-g*a,m=g*o-v*n,b=(0,x._b)(s*s+p*p+m*m),w=(0,x.ZR)(b),_=b&&-w/b;d+=_*s,f+=_*p,h+=_*m,i+=w,l+=w*(g+(g=n)),c+=w*(v+(v=o)),u+=w*(y+(y=a)),S(g,v,y)}function R(e){n=i=o=a=s=l=c=u=d=f=h=0,(0,w.Z)(e,_);var t=d,r=f,p=h,m=t*t+r*r+p*p;return m{"use strict";r.d(t,{m:()=>s,Z:()=>c});var n=r(68299);function i(e){return function(){return e}}var o=r(23400),a=r(83706);function s(e,t,r,i,a,s){if(r){var c=(0,o.mC)(t),u=(0,o.O$)(t),d=i*r;null==a?(a=t+i*o.BZ,s=t-d/2):(a=l(c,a),s=l(c,s),(i>0?as)&&(a+=i*o.BZ));for(var f,h=a;i>0?h>s:h{"use strict";r.d(t,{Z:()=>o});var n=r(30741),i=r(23400);const o=(0,n.Z)((function(){return!0}),(function(e){var t,r=NaN,n=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,s){var l=a>0?i.pi:-i.pi,c=(0,i.Wn)(a-r);(0,i.Wn)(c-i.pi)0?i.ou:-i.ou),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(l,n),e.point(a,n),t=0):o!==l&&c>=i.pi&&((0,i.Wn)(r-o)i.Ho?(0,i.z4)(((0,i.O$)(t)*(a=(0,i.mC)(n))*(0,i.O$)(r)-(0,i.O$)(n)*(o=(0,i.mC)(t))*(0,i.O$)(e))/(o*a*s)):(t+n)/2}(r,n,a,s),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(l,n),t=0),e.point(r=a,n=s),o=l},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var o;if(null==e)o=r*i.ou,n.point(-i.pi,o),n.point(0,o),n.point(i.pi,o),n.point(i.pi,0),n.point(i.pi,-o),n.point(0,-o),n.point(-i.pi,-o),n.point(-i.pi,0),n.point(-i.pi,o);else if((0,i.Wn)(e[0]-t[0])>i.Ho){var a=e[0]{"use strict";r.d(t,{Z:()=>i});var n=r(80473);function i(){var e,t=[];return{point:function(t,r,n){e.push([t,r,n])},lineStart:function(){t.push(e=[])},lineEnd:n.Z,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}},27950:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(68299),i=r(12727),o=r(23400),a=r(23009),s=r(30741);function l(e){var t=(0,o.mC)(e),r=6*o.uR,l=t>0,c=(0,o.Wn)(t)>o.Ho;function u(e,r){return(0,o.mC)(e)*(0,o.mC)(r)>t}function d(e,r,i){var a=(0,n.Og)(e),s=(0,n.Og)(r),l=[1,0,0],c=(0,n.T5)(a,s),u=(0,n.j9)(c,c),d=c[0],f=u-d*d;if(!f)return!i&&e;var h=t*u/f,p=-t*d/f,m=(0,n.T5)(l,c),g=(0,n.T)(l,h),v=(0,n.T)(c,p);(0,n.s0)(g,v);var y=m,x=(0,n.j9)(g,y),b=(0,n.j9)(y,y),w=x*x-b*((0,n.j9)(g,g)-1);if(!(w<0)){var _=(0,o._b)(w),k=(0,n.T)(y,(-x-_)/b);if((0,n.s0)(k,g),k=(0,n.Y1)(k),!i)return k;var S,T=e[0],M=r[0],C=e[1],A=r[1];M0^k[1]<((0,o.Wn)(k[0]-T)o.pi^(T<=k[0]&&k[0]<=M)){var O=(0,n.T)(y,(-x+_)/b);return(0,n.s0)(O,g),[k,(0,n.Y1)(O)]}}}function f(t,r){var n=l?e:o.pi-e,i=0;return t<-n?i|=1:t>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}return(0,s.Z)(u,(function(e){var t,r,n,i,s;return{lineStart:function(){i=n=!1,s=1},point:function(h,p){var m,g=[h,p],v=u(h,p),y=l?v?0:f(h,p):v?f(h+(h<0?o.pi:-o.pi),p):0;if(!t&&(i=n=v)&&e.lineStart(),v!==n&&(!(m=d(t,g))||(0,a.Z)(t,m)||(0,a.Z)(g,m))&&(g[2]=1),v!==n)s=0,v?(e.lineStart(),m=d(g,t),e.point(m[0],m[1])):(m=d(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(c&&t&&l^v){var x;y&r||!(x=d(g,t,!0))||(s=0,l?(e.lineStart(),e.point(x[0][0],x[0][1]),e.point(x[1][0],x[1][1]),e.lineEnd()):(e.point(x[1][0],x[1][1]),e.lineEnd(),e.lineStart(),e.point(x[0][0],x[0][1],3)))}!v||t&&(0,a.Z)(t,g)||e.point(g[0],g[1]),t=g,n=v,r=y},lineEnd:function(){n&&e.lineEnd(),t=null},clean:function(){return s|(i&&n)<<1}}}),(function(t,n,o,a){(0,i.m)(a,e,r,o,t,n)}),l?[0,-e]:[-o.pi,e-o.pi])}},30741:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(59470),i=r(99222),o=r(23400),a=r(81855),s=r(74104);function l(e,t,r,o){return function(l){var d,f,h,p=t(l),m=(0,n.Z)(),g=t(m),v=!1,y={point:x,lineStart:w,lineEnd:_,polygonStart:function(){y.point=k,y.lineStart=S,y.lineEnd=T,f=[],d=[]},polygonEnd:function(){y.point=x,y.lineStart=w,y.lineEnd=_,f=(0,s.TS)(f);var e=(0,a.Z)(d,o);f.length?(v||(l.polygonStart(),v=!0),(0,i.Z)(f,u,e,r,l)):e&&(v||(l.polygonStart(),v=!0),l.lineStart(),r(null,null,1,l),l.lineEnd()),v&&(l.polygonEnd(),v=!1),f=d=null},sphere:function(){l.polygonStart(),l.lineStart(),r(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(t,r){e(t,r)&&l.point(t,r)}function b(e,t){p.point(e,t)}function w(){y.point=b,p.lineStart()}function _(){y.point=x,p.lineEnd()}function k(e,t){h.push([e,t]),g.point(e,t)}function S(){g.lineStart(),h=[]}function T(){k(h[0][0],h[0][1]),g.lineEnd();var e,t,r,n,i=g.clean(),o=m.result(),a=o.length;if(h.pop(),d.push(h),h=null,a)if(1&i){if((t=(r=o[0]).length-1)>0){for(v||(l.polygonStart(),v=!0),l.lineStart(),e=0;e1&&2&i&&o.push(o.pop().concat(o.shift())),f.push(o.filter(c))}return y}}function c(e){return e.length>1}function u(e,t){return((e=e.x)[0]<0?e[1]-o.ou-o.Ho:o.ou-e[1])-((t=t.x)[0]<0?t[1]-o.ou-o.Ho:o.ou-t[1])}},30511:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(23400),i=r(59470);var o=r(99222),a=r(74104),s=1e9,l=-s;function c(e,t,r,c){function u(n,i){return e<=n&&n<=r&&t<=i&&i<=c}function d(n,i,o,a){var s=0,l=0;if(null==n||(s=f(n,o))!==(l=f(i,o))||p(n,i)<0^o>0)do{a.point(0===s||3===s?e:r,s>1?c:t)}while((s=(s+o+4)%4)!==l);else a.point(i[0],i[1])}function f(i,o){return(0,n.Wn)(i[0]-e)0?0:3:(0,n.Wn)(i[0]-r)0?2:1:(0,n.Wn)(i[1]-t)0?1:0:o>0?3:2}function h(e,t){return p(e.x,t.x)}function p(e,t){var r=f(e,1),n=f(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(n){var f,p,m,g,v,y,x,b,w,_,k,S=n,T=(0,i.Z)(),M={point:C,lineStart:function(){M.point=A,p&&p.push(m=[]);_=!0,w=!1,x=b=NaN},lineEnd:function(){f&&(A(g,v),y&&w&&T.rejoin(),f.push(T.result()));M.point=C,w&&S.lineEnd()},polygonStart:function(){S=T,f=[],p=[],k=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,n=p.length;rc&&(d-i)*(c-o)>(f-o)*(e-i)&&++t:f<=c&&(d-i)*(c-o)<(f-o)*(e-i)&&--t;return t}(),r=k&&t,i=(f=(0,a.TS)(f)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),d(null,null,1,n),n.lineEnd()),i&&(0,o.Z)(f,h,t,d,n),n.polygonEnd());S=n,f=p=m=null}};function C(e,t){u(e,t)&&S.point(e,t)}function A(n,i){var o=u(n,i);if(p&&m.push([n,i]),_)g=n,v=i,y=o,_=!1,o&&(S.lineStart(),S.point(n,i));else if(o&&w)S.point(n,i);else{var a=[x=Math.max(l,Math.min(s,x)),b=Math.max(l,Math.min(s,b))],d=[n=Math.max(l,Math.min(s,n)),i=Math.max(l,Math.min(s,i))];!function(e,t,r,n,i,o){var a,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,f=t[1]-l;if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=i-s,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a0)){if(a/=f,f<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>c&&(c=a)}else if(f>0){if(a0&&(e[0]=s+c*d,e[1]=l+c*f),u<1&&(t[0]=s+u*d,t[1]=l+u*f),!0}}}}}(a,d,e,t,r,c)?o&&(S.lineStart(),S.point(n,i),k=!1):(w||(S.lineStart(),S.point(a[0],a[1])),S.point(d[0],d[1]),o||S.lineEnd(),k=!1)}x=n,b=i,w=o}return M}}},99222:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(23009),i=r(23400);function o(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function a(e,t,r,a,l){var c,u,d=[],f=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,r,a=e[0],s=e[t];if((0,n.Z)(a,s)){if(!a[2]&&!s[2]){for(l.lineStart(),c=0;c=0;--c)l.point((p=h[c])[0],p[1]);else a(g.x,g.p.x,-1,l);g=g.p}h=(g=g.o).z,v=!v}while(!g.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n{"use strict";function n(e,t){function r(r,n){return r=e(r,n),t(r[0],r[1])}return e.invert&&t.invert&&(r.invert=function(r,n){return(r=t.invert(r,n))&&e.invert(r[0],r[1])}),r}r.d(t,{Z:()=>n})},26182:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{Z:()=>n})},9497:(e,t,r)=>{"use strict";r.r(t),r.d(t,{geoAlbers:()=>We,geoAlbersUsa:()=>qe,geoArea:()=>n.ZP,geoAzimuthalEqualArea:()=>Ye.Z,geoAzimuthalEqualAreaRaw:()=>Ye.l,geoAzimuthalEquidistant:()=>Xe.Z,geoAzimuthalEquidistantRaw:()=>Xe.N,geoBounds:()=>i.Z,geoCentroid:()=>o.Z,geoCircle:()=>a.Z,geoClipAntimeridian:()=>s.Z,geoClipCircle:()=>l.Z,geoClipExtent:()=>u,geoClipRectangle:()=>c.Z,geoConicConformal:()=>rt,geoConicConformalRaw:()=>tt,geoConicEqualArea:()=>He,geoConicEqualAreaRaw:()=>Ve,geoConicEquidistant:()=>ot,geoConicEquidistantRaw:()=>it,geoContains:()=>D,geoDistance:()=>C,geoEqualEarth:()=>ft,geoEqualEarthRaw:()=>dt,geoEquirectangular:()=>nt.Z,geoEquirectangularRaw:()=>nt.k,geoGnomonic:()=>ht.Z,geoGnomonicRaw:()=>ht.M,geoGraticule:()=>B,geoGraticule10:()=>Z,geoIdentity:()=>mt,geoInterpolate:()=>G.Z,geoLength:()=>S,geoMercator:()=>Je,geoMercatorRaw:()=>$e,geoNaturalEarth1:()=>gt.Z,geoNaturalEarth1Raw:()=>gt.K,geoOrthographic:()=>vt.Z,geoOrthographicRaw:()=>vt.I,geoPath:()=>Be,geoProjection:()=>Ze.Z,geoProjectionMutator:()=>Ze.r,geoRotation:()=>Ke.Z,geoStereographic:()=>bt,geoStereographicRaw:()=>xt,geoStream:()=>y.Z,geoTransform:()=>pt.Z,geoTransverseMercator:()=>_t,geoTransverseMercatorRaw:()=>wt});var n=r(74629),i=r(32057),o=r(90903),a=r(12727),s=r(81592),l=r(27950),c=r(30511);function u(){var e,t,r,n=0,i=0,o=960,a=500;return r={stream:function(r){return e&&t===r?e:e=(0,c.Z)(n,i,o,a)(t=r)},extent:function(s){return arguments.length?(n=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],e=t=null,r):[[n,i],[o,a]]}}}var d,f,h,p=r(81855),m=r(91272),g=r(23400),v=r(80473),y=r(93321),x=(0,m.Z)(),b={sphere:v.Z,point:v.Z,lineStart:function(){b.point=_,b.lineEnd=w},lineEnd:v.Z,polygonStart:v.Z,polygonEnd:v.Z};function w(){b.point=b.lineEnd=v.Z}function _(e,t){e*=g.uR,t*=g.uR,d=e,f=(0,g.O$)(t),h=(0,g.mC)(t),b.point=k}function k(e,t){e*=g.uR,t*=g.uR;var r=(0,g.O$)(t),n=(0,g.mC)(t),i=(0,g.Wn)(e-d),o=(0,g.mC)(i),a=n*(0,g.O$)(i),s=h*r-f*n*o,l=f*r+h*n*o;x.add((0,g.fv)((0,g._b)(a*a+s*s),l)),d=e,f=r,h=n}function S(e){return x.reset(),(0,y.Z)(e,b),+x}var T=[null,null],M={type:"LineString",coordinates:T};function C(e,t){return T[0]=e,T[1]=t,S(M)}var A={Feature:function(e,t){return I(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=C(e[o],e[o-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))g.Ho})).map(l)).concat((0,z.w6)((0,g.mD)(o/h)*h,i,h).filter((function(e){return(0,g.Wn)(e%m)>g.Ho})).map(c))}return y.lines=function(){return x().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(n).concat(d(a).slice(1),u(r).reverse().slice(1),d(s).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.extentMajor(e).extentMinor(e):y.extentMinor()},y.extentMajor=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],a=+e[1][1],n>r&&(e=n,n=r,r=e),s>a&&(e=s,s=a,a=e),y.precision(v)):[[n,s],[r,a]]},y.extentMinor=function(r){return arguments.length?(t=+r[0][0],e=+r[1][0],o=+r[0][1],i=+r[1][1],t>e&&(r=t,t=e,e=r),o>i&&(r=o,o=i,i=r),y.precision(v)):[[t,o],[e,i]]},y.step=function(e){return arguments.length?y.stepMajor(e).stepMinor(e):y.stepMinor()},y.stepMajor=function(e){return arguments.length?(p=+e[0],m=+e[1],y):[p,m]},y.stepMinor=function(e){return arguments.length?(f=+e[0],h=+e[1],y):[f,h]},y.precision=function(f){return arguments.length?(v=+f,l=N(o,i,90),c=F(t,e,v),u=N(s,a,90),d=F(n,r,v),y):v},y.extentMajor([[-180,-90+g.Ho],[180,90-g.Ho]]).extentMinor([[-180,-80-g.Ho],[180,80+g.Ho]])}function Z(){return B()()}var U,V,H,W,G=r(42143),q=r(26182),Y=(0,m.Z)(),X=(0,m.Z)(),K={point:v.Z,lineStart:v.Z,lineEnd:v.Z,polygonStart:function(){K.lineStart=$,K.lineEnd=ee},polygonEnd:function(){K.lineStart=K.lineEnd=K.point=v.Z,Y.add((0,g.Wn)(X)),X.reset()},result:function(){var e=Y/2;return Y.reset(),e}};function $(){K.point=J}function J(e,t){K.point=Q,U=H=e,V=W=t}function Q(e,t){X.add(W*e-H*t),H=e,W=t}function ee(){Q(U,V)}const te=K;var re,ne,ie,oe,ae=r(54438),se=0,le=0,ce=0,ue=0,de=0,fe=0,he=0,pe=0,me=0,ge={point:ve,lineStart:ye,lineEnd:we,polygonStart:function(){ge.lineStart=_e,ge.lineEnd=ke},polygonEnd:function(){ge.point=ve,ge.lineStart=ye,ge.lineEnd=we},result:function(){var e=me?[he/me,pe/me]:fe?[ue/fe,de/fe]:ce?[se/ce,le/ce]:[NaN,NaN];return se=le=ce=ue=de=fe=he=pe=me=0,e}};function ve(e,t){se+=e,le+=t,++ce}function ye(){ge.point=xe}function xe(e,t){ge.point=be,ve(ie=e,oe=t)}function be(e,t){var r=e-ie,n=t-oe,i=(0,g._b)(r*r+n*n);ue+=i*(ie+e)/2,de+=i*(oe+t)/2,fe+=i,ve(ie=e,oe=t)}function we(){ge.point=ve}function _e(){ge.point=Se}function ke(){Te(re,ne)}function Se(e,t){ge.point=Te,ve(re=ie=e,ne=oe=t)}function Te(e,t){var r=e-ie,n=t-oe,i=(0,g._b)(r*r+n*n);ue+=i*(ie+e)/2,de+=i*(oe+t)/2,fe+=i,he+=(i=oe*e-ie*t)*(ie+e),pe+=i*(oe+t),me+=3*i,ve(ie=e,oe=t)}const Me=ge;function Ce(e){this._context=e}Ce.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,g.BZ)}},result:v.Z};var Ae,Ee,Ie,Oe,Pe,Re=(0,m.Z)(),Le={point:v.Z,lineStart:function(){Le.point=je},lineEnd:function(){Ae&&De(Ee,Ie),Le.point=v.Z},polygonStart:function(){Ae=!0},polygonEnd:function(){Ae=null},result:function(){var e=+Re;return Re.reset(),e}};function je(e,t){Le.point=De,Ee=Oe=e,Ie=Pe=t}function De(e,t){Oe-=e,Pe-=t,Re.add((0,g._b)(Oe*Oe+Pe*Pe)),Oe=e,Pe=t}const ze=Le;function Ne(){this._string=[]}function Fe(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Be(e,t){var r,n,i=4.5;function o(e){return e&&("function"===typeof i&&n.pointRadius(+i.apply(this,arguments)),(0,y.Z)(e,r(n))),n.result()}return o.area=function(e){return(0,y.Z)(e,r(te)),te.result()},o.measure=function(e){return(0,y.Z)(e,r(ze)),ze.result()},o.bounds=function(e){return(0,y.Z)(e,r(ae.Z)),ae.Z.result()},o.centroid=function(e){return(0,y.Z)(e,r(Me)),Me.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,q.Z):(e=t).stream,o):e},o.context=function(e){return arguments.length?(n=null==e?(t=null,new Ne):new Ce(t=e),"function"!==typeof i&&n.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(n.pointRadius(+e),+e),o):i},o.projection(e).context(t)}Ne.prototype={_radius:4.5,_circle:Fe(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,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(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Fe(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Ze=r(43792);function Ue(e){var t=0,r=g.pi/3,n=(0,Ze.r)(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*g.uR,r=e[1]*g.uR):[t*g.RW,r*g.RW]},i}function Ve(e,t){var r=(0,g.O$)(e),n=(r+(0,g.O$)(t))/2;if((0,g.Wn)(n)=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:a).invert(e)},u.stream=function(r){return e&&t===r?e:e=function(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i0?t<-g.ou+g.Ho&&(t=-g.ou+g.Ho):t>g.ou-g.Ho&&(t=g.ou-g.Ho);var r=i/(0,g.sQ)(et(t),n);return[r*(0,g.O$)(n*e),i-r*(0,g.mC)(n*e)]}return o.invert=function(e,t){var r=i-t,o=(0,g.Xx)(n)*(0,g._b)(e*e+r*r),a=(0,g.fv)(e,(0,g.Wn)(r))*(0,g.Xx)(r);return r*n<0&&(a-=g.pi*(0,g.Xx)(e)*(0,g.Xx)(r)),[a/n,2*(0,g.z4)((0,g.sQ)(i/o,1/n))-g.ou]},o}function rt(){return Ue(tt).scale(109.5).parallels([30,30])}$e.invert=function(e,t){return[e,2*(0,g.z4)((0,g.Qq)(t))-g.ou]};var nt=r(85592);function it(e,t){var r=(0,g.mC)(e),n=e===t?(0,g.O$)(e):(r-(0,g.mC)(t))/(t-e),i=r/n+e;if((0,g.Wn)(n)2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)}xt.invert=(0,yt.O)((function(e){return 2*(0,g.z4)(e)})),wt.invert=function(e,t){return[-t,2*(0,g.z4)((0,g.Qq)(e))-g.ou]}},42143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(23400);function i(e,t){var r=e[0]*n.uR,i=e[1]*n.uR,o=t[0]*n.uR,a=t[1]*n.uR,s=(0,n.mC)(i),l=(0,n.O$)(i),c=(0,n.mC)(a),u=(0,n.O$)(a),d=s*(0,n.mC)(r),f=s*(0,n.O$)(r),h=c*(0,n.mC)(o),p=c*(0,n.O$)(o),m=2*(0,n.ZR)((0,n._b)((0,n.Jy)(a-i)+s*c*(0,n.Jy)(o-r))),g=(0,n.O$)(m),v=m?function(e){var t=(0,n.O$)(e*=m)/g,r=(0,n.O$)(m-e)/g,i=r*d+t*h,o=r*f+t*p,a=r*l+t*u;return[(0,n.fv)(o,i)*n.RW,(0,n.fv)(a,(0,n._b)(i*i+o*o))*n.RW]}:function(){return[r*n.RW,i*n.RW]};return v.distance=m,v}},23400:(e,t,r)=>{"use strict";r.d(t,{BZ:()=>l,Ho:()=>n,Jy:()=>T,Kh:()=>k,O$:()=>x,OR:()=>_,Qq:()=>g,RW:()=>c,Wn:()=>d,Xx:()=>b,ZR:()=>S,_b:()=>w,aW:()=>i,cM:()=>v,fv:()=>h,mC:()=>p,mD:()=>m,ou:()=>a,pi:()=>o,pu:()=>s,sQ:()=>y,uR:()=>u,z4:()=>f});var n=1e-6,i=1e-12,o=Math.PI,a=o/2,s=o/4,l=2*o,c=180/o,u=o/180,d=Math.abs,f=Math.atan,h=Math.atan2,p=Math.cos,m=Math.ceil,g=Math.exp,v=(Math.floor,Math.log),y=Math.pow,x=Math.sin,b=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,_=Math.tan;function k(e){return e>1?0:e<-1?o:Math.acos(e)}function S(e){return e>1?a:e<-1?-a:Math.asin(e)}function T(e){return(e=x(e/2))*e}},80473:(e,t,r)=>{"use strict";function n(){}r.d(t,{Z:()=>n})},54438:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(80473),i=1/0,o=i,a=-i,s=a;const l={point:function(e,t){ea&&(a=e);ts&&(s=t)},lineStart:n.Z,lineEnd:n.Z,polygonStart:n.Z,polygonEnd:n.Z,result:function(){var e=[[i,o],[a,s]];return a=s=-(o=i=1/0),e}}},23009:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(23400);function i(e,t){return(0,n.Wn)(e[0]-t[0]){"use strict";r.d(t,{Z:()=>l});var n=r(91272),i=r(68299),o=r(23400),a=(0,n.Z)();function s(e){return(0,o.Wn)(e[0])<=o.pi?e[0]:(0,o.Xx)(e[0])*(((0,o.Wn)(e[0])+o.pi)%o.BZ-o.pi)}function l(e,t){var r=s(t),n=t[1],l=(0,o.O$)(n),c=[(0,o.O$)(r),-(0,o.mC)(r),0],u=0,d=0;a.reset(),1===l?n=o.ou+o.Ho:-1===l&&(n=-o.ou-o.Ho);for(var f=0,h=e.length;f=0?1:-1,E=A*C,I=E>o.pi,O=x*T;if(a.add((0,o.fv)(O*A*(0,o.O$)(E),b*M+O*(0,o.mC)(E))),u+=I?C+A*o.BZ:C,I^v>=r^k>=r){var P=(0,i.T5)((0,i.Og)(g),(0,i.Og)(_));(0,i.iJ)(P);var R=(0,i.T5)(c,P);(0,i.iJ)(R);var L=(I^C>=0?-1:1)*(0,o.ZR)(R[2]);(n>L||n===L&&(P[0]||P[1]))&&(d+=I^C>=0?1:-1)}}return(u<-o.Ho||u{"use strict";r.d(t,{O:()=>o,W:()=>i});var n=r(23400);function i(e){return function(t,r){var i=(0,n.mC)(t),o=(0,n.mC)(r),a=e(i*o);return[a*o*(0,n.O$)(t),a*(0,n.O$)(r)]}}function o(e){return function(t,r){var i=(0,n._b)(t*t+r*r),o=e(i),a=(0,n.O$)(o),s=(0,n.mC)(o);return[(0,n.fv)(t*a,i*s),(0,n.ZR)(i&&r*a/i)]}}},55825:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,l:()=>a});var n=r(23400),i=r(26554),o=r(43792),a=(0,i.W)((function(e){return(0,n._b)(2/(1+e))}));function s(){return(0,o.Z)(a).scale(124.75).clipAngle(179.999)}a.invert=(0,i.O)((function(e){return 2*(0,n.ZR)(e/2)}))},10136:(e,t,r)=>{"use strict";r.d(t,{N:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792),a=(0,i.W)((function(e){return(e=(0,n.Kh)(e))&&e/(0,n.O$)(e)}));function s(){return(0,o.Z)(a).scale(79.4188).clipAngle(179.999)}a.invert=(0,i.O)((function(e){return e}))},85592:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,k:()=>i});var n=r(43792);function i(e,t){return[e,t]}function o(){return(0,n.Z)(i).scale(152.63)}i.invert=i},90759:(e,t,r)=>{"use strict";r.d(t,{V6:()=>l,mF:()=>s,qg:()=>a,rf:()=>c});var n=r(93321),i=r(54438);function o(e,t,r){var o=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=o&&e.clipExtent(null),(0,n.Z)(r,e.stream(i.Z)),t(i.Z.result()),null!=o&&e.clipExtent(o),e}function a(e,t,r){return o(e,(function(r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),a=+t[0][0]+(n-o*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])}),r)}function s(e,t,r){return a(e,[[0,0],t],r)}function l(e,t,r){return o(e,(function(r){var n=+t,i=n/(r[1][0]-r[0][0]),o=(n-i*(r[1][0]+r[0][0]))/2,a=-i*r[0][1];e.scale(150*i).translate([o,a])}),r)}function c(e,t,r){return o(e,(function(r){var n=+t,i=n/(r[1][1]-r[0][1]),o=-i*r[0][0],a=(n-i*(r[1][1]+r[0][1]))/2;e.scale(150*i).translate([o,a])}),r)}},60597:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792);function a(e,t){var r=(0,n.mC)(t),i=(0,n.mC)(e)*r;return[r*(0,n.O$)(e)/i,(0,n.O$)(t)/i]}function s(){return(0,o.Z)(a).scale(144.049).clipAngle(60)}a.invert=(0,i.O)(n.z4)},43792:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x,r:()=>b});var n=r(81592),i=r(27950),o=r(30511),a=r(23446),s=r(26182),l=r(23400),c=r(83706),u=r(70372),d=r(90759),f=r(68299),h=16,p=(0,l.mC)(30*l.uR);function m(e,t){return+t?function(e,t){function r(n,i,o,a,s,c,u,d,f,h,m,g,v,y){var x=u-n,b=d-i,w=x*x+b*b;if(w>4*t&&v--){var _=a+h,k=s+m,S=c+g,T=(0,l._b)(_*_+k*k+S*S),M=(0,l.ZR)(S/=T),C=(0,l.Wn)((0,l.Wn)(S)-1)t||(0,l.Wn)((x*O+b*P)/w-.5)>.3||a*h+s*m+c*g2?e[2]%360*l.uR:0,U()):[E*l.RW,I*l.RW,O*l.RW]},B.angle=function(e){return arguments.length?(P=e%360*l.uR,U()):P*l.RW},B.reflectX=function(e){return arguments.length?(R=e?-1:1,U()):R<0},B.reflectY=function(e){return arguments.length?(L=e?-1:1,U()):L<0},B.precision=function(e){return arguments.length?(x=m(b,F=e*e),V()):(0,l._b)(F)},B.fitExtent=function(e,t){return(0,d.qg)(B,e,t)},B.fitSize=function(e,t){return(0,d.mF)(B,e,t)},B.fitWidth=function(e,t){return(0,d.V6)(B,e,t)},B.fitHeight=function(e,t){return(0,d.rf)(B,e,t)},function(){return t=e.apply(this,arguments),B.invert=t.invert&&Z,U()}}},47772:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,Z:()=>a});var n=r(43792),i=r(23400);function o(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function a(){return(0,n.Z)(o).scale(175.295)}o.invert=function(e,t){var r,n=t,o=25;do{var a=n*n,s=a*a;n-=r=(n*(1.007226+a*(.015085+s*(.028874*a-.044475-.005916*s)))-t)/(1.007226+a*(.045255+s*(.259866*a-.311325-.005916*11*s)))}while((0,i.Wn)(r)>i.Ho&&--o>0);return[e/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]}},72271:(e,t,r)=>{"use strict";r.d(t,{I:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792);function a(e,t){return[(0,n.mC)(t)*(0,n.O$)(e),(0,n.O$)(t)]}function s(){return(0,o.Z)(a).scale(249.5).clipAngle(90+n.Ho)}a.invert=(0,i.O)(n.ZR)},83706:(e,t,r)=>{"use strict";r.d(t,{I:()=>a,Z:()=>u});var n=r(23446),i=r(23400);function o(e,t){return[(0,i.Wn)(e)>i.pi?e+Math.round(-e/i.BZ)*i.BZ:e,t]}function a(e,t,r){return(e%=i.BZ)?t||r?(0,n.Z)(l(e),c(t,r)):l(e):t||r?c(t,r):o}function s(e){return function(t,r){return[(t+=e)>i.pi?t-i.BZ:t<-i.pi?t+i.BZ:t,r]}}function l(e){var t=s(e);return t.invert=s(-e),t}function c(e,t){var r=(0,i.mC)(e),n=(0,i.O$)(e),o=(0,i.mC)(t),a=(0,i.O$)(t);function s(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*r+l*n;return[(0,i.fv)(c*o-d*a,l*r-u*n),(0,i.ZR)(d*o+c*a)]}return s.invert=function(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*o-c*a;return[(0,i.fv)(c*o+u*a,l*r+d*n),(0,i.ZR)(d*r-l*n)]},s}function u(e){function t(t){return(t=e(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t}return e=a(e[0]*i.uR,e[1]*i.uR,e.length>2?e[2]*i.uR:0),t.invert=function(t){return(t=e.invert(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t},t}o.invert=o},93321:(e,t,r)=>{"use strict";function n(e,t){e&&o.hasOwnProperty(e.type)&&o[e.type](e,t)}r.d(t,{Z:()=>l});var i={Feature:function(e,t){n(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,o=r.length;++i{"use strict";function n(e){return{stream:i(e)}}function i(e){return function(t){var r=new o;for(var n in e)r[n]=e[n];return r.stream=t,r}}function o(){}r.d(t,{Z:()=>n,l:()=>i}),o.prototype={constructor:o,point:function(e,t){this.stream.point(e,t)},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()}}},23554:(e,t,r)=>{"use strict";function n(e,t){return e.parent===t.parent?1:2}function i(e,t){return e+t.x}function o(e,t){return Math.max(e,t.y)}function a(){var e=n,t=1,r=1,a=!1;function s(n){var s,l=0;n.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(i,0)/e.length}(r),t.y=function(e){return 1+e.reduce(o,0)}(r)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(n),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(n),d=c.x-e(c,u)/2,f=u.x+e(u,c)/2;return n.eachAfter(a?function(e){e.x=(e.x-n.x)*t,e.y=(n.y-e.y)*r}:function(e){e.x=(e.x-d)/(f-d)*t,e.y=(1-(n.y?e.y/n.y:1))*r})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(a=!1,t=+e[0],r=+e[1],s):a?null:[t,r]},s.nodeSize=function(e){return arguments.length?(a=!0,t=+e[0],r=+e[1],s):a?[t,r]:null},s}function s(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function l(e,t){var r,n,i,o,a,s=new f(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=c);r=u.pop();)if(l&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)u.push(n=r.children[o]=new f(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(d)}function c(e){return e.children}function u(e){e.data=e.data.data}function d(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function f(e){this.data=e,this.depth=this.height=0,this.parent=null}r.r(t),r.d(t,{cluster:()=>a,hierarchy:()=>l,pack:()=>P,packEnclose:()=>p,packSiblings:()=>C,partition:()=>N,stratify:()=>H,tree:()=>$,treemap:()=>re,treemapBinary:()=>ne,treemapDice:()=>z,treemapResquarify:()=>oe,treemapSlice:()=>J,treemapSliceDice:()=>ie,treemapSquarify:()=>te}),f.prototype=l.prototype={constructor:f,count:function(){return this.eachAfter(s)},each:function(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;e=r.pop(),t=n.pop();for(;e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return l(this).eachBefore(u)}};var h=Array.prototype.slice;function p(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(h.call(e))).length,o=[];n0&&r*r>n*n+i*i}function y(e,t){for(var r=0;r(a*=a)?(n=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-n*n)),r.x=e.x-n*s-o*l,r.y=e.y-n*l+o*s):(n=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-n*n)),r.x=t.x+n*s-o*l,r.y=t.y+n*l+o*s)):(r.x=t.x+r.r,r.y=t.y)}function k(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function S(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function T(e){this._=e,this.next=null,this.previous=null}function M(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;_(r,t,n=e[2]),t=new T(t),r=new T(r),n=new T(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;s0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=A(t),r):e},r.parentId=function(e){return arguments.length?(t=A(e),r):t},r}function W(e,t){return e.parent===t.parent?1:2}function G(e){var t=e.children;return t?t[0]:e.t}function q(e){var t=e.children;return t?t[t.length-1]:e.t}function Y(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function X(e,t,r){return e.a.parent===t.parent?e.a:r}function K(e,t){this._=e,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=t}function $(){var e=W,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,o,a=new K(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(o=n.length),i=o-1;i>=0;--i)s.push(r=t.children[i]=new K(n[i],i)),r.parent=t;return(a.parent=new K(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),n)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>d.depth&&(d=e)}));var f=c===u?1:e(c,u)/2,h=f-c.x,p=t/(u.x+f+h),m=r/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*m}))}return i}function o(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,u=a.m,d=s.m,f=l.m;s=q(s),o=G(o),s&&o;)l=G(l),(a=q(a)).a=t,(i=s.z+d-o.z-c+e(s._,o._))>0&&(Y(X(s,t,n),t,i),c+=i,u+=i),d+=s.m,c+=o.m,f+=l.m,u+=a.m;s&&!q(a)&&(a.t=s,a.m+=d-u),o&&!G(l)&&(l.t=o,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i}function J(e,t,r,n,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-r)/e.value;++sf&&(f=s),g=u*u*m,(h=Math.max(f/g,g/d))>p){u-=s;break}p=h}v.push(a={value:u,dice:l1?t:1)},r}(Q);function re(){var e=te,t=!1,r=1,n=1,i=[0],o=E,a=E,s=E,l=E,c=E;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(d),i=[0],t&&e.eachBefore(D),e}function d(t){var r=i[t.depth],n=t.x0+r,u=t.y0+r,d=t.x1-r,f=t.y1-r;d=r-1){var u=s[t];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=l)}var d=c[t],f=n/2+d,h=t+1,p=r-1;for(;h>>1;c[m]l-o){var y=(i*v+a*g)/n;e(t,h,g,i,o,y,l),e(h,r,v,y,o,a,l)}else{var x=(o*v+l*g)/n;e(t,h,g,i,o,a,x),e(h,r,v,i,x,a,l)}}(0,l,e.value,t,r,n,i)}function ie(e,t,r,n,i){(1&e.depth?J:z)(e,t,r,n,i)}const oe=function e(t){function r(e,r,n,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,s,l,c,u,d=-1,f=a.length,h=e.value;++d1?t:1)},r}(Q)},86978:(e,t,r)=>{"use strict";r.d(t,{h5:()=>y});var n=Math.PI,i=2*n,o=1e-6,a=i-o;function s(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new s}s.prototype=l.prototype={constructor:s,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,i,a){e=+e,t=+t,r=+r,i=+i,a=+a;var s=this._x1,l=this._y1,c=r-e,u=i-t,d=s-e,f=l-t,h=d*d+f*f;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>o)if(Math.abs(f*c-u*d)>o&&a){var p=r-s,m=i-l,g=c*c+u*u,v=p*p+m*m,y=Math.sqrt(g),x=Math.sqrt(h),b=a*Math.tan((n-Math.acos((g+h-v)/(2*y*x)))/2),w=b/x,_=b/y;Math.abs(w-1)>o&&(this._+="L"+(e+w*d)+","+(t+w*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>d*m)+","+(this._x1=e+_*c)+","+(this._y1=t+_*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,s,l,c){e=+e,t=+t,c=!!c;var u=(r=+r)*Math.cos(s),d=r*Math.sin(s),f=e+u,h=t+d,p=1^c,m=c?s-l:l-s;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>o||Math.abs(this._y1-h)>o)&&(this._+="L"+f+","+h),r&&(m<0&&(m=m%i+i),m>a?this._+="A"+r+","+r+",0,1,"+p+","+(e-u)+","+(t-d)+"A"+r+","+r+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):m>o&&(this._+="A"+r+","+r+",0,"+ +(m>=n)+","+p+","+(this._x1=e+r*Math.cos(l))+","+(this._y1=t+r*Math.sin(l))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};const c=l;var u=Array.prototype.slice;function d(e){return function(){return e}}function f(e){return e[0]}function h(e){return e[1]}function p(e){return e.source}function m(e){return e.target}function g(e){var t=p,r=m,n=f,i=h,o=null;function a(){var a,s=u.call(arguments),l=t.apply(this,s),d=r.apply(this,s);if(o||(o=a=c()),e(o,+n.apply(this,(s[0]=l,s)),+i.apply(this,s),+n.apply(this,(s[0]=d,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"===typeof e?e:d(+e),a):n},a.y=function(e){return arguments.length?(i="function"===typeof e?e:d(+e),a):i},a.context=function(e){return arguments.length?(o=null==e?null:e,a):o},a}function v(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function y(){return g(v)}},97390:(e,t,r)=>{"use strict";r.d(t,{i$:()=>p,Dq:()=>f,g0:()=>m});var n=r(68545),i=r(6863),o=r(21388),a=r(60302),s=r(34255),l=r(24124);function c(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function u(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function d(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function f(e){var t=e.dateTime,r=e.date,s=e.time,l=e.periods,f=e.days,h=e.shortDays,p=e.months,m=e.shortMonths,v=_(l),y=k(l),x=_(f),b=k(f),w=_(h),te=k(h),we=_(p),Re=k(p),Le=_(m),je=k(m),De={a:function(e){return h[e.getDay()]},A:function(e){return f[e.getDay()]},b:function(e){return m[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:H,e:H,f:X,g:ae,G:le,H:W,I:G,j:q,L:Y,m:K,M:$,p:function(e){return l[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Oe,s:Pe,S:J,u:Q,U:ee,V:re,w:ne,W:ie,x:null,X:null,y:oe,Y:se,Z:ce,"%":Ie},ze={a:function(e){return h[e.getUTCDay()]},A:function(e){return f[e.getUTCDay()]},b:function(e){return m[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:ue,e:ue,f:me,g:Me,G:Ae,H:de,I:fe,j:he,L:pe,m:ge,M:ve,p:function(e){return l[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Oe,s:Pe,S:ye,u:xe,U:be,V:_e,w:ke,W:Se,x:null,X:null,y:Te,Y:Ce,Z:Ee,"%":Ie},Ne={a:function(e,t,r){var n=w.exec(t.slice(r));return n?(e.w=te[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.m=je[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=we.exec(t.slice(r));return n?(e.m=Re[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Ze(e,t,r,n)},d:L,e:L,f:B,g:I,G:E,H:D,I:D,j:j,L:F,m:R,M:z,p:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.p=y[n[0].toLowerCase()],r+n[0].length):-1},q:P,Q:U,s:V,S:N,u:T,U:M,V:C,w:S,W:A,x:function(e,t,n){return Ze(e,r,t,n)},X:function(e,t,r){return Ze(e,s,t,r)},y:I,Y:E,Z:O,"%":Z};function Fe(e,t){return function(r){var n,i,o,a=[],s=-1,l=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in f||(f.w=1),"Z"in f?(l=(s=u(d(f.y,0,1))).getUTCDay(),s=l>4||0===l?n.l6.ceil(s):(0,n.l6)(s),s=i.Z.offset(s,7*(f.V-1)),f.y=s.getUTCFullYear(),f.m=s.getUTCMonth(),f.d=s.getUTCDate()+(f.w+6)%7):(l=(s=c(d(f.y,0,1))).getDay(),s=l>4||0===l?o.wA.ceil(s):(0,o.wA)(s),s=a.Z.offset(s,7*(f.V-1)),f.y=s.getFullYear(),f.m=s.getMonth(),f.d=s.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),l="Z"in f?u(d(f.y,0,1)).getUTCDay():c(d(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(l+5)%7:f.w+7*f.U-(l+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,u(f)):c(f)}}function Ze(e,t,r,n){for(var i,o,a=0,s=t.length,l=r.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=Ne[i in g?t.charAt(a++):i])||(n=o(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return De.x=Fe(r,De),De.X=Fe(s,De),De.c=Fe(t,De),ze.x=Fe(r,ze),ze.X=Fe(s,ze),ze.c=Fe(t,ze),{format:function(e){var t=Fe(e+="",De);return t.toString=function(){return e},t},parse:function(e){var t=Be(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Fe(e+="",ze);return t.toString=function(){return e},t},utcParse:function(e){var t=Be(e+="",!0);return t.toString=function(){return e},t}}}var h,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function O(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function P(e,t,r){var n=v.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function R(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function L(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function j(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function D(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function z(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function F(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function B(e,t,r){var n=v.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Z(e,t,r){var n=y.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function U(e,t,r){var n=v.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function V(e,t,r){var n=v.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function H(e,t){return b(e.getDate(),t,2)}function W(e,t){return b(e.getHours(),t,2)}function G(e,t){return b(e.getHours()%12||12,t,2)}function q(e,t){return b(1+a.Z.count((0,s.Z)(e),e),t,3)}function Y(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return Y(e,t)+"000"}function K(e,t){return b(e.getMonth()+1,t,2)}function $(e,t){return b(e.getMinutes(),t,2)}function J(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(o.OM.count((0,s.Z)(e)-1,e),t,2)}function te(e){var t=e.getDay();return t>=4||0===t?(0,o.bL)(e):o.bL.ceil(e)}function re(e,t){return e=te(e),b(o.bL.count((0,s.Z)(e),e)+(4===(0,s.Z)(e).getDay()),t,2)}function ne(e){return e.getDay()}function ie(e,t){return b(o.wA.count((0,s.Z)(e)-1,e),t,2)}function oe(e,t){return b(e.getFullYear()%100,t,2)}function ae(e,t){return b((e=te(e)).getFullYear()%100,t,2)}function se(e,t){return b(e.getFullYear()%1e4,t,4)}function le(e,t){var r=e.getDay();return b((e=r>=4||0===r?(0,o.bL)(e):o.bL.ceil(e)).getFullYear()%1e4,t,4)}function ce(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function ue(e,t){return b(e.getUTCDate(),t,2)}function de(e,t){return b(e.getUTCHours(),t,2)}function fe(e,t){return b(e.getUTCHours()%12||12,t,2)}function he(e,t){return b(1+i.Z.count((0,l.Z)(e),e),t,3)}function pe(e,t){return b(e.getUTCMilliseconds(),t,3)}function me(e,t){return pe(e,t)+"000"}function ge(e,t){return b(e.getUTCMonth()+1,t,2)}function ve(e,t){return b(e.getUTCMinutes(),t,2)}function ye(e,t){return b(e.getUTCSeconds(),t,2)}function xe(e){var t=e.getUTCDay();return 0===t?7:t}function be(e,t){return b(n.Ox.count((0,l.Z)(e)-1,e),t,2)}function we(e){var t=e.getUTCDay();return t>=4||0===t?(0,n.hB)(e):n.hB.ceil(e)}function _e(e,t){return e=we(e),b(n.hB.count((0,l.Z)(e),e)+(4===(0,l.Z)(e).getUTCDay()),t,2)}function ke(e){return e.getUTCDay()}function Se(e,t){return b(n.l6.count((0,l.Z)(e)-1,e),t,2)}function Te(e,t){return b(e.getUTCFullYear()%100,t,2)}function Me(e,t){return b((e=we(e)).getUTCFullYear()%100,t,2)}function Ce(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Ae(e,t){var r=e.getUTCDay();return b((e=r>=4||0===r?(0,n.hB)(e):n.hB.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ee(){return"+0000"}function Ie(){return"%"}function Oe(e){return+e}function Pe(e){return Math.floor(+e/1e3)}h=f({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"]}),p=h.format,h.parse,m=h.utcFormat,h.utcParse},60302:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a,a:()=>s});var n=r(60211),i=r(93607),o=(0,n.Z)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.UD}),(function(e){return e.getDate()-1}));const a=o;var s=o.range},93607:(e,t,r)=>{"use strict";r.d(t,{UD:()=>a,Y2:()=>o,Ym:()=>n,iM:()=>s,yB:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},37747:(e,t,r)=>{"use strict";r.r(t),r.d(t,{timeDay:()=>v.Z,timeDays:()=>v.a,timeFriday:()=>y.mC,timeFridays:()=>y.b$,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.Z,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>f,timeMinutes:()=>h,timeMonday:()=>y.wA,timeMondays:()=>y.bJ,timeMonth:()=>b,timeMonths:()=>w,timeSaturday:()=>y.EY,timeSaturdays:()=>y.Ff,timeSecond:()=>c,timeSeconds:()=>u,timeSunday:()=>y.OM,timeSundays:()=>y.vm,timeThursday:()=>y.bL,timeThursdays:()=>y.$t,timeTuesday:()=>y.sy,timeTuesdays:()=>y.aU,timeWednesday:()=>y.zg,timeWednesdays:()=>y.Ld,timeWeek:()=>y.OM,timeWeeks:()=>y.vm,timeYear:()=>_.Z,timeYears:()=>_.g,utcDay:()=>E.Z,utcDays:()=>E.y,utcFriday:()=>I.QQ,utcFridays:()=>I.fz,utcHour:()=>C,utcHours:()=>A,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>S,utcMinutes:()=>T,utcMonday:()=>I.l6,utcMondays:()=>I.$3,utcMonth:()=>P,utcMonths:()=>R,utcSaturday:()=>I.g4,utcSaturdays:()=>I.Q_,utcSecond:()=>c,utcSeconds:()=>u,utcSunday:()=>I.Ox,utcSundays:()=>I.SU,utcThursday:()=>I.hB,utcThursdays:()=>I.xj,utcTuesday:()=>I.J1,utcTuesdays:()=>I.DK,utcWednesday:()=>I.b3,utcWednesdays:()=>I.uy,utcWeek:()=>I.Ox,utcWeeks:()=>I.SU,utcYear:()=>L.Z,utcYears:()=>L.D});var n=r(60211),i=(0,n.Z)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,n.Z)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};const o=i;var a=i.range,s=r(93607),l=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*s.Ym)}),(function(e,t){return(t-e)/s.Ym}),(function(e){return e.getUTCSeconds()}));const c=l;var u=l.range,d=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getMinutes()}));const f=d;var h=d.range,p=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym-e.getMinutes()*s.yB)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getHours()}));const m=p;var g=p.range,v=r(60302),y=r(21388),x=(0,n.Z)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const b=x;var w=x.range,_=r(34255),k=(0,n.Z)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getUTCMinutes()}));const S=k;var T=k.range,M=(0,n.Z)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getUTCHours()}));const C=M;var A=M.range,E=r(6863),I=r(68545),O=(0,n.Z)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const P=O;var R=O.range,L=r(24124)},60211:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=new Date,i=new Date;function o(e,t,r,a){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},s.round=function(e){var t=s(e),r=s.ceil(e);return e-t0))return a;do{a.push(o=new Date(+r)),t(r,i),e(r)}while(o=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(s.count=function(t,o){return n.setTime(+t),i.setTime(+o),e(n),e(i),Math.floor(r(n,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}},6863:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a,y:()=>s});var n=r(60211),i=r(93607),o=(0,n.Z)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/i.UD}),(function(e){return e.getUTCDate()-1}));const a=o;var s=o.range},68545:(e,t,r)=>{"use strict";r.d(t,{$3:()=>p,DK:()=>m,J1:()=>l,Ox:()=>a,QQ:()=>d,Q_:()=>x,SU:()=>h,b3:()=>c,fz:()=>y,g4:()=>f,hB:()=>u,l6:()=>s,uy:()=>g,xj:()=>v});var n=r(60211),i=r(93607);function o(e){return(0,n.Z)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/i.iM}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),d=o(5),f=o(6),h=a.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=f.range},24124:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,Z:()=>o});var n=r(60211),i=(0,n.Z)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.Z)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};const o=i;var a=i.range},21388:(e,t,r)=>{"use strict";r.d(t,{$t:()=>v,EY:()=>f,Ff:()=>x,Ld:()=>g,OM:()=>a,aU:()=>m,b$:()=>y,bJ:()=>p,bL:()=>u,mC:()=>d,sy:()=>l,vm:()=>h,wA:()=>s,zg:()=>c});var n=r(60211),i=r(93607);function o(e){return(0,n.Z)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.iM}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),d=o(5),f=o(6),h=a.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=f.range},34255:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,g:()=>a});var n=r(60211),i=(0,n.Z)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.Z)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};const o=i;var a=i.range},5150:(e,t,r)=>{"use strict";var n=r(82926)(),i=r(28476),o=n&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(c){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=r(56103);e.exports=function(e,t,r){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new s("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===n&&d?d.enumerable:!n,value:r,writable:null===i&&d?d.writable:!i});else{if(!u&&(n||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},89959:(e,t,r)=>{"use strict";var n=r(66328),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(5150),l=r(82926)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!==typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(e,t,r,!0):s(e,t,r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s{"use strict";e.exports=function(){for(var e=0;e{"use strict";e.exports=n;var t=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(e,n){Array.isArray(e)&&(e=e.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"===typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),t.font=s+"px "+e;for(var c=0;cs*l){var h=(f-d)/s;a[u]=1e3*h}}return a}function i(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{var n=r(59403),i=r(98358),o={M:"moveTo",C:"bezierCurveTo"};e.exports=function(e,t){e.beginPath(),i(n(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[o[r]].apply(e,n)})),e.closePath()}},98358:e=>{var t=Math.PI,r=s(120);function n(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,i,o){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(e,n,i,s,l,c,u,d,f,h){if(h)k=h[0],S=h[1],w=h[2],_=h[3];else{var p=a(e,n,-l);e=p.x,n=p.y;var m=(e-(d=(p=a(d,f,-l)).x))/2,g=(n-(f=p.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var y=i*i,x=s*s,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var w=b*i*g/s+(e+d)/2,_=b*-s*m/i+(n+f)/2,k=Math.asin(((n-_)/s).toFixed(9)),S=Math.asin(((f-_)/s).toFixed(9));(k=eS&&(k-=2*t),!u&&S>k&&(S-=2*t)}if(Math.abs(S-k)>r){var T=S,M=d,C=f;S=k+r*(u&&S>k?1:-1);var A=o(d=w+i*Math.cos(S),f=_+s*Math.sin(S),i,s,l,0,u,M,C,[S,T,w,_])}var E=Math.tan((S-k)/4),I=4/3*i*E,O=4/3*s*E,P=[2*e-(e+I*Math.sin(k)),2*n-(n-O*Math.cos(k)),d+I*Math.sin(S),f-O*Math.cos(S),d,f];if(h)return P;A&&(P=P.concat(A));for(var R=0;R7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var x=h,b=p;"C"!=t&&"S"!=t||(x+=x-a,b+=b-l),v=["C",x,b,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(d=2*h-d,f=2*p-f):(d=h,f=p),v=i(h,p,d,f,v[1],v[2]);break;case"Q":d=v[1],f=v[2],v=i(h,p,v[1],v[2],v[3],v[4]);break;case"L":v=n(h,p,v[1],v[2]);break;case"H":v=n(h,p,v[1],p);break;case"V":v=n(h,p,h,v[1]);break;case"Z":v=n(h,p,c,u)}t=y,h=v[v.length-2],p=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=h,l=p),r.push(v)}return r}},2166:e=>{e.exports=function(e){switch(e){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}}},28638:e=>{"use strict";function t(e,r,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o0)return function(e,t){var r,n;for(r=new Array(e),n=0;n{"use strict";function t(e,t,n){n=n||2;var o,a,s,l,d,f,p,m=t&&t.length,g=m?t[0]*n:e.length,v=r(e,0,g,n,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(e,t,n,i){var o,a,s,l=[];for(o=0,a=t.length;o80*n){o=s=e[0],a=l=e[1];for(var x=n;xs&&(s=d),f>l&&(l=f);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,y,n,o,a,p,0),y}function r(e,t,r,n,i){var o,a;if(i===M(e,t,r,n)>0)for(o=t;o=t;o-=n)a=k(o,e[o],e[o+1],a);return a&&v(a,a.next)&&(S(a),a=a.next),a}function n(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function i(e,t,r,c,u,d,h){if(e){!h&&d&&function(e,t,r,n){var i=e;do{0===i.z&&(i.z=f(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(e,c,u,d);for(var p,m,g=e;e.prev!==e.next;)if(p=e.prev,m=e.next,d?a(e,c,u,d):o(e))t.push(p.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),S(e),e=m.next,g=m.next;else if((e=m)===g){h?1===h?i(e=s(n(e),t,r),t,r,c,u,d,2):2===h&&l(e,t,r,c,u,d):i(n(e),t,r,c,u,d,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(g(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=io?i>a?i:a:o>a?o:a,h=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=h&&p(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,r,n){var i=e.prev,o=e,a=e.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,d=o.y,h=a.y,m=sl?s>c?s:c:l>c?l:c,x=u>d?u>h?u:h:d>h?d:h,b=f(m,v,t,r,n),w=f(y,x,t,r,n),_=e.prevZ,k=e.nextZ;_&&_.z>=b&&k&&k.z<=w;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==i&&_!==a&&p(s,u,l,d,c,h,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,k.x>=m&&k.x<=y&&k.y>=v&&k.y<=x&&k!==i&&k!==a&&p(s,u,l,d,c,h,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;_&&_.z>=b;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==i&&_!==a&&p(s,u,l,d,c,h,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;k&&k.z<=w;){if(k.x>=m&&k.x<=y&&k.y>=v&&k.y<=x&&k!==i&&k!==a&&p(s,u,l,d,c,h,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(t.push(o.i/r|0),t.push(i.i/r|0),t.push(a.i/r|0),S(i),S(i.next),i=e=a),i=i.next}while(i!==e);return n(i)}function l(e,t,r,o,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),i(l,t,r,o,a,s,0),void i(u,t,r,o,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){var r=function(e,t){var r,n=t,i=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(or.x||n.x===r.x&&d(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var i=_(r,e);return n(i,i.next),n(r,r.next)}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function h(e){var t=e,r=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&y(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{r.y>o!==r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||v(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,r,n){var i=b(g(e,t,r)),o=b(g(e,t,n)),a=b(g(r,n,e)),s=b(g(r,n,t));return i!==o&&a!==s||(!(0!==i||!x(e,r,t))||(!(0!==o||!x(e,n,t))||(!(0!==a||!x(r,e,n))||!(0!==s||!x(r,t,n)))))}function x(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function w(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function _(e,t){var r=new T(e.i,e.x,e.y),n=new T(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(e,t,r,n){var i=new T(e,t,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 S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function T(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,r,n){for(var i=0,o=t,a=r-n;o0&&(n+=e[i-1].length,r.holes.push(n))}return r}},30544:(e,t,r)=>{var n=r(47978);e.exports=function(e,t){var r,i=[],o=[],a=[],s={},l=[];function c(e){a[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],a[t]&&c(t)}))}function u(e){var t,n,i=!1;for(o.push(e),a[e]=!0,t=0;t=t}))}(t);for(var r,i=n(e).components.filter((function(e){return e.length>1})),o=1/0,a=0;a{"use strict";var n=r(98583);e.exports=function(){return n(this).length=0,this}},21282:(e,t,r)=>{"use strict";e.exports=r(32542)()?Array.from:r(97057)},32542:e=>{"use strict";e.exports=function(){var e,t,r=Array.from;return"function"===typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},97057:(e,t,r)=>{"use strict";var n=r(79598).iterator,i=r(53315),o=r(11436),a=r(97350),s=r(72444),l=r(98583),c=r(52141),u=r(37800),d=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;e.exports=function(e){var t,r,m,g,v,y,x,b,w,_,k=arguments[1],S=arguments[2];if(e=Object(l(e)),c(k)&&s(k),this&&this!==Array&&o(this))t=this;else{if(!k){if(i(e))return 1!==(v=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(d(e)){for(g=new Array(v=e.length),r=0;r=55296&&y<=56319&&(_+=e[++r]),_=k?f.call(k,S,_,m):_,t?(h.value=_,p(g,m,h)):g[m]=_,++m;v=m}if(void 0===v)for(v=a(e.length),t&&(g=new t(v)),r=0;r{"use strict";var t=Object.prototype.toString,r=t.call(function(){return arguments}());e.exports=function(e){return t.call(e)===r}},11436:e=>{"use strict";var t=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"===typeof e&&r(t.call(e))}},52169:e=>{"use strict";e.exports=function(){}},85377:(e,t,r)=>{"use strict";e.exports=r(29408)()?Math.sign:r(30532)},29408:e=>{"use strict";e.exports=function(){var e=Math.sign;return"function"===typeof e&&(1===e(10)&&-1===e(-20))}},30532:e=>{"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},35580:(e,t,r)=>{"use strict";var n=r(85377),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},97350:(e,t,r)=>{"use strict";var n=r(35580),i=Math.max;e.exports=function(e){return i(0,n(e))}},43192:(e,t,r)=>{"use strict";var n=r(72444),i=r(98583),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,c){var u,d=arguments[2],f=arguments[3];return r=Object(i(r)),n(c),u=s(r),f&&u.sort("function"===typeof f?o.call(f,r):void 0),"function"!==typeof e&&(e=u[e]),a.call(e,u,(function(e,n){return l.call(r,e)?a.call(c,d,r[e],e,r,n):t}))}}},30402:(e,t,r)=>{"use strict";e.exports=r(65188)()?Object.assign:r(83612)},65188:e=>{"use strict";e.exports=function(){var e,t=Object.assign;return"function"===typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},83612:(e,t,r)=>{"use strict";var n=r(94785),i=r(98583),o=Math.max;e.exports=function(e,t){var r,a,s,l=o(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(i){r||(r=i)}},a=1;a{"use strict";var n=r(21282),i=r(30402),o=r(98583);e.exports=function(e){var t=Object(o(e)),r=arguments[1],a=Object(arguments[2]);if(t!==e&&!r)return t;var s={};return r?n(r,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):i(s,e),s}},72663:(e,t,r)=>{"use strict";var n,i=Object.create;r(74456)()||(n=r(76724)),e.exports=function(){var e,t,r;return n?1!==n.level?i:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){t[e]="__proto__"!==e?r:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(e,t),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(t,r){return i(null===t?e:t,r)}):i}()},7697:(e,t,r)=>{"use strict";e.exports=r(43192)("forEach")},87392:(e,t,r)=>{"use strict";var n=r(52141),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},52141:(e,t,r)=>{"use strict";var n=r(52169)();e.exports=function(e){return e!==n&&null!==e}},94785:(e,t,r)=>{"use strict";e.exports=r(67945)()?Object.keys:r(34740)},67945:e=>{"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},34740:(e,t,r)=>{"use strict";var n=r(52141),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},74157:(e,t,r)=>{"use strict";var n=r(72444),i=r(7697),o=Function.prototype.call;e.exports=function(e,t){var r={},a=arguments[2];return n(t),i(e,(function(e,n,i,s){r[n]=o.call(t,a,e,n,i,s)})),r}},65843:(e,t,r)=>{"use strict";var n=r(52141),i=Array.prototype.forEach,o=Object.create;e.exports=function(e){var t=o(null);return i.call(arguments,(function(e){n(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t}},26202:(e,t,r)=>{"use strict";e.exports=r(74456)()?Object.setPrototypeOf:r(76724)},74456:e=>{"use strict";var t=Object.create,r=Object.getPrototypeOf,n={};e.exports=function(){var e=Object.setPrototypeOf;return"function"===typeof e&&r(e((arguments[0]||t)(null),n))===n}},76724:(e,t,r)=>{"use strict";var n,i=r(87392),o=r(98583),a=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(e,t){if(o(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,r;return e?(2===e.level?e.set?(r=e.set,t=function(e,t){return r.call(n(e,t),t),e}):t=function(e,t){return n(e,t).__proto__=t,e}:t=function e(t,r){var i;return n(t,r),(i=a.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===r&&(r=e.nullPolyfill),t.__proto__=r,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(e=n.set).call(t,r)}catch(i){}if(Object.getPrototypeOf(t)===r)return{set:e,level:2}}return t.__proto__=r,Object.getPrototypeOf(t)===r?{level:2}:((t={}).__proto__=r,Object.getPrototypeOf(t)===r&&{level:1})}()),r(72663)},72444:e=>{"use strict";e.exports=function(e){if("function"!==typeof e)throw new TypeError(e+" is not a function");return e}},42419:(e,t,r)=>{"use strict";var n=r(87392);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},98583:(e,t,r)=>{"use strict";var n=r(52141);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},77009:(e,t,r)=>{"use strict";e.exports=r(45663)()?String.prototype.contains:r(26515)},45663:e=>{"use strict";var t="razdwatrzy";e.exports=function(){return"function"===typeof t.contains&&(!0===t.contains("dwa")&&!1===t.contains("foo"))}},26515:e=>{"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},37800:e=>{"use strict";var t=Object.prototype.toString,r=t.call("");e.exports=function(e){return"string"===typeof e||e&&"object"===typeof e&&(e instanceof String||t.call(e)===r)||!1}},88959:e=>{"use strict";var t=Object.create(null),r=Math.random;e.exports=function(){var e;do{e=r().toString(36).slice(2)}while(t[e]);return e}},5655:(e,t,r)=>{"use strict";var n,i=r(26202),o=r(77009),a=r(15351),s=r(79598),l=r(27758),c=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",c(this,"__kind__",a("",t))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},30077:(e,t,r)=>{"use strict";var n=r(53315),i=r(72444),o=r(37800),a=r(17869),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(e,t){var r,u,d,f,h,p,m,g,v=arguments[2];if(s(e)||n(e)?r="array":o(e)?r="string":e=a(e),i(t),d=function(){f=!0},"array"!==r)if("string"!==r)for(u=e.next();!u.done;){if(l.call(t,v,u.value,d),f)return;u=e.next()}else for(p=e.length,h=0;h=55296&&g<=56319&&(m+=e[++h]),l.call(t,v,m,d),!f);++h);else c.call(e,(function(e){return l.call(t,v,e,d),f}))}},17869:(e,t,r)=>{"use strict";var n=r(53315),i=r(37800),o=r(5655),a=r(99576),s=r(33159),l=r(79598).iterator;e.exports=function(e){return"function"===typeof s(e)[l]?e[l]():n(e)?new o(e):i(e)?new a(e):new o(e)}},27758:(e,t,r)=>{"use strict";var n,i=r(99512),o=r(30402),a=r(72444),s=r(98583),l=r(15351),c=r(14578),u=r(79598),d=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,f(n.prototype,o({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,u.iterator,l((function(){return this})))},75613:(e,t,r)=>{"use strict";var n=r(53315),i=r(52141),o=r(37800),a=r(79598).iterator,s=Array.isArray;e.exports=function(e){return!!i(e)&&(!!s(e)||(!!o(e)||(!!n(e)||"function"===typeof e[a])))}},99576:(e,t,r)=>{"use strict";var n,i=r(26202),o=r(15351),a=r(79598),s=r(27758),l=Object.defineProperty;n=e.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",o("",e.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},33159:(e,t,r)=>{"use strict";var n=r(75613);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},79598:(e,t,r)=>{"use strict";e.exports=r(55215)()?r(56935).Symbol:r(55879)},55215:(e,t,r)=>{"use strict";var n=r(56935),i={object:!0,symbol:!0};e.exports=function(){var e,t=n.Symbol;if("function"!==typeof t)return!1;e=t("test symbol");try{String(e)}catch(r){return!1}return!!i[typeof t.iterator]&&(!!i[typeof t.toPrimitive]&&!!i[typeof t.toStringTag])}},97602:e=>{"use strict";e.exports=function(e){return!!e&&("symbol"===typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},83126:(e,t,r)=>{"use strict";var n=r(15351),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);e.exports=function(e){for(var t,r,i=0;s[e+(i||"")];)++i;return s[e+=i||""]=!0,o(a,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},11779:(e,t,r)=>{"use strict";var n=r(15351),i=r(56935).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},33939:(e,t,r)=>{"use strict";var n=r(15351),i=r(14003),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},55879:(e,t,r)=>{"use strict";var n,i,o,a=r(15351),s=r(14003),l=r(56935).Symbol,c=r(83126),u=r(11779),d=r(33939),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"===typeof l)try{String(l()),o=!0}catch(m){}else l=null;i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(e)},e.exports=n=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?l(t):(r=f(i.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},u(n),d(n),h(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),h(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var e=s(this);return"symbol"===typeof e?e:e.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},14003:(e,t,r)=>{"use strict";var n=r(97602);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},12492:(e,t,r)=>{"use strict";e.exports=r(36943)()?WeakMap:r(32233)},36943:e=>{"use strict";e.exports=function(){var e,t;if("function"!==typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return"[object WeakMap]"===String(e)&&("function"===typeof e.set&&(e.set({},1)===e&&("function"===typeof e.delete&&("function"===typeof e.has&&"one"===e.get(t)))))}},54817:e=>{"use strict";e.exports="function"===typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},32233:(e,t,r)=>{"use strict";var n,i=r(52141),o=r(26202),a=r(42419),s=r(98583),l=r(88959),c=r(15351),u=r(17869),d=r(30077),f=r(79598).toStringTag,h=r(54817),p=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=n=function(){var e,t=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return e=h&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(t)&&(p(t)||(t=u(t))),m(e,"__weakMapData__",c("c","$weakMap$"+l())),t?(d(t,(function(t){s(t),e.set(t[0],t[1])})),e):e},h&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(e){return!!g.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:c((function(e){if(g.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:c((function(e){return g.call(a(e),this.__weakMapData__)})),set:c((function(e,t){return m(a(e),this.__weakMapData__,c("c",t)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,f,c("c","WeakMap"))},68041:e=>{"use strict";var t,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&m(e,"error",t,r)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,a,c;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"===typeof l)n(l,this,t);else{var c=l.length,u=p(l,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},20318:e=>{var t=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(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},56935:(e,t,r)=>{"use strict";e.exports=r(37025)()?globalThis:r(20318)},37025:e=>{"use strict";e.exports=function(){return"object"===typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},89806:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!==i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!==i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}},51908:(e,t,r)=>{"use strict";var n=r(20878);e.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0===(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},86749:(e,t,r)=>{var n=r(2166);e.exports=function(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(n(t||"float32"))(c+r));var u=t.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=r;i{"use strict";var n=r(62196),i=[32,126];e.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),o=e.font,a="number"===typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;o&&"string"!==typeof o&&(o=n(o));if(Array.isArray(s)){if(2===s.length&&"number"===typeof s[0]&&"number"===typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),r.width=t[0],r.height=t[1];var d=r.getContext("2d");d.fillStyle="#000",d.fillRect(0,0,r.width,r.height),d.font=o,d.textAlign="center",d.textBaseline="middle",d.fillStyle="#fff";var f=a[0]/2,h=a[1]/2;for(c=0;ct[0]-a[0]/2&&(f=a[0]/2,h+=a[1]);return r}},26249:e=>{"use strict";function t(e,o){o||(o={}),("string"===typeof e||Array.isArray(e))&&(o.family=e);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(e=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(t.cache[a]&&s<=t.cache[a].em)return r(t.cache[a],c);var u=o.canvas||t.canvas,d=u.getContext("2d"),f={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},h=Math.ceil(1.5*s);u.height=h,u.width=.5*h,d.font=e;var p="H",m={top:0};d.clearRect(0,0,h,h),d.textBaseline="top",d.fillStyle="black",d.fillText(p,0,0);var g=n(d.getImageData(0,0,h,h));d.clearRect(0,0,h,h),d.textBaseline="bottom",d.fillText(p,0,h);var v=n(d.getImageData(0,0,h,h));m.lineHeight=m.bottom=h-v+g,d.clearRect(0,0,h,h),d.textBaseline="alphabetic",d.fillText(p,0,h);var y=h-n(d.getImageData(0,0,h,h))-1+g;m.baseline=m.alphabetic=y,d.clearRect(0,0,h,h),d.textBaseline="middle",d.fillText(p,0,.5*h);var x=n(d.getImageData(0,0,h,h));m.median=m.middle=h-x-1+g-.5*h,d.clearRect(0,0,h,h),d.textBaseline="hanging",d.fillText(p,0,.5*h);var b=n(d.getImageData(0,0,h,h));m.hanging=h-b-1+g-.5*h,d.clearRect(0,0,h,h),d.textBaseline="ideographic",d.fillText(p,0,h);var w=n(d.getImageData(0,0,h,h));if(m.ideographic=h-w-1+g,f.upper&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.upper,0,0),m.upper=n(d.getImageData(0,0,h,h)),m.capHeight=m.baseline-m.upper),f.lower&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.lower,0,0),m.lower=n(d.getImageData(0,0,h,h)),m.xHeight=m.baseline-m.lower),f.tittle&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.tittle,0,0),m.tittle=n(d.getImageData(0,0,h,h))),f.ascent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.ascent,0,0),m.ascent=n(d.getImageData(0,0,h,h))),f.descent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.descent,0,0),m.descent=i(d.getImageData(0,0,h,h))),f.overshoot){d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.overshoot,0,0);var _=i(d.getImageData(0,0,h,h));m.overshoot=_-y}for(var k in m)m[k]/=s;return m.em=s,t.cache[a]=m,r(m,c)}function r(e,t){var r={};for(var n in"string"===typeof t&&(t=e[t]),e)"em"!==n&&(r[n]=e[n]-t);return r}function n(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}e.exports=t,t.canvas=document.createElement("canvas"),t.cache={}},45767:(e,t,r)=>{"use strict";var n=r(8866),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(2781);e.exports=Function.prototype.bind||n},91293:e=>{e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("must specify type string");if(t=t||{},"undefined"===typeof document&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"===typeof t.width&&(r.width=t.width);"number"===typeof t.height&&(r.height=t.height);var n,i=t;try{var o=[e];0===e.indexOf("webgl")&&o.push("experimental-"+e);for(var a=0;a{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(I){l=null}var c=function(){throw new a},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(t){return c}}}():c,d=r(95520)(),f=r(87593)(),h=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},m="undefined"!==typeof Uint8Array&&h?h(Uint8Array):n,g={"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&d&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&d&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(I){var v=h(h(I));g["%Error.prototype%"]=v}var y=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return g[t]=r,r},x={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(1199),w=r(26834),_=b.call(Function.call,Array.prototype.concat),k=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),T=b.call(Function.call,String.prototype.slice),M=b.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,E=function(e,t){var r,n=e;if(w(x,n)&&(n="%"+(r=x[n])[0]+"%"),w(g,n)){var o=g[n];if(o===p&&(o=y(n)),"undefined"===typeof o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,C,(function(e,t,r,i){n[n.length]=r?S(i,A,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=E("%"+n+"%",t),s=o.name,c=o.value,u=!1,d=o.alias;d&&(n=d[0],k(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var y=l(c,p);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else h=w(c,p),c=c[p];h&&!u&&(g[s]=c)}}return c}},22188:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(f*v-h*g)-d*(l*v-c*g)+m*(l*h-c*f),e[1]=-(n*(f*v-h*g)-d*(i*v-o*g)+m*(i*h-o*f)),e[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),e[3]=-(n*(l*h-c*f)-s*(i*h-o*f)+d*(i*c-o*l)),e[4]=-(a*(f*v-h*g)-u*(l*v-c*g)+p*(l*h-c*f)),e[5]=r*(f*v-h*g)-u*(i*v-o*g)+p*(i*h-o*f),e[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+p*(i*c-o*l)),e[7]=r*(l*h-c*f)-a*(i*h-o*f)+u*(i*c-o*l),e[8]=a*(d*v-h*m)-u*(s*v-c*m)+p*(s*h-c*d),e[9]=-(r*(d*v-h*m)-u*(n*v-o*m)+p*(n*h-o*d)),e[10]=r*(s*v-c*m)-a*(n*v-o*m)+p*(n*c-o*s),e[11]=-(r*(s*h-c*d)-a*(n*h-o*d)+u*(n*c-o*s)),e[12]=-(a*(d*g-f*m)-u*(s*g-l*m)+p*(s*f-l*d)),e[13]=r*(d*g-f*m)-u*(n*g-i*m)+p*(n*f-i*d),e[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+p*(n*l-i*s)),e[15]=r*(s*f-l*d)-a*(n*f-i*d)+u*(n*l-i*s),e}},31112:e=>{e.exports=function(e){var t=new Float32Array(16);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}},68696:e=>{e.exports=function(e,t){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}},99902:e=>{e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6817:e=>{e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],m=e[14],g=e[15];return(t*a-r*o)*(d*g-f*m)-(t*s-n*o)*(u*g-f*p)+(t*l-i*o)*(u*m-d*p)+(r*s-n*a)*(c*g-f*h)-(r*l-i*a)*(c*m-d*h)+(n*l-i*s)*(c*p-u*h)}},76778:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r+r,s=n+n,l=i+i,c=r*a,u=n*a,d=n*s,f=i*a,h=i*s,p=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-p,e[1]=u+v,e[2]=f-g,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=f+g,e[9]=h-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},13315:e=>{e.exports=function(e,t,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);if(Math.abs(c)<1e-6)return null;return a*=c=1/c,s*=c,l*=c,n=Math.sin(t),i=Math.cos(t),o=1-i,e[0]=a*a*o+i,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+i,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},45722:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=n+n,l=i+i,c=o+o,u=n*s,d=n*l,f=n*c,h=i*l,p=i*c,m=o*c,g=a*s,v=a*l,y=a*c;return e[0]=1-(h+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=f+v,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},30099:e=>{e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},42778:e=>{e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},17607:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},80452:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},53318:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},85317:e=>{e.exports=function(e,t,r,n,i,o,a){var s=1/(r-t),l=1/(i-n),c=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(a+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*c,e[15]=0,e}},26738:e=>{e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},12903:(e,t,r)=>{e.exports={create:r(99902),clone:r(31112),copy:r(68696),identity:r(26738),transpose:r(54636),invert:r(45529),adjoint:r(22188),determinant:r(6817),multiply:r(46632),translate:r(62681),scale:r(53107),rotate:r(9916),rotateX:r(91166),rotateY:r(38313),rotateZ:r(39629),fromRotation:r(13315),fromRotationTranslation:r(45722),fromScaling:r(30099),fromTranslation:r(42778),fromXRotation:r(17607),fromYRotation:r(80452),fromZRotation:r(53318),fromQuat:r(76778),frustum:r(85317),perspective:r(6042),perspectiveFromFieldOfView:r(90701),ortho:r(8130),lookAt:r(50422),str:r(94975)}},45529:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,x=r*l-i*a,b=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,S=u*m-d*p,T=u*g-f*p,M=u*v-h*p,C=d*g-f*m,A=d*v-h*m,E=f*v-h*g,I=y*E-x*A+b*C+w*M-_*T+k*S;if(!I)return null;return I=1/I,e[0]=(s*E-l*A+c*C)*I,e[1]=(i*A-n*E-o*C)*I,e[2]=(m*k-g*_+v*w)*I,e[3]=(f*_-d*k-h*w)*I,e[4]=(l*M-a*E-c*T)*I,e[5]=(r*E-i*M+o*T)*I,e[6]=(g*b-p*k-v*x)*I,e[7]=(u*k-f*b+h*x)*I,e[8]=(a*A-s*M+c*S)*I,e[9]=(n*M-r*A-o*S)*I,e[10]=(p*_-m*b+v*y)*I,e[11]=(d*b-u*_-h*y)*I,e[12]=(s*T-a*C-l*S)*I,e[13]=(r*C-n*T+i*S)*I,e[14]=(m*x-p*w-g*y)*I,e[15]=(u*w-d*x+f*y)*I,e}},50422:(e,t,r)=>{var n=r(26738);e.exports=function(e,t,r,i){var o,a,s,l,c,u,d,f,h,p,m=t[0],g=t[1],v=t[2],y=i[0],x=i[1],b=i[2],w=r[0],_=r[1],k=r[2];if(Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-k)<1e-6)return n(e);d=m-w,f=g-_,h=v-k,p=1/Math.sqrt(d*d+f*f+h*h),o=x*(h*=p)-b*(f*=p),a=b*(d*=p)-y*h,s=y*f-x*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);l=f*s-h*a,c=h*o-d*s,u=d*a-f*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0);return e[0]=o,e[1]=l,e[2]=d,e[3]=0,e[4]=a,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=h,e[11]=0,e[12]=-(o*m+a*g+s*v),e[13]=-(l*m+c*g+u*v),e[14]=-(d*m+f*g+h*v),e[15]=1,e}},46632:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],w=r[2],_=r[3];return e[0]=x*n+b*s+w*d+_*m,e[1]=x*i+b*l+w*f+_*g,e[2]=x*o+b*c+w*h+_*v,e[3]=x*a+b*u+w*p+_*y,x=r[4],b=r[5],w=r[6],_=r[7],e[4]=x*n+b*s+w*d+_*m,e[5]=x*i+b*l+w*f+_*g,e[6]=x*o+b*c+w*h+_*v,e[7]=x*a+b*u+w*p+_*y,x=r[8],b=r[9],w=r[10],_=r[11],e[8]=x*n+b*s+w*d+_*m,e[9]=x*i+b*l+w*f+_*g,e[10]=x*o+b*c+w*h+_*v,e[11]=x*a+b*u+w*p+_*y,x=r[12],b=r[13],w=r[14],_=r[15],e[12]=x*n+b*s+w*d+_*m,e[13]=x*i+b*l+w*f+_*g,e[14]=x*o+b*c+w*h+_*v,e[15]=x*a+b*u+w*p+_*y,e}},8130:e=>{e.exports=function(e,t,r,n,i,o,a){var s=1/(t-r),l=1/(n-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(a+o)*c,e[15]=1,e}},6042:e=>{e.exports=function(e,t,r,n,i){var o=1/Math.tan(t/2),a=1/(n-i);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*a,e[15]=0,e}},90701:e=>{e.exports=function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},9916:e=>{e.exports=function(e,t,r,n){var i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A=n[0],E=n[1],I=n[2],O=Math.sqrt(A*A+E*E+I*I);if(Math.abs(O)<1e-6)return null;A*=O=1/O,E*=O,I*=O,i=Math.sin(r),o=Math.cos(r),a=1-o,s=t[0],l=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=A*A*a+o,b=E*A*a+I*i,w=I*A*a-E*i,_=A*E*a-I*i,k=E*E*a+o,S=I*E*a+A*i,T=A*I*a+E*i,M=E*I*a-A*i,C=I*I*a+o,e[0]=s*x+d*b+m*w,e[1]=l*x+f*b+g*w,e[2]=c*x+h*b+v*w,e[3]=u*x+p*b+y*w,e[4]=s*_+d*k+m*S,e[5]=l*_+f*k+g*S,e[6]=c*_+h*k+v*S,e[7]=u*_+p*k+y*S,e[8]=s*T+d*M+m*C,e[9]=l*T+f*M+g*C,e[10]=c*T+h*M+v*C,e[11]=u*T+p*M+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},91166:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=o*i+c*n,e[5]=a*i+u*n,e[6]=s*i+d*n,e[7]=l*i+f*n,e[8]=c*i-o*n,e[9]=u*i-a*n,e[10]=d*i-s*n,e[11]=f*i-l*n,e}},38313:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=o*i-c*n,e[1]=a*i-u*n,e[2]=s*i-d*n,e[3]=l*i-f*n,e[8]=o*n+c*i,e[9]=a*n+u*i,e[10]=s*n+d*i,e[11]=l*n+f*i,e}},39629:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];t!==e&&(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]);return e[0]=o*i+c*n,e[1]=a*i+u*n,e[2]=s*i+d*n,e[3]=l*i+f*n,e[4]=c*i-o*n,e[5]=u*i-a*n,e[6]=d*i-s*n,e[7]=f*i-l*n,e}},53107:e=>{e.exports=function(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},94975:e=>{e.exports=function(e){return"mat4("+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]+")"}},62681:e=>{e.exports=function(e,t,r){var n,i,o,a,s,l,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+c*g+h*v+t[14],e[15]=a*m+u*g+p*v+t[15]);return e}},54636:e=>{e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},55808:(e,t,r)=>{"use strict";var n=r(77420),i=r(49147),o=r(16136),a=r(93940),s=r(12492),l=r(47367),c=r(99402),u=r(6089),d=r(86840),f=r(23181),h=r(98796),p=r(9126),m=r(2037),g=r(71843),v=r(26249),y=r(86749),x=r(34789).nextPow2,b=new s,w=!1;if(document.body){var _=document.body.appendChild(document.createElement("div"));_.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(w=!0),document.body.removeChild(_)}var k=function(e){!function(e){return"function"===typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=a(e):(e={regl:e},this.gl=e.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||o({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(f(e)?e:{})};k.prototype.createShader=function(){var e=this.regl,t=e({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:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.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:e,draw:t,atlas:{}}},k.prototype.update=function(e){var t=this;if("string"===typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{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(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=d(e.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!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"===typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,r){if("string"===typeof e)try{e=n.parse(e)}catch(d){e=n.parse(k.baseFontSize+"px "+e)}else e=n.parse(n.stringify(e));var i=n.stringify({size:k.baseFontSize,family:e.family,stretch:w?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=h(e.size),l=Math.round(s[0]*p(s[1]));if(l!==t.fontSize[r]&&(a=!0,t.fontSize[r]=l),(!t.font[r]||i!=t.font[r].baseString)&&(o=!0,t.font[r]=k.fonts[i],!t.font[r])){var c=e.family.join(", "),u=[e.style];e.style!=e.variant&&u.push(e.variant),e.variant!=e.weight&&u.push(e.weight),w&&e.weight!=e.stretch&&u.push(e.stretch),t.font[r]={baseString:i,family:c,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[i]=t.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:t.fontSize[i],family:r.family,stretch:w?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(t.fontAtlas[i]=t.shader.atlas[o],!t.fontAtlas[i]){var a=r.metrics;t.shader.atlas[o]=t.fontAtlas[i]={fontString:o,step:2*Math.ceil(t.fontSize[i]*a.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"===typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),f=0;f2){for(var _=!e.position[0].length,S=u.mallocFloat(2*this.count),T=0,M=0;T1?t.align[r]:t.align[0]:t.align;if("number"===typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,i=0;return i+=.5*n.bottom,i+="number"===typeof e?e-n.baseline:-n[e],i*=-1}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!==typeof e.color&&isNaN(e.color)){var H;if("number"===typeof e.color[0]&&e.color.length>this.counts.length){var W=e.color.length;H=u.mallocUint8(W);for(var G=(e.color.subarray||e.color.slice).bind(e.color),q=0;q4||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 $=0;$1?this.counts[$]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[$]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*$,4*$+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[$]:this.opacity,baseline:null!=this.baselineOffset[$]?this.baselineOffset[$]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[$]?this.alignOffset[$]:this.alignOffset[0]:0,atlas:this.fontAtlas[$]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*$,2*$+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},16136:function(e){e.exports=function(){"use strict";var e=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},t=function(e,t){for(var r=Object.keys(t),n=0;n=0&&(0|e)===e||i("invalid parameter type, ("+e+")"+a(t)+". must be a nonnegative integer")}function f(e,t,r){t.indexOf(e)<0&&i("invalid value"+a(r)+". must be one of: "+t)}var h=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function p(e){Object.keys(e).forEach((function(e){h.indexOf(e)<0&&i('invalid regl constructor argument "'+e+'". must be one of '+h)}))}function m(e,t){for(e+="";e.length0&&t.push(new y("unknown",0,e))}})),t}function k(e,t){t.forEach((function(t){var r=e[t.file];if(r){var n=r.index[t.line];if(n)return n.errors.push(t),void(r.hasErrors=!0)}e.unknown.hasErrors=!0,e.unknown.lines[0].errors.push(t)}))}function S(e,t,n,i,a){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var s=e.getShaderInfoLog(t),l=i===e.FRAGMENT_SHADER?"fragment":"vertex";O(n,"string",l+" shader source must be a string",a);var c=w(n,a),u=_(s);k(c,u),Object.keys(c).forEach((function(e){var t=c[e];if(t.hasErrors){var n=[""],i=[""];o("file number "+e+": "+t.name+"\n","color:red;text-decoration:underline;font-weight:bold"),t.lines.forEach((function(e){if(e.errors.length>0){o(m(e.number,4)+"| ","background-color:yellow; font-weight:bold"),o(e.line+r,"color:red; background-color:yellow; font-weight:bold");var t=0;e.errors.forEach((function(n){var i=n.message,a=/^\s*'(.*)'\s*:\s*(.*)$/.exec(i);if(a){var s=a[1];i=a[2],"assign"===s&&(s="="),t=Math.max(e.line.indexOf(s,t),0)}else t=0;o(m("| ",6)),o(m("^^^",t+3)+r,"font-weight:bold"),o(m("| ",6)),o(i+r,"font-weight:bold")})),o(m("| ",6)+r)}else o(m(e.number,4)+"| "),o(e.line+r,"color:red")})),"undefined"===typeof document||window.chrome?console.log(n.join("")):(i[0]=n.join("%c"),console.log.apply(console,i))}function o(e,t){n.push(e),i.push(t||"")}})),o.raise("Error compiling "+l+" shader, "+c[0].name)}}function T(e,t,n,i,a){if(!e.getProgramParameter(t,e.LINK_STATUS)){var s=e.getProgramInfoLog(t),l=w(n,a),c='Error linking program with vertex shader, "'+w(i,a)[0].name+'", and fragment shader "'+l[0].name+'"';"undefined"!==typeof document?console.log("%c"+c+r+"%c"+s,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(c+r+s),o.raise(c)}}function M(e){e._commandRef=x()}function C(e,t,r,n){function i(e){return e?n.id(e):0}function o(e,t){Object.keys(t).forEach((function(t){e[n.id(t)]=!0}))}M(e),e._fragId=i(e.static.frag),e._vertId=i(e.static.vert);var a=e._uniformSet={};o(a,t.static),o(a,t.dynamic);var s=e._attributeSet={};o(s,r.static),o(s,r.dynamic),e._hasCount="count"in e.static||"count"in e.dynamic||"elements"in e.static||"elements"in e.dynamic}function A(e,t){var r=b();i(e+" in command "+(t||x())+("unknown"===r?"":" called from "+r))}function E(e,t,r){e||A(t,r||x())}function I(e,t,r,n){e in t||A("unknown parameter ("+e+")"+a(r)+". possible values: "+Object.keys(t).join(),n||x())}function O(e,t,r,n){c(e,t)||A("invalid parameter type"+a(r)+". expected "+t+", got "+typeof e,n||x())}function P(e){e()}function R(e,t,r){e.texture?f(e.texture._texture.internalformat,t,"unsupported texture format for attachment"):f(e.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}var L=33071,j=9728,D=9984,z=9985,N=9986,F=9987,B=5121,Z=5122,U=5123,V=5124,H=5125,W=5126,G=32819,q=32820,Y=33635,X=34042,K=36193,$={};function J(e,t){return e===q||e===G||e===Y?2:e===X?4:$[e]*t}function Q(e){return!(e&e-1)&&!!e}function ee(e,t,r){var n,i=t.width,a=t.height,s=t.channels;o(i>0&&i<=r.maxTextureSize&&a>0&&a<=r.maxTextureSize,"invalid texture shape"),e.wrapS===L&&e.wrapT===L||o(Q(i)&&Q(a),"incompatible wrap mode for texture, both width and height must be power of 2"),1===t.mipmask?1!==i&&1!==a&&o(e.minFilter!==D&&e.minFilter!==N&&e.minFilter!==z&&e.minFilter!==F,"min filter requires mipmap"):(o(Q(i)&&Q(a),"texture must be a square power of 2 to support mipmapping"),o(t.mipmask===(i<<1)-1,"missing or incomplete mipmap data")),t.type===W&&(r.extensions.indexOf("oes_texture_float_linear")<0&&o(e.minFilter===j&&e.magFilter===j,"filter not supported, must enable oes_texture_float_linear"),o(!e.genMipmaps,"mipmap generation not supported with float textures"));var l=t.images;for(n=0;n<16;++n)if(l[n]){var c=i>>n,u=a>>n;o(t.mipmask&1<0&&i<=n.maxTextureSize&&a>0&&a<=n.maxTextureSize,"invalid texture shape"),o(i===a,"cube map must be square"),o(t.wrapS===L&&t.wrapT===L,"wrap mode not supported by cube map");for(var l=0;l>d,p=a>>d;o(c.mipmask&1<1&&t===r&&('"'===t||"'"===t))return['"'+le(e.substr(1,e.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(n)return ce(e.substr(0,n.index)).concat(ce(n[1])).concat(ce(e.substr(n.index+n[0].length)));var i=e.split(".");if(1===i.length)return['"'+le(e)+'"'];for(var o=[],a=0;a0,"invalid pixel ratio"))):re.raise("invalid arguments to regl"),t&&("canvas"===t.nodeName.toLowerCase()?n=t:r=t),!i){if(!n){re("undefined"!==typeof document,"must manually specify webgl context outside of DOM environments");var h=ye(r||document.body,d,c);if(!h)return null;n=h.canvas,f=h.onDestroy}void 0===a.premultipliedAlpha&&(a.premultipliedAlpha=!0),i=xe(n,a)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:c,profile:u,onDone:d,onDestroy:f}:(f(),d("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Te(e,t){var r={};function n(t){re.type(t,"string","extension name must be string");var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch(o){}return!!n}for(var i=0;i65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function De(){var e=Me(8,(function(){return[]}));function t(t){var r=Le(t),n=e[je(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[je(t.byteLength)>>2].push(t)}function n(e,r){var n=null;switch(e){case Ce:n=new Int8Array(t(r),0,r);break;case Ae:n=new Uint8Array(t(r),0,r);break;case Ee:n=new Int16Array(t(2*r),0,r);break;case Ie:n=new Uint16Array(t(2*r),0,r);break;case Oe:n=new Int32Array(t(4*r),0,r);break;case Pe:n=new Uint32Array(t(4*r),0,r);break;case Re:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n}function i(e){r(e.buffer)}return{alloc:t,free:r,allocType:n,freeType:i}}var ze=De();ze.zero=De();var Ne=3408,Fe=3410,Be=3411,Ze=3412,Ue=3413,Ve=3414,He=3415,We=33901,Ge=33902,qe=3379,Ye=3386,Xe=34921,Ke=36347,$e=36348,Je=35661,Qe=35660,et=34930,tt=36349,rt=34076,nt=34024,it=7936,ot=7937,at=7938,st=35724,lt=34047,ct=36063,ut=34852,dt=3553,ft=34067,ht=34069,pt=33984,mt=6408,gt=5126,vt=5121,yt=36160,xt=36053,bt=36064,wt=16384,_t=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(lt));var n=1,i=1;t.webgl_draw_buffers&&(n=e.getParameter(ut),i=e.getParameter(ct));var o=!!t.oes_texture_float;if(o){var a=e.createTexture();e.bindTexture(dt,a),e.texImage2D(dt,0,mt,1,1,0,mt,gt,null);var s=e.createFramebuffer();if(e.bindFramebuffer(yt,s),e.framebufferTexture2D(yt,bt,dt,a,0),e.bindTexture(dt,null),e.checkFramebufferStatus(yt)!==xt)o=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(wt);var l=ze.allocType(gt,4);e.readPixels(0,0,1,1,mt,gt,l),e.getError()?o=!1:(e.deleteFramebuffer(s),e.deleteTexture(a),o=1===l[0]),ze.freeType(l)}}var c=!0;if("undefined"===typeof navigator||!(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))){var u=e.createTexture(),d=ze.allocType(vt,36);e.activeTexture(pt),e.bindTexture(ft,u),e.texImage2D(ht,0,mt,3,3,0,mt,vt,d),ze.freeType(d),e.bindTexture(ft,null),e.deleteTexture(u),c=!e.getError()}return{colorBits:[e.getParameter(Fe),e.getParameter(Be),e.getParameter(Ze),e.getParameter(Ue)],depthBits:e.getParameter(Ve),stencilBits:e.getParameter(He),subpixelBits:e.getParameter(Ne),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:e.getParameter(We),lineWidthDims:e.getParameter(Ge),maxViewportDims:e.getParameter(Ye),maxCombinedTextureUnits:e.getParameter(Je),maxCubeMapSize:e.getParameter(rt),maxRenderbufferSize:e.getParameter(nt),maxTextureUnits:e.getParameter(et),maxTextureSize:e.getParameter(qe),maxAttributes:e.getParameter(Xe),maxVertexUniforms:e.getParameter(Ke),maxVertexTextureUnits:e.getParameter(Qe),maxVaryingVectors:e.getParameter($e),maxFragmentUniforms:e.getParameter(tt),glsl:e.getParameter(st),renderer:e.getParameter(ot),vendor:e.getParameter(it),version:e.getParameter(at),readFloat:o,npotTextureCube:c}};function kt(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)||e(t.data))}var St=function(e){return Object.keys(e).map((function(t){return e[t]}))},Tt={shape:Ot,flatten:It};function Mt(e,t,r){for(var n=0;n0)if(Array.isArray(r[0])){s=Dt(r);for(var c=1,u=1;u0)if("number"===typeof t[0]){var o=ze.allocType(u.dtype,t.length);Vt(o,t),p(o,i),ze.freeType(o)}else if(Array.isArray(t[0])||e(t[0])){n=Dt(t);var a=jt(t,n,u.dtype);p(a,i),ze.freeType(a)}else re.raise("invalid buffer data")}else if(kt(t)){n=t.shape;var s=t.stride,l=0,c=0,f=0,h=0;1===n.length?(l=n[0],c=1,f=s[0],h=0):2===n.length?(l=n[0],c=n[1],f=s[0],h=s[1]):re.raise("invalid shape");var m=Array.isArray(t.data)?u.dtype:Ut(t.data),g=ze.allocType(m,l*c);Ht(g,t.data,l,c,f,h,t.offset),p(g,i),ze.freeType(g)}else re.raise("invalid data for buffer subdata");return d}return a[u.id]=u,l||d(i),d._reglType="buffer",d._buffer=u,d.subdata=m,n.profile&&(d.stats=u.stats),d.destroy=function(){h(u)},d}function m(){St(a).forEach((function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)}))}return n.profile&&(r.getTotalBufferSize=function(){var e=0;return Object.keys(a).forEach((function(t){e+=a[t].stats.size})),e}),{create:p,createStream:c,destroyStream:u,clear:function(){St(a).forEach(h),l.forEach(h)},getBuffer:function(e){return e&&e._buffer instanceof s?e._buffer:null},restore:m,_initBuffer:f}}Zt[5120]=1,Zt[5122]=2,Zt[5124]=4,Zt[5121]=1,Zt[5123]=2,Zt[5125]=4,Zt[5126]=4;var Gt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},qt=0,Yt=1,Xt=4,Kt=5120,$t=5121,Jt=5122,Qt=5123,er=5124,tr=5125,rr=34963,nr=35040,ir=35044;function or(t,r,n,i){var o={},a=0,s={uint8:$t,uint16:Qt};function l(e){this.id=a++,o[this.id]=this,this.buffer=e,this.primType=Xt,this.vertCount=0,this.type=0}r.oes_element_index_uint&&(s.uint32=tr),l.prototype.bind=function(){this.buffer.bind()};var c=[];function u(e){var t=c.pop();return t||(t=new l(n.create(null,rr,!0,!1)._buffer)),f(t,e,nr,-1,-1,0,0),t}function d(e){c.push(e)}function f(i,o,a,s,l,c,u){var d;if(i.buffer.bind(),o){var f=u;u||e(o)&&(!kt(o)||e(o.data))||(f=r.oes_element_index_uint?tr:Qt),n._initBuffer(i.buffer,o,a,f,3)}else t.bufferData(rr,c,a),i.buffer.dtype=d||$t,i.buffer.usage=a,i.buffer.dimension=3,i.buffer.byteLength=c;if(d=u,!u){switch(i.buffer.dtype){case $t:case Kt:d=$t;break;case Qt:case Jt:d=Qt;break;case tr:case er:d=tr;break;default:re.raise("unsupported type for element array")}i.buffer.dtype=d}i.type=d,re(d!==tr||!!r.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var h=l;h<0&&(h=i.buffer.byteLength,d===Qt?h>>=1:d===tr&&(h>>=2)),i.vertCount=h;var p=s;if(s<0){p=Xt;var m=i.buffer.dimension;1===m&&(p=qt),2===m&&(p=Yt),3===m&&(p=Xt)}i.primType=p}function h(e){i.elementsCount--,re(null!==e.buffer,"must not double destroy elements"),delete o[e.id],e.buffer.destroy(),e.buffer=null}function p(t,r){var o=n.create(null,rr,!0),a=new l(o._buffer);function c(t){if(t)if("number"===typeof t)o(t),a.primType=Xt,a.vertCount=0|t,a.type=$t;else{var r=null,n=ir,i=-1,l=-1,u=0,d=0;Array.isArray(t)||e(t)||kt(t)?r=t:(re.type(t,"object","invalid arguments for elements"),"data"in t&&(r=t.data,re(Array.isArray(r)||e(r)||kt(r),"invalid data for element buffer")),"usage"in t&&(re.parameter(t.usage,Lt,"invalid element buffer usage"),n=Lt[t.usage]),"primitive"in t&&(re.parameter(t.primitive,Gt,"invalid element buffer primitive"),i=Gt[t.primitive]),"count"in t&&(re("number"===typeof t.count&&t.count>=0,"invalid vertex count for elements"),l=0|t.count),"type"in t&&(re.parameter(t.type,s,"invalid buffer type"),d=s[t.type]),"length"in t?u=0|t.length:(u=l,d===Qt||d===Jt?u*=2:d!==tr&&d!==er||(u*=4))),f(a,r,n,i,l,u,d)}else o(),a.primType=Xt,a.vertCount=0,a.type=$t;return c}return i.elementsCount++,c(t),c._reglType="elements",c._elements=a,c.subdata=function(e,t){return o.subdata(e,t),c},c.destroy=function(){h(a)},c}return{create:p,createStream:u,destroyStream:d,getElements:function(e){return"function"===typeof e&&e._elements instanceof l?e._elements:null},clear:function(){St(o).forEach(h)}}}var ar=new Float32Array(1),sr=new Uint32Array(ar.buffer),lr=5123;function cr(e){for(var t=ze.allocType(lr,e.length),r=0;r>>31<<15,o=(n<<1>>>24)-127,a=n>>13&1023;if(o<-24)t[r]=i;else if(o<-14){var s=-14-o;t[r]=i+(a+1024>>s)}else t[r]=o>15?i+31744:i+(o+15<<10)+a}return t}function ur(t){return Array.isArray(t)||e(t)}var dr=function(e){return!(e&e-1)&&!!e},fr=34467,hr=3553,pr=34067,mr=34069,gr=6408,vr=6406,yr=6407,xr=6409,br=6410,wr=32854,_r=32855,kr=36194,Sr=32819,Tr=32820,Mr=33635,Cr=34042,Ar=6402,Er=34041,Ir=35904,Or=35906,Pr=36193,Rr=33776,Lr=33777,jr=33778,Dr=33779,zr=35986,Nr=35987,Fr=34798,Br=35840,Zr=35841,Ur=35842,Vr=35843,Hr=36196,Wr=5121,Gr=5123,qr=5125,Yr=5126,Xr=10242,Kr=10243,$r=10497,Jr=33071,Qr=33648,en=10240,tn=10241,rn=9728,nn=9729,on=9984,an=9985,sn=9986,ln=9987,cn=33170,un=4352,dn=4353,fn=4354,hn=34046,pn=3317,mn=37440,gn=37441,vn=37443,yn=37444,xn=33984,bn=[on,sn,an,ln],wn=[0,xr,br,yr,gr],_n={};function kn(e){return"[object "+e+"]"}_n[xr]=_n[vr]=_n[Ar]=1,_n[Er]=_n[br]=2,_n[yr]=_n[Ir]=3,_n[gr]=_n[Or]=4;var Sn=kn("HTMLCanvasElement"),Tn=kn("OffscreenCanvas"),Mn=kn("CanvasRenderingContext2D"),Cn=kn("ImageBitmap"),An=kn("HTMLImageElement"),En=kn("HTMLVideoElement"),In=Object.keys(Pt).concat([Sn,Tn,Mn,Cn,An,En]),On=[];On[Wr]=1,On[Yr]=4,On[Pr]=2,On[Gr]=2,On[qr]=4;var Pn=[];function Rn(e){return Array.isArray(e)&&(0===e.length||"number"===typeof e[0])}function Ln(e){return!!Array.isArray(e)&&!(0===e.length||!ur(e[0]))}function jn(e){return Object.prototype.toString.call(e)}function Dn(e){return jn(e)===Sn}function zn(e){return jn(e)===Tn}function Nn(e){return jn(e)===Mn}function Fn(e){return jn(e)===Cn}function Bn(e){return jn(e)===An}function Zn(e){return jn(e)===En}function Un(e){if(!e)return!1;var t=jn(e);return In.indexOf(t)>=0||Rn(e)||Ln(e)||kt(e)}function Vn(e){return 0|Pt[Object.prototype.toString.call(e)]}function Hn(e,t){var r=t.length;switch(e.type){case Wr:case Gr:case qr:case Yr:var n=ze.allocType(e.type,r);n.set(t),e.data=n;break;case Pr:e.data=cr(t);break;default:re.raise("unsupported texture type, must specify a typed array")}}function Wn(e,t){return ze.allocType(e.type===Pr?Yr:e.type,t)}function Gn(e,t){e.type===Pr?(e.data=cr(t),ze.freeType(t)):e.data=t}function qn(e,t,r,n,i,o){for(var a=e.width,s=e.height,l=e.channels,c=Wn(e,a*s*l),u=0,d=0;d=1;)s+=a*l*l,l/=2;return s}return a*r*n}function Xn(r,n,i,o,a,s,l){var c={"don't care":un,"dont care":un,nice:fn,fast:dn},u={repeat:$r,clamp:Jr,mirror:Qr},d={nearest:rn,linear:nn},f=t({mipmap:ln,"nearest mipmap nearest":on,"linear mipmap nearest":an,"nearest mipmap linear":sn,"linear mipmap linear":ln},d),h={none:0,browser:yn},p={uint8:Wr,rgba4:Sr,rgb565:Mr,"rgb5 a1":Tr},m={alpha:vr,luminance:xr,"luminance alpha":br,rgb:yr,rgba:gr,rgba4:wr,"rgb5 a1":_r,rgb565:kr},g={};n.ext_srgb&&(m.srgb=Ir,m.srgba=Or),n.oes_texture_float&&(p.float32=p.float=Yr),n.oes_texture_half_float&&(p.float16=p["half float"]=Pr),n.webgl_depth_texture&&(t(m,{depth:Ar,"depth stencil":Er}),t(p,{uint16:Gr,uint32:qr,"depth stencil":Cr})),n.webgl_compressed_texture_s3tc&&t(g,{"rgb s3tc dxt1":Rr,"rgba s3tc dxt1":Lr,"rgba s3tc dxt3":jr,"rgba s3tc dxt5":Dr}),n.webgl_compressed_texture_atc&&t(g,{"rgb atc":zr,"rgba atc explicit alpha":Nr,"rgba atc interpolated alpha":Fr}),n.webgl_compressed_texture_pvrtc&&t(g,{"rgb pvrtc 4bppv1":Br,"rgb pvrtc 2bppv1":Zr,"rgba pvrtc 4bppv1":Ur,"rgba pvrtc 2bppv1":Vr}),n.webgl_compressed_texture_etc1&&(g["rgb etc1"]=Hr);var v=Array.prototype.slice.call(r.getParameter(fr));Object.keys(g).forEach((function(e){var t=g[e];v.indexOf(t)>=0&&(m[e]=t)}));var y=Object.keys(m);i.textureFormats=y;var x=[];Object.keys(m).forEach((function(e){var t=m[e];x[t]=e}));var b=[];Object.keys(p).forEach((function(e){var t=p[e];b[t]=e}));var w=[];Object.keys(d).forEach((function(e){var t=d[e];w[t]=e}));var _=[];Object.keys(f).forEach((function(e){var t=f[e];_[t]=e}));var k=[];Object.keys(u).forEach((function(e){var t=u[e];k[t]=e}));var S=y.reduce((function(e,t){var r=m[t];return r===xr||r===vr||r===xr||r===br||r===Ar||r===Er||n.ext_srgb&&(r===Ir||r===Or)?e[r]=r:r===_r||t.indexOf("rgba")>=0?e[r]=gr:e[r]=yr,e}),{});function T(){this.internalformat=gr,this.format=gr,this.type=Wr,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=yn,this.width=0,this.height=0,this.channels=0}function M(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function C(e,t){if("object"===typeof t&&t){if("premultiplyAlpha"in t&&(re.type(t.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(re.type(t.flipY,"boolean","invalid texture flip"),e.flipY=t.flipY),"alignment"in t&&(re.oneOf(t.alignment,[1,2,4,8],"invalid texture unpack alignment"),e.unpackAlignment=t.alignment),"colorSpace"in t&&(re.parameter(t.colorSpace,h,"invalid colorSpace"),e.colorSpace=h[t.colorSpace]),"type"in t){var r=t.type;re(n.oes_texture_float||!("float"===r||"float32"===r),"you must enable the OES_texture_float extension in order to use floating point textures."),re(n.oes_texture_half_float||!("half float"===r||"float16"===r),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),re(n.webgl_depth_texture||!("uint16"===r||"uint32"===r||"depth stencil"===r),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(r,p,"invalid texture type"),e.type=p[r]}var o=e.width,a=e.height,s=e.channels,l=!1;"shape"in t?(re(Array.isArray(t.shape)&&t.shape.length>=2,"shape must be an array"),o=t.shape[0],a=t.shape[1],3===t.shape.length&&(s=t.shape[2],re(s>0&&s<=4,"invalid number of channels"),l=!0),re(o>=0&&o<=i.maxTextureSize,"invalid width"),re(a>=0&&a<=i.maxTextureSize,"invalid height")):("radius"in t&&(o=a=t.radius,re(o>=0&&o<=i.maxTextureSize,"invalid radius")),"width"in t&&(o=t.width,re(o>=0&&o<=i.maxTextureSize,"invalid width")),"height"in t&&(a=t.height,re(a>=0&&a<=i.maxTextureSize,"invalid height")),"channels"in t&&(s=t.channels,re(s>0&&s<=4,"invalid number of channels"),l=!0)),e.width=0|o,e.height=0|a,e.channels=0|s;var c=!1;if("format"in t){var u=t.format;re(n.webgl_depth_texture||!("depth"===u||"depth stencil"===u),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(u,m,"invalid texture format");var d=e.internalformat=m[u];e.format=S[d],u in p&&("type"in t||(e.type=p[u])),u in g&&(e.compressed=!0),c=!0}!l&&c?e.channels=_n[e.format]:l&&!c?e.channels!==wn[e.format]&&(e.format=e.internalformat=wn[e.channels]):c&&l&&re(e.channels===_n[e.format],"number of channels inconsistent with specified format")}}function A(e){r.pixelStorei(mn,e.flipY),r.pixelStorei(gn,e.premultiplyAlpha),r.pixelStorei(vn,e.colorSpace),r.pixelStorei(pn,e.unpackAlignment)}function E(){T.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function I(t,r){var n=null;if(Un(r)?n=r:r&&(re.type(r,"object","invalid pixel data type"),C(t,r),"x"in r&&(t.xOffset=0|r.x),"y"in r&&(t.yOffset=0|r.y),Un(r.data)&&(n=r.data)),re(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),r.copy){re(!n,"can not specify copy and data field for the same texture");var o=a.viewportWidth,s=a.viewportHeight;t.width=t.width||o-t.xOffset,t.height=t.height||s-t.yOffset,t.needsCopy=!0,re(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=o&&t.height>0&&t.height<=s,"copy texture read out of bounds")}else if(n){if(e(n))t.channels=t.channels||4,t.data=n,"type"in r||t.type!==Wr||(t.type=Vn(n));else if(Rn(n))t.channels=t.channels||4,Hn(t,n),t.alignment=1,t.needsFree=!0;else if(kt(n)){var l=n.data;Array.isArray(l)||t.type!==Wr||(t.type=Vn(l));var c,u,d,f,h,p,m=n.shape,g=n.stride;3===m.length?(d=m[2],p=g[2]):(re(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),d=1,p=1),c=m[0],u=m[1],f=g[0],h=g[1],t.alignment=1,t.width=c,t.height=u,t.channels=d,t.format=t.internalformat=wn[d],t.needsFree=!0,qn(t,l,f,h,p,n.offset)}else if(Dn(n)||zn(n)||Nn(n))Dn(n)||zn(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(Fn(n))t.element=n,t.width=n.width,t.height=n.height,t.channels=4;else if(Bn(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Zn(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(Ln(n)){var v=t.width||n[0].length,y=t.height||n.length,x=t.channels;x=ur(n[0][0])?x||n[0][0].length:x||1;for(var b=Tt.shape(n),w=1,_=0;_=0,"oes_texture_float extension not enabled"):t.type===Pr&&re(i.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function O(e,t,n){var i=e.element,a=e.data,s=e.internalformat,l=e.format,c=e.type,u=e.width,d=e.height;A(e),i?r.texImage2D(t,n,l,l,c,i):e.compressed?r.compressedTexImage2D(t,n,s,u,d,0,a):e.needsCopy?(o(),r.copyTexImage2D(t,n,l,e.xOffset,e.yOffset,u,d,0)):r.texImage2D(t,n,l,u,d,0,l,c,a||null)}function P(e,t,n,i,a){var s=e.element,l=e.data,c=e.internalformat,u=e.format,d=e.type,f=e.width,h=e.height;A(e),s?r.texSubImage2D(t,a,n,i,u,d,s):e.compressed?r.compressedTexSubImage2D(t,a,n,i,c,f,h,l):e.needsCopy?(o(),r.copyTexSubImage2D(t,a,n,i,e.xOffset,e.yOffset,f,h)):r.texSubImage2D(t,a,n,i,f,h,u,d,l)}var R=[];function L(){return R.pop()||new E}function j(e){e.needsFree&&ze.freeType(e.data),E.call(e),R.push(e)}function D(){T.call(this),this.genMipmaps=!1,this.mipmapHint=un,this.mipmask=0,this.images=Array(16)}function z(e,t,r){var n=e.images[0]=L();e.mipmask=1,n.width=e.width=t,n.height=e.height=r,n.channels=e.channels=4}function N(e,t){var r=null;if(Un(t))M(r=e.images[0]=L(),e),I(r,t),e.mipmask=1;else if(C(e,t),Array.isArray(t.mipmap))for(var n=t.mipmap,i=0;i>=i,r.height>>=i,I(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;re.parameter(n,d),e.magFilter=d[n]}var o=e.wrapS,a=e.wrapT;if("wrap"in t){var s=t.wrap;"string"===typeof s?(re.parameter(s,u),o=a=u[s]):Array.isArray(s)&&(re.parameter(s[0],u),re.parameter(s[1],u),o=u[s[0]],a=u[s[1]])}else{if("wrapS"in t){var l=t.wrapS;re.parameter(l,u),o=u[l]}if("wrapT"in t){var h=t.wrapT;re.parameter(h,u),a=u[h]}}if(e.wrapS=o,e.wrapT=a,"anisotropic"in t){var p=t.anisotropic;re("number"===typeof p&&p>=1&&p<=i.maxAnisotropic,"aniso samples must be between 1 and "),e.anisotropic=t.anisotropic}if("mipmap"in t){var m=!1;switch(typeof t.mipmap){case"string":re.parameter(t.mipmap,c,"invalid mipmap hint"),e.mipmapHint=c[t.mipmap],e.genMipmaps=!0,m=!0;break;case"boolean":m=e.genMipmaps=t.mipmap;break;case"object":re(Array.isArray(t.mipmap),"invalid mipmap type"),e.genMipmaps=!1,m=!0;break;default:re.raise("invalid mipmap type")}m&&!("min"in t)&&(e.minFilter=on)}}function W(e,t){r.texParameteri(t,tn,e.minFilter),r.texParameteri(t,en,e.magFilter),r.texParameteri(t,Xr,e.wrapS),r.texParameteri(t,Kr,e.wrapT),n.ext_texture_filter_anisotropic&&r.texParameteri(t,hn,e.anisotropic),e.genMipmaps&&(r.hint(cn,e.mipmapHint),r.generateMipmap(t))}var G=0,q={},Y=i.maxTextureUnits,X=Array(Y).map((function(){return null}));function K(e){T.call(this),this.mipmask=0,this.internalformat=gr,this.id=G++,this.refCount=1,this.target=e,this.texture=r.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new V,l.profile&&(this.stats={size:0})}function $(e){r.activeTexture(xn),r.bindTexture(e.target,e.texture)}function J(){var e=X[0];e?r.bindTexture(e.target,e.texture):r.bindTexture(hr,null)}function Q(e){var t=e.texture;re(t,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(r.activeTexture(xn+n),r.bindTexture(i,null),X[n]=null),r.deleteTexture(t),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete q[e.id],s.textureCount--}function ee(e,t){var n=new K(hr);function o(e,t){var r=n.texInfo;V.call(r);var a=Z();return"number"===typeof e?z(a,0|e,"number"===typeof t?0|t:0|e):e?(re.type(e,"object","invalid arguments to regl.texture"),H(r,e),N(a,e)):z(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),n.mipmask=a.mipmask,M(n,a),re.texture2D(r,a,i),n.internalformat=a.internalformat,o.width=a.width,o.height=a.height,$(n),F(a,hr),W(r,hr),J(),U(a),l.profile&&(n.stats.size=Yn(n.internalformat,n.type,a.width,a.height,r.genMipmaps,!1)),o.format=x[n.internalformat],o.type=b[n.type],o.mag=w[r.magFilter],o.min=_[r.minFilter],o.wrapS=k[r.wrapS],o.wrapT=k[r.wrapT],o}function a(e,t,r,i){re(!!e,"must specify image data");var a=0|t,s=0|r,l=0|i,c=L();return M(c,n),c.width=0,c.height=0,I(c,e),c.width=c.width||(n.width>>l)-a,c.height=c.height||(n.height>>l)-s,re(n.type===c.type&&n.format===c.format&&n.internalformat===c.internalformat,"incompatible format for texture.subimage"),re(a>=0&&s>=0&&a+c.width<=n.width&&s+c.height<=n.height,"texture.subimage write out of bounds"),re(n.mipmask&1<>s;++s){var c=i>>s,u=a>>s;if(!c||!u)break;r.texImage2D(hr,s,n.format,c,u,0,n.format,n.type,null)}return J(),l.profile&&(n.stats.size=Yn(n.internalformat,n.type,i,a,!1,!1)),o}return q[n.id]=n,s.textureCount++,o(e,t),o.subimage=a,o.resize=c,o._reglType="texture2d",o._texture=n,l.profile&&(o.stats=n.stats),o.destroy=function(){n.decRef()},o}function te(e,t,n,o,a,c){var u=new K(pr);q[u.id]=u,s.cubeCount++;var d=new Array(6);function f(e,t,r,n,o,a){var s,c=u.texInfo;for(V.call(c),s=0;s<6;++s)d[s]=Z();if("number"!==typeof e&&e)if("object"===typeof e)if(t)N(d[0],e),N(d[1],t),N(d[2],r),N(d[3],n),N(d[4],o),N(d[5],a);else if(H(c,e),C(u,e),"faces"in e){var h=e.faces;for(re(Array.isArray(h)&&6===h.length,"cube faces must be a length 6 array"),s=0;s<6;++s)re("object"===typeof h[s]&&!!h[s],"invalid input for cube map face"),M(d[s],u),N(d[s],h[s])}else for(s=0;s<6;++s)N(d[s],e);else re.raise("invalid arguments to cube map");else{var p=0|e||1;for(s=0;s<6;++s)z(d[s],p,p)}for(M(u,d[0]),re.optional((function(){i.npotTextureCube||re(dr(u.width)&&dr(u.height),"your browser does not support non power or two texture dimensions")})),c.genMipmaps?u.mipmask=(d[0].width<<1)-1:u.mipmask=d[0].mipmask,re.textureCube(u,c,d,i),u.internalformat=d[0].internalformat,f.width=d[0].width,f.height=d[0].height,$(u),s=0;s<6;++s)F(d[s],mr+s);for(W(c,pr),J(),l.profile&&(u.stats.size=Yn(u.internalformat,u.type,f.width,f.height,c.genMipmaps,!0)),f.format=x[u.internalformat],f.type=b[u.type],f.mag=w[c.magFilter],f.min=_[c.minFilter],f.wrapS=k[c.wrapS],f.wrapT=k[c.wrapT],s=0;s<6;++s)U(d[s]);return f}function h(e,t,r,n,i){re(!!t,"must specify image data"),re("number"===typeof e&&e===(0|e)&&e>=0&&e<6,"invalid face");var o=0|r,a=0|n,s=0|i,l=L();return M(l,u),l.width=0,l.height=0,I(l,t),l.width=l.width||(u.width>>s)-o,l.height=l.height||(u.height>>s)-a,re(u.type===l.type&&u.format===l.format&&u.internalformat===l.internalformat,"incompatible format for texture.subimage"),re(o>=0&&a>=0&&o+l.width<=u.width&&a+l.height<=u.height,"texture.subimage write out of bounds"),re(u.mipmask&1<>i;++i)r.texImage2D(mr+n,i,u.format,t>>i,t>>i,0,u.format,u.type,null);return J(),l.profile&&(u.stats.size=Yn(u.internalformat,u.type,f.width,f.height,!1,!0)),f}}return f(e,t,n,o,a,c),f.subimage=h,f.resize=p,f._reglType="textureCube",f._texture=u,l.profile&&(f.stats=u.stats),f.destroy=function(){u.decRef()},f}function ne(){for(var e=0;e>t,e.height>>t,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)r.texImage2D(mr+n,t,e.internalformat,e.width>>t,e.height>>t,0,e.internalformat,e.type,null);W(e.texInfo,e.target)}))}function oe(){for(var e=0;e0)continue;i.unit=-1}X[n]=e,t=n;break}t>=Y&&re.raise("insufficient number of texture units"),l.profile&&s.maxTextureUnits=2,"invalid renderbuffer shape"),s=0|h[0],l=0|h[1]}else"radius"in f&&(s=l=0|f.radius),"width"in f&&(s=0|f.width),"height"in f&&(l=0|f.height);"format"in f&&(re.parameter(f.format,o,"invalid renderbuffer format"),c=o[f.format])}else"number"===typeof t?(s=0|t,l="number"===typeof n?0|n:s):t?re.raise("invalid arguments to renderbuffer constructor"):s=l=1;if(re(s>0&&l>0&&s<=r.maxRenderbufferSize&&l<=r.maxRenderbufferSize,"invalid renderbuffer size"),s!==u.width||l!==u.height||c!==u.format)return d.width=u.width=s,d.height=u.height=l,u.format=c,e.bindRenderbuffer(Kn,u.renderbuffer),e.renderbufferStorage(Kn,c,s,l),re(0===e.getError(),"invalid render buffer format"),i.profile&&(u.stats.size=li(u.format,u.width,u.height)),d.format=a[u.format],d}function f(t,n){var o=0|t,a=0|n||o;return o===u.width&&a===u.height||(re(o>0&&a>0&&o<=r.maxRenderbufferSize&&a<=r.maxRenderbufferSize,"invalid renderbuffer size"),d.width=u.width=o,d.height=u.height=a,e.bindRenderbuffer(Kn,u.renderbuffer),e.renderbufferStorage(Kn,u.format,o,a),re(0===e.getError(),"invalid render buffer format"),i.profile&&(u.stats.size=li(u.format,u.width,u.height))),d}return l[u.id]=u,n.renderbufferCount++,d(t,s),d.resize=f,d._reglType="renderbuffer",d._renderbuffer=u,i.profile&&(d.stats=u.stats),d.destroy=function(){u.decRef()},d}function f(){St(l).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(Kn,t.renderbuffer),e.renderbufferStorage(Kn,t.format,t.width,t.height)})),e.bindRenderbuffer(Kn,null)}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach((function(t){e+=l[t].stats.size})),e}),{create:d,clear:function(){St(l).forEach(u)},restore:f}},ui=36160,di=36161,fi=3553,hi=34069,pi=36064,mi=36096,gi=36128,vi=33306,yi=36053,xi=36054,bi=36055,wi=36057,_i=36061,ki=36193,Si=5121,Ti=5126,Mi=6407,Ci=6408,Ai=6402,Ei=[Mi,Ci],Ii=[];Ii[Ci]=4,Ii[Mi]=3;var Oi=[];Oi[Si]=1,Oi[Ti]=4,Oi[ki]=2;var Pi=33189,Ri=36168,Li=34041,ji=[32854,32855,36194,35907,34842,34843,34836],Di={};function zi(e,r,n,i,o,a){var s={cur:null,next:null,dirty:!1,setFBO:null},l=["rgba"],c=["rgba4","rgb565","rgb5 a1"];r.ext_srgb&&c.push("srgba"),r.ext_color_buffer_half_float&&c.push("rgba16f","rgb16f"),r.webgl_color_buffer_float&&c.push("rgba32f");var u=["uint8"];function d(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=0,i=0;t?(n=t.width,i=t.height):r&&(n=r.width,i=r.height),this.width=n,this.height=i}function f(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function h(e,t,r){if(e)if(e.texture){var n=e.texture._texture,i=Math.max(1,n.width),o=Math.max(1,n.height);re(i===t&&o===r,"inconsistent width/height for supplied texture"),n.refCount+=1}else{var a=e.renderbuffer._renderbuffer;re(a.width===t&&a.height===r,"inconsistent width/height for renderbuffer"),a.refCount+=1}}function p(t,r){r&&(r.texture?e.framebufferTexture2D(ui,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(ui,t,di,r.renderbuffer._renderbuffer.renderbuffer))}function m(e){var t=fi,r=null,n=null,i=e;"object"===typeof e&&(i=e.data,"target"in e&&(t=0|e.target)),re.type(i,"function","invalid attachment data");var o=i._reglType;return"texture2d"===o?(r=i,re(t===fi)):"textureCube"===o?(r=i,re(t>=hi&&t=2,"invalid shape for framebuffer"),a=O[0],f=O[1]}else"radius"in I&&(a=f=I.radius),"width"in I&&(a=I.width),"height"in I&&(f=I.height);("color"in I||"colors"in I)&&(x=I.color||I.colors,Array.isArray(x)&&re(1===x.length||r.webgl_draw_buffers,"multiple render targets not supported")),x||("colorCount"in I&&(T=0|I.colorCount,re(T>0,"invalid color buffer count")),"colorTexture"in I&&(b=!!I.colorTexture,w="rgba4"),"colorType"in I&&(k=I.colorType,b?(re(r.oes_texture_float||!("float"===k||"float32"===k),"you must enable OES_texture_float in order to use floating point framebuffer objects"),re(r.oes_texture_half_float||!("half float"===k||"float16"===k),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===k||"float16"===k?(re(r.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),w="rgba16f"):"float"!==k&&"float32"!==k||(re(r.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),w="rgba32f"),re.oneOf(k,u,"invalid color type")),"colorFormat"in I&&(w=I.colorFormat,l.indexOf(w)>=0?b=!0:c.indexOf(w)>=0?b=!1:re.optional((function(){b?re.oneOf(I.colorFormat,l,"invalid color format for texture"):re.oneOf(I.colorFormat,c,"invalid color format for renderbuffer")})))),("depthTexture"in I||"depthStencilTexture"in I)&&(E=!(!I.depthTexture&&!I.depthStencilTexture),re(!E||r.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in I&&("boolean"===typeof I.depth?p=I.depth:(M=I.depth,y=!1)),"stencil"in I&&("boolean"===typeof I.stencil?y=I.stencil:(C=I.stencil,p=!1)),"depthStencil"in I&&("boolean"===typeof I.depthStencil?p=y=I.depthStencil:(A=I.depthStencil,p=!1,y=!1))}else a=f=1;var P=null,R=null,L=null,j=null;if(Array.isArray(x))P=x.map(m);else if(x)P=[m(x)];else for(P=new Array(T),i=0;i=0||P[i].renderbuffer&&ji.indexOf(P[i].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+i+" is invalid"),P[i]&&P[i].texture){var z=Ii[P[i].texture._texture.format]*Oi[P[i].texture._texture.type];null===D?D=z:re(D===z,"all color attachments much have the same number of bits per pixel.")}return h(R,a,f),re(!R||R.texture&&R.texture._texture.format===Ai||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Pi,"invalid depth attachment for framebuffer object"),h(L,a,f),re(!L||L.renderbuffer&&L.renderbuffer._renderbuffer.format===Ri,"invalid stencil attachment for framebuffer object"),h(j,a,f),re(!j||j.texture&&j.texture._texture.format===Li||j.renderbuffer&&j.renderbuffer._renderbuffer.format===Li,"invalid depth-stencil attachment for framebuffer object"),_(o),o.width=a,o.height=f,o.colorAttachments=P,o.depthAttachment=R,o.stencilAttachment=L,o.depthStencilAttachment=j,d.color=P.map(v),d.depth=v(R),d.stencil=v(L),d.depthStencil=v(j),d.width=o.width,d.height=o.height,S(o),d}function f(e,t){re(s.next!==o,"can not resize a framebuffer which is currently in use");var r=Math.max(0|e,1),n=Math.max(0|t||r,1);if(r===o.width&&n===o.height)return d;for(var i=o.colorAttachments,a=0;a=2,"invalid shape for framebuffer"),re(y[0]===y[1],"cube framebuffer must be square"),f=y[0]}else"radius"in v&&(f=0|v.radius),"width"in v?(f=0|v.width,"height"in v&&re(v.height===f,"must be square")):"height"in v&&(f=0|v.height);("color"in v||"colors"in v)&&(h=v.color||v.colors,Array.isArray(h)&&re(1===h.length||r.webgl_draw_buffers,"multiple render targets not supported")),h||("colorCount"in v&&(g=0|v.colorCount,re(g>0,"invalid color buffer count")),"colorType"in v&&(re.oneOf(v.colorType,u,"invalid color type"),m=v.colorType),"colorFormat"in v&&(p=v.colorFormat,re.oneOf(v.colorFormat,l,"invalid color format for texture"))),"depth"in v&&(d.depth=v.depth),"stencil"in v&&(d.stencil=v.stencil),"depthStencil"in v&&(d.depthStencil=v.depthStencil)}else f=1;if(h)if(Array.isArray(h))for(c=[],n=0;n0&&(d.depth=o[0].depth,d.stencil=o[0].stencil,d.depthStencil=o[0].depthStencil),o[n]?o[n](d):o[n]=T(d)}return t(a,{width:f,height:f,color:c})}function c(e){var t,r=0|e;if(re(r>0&&r<=n.maxCubeMapSize,"invalid radius for cube fbo"),r===a.width)return a;var i=a.color;for(t=0;t{for(var e=Object.keys(t),r=0;r=0,'invalid option for vao: "'+e[r]+'" valid options are '+Zi)})),re(Array.isArray(i),"attributes must be an array")}re(i.length0,"must specify at least one attribute");var u={},d=n.attributes;d.length=i.length;for(var f=0;f=g.byteLength?h.subdata(g):(h.destroy(),n.buffers[f]=null)),n.buffers[f]||(h=n.buffers[f]=o.create(p,Fi,!1,!0)),m.buffer=o.getBuffer(h),m.size=0|m.buffer.dimension,m.normalized=!1,m.type=m.buffer.dtype,m.offset=0,m.stride=0,m.divisor=0,m.state=1,u[f]=1):o.getBuffer(p)?(m.buffer=o.getBuffer(p),m.size=0|m.buffer.dimension,m.normalized=!1,m.type=m.buffer.dtype,m.offset=0,m.stride=0,m.divisor=0,m.state=1):o.getBuffer(p.buffer)?(m.buffer=o.getBuffer(p.buffer),m.size=0|(+p.size||m.buffer.dimension),m.normalized=!!p.normalized||!1,"type"in p?(re.parameter(p.type,Rt,"invalid buffer type"),m.type=Rt[p.type]):m.type=m.buffer.dtype,m.offset=0|(p.offset||0),m.stride=0|(p.stride||0),m.divisor=0|(p.divisor||0),m.state=1,re(m.size>=1&&m.size<=4,"size must be between 1 and 4"),re(m.offset>=0,"invalid offset"),re(m.stride>=0&&m.stride<=255,"stride must be between 0 and 255"),re(m.divisor>=0,"divisor must be positive"),re(!m.divisor||!!r.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in p?(re(f>0,"first attribute must not be a constant"),m.x=+p.x||0,m.y=+p.y||0,m.z=+p.z||0,m.w=+p.w||0,m.state=2):re(!1,"invalid attribute spec for location "+f)}for(var v=0;v1)for(var v=0;v1&&(x=x.replace("[0]","")),l(g,new s(x,r.id(x),e.getUniformLocation(h,x),u))}var b=e.getProgramParameter(h,qi);i.profile&&(t.stats.attributesCount=b);var w=t.attributes;for(a=0;ae&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return d.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);St(o).forEach(t),o={},St(a).forEach(t),a={},d.forEach((function(t){e.deleteProgram(t.program)})),d.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){re.command(r>=0,"missing vertex shader",s),re.command(i>=0,"missing fragment shader",s);var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new h(i,r);return n.shaderCount++,p(m,s,l),f||(c[r]=m),d.push(m),t(m,{destroy:function(){if(m.refCount--,m.refCount<=0){e.deleteProgram(m.program);var t=d.indexOf(m);d.splice(t,1),n.shaderCount--}c[m.vertId].refCount<=0&&(e.deleteShader(a[m.vertId]),delete a[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(e.deleteShader(o[m.fragId]),delete o[m.fragId],delete u[m.fragId])}})},restore:m,shader:c,frag:-1,vert:-1}}var Xi=6408,Ki=5121,$i=3333,Ji=5126;function Qi(t,r,n,i,o,a,s){function l(l){var c;null===r.next?(re(o.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),c=Ki):(re(null!==r.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),c=r.next.colorAttachments[0].texture._texture.type,re.optional((function(){a.oes_texture_float?(re(c===Ki||c===Ji,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),c===Ji&&re(s.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):re(c===Ki,"Reading from a framebuffer is only allowed for the type 'uint8'")})));var u=0,d=0,f=i.framebufferWidth,h=i.framebufferHeight,p=null;e(l)?p=l:l&&(re.type(l,"object","invalid arguments to regl.read()"),u=0|l.x,d=0|l.y,re(u>=0&&u=0&&d0&&f+u<=i.framebufferWidth,"invalid width for read pixels"),re(h>0&&h+d<=i.framebufferHeight,"invalid height for read pixels"),n();var m=f*h*4;return p||(c===Ki?p=new Uint8Array(m):c===Ji&&(p=p||new Float32Array(m))),re.isTypedArray(p,"data buffer for regl.read() must be a typedarray"),re(p.byteLength>=m,"data buffer for regl.read() too small"),t.pixelStorei($i,4),t.readPixels(u,d,f,h,Xi,c,p),p}function c(e){var t;return r.setFBO({framebuffer:e.framebuffer},(function(){t=l(e)})),t}function u(e){return e&&"framebuffer"in e?c(e):l(e)}return u}function eo(e){return Array.prototype.slice.call(e)}function to(e){return eo(e).join("")}function ro(){var e=0,r=[],n=[];function i(t){for(var i=0;i0&&(r.push(t,"="),r.push.apply(r,eo(arguments)),r.push(";")),t}return t(n,{def:o,toString:function(){return to([i.length>0?"var "+i.join(",")+";":"",to(r)])}})}function a(){var e=o(),r=o(),n=e.toString,i=r.toString;function a(t,n){r(t,n,"=",e.def(t,n),";")}return t((function(){e.apply(e,eo(arguments))}),{def:e.def,entry:e,exit:r,save:a,set:function(t,r,n){a(t,r),e(t,r,"=",n,";")},toString:function(){return n()+i()}})}function s(){var e=to(arguments),r=a(),n=a(),i=r.toString,o=n.toString;return t(r,{then:function(){return r.apply(r,eo(arguments)),this},else:function(){return n.apply(n,eo(arguments)),this},toString:function(){var t=o();return t&&(t="else{"+t+"}"),to(["if(",e,"){",i(),"}",t])}})}var l=o(),c={};function u(e,r){var n=[];function i(){var e="a"+n.length;return n.push(e),e}r=r||0;for(var o=0;o":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},rs={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ns={frag:35632,vert:35633},is={cw:Za,ccw:Ua};function os(t){return Array.isArray(t)||e(t)||kt(t)}function as(e){return e.sort((function(e,t){return e===Zo?-1:t===Zo?1:e=1,n>=2,t)}if(r===fo){var i=e.data;return new ss(i.thisDep,i.contextDep,i.propDep,t)}if(r===ho)return new ss(!1,!1,!1,t);if(r===po){for(var o=!1,a=!1,s=!1,l=0;l=1&&(a=!0),u>=2&&(s=!0)}else c.type===fo&&(o=o||c.data.thisDep,a=a||c.data.contextDep,s=s||c.data.propDep)}return new ss(o,a,s,t)}return new ss(r===uo,r===co,r===lo,t)}var ds=new ss(!1,!1,!1,(function(){}));function fs(e,r,n,i,o,a,s,l,c,u,d,f,h,p,m){var g=u.Record,v={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(v.min=Va,v.max=Ha);var y=n.angle_instanced_arrays,x=n.webgl_draw_buffers,b=n.oes_vertex_array_object,w={dirty:!0,profile:m.profile},_={},k=[],S={},T={};function M(e){return e.replace(".","_")}function C(e,t,r){var n=M(e);k.push(e),_[n]=w[n]=!!r,S[n]=t}function A(e,t,r){var n=M(e);k.push(e),Array.isArray(r)?(w[n]=r.slice(),_[n]=r.slice()):w[n]=_[n]=r,T[n]=t}C(mo,pa),C(go,ha),A(vo,"blendColor",[0,0,0,0]),A(yo,"blendEquationSeparate",[Xa,Xa]),A(xo,"blendFuncSeparate",[Ya,qa,Ya,qa]),C(bo,ga,!0),A(wo,"depthFunc",Ka),A(_o,"depthRange",[0,1]),A(ko,"depthMask",!0),A(So,So,[!0,!0,!0,!0]),C(To,fa),A(Mo,"cullFace",Ba),A(Co,Co,Ua),A(Ao,Ao,1),C(Eo,ya),A(Io,"polygonOffset",[0,0]),C(Oo,xa),C(Po,ba),A(Ro,"sampleCoverage",[1,!1]),C(Lo,ma),A(jo,"stencilMask",-1),A(Do,"stencilFunc",[Wa,0,-1]),A(zo,"stencilOpSeparate",[Fa,Ga,Ga,Ga]),A(No,"stencilOpSeparate",[Ba,Ga,Ga,Ga]),C(Fo,va),A(Bo,"scissor",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]),A(Zo,Zo,[0,0,e.drawingBufferWidth,e.drawingBufferHeight]);var E={gl:e,context:h,strings:r,next:_,current:w,draw:f,elements:a,buffer:o,shader:d,attributes:u.state,vao:u,uniforms:c,framebuffer:l,extensions:n,timer:p,isBufferArgs:os},I={primTypes:Gt,compareFuncs:ts,blendFuncs:Qa,blendEquations:v,stencilOps:rs,glTypes:Rt,orientationType:is};re.optional((function(){E.isArrayLike=ur})),x&&(I.backBuffer=[Ba],I.drawBuffer=Me(i.maxDrawbuffers,(function(e){return 0===e?[0]:Me(e,(function(e){return Ja+e}))})));var O=0;function P(){var e=ro(),t=e.link,n=e.global;e.id=O++,e.batchId="0";var i=t(E),o=e.shared={props:"a0"};Object.keys(E).forEach((function(e){o[e]=n.def(i,".",e)})),re.optional((function(){e.CHECK=t(re),e.commandStr=re.guessCommand(),e.command=t(e.commandStr),e.assert=function(e,r,n){e("if(!(",r,"))",this.CHECK,".commandRaise(",t(n),",",this.command,");")},I.invalidBlendCombinations=es}));var a=e.next={},s=e.current={};Object.keys(T).forEach((function(e){Array.isArray(w[e])&&(a[e]=n.def(o.next,".",e),s[e]=n.def(o.current,".",e))}));var l=e.constants={};Object.keys(I).forEach((function(e){l[e]=n.def(JSON.stringify(I[e]))})),e.invoke=function(r,n){switch(n.type){case so:var i=["this",o.context,o.props,e.batchId];return r.def(t(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case lo:return r.def(o.props,n.data);case co:return r.def(o.context,n.data);case uo:return r.def("this",n.data);case fo:return n.data.append(e,r),n.data.ref;case ho:return n.data.toString();case po:return n.data.map((function(t){return e.invoke(r,t)}))}},e.attribCache={};var c={};return e.scopeAttrib=function(e){var n=r.id(e);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new g),c[n]=t(i)},e}function R(e){var t,r=e.static,n=e.dynamic;if(Uo in r){var i=!!r[Uo];(t=cs((function(e,t){return i}))).enable=i}else if(Uo in n){var o=n[Uo];t=us(o,(function(e,t){return e.invoke(t,o)}))}return t}function L(e,t){var r=e.static,n=e.dynamic;if(Vo in r){var i=r[Vo];return i?(i=l.getFramebuffer(i),re.command(i,"invalid framebuffer object"),cs((function(e,t){var r=e.link(i),n=e.shared;t.set(n.framebuffer,".next",r);var o=n.context;return t.set(o,"."+ea,r+".width"),t.set(o,"."+ta,r+".height"),r}))):cs((function(e,t){var r=e.shared;t.set(r.framebuffer,".next","null");var n=r.context;return t.set(n,"."+ea,n+"."+oa),t.set(n,"."+ta,n+"."+aa),"null"}))}if(Vo in n){var o=n[Vo];return us(o,(function(e,t){var r=e.invoke(t,o),n=e.shared,i=n.framebuffer,a=t.def(i,".getFramebuffer(",r,")");re.optional((function(){e.assert(t,"!"+r+"||"+a,"invalid framebuffer object")})),t.set(i,".next",a);var s=n.context;return t.set(s,"."+ea,a+"?"+a+".width:"+s+"."+oa),t.set(s,"."+ta,a+"?"+a+".height:"+s+"."+aa),a}))}return null}function j(e,t,r){var n=e.static,i=e.dynamic;function o(e){if(e in n){var o=n[e];re.commandType(o,"object","invalid "+e,r.commandStr);var a,s,l=!0,c=0|o.x,u=0|o.y;return"width"in o?(a=0|o.width,re.command(a>=0,"invalid "+e,r.commandStr)):l=!1,"height"in o?(s=0|o.height,re.command(s>=0,"invalid "+e,r.commandStr)):l=!1,new ss(!l&&t&&t.thisDep,!l&&t&&t.contextDep,!l&&t&&t.propDep,(function(e,t){var r=e.shared.context,n=a;"width"in o||(n=t.def(r,".",ea,"-",c));var i=s;return"height"in o||(i=t.def(r,".",ta,"-",u)),[c,u,n,i]}))}if(e in i){var d=i[e],f=us(d,(function(t,r){var n=t.invoke(r,d);re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)}));var i=t.shared.context,o=r.def(n,".x|0"),a=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",ea,"-",o,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",ta,"-",a,")");return re.optional((function(){t.assert(r,s+">=0&&"+l+">=0","invalid "+e)})),[o,a,s,l]}));return t&&(f.thisDep=f.thisDep||t.thisDep,f.contextDep=f.contextDep||t.contextDep,f.propDep=f.propDep||t.propDep),f}return t?new ss(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".",ea),t.def(r,".",ta)]})):null}var a=o(Zo);if(a){var s=a;a=new ss(a.thisDep,a.contextDep,a.propDep,(function(e,t){var r=s.append(e,t),n=e.shared.context;return t.set(n,"."+ra,r[2]),t.set(n,"."+na,r[3]),r}))}return{viewport:a,scissor_box:o(Bo)}}function D(e,t){var r=e.static;if("string"===typeof r[Wo]&&"string"===typeof r[Ho]){if(Object.keys(t.dynamic).length>0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"===typeof n[i[0]]){for(var o=[],a=0;a=0,"invalid "+e,t.commandStr),cs((function(e,t){return a&&(e.OFFSET=s),s}))}if(e in n){var u=n[e];return us(u,(function(t,r){var n=t.invoke(r,u);return a&&(t.OFFSET=n,re.optional((function(){t.assert(r,n+">=0","invalid "+e)}))),n}))}if(a){if(c)return cs((function(e,t){return e.OFFSET=0,0}));if(o)return new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.offset:0")}))}else if(o)return new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.instances:-1")}));return null}var m=p(Xo,!0);function g(){if(Yo in r){var e=0|r[Yo];return i.count=e,re.command("number"===typeof e&&e>=0,"invalid vertex count",t.commandStr),cs((function(){return e}))}if(Yo in n){var a=n[Yo];return us(a,(function(e,t){var r=e.invoke(t,a);return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">=0&&"+r+"===("+r+"|0)","invalid vertex count")})),r}))}if(c){if(ls(f)){if(f)return m?new ss(m.thisDep,m.contextDep,m.propDep,(function(e,t){var r=t.def(e.ELEMENTS,".vertCount-",e.OFFSET);return re.optional((function(){e.assert(t,r+">=0","invalid vertex offset/element buffer too small")})),r})):cs((function(e,t){return t.def(e.ELEMENTS,".vertCount")}));var s=cs((function(){return-1}));return re.optional((function(){s.MISSING=!0})),s}var u=new ss(f.thisDep||m.thisDep,f.contextDep||m.contextDep,f.propDep||m.propDep,(function(e,t){var r=e.ELEMENTS;return e.OFFSET?t.def(r,"?",r,".vertCount-",e.OFFSET,":-1"):t.def(r,"?",r,".vertCount:-1")}));return re.optional((function(){u.DYNAMIC=!0})),u}if(o){var d=new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao,".currentVAO?",e.shared.vao,".currentVAO.count:-1")}));return d}return null}var v=h(),y=g(),x=p(Ko,!1);return{elements:f,primitive:v,count:y,instances:x,offset:m,vao:l,vaoActive:o,elementsActive:c,static:i}}function F(e,t){var r=e.static,n=e.dynamic,o={};return k.forEach((function(e){var a=M(e);function s(t,i){if(e in r){var s=t(r[e]);o[a]=cs((function(){return s}))}else if(e in n){var l=n[e];o[a]=us(l,(function(e,t){return i(e,t,e.invoke(t,l))}))}}switch(e){case To:case go:case mo:case Lo:case bo:case Fo:case Eo:case Oo:case Po:case ko:return s((function(r){return re.commandType(r,"boolean",e,t.commandStr),r}),(function(t,r,n){return re.optional((function(){t.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+e,t.commandStr)})),n}));case wo:return s((function(r){return re.commandParameter(r,ts,"invalid "+e,t.commandStr),ts[r]}),(function(t,r,n){var i=t.constants.compareFuncs;return re.optional((function(){t.assert(r,n+" in "+i,"invalid "+e+", must be one of "+Object.keys(ts))})),r.def(i,"[",n,"]")}));case _o:return s((function(e){return re.command(ur(e)&&2===e.length&&"number"===typeof e[0]&&"number"===typeof e[1]&&e[0]<=e[1],"depth range is 2d array",t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")})),[t.def("+",r,"[0]"),t.def("+",r,"[1]")]}));case xo:return s((function(e){re.commandType(e,"object","blend.func",t.commandStr);var r="srcRGB"in e?e.srcRGB:e.src,n="srcAlpha"in e?e.srcAlpha:e.src,i="dstRGB"in e?e.dstRGB:e.dst,o="dstAlpha"in e?e.dstAlpha:e.dst;return re.commandParameter(r,Qa,a+".srcRGB",t.commandStr),re.commandParameter(n,Qa,a+".srcAlpha",t.commandStr),re.commandParameter(i,Qa,a+".dstRGB",t.commandStr),re.commandParameter(o,Qa,a+".dstAlpha",t.commandStr),re.command(-1===es.indexOf(r+", "+i),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",t.commandStr),[Qa[r],Qa[i],Qa[n],Qa[o]]}),(function(t,r,n){var i=t.constants.blendFuncs;function o(o,a){var s=r.def('"',o,a,'" in ',n,"?",n,".",o,a,":",n,".",o);return re.optional((function(){t.assert(r,s+" in "+i,"invalid "+e+"."+o+a+", must be one of "+Object.keys(Qa))})),s}re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")}));var a=o("src","RGB"),s=o("dst","RGB");re.optional((function(){var e=t.constants.invalidBlendCombinations;t.assert(r,e+".indexOf("+a+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")}));var l=r.def(i,"[",a,"]"),c=r.def(i,"[",o("src","Alpha"),"]");return[l,r.def(i,"[",s,"]"),c,r.def(i,"[",o("dst","Alpha"),"]")]}));case yo:return s((function(r){return"string"===typeof r?(re.commandParameter(r,v,"invalid "+e,t.commandStr),[v[r],v[r]]):"object"===typeof r?(re.commandParameter(r.rgb,v,e+".rgb",t.commandStr),re.commandParameter(r.alpha,v,e+".alpha",t.commandStr),[v[r.rgb],v[r.alpha]]):void re.commandRaise("invalid blend.equation",t.commandStr)}),(function(t,r,n){var i=t.constants.blendEquations,o=r.def(),a=r.def(),s=t.cond("typeof ",n,'==="string"');return re.optional((function(){function r(e,r,n){t.assert(e,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(v))}r(s.then,e,n),t.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+e),r(s.else,e+".rgb",n+".rgb"),r(s.else,e+".alpha",n+".alpha")})),s.then(o,"=",a,"=",i,"[",n,"];"),s.else(o,"=",i,"[",n,".rgb];",a,"=",i,"[",n,".alpha];"),r(s),[o,a]}));case vo:return s((function(e){return re.command(ur(e)&&4===e.length,"blend.color must be a 4d array",t.commandStr),Me(4,(function(t){return+e[t]}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")})),Me(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case jo:return s((function(e){return re.commandType(e,"number",a,t.commandStr),0|e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"',"invalid stencil.mask")})),t.def(r,"|0")}));case Do:return s((function(r){re.commandType(r,"object",a,t.commandStr);var n=r.cmp||"keep",i=r.ref||0,o="mask"in r?r.mask:-1;return re.commandParameter(n,ts,e+".cmp",t.commandStr),re.commandType(i,"number",e+".ref",t.commandStr),re.commandType(o,"number",e+".mask",t.commandStr),[ts[n],i,o]}),(function(e,t,r){var n=e.constants.compareFuncs;return re.optional((function(){function i(){e.assert(t,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")})),[t.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ga),t.def(r,".ref|0"),t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case zo:case No:return s((function(r){re.commandType(r,"object",a,t.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",o=r.zpass||"keep";return re.commandParameter(n,rs,e+".fail",t.commandStr),re.commandParameter(i,rs,e+".zfail",t.commandStr),re.commandParameter(o,rs,e+".zpass",t.commandStr),[e===No?Ba:Fa,rs[n],rs[i],rs[o]]}),(function(t,r,n){var i=t.constants.stencilOps;function o(o){return re.optional((function(){t.assert(r,'!("'+o+'" in '+n+")||("+n+"."+o+" in "+i+")","invalid "+e+"."+o+", must be one of "+Object.keys(rs))})),r.def('"',o,'" in ',n,"?",i,"[",n,".",o,"]:",Ga)}return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[e===No?Ba:Fa,o("fail"),o("zfail"),o("zpass")]}));case Io:return s((function(e){re.commandType(e,"object",a,t.commandStr);var r=0|e.factor,n=0|e.units;return re.commandType(r,"number",a+".factor",t.commandStr),re.commandType(n,"number",a+".units",t.commandStr),[r,n]}),(function(t,r,n){return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[r.def(n,".factor|0"),r.def(n,".units|0")]}));case Mo:return s((function(e){var r=0;return"front"===e?r=Fa:"back"===e&&(r=Ba),re.command(!!r,a,t.commandStr),r}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="front"||'+r+'==="back"',"invalid cull.face")})),t.def(r,'==="front"?',Fa,":",Ba)}));case Ao:return s((function(e){return re.command("number"===typeof e&&e>=i.lineWidthDims[0]&&e<=i.lineWidthDims[1],"invalid line width, must be a positive number between "+i.lineWidthDims[0]+" and "+i.lineWidthDims[1],t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">="+i.lineWidthDims[0]+"&&"+r+"<="+i.lineWidthDims[1],"invalid line width")})),r}));case Co:return s((function(e){return re.commandParameter(e,is,a,t.commandStr),is[e]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")})),t.def(r+'==="cw"?'+Za+":"+Ua)}));case So:return s((function(e){return re.command(ur(e)&&4===e.length,"color.mask must be length 4 array",t.commandStr),e.map((function(e){return!!e}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")})),Me(4,(function(e){return"!!"+r+"["+e+"]"}))}));case Ro:return s((function(e){re.command("object"===typeof e&&e,a,t.commandStr);var r="value"in e?e.value:1,n=!!e.invert;return re.command("number"===typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",t.commandStr),[r,n]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")})),[t.def('"value" in ',r,"?+",r,".value:1"),t.def("!!",r,".invert")]}))}})),o}function B(e,t){var r=e.static,n=e.dynamic,i={};return Object.keys(r).forEach((function(e){var n,o=r[e];if("number"===typeof o||"boolean"===typeof o)n=cs((function(){return o}));else if("function"===typeof o){var a=o._reglType;"texture2d"===a||"textureCube"===a?n=cs((function(e){return e.link(o)})):"framebuffer"===a||"framebufferCube"===a?(re.command(o.color.length>0,'missing color attachment for framebuffer sent to uniform "'+e+'"',t.commandStr),n=cs((function(e){return e.link(o.color[0])}))):re.commandRaise('invalid data for uniform "'+e+'"',t.commandStr)}else ur(o)?n=cs((function(t){return t.global.def("[",Me(o.length,(function(r){return re.command("number"===typeof o[r]||"boolean"===typeof o[r],"invalid uniform "+e,t.commandStr),o[r]})),"]")})):re.commandRaise('invalid or missing data for uniform "'+e+'"',t.commandStr);n.value=o,i[e]=n})),Object.keys(n).forEach((function(e){var t=n[e];i[e]=us(t,(function(e,r){return e.invoke(r,t)}))})),i}function Z(e,t){var n=e.static,i=e.dynamic,a={};return Object.keys(n).forEach((function(e){var i=n[e],s=r.id(e),l=new g;if(os(i))l.state=oo,l.buffer=o.getBuffer(o.create(i,la,!1,!0)),l.type=0;else{var c=o.getBuffer(i);if(c)l.state=oo,l.buffer=c,l.type=0;else if(re.command("object"===typeof i&&i,"invalid data for attribute "+e,t.commandStr),"constant"in i){var u=i.constant;l.buffer="null",l.state=ao,"number"===typeof u?l.x=u:(re.command(ur(u)&&u.length>0&&u.length<=4,"invalid constant for attribute "+e,t.commandStr),no.forEach((function(e,t){t=0,'invalid offset for attribute "'+e+'"',t.commandStr);var f=0|i.stride;re.command(f>=0&&f<256,'invalid stride for attribute "'+e+'", must be integer betweeen [0, 255]',t.commandStr);var h=0|i.size;re.command(!("size"in i)||h>0&&h<=4,'invalid size for attribute "'+e+'", must be 1,2,3,4',t.commandStr);var p=!!i.normalized,m=0;"type"in i&&(re.commandParameter(i.type,Rt,"invalid type for attribute "+e,t.commandStr),m=Rt[i.type]);var v=0|i.divisor;re.optional((function(){"divisor"in i&&(re.command(0===v||y,'cannot specify divisor for attribute "'+e+'", instancing not supported',t.commandStr),re.command(v>=0,'invalid divisor for attribute "'+e+'"',t.commandStr));var r=t.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(i).forEach((function(t){re.command(n.indexOf(t)>=0,'unknown parameter "'+t+'" for attribute pointer "'+e+'" (valid parameters are '+n+")",r)}))})),l.buffer=c,l.state=oo,l.size=h,l.normalized=p,l.type=m||c.dtype,l.offset=d,l.stride=f,l.divisor=v}}a[e]=cs((function(e,t){var r=e.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach((function(e){n[e]=l[e]})),l.buffer&&(n.buffer=e.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n}))})),Object.keys(i).forEach((function(e){var t=i[e];function r(r,n){var i=r.invoke(n,t),o=r.shared,a=r.constants,s=o.isBufferArgs,l=o.buffer;re.optional((function(){r.assert(n,i+"&&(typeof "+i+'==="object"||typeof '+i+'==="function")&&('+s+"("+i+")||"+l+".getBuffer("+i+")||"+l+".getBuffer("+i+".buffer)||"+s+"("+i+'.buffer)||("constant" in '+i+"&&(typeof "+i+'.constant==="number"||'+o.isArrayLike+"("+i+".constant))))",'invalid dynamic attribute "'+e+'"')}));var c={isStream:n.def(!1)},u=new g;u.state=oo,Object.keys(u).forEach((function(e){c[e]=n.def(""+u[e])}));var d=c.buffer,f=c.type;function h(e){n(c[e],"=",i,".",e,"|0;")}return n("if(",s,"(",i,")){",c.isStream,"=true;",d,"=",l,".createStream(",la,",",i,");",f,"=",d,".dtype;","}else{",d,"=",l,".getBuffer(",i,");","if(",d,"){",f,"=",d,".dtype;",'}else if("constant" in ',i,"){",c.state,"=",ao,";","if(typeof "+i+'.constant === "number"){',c[no[0]],"=",i,".constant;",no.slice(1).map((function(e){return c[e]})).join("="),"=0;","}else{",no.map((function(e,t){return c[e]+"="+i+".constant.length>"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",d,"=",l,".createStream(",la,",",i,".buffer);","}else{",d,"=",l,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",d,".dtype;",c.normalized,"=!!",i,".normalized;"),h("size"),h("offset"),h("stride"),h("divisor"),n("}}"),n.exit("if(",c.isStream,"){",l,".destroyStream(",d,");","}"),c}a[e]=us(t,r)})),a}function U(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=cs((function(e,t){return"number"===typeof r||"boolean"===typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=us(t,(function(e,r){return e.invoke(r,t)}))})),n}function V(e,t,r,i,o){var a=e.static,s=e.dynamic;re.optional((function(){var e=[Vo,Ho,Wo,Go,qo,Xo,Yo,Ko,Uo,$o].concat(k);function t(t){Object.keys(t).forEach((function(t){re.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',o.commandStr)}))}t(a),t(s)}));var l=D(e,t),c=L(e,o),d=j(e,c,o),f=N(e,o),h=F(e,o),p=z(e,o,l);function m(e){var t=d[e];t&&(h[e]=t)}m(Zo),m(M(Bo));var g=Object.keys(h).length>0,v={framebuffer:c,draw:f,shader:p,state:h,dirty:g,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(v.profile=R(e,o),v.uniforms=B(r,o),v.drawVAO=v.scopeVAO=f.vao,!v.drawVAO&&p.program&&!l&&n.angle_instanced_arrays&&f.static.elements){var y=!0,x=p.program.attributes.map((function(e){var r=t.static[e];return y=y&&!!r,r}));if(y&&x.length>0){var b=u.getVAO(u.createVAO({attributes:x,elements:f.static.elements}));v.drawVAO=new ss(null,null,null,(function(e,t){return e.link(b)})),v.useVAO=!0}}return l?v.useVAO=!0:v.attributes=Z(t,o),v.context=U(i,o),v}function H(e,t,r){var n=e.shared.context,i=e.scope();Object.keys(r).forEach((function(o){t.save(n,"."+o);var a=r[o].append(e,t);Array.isArray(a)?i(n,".",o,"=[",a.join(),"];"):i(n,".",o,"=",a,";")})),t(i)}function W(e,t,r,n){var i,o=e.shared,a=o.gl,s=o.framebuffer;x&&(i=t.def(o.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,d=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),n||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",a,".bindFramebuffer(",$a,",",l,".framebuffer);"),x&&t(i,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",a,".bindFramebuffer(",$a,",null);"),x&&t(i,".drawBuffersWEBGL(",d,");"),t("}",s,".cur=",l,";"),n||t("}")}function G(e,t,r){var n=e.shared,i=n.gl,o=e.current,a=e.next,s=n.current,l=n.next,c=e.cond(s,".dirty");k.forEach((function(t){var n,u,d=M(t);if(!(d in r.state))if(d in a){n=a[d],u=o[d];var f=Me(w[d].length,(function(e){return c.def(n,"[",e,"]")}));c(e.cond(f.map((function(e,t){return e+"!=="+u+"["+t+"]"})).join("||")).then(i,".",T[d],"(",f,");",f.map((function(e,t){return u+"["+t+"]="+e})).join(";"),";"))}else{n=c.def(l,".",d);var h=e.cond(n,"!==",s,".",d);c(h),d in S?h(e.cond(n).then(i,".enable(",S[d],");").else(i,".disable(",S[d],");"),s,".",d,"=",n,";"):h(i,".",T[d],"(",n,");",s,".",d,"=",n,";")}})),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function q(e,t,r,n){var i=e.shared,o=e.current,a=i.current,s=i.gl;as(Object.keys(r)).forEach((function(i){var l=r[i];if(!n||n(l)){var c=l.append(e,t);if(S[i]){var u=S[i];ls(l)?t(s,c?".enable(":".disable(",u,");"):t(e.cond(c).then(s,".enable(",u,");").else(s,".disable(",u,");")),t(a,".",i,"=",c,";")}else if(ur(c)){var d=o[i];t(s,".",T[i],"(",c,");",c.map((function(e,t){return d+"["+t+"]="+e})).join(";"),";")}else t(s,".",T[i],"(",c,");",a,".",i,"=",c,";")}}))}function Y(e,t){y&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function X(e,t,r,n,i){var o,a,s,l=e.shared,c=e.stats,u=l.current,d=l.timer,f=r.profile;function h(){return"undefined"===typeof performance?"Date.now()":"performance.now()"}function m(e){e(o=t.def(),"=",h(),";"),"string"===typeof i?e(c,".count+=",i,";"):e(c,".count++;"),p&&(n?e(a=t.def(),"=",d,".getNumPendingQueries();"):e(d,".beginQuery(",c,");"))}function g(e){e(c,".cpuTime+=",h(),"-",o,";"),p&&(n?e(d,".pushScopeStats(",a,",",d,".getNumPendingQueries(),",c,");"):e(d,".endQuery();"))}function v(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(ls(f))return void(f.enable?(m(t),g(t.exit),v("true")):v("false"));v(s=f.append(e,t))}else s=t.def(u,".profile");var y=e.block();m(y),t("if(",s,"){",y,"}");var x=e.block();g(x),t.exit("if(",s,"){",x,"}")}function K(e,t,r,n,i){var o=e.shared;function a(e){switch(e){case _a:case Ma:case Ia:return 2;case ka:case Ca:case Oa:return 3;case Sa:case Aa:case Pa:return 4;default:return 1}}function s(r,n,i){var a=o.gl,s=t.def(r,".location"),l=t.def(o.attributes,"[",s,"]"),c=i.state,u=i.buffer,d=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function h(){t("if(!",l,".buffer){",a,".enableVertexAttribArray(",s,");}");var r,o=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",o,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",a,".bindBuffer(",la,",",u,".buffer);",a,".vertexAttribPointer(",[s,r,o,i.normalized,i.stride,i.offset],");",l,".type=",o,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),y){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",a,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",no.map((function(e,t){return l+"."+e+"!=="+d[t]})).join("||"),"){",a,".vertexAttrib4f(",s,",",d,");",no.map((function(e,t){return l+"."+e+"="+d[t]+";"})).join(""),"}")}c===oo?h():c===ao?p():(t("if(",c,"===",oo,"){"),h(),t("}else{"),p(),t("}"))}n.forEach((function(n){var o,l=n.name,c=r.attributes[l];if(c){if(!i(c))return;o=c.append(e,t)}else{if(!i(ds))return;var u=e.scopeAttrib(l);re.optional((function(){e.assert(t,u+".state","missing attribute "+l)})),o={},Object.keys(new g).forEach((function(e){o[e]=t.def(u,".",e)}))}s(e.link(n),a(n.info.type),o)}))}function $(e,t,n,i,o,a){for(var s,l=e.shared,c=l.gl,u={},d=0;d1){if(!g)continue;var v=h.replace("[0]","");if(u[v])continue;u[v]=1}var y,x=e.link(f)+".location";if(g){if(!o(g))continue;if(ls(g)){var b=g.value;if(re.command(null!==b&&"undefined"!==typeof b,'missing uniform "'+h+'"',e.commandStr),p===Da||p===za){re.command("function"===typeof b&&(p===Da&&("texture2d"===b._reglType||"framebuffer"===b._reglType)||p===za&&("textureCube"===b._reglType||"framebufferCube"===b._reglType)),"invalid texture for uniform "+h,e.commandStr);var w=e.link(b._texture||b.color[0]._texture);t(c,".uniform1i(",x,",",w+".bind());"),t.exit(w,".unbind();")}else if(p===Ra||p===La||p===ja){re.optional((function(){re.command(ur(b),"invalid matrix for uniform "+h,e.commandStr),re.command(p===Ra&&4===b.length||p===La&&9===b.length||p===ja&&16===b.length,"invalid length for matrix uniform "+h,e.commandStr)}));var _=e.global.def("new Float32Array(["+Array.prototype.slice.call(b)+"])"),k=2;p===La?k=3:p===ja&&(k=4),t(c,".uniformMatrix",k,"fv(",x,",false,",_,");")}else{switch(p){case wa:1===m?re.commandType(b,"number","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1f";break;case _a:re.command(ur(b)&&b.length&&b.length%2===0&&b.length<=2*m,"uniform "+h,e.commandStr),s="2f";break;case ka:re.command(ur(b)&&b.length&&b.length%3===0&&b.length<=3*m,"uniform "+h,e.commandStr),s="3f";break;case Sa:re.command(ur(b)&&b.length&&b.length%4===0&&b.length<=4*m,"uniform "+h,e.commandStr),s="4f";break;case Ea:1===m?re.commandType(b,"boolean","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1i";break;case Ta:1===m?re.commandType(b,"number","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1i";break;case Ia:case Ma:re.command(ur(b)&&b.length&&b.length%2===0&&b.length<=2*m,"uniform "+h,e.commandStr),s="2i";break;case Oa:case Ca:re.command(ur(b)&&b.length&&b.length%3===0&&b.length<=3*m,"uniform "+h,e.commandStr),s="3i";break;case Pa:case Aa:re.command(ur(b)&&b.length&&b.length%4===0&&b.length<=4*m,"uniform "+h,e.commandStr),s="4i"}m>1?(s+="v",b=e.global.def("["+Array.prototype.slice.call(b)+"]")):b=ur(b)?Array.prototype.slice.call(b):b,t(c,".uniform",s,"(",x,",",b,");")}continue}y=g.append(e,t)}else{if(!o(ds))continue;y=t.def(l.uniforms,"[",r.id(h),"]")}p===Da?(re(!Array.isArray(y),"must specify a scalar prop for textures"),t("if(",y,"&&",y,'._reglType==="framebuffer"){',y,"=",y,".color[0];","}")):p===za&&(re(!Array.isArray(y),"must specify a scalar prop for cube maps"),t("if(",y,"&&",y,'._reglType==="framebufferCube"){',y,"=",y,".color[0];","}")),re.optional((function(){function r(r,n){e.assert(t,r,'bad data or missing for uniform "'+h+'". '+n)}function n(e,t){1===t&&re(!Array.isArray(y),"must not specify an array type for uniform"),r("Array.isArray("+y+") && typeof "+y+'[0]===" '+e+'" || typeof '+y+'==="'+e+'"',"invalid type, expected "+e)}function i(t,n,i){Array.isArray(y)?re(y.length&&y.length%t===0&&y.length<=t*i,"must have length of "+(1===i?"":"n * ")+t):r(l.isArrayLike+"("+y+")&&"+y+".length && "+y+".length % "+t+" === 0 && "+y+".length<="+t*i,"invalid vector, should have length of "+(1===i?"":"n * ")+t,e.commandStr)}function o(t){re(!Array.isArray(y),"must not specify a value type"),r("typeof "+y+'==="function"&&'+y+'._reglType==="texture'+(t===ua?"2d":"Cube")+'"',"invalid texture type",e.commandStr)}switch(p){case Ta:n("number",m);break;case Ma:i(2,"number",m);break;case Ca:i(3,"number",m);break;case Aa:i(4,"number",m);break;case wa:n("number",m);break;case _a:i(2,"number",m);break;case ka:i(3,"number",m);break;case Sa:i(4,"number",m);break;case Ea:n("boolean",m);break;case Ia:i(2,"boolean",m);break;case Oa:i(3,"boolean",m);break;case Pa:i(4,"boolean",m);break;case Ra:i(4,"number",m);break;case La:i(9,"number",m);break;case ja:i(16,"number",m);break;case Da:o(ua);break;case za:o(da)}}));var S=1;switch(p){case Da:case za:var T=t.def(y,"._texture");t(c,".uniform1i(",x,",",T,".bind());"),t.exit(T,".unbind();");continue;case Ta:case Ea:s="1i";break;case Ma:case Ia:s="2i",S=2;break;case Ca:case Oa:s="3i",S=3;break;case Aa:case Pa:s="4i",S=4;break;case wa:s="1f";break;case _a:s="2f",S=2;break;case ka:s="3f",S=3;break;case Sa:s="4f",S=4;break;case Ra:s="Matrix2fv";break;case La:s="Matrix3fv";break;case ja:s="Matrix4fv"}if(-1===s.indexOf("Matrix")&&m>1&&(s+="v",S=1),"M"===s.charAt(0)){t(c,".uniform",s,"(",x,",");var M=Math.pow(p-Ra+2,2),C=e.global.def("new Float32Array(",M,")");Array.isArray(y)?t("false,(",Me(M,(function(e){return C+"["+e+"]="+y[e]})),",",C,")"):t("false,(Array.isArray(",y,")||",y," instanceof Float32Array)?",y,":(",Me(M,(function(e){return C+"["+e+"]="+y+"["+e+"]"})),",",C,")"),t(");")}else if(S>1){for(var A=[],E=[],I=0;I=0","missing vertex count")}))):(i=l.def(a,".",Yo),re.optional((function(){e.assert(l,i+">=0","missing vertex count")}))),i}var u=l();function d(i){var o=s[i];return o?o.contextDep&&n.contextDynamic||o.propDep?o.append(e,r):o.append(e,t):t.def(a,".",i)}var f,h,p=d(qo),m=d(Xo),g=c();if("number"===typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");y&&(f=d(Ko),h=e.instancing);var v=u+".type",x=s.elements&&ls(s.elements)&&!s.vaoActive;function w(){function e(){r(h,".drawElementsInstancedANGLE(",[p,g,v,m+"<<(("+v+"-"+io+")>>1)",f],");")}function t(){r(h,".drawArraysInstancedANGLE(",[p,m,g,f],");")}u&&"null"!==u?x?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}function _(){function e(){r(o+".drawElements("+[p,g,v,m+"<<(("+v+"-"+io+")>>1)"]+");")}function t(){r(o+".drawArrays("+[p,m,g]+");")}u&&"null"!==u?x?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}y&&("number"!==typeof f||f>=0)?"string"===typeof f?(r("if(",f,">0){"),w(),r("}else if(",f,"<0){"),_(),r("}")):w():_()}function Q(e,t,r,n,i){var o=P(),a=o.proc("body",i);return re.optional((function(){o.commandStr=t.commandStr,o.command=o.link(t.commandStr)})),y&&(o.instancing=a.def(o.shared.extensions,".angle_instanced_arrays")),e(o,a,r,n),o.compile().body}function ee(e,t,r,n){Y(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),K(e,t,r,n.attributes,(function(){return!0}))),$(e,t,r,n.uniforms,(function(){return!0}),!1),J(e,t,t,r)}function te(e,t){var r=e.proc("draw",1);Y(e,r),H(e,r,t.context),W(e,r,t.framebuffer),G(e,r,t),q(e,r,t.state),X(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)ee(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),o=r.def(n,".id"),a=r.def(i,"[",o,"]");r(e.cond(a).then(a,".call(this,a0);").else(a,"=",i,"[",o,"]=",e.link((function(r){return Q(ee,e,t,r,1)})),"(",n,");",a,".call(this,a0);"))}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function ne(e,t,r,n){function i(){return!0}e.batchId="a1",Y(e,t),K(e,t,r,n.attributes,i),$(e,t,r,n.uniforms,i,!1),J(e,t,t,r)}function ie(e,t,r,n){Y(e,t);var i=r.contextDep,o=t.def(),a="a0",s="a1",l=t.def();e.shared.props=l,e.batchId=o;var c=e.scope(),u=e.scope();function d(e){return e.contextDep&&i||e.propDep}function f(e){return!d(e)}if(t(c.entry,"for(",o,"=0;",o,"<",s,";++",o,"){",l,"=",a,"[",o,"];",u,"}",c.exit),r.needsContext&&H(e,u,r.context),r.needsFramebuffer&&W(e,u,r.framebuffer),q(e,u,r.state,d),r.profile&&d(r.profile)&&X(e,u,r,!1,!0),n)r.useVAO?r.drawVAO?d(r.drawVAO)?u(e.shared.vao,".setVAO(",r.drawVAO.append(e,u),");"):c(e.shared.vao,".setVAO(",r.drawVAO.append(e,c),");"):c(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(c(e.shared.vao,".setVAO(null);"),K(e,c,r,n.attributes,f),K(e,u,r,n.attributes,d)),$(e,c,r,n.uniforms,f,!1),$(e,u,r,n.uniforms,d,!0),J(e,c,u,r);else{var h=e.global.def("{}"),p=r.shader.progVar.append(e,u),m=u.def(p,".id"),g=u.def(h,"[",m,"]");u(e.shared.gl,".useProgram(",p,".program);","if(!",g,"){",g,"=",h,"[",m,"]=",e.link((function(t){return Q(ne,e,r,t,2)})),"(",p,");}",g,".call(this,a0[",o,"],",o,");")}}function oe(e,t){var r=e.proc("batch",2);e.batchId="0",Y(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(H(e,r,t.context),i=!1);var o=t.framebuffer,a=!1;function s(e){return e.contextDep&&n||e.propDep}o?(o.propDep?n=a=!0:o.contextDep&&n&&(a=!0),a||W(e,r,o)):W(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),G(e,r,t),q(e,r,t.state,(function(e){return!s(e)})),t.profile&&s(t.profile)||X(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=a;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)ie(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)ie(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),d=r.def(c,".id"),f=r.def(u,"[",d,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",d,"]=",e.link((function(r){return Q(ie,e,t,r,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function ae(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,o=i.current;function a(r){var o=t.shader[r];o&&n.set(i.shader,"."+r,o.append(e,n))}H(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),as(Object.keys(t.state)).forEach((function(r){var o=t.state[r].append(e,n);ur(o)?o.forEach((function(t,i){n.set(e.next[r],"["+i+"]",t)})):n.set(i.next,"."+r,o)})),X(e,n,t,!0,!0),[Go,Xo,Yo,Ko,qo].forEach((function(r){var o=t.draw[r];o&&n.set(i.draw,"."+r,""+o.append(e,n))})),Object.keys(t.uniforms).forEach((function(o){var a=t.uniforms[o].append(e,n);Array.isArray(a)&&(a="["+a.join()+"]"),n.set(i.uniforms,"["+r.id(o)+"]",a)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),o=e.scopeAttrib(r);Object.keys(new g).forEach((function(e){n.set(o,"."+e,i[e])}))})),t.scopeVAO&&n.set(i.vao,".targetVAO",t.scopeVAO.append(e,n)),a(Ho),a(Wo),Object.keys(t.state).length>0&&(n(o,".dirty=true;"),n.exit(o,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}function se(e){if("object"===typeof e&&!ur(e)){for(var t=Object.keys(e),r=0;r=0;--e){var t=I[e];t&&t(p,null,0)}n.flush(),u&&u.update()}function D(){!L&&I.length>0&&(L=me.next(j))}function z(){L&&(me.cancel(j),L=null)}function N(e){e.preventDefault(),o=!0,z(),O.forEach((function(e){e()}))}function F(e){n.getError(),o=!1,a.restore(),_.restore(),y.restore(),k.restore(),S.restore(),T.restore(),b.restore(),u&&u.restore(),M.procs.refresh(),D(),P.forEach((function(e){e()}))}function B(){I.length=0,z(),E&&(E.removeEventListener(_s,N),E.removeEventListener(ks,F)),_.clear(),T.clear(),S.clear(),b.clear(),k.clear(),x.clear(),y.clear(),u&&u.clear(),R.forEach((function(e){e()}))}function Z(e){function r(e){var r=t({},e);function n(e){if(e in r){var t=r[e];delete r[e],Object.keys(t).forEach((function(n){r[e+"."+n]=t[n]}))}}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),n("blend"),n("depth"),n("cull"),n("stencil"),n("polygonOffset"),n("scissor"),n("sample"),"vao"in e&&(r.vao=e.vao),r}function n(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var o=e[i];if(pe.isDynamic(o))n[i]=pe.unbox(o,i);else{if(t&&Array.isArray(o))for(var a=0;a0)return f.call(this,m(0|e),0|e)}else{if(!Array.isArray(e))return d.call(this,e);if(e.length)return f.call(this,e,e.length)}}return t(g,{stats:c,destroy:function(){u.destroy()}})}E&&(E.addEventListener(_s,N,!1),E.addEventListener(ks,F,!1));var U=T.setFBO=Z({framebuffer:pe.define.call(null,Ss,"framebuffer")});function V(e,t){var r=0;M.procs.poll();var i=t.color;i&&(n.clearColor(+i[0]||0,+i[1]||0,+i[2]||0,+i[3]||0),r|=ys),"depth"in t&&(n.clearDepth(+t.depth),r|=xs),"stencil"in t&&(n.clearStencil(0|t.stencil),r|=bs),re(!!r,"called regl.clear with no buffer specified"),n.clear(r)}function H(e){if(re("object"===typeof e&&e,"regl.clear() takes an object as input"),"framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var r=0;r<6;++r)U(t({framebuffer:e.framebuffer.faces[r]},e),V);else U(e,V);else V(null,e)}function W(e){function t(){var t=Cs(I,e);function r(){var e=Cs(I,r);I[e]=I[I.length-1],I.length-=1,I.length<=0&&z()}re(t>=0,"cannot cancel a frame twice"),I[t]=r}return re.type(e,"function","regl.frame() callback must be a function"),I.push(e),D(),{cancel:t}}function G(){var e=A.viewport,t=A.scissor_box;e[0]=e[1]=t[0]=t[1]=0,p.viewportWidth=p.framebufferWidth=p.drawingBufferWidth=e[2]=t[2]=n.drawingBufferWidth,p.viewportHeight=p.framebufferHeight=p.drawingBufferHeight=e[3]=t[3]=n.drawingBufferHeight}function q(){p.tick+=1,p.time=X(),G(),M.procs.poll()}function Y(){k.refresh(),G(),M.procs.refresh(),u&&u.update()}function X(){return(ge()-d)/1e3}function K(e,t){var r;switch(re.type(t,"function","listener callback must be a function"),e){case"frame":return W(t);case"lost":r=O;break;case"restore":r=P;break;case"destroy":r=R;break;default:re.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(t),{cancel:function(){for(var e=0;e=0},read:C,destroy:B,_gl:n,_refresh:Y,poll:function(){q(),u&&u.update()},now:X,stats:l});return r.onDone(null,$),$}return As}()},93940:(e,t,r)=>{"use strict";var n=r(49147);function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*r.g.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*r.g.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function o(e){return"function"===typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}e.exports=function(e){var t;if(e?"string"===typeof e&&(e={container:e}):e={},o(e)?e={container:e}:e="string"===typeof(t=e).nodeName&&"function"===typeof t.appendChild&&"function"===typeof t.getBoundingClientRect?{container:e}:function(e){return"function"===typeof e.drawArrays||"function"===typeof e.drawElements}(e)?{gl:e}:n(e,{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),e.pixelRatio||(e.pixelRatio=r.g.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"===typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}o(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(r){try{e.gl=e.canvas.getContext(r,e.attrs)}catch(t){}return e.gl})),e.gl}},26234:e=>{e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(28476)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}e.exports=n},62206:(e,t,r)=>{"use strict";var n,i=r(88730);n="function"===typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,e.exports=n},32954:(e,t,r)=>{"use strict";var n=r(88730);e.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}()},82926:(e,t,r)=>{"use strict";var n=r(28476)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},87593:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},95520:(e,t,r)=>{"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(80541);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},80541:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},48857:(e,t,r)=>{"use strict";var n=r(80541);e.exports=function(){return n()&&!!Symbol.toStringTag}},26834:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(1199);e.exports=o.call(n,i)},67861:(e,t,r)=>{"use strict";var n=r(89456),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=h(r);i&&i!==p&&e(t,i,n)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=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 w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},89456:(e,t,r)=>{"use strict";e.exports=r(20229)},60545:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},80273:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},95021:(e,t,r)=>{"use strict";var n=r(48857)(),i=r(44680)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},a=function(e){return!!o(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},88730:e=>{e.exports=!0},8866:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(h){h!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=n.call(e);return o.test(t)}catch(r){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"===typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),d=function(){return!1};if("object"===typeof document){var f=document.all;l.call(f)===l.call(document.all)&&(d=function(e){if((u||!e)&&("undefined"===typeof e||"object"===typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(r){}return!1})}e.exports=i?function(e){if(d(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;try{i(e,null,t)}catch(n){if(n!==r)return!1}return!a(e)&&s(e)}:function(e){if(d(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},7469:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(48857)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!==typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!l)return!1;if("undefined"===typeof n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}},94411:e=>{"use strict";e.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},98374:e=>{"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;const t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});let i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;let o=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},11546:e=>{"use strict";e.exports=function(e){return e!==e}},5738:(e,t,r)=>{"use strict";var n=r(59962),i=r(89959),o=r(11546),a=r(39221),s=r(65434),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},39221:(e,t,r)=>{"use strict";var n=r(11546);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},65434:(e,t,r)=>{"use strict";var n=r(89959),i=r(39221);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},57710:e=>{"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},23181:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r;return"[object Object]"===t.call(e)&&(null===(r=Object.getPrototypeOf(e))||r===Object.getPrototypeOf({}))}},20878:e=>{"use strict";e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},93863:e=>{"use strict";e.exports=function(e){return"string"===typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},72105:(e,t,r)=>{"use strict";var n=r(91520);e.exports=function(e){return!!n(e)}},66212:e=>{e.exports=function(e,t,r){return e*(1-r)+t*r}},81725:(e,t,r)=>{var n=r(70781)(r(7289),"DataView");e.exports=n},69748:(e,t,r)=>{var n=r(56545),i=r(69843),o=r(86266),a=r(17364),s=r(74156);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(20329),i=r(39666),o=r(2523),a=r(45105),s=r(73316);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(70781)(r(7289),"Map");e.exports=n},13109:(e,t,r)=>{var n=r(79e3),i=r(37240),o=r(63414),a=r(17140),s=r(85429);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(70781)(r(7289),"Promise");e.exports=n},4199:(e,t,r)=>{var n=r(70781)(r(7289),"Set");e.exports=n},44526:(e,t,r)=>{var n=r(13109),i=r(85845),o=r(35544);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(95745),i=r(23653),o=r(43359),a=r(92571),s=r(31698),l=r(85883);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},68624:(e,t,r)=>{var n=r(7289).Symbol;e.exports=n},6759:(e,t,r)=>{var n=r(7289).Uint8Array;e.exports=n},13289:(e,t,r)=>{var n=r(70781)(r(7289),"WeakMap");e.exports=n},44235:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r{var n=r(94499),i=r(52794),o=r(95585),a=r(70667),s=r(30674),l=r(53153),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),d=!r&&!u&&a(e),f=!r&&!u&&!d&&l(e),h=r||u||d||f,p=h?n(e.length,String):[],m=p.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},95434:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r(46351),i=r(83666),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];o.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},69194:(e,t,r)=>{var n=r(83666);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},93035:(e,t,r)=>{var n=r(67538),i=r(56385);e.exports=function(e,t){return e&&n(t,i(t),e)}},56045:(e,t,r)=>{var n=r(67538),i=r(67086);e.exports=function(e,t){return e&&n(t,i(t),e)}},46351:(e,t,r)=>{var n=r(31438);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},46476:(e,t,r)=>{var n=r(17016),i=r(44235),o=r(87347),a=r(93035),s=r(56045),l=r(28087),c=r(52594),u=r(42497),d=r(14742),f=r(87253),h=r(15508),p=r(68466),m=r(47633),g=r(57355),v=r(16484),y=r(95585),x=r(70667),b=r(15874),w=r(91845),_=r(41859),k=r(56385),S=r(67086),T="[object Arguments]",M="[object Function]",C="[object Object]",A={};A[T]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[C]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[M]=A["[object WeakMap]"]=!1,e.exports=function e(t,r,E,I,O,P){var R,L=1&r,j=2&r,D=4&r;if(E&&(R=O?E(t,I,O,P):E(t)),void 0!==R)return R;if(!w(t))return t;var z=y(t);if(z){if(R=m(t),!L)return c(t,R)}else{var N=p(t),F=N==M||"[object GeneratorFunction]"==N;if(x(t))return l(t,L);if(N==C||N==T||F&&!O){if(R=j||F?{}:v(t),!L)return j?d(t,s(R,t)):u(t,a(R,t))}else{if(!A[N])return O?t:{};R=g(t,N,L)}}P||(P=new n);var B=P.get(t);if(B)return B;P.set(t,R),_(t)?t.forEach((function(n){R.add(e(n,r,E,n,t,P))})):b(t)&&t.forEach((function(n,i){R.set(i,e(n,r,E,i,t,P))}));var Z=z?void 0:(D?j?h:f:j?S:k)(t);return i(Z||t,(function(n,i){Z&&(n=t[i=n]),o(R,i,e(n,r,E,i,t,P))})),R}},98303:(e,t,r)=>{var n=r(91845),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},2785:(e,t,r)=>{var n=r(35705),i=r(36428)(n);e.exports=i},15461:(e,t,r)=>{var n=r(62550)();e.exports=n},35705:(e,t,r)=>{var n=r(15461),i=r(56385);e.exports=function(e,t){return e&&n(e,t,i)}},30207:(e,t,r)=>{var n=r(14534),i=r(60925);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r{var n=r(45349),i=r(95585);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},18665:(e,t,r)=>{var n=r(68624),i=r(23596),o=r(78186),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},21966:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},51276:(e,t,r)=>{var n=r(18665),i=r(89752);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},7081:(e,t,r)=>{var n=r(89110),i=r(89752);e.exports=function e(t,r,o,a,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!==t&&r!==r:n(t,r,o,a,e,s))}},89110:(e,t,r)=>{var n=r(17016),i=r(47983),o=r(89820),a=r(6353),s=r(68466),l=r(95585),c=r(70667),u=r(53153),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,v){var y=l(e),x=l(t),b=y?f:s(e),w=x?f:s(t),_=(b=b==d?h:b)==h,k=(w=w==d?h:w)==h,S=b==w;if(S&&c(e)){if(!c(t))return!1;y=!0,_=!1}if(S&&!_)return v||(v=new n),y||u(e)?i(e,t,r,m,g,v):o(e,t,b,r,m,g,v);if(!(1&r)){var T=_&&p.call(e,"__wrapped__"),M=k&&p.call(t,"__wrapped__");if(T||M){var C=T?e.value():e,A=M?t.value():t;return v||(v=new n),g(C,A,r,m,v)}}return!!S&&(v||(v=new n),a(e,t,r,m,g,v))}},37094:(e,t,r)=>{var n=r(68466),i=r(89752);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},19280:(e,t,r)=>{var n=r(17016),i=r(7081);e.exports=function(e,t,r,o){var a=r.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a{var n=r(50375),i=r(65401),o=r(91845),a=r(92043),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,f=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},18711:(e,t,r)=>{var n=r(68466),i=r(89752);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},77499:(e,t,r)=>{var n=r(18665),i=r(44276),o=r(89752),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},81186:(e,t,r)=>{var n=r(85662),i=r(98768),o=r(19908),a=r(95585),s=r(34445);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):s(e)}},23409:(e,t,r)=>{var n=r(28992),i=r(8723),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},89130:(e,t,r)=>{var n=r(91845),i=r(28992),o=r(3481),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},71839:(e,t,r)=>{var n=r(2785),i=r(2114);e.exports=function(e,t){var r=-1,o=i(e)?Array(e.length):[];return n(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}},85662:(e,t,r)=>{var n=r(19280),i=r(95113),o=r(22093);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},98768:(e,t,r)=>{var n=r(7081),i=r(69706),o=r(89775),a=r(98939),s=r(99253),l=r(22093),c=r(60925);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?o(r,e):n(t,a,3)}}},61125:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},80171:(e,t,r)=>{var n=r(30207);e.exports=function(e){return function(t){return n(t,e)}}},94499:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(68624),i=r(95434),o=r(95585),a=r(72060),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},36902:e=>{e.exports=function(e){return function(t){return e(t)}}},88905:e=>{e.exports=function(e,t){return e.has(t)}},97169:(e,t,r)=>{var n=r(19908);e.exports=function(e){return"function"==typeof e?e:n}},14534:(e,t,r)=>{var n=r(95585),i=r(98939),o=r(3002),a=r(11822);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},72604:(e,t,r)=>{var n=r(6759);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},28087:(e,t,r)=>{e=r.nmd(e);var n=r(7289),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},81893:(e,t,r)=>{var n=r(72604);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},73360:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},47981:(e,t,r)=>{var n=r(68624),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},55888:(e,t,r)=>{var n=r(72604);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},52594:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var n=r(87347),i=r(46351);e.exports=function(e,t,r,o){var a=!r;r||(r={});for(var s=-1,l=t.length;++s{var n=r(67538),i=r(66504);e.exports=function(e,t){return n(e,i(e),t)}},14742:(e,t,r)=>{var n=r(67538),i=r(42757);e.exports=function(e,t){return n(e,i(e),t)}},47683:(e,t,r)=>{var n=r(7289)["__core-js_shared__"];e.exports=n},36428:(e,t,r)=>{var n=r(2114);e.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var o=r.length,a=t?o:-1,s=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}},31438:(e,t,r)=>{var n=r(70781),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},47983:(e,t,r)=>{var n=r(44526),i=r(29330),o=r(88905);e.exports=function(e,t,r,a,s,l){var c=1&r,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++p{var n=r(68624),i=r(6759),o=r(83666),a=r(47983),s=r(258),l=r(73671),c=n?n.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&n;if(h||(h=l),e.size!=t.size&&!p)return!1;var m=f.get(e);if(m)return m==t;n|=2,f.set(e,t);var g=a(h(e),h(t),n,c,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6353:(e,t,r)=>{var n=r(87253),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,a,s){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var f=c[d];if(!(l?f in t:i.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},87253:(e,t,r)=>{var n=r(92606),i=r(66504),o=r(56385);e.exports=function(e){return n(e,o,i)}},15508:(e,t,r)=>{var n=r(92606),i=r(42757),o=r(67086);e.exports=function(e){return n(e,o,i)}},16911:(e,t,r)=>{var n=r(81591);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},95113:(e,t,r)=>{var n=r(99253),i=r(56385);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],a=e[o];t[r]=[o,a,n(a)]}return t}},70781:(e,t,r)=>{var n=r(33186),i=r(80760);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},96116:(e,t,r)=>{var n=r(9698)(Object.getPrototypeOf,Object);e.exports=n},23596:(e,t,r)=>{var n=r(68624),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(l){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},66504:(e,t,r)=>{var n=r(74951),i=r(72554),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},42757:(e,t,r)=>{var n=r(45349),i=r(96116),o=r(66504),a=r(72554),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:a;e.exports=s},68466:(e,t,r)=>{var n=r(81725),i=r(18579),o=r(59946),a=r(4199),s=r(13289),l=r(18665),c=r(92043),u="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",m=c(n),g=c(i),v=c(o),y=c(a),x=c(s),b=l;(n&&b(new n(new ArrayBuffer(1)))!=p||i&&b(new i)!=u||o&&b(o.resolve())!=d||a&&b(new a)!=f||s&&b(new s)!=h)&&(b=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return p;case g:return u;case v:return d;case y:return f;case x:return h}return t}),e.exports=b},80760:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},81898:(e,t,r)=>{var n=r(14534),i=r(52794),o=r(95585),a=r(30674),s=r(44276),l=r(60925);e.exports=function(e,t,r){for(var c=-1,u=(t=n(t,e)).length,d=!1;++c{var n=r(11353);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},69843:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},86266:(e,t,r)=>{var n=r(11353),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},17364:(e,t,r)=>{var n=r(11353),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},74156:(e,t,r)=>{var n=r(11353);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},47633:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},57355:(e,t,r)=>{var n=r(72604),i=r(81893),o=r(73360),a=r(47981),s=r(55888);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},16484:(e,t,r)=>{var n=r(98303),i=r(96116),o=r(28992);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},30674:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(95585),i=r(72060),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},81591:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},65401:(e,t,r)=>{var n=r(47683),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},28992:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},99253:(e,t,r)=>{var n=r(91845);e.exports=function(e){return e===e&&!n(e)}},20329:e=>{e.exports=function(){this.__data__=[],this.size=0}},39666:(e,t,r)=>{var n=r(69194),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},2523:(e,t,r)=>{var n=r(69194);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},45105:(e,t,r)=>{var n=r(69194);e.exports=function(e){return n(this.__data__,e)>-1}},73316:(e,t,r)=>{var n=r(69194);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},79e3:(e,t,r)=>{var n=r(69748),i=r(95745),o=r(18579);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},37240:(e,t,r)=>{var n=r(16911);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},63414:(e,t,r)=>{var n=r(16911);e.exports=function(e){return n(this,e).get(e)}},17140:(e,t,r)=>{var n=r(16911);e.exports=function(e){return n(this,e).has(e)}},85429:(e,t,r)=>{var n=r(16911);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},258:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},22093:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},83679:(e,t,r)=>{var n=r(92736);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},11353:(e,t,r)=>{var n=r(70781)(Object,"create");e.exports=n},8723:(e,t,r)=>{var n=r(9698)(Object.keys,Object);e.exports=n},3481:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},47785:(e,t,r)=>{e=r.nmd(e);var n=r(32692),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},78186:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9698:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},7289:(e,t,r)=>{var n=r(32692),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},85845:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},35544:e=>{e.exports=function(e){return this.__data__.has(e)}},73671:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},23653:(e,t,r)=>{var n=r(95745);e.exports=function(){this.__data__=new n,this.size=0}},43359:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},92571:e=>{e.exports=function(e){return this.__data__.get(e)}},31698:e=>{e.exports=function(e){return this.__data__.has(e)}},85883:(e,t,r)=>{var n=r(95745),i=r(18579),o=r(13109);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},3002:(e,t,r)=>{var n=r(83679),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=a},60925:(e,t,r)=>{var n=r(72060);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},92043:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},38504:(e,t,r)=>{var n=r(46476);e.exports=function(e){return n(e,5)}},83666:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},57827:(e,t,r)=>{var n=r(35705),i=r(97169);e.exports=function(e,t){return e&&n(e,i(t))}},69706:(e,t,r)=>{var n=r(30207);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},89775:(e,t,r)=>{var n=r(21966),i=r(81898);e.exports=function(e,t){return null!=e&&i(e,t,n)}},19908:e=>{e.exports=function(e){return e}},52794:(e,t,r)=>{var n=r(51276),i=r(89752),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},95585:e=>{var t=Array.isArray;e.exports=t},2114:(e,t,r)=>{var n=r(50375),i=r(44276);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},70667:(e,t,r)=>{e=r.nmd(e);var n=r(7289),i=r(95535),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},50375:(e,t,r)=>{var n=r(18665),i=r(91845);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},44276:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},15874:(e,t,r)=>{var n=r(37094),i=r(36902),o=r(47785),a=o&&o.isMap,s=a?i(a):n;e.exports=s},91845:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},89752:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},40634:(e,t,r)=>{var n=r(18665),i=r(96116),o=r(89752),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==u}},41859:(e,t,r)=>{var n=r(18711),i=r(36902),o=r(47785),a=o&&o.isSet,s=a?i(a):n;e.exports=s},65406:(e,t,r)=>{var n=r(18665),i=r(95585),o=r(89752);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},72060:(e,t,r)=>{var n=r(18665),i=r(89752);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},53153:(e,t,r)=>{var n=r(77499),i=r(36902),o=r(47785),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},56385:(e,t,r)=>{var n=r(83200),i=r(23409),o=r(2114);e.exports=function(e){return o(e)?n(e):i(e)}},67086:(e,t,r)=>{var n=r(83200),i=r(89130),o=r(2114);e.exports=function(e){return o(e)?n(e,!0):i(e)}},93428:(e,t,r)=>{var n=r(95434),i=r(81186),o=r(71839),a=r(95585);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},92736:(e,t,r)=>{var n=r(13109);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},34445:(e,t,r)=>{var n=r(61125),i=r(80171),o=r(98939),a=r(60925);e.exports=function(e){return o(e)?n(a(e)):i(e)}},72554:e=>{e.exports=function(){return[]}},95535:e=>{e.exports=function(){return!1}},11822:(e,t,r)=>{var n=r(21612);e.exports=function(e){return null==e?"":n(e)}},74055:function(e){e.exports=function(){"use strict";var e,t,r;function n(n,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),(r=i(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else t=i;else e=i}return n(["exports"],(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r="1.10.1",n=i;function i(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}i.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},i.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},i.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},i.prototype.solveCurveX=function(e,t){var r,n,i,o,a;for("undefined"===typeof t&&(t=1e-6),i=e,a=0;a<8;a++){if(o=this.sampleCurveX(i)-e,Math.abs(o)(n=1))return n;for(;ro?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var o=a;function a(e,t){this.x=e,this.y=t}function s(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function c(e,t,r,i){var o=new n(e,t,r,i);return function(e){return o.solve(e)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(e){return e instanceof a?e:Array.isArray(e)?new a(e[0],e[1]):e};var u=c(.25,.1,.25,1);function d(e,t,r){return Math.min(r,Math.max(t,e))}function f(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function h(e,t,r){if(!e.length)return r(null,[]);var n=e.length,i=new Array(e.length),o=null;e.forEach((function(e,a){t(e,(function(e,t){e&&(o=e),i[a]=t,0===--n&&r(o,i)}))}))}function p(e){var t=[];for(var r in e)t.push(e[r]);return t}function m(e,t){var r=[];for(var n in e)n in t||r.push(n);return r}function g(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}return e()}function w(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function _(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function k(e,t){return-1!==e.indexOf(t,e.length-t.length)}function S(e,t,r){var n={};for(var i in e)n[i]=t.call(r||this,e[i],i,e);return n}function T(e,t,r){var n={};for(var i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function M(e){return Array.isArray(e)?e.map(M):"object"===typeof e&&e?S(e,M):e}function C(e,t){for(var r=0;r=0)return!0;return!1}var A={};function E(e){A[e]||("undefined"!==typeof console&&console.warn(e),A[e]=!0)}function I(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function O(e){for(var t=0,r=0,n=e.length,i=n-1,o=void 0,a=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(function(e,t,n,i){var o=n||i;return r[t]=!o||o.toLowerCase(),""})),r["max-age"]){var n=parseInt(r["max-age"],10);isNaN(n)?delete r["max-age"]:r["max-age"]=n}return r}var j=null;function D(e){if(null==j){var t=e.navigator?e.navigator.userAgent:null;j=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return j}function z(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(r){return!1}}function N(e){return self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}function F(e){return decodeURIComponent(self.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var B,Z,U,V,H=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),W=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,G=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,q={now:H,frame:function(e){var t=W(e);return{cancel:function(){return G(t)}}},getImageData:function(e,t){void 0===t&&(t=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=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return B||(B=self.document.createElement("a")),B.href=e,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==Z&&(Z=self.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches)}},Y={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},X={supported:!1,testSupport:J},K=!1,$=!1;function J(e){!K&&V&&($?Q(e):U=e)}function Q(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,V),e.isContextLost())return;X.supported=!0}catch(r){}e.deleteTexture(t),K=!0}self.document&&((V=self.document.createElement("img")).onload=function(){U&&Q(U),U=null,$=!0},V.onerror=function(){K=!0,U=null},V.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ee="01";function te(){for(var e="1",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="",n=0;n<10;n++)r+=t[Math.floor(62*Math.random())];var i=432e5;return{token:[e,ee,r].join(""),tokenExpiresAt:Date.now()+i}}var re=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function ne(e){return 0===e.indexOf("mapbox:")}re.prototype._createSkuToken=function(){var e=te();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},re.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},re.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},re.prototype.normalizeStyleURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeGlyphsURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeSourceURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeSpriteURL=function(e,t,r,n){var i=ce(e);return ne(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+t+r,ue(i))},re.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!ne(e))return e;var r=ce(e),n=/(\.(png|jpg)\d*)(?=$)/,i=/^.+\/v4\//,o=q.devicePixelRatio>=2||512===t?"@2x":"",a=X.supported?".webp":"$1";r.path=r.path.replace(n,""+o+a),r.path=r.path.replace(i,"/"),r.path="/v4"+r.path;var s=this._customAccessToken||se(r.params)||Y.ACCESS_TOKEN;return Y.REQUIRE_ACCESS_TOKEN&&s&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,s)},re.prototype.canonicalizeTileURL=function(e,t){var r="/v4/",n=/\.[\w]+$/,i=ce(e);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(n))return e;var o="mapbox://tiles/";o+=i.path.replace(r,"");var a=i.params;return t&&(a=a.filter((function(e){return!e.match(/^access_token=/)}))),a.length&&(o+="?"+a.join("&")),o},re.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&ne(t),n=[],i=0,o=e.tiles||[];i=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(n){E("Unable to write to LocalStorage")}},he.prototype.processRequests=function(e){},he.prototype.postEvent=function(e,t,n,i){var o=this;if(Y.EVENTS_URL){var a=ce(Y.EVENTS_URL);a.params.push("access_token="+(i||Y.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:ee,userId:this.anonId},l=t?g(s,t):s,c={url:ue(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=Ye(c,(function(e){o.pendingRequest=null,n(e),o.saveEventData(),o.processRequests(i)}))}},he.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var pe,me,ge=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(Y.EVENTS_URL&&n||Y.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return ne(e)||oe(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=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(),w(this.anonId)||(this.anonId=b()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(he),ve=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){Y.EVENTS_URL&&Y.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return ne(e)||oe(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=fe(Y.ACCESS_TOKEN),n=r?r.u:Y.ACCESS_TOKEN,i=n!==this.eventData.tokenU;w(this.anonId)||(this.anonId=b(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=o,t.eventData.tokenU=n)}),e)}},t}(he),ye=new ve,xe=ye.postTurnstileEvent.bind(ye),be=new ge,we=be.postMapLoadEvent.bind(be),_e="mapbox-tiles",ke=500,Se=50,Te=42e4;function Me(){self.caches&&!pe&&(pe=self.caches.open(_e))}function Ce(e,t){if(void 0===me)try{new Response(new ReadableStream),me=!0}catch(r){me=!1}me?t(e.body):e.blob().then(t)}function Ae(e,t,r){if(Me(),pe){var n={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var i=L(t.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()-rDate.now()&&!r["no-cache"]}var Pe,Re=1/0;function Le(e){++Re>Se&&(e.getActor().send("enforceCacheSizeLimit",ke),Re=0)}function je(e){Me(),pe&&pe.then((function(t){t.keys().then((function(r){for(var n=0;n=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(i){return t(i)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new Be(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}var We=function(e,t){if(!Ue(e.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Ve(e,t);if(R()&&self.worker&&self.worker.actor){var r=!0;return self.worker.actor.send("getResource",e,t,void 0,r)}}return He(e,t)},Ge=function(e,t){return We(g(e,{type:"json"}),t)},qe=function(e,t){return We(g(e,{type:"arrayBuffer"}),t)},Ye=function(e,t){return We(g(e,{method:"POST"}),t)};function Xe(e){var t=self.document.createElement("a");return t.href=e,t.protocol===self.document.location.protocol&&t.host===self.document.location.host}var Ke,$e,Je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Qe(e,t,r,n){var i=new self.Image,o=self.URL;i.onload=function(){t(null,i),o.revokeObjectURL(i.src)},i.onerror=function(){return t(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 a=new self.Blob([new Uint8Array(e)],{type:"image/png"});i.cacheControl=r,i.expires=n,i.src=e.byteLength?o.createObjectURL(a):Je}function et(e,t){var r=new self.Blob([new Uint8Array(e)],{type:"image/png"});self.createImageBitmap(r).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of "+e.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}Ke=[],$e=0;var tt=function(e,t){if(X.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),$e>=Y.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ke.push(r),r}$e++;var n=!1,i=function(){if(!n)for(n=!0,$e--;Ke.length&&$e0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},st.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var lt={$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"}}},ct=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!==t&&void 0!==t&&t.__line__&&(this.line=t.__line__)};function ut(e){var t=e.key,r=e.value;return r?[new ct(t,r,"constants have been deprecated as of v8")]:[]}function dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Et=[gt,vt,yt,xt,bt,Tt,wt,Ct(_t),Mt];function It(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!It(e.itemType,t.itemType))&&("number"!==typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Et;r255?255:e}function i(e){return e<0?0:e>1?1:e}function o(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function a(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),d=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==d.length)return null;f=a(d.pop());case"rgb":return 3!==d.length?null:[o(d[0]),o(d[1]),o(d[2]),f];case"hsla":if(4!==d.length)return null;f=a(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,p=a(d[1]),m=a(d[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,h+1/3)),n(255*s(v,g,h)),n(255*s(v,g,h-1/3)),f];default:return null}}return null}try{t.parseCSSColor=l}catch(c){}})),Lt=Rt.parseCSSColor,jt=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};jt.parse=function(e){if(e){if(e instanceof jt)return e;if("string"===typeof e){var t=Lt(e);if(t)return new jt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},jt.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+i+")"},jt.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*r/i,255*n/i,i]},jt.black=new jt(0,0,0,1),jt.white=new jt(1,1,1,1),jt.transparent=new jt(0,0,0,0),jt.red=new jt(1,0,0,1);var Dt=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Dt.prototype.compare=function(e,t){return this.collator.compare(e,t)},Dt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var zt=function(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i},Nt=function(e){this.sections=e};Nt.fromString=function(e){return new Nt([new zt(e,null,null,null,null)])},Nt.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},Nt.factory=function(e){return e instanceof Nt?e:Nt.fromString(e)},Nt.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},Nt.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t=0&&e<=255&&"number"===typeof t&&t>=0&&t<=255&&"number"===typeof r&&r>=0&&r<=255?"undefined"===typeof n||"number"===typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Zt(e){if(null===e)return!0;if("string"===typeof e)return!0;if("boolean"===typeof e)return!0;if("number"===typeof e)return!0;if(e instanceof jt)return!0;if(e instanceof Dt)return!0;if(e instanceof Nt)return!0;if(e instanceof Ft)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!==typeof s||!(s in Gt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Gt[s],n++}else o=_t;if(e.length>3){if(null!==e[2]&&("number"!==typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}r=Ct(o,a)}else r=Gt[i];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Yt=function(e){this.type=Tt,this.sections=e};Yt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"===typeof r)return t.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=e.length-1;++o){var a=e[o];if(i&&"object"===typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,vt)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,Ct(yt))))return null;var c=null;if(a["text-color"]&&!(c=t.parse(a["text-color"],1,bt)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var d=t.parse(e[o],1,_t);if(!d)return null;var f=d.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:d,scale:null,font:null,textColor:null})}}return new Yt(n)},Yt.prototype.evaluate=function(e){var t=function(t){var r=t.content.evaluate(e);return Ut(r)===Mt?new zt("",r,null,null,null):new zt(Vt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)};return new Nt(this.sections.map(t))},Yt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},Xt.prototype.eachChild=function(e){e(this.input)},Xt.prototype.outputDefined=function(){return!1},Xt.prototype.serialize=function(){return["image",this.input.serialize()]};var Kt={"to-boolean":xt,"to-color":bt,"to-number":vt,"to-string":yt},$t=function(e,t){this.type=e,this.args=t};$t.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=Kt[r],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Bt(t[0],t[1],t[2],t[3])))return new jt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Wt(r||"Could not parse color from value '"+("string"===typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=t[2])&&!(e[1]<=t[1])&&!(e[3]>=t[3])}function lr(e,t){var r=or(e[0]),n=ar(e[1]),i=Math.pow(2,t.z);return[Math.round(r*i*nr),Math.round(n*i*nr)]}function cr(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],o=e[0]-r[0],a=e[1]-r[1];return n*a-o*i===0&&n*o<=0&&i*a<=0}function ur(e,t,r){return t[1]>e[1]!==r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function dr(e,t){for(var r=!1,n=0,i=t.length;n0&&d<0||u<0&&d>0}function mr(e,t,r,n){var i=[t[0]-e[0],t[1]-e[1]];return 0!==hr([n[0]-r[0],n[1]-r[1]],i)&&!(!pr(e,t,r,n)||!pr(r,n,e,t))}function gr(e,t,r){for(var n=0,i=r;nr[2]){var i=.5*n,o=e[0]-r[0]>i?-n:r[0]-e[0]>i?n:0;0===o&&(o=e[0]-r[2]>i?-n:r[2]-e[0]>i?n:0),e[0]+=o}ir(t,e)}function _r(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function kr(e,t,r,n){for(var i=Math.pow(2,n.z)*nr,o=[n.x*nr,n.y*nr],a=[],s=0,l=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Ir(e,t)&&(r=!1)})),r}Cr.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Zt(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;nt))throw new Wt("Input is not a number.");a=s-1}return 0}Pr.prototype.parse=function(e,t,r,n,i){return void 0===i&&(i={}),t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)},Pr.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new qt(t,[e]):"coerce"===r?new $t(t,[e]):e}if(null!==e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[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 o=i.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,t.typeAnnotation||"coerce");else o=r(o,a,t.typeAnnotation||"assert")}if(!(o instanceof Ht)&&"resolvedImage"!==o.type.kind&&Rr(o)){var l=new Qt;try{o=new Ht(o.type,o.evaluate(l))}catch(c){return this.error(c.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof e?this.error("'undefined' value invalid. Use null instead."):"object"===typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Pr.prototype.concat=function(e,t,r){var n="number"===typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new Pr(this.registry,n,t||null,i,this.errors)},Pr.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new pt(n,e))},Pr.prototype.checkSubtype=function(e,t){var r=It(e,t);return r&&this.error(r),r};var jr=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,i=r;n=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([a,u])}return new jr(i,r,n)},jr.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[Lr(t,n)].evaluate(e)},jr.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Fr=Object.freeze({__proto__:null,number:Dr,color:zr,array:Nr}),Br=.95047,Zr=1,Ur=1.08883,Vr=4/29,Hr=6/29,Wr=3*Hr*Hr,Gr=Hr*Hr*Hr,qr=Math.PI/180,Yr=180/Math.PI;function Xr(e){return e>Gr?Math.pow(e,1/3):e/Wr+Vr}function Kr(e){return e>Hr?e*e*e:Wr*(e-Vr)}function $r(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Jr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Qr(e){var t=Jr(e.r),r=Jr(e.g),n=Jr(e.b),i=Xr((.4124564*t+.3575761*r+.1804375*n)/Br),o=Xr((.2126729*t+.7151522*r+.072175*n)/Zr);return{l:116*o-16,a:500*(i-o),b:200*(o-Xr((.0193339*t+.119192*r+.9503041*n)/Ur)),alpha:e.a}}function en(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=Zr*Kr(t),r=Br*Kr(r),n=Ur*Kr(n),new jt($r(3.2404542*r-1.5371385*t-.4985314*n),$r(-.969266*r+1.8760108*t+.041556*n),$r(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function tn(e,t,r){return{l:Dr(e.l,t.l,r),a:Dr(e.a,t.a,r),b:Dr(e.b,t.b,r),alpha:Dr(e.alpha,t.alpha,r)}}function rn(e){var t=Qr(e),r=t.l,n=t.a,i=t.b,o=Math.atan2(i,n)*Yr;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:e.a}}function nn(e){var t=e.h*qr,r=e.c;return en({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})}function on(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function an(e,t,r){return{h:on(e.h,t.h,r),c:Dr(e.c,t.c,r),l:Dr(e.l,t.l,r),alpha:Dr(e.alpha,t.alpha,r)}}var sn={forward:Qr,reverse:en,interpolate:tn},ln={forward:rn,reverse:nn,interpolate:an},cn=Object.freeze({__proto__:null,lab:sn,hcl:ln}),un=function(e,t,r,n,i){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,vt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=bt:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var m=t.parse(f,p,c);if(!m)return null;c=c||m.type,l.push([d,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"===typeof c.N?new un(c,r,n,i,l):t.error("Type "+At(c)+" is not interpolatable.")},un.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);var o=Lr(t,n),a=t[o],s=t[o+1],l=un.interpolationFactor(this.interpolation,n,a,s),c=r[o].evaluate(e),u=r[o+1].evaluate(e);return"interpolate"===this.operator?Fr[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?ln.reverse(ln.interpolate(ln.forward(c),ln.forward(u),l)):sn.reverse(sn.interpolate(sn.forward(c),sn.forward(u),l))},un.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new Wt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new Wt("Array index must be an integer, but found "+t+" instead.");return r[t]},pn.prototype.eachChild=function(e){e(this.index),e(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var mn=function(e,t){this.type=xt,this.needle=e,this.haystack=t};mn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,_t);return r&&n?Ot(r.type,[xt,yt,vt,gt,_t])?new mn(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+At(r.type)+" instead"):null},mn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Pt(t,["boolean","string","number","null"]))throw new Wt("Expected first argument to be of type boolean, string, number or null, but found "+At(Ut(t))+" instead.");if(!Pt(r,["string","array"]))throw new Wt("Expected second argument to be of type array or string, but found "+At(Ut(r))+" instead.");return r.indexOf(t)>=0},mn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},mn.prototype.outputDefined=function(){return!0},mn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var gn=function(e,t,r){this.type=vt,this.needle=e,this.haystack=t,this.fromIndex=r};gn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,_t);if(!r||!n)return null;if(!Ot(r.type,[xt,yt,vt,gt,_t]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+At(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new gn(r,n,i):null}return new gn(r,n)},gn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Pt(t,["boolean","string","number","null"]))throw new Wt("Expected first argument to be of type boolean, string, number or null, but found "+At(Ut(t))+" instead.");if(!Pt(r,["string","array"]))throw new Wt("Expected second argument to be of type array or string, but found "+At(Ut(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},gn.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var vn=function(e,t,r,n,i,o){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};vn.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,Ut(f)))return null}else r=Ut(f);if("undefined"!==typeof i[String(f)])return c.error("Branch labels must be unique.");i[String(f)]=o.length}var h=t.parse(l,a,n);if(!h)return null;n=n||h.type,o.push(h)}var p=t.parse(e[1],1,_t);if(!p)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==p.type.kind&&t.concat(1).checkSubtype(r,p.type)?null:new vn(r,n,p,i,o,m):null},vn.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Ut(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},vn.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},vn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},vn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();ir}function Tn(e,t,r){return t<=r}function Mn(e,t,r){return t>=r}function Cn(e,t,r,n){return 0===n.compare(t,r)}function An(e,t,r,n){return!Cn(e,t,r,n)}function En(e,t,r,n){return n.compare(t,r)<0}function In(e,t,r,n){return n.compare(t,r)>0}function On(e,t,r,n){return n.compare(t,r)<=0}function Pn(e,t,r,n){return n.compare(t,r)>=0}function Rn(e,t,r){var n="=="!==e&&"!="!==e;return function(){function i(e,t,r){this.type=xt,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],o=t.parse(e[1],1,_t);if(!o)return null;if(!bn(r,o.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+At(o.type)+"'.");var a=t.parse(e[2],2,_t);if(!a)return null;if(!bn(r,a.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+At(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot compare types '"+At(o.type)+"' and '"+At(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new qt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new qt(o.type,[a])));var s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,St)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=Ut(o),l=Ut(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Wt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var c=Ut(o),u=Ut(a);if("string"!==c.kind||"string"!==u.kind)return t(i,o,a)}return this.collator?r(i,o,a,this.collator.evaluate(i)):t(i,o,a)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}xn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,vt);if(!r||!n)return null;if(!Ot(r.type,[Ct(_t),yt,_t]))return t.error("Expected first argument to be of type array or string, but found "+At(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new xn(r.type,r,n,i):null}return new xn(r.type,r,n)},xn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!Pt(t,["string","array"]))throw new Wt("Expected first argument to be of type array or string, but found "+At(Ut(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},xn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ln=Rn("==",wn,Cn),jn=Rn("!=",_n,An),Dn=Rn("<",kn,En),zn=Rn(">",Sn,In),Nn=Rn("<=",Tn,On),Fn=Rn(">=",Mn,Pn),Bn=function(e,t,r,n,i){this.type=yt,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Bn.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,vt);if(!r)return null;var n=e[2];if("object"!==typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=t.parse(n.locale,1,yt)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,yt)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,vt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,vt))?null:new Bn(r,i,o,a,s)},Bn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Bn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Bn.prototype.outputDefined=function(){return!1},Bn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Zn=function(e){this.type=vt,this.input=e};Zn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+At(r.type)+" instead."):new Zn(r):null},Zn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"===typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Wt("Expected value to be of type string or array, but found "+At(Ut(t))+" instead.")},Zn.prototype.eachChild=function(e){e(this.input)},Zn.prototype.outputDefined=function(){return!1},Zn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Un={"==":Ln,"!=":jn,">":zn,"<":Dn,">=":Fn,"<=":Nn,array:qt,at:pn,boolean:qt,case:yn,coalesce:fn,collator:rr,format:Yt,image:Xt,in:mn,"index-of":gn,interpolate:un,"interpolate-hcl":un,"interpolate-lab":un,length:Zn,let:hn,literal:Ht,match:vn,number:qt,"number-format":Bn,object:qt,slice:xn,step:jr,string:qt,"to-boolean":$t,"to-color":$t,"to-number":$t,"to-string":$t,var:Or,within:Cr};function Vn(e,t){var r=t[0],n=t[1],i=t[2],o=t[3];r=r.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);var a=o?o.evaluate(e):1,s=Bt(r,n,i,a);if(s)throw new Wt(s);return new jt(r/255*a,n/255*a,i/255*a,a)}function Hn(e,t){return e in t}function Wn(e,t){var r=t[e];return"undefined"===typeof r?null:r}function Gn(e,t,r,n){for(;r<=n;){var i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}function qn(e){return{type:e}}function Yn(e){return{result:"success",value:e}}function Xn(e){return{result:"error",value:e}}function Kn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function $n(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Jn(e){return!!e.expression&&e.expression.interpolated}function Qn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ei(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}function ti(e){return e}function ri(e,t){var r,n,i,o="color"===t.type,a=e.stops&&"object"===typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,c=e.type||(Jn(t)?"exponential":"interval");if(o&&((e=dt({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],jt.parse(e[1])]}))),e.default?e.default=jt.parse(e.default):e.default=jt.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!cn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)r=ai;else if("interval"===c)r=oi;else if("categorical"===c){r=ii,n=Object.create(null);for(var u=0,d=e.stops;u=e.stops[n-1][0])return e.stops[n-1][1];var i=Lr(e.stops.map((function(e){return e[0]})),r);return e.stops[i][1]}function ai(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==Qn(r))return ni(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];var o=Lr(e.stops.map((function(e){return e[0]})),r),a=li(r,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],c=Fr[t.type]||ti;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=cn[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),a))}}return"function"===typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return c(r,n,a)}}:c(s,l,a)}function si(e,t,r){return"color"===t.type?r=jt.parse(r):"formatted"===t.type?r=Nt.fromString(r.toString()):"resolvedImage"===t.type?r=Ft.fromString(r.toString()):Qn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),ni(r,e.default,t.default)}function li(e,t,r,n){var i=n-r,o=e-r;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}er.register(Un,{error:[kt,[yt],function(e,t){var r=t[0];throw new Wt(r.evaluate(e))}],typeof:[yt,[_t],function(e,t){return At(Ut(t[0].evaluate(e)))}],"to-rgba":[Ct(vt,4),[bt],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[bt,[vt,vt,vt],Vn],rgba:[bt,[vt,vt,vt,vt],Vn],has:{type:xt,overloads:[[[yt],function(e,t){return Hn(t[0].evaluate(e),e.properties())}],[[yt,wt],function(e,t){var r=t[0],n=t[1];return Hn(r.evaluate(e),n.evaluate(e))}]]},get:{type:_t,overloads:[[[yt],function(e,t){return Wn(t[0].evaluate(e),e.properties())}],[[yt,wt],function(e,t){var r=t[0],n=t[1];return Wn(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[_t,[yt],function(e,t){return Wn(t[0].evaluate(e),e.featureState||{})}],properties:[wt,[],function(e){return e.properties()}],"geometry-type":[yt,[],function(e){return e.geometryType()}],id:[_t,[],function(e){return e.id()}],zoom:[vt,[],function(e){return e.globals.zoom}],"heatmap-density":[vt,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[vt,[],function(e){return e.globals.lineProgress||0}],accumulated:[_t,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[vt,qn(vt),function(e,t){for(var r=0,n=0,i=t;n":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i>o}],"filter-id->":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>i}],"filter-<=":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i<=o}],"filter-id-<=":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n<=i}],"filter->=":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i>=o}],"filter-id->=":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>=i}],"filter-has":[xt,[_t],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[xt,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[xt,[Ct(yt)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[xt,[Ct(_t)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[xt,[yt,Ct(_t)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[xt,[yt,Ct(_t)],function(e,t){var r=t[0],n=t[1];return Gn(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:xt,overloads:[[[xt,xt],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[qn(xt),function(e,t){for(var r=0,n=t;r0&&"string"===typeof e[0]&&e[0]in Un}function di(e,t){var r=new Pr(Un,[],t?yi(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Yn(new ci(n,t)):Xn(r.errors)}ci.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},ci.prototype.evaluate=function(e,t,r,n,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null===a||void 0===a||"number"===typeof a&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new Wt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!==typeof console&&console.warn(s.message)),this._defaultValue}};var fi=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Er(t.expression)};fi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,o)},fi.prototype.evaluate=function(e,t,r,n,i,o){return this._styleExpression.evaluate(e,t,r,n,i,o)};var hi=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Er(t.expression),this.interpolationType=n};function pi(e,t){if("error"===(e=di(e,t)).result)return e;var r=e.value.expression,n=Ar(r);if(!n&&!Kn(t))return Xn([new pt("","data expressions not supported")]);var i=Ir(r,["zoom"]);if(!i&&!$n(t))return Xn([new pt("","zoom expressions not supported")]);var o=vi(r);if(!o&&!i)return Xn([new pt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof pt)return Xn([o]);if(o instanceof un&&!Jn(t))return Xn([new pt("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Yn(new fi(n?"constant":"source",e.value));var a=o instanceof un?o.interpolation:void 0;return Yn(new hi(n?"camera":"composite",e.value,o.labels,a))}hi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,o)},hi.prototype.evaluate=function(e,t,r,n,i,o){return this._styleExpression.evaluate(e,t,r,n,i,o)},hi.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?un.interpolationFactor(this.interpolationType,e,t,r):0};var mi=function(e,t){this._parameters=e,this._specification=t,dt(this,ri(this._parameters,this._specification))};function gi(e,t){if(ei(e))return new mi(e,t);if(ui(e)){var r=pi(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"===typeof e&&"color"===t.type&&(n=jt.parse(e)),{kind:"constant",evaluate:function(){return n}}}function vi(e){var t=null;if(e instanceof hn)t=vi(e.result);else if(e instanceof fn)for(var r=0,n=e.args;rn.maximum?[new ct(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function ki(e){var t,r,n,i=e.valueSpec,o=ft(e.value.type),a={},s="categorical"!==o&&void 0===e.value.property,l=!s,c="array"===Qn(e.value.stops)&&"array"===Qn(e.value.stops[0])&&"object"===Qn(e.value.stops[0][0]),u=bi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:d,default:p}});return"identity"===o&&s&&u.push(new ct(e.key,e.value,'missing required property "property"')),"identity"===o||e.value.stops||u.push(new ct(e.key,e.value,'missing required property "stops"')),"exponential"===o&&e.valueSpec.expression&&!Jn(e.valueSpec)&&u.push(new ct(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Kn(e.valueSpec)?u.push(new ct(e.key,e.value,"property functions not supported")):s&&!$n(e.valueSpec)&&u.push(new ct(e.key,e.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==e.value.property||u.push(new ct(e.key,e.value,'"property" property is required')),u;function d(e){if("identity"===o)return[new ct(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(wi({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:f})),"array"===Qn(r)&&0===r.length&&t.push(new ct(e.key,r,"array must have at least one stop")),t}function f(e){var t=[],o=e.value,s=e.key;if("array"!==Qn(o))return[new ct(s,o,"array expected, "+Qn(o)+" found")];if(2!==o.length)return[new ct(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==Qn(o[0]))return[new ct(s,o,"object expected, "+Qn(o[0])+" found")];if(void 0===o[0].zoom)return[new ct(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new ct(s,o,"object stop key must have value")];if(n&&n>ft(o[0].zoom))return[new ct(s,o[0].zoom,"stop zoom values must appear in ascending order")];ft(o[0].zoom)!==n&&(n=ft(o[0].zoom),r=void 0,a={}),t=t.concat(bi({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:_i,value:h}}))}else t=t.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},o));return ui(ht(o[1]))?t.concat([new ct(s+"[1]",o[1],"expressions are not allowed in function stops.")]):t.concat(Qi({key:s+"[1]",value:o[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function h(e,n){var s=Qn(e.value),l=ft(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new ct(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new ct(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return Kn(i)&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ct(e.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!==typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function Pi(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Li(e[1],e[2],t):"any"===t?ji(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Ri)):"none"===t?["all"].concat(e.slice(1).map(Ri).map(Ni)):"in"===t?Di(e[1],e.slice(2)):"!in"===t?Ni(Di(e[1],e.slice(2))):"has"===t?zi(e[1]):"!has"===t?Ni(zi(e[1])):"within"!==t||e}function Li(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function ji(e){return["any"].concat(e.map(Ri))}function Di(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!==typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Oi)]]:["filter-in-small",e,["literal",t]]}}function zi(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Ni(e){return["!",e]}function Fi(e){return Ai(ht(e.value))?Si(dt({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Bi(e)}function Bi(e){var t=e.value,r=e.key;if("array"!==Qn(t))return[new ct(r,t,"array expected, "+Qn(t)+" found")];var n,i=e.styleSpec,o=[];if(t.length<1)return[new ct(r,t,"filter array must have at least 1 element")];switch(o=o.concat(Ci({key:r+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),ft(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===ft(t[1])&&o.push(new ct(r,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&o.push(new ct(r,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(n=Qn(t[1]))&&o.push(new ct(r+"[1]",t[1],"string expected, "+n+" found"));for(var a=2;a=u[h+0]&&n>=u[h+1])?(a[f]=!0,o.push(c[f])):a[f]=!1}}},fo.prototype._forEachCell=function(e,t,r,n,i,o,a,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),d=this._convertToCellCoord(n),f=l;f<=u;f++)for(var h=c;h<=d;h++){var p=this.d*h+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(h),this._convertFromCellCoord(f+1),this._convertFromCellCoord(h+1)))&&i.call(this,e,t,r,n,p,o,a,s))return}},fo.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},fo.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},fo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=uo+this.cells.length+1+1,r=0,n=0;n=0)){var d=e[u];c[u]=mo[l].shallow.indexOf(u)>=0?d:bo(d,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function wo(e){if(null===e||void 0===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||yo(e)||xo(e)||ArrayBuffer.isView(e)||e instanceof ho)return e;if(Array.isArray(e))return e.map(wo);if("object"===typeof e){var t=e.$name||"Object",r=mo[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),i=0,o=Object.keys(e);i=0?s:wo(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var _o=function(){this.first=!0};_o.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function So(e){for(var t=0,r=e;t=65097&&e<=65103)||!!ko["CJK Compatibility Ideographs"](e)||!!ko["CJK Compatibility"](e)||!!ko["CJK Radicals Supplement"](e)||!!ko["CJK Strokes"](e)||!(!ko["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||!!ko["CJK Unified Ideographs Extension A"](e)||!!ko["CJK Unified Ideographs"](e)||!!ko["Enclosed CJK Letters and Months"](e)||!!ko["Hangul Compatibility Jamo"](e)||!!ko["Hangul Jamo Extended-A"](e)||!!ko["Hangul Jamo Extended-B"](e)||!!ko["Hangul Jamo"](e)||!!ko["Hangul Syllables"](e)||!!ko.Hiragana(e)||!!ko["Ideographic Description Characters"](e)||!!ko.Kanbun(e)||!!ko["Kangxi Radicals"](e)||!!ko["Katakana Phonetic Extensions"](e)||!(!ko.Katakana(e)||12540===e)||!(!ko["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!ko["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||!!ko["Unified Canadian Aboriginal Syllabics"](e)||!!ko["Unified Canadian Aboriginal Syllabics Extended"](e)||!!ko["Vertical Forms"](e)||!!ko["Yijing Hexagram Symbols"](e)||!!ko["Yi Syllables"](e)||!!ko["Yi Radicals"](e))}function Eo(e){return!(!ko["Latin-1 Supplement"](e)||167!==e&&169!==e&&174!==e&&177!==e&&188!==e&&189!==e&&190!==e&&215!==e&&247!==e)||!(!ko["General Punctuation"](e)||8214!==e&&8224!==e&&8225!==e&&8240!==e&&8241!==e&&8251!==e&&8252!==e&&8258!==e&&8263!==e&&8264!==e&&8265!==e&&8273!==e)||!!ko["Letterlike Symbols"](e)||!!ko["Number Forms"](e)||!(!ko["Miscellaneous Technical"](e)||!(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215))||!(!ko["Control Pictures"](e)||9251===e)||!!ko["Optical Character Recognition"](e)||!!ko["Enclosed Alphanumerics"](e)||!!ko["Geometric Shapes"](e)||!(!ko["Miscellaneous Symbols"](e)||e>=9754&&e<=9759)||!(!ko["Miscellaneous Symbols and Arrows"](e)||!(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243))||!!ko["CJK Symbols and Punctuation"](e)||!!ko.Katakana(e)||!!ko["Private Use Area"](e)||!!ko["CJK Compatibility Forms"](e)||!!ko["Small Form Variants"](e)||!!ko["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e}function Io(e){return!(Ao(e)||Eo(e))}function Oo(e){return ko.Arabic(e)||ko["Arabic Supplement"](e)||ko["Arabic Extended-A"](e)||ko["Arabic Presentation Forms-A"](e)||ko["Arabic Presentation Forms-B"](e)}function Po(e){return e>=1424&&e<=2303||ko["Arabic Presentation Forms-A"](e)||ko["Arabic Presentation Forms-B"](e)}function Ro(e,t){return!(!t&&Po(e))&&!(e>=2304&&e<=3583||e>=3840&&e<=4255||ko.Khmer(e))}function Lo(e){for(var t=0,r=e;t-1&&(No=Do.error),zo&&zo(e)};function Zo(){Uo.fire(new ot("pluginStateChange",{pluginStatus:No,pluginURL:Fo}))}var Uo=new st,Vo=function(){return No},Ho=function(e){return e({pluginStatus:No,pluginURL:Fo}),Uo.on("pluginStateChange",e),e},Wo=function(e,t,r){if(void 0===r&&(r=!1),No===Do.deferred||No===Do.loading||No===Do.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Fo=q.resolveURL(e),No=Do.deferred,zo=t,Zo(),r||Go()},Go=function(){if(No!==Do.deferred||!Fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");No=Do.loading,Zo(),Fo&&qe({url:Fo},(function(e){e?Bo(e):(No=Do.loaded,Zo())}))},qo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return No===Do.loaded||null!=qo.applyArabicShaping},isLoading:function(){return No===Do.loading},setState:function(e){No=e.pluginStatus,Fo=e.pluginURL},isParsed:function(){return null!=qo.applyArabicShaping&&null!=qo.processBidirectionalText&&null!=qo.processStyledBidirectionalText},getPluginURL:function(){return Fo}},Yo=function(){qo.isLoading()||qo.isLoaded()||"deferred"!==Vo()||Go()},Xo=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _o,this.transition={})};Xo.prototype.isSupportedScript=function(e){return jo(e,qo.isLoaded())},Xo.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Xo.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Ko=function(e,t){this.property=e,this.value=t,this.expression=gi(void 0===t?e.specification.default:t,e.specification)};Ko.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ko.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var $o=function(e){this.property=e,this.value=new Ko(e,void 0)};$o.prototype.transitioned=function(e,t){return new Qo(this.property,this.value,t,g({},e.transition,this.transition),e.now)},$o.prototype.untransitioned=function(){return new Qo(this.property,this.value,null,{},0)};var Jo=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Jo.prototype.getValue=function(e){return M(this._values[e].value.value)},Jo.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new $o(this._values[e].property)),this._values[e].value=new Ko(this._values[e].property,null===t?void 0:M(t))},Jo.prototype.getTransition=function(e){return M(this._values[e].transition)},Jo.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new $o(this._values[e].property)),this._values[e].transition=M(t)||void 0},Jo.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(nn.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(oa),sa=function(e){this.specification=e};sa.prototype.possiblyEvaluate=function(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Xo(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Xo(Math.floor(t.zoom),t)),e.expression.evaluate(new Xo(Math.floor(t.zoom+1),t)),t)}},sa.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},sa.prototype.interpolate=function(e){return e};var la=function(e){this.specification=e};la.prototype.possiblyEvaluate=function(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)},la.prototype.interpolate=function(){return!1};var ca=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ko(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new $o(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};go("DataDrivenProperty",oa),go("DataConstantProperty",ia),go("CrossFadedDataDrivenProperty",aa),go("CrossFadedProperty",sa),go("ColorRampProperty",la);var ua="-transition",da=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new ta(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Jo(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new na(r.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".layout."+e;if(this._validate(so,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return k(e,ua)?this._transitionablePaint.getTransition(e.slice(0,-ua.length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".paint."+e;if(this._validate(ao,n,e,t,r))return!1}if(k(e,ua))return this._transitionablePaint.setTransition(e.slice(0,-ua.length),t||void 0),!1;var i=this._transitionablePaint._values[e],o="cross-faded-data-driven"===i.property.specification["property-type"],a=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||a||o||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),T(e,(function(e,t){return void 0!==e&&!("layout"===t&&!Object.keys(e).length)&&!("paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&lo(this,e.call(io,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:lt,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof ra&&Kn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(st),fa={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ha=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},pa=128,ma=5,ga=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function va(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var i=ya(e.type),o=r=xa(r,Math.max(t,i)),a=e.components||1;return n=Math.max(n,i),r+=i*a,{name:e.name,type:e.type,components:a,offset:o}})),size:xa(r,Math.max(n,t)),alignment:t}}function ya(e){return fa[e].BYTES_PER_ELEMENT}function xa(e,t){return Math.ceil(e/t)*t}ga.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},ga.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},ga.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ga.prototype.clear=function(){this.length=0},ga.prototype.resize=function(e){this.reserve(e),this.length=e},ga.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*ma),pa),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},ga.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(ga);ba.prototype.bytesPerElement=4,go("StructArrayLayout2i4",ba);var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,e},t}(ga);wa.prototype.bytesPerElement=8,go("StructArrayLayout4i8",wa);var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(ga);_a.prototype.bytesPerElement=12,go("StructArrayLayout2i4i12",_a);var ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(ga);ka.prototype.bytesPerElement=8,go("StructArrayLayout2i4ub8",ka);var Sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,o,a,s,l,c)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u){var d=9*e,f=18*e;return this.uint16[d+0]=t,this.uint16[d+1]=r,this.uint16[d+2]=n,this.uint16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint8[f+16]=c,this.uint8[f+17]=u,e},t}(ga);Sa.prototype.bytesPerElement=18,go("StructArrayLayout8ui2ub18",Sa);var Ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d){var f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,o,a,s,l,c,u,d)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f){var h=12*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.int16[h+8]=c,this.int16[h+9]=u,this.int16[h+10]=d,this.int16[h+11]=f,e},t}(ga);Ta.prototype.bytesPerElement=24,go("StructArrayLayout4i4ui4i24",Ta);var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e},t}(ga);Ma.prototype.bytesPerElement=12,go("StructArrayLayout3f12",Ma);var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(ga);Ca.prototype.bytesPerElement=4,go("StructArrayLayout1ul4",Ca);var Aa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,o,a,s,l)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c){var u=10*e,d=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=o,this.int16[u+5]=a,this.uint32[d+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(ga);Aa.prototype.bytesPerElement=20,go("StructArrayLayout6i1ul2ui20",Aa);var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(ga);Ea.prototype.bytesPerElement=12,go("StructArrayLayout2i2i2i12",Ea);var Ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i)},t.prototype.emplace=function(e,t,r,n,i,o){var a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[s+6]=i,this.int16[s+7]=o,e},t}(ga);Ia.prototype.bytesPerElement=16,go("StructArrayLayout2f1f2i16",Ia);var Oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=r,this.float32[a+1]=n,this.float32[a+2]=i,e},t}(ga);Oa.prototype.bytesPerElement=12,go("StructArrayLayout2ub2f12",Oa);var Pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e},t}(ga);Pa.prototype.bytesPerElement=6,go("StructArrayLayout3ui6",Pa);var Ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g){var v=this.length;return this.resize(v+1),this.emplace(v,e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v){var y=24*e,x=12*e,b=48*e;return this.int16[y+0]=t,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=o,this.uint32[x+3]=a,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=d,this.float32[x+8]=f,this.uint8[b+36]=h,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[y+22]=v,e},t}(ga);Ra.prototype.bytesPerElement=48,go("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ra);var La=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C){var A=this.length;return this.resize(A+1),this.emplace(A,e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A){var E=34*e,I=17*e;return this.int16[E+0]=t,this.int16[E+1]=r,this.int16[E+2]=n,this.int16[E+3]=i,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=c,this.uint16[E+9]=u,this.uint16[E+10]=d,this.uint16[E+11]=f,this.uint16[E+12]=h,this.uint16[E+13]=p,this.uint16[E+14]=m,this.uint16[E+15]=g,this.uint16[E+16]=v,this.uint16[E+17]=y,this.uint16[E+18]=x,this.uint16[E+19]=b,this.uint16[E+20]=w,this.uint16[E+21]=_,this.uint16[E+22]=k,this.uint32[I+12]=S,this.float32[I+13]=T,this.float32[I+14]=M,this.float32[I+15]=C,this.float32[I+16]=A,e},t}(ga);La.prototype.bytesPerElement=68,go("StructArrayLayout8i15ui1ul4f68",La);var ja=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(ga);ja.prototype.bytesPerElement=4,go("StructArrayLayout1f4",ja);var Da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e},t}(ga);Da.prototype.bytesPerElement=6,go("StructArrayLayout3i6",Da);var za=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=2*e,o=4*e;return this.uint32[i+0]=t,this.uint16[o+2]=r,this.uint16[o+3]=n,e},t}(ga);za.prototype.bytesPerElement=8,go("StructArrayLayout1ul2ui8",za);var Na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(ga);Na.prototype.bytesPerElement=4,go("StructArrayLayout2ui4",Na);var Fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(ga);Fa.prototype.bytesPerElement=2,go("StructArrayLayout1ui2",Fa);var Ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(ga);Ba.prototype.bytesPerElement=8,go("StructArrayLayout2f8",Ba);var Za=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,e},t}(ga);Za.prototype.bytesPerElement=16,go("StructArrayLayout4f16",Za);var Ua=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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 o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(ha);Ua.prototype.size=20;var Va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ua(this,e)},t}(Aa);go("CollisionBoxArray",Va);var Ha=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(ha);Ha.prototype.size=48;var Wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ha(this,e)},t}(Ra);go("PlacedSymbolArray",Wa);var Ga=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(e){this._structArray.uint32[this._pos4+12]=e},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(t.prototype,r),t}(ha);Ga.prototype.size=68;var qa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ga(this,e)},t}(La);go("SymbolInstanceArray",qa);var Ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(ja);go("GlyphOffsetArray",Ya);var Xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(Da);go("SymbolLineVertexArray",Xa);var Ka=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(t.prototype,r),t}(ha);Ka.prototype.size=8;var $a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ka(this,e)},t}(za);go("FeatureIndexArray",$a);var Ja=va([{name:"a_pos",components:2,type:"Int16"}],4).members,Qa=function(e){void 0===e&&(e=[]),this.segments=e};function es(e,t){return 256*(e=d(Math.floor(e),0,255))+(t=d(Math.floor(t),0,255))}Qa.prototype.prepareSegment=function(e,t,r,n){var i=this.segments[this.segments.length-1];return e>Qa.MAX_VERTEX_ARRAY_LENGTH&&E("Max vertices per segment is "+Qa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Qa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Qa.prototype.get=function(){return this.segments},Qa.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.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}e.exports=t})),ns=t((function(e){function t(e,t){for(var r,n=e.length,i=t^n,o=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<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,++o;switch(n){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}e.exports=t})),is=rs,os=rs,as=ns;is.murmur3=os,is.murmur2=as;var ss=function(){this.ids=[],this.positions=[],this.indexed=!1};ss.prototype.add=function(e,t,r,n){this.ids.push(cs(e)),this.positions.push(t,r,n)},ss.prototype.getPositions=function(e){for(var t=cs(e),r=0,n=this.ids.length-1;r>1;this.ids[i]>=t?n=i:r=i+1}for(var o=[];this.ids[r]===t;){var a=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];o.push({index:a,start:s,end:l}),r++}return o},ss.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return us(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}},ss.deserialize=function(e){var t=new ss;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var ls=Math.pow(2,53)-1;function cs(e){var t=+e;return!isNaN(t)&&t<=ls?t:is(String(e))}function us(e,t,r,n){for(;r>1],o=r-1,a=n+1;;){do{o++}while(e[o]i);if(o>=a)break;ds(e,o,a),ds(t,3*o,3*a),ds(t,3*o+1,3*a+1),ds(t,3*o+2,3*a+2)}a-rLs.max||a.yLs.max)&&(E("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=d(a.x,Ls.min,Ls.max),a.y=d(a.y,Ls.min,Ls.max))}return r}function Ds(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}var zs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ba,this.indexArray=new Pa,this.segments=new Qa,this.programConfigurations=new As(Ja,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Ns(e,t){for(var r=0;r=3)for(var o=0;o1){if(Vs(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function qs(e,t){for(var r,n,i,o=!1,a=0;at.y!==i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function Ys(e,t){for(var r=!1,n=0,i=e.length-1;nt.y!==a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function Xs(e,t,r,n,i){for(var a=0,s=e;a=l.x&&i>=l.y)return!0}var c=[new o(t,r),new o(t,i),new o(n,i),new o(n,r)];if(e.length>2)for(var u=0,d=c;ui.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var o=I(e,t,r[0]);return o!==I(e,t,r[1])||o!==I(e,t,r[2])||o!==I(e,t,r[3])}function $s(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Js(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Qs(e,t,r,n,i){if(!t[0]&&!t[1])return e;var a=o.convert(t)._mult(i);"viewport"===r&&a._rotate(-n);for(var s=[],l=0;l=Ps||u<0||u>=Ps)){var d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),f=d.vertexLength;Ds(this.layoutVertexArray,c,u,-1,-1),Ds(this.layoutVertexArray,c,u,1,-1),Ds(this.layoutVertexArray,c,u,1,1),Ds(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),d.vertexLength+=4,d.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)},go("CircleBucket",zs,{omit:["layers"]});var el=new ca({"circle-sort-key":new oa(lt.layout_circle["circle-sort-key"])}),tl={paint:new ca({"circle-radius":new oa(lt.paint_circle["circle-radius"]),"circle-color":new oa(lt.paint_circle["circle-color"]),"circle-blur":new oa(lt.paint_circle["circle-blur"]),"circle-opacity":new oa(lt.paint_circle["circle-opacity"]),"circle-translate":new ia(lt.paint_circle["circle-translate"]),"circle-translate-anchor":new ia(lt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ia(lt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ia(lt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new oa(lt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new oa(lt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new oa(lt.paint_circle["circle-stroke-opacity"])}),layout:el},rl="undefined"!==typeof Float32Array?Float32Array:Array;function nl(){var e=new rl(4);return rl!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function il(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*s,e[1]=i*l+a*s,e[2]=n*-s+o*l,e[3]=i*-s+a*l,e}function ol(){var e=new rl(9);return rl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function al(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function sl(){var e=new rl(16);return rl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function ll(e){var t=new rl(16);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}function cl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ul(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,x=r*l-i*a,b=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,S=u*m-d*p,T=u*g-f*p,M=u*v-h*p,C=d*g-f*m,A=d*v-h*m,E=f*v-h*g,I=y*E-x*A+b*C+w*M-_*T+k*S;return I?(I=1/I,e[0]=(s*E-l*A+c*C)*I,e[1]=(i*A-n*E-o*C)*I,e[2]=(m*k-g*_+v*w)*I,e[3]=(f*_-d*k-h*w)*I,e[4]=(l*M-a*E-c*T)*I,e[5]=(r*E-i*M+o*T)*I,e[6]=(g*b-p*k-v*x)*I,e[7]=(u*k-f*b+h*x)*I,e[8]=(a*A-s*M+c*S)*I,e[9]=(n*M-r*A-o*S)*I,e[10]=(p*_-m*b+v*y)*I,e[11]=(d*b-u*_-h*y)*I,e[12]=(s*T-a*C-l*S)*I,e[13]=(r*C-n*T+i*S)*I,e[14]=(m*x-p*w-g*y)*I,e[15]=(u*w-d*x+f*y)*I,e):null}function dl(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],w=r[2],_=r[3];return e[0]=x*n+b*s+w*d+_*m,e[1]=x*i+b*l+w*f+_*g,e[2]=x*o+b*c+w*h+_*v,e[3]=x*a+b*u+w*p+_*y,x=r[4],b=r[5],w=r[6],_=r[7],e[4]=x*n+b*s+w*d+_*m,e[5]=x*i+b*l+w*f+_*g,e[6]=x*o+b*c+w*h+_*v,e[7]=x*a+b*u+w*p+_*y,x=r[8],b=r[9],w=r[10],_=r[11],e[8]=x*n+b*s+w*d+_*m,e[9]=x*i+b*l+w*f+_*g,e[10]=x*o+b*c+w*h+_*v,e[11]=x*a+b*u+w*p+_*y,x=r[12],b=r[13],w=r[14],_=r[15],e[12]=x*n+b*s+w*d+_*m,e[13]=x*i+b*l+w*f+_*g,e[14]=x*o+b*c+w*h+_*v,e[15]=x*a+b*u+w*p+_*y,e}function fl(e,t,r){var n,i,o,a,s,l,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+c*g+h*v+t[14],e[15]=a*m+u*g+p*v+t[15]),e}function hl(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function pl(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*n,e[5]=a*i+u*n,e[6]=s*i+d*n,e[7]=l*i+f*n,e[8]=c*i-o*n,e[9]=u*i-a*n,e[10]=d*i-s*n,e[11]=f*i-l*n,e}function ml(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(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[0]=o*i+c*n,e[1]=a*i+u*n,e[2]=s*i+d*n,e[3]=l*i+f*n,e[4]=c*i-o*n,e[5]=u*i-a*n,e[6]=d*i-s*n,e[7]=f*i-l*n,e}function gl(e,t,r,n,i){var o,a=1/Math.tan(t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(n-i),e[10]=(i+n)*o,e[14]=2*i*n*o):(e[10]=-1,e[14]=-2*n),e}function vl(e,t,r,n,i,o,a){var s=1/(t-r),l=1/(n-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(a+o)*c,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var yl=dl;function xl(){var e=new rl(3);return rl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function bl(e){var t=new rl(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function wl(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function _l(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function kl(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function Sl(e,t){var r=t[0],n=t[1],i=t[2],o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function Tl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ml(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2];return e[0]=i*l-o*s,e[1]=o*a-n*l,e[2]=n*s-i*a,e}function Cl(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}var Al=_l;function El(){var e=new rl(4);return rl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Il(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Ol(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Pl(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,e}function Rl(){var e=new rl(2);return rl!=Float32Array&&(e[0]=0,e[1]=0),e}function Ll(e){var t=e[0],r=e[1];return t*t+r*r}xl(),El();var jl=Ll,Dl=(Rl(),function(e){function t(t){e.call(this,t,tl)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new zs(e)},t.prototype.queryRadius=function(e){var t=e;return $s("circle-radius",this,t)+$s("circle-stroke-width",this,t)+Js(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,a,s){for(var l=Qs(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u="map"===this.paint.get("circle-pitch-alignment"),d=u?l:Nl(l,s),f=u?c*a:c,h=0,p=n;he.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l80*r){n=o=e[0],i=a=e[1];for(var p=r;po&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-n,a-i))?1/c:0}return rc(f,h,r,n,i,c),h}function ec(e,t,r,n,i){var o,a;if(i===Ic(e,t,r,n)>0)for(o=t;o=t;o-=n)a=Cc(o,e[o],e[o+1],a);return a&&xc(a,a.next)&&(Ac(a),a=a.next),a}function tc(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!xc(n,n.next)&&0!==yc(n.prev,n,n.next))n=n.next;else{if(Ac(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function rc(e,t,r,n,i,o,a){if(e){!a&&o&&fc(e,n,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?ic(e,n,i,o):nc(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),Ac(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?rc(e=oc(tc(e),t,r),t,r,n,i,o,2):2===a&&ac(e,t,r,n,i,o):rc(tc(e),t,r,n,i,o,1);break}}}function nc(e){var t=e.prev,r=e,n=e.next;if(yc(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(gc(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&yc(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ic(e,t,r,n){var i=e.prev,o=e,a=e.next;if(yc(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=pc(s,l,t,r,n),f=pc(c,u,t,r,n),h=e.prevZ,p=e.nextZ;h&&h.z>=d&&p&&p.z<=f;){if(h!==e.prev&&h!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&yc(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&yc(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function oc(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!xc(i,o)&&bc(i,n,n.next,o)&&Sc(i,o)&&Sc(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),Ac(n),Ac(n.next),n=e=o),n=n.next}while(n!==e);return tc(n)}function ac(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&vc(a,s)){var l=Mc(a,s);return a=tc(a,a.next),l=tc(l,l.next),rc(a,t,r,n,i,o),void rc(l,t,r,n,i,o)}s=s.next}a=a.next}while(a!==e)}function sc(e,t,r,n){var i,o,a,s=[];for(i=0,o=t.length;i=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&gc(or.x||n.x===r.x&&dc(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}function dc(e,t){return yc(e.prev,e,t.prev)<0&&yc(t.next,e,e.next)<0}function fc(e,t,r,n){var i=e;do{null===i.z&&(i.z=pc(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,hc(i)}function hc(e){var t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1);return e}function pc(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function mc(e){var t=e,r=e;do{(t.x=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function vc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!kc(e,t)&&(Sc(e,t)&&Sc(t,e)&&Tc(e,t)&&(yc(e.prev,e,t.prev)||yc(e,t.prev,t))||xc(e,t)&&yc(e.prev,e,e.next)>0&&yc(t.prev,t,t.next)>0)}function yc(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function xc(e,t){return e.x===t.x&&e.y===t.y}function bc(e,t,r,n){var i=_c(yc(e,t,r)),o=_c(yc(e,t,n)),a=_c(yc(r,n,e)),s=_c(yc(r,n,t));return i!==o&&a!==s||!(0!==i||!wc(e,r,t))||!(0!==o||!wc(e,n,t))||!(0!==a||!wc(r,e,n))||!(0!==s||!wc(r,t,n))}function wc(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _c(e){return e>0?1:e<0?-1:0}function kc(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&bc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Sc(e,t){return yc(e.prev,e,e.next)<0?yc(e,t,e.next)>=0&&yc(e,e.prev,t)>=0:yc(e,t,e.prev)<0||yc(e,e.next,t)<0}function Tc(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{r.y>o!==r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function Mc(e,t){var r=new Ec(e.i,e.x,e.y),n=new Ec(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Cc(e,t,r,n){var i=new Ec(e,t,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 Ac(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ec(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ic(e,t,r,n){for(var i=0,o=t,a=r-n;or;){if(n-r>600){var o=n-r+1,a=t-r+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Pc(e,t,Math.max(r,Math.floor(t-a*l/o+c)),Math.min(n,Math.floor(t+(o-a)*l/o+c)),i)}var u=e[t],d=r,f=n;for(Rc(e,r,t),i(e[n],u)>0&&Rc(e,r,n);d0;)f--}0===i(e[r],u)?Rc(e,r,f):Rc(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function Rc(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Lc(e,t){return et?1:0}function jc(e,t){var r=e.length;if(r<=1)return[e];for(var n,i,o=[],a=0;a1)for(var l=0;l0&&(n+=e[i-1].length,r.holes.push(n))}return r},$l.default=Jl;var Fc=500,Bc=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ba,this.indexArray=new Pa,this.indexArray2=new Na,this.programConfigurations=new As(Kl,e.layers,e.zoom),this.segments=new Qa,this.segments2=new Qa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Bc.prototype.populate=function(e,t,r){this.hasPattern=zc("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=e;o>3}if(i--,1===n||2===n)a+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new o(a,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Gc.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(o+=e.readSVarint())c&&(c=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,c]},Gc.prototype.toGeoJSON=function(e,t,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Gc.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}function tu(e,t){this.layers=e.readFields(ru,{},t)}function ru(e,t,r){if(3===e){var n=new $c(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}Jc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Wc(this._pbf,t,this.extent,this._keys,this._values)};var nu={VectorTile:tu,VectorTileFeature:Wc,VectorTileLayer:$c},iu=nu.VectorTileFeature.types,ou=500,au=Math.pow(2,13);function su(e,t,r,n,i,o,a,s){e.emplaceBack(t,r,2*Math.floor(n*au)+a,i*au*2,o*au*2,Math.round(s))}var lu=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _a,this.indexArray=new Pa,this.programConfigurations=new As(Hc,e.layers,e.zoom),this.segments=new Qa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function cu(e,t){return e.x===t.x&&(e.x<0||e.x>Ps)||e.y===t.y&&(e.y<0||e.y>Ps)}function uu(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>Ps}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>Ps}))}lu.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=zc("fill-extrusion",this.layers,t);for(var n=0,i=e;n=1){var y=p[g-1];if(!cu(v,y)){d.vertexLength+4>Qa.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);m+b>32768&&(m=0),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m),m+=b,su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m);var w=d.vertexLength;this.indexArray.emplaceBack(w,w+2,w+1),this.indexArray.emplaceBack(w+1,w+2,w+3),d.vertexLength+=4,d.primitiveLength+=2}}}}if(d.vertexLength+l>Qa.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===iu[e.type]){for(var _=[],k=[],S=d.vertexLength,T=0,M=s;T=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c0;if(k&&v>c){var T=u.dist(h);if(T>2*d){var M=u.sub(u.sub(h)._mult(d/T)._round());this.updateDistance(h,M),this.addCurrentVertex(M,m,0,0,f),h=M}}var C=h&&p,A=C?r:s?"butt":n;if(C&&"round"===A&&(wi&&(A="bevel"),"bevel"===A&&(w>2&&(A="flipbevel"),w100)y=g.mult(-1);else{var E=w*m.add(g).mag()/m.sub(g).mag();y._perp()._mult(E*(S?-1:1))}this.addCurrentVertex(u,y,0,0,f),this.addCurrentVertex(u,y.mult(-1),0,0,f)}else if("bevel"===A||"fakeround"===A){var I=-Math.sqrt(w*w-1),O=S?I:0,P=S?0:I;if(h&&this.addCurrentVertex(u,m,O,P,f),"fakeround"===A)for(var R=Math.round(180*_/Math.PI/ku),L=1;L2*d){var B=u.add(p.sub(u)._mult(d/F)._round());this.updateDistance(u,B),this.addCurrentVertex(B,g,0,0,f),u=B}}}}},Cu.prototype.addCurrentVertex=function(e,t,r,n,i,o){void 0===o&&(o=!1);var a=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,c=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,r,i),this.addHalfVertex(e,l,c,o,!0,-n,i),this.distance>Mu/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,i,o))},Cu.prototype.addHalfVertex=function(e,t,r,n,i,o,a){var s=e.x,l=e.y,c=this.scaledDistance*Tu;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(bu*t)+128,Math.round(bu*r)+128,1+(0===o?0:o<0?-1:1)|(63&c)<<2,c>>6);var u=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),a.primitiveLength++),i?this.e2=u:this.e1=u},Cu.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Mu-1):this.distance},Cu.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},go("LineBucket",Cu,{omit:["layers","patternFeatures"]});var Au=new ca({"line-cap":new ia(lt.layout_line["line-cap"]),"line-join":new oa(lt.layout_line["line-join"]),"line-miter-limit":new ia(lt.layout_line["line-miter-limit"]),"line-round-limit":new ia(lt.layout_line["line-round-limit"]),"line-sort-key":new oa(lt.layout_line["line-sort-key"])}),Eu={paint:new ca({"line-opacity":new oa(lt.paint_line["line-opacity"]),"line-color":new oa(lt.paint_line["line-color"]),"line-translate":new ia(lt.paint_line["line-translate"]),"line-translate-anchor":new ia(lt.paint_line["line-translate-anchor"]),"line-width":new oa(lt.paint_line["line-width"]),"line-gap-width":new oa(lt.paint_line["line-gap-width"]),"line-offset":new oa(lt.paint_line["line-offset"]),"line-blur":new oa(lt.paint_line["line-blur"]),"line-dasharray":new sa(lt.paint_line["line-dasharray"]),"line-pattern":new aa(lt.paint_line["line-pattern"]),"line-gradient":new la(lt.paint_line["line-gradient"])}),layout:Au},Iu=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new Xo(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,i){return r=g({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,i)},t}(oa),Ou=new Iu(Eu.paint.properties["line-width"].specification);Ou.useIntegerZoom=!0;var Pu=function(e){function t(t){e.call(this,t,Eu)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Gl(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,r){e.prototype.recalculate.call(this,t,r),this.paint._values["line-floorwidth"]=Ou.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Cu(e)},t.prototype.queryRadius=function(e){var t=e,r=Ru($s("line-width",this,t),$s("line-gap-width",this,t)),n=$s("line-offset",this,t);return r/2+Math.abs(n)+Js(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,a){var s=Qs(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),l=a/2*Ru(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),c=this.paint.get("line-offset").evaluate(t,r);return c&&(n=Lu(n,c*a)),Zs(s,n,l)},t.prototype.isTileClipped=function(){return!0},t}(da);function Ru(e,t){return t>0?t+2*e:e}function Lu(e,t){for(var r=[],n=new o(0,0),i=0;i":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Hu(e){for(var t="",r=0;r>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},write:function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},qu=Yu;function Yu(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Yu.Varint=0,Yu.Fixed64=1,Yu.Bytes=2,Yu.Fixed32=5;var Xu=4294967296,Ku=1/Xu,$u=12,Ju="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function Qu(e,t,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return td(e,n,t);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return td(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function ed(e){return e.type===Yu.Bytes?e.readVarint()+e.pos:e.pos+1}function td(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function rd(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),nd(r,n,t),id(n,t)}function nd(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}function id(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function od(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function ad(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function vd(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function yd(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128===(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}function xd(e,t,r){return Ju.decode(e.subarray(t,r))}function bd(e,t,r){for(var n,i,o=0;o55295&&n<57344){if(!i){n>56319||o+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}Yu.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=7&n,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=md(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=vd(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=md(this.buf,this.pos)+md(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readSFixed64:function(){var e=md(this.buf,this.pos)+vd(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readFloat:function(){var e=Gu.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Gu.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:Qu(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=$u&&Ju?xd(this.buf,t,e):yd(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Yu.Bytes)return e.push(this.readVarint(t));var r=ed(this);for(e=e||[];this.pos127;);else if(t===Yu.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Yu.Fixed32)this.pos+=4;else{if(t!==Yu.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?rd(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=bd(this.buf,e,this.pos);var r=this.pos-t;r>=128&&od(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Gu.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Gu.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&od(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Yu.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,ad,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,sd,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,ud,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ld,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,cd,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,dd,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,fd,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,hd,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,pd,t)},writeBytesField:function(e,t){this.writeTag(e,Yu.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Yu.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Yu.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Yu.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var wd=3;function _d(e,t,r){1===e&&r.readMessage(kd,t)}function kd(e,t,r){if(3===e){var n=r.readMessage(Sd,{}),i=n.id,o=n.bitmap,a=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;t.push({id:i,bitmap:new Vl({width:a+2*wd,height:s+2*wd},o),metrics:{width:a,height:s,left:l,top:c,advance:u}})}}function Sd(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function Td(e){return new qu(e).readFields(_d,[])}var Md=wd;function Cd(e){for(var t=0,r=0,n=0,i=e;n=0;f--){var h=a[f];if(!(d.w>h.w||d.h>h.h)){if(d.x=h.x,d.y=h.y,l=Math.max(l,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===h.w&&d.h===h.h){var p=a.pop();f=0&&n>=e&&Zd[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Nd.prototype.substring=function(e,t){var r=new Nd;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Nd.prototype.toString=function(){return this.text},Nd.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},Nd.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(zd.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,n=0;n=Dd?null:++this.imageSectionID:(this.imageSectionID=jd,this.imageSectionID)};var Zd={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ud={};function Vd(e,t,r,n,i,o){if(t.imageName){var a=n[t.imageName];return a?a.displaySize[0]*t.scale*Wu/o+i:0}var s=r[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function Hd(e,t,r,n,i,o){for(var a=0,s=0;s=0,u=0,d=0;d0&&N>T&&(T=N)}else{var F=r[C.fontStack],B=F&&F[E];if(B&&B.rect)P=B.rect,O=B.metrics;else{var Z=t[C.fontStack],U=Z&&Z[E];if(!U)continue;O=U.metrics}I=(w-C.scale)*Wu}j?(e.verticalizable=!0,S.push({glyph:E,imageName:R,x:f,y:h+I,vertical:j,scale:C.scale,fontStack:C.fontStack,sectionIndex:A,metrics:O,rect:P}),f+=L*C.scale+c):(S.push({glyph:E,imageName:R,x:f,y:h+I,vertical:j,scale:C.scale,fontStack:C.fontStack,sectionIndex:A,metrics:O,rect:P}),f+=O.advance*C.scale+c)}if(0!==S.length){var V=f-c;p=Math.max(V,p),Jd(S,0,S.length-1,g,T)}f=0;var H=o*w+T;k.lineOffset=Math.max(T,_),h+=H,m=Math.max(H,m),++v}else h+=o,++v}var W=h-Rd,G=Kd(a),q=G.horizontalAlign,Y=G.verticalAlign;Qd(e.positionedLines,g,q,Y,p,m,o,W,i.length),e.top+=-Y*W,e.bottom=e.top+W,e.left+=-q*p,e.right=e.left+p}function Jd(e,t,r,n,i){if(n||i)for(var o=e[r],a=o.metrics.advance*o.scale,s=(e[r].x+a)*n,l=t;l<=r;l++)e[l].x-=s,e[l].y+=i}function Qd(e,t,r,n,i,o,a,s,l){var c=(t-r)*i,u=0;u=o!==a?-s*n-Rd:(-n*l+.5)*a;for(var d=0,f=e;d-r/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=d.dist(f)}return!0}function uf(e){for(var t=0,r=0;rc){var p=(c-l)/h,m=Dr(d.x,f.x,p),g=Dr(d.y,f.y,p),v=new rf(m,g,f.angleTo(d),u);return v._round(),!a||cf(e,v,s,a,t)?v:void 0}l+=h}}function pf(e,t,r,n,i,o,a,s,l){var c=df(n,o,a),u=ff(n,i),d=u*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&b=0&&w=0&&f+c<=u){var _=new rf(b,w,y,p);_._round(),n&&!cf(e,_,o,n,i)||h.push(_)}}d+=v}return s||h.length||a||(h=mf(e,d/2,r,n,i,o,a,!0,l)),h}function gf(e,t,r,n,i){for(var a=[],s=0;s=n&&f.x>=n||(d.x>=n?d=new o(n,d.y+(f.y-d.y)*((n-d.x)/(f.x-d.x)))._round():f.x>=n&&(f=new o(n,d.y+(f.y-d.y)*((n-d.x)/(f.x-d.x)))._round()),d.y>=i&&f.y>=i||(d.y>=i?d=new o(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round():f.y>=i&&(f=new o(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round()),c&&d.equals(c[c.length-1])||(c=[d],a.push(c)),c.push(f)))))}return a}var vf=Ad;function yf(e,t,r,n){var i=[],a=e.image,s=a.pixelRatio,l=a.paddedRect.w-2*vf,c=a.paddedRect.h-2*vf,u=e.right-e.left,d=e.bottom-e.top,f=a.stretchX||[[0,l]],h=a.stretchY||[[0,c]],p=function(e,t){return e+t[1]-t[0]},m=f.reduce(p,0),g=h.reduce(p,0),v=l-m,y=c-g,x=0,b=m,w=0,_=g,k=0,S=v,T=0,M=y;if(a.content&&n){var C=a.content;x=xf(f,0,C[0]),w=xf(h,0,C[1]),b=xf(f,C[0],C[2]),_=xf(h,C[1],C[3]),k=C[0]-x,T=C[1]-w,S=C[2]-C[0]-b,M=C[3]-C[1]-_}var A=function(n,i,l,c){var f=wf(n.stretch-x,b,u,e.left),h=_f(n.fixed-k,S,n.stretch,m),p=wf(i.stretch-w,_,d,e.top),v=_f(i.fixed-T,M,i.stretch,g),y=wf(l.stretch-x,b,u,e.left),C=_f(l.fixed-k,S,l.stretch,m),A=wf(c.stretch-w,_,d,e.top),E=_f(c.fixed-T,M,c.stretch,g),I=new o(f,p),O=new o(y,p),P=new o(y,A),R=new o(f,A),L=new o(h/s,v/s),j=new o(C/s,E/s),D=t*Math.PI/180;if(D){var z=Math.sin(D),N=Math.cos(D),F=[N,-z,z,N];I._matMult(F),O._matMult(F),R._matMult(F),P._matMult(F)}var B=n.stretch+n.fixed,Z=l.stretch+l.fixed,U=i.stretch+i.fixed,V=c.stretch+c.fixed;return{tl:I,tr:O,bl:R,br:P,tex:{x:a.paddedRect.x+vf+B,y:a.paddedRect.y+vf+U,w:Z-B,h:V-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:j,minFontScaleX:S/s/u,minFontScaleY:M/s/d,isSDF:r}};if(n&&(a.stretchX||a.stretchY))for(var E=bf(f,v,m),I=bf(h,y,g),O=0;O0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var m=a.top*s-l,g=a.bottom*s+l,v=a.left*s-l,y=a.right*s+l,x=a.collisionPadding;if(x&&(v-=x[0]*s,m-=x[1]*s,y+=x[2]*s,g+=x[3]*s),u){var b=new o(v,m),w=new o(y,m),_=new o(v,g),k=new o(y,g),S=u*Math.PI/180;b._rotate(S),w._rotate(S),_._rotate(S),k._rotate(S),v=Math.min(b.x,w.x,_.x,k.x),y=Math.max(b.x,w.x,_.x,k.x),m=Math.min(b.y,w.y,_.y,k.y),g=Math.max(b.y,w.y,_.y,k.y)}e.emplaceBack(t.x,t.y,v,m,y,g,r,n,i)}this.boxEndIndex=e.length},Tf=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Mf),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Mf(e,t){return et?1:0}function Cf(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,a=-1/0,s=-1/0,l=e[0],c=0;ca)&&(a=u.x),(!c||u.y>s)&&(s=u.y)}var d=a-n,f=s-i,h=Math.min(d,f),p=h/2,m=new Tf([],Af);if(0===h)return new o(n,i);for(var g=n;gy.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<=t||(p=b.h/2,m.push(new Ef(b.p.x-p,b.p.y-p,p,e)),m.push(new Ef(b.p.x+p,b.p.y-p,p,e)),m.push(new Ef(b.p.x-p,b.p.y+p,p,e)),m.push(new Ef(b.p.x+p,b.p.y+p,p,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+y.d)),y.p}function Af(e,t){return t.max-e.max}function Ef(e,t,r,n){this.p=new o(e,t),this.h=r,this.d=If(this.p,n),this.max=this.d+this.h*Math.SQRT2}function If(e,t){for(var r=!1,n=1/0,i=0;ie.y!==u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,Gs(e,c,u))}return(r?1:-1)*Math.sqrt(n)}function Of(e){for(var t=0,r=0,n=0,i=e[0],o=0,a=i.length,s=a-1;o0&&(this.data[0]=t,this._down(0)),e}},Tf.prototype.peek=function(){return this.data[0]},Tf.prototype._up=function(e){for(var t=this,r=t.data,n=t.compare,i=r[e];e>0;){var o=e-1>>1,a=r[o];if(n(i,a)>=0)break;r[e]=a,e=o}r[e]=i},Tf.prototype._down=function(e){for(var t=this,r=t.data,n=t.compare,i=this.length>>1,o=r[e];e=0)break;r[e]=s,e=a}r[e]=o};var Pf=7,Rf=Number.POSITIVE_INFINITY;function Lf(e,t){function r(e,t){var r=0,n=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=i-Pf;break;case"bottom-right":case"bottom-left":n=-i+Pf;break;case"bottom":n=-t+Pf;break;case"top":n=t-Pf}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}function n(e,t,r){var n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-Pf;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+Pf}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}return t[1]!==Rf?n(e,t[0],t[1]):r(e,t[0])}function jf(e,t,r,n,i,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=Ps/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var d=e.textSizeData,f=d.minZoom,h=d.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new Xo(f),a),c["text-size"].possiblyEvaluate(new Xo(h),a)]}if("composite"===e.iconSizeData.kind){var p=e.iconSizeData,m=p.minZoom,g=p.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new Xo(m),a),c["icon-size"].possiblyEvaluate(new Xo(g),a)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new Xo(e.zoom+1),a),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new Xo(e.zoom+1),a),u.textMaxSize=c["text-size"].possiblyEvaluate(new Xo(18));for(var v=l.get("text-line-height")*Wu,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),w=function(){var o=k[_],s=l.get("text-font").evaluate(o,{},a).join(","),c=b.evaluate(o,{},a),d=u.layoutTextSize.evaluate(o,{},a),f=u.layoutIconSize.evaluate(o,{},a),h={horizontal:{},vertical:void 0},p=o.text,m=[0,0];if(p){var g=p.toString(),w=l.get("text-letter-spacing").evaluate(o,{},a)*Wu,S=To(g)?w:0,T=l.get("text-anchor").evaluate(o,{},a),M=l.get("text-variable-anchor");if(!M){var C=l.get("text-radial-offset").evaluate(o,{},a);m=C?Lf(T,[C*Wu,Rf]):l.get("text-offset").evaluate(o,{},a).map((function(e){return e*Wu}))}var A=y?"center":l.get("text-justify").evaluate(o,{},a),I=l.get("symbol-placement"),O="point"===I?l.get("text-max-width").evaluate(o,{},a)*Wu:0,P=function(){e.allowVerticalPlacement&&So(g)&&(h.vertical=Bd(p,t,r,i,s,O,v,T,"left",S,m,Pd.vertical,!0,I,d,c))};if(!y&&M){for(var R="auto"===A?M.map((function(e){return Df(e)})):[A],L=!1,j=0;j=Ps||d.y<0||d.y>=Ps||Uf(e,d,s,r,n,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,_,T,l,b,k,M,p,t,o,c,u,a)};if("line"===C)for(var O=0,P=gf(t.geometry,0,0,Ps,Ps);O1){var B=hf(F,S,r.vertical||m,n,g,x);B&&I(F,B)}}else if("Polygon"===t.type)for(var Z=0,U=jc(t.geometry,0);ZFf&&E(e.layerIds[0]+': Value for "text-size" is >= '+Nf+'. Reduce your "text-size".'):"composite"===g.kind&&((v=[nf*h.compositeTextSizes[0].evaluate(a,{},p),nf*h.compositeTextSizes[1].evaluate(a,{},p)])[0]>Ff||v[1]>Ff)&&E(e.layerIds[0]+': Value for "text-size" is >= '+Nf+'. Reduce your "text-size".'),e.addSymbols(e.text,m,v,s,o,a,c,t,l.lineStartIndex,l.lineLength,f,p);for(var y=0,x=u;yFf&&E(e.layerIds[0]+': Value for "icon-size" is >= '+Nf+'. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[nf*w.compositeIconSizes[0].evaluate(b,{},k),nf*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>Ff||X[1]>Ff)&&E(e.layerIds[0]+': Value for "icon-size" is >= '+Nf+'. Reduce your "icon-size".'),e.addSymbols(e.icon,G,X,x,y,b,!1,t,O.lineStartIndex,O.lineLength,-1,k),D=e.icon.placedSymbolArray.length-1,q&&(R=4*q.length,e.addSymbols(e.icon,q,X,x,y,b,Pd.vertical,t,O.lineStartIndex,O.lineLength,-1,k),z=e.icon.placedSymbolArray.length-1)}for(var K in n.horizontal){var $=n.horizontal[K];if(!M){F=is($.text);var J=s.layout.get("text-rotate").evaluate(b,{},k);M=new Sf(l,t,c,u,d,$,f,h,p,J)}var Q=1===$.positionedLines.length;if(L+=Bf(e,t,$,o,s,p,b,m,O,n.vertical?Pd.horizontal:Pd.horizontalOnly,Q?Object.keys(n.horizontal):[K],N,D,w,k),Q)break}n.vertical&&(j+=Bf(e,t,n.vertical,o,s,p,b,m,O,Pd.vertical,["vertical"],N,z,w,k));var ee=M?M.boxStartIndex:e.collisionBoxArray.length,te=M?M.boxEndIndex:e.collisionBoxArray.length,re=A?A.boxStartIndex:e.collisionBoxArray.length,ne=A?A.boxEndIndex:e.collisionBoxArray.length,ie=C?C.boxStartIndex:e.collisionBoxArray.length,oe=C?C.boxEndIndex:e.collisionBoxArray.length,ae=I?I.boxStartIndex:e.collisionBoxArray.length,se=I?I.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(M,le),le=ce(A,le),le=ce(C,le);var ue=(le=ce(I,le))>-1?1:0;ue&&(le*=S/Wu),e.glyphOffsetArray.length>=$f.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical||-1,D,z,F,ee,te,re,ne,ie,oe,ae,se,c,L,j,P,R,ue,0,f,B,Z,le)}function Vf(e,t,r,n){var i=e.compareText;if(t in i){for(var o=i[t],a=o.length-1;a>=0;a--)if(n.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var d=t.iconDependencies,f=t.glyphDependencies,h=t.availableImages,p=new Xo(this.zoom),m=0,g=e;m=0;for(var R=0,L=S.sections;R=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},$f.prototype.hasIconData=function(){return this.icon.segments.get().length>0},$f.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},$f.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},$f.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},$f.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},go("SymbolBucket",$f,{omit:["layers","collisionBoxArray","features","compareText"]}),$f.MAX_GLYPHS=65535,$f.addDynamicAttributes=qf;var Qf=new ca({"symbol-placement":new ia(lt.layout_symbol["symbol-placement"]),"symbol-spacing":new ia(lt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ia(lt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oa(lt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ia(lt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ia(lt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ia(lt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ia(lt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ia(lt.layout_symbol["icon-rotation-alignment"]),"icon-size":new oa(lt.layout_symbol["icon-size"]),"icon-text-fit":new ia(lt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ia(lt.layout_symbol["icon-text-fit-padding"]),"icon-image":new oa(lt.layout_symbol["icon-image"]),"icon-rotate":new oa(lt.layout_symbol["icon-rotate"]),"icon-padding":new ia(lt.layout_symbol["icon-padding"]),"icon-keep-upright":new ia(lt.layout_symbol["icon-keep-upright"]),"icon-offset":new oa(lt.layout_symbol["icon-offset"]),"icon-anchor":new oa(lt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ia(lt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ia(lt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ia(lt.layout_symbol["text-rotation-alignment"]),"text-field":new oa(lt.layout_symbol["text-field"]),"text-font":new oa(lt.layout_symbol["text-font"]),"text-size":new oa(lt.layout_symbol["text-size"]),"text-max-width":new oa(lt.layout_symbol["text-max-width"]),"text-line-height":new ia(lt.layout_symbol["text-line-height"]),"text-letter-spacing":new oa(lt.layout_symbol["text-letter-spacing"]),"text-justify":new oa(lt.layout_symbol["text-justify"]),"text-radial-offset":new oa(lt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ia(lt.layout_symbol["text-variable-anchor"]),"text-anchor":new oa(lt.layout_symbol["text-anchor"]),"text-max-angle":new ia(lt.layout_symbol["text-max-angle"]),"text-writing-mode":new ia(lt.layout_symbol["text-writing-mode"]),"text-rotate":new oa(lt.layout_symbol["text-rotate"]),"text-padding":new ia(lt.layout_symbol["text-padding"]),"text-keep-upright":new ia(lt.layout_symbol["text-keep-upright"]),"text-transform":new oa(lt.layout_symbol["text-transform"]),"text-offset":new oa(lt.layout_symbol["text-offset"]),"text-allow-overlap":new ia(lt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ia(lt.layout_symbol["text-ignore-placement"]),"text-optional":new ia(lt.layout_symbol["text-optional"])}),eh={paint:new ca({"icon-opacity":new oa(lt.paint_symbol["icon-opacity"]),"icon-color":new oa(lt.paint_symbol["icon-color"]),"icon-halo-color":new oa(lt.paint_symbol["icon-halo-color"]),"icon-halo-width":new oa(lt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oa(lt.paint_symbol["icon-halo-blur"]),"icon-translate":new ia(lt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ia(lt.paint_symbol["icon-translate-anchor"]),"text-opacity":new oa(lt.paint_symbol["text-opacity"]),"text-color":new oa(lt.paint_symbol["text-color"],{runtimeType:bt,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new oa(lt.paint_symbol["text-halo-color"]),"text-halo-width":new oa(lt.paint_symbol["text-halo-width"]),"text-halo-blur":new oa(lt.paint_symbol["text-halo-blur"]),"text-translate":new ia(lt.paint_symbol["text-translate"]),"text-translate-anchor":new ia(lt.paint_symbol["text-translate-anchor"])}),layout:Qf},th=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:gt,this.defaultValue=e};th.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},th.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},th.prototype.outputDefined=function(){return!1},th.prototype.serialize=function(){return null},go("FormatSectionOverride",th,{omit:["defaultValue"]});var rh=function(e){function t(t){e.call(this,t,eh)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,r){if(e.prototype.recalculate.call(this,t,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=[],o=0,a=n;o",targetMapId:n,sourceMapId:o.mapId})}}},yh.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else R()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},yh.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},yh.prototype.processTask=function(e,t){var r=this;if(""===t.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(wo(t.error)):n(null,wo(t.data)))}else{var i=!1,o=D(this.globalScope)?void 0:[],a=t.hasCallback?function(t,n){i=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"",sourceMapId:r.mapId,error:t?bo(t):null,data:bo(n,o)},o)}:function(e){i=!0},s=null,l=wo(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,a);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,a)}else a(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},yh.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var wh=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};wh.prototype.setNorthEast=function(e){return this._ne=e instanceof kh?new kh(e.lng,e.lat):kh.convert(e),this},wh.prototype.setSouthWest=function(e){return this._sw=e instanceof kh?new kh(e.lng,e.lat):kh.convert(e),this},wh.prototype.extend=function(e){var t,r,n=this._sw,i=this._ne;if(e instanceof kh)t=e,r=e;else{if(!(e instanceof wh)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var o=e;return this.extend(wh.convert(o))}var a=e;return this.extend(kh.convert(a))}return this}if(t=e._sw,r=e._ne,!t||!r)return this}return n||i?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new kh(t.lng,t.lat),this._ne=new kh(r.lng,r.lat)),this},wh.prototype.getCenter=function(){return new kh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},wh.prototype.getSouthWest=function(){return this._sw},wh.prototype.getNorthEast=function(){return this._ne},wh.prototype.getNorthWest=function(){return new kh(this.getWest(),this.getNorth())},wh.prototype.getSouthEast=function(){return new kh(this.getEast(),this.getSouth())},wh.prototype.getWest=function(){return this._sw.lng},wh.prototype.getSouth=function(){return this._sw.lat},wh.prototype.getEast=function(){return this._ne.lng},wh.prototype.getNorth=function(){return this._ne.lat},wh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},wh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},wh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},wh.prototype.contains=function(e){var t=kh.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,o=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=r&&r>=this._ne.lng),i&&o},wh.convert=function(e){return!e||e instanceof wh?e:new wh(e)};var _h=6371008.8,kh=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};kh.prototype.wrap=function(){return new kh(f(this.lng,-180,180),this.lat)},kh.prototype.toArray=function(){return[this.lng,this.lat]},kh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},kh.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return _h*Math.acos(Math.min(i,1))},kh.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new wh(new kh(this.lng-r,this.lat-t),new kh(this.lng+r,this.lat+t))},kh.convert=function(e){if(e instanceof kh)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new kh(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===typeof e&&null!==e)return new kh(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Sh=2*Math.PI*_h;function Th(e){return Sh*Math.cos(e*Math.PI/180)}function Mh(e){return(180+e)/360}function Ch(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Ah(e,t){return e/Th(t)}function Eh(e){return 360*e-180}function Ih(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function Oh(e,t){return e*Th(Ih(t))}function Ph(e){return 1/Math.cos(e*Math.PI/180)}var Rh=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Rh.fromLngLat=function(e,t){void 0===t&&(t=0);var r=kh.convert(e);return new Rh(Mh(r.lng),Ch(r.lat),Ah(t,r.lat))},Rh.prototype.toLngLat=function(){return new kh(Eh(this.x),Ih(this.y))},Rh.prototype.toAltitude=function(){return Oh(this.z,this.y)},Rh.prototype.meterInMercatorCoordinateUnits=function(){return 1/Sh*Ph(Ih(this.y))};var Lh=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=zh(0,e,e,t,r)};Lh.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Lh.prototype.url=function(e,t){var r=xh(this.x,this.y,this.z),n=Nh(this.z,this.x,this.y);return e[(this.x+this.y)%e.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"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",r)},Lh.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new o((e.x*t-this.x)*Ps,(e.y*t-this.y)*Ps)},Lh.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jh=function(e,t){this.wrap=e,this.canonical=t,this.key=zh(e,t.z,t.z,t.x,t.y)},Dh=function(e,t,r,n,i){this.overscaledZ=e,this.wrap=t,this.canonical=new Lh(r,+n,+i),this.key=zh(t,e,r,n,i)};function zh(e,t,r,n,i){(e*=2)<0&&(e=-1*e-1);var o=1<0;o--)i+=(t&(n=1<this.canonical.z?new Dh(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Dh(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Dh.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?zh(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):zh(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Dh.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Dh.prototype.children=function(e){if(this.overscaledZ>=e)return[new Dh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Dh(t,this.wrap,t,r,n),new Dh(t,this.wrap,t,r+1,n),new Dh(t,this.wrap,t,r,n+1),new Dh(t,this.wrap,t,r+1,n+1)]},Dh.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Fh.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Fh.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Fh.prototype.getPixels=function(){return new Hl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Fh.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,i=t*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-t*this.dim,l=-r*this.dim,c=o;c=0&&u[3]>=0&&s.insert(a,u[0],u[1],u[2],u[3])}},Wh.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new nu.VectorTile(new qu(this.rawTileData)).layers,this.sourceLayerCoder=new Zh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Wh.prototype.query=function(e,t,r,n){var i=this;this.loadVTLayers();for(var o=e.params||{},a=Ps/e.tileSize/e.scale,s=Ii(o.filter),l=e.queryGeometry,c=e.queryPadding*a,u=qh(l),d=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=qh(e.cameraQueryGeometry),h=0,p=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(t,r,n,i){return Xs(e.cameraQueryGeometry,t-c,r-c,n+c,i+c)}));hn)i=!1;else if(t)if(this.expirationTime=A.maxzoom||"none"!==A.visibility&&(l(C,this.zoom,n),(m[A.id]=A.createBucket({index:u.bucketLayerIDs.length,layers:C,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(w,g,this.tileID.canonical),u.bucketLayerIDs.push(C.map((function(e){return e.id}))))}}}var E=e.mapObject(g.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(E).length?i.send("getGlyphs",{uid:this.uid,stacks:E},(function(e,t){d||(d=e,f=t,P.call(s))})):f={};var I=Object.keys(g.iconDependencies);I.length?i.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){d||(d=e,h=t,P.call(s))})):h={};var O=Object.keys(g.patternDependencies);function P(){if(d)return o(d);if(f&&h&&p){var t=new a(f),r=new e.ImageAtlas(h,p);for(var i in m){var s=m[i];s instanceof e.SymbolBucket?(l(s.layers,this.zoom,n),e.performSymbolLayout(s,f,t.positions,h,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(l(s.layers,this.zoom,n),s.addFeatures(g,this.tileID.canonical,r.patternPositions))}this.status="done",o(null,{buckets:e.values(m).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?h:null,glyphPositions:this.returnDependencies?t.positions:null})}}O.length?i.send("getImages",{icons:O,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){d||(d=e,p=t,P.call(s))})):p={},P.call(this)};var u=function(e,t,r,n){this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=n||c,this.loading={},this.loaded={}};u.prototype.loadTile=function(t,r){var n=this,i=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),a=this.loading[i]=new s(t);a.abort=this.loadVectorData(t,(function(t,s){if(delete n.loading[i],t||!s)return a.status="done",n.loaded[i]=a,r(t);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(o){var d=o.finish();d&&(u.resourceTiming=JSON.parse(JSON.stringify(d)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=a}))},u.prototype.reloadTile=function(e,t){var r=this,n=this.loaded,i=e.uid,o=this;if(n&&n[i]){var a=n[i];a.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,n){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,i)),t(e,n)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},u.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},u.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var d=e.window.ImageBitmap,f=function(){this.loaded={}};f.prototype.loadTile=function(t,r){var n=t.uid,i=t.encoding,o=t.rawImageData,a=d&&o instanceof d?this.getImageData(o):o,s=new e.DEMData(n,a,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},f.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:r.width,height:r.height},r.data)},f.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h=p;function p(e,t){var r,n=e&&e.type;if("FeatureCollection"===n)for(r=0;r=0!==!!t&&e.reverse()}var v=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,y=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};y.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r>31}function D(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,o=0,a=r.length,s=0;s>1;F(e,t,a,n,i,o%2),N(e,t,r,n,a-1,o+1),N(e,t,r,a+1,i,o+1)}}function F(e,t,r,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,s=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);F(e,t,r,Math.max(n,Math.floor(r-s*c/a+u)),Math.min(i,Math.floor(r+(a-s)*c/a+u)),o)}var d=t[2*r+o],f=n,h=i;for(B(e,t,n,r),t[2*i+o]>d&&B(e,t,n,i);fd;)h--}t[2*n+o]===d?B(e,t,n,h):B(e,t,++h,i),h<=r&&(n=h+1),r<=h&&(i=h-1)}}function B(e,t,r,n){Z(e,r,n),Z(t,2*r,2*n),Z(t,2*r+1,2*n+1)}function Z(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function U(e,t,r,n,i,o,a){for(var s,l,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),f=c.pop(),h=c.pop();if(f-h<=a)for(var p=h;p<=f;p++)s=t[2*p],l=t[2*p+1],s>=r&&s<=i&&l>=n&&l<=o&&u.push(e[p]);else{var m=Math.floor((h+f)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=i&&l>=n&&l<=o&&u.push(e[m]);var g=(d+1)%2;(0===d?r<=s:n<=l)&&(c.push(h),c.push(m-1),c.push(g)),(0===d?i>=s:o>=l)&&(c.push(m+1),c.push(f),c.push(g))}}return u}function V(e,t,r,n,i,o){for(var a=[0,e.length-1,0],s=[],l=i*i;a.length;){var c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o)for(var f=d;f<=u;f++)H(t[2*f],t[2*f+1],r,n)<=l&&s.push(e[f]);else{var h=Math.floor((d+u)/2),p=t[2*h],m=t[2*h+1];H(p,m,r,n)<=l&&s.push(e[h]);var g=(c+1)%2;(0===c?r-i<=p:n-i<=m)&&(a.push(d),a.push(h-1),a.push(g)),(0===c?r+i>=p:n+i>=m)&&(a.push(h+1),a.push(u),a.push(g))}}return s}function H(e,t,r,n){var i=e-r,o=t-n;return i*i+o*o}S.fromVectorTileJs=T,S.fromGeojsonVt=M,S.GeoJSONWrapper=C;var W=function(e){return e[0]},G=function(e){return e[1]},q=function(e,t,r,n,i){void 0===t&&(t=W),void 0===r&&(r=G),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=e;for(var o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length),l=0;l=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return ie(ie({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function ee(e){return e/360+.5}function te(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function re(e){return 360*(e-.5)}function ne(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ie(e,t){for(var r in t)e[r]=t[r];return e}function oe(e){return e.x}function ae(e){return e.y}function se(e,t,r,n){for(var i,o=n,a=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],d=e[r+1],f=t+3;fo)i=f,o=h;else if(h===o){var p=Math.abs(f-a);pn&&(i-t>3&&se(e,t,i,n),e[i+2]=o,r-i>3&&se(e,i,r,n))}function le(e,t,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var l=((e-r)*a+(t-n)*s)/(a*a+s*s);l>1?(r=i,n=o):l>0&&(r+=a*l,n+=s*l)}return(a=e-r)*a+(s=t-n)*s}function ce(e,t,r,n){var i={id:"undefined"===typeof e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return ue(i),i}function ue(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)de(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(a+=n?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=t.length-3;t[2]=1,se(t,0,u,r),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function ge(e,t,r,n){for(var i=0;i1?1:r}function xe(e,t,r,n,i,o,a,s){if(n/=t,o>=(r/=t)&&a=n)return null;for(var l=[],c=0;c=r&&p=n)){var m=[];if("Point"===f||"MultiPoint"===f)be(d,m,r,n,i);else if("LineString"===f)we(d,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)ke(d,m,r,n,i,!1);else if("Polygon"===f)ke(d,m,r,n,i,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&a<=n&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function we(e,t,r,n,i,o,a){for(var s,l,c=_e(e),u=0===i?Te:Me,d=e.start,f=0;fr&&(l=u(c,h,p,g,v,r),a&&(c.start=d+s*l)):y>n?x=r&&(l=u(c,h,p,g,v,r),b=!0),x>n&&y<=n&&(l=u(c,h,p,g,v,n),b=!0),!o&&b&&(a&&(c.end=d+s*l),t.push(c),c=_e(e)),a&&(d+=s)}var w=e.length-3;h=e[w],p=e[w+1],m=e[w+2],(y=0===i?h:p)>=r&&y<=n&&Se(c,h,p,m),w=c.length-3,o&&w>=3&&(c[w]!==c[0]||c[w+1]!==c[1])&&Se(c,c[0],c[1],c[2]),c.length&&t.push(c)}function _e(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function ke(e,t,r,n,i,o){for(var a=0;aa.maxX&&(a.maxX=u),d>a.maxY&&(a.maxY=d)}return a}function Re(e,t,r,n){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&t.size<(i?a:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;i&&je(s,o),e.push(s)}}function je(e,t){for(var r=0,n=0,i=e.length,o=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=fe(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=Ce(n,t)).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 Ne(e,t,r){return 32*((1<=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new q(s,oe,ae,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},X.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var a=this.getClusters([r,n,180,o],t),s=this.getClusters([-180,n,i,o],t);return a.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,d=l.range(ee(r),te(o),ee(i),te(n));u1?this._map(c,!0):null,g=(l<<5)+(t+1)+this.points.length,v=0,y=d;v>5},X.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},X.prototype._map=function(e,t){if(e.numPoints)return t?ie({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?ie({},n):n},ze.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ze.prototype.splitTile=function(e,t,r,n,i,o,a){for(var s=[e,t,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var u=1<1&&console.time("creation"),f=this.tiles[d]=Pe(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<1&&console.time("clipping");var m,g,v,y,x,b,w=.5*l.buffer/l.extent,_=.5-w,k=.5+w,S=1+w;m=g=v=y=null,x=xe(e,u,r-w,r+k,0,f.minX,f.maxX,l),b=xe(e,u,r+_,r+S,0,f.minX,f.maxX,l),e=null,x&&(m=xe(x,u,n-w,n+k,1,f.minY,f.maxY,l),g=xe(x,u,n+_,n+S,1,f.minY,f.maxY,l),x=null),b&&(v=xe(b,u,n-w,n+k,1,f.minY,f.maxY,l),y=xe(b,u,n+_,n+S,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(v||[],t+1,2*r+1,2*n),s.push(y||[],t+1,2*r+1,2*n+1)}}},ze.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,o=n.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,d=r;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[Ne(c,u,d)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,d),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?Ie(this.tiles[s],i):null):null};var Ze=function(t){function r(e,r,n,i){t.call(this,e,r,n,Be),i&&(this.loadGeoJSON=i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=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 e.RequestPerformance(n.request);this.loadGeoJSON(n,(function(e,o){if(e||!o)return r(e);if("object"!==typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{t._geoJSONIndex=n.cluster?new X(Ue(n)).load(o.features):De(o,n.geojsonVtOptions)}catch(e){return r(e)}t.loaded={};var a={};if(i){var s=i.finish();s&&(a.resourceTiming={},a.resourceTiming[n.source]=JSON.parse(JSON.stringify(s)))}r(null,a)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(e,r){var n=this.loaded,i=e.uid;return n&&n[i]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},r.prototype.loadGeoJSON=function(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!==typeof t.data)return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(t.data))}catch(n){return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},r.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(r){t(r)}},r}(u);function Ue(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var i={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,a||(a=e,i=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,a||(a=e,o=t,u())}));function u(){if(a)n(a);else if(i&&o){var t=e.browser.getImageData(o),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,d=l.x,f=l.y,h=l.sdf,p=l.pixelRatio,m=l.stretchX,g=l.stretchY,v=l.content,y=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,y,{x:d,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:p,sdf:h,stretchX:m,stretchY:g,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}function f(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}r.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",u,!0)}),0)},r.mousePos=function(t,r){var n=t.getBoundingClientRect();return new e.Point(r.clientX-n.left-t.clientLeft,r.clientY-n.top-t.clientTop)},r.touchPos=function(t,r){for(var n=t.getBoundingClientRect(),i=[],o=0;o=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var h=1,p=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function b(e,t,r,n,i,o,a){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])t(null,{stack:r,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],_.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t){for(var r in t)n._doesCharSupportLocalGlyph(+r)||(o.glyphs[+r]=t[+r]);o.ranges[s]=!0}for(var i=0,a=l;i1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),f=Math.min(u,d),h=void 0,p=i/r*(n+1);if(l.isDash){var m=n-Math.abs(p);h=Math.sqrt(f*f+m*m)}else h=n-Math.sqrt(f*f+p*p);this.data[a+c]=Math.max(0,Math.min(255,h+128))}},C.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}var i=e[0],o=e[e.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,l=e[s],c=0;c1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),f=Math.min(u,d),h=l.isDash?f:-f;this.data[a+c]=Math.max(0,Math.min(255,h+128))}},C.prototype.addDash=function(t,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a=n.minX&&t.x=n.minY&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,o,r.z,i,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),i=this._data;"string"===typeof i?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(e,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),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var o={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,o,(function(e,o){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(o,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.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 e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),j=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),D=function(t){function r(e,r,n,i){t.call(this),this.id=e,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 t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,o){n._loaded=!0,i?n.fire(new e.ErrorEvent(i)):o&&(n.image=o,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=z(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map((function(e){return r.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,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(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(e.Evented);function z(t){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0,s=t;ar.end(0)?this.fire(new e.ErrorEvent(new e.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=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,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 t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.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 e.Texture(t,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}(D),F=function(t){function r(r,n,i,o){t.call(this,r,n,i,o),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!==typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!==typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"===typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.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 e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.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 e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},$.prototype.has=function(e){return e.wrapped().key in this.data},$.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},$.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},$.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},$.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},$.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),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},$.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},$.prototype.filter=function(e){var t=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>t+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[a.key]=a;break}}}},r.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(var n=e.overscaledZ-1;n>=t;n--){var i=e.scaledTo(n),o=this._getLoadedTile(i);if(o)return o}},r.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=5,n=Math.floor(t*r),i="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),n[o.tileID.key]=o}for(var a in this._tiles=n,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.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(e){return n._source.hasTile(e)})))):i=[];var o=t.coveringZoomLevel(this._source),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(Je(this._source.type)){for(var c={},u={},d=0,f=Object.keys(l);dthis._source.maxzoom){var g=p.children(this._source.maxzoom)[0],v=this.getTile(g);if(v&&v.hasData()){n[g.key]=g;continue}}else{var y=p.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=m.wasRequested(),b=p.overscaledZ-1;b>=o;--b){var w=p.scaledTo(b);if(i[w.key])break;if(i[w.key]=!0,!(m=this.getTile(w))&&x&&(m=this._addTile(w)),m&&(n[w.key]=w,x=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],r=void 0,n=this._tiles[e].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var o=0,a=t;o0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=n?a.getCameraQueryGeometry(t):t,l=t.map((function(e){return a.pointCoordinate(e)})),c=s.map((function(e){return a.pointCoordinate(e)})),u=this.getIds(),d=1/0,f=1/0,h=-1/0,p=-1/0,m=0,g=c;m=0&&v[1].y+g>=0){var y=l.map((function(e){return s.getTilePoint(e)})),x=c.map((function(e){return s.getTilePoint(e)}));o.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:m})}}},x=0;x=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r.prototype.setDependencies=function(e,t,r){var n=this._tiles[e];n&&n.setDependencies(t,r)},r.prototype.reloadTilesForDependencies=function(e,t){for(var r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(e,t)}))},r}(e.Evented);function $e(e,t){var r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Je(e){return"raster"===e||"image"===e||"video"===e}function Qe(){return new e.window.Worker(us.workerUrl)}Ke.maxOverzooming=10,Ke.maxUnderzooming=3;var et="mapboxgl_preloaded_worker_pool",tt=function(){this.active={}};tt.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))};var _t=function(e,t,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var o=0;o=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function At(t,r,n,i,o,a,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,n.transform.zoom),d=[256/n.width*2+1,256/n.height*2+1],f=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var h=t.lineVertexArray,p=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,v=0;vMath.abs(n.x-r.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function Ot(t,r,n,i,o,a,s,l,c,u,d,f,h,p){var m,g=r/24,v=t.lineOffsetX*g,y=t.lineOffsetY*g;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,b=t.lineStartIndex,w=t.lineStartIndex+t.lineLength,_=Et(g,l,v,y,n,d,f,t,c,a,h);if(!_)return{notEnoughRoom:!0};var k=Tt(_.first.point,s).point,S=Tt(_.last.point,s).point;if(i&&!n){var T=It(t.writingMode,k,S,p);if(T)return T}m=[_.first];for(var M=t.glyphStartIndex+1;M0?I.point:Pt(f,E,C,1,o),P=It(t.writingMode,C,O,p);if(P)return P}var R=Rt(g*l.getoffsetX(t.glyphStartIndex),v,y,n,d,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,a,h);if(!R)return{notEnoughRoom:!0};m=[R]}for(var L=0,j=m;L0?1:-1,m=0;i&&(p*=-1,m=Math.PI),p<0&&(m+=Math.PI);for(var g=p>0?l+s:l+s+1,v=o,y=o,x=0,b=0,w=Math.abs(h),_=[];x+b<=w;){if((g+=p)=c)return null;if(y=v,_.push(v),void 0===(v=f[g])){var k=new e.Point(u.getx(g),u.gety(g)),S=Tt(k,d);if(S.signedDistanceFromCamera>0)v=f[g]=S.point;else{var T=g-p;v=Pt(0===x?a:new e.Point(u.getx(T),u.gety(T)),k,y,w-x+1,d)}}x+=b,b=y.dist(v)}var M=(w-x)/b,C=v.sub(y),A=C.mult(M)._add(y);A._add(C._unit()._perp()._mult(n*p));var E=m+Math.atan2(v.y-y.y,v.x-y.x);return _.push(A),{point:A,angle:E,path:_}}_t.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},_t.prototype.insert=function(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},_t.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},_t.prototype._insertBoxCell=function(e,t,r,n,i,o){this.boxCells[i].push(o)},_t.prototype._insertCircleCell=function(e,t,r,n,i,o){this.circleCells[i].push(o)},_t.prototype._query=function(e,t,r,n,i,o){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var a=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:a},_t.prototype._queryCircle=function(e,t,r,n,i){var o=e-r,a=e+r,s=t-r,l=t+r;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,c,u,i),n?c.length>0:c},_t.prototype.query=function(e,t,r,n,i){return this._query(e,t,r,n,!1,i)},_t.prototype.hitTest=function(e,t,r,n,i){return this._query(e,t,r,n,!0,i)},_t.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},_t.prototype._queryCell=function(e,t,r,n,i,o,a,s){var l=a.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,d=0,f=c;d=u[p+0]&&n>=u[p+1]&&(!s||s(this.boxKeys[h]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[h],x1:u[p],y1:u[p+1],x2:u[p+2],y2:u[p+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,v=0,y=m;va*a+s*s},_t.prototype._circleAndRectCollide=function(e,t,r,n,i,o,a){var s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var c=(a-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var d=l-s,f=u-c;return d*d+f*f<=r*r};var Lt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function jt(e,t){for(var r=0;r=1;P--)O.push(E.path[P]);for(var R=1;R0){for(var z=O[0].clone(),N=O[0].clone(),F=1;F=M.x&&N.x<=C.x&&z.y>=M.y&&N.y<=C.y?[O]:N.xC.x||N.yC.y?[]:e.clipLine([O],M.x,M.y,C.x,C.y)}for(var B=0,Z=D;B=this.screenRightBoundary||nthis.screenBottomBoundary},Nt.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(m=this.prevPlacement.variableOffsets[d.crossTileID].anchor),this.variableOffsets[d.crossTileID]={textOffset:g,width:r,height:n,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(f,e,d,h),f.allowVerticalPlacement&&(this.markUsedOrientation(f,h,d),this.placedOrientations[d.crossTileID]=h),{shift:v,placedGlyphBoxes:y}):void 0},Yt.prototype.placeLayerBucketPart=function(t,r,n){var i=this,o=t.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,c=o.textLabelPlaneMatrix,u=o.labelToScreenMatrix,d=o.textPixelRatio,f=o.holdingForFade,h=o.collisionBoxArray,p=o.partiallyEvaluatedTextSize,m=o.collisionGroup,g=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),w="map"===s.get("text-pitch-alignment"),_="none"!==s.get("icon-text-fit"),k="viewport-y"===s.get("symbol-z-order"),S=y&&(x||!a.hasIconData()||v),T=x&&(y||!a.hasTextData()||g);!a.collisionArrays&&h&&a.deserializeCollisionBoxes(h);var M=function(t,o){if(!r[t.crossTileID])if(f)i.placements[t.crossTileID]=new Ut(!1,!1,!1);else{var h=!1,k=!1,M=!0,C=null,A={box:null,offscreen:null},E={box:null,offscreen:null},I=null,O=null,P=null,R=0,L=0,j=0;o.textFeatureIndex?R=o.textFeatureIndex:t.useRuntimeCollisionCircles&&(R=t.featureIndex),o.verticalTextFeatureIndex&&(L=o.verticalTextFeatureIndex);var D=o.textBox;if(D){var z=function(r){var n=e.WritingMode.horizontal;if(a.allowVerticalPlacement&&!r&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[t.crossTileID];o&&(i.placedOrientations[t.crossTileID]=o,n=o,i.markUsedOrientation(a,n,t))}return n},N=function(r,n){if(a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i0&&(F=F.filter((function(e){return e!==B.anchor}))).unshift(B.anchor)}var Z=function(e,r,n){for(var o=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=_&&!x?r:null,f={box:[],offscreen:!1},p=y?2*F.length:F.length,g=0;g=F.length,S=i.attemptAnchorPlacement(v,e,o,s,c,b,w,d,l,m,k,t,a,n,u);if(S&&(f=S.placedGlyphBoxes)&&f.box&&f.box.length){h=!0,C=S.shift;break}}return f};N((function(){return Z(D,o.iconBox,e.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox,n=A&&A.box&&A.box.length;return a.allowVerticalPlacement&&!n&&t.numVerticalGlyphVertices>0&&r?Z(r,o.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),A&&(h=A.box,M=A.offscreen);var U=z(A&&A.box);if(!h&&i.prevPlacement){var V=i.prevPlacement.variableOffsets[t.crossTileID];V&&(i.variableOffsets[t.crossTileID]=V,i.markUsedJustification(a,V.anchor,t,U))}}else{var H=function(e,r){var n=i.collisionIndex.placeCollisionBox(e,y,d,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(a,r,t),i.placedOrientations[t.crossTileID]=r),n};N((function(){return H(D,e.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&r?H(r,e.WritingMode.vertical):{box:null,offscreen:null}})),z(A&&A.box&&A.box.length)}}if(h=(I=A)&&I.box&&I.box.length>0,M=I&&I.offscreen,t.useRuntimeCollisionCircles){var W=a.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),G=e.evaluateSizeForFeature(a.textSizeData,p,W),q=s.get("text-padding"),Y=t.collisionCircleDiameter;O=i.collisionIndex.placeCollisionCircles(y,W,a.lineVertexArray,a.glyphOffsetArray,G,l,c,u,n,w,m.predicate,Y,q),h=y||O.circles.length>0&&!O.collisionDetected,M=M&&O.offscreen}if(o.iconFeatureIndex&&(j=o.iconFeatureIndex),o.iconBox){var X=function(e){var t=_&&C?qt(e,C.x,C.y,b,w,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,d,l,m.predicate)};k=E&&E.box&&E.box.length&&o.verticalIconBox?(P=X(o.verticalIconBox)).box.length>0:(P=X(o.iconBox)).box.length>0,M=M&&P.offscreen}var K=g||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,$=v||0===t.numIconVertices;if(K||$?$?K||(k=k&&h):h=k&&h:k=h=k&&h,h&&I&&I.box&&(E&&E.box&&L?i.collisionIndex.insertCollisionBox(I.box,s.get("text-ignore-placement"),a.bucketInstanceId,L,m.ID):i.collisionIndex.insertCollisionBox(I.box,s.get("text-ignore-placement"),a.bucketInstanceId,R,m.ID)),k&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),a.bucketInstanceId,j,m.ID),O&&(h&&i.collisionIndex.insertCollisionCircles(O.circles,s.get("text-ignore-placement"),a.bucketInstanceId,R,m.ID),n)){var J=a.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new Vt);for(var ee=0;ee=0;--A){var E=C[A];M(a.symbolInstances.get(E),a.collisionArrays[E])}else for(var I=t.symbolInstanceStart;I=0&&(t.text.placedSymbolArray.get(c).crossTileID=o>=0&&c!==o?0:n.crossTileID)}},Yt.prototype.markUsedOrientation=function(t,r,n){for(var i=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,o=r===e.WritingMode.vertical?r:0,a=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];a0||l>0,x=o.numIconVertices>0,b=i.placedOrientations[o.crossTileID],w=b===e.WritingMode.vertical,_=b===e.WritingMode.horizontal||b===e.WritingMode.horizontalOnly;if(y){var k=nr(v.text),S=w?ir:k;p(t.text,s,S);var T=_?ir:k;p(t.text,l,T);var M=v.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||w?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=M||_?1:0);var C=i.variableOffsets[o.crossTileID];C&&i.markUsedJustification(t,C.anchor,o,b);var A=i.placedOrientations[o.crossTileID];A&&(i.markUsedJustification(t,"left",o,A),i.markUsedOrientation(t,A,o))}if(x){var E=nr(v.icon),I=!(f&&o.verticalPlacedIconSymbolIndex&&w);if(o.placedIconSymbolIndex>=0){var O=I?E:ir;p(t.icon,o.numIconVertices,O),t.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(o.verticalPlacedIconSymbolIndex>=0){var P=I?ir:E;p(t.icon,o.numVerticalIconVertices,P),t.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var R=t.collisionArrays[n];if(R){var L=new e.Point(0,0);if(R.textBox||R.verticalTextBox){var j=!0;if(c){var D=i.variableOffsets[m];D?(L=Gt(D.anchor,D.width,D.height,D.textOffset,D.textBoxScale),u&&L._rotate(d?i.transform.angle:-i.transform.angle)):j=!1}R.textBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!j||w,L.x,L.y),R.verticalTextBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!j||_,L.x,L.y)}var z=Boolean(!_&&R.verticalIconBox);R.iconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,z,f?L.x:0,f?L.y:0),R.verticalIconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,!z,f?L.x:0,f?L.y:0)}}},g=0;ge},Yt.prototype.setStale=function(){this.stale=!0};var Kt=Math.pow(2,25),$t=Math.pow(2,24),Jt=Math.pow(2,17),Qt=Math.pow(2,16),er=Math.pow(2,9),tr=Math.pow(2,8),rr=Math.pow(2,1);function nr(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Kt+t*$t+r*Jt+t*Qt+r*er+t*tr+r*rr+t}var ir=0,or=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};or.prototype.continuePlacement=function(e,t,r,n,i){for(var o=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[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 or(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ar.prototype.commit=function(e){return this.placement.commit(e),this.placement};var sr=512/e.EXTENT/2,lr=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=a[e.scaledTo(Number(o)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])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(e.validateStyle.source,"sources."+t,r,null,n)){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[t]=new Ke(t,r,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:t}})),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===t.type){if(fr(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"===typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},n))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.hasLayer=function(e){return e in this._layers},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,r))return null===r||void 0===r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=e.clone$1(r),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getLayoutProperty(r),n)||(o.setLayoutProperty(r,n,i),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getPaintProperty(r),n)||(o.setPaintProperty(r,n,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=t.sourceLayer,o=this.sourceCaches[n];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,r)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=this.sourceCaches[n];if(void 0!==i){var o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?r&&"string"!==typeof t.id&&"number"!==typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(a,t.id,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.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:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){n[a]=o;for(var s=0,l=e;s=0;p--){var m=this._order[p];if(r(m))for(var g=i.length-1;g>=0;g--){var v=i[g].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Or="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;}",Pr="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;}",Rr="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);}",Lr="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);}",jr="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);}",Dr="#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}",zr="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);}",Nr="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}",Fr="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;}",Br="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}",Zr="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;}",Ur="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}",Vr="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);}",Hr="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Wr="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;}",Gr="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}",qr="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;}",Yr="#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}",Xr="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;}",Kr="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}",$r="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;}",Jr="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}",Qr="\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);}",en="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}",tn="\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);}",rn="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}",nn="\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;}",on="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}",an="\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);}",sn="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}",ln="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;}",cn="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}",un="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));}",dn="#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}",fn="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);}",hn="#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}",pn="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);}",mn=Zn("#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;}"),gn=Zn(yr,xr),vn=Zn(br,wr),yn=Zn(_r,kr),xn=Zn(Sr,Tr),bn=Zn(Mr,Cr),wn=Zn(Ar,Er),_n=Zn(Ir,Or),kn=Zn(Pr,Rr),Sn=Zn(Lr,jr),Tn=Zn(Dr,zr),Mn=Zn(Nr,Fr),Cn=Zn(Br,Zr),An=Zn(Ur,Vr),En=Zn(Hr,Wr),In=Zn(Gr,qr),On=Zn(Yr,Xr),Pn=Zn(Kr,$r),Rn=Zn(Jr,Qr),Ln=Zn(en,tn),jn=Zn(rn,nn),Dn=Zn(on,an),zn=Zn(sn,ln),Nn=Zn(cn,un),Fn=Zn(dn,fn),Bn=Zn(hn,pn);function Zn(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(r,(function(e,t,r,i,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"}))}}var Un=Object.freeze({__proto__:null,prelude:mn,background:gn,backgroundPattern:vn,circle:yn,clippingMask:xn,heatmap:bn,heatmapTexture:wn,collisionBox:_n,collisionCircle:kn,debug:Sn,fill:Tn,fillOutline:Mn,fillOutlinePattern:Cn,fillPattern:An,fillExtrusion:En,fillExtrusionPattern:In,hillshadePrepare:On,hillshade:Pn,line:Rn,lineGradient:Ln,linePattern:jn,lineSDF:Dn,raster:zn,symbolIcon:Nn,symbolSDF:Fn,symbolTextAndIcon:Bn}),Vn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Vn.prototype.bind=function(e,t,r,n,i,o,a,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}function Gn(e,t,r,n){var i=r.imageManager.getPattern(e.from.toString()),o=r.imageManager.getPattern(e.to.toString()),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,d=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Ft(n,1,r.transform.tileZoom),u_pixel_coord_upper:[d>>16,f>>16],u_pixel_coord_lower:[65535&d,65535&f]}}Hn.prototype.draw=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m){var g,v=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);h&&h.setUniforms(e,this.binderUniforms,d,{zoom:f});for(var x=(g={},g[v.LINES]=2,g[v.TRIANGLES]=3,g[v.LINE_STRIP]=1,g)[t],b=0,w=u.get();b0?1/(1-e):1+e}function yi(e){return e>0?1-1/(1.001-e):-e}var xi,bi=function(e,t,r,n,i,o,a,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},wi=function(t,r,n,i,o,a,s,l,c,u,d){var f=o.transform;return e.extend(bi(t,r,n,i,o,a,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},_i=function(t,r,n,i,o,a,s,l,c,u){return e.extend(wi(t,r,n,i,o,a,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},ki=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Si=function(t,r,n,i,o,a){return e.extend(Gn(i,a,n,o),{u_matrix:t,u_opacity:r})},Ti={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},collisionCircle:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,r.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,r.u_viewport_size)}},debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_overlay:new e.Uniform1i(t,r.u_overlay),u_overlay_scale:new e.Uniform1f(t,r.u_overlay_scale)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_maxzoom:new e.Uniform1f(t,r.u_maxzoom),u_unpack:new e.Uniform4f(t,r.u_unpack)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},symbolTextAndIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texsize_icon:new e.Uniform2f(t,r.u_texsize_icon),u_texture:new e.Uniform1i(t,r.u_texture),u_texture_icon:new e.Uniform1i(t,r.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function Mi(t,r,n,i,o,a,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),d=[],f=0,h=0,p=0;p0){var w=e.create(),_=y;e.mul(w,v.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(w,w,v.placementViewportMatrix),d.push({circleArray:b,circleOffset:h,transform:_,invTransform:w}),h=f+=b.length/4}x&&u.draw(l,c.LINES,Ne.disabled,Ze.disabled,t.colorModeForRenderPass(),Ye.disabled,ei(y,t.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&d.length){var k=t.useProgram("collisionCircle"),S=new e.StructArrayLayout2f1f2i16;S.resize(4*f),S._trim();for(var T=0,M=0,C=d;M=0&&(m[v.associatedIconIndex]={shiftedAnchor:C,angle:A})}else jt(v.numGlyphs,h)}if(d){p.clear();for(var I=t.icon.placedSymbolArray,O=0;O0){var s=e.browser.now(),l=(s-t.timeAdded)/a,c=r?(s-r.timeAdded)/a:-1,u=n.getSource(),d=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),h=f&&t.refreshedUponExpiration?1:e.clamp(f?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function $i(e,t,r){var n=r.paint.get("background-color"),i=r.paint.get("background-opacity");if(0!==i){var o=e.context,a=o.gl,s=e.transform,l=s.tileSize,c=r.paint.get("background-pattern");if(!e.isPatternMissing(c)){var u=!c&&1===n.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===u){var d=Ze.disabled,f=e.depthModeForSublayer(0,"opaque"===u?Ne.ReadWrite:Ne.ReadOnly),h=e.colorModeForRenderPass(),p=e.useProgram(c?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});c&&(o.activeTexture.set(a.TEXTURE0),e.imageManager.bind(e.context));for(var g=r.getCrossfadeParameters(),v=0,y=m;v "+n.overscaledZ),uo(t,v+" "+p+"kb"),s.draw(i,o.TRIANGLES,l,c,We.alphaBlended,Ye.disabled,ri(a,e.Color.transparent,g),d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function uo(e,t){e.initDebugOverlayCanvas();var r=e.debugOverlayCanvas,n=e.context.gl,i=e.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(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}function fo(e,t,r){var n=e.context,i=r.implementation;if("offscreen"===e.renderPass){var o=i.prerender;o&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),o.call(i,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Ze.disabled);var a="3d"===i.renderingMode?new Ne(e.context.gl.LEQUAL,Ne.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Ne.ReadOnly);n.setDepthMode(a),i.render(n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}var ho={symbol:Ei,circle:Di,heatmap:zi,line:Zi,fill:Ui,"fill-extrusion":Hi,hillshade:Gi,raster:Xi,background:$i,debug:lo,custom:fo},po=function(e,t){this.context=new Xe(e),this.transform=t,this._tileTextures={},this.setup(),this.numSublayers=Ke.maxUnderzooming+Ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new dr,this.gpuTimers={}};po.prototype.resize=function(t,r){if(this.width=t*e.browser.devicePixelRatio,this.height=r*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n256&&this.clearStencil(),r.setColorMode(We.disabled),r.setDepthMode(Ne.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=t;o256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ze({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},po.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ze({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},po.prototype.stencilConfigForOverlap=function(e){var t,r=this.context.gl,n=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=n[n.length-1].overscaledZ,o=n[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=0;this.currentLayer--){var _=this.style._layers[i[this.currentLayer]],k=o[_.source],S=u[_.source];this._renderTileClippingMasks(_,S),this.renderLayer(this,k,_,S)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},po.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r},po.prototype.useProgram=function(e,t){this.cache=this.cache||{};var r=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Hn(this.context,Un[e],t,Ti[e],this._showOverdrawInspector)),this.cache[r]},po.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()},po.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},po.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},po.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var mo=function(e,t){this.points=e,this.planes=t};mo.fromInvProjectionMatrix=function(t,r,n){var i=[[-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]],o=Math.pow(2,n),a=i.map((function(r){return e.transformMat4([],r,t)})).map((function(t){return e.scale$1([],t,1/t[3]/r*o)})),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var r=e.sub([],a[t[0]],a[t[1]]),n=e.sub([],a[t[2]],a[t[1]]),i=e.normalize([],e.cross([],r,n)),o=-e.dot(i,a[t[1]]);return i.concat(o)}));return new mo(a,s)};var go=function(t,r){this.min=t,this.max=r,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};go.prototype.quadrant=function(t){for(var r=[t%2===0,t<2],n=e.clone$2(this.min),i=e.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,d=0;dthis.max[l]-this.min[l])return 0}return 1};var vo=function(e,t,r,n){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(e)||e<0||isNaN(t)||t<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=e,this.bottom=t,this.left=r,this.right=n};vo.prototype.interpolate=function(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this},vo.prototype.getCenter=function(t,r){var n=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,i)},vo.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},vo.prototype.clone=function(){return new vo(this.top,this.bottom,this.left,this.right)},vo.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var yo=function(t,r,n,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=void 0===n||null===n?0:n,this._maxPitch=void 0===i||null===i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vo,this._posMatrixCache={},this._alignedPosMatrixCache={}},xo={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}};function bo(e,t){var r=!1,n=null,i=function(){n=null,r&&(e(),n=setTimeout(i,t),r=!1)};return function(){return r=!0,n||i(),n}}yo.prototype.clone=function(){var e=new yo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},xo.minZoom.get=function(){return this._minZoom},xo.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},xo.maxZoom.get=function(){return this._maxZoom},xo.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},xo.minPitch.get=function(){return this._minPitch},xo.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},xo.maxPitch.get=function(){return this._maxPitch},xo.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},xo.renderWorldCopies.get=function(){return this._renderWorldCopies},xo.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},xo.worldSize.get=function(){return this.tileSize*this.scale},xo.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},xo.size.get=function(){return new e.Point(this.width,this.height)},xo.bearing.get=function(){return-this.angle/Math.PI*180},xo.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},xo.pitch.get=function(){return this._pitch/Math.PI*180},xo.pitch.set=function(t){var r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},xo.fov.get=function(){return this._fov/Math.PI*180},xo.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},xo.zoom.get=function(){return this._zoom},xo.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},xo.center.get=function(){return this._center},xo.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},xo.padding.get=function(){return this._edgeInsets.toJSON()},xo.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},xo.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},yo.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},yo.prototype.interpolatePadding=function(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()},yo.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},yo.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),o=this.pointCoordinate(new e.Point(this.width,this.height)),a=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,o.x,a.x)),l=Math.floor(Math.max(n.x,i.x,o.x,a.x)),c=1,u=s-c;u<=l+c;u++)0!==u&&r.push(new e.UnwrappedTileID(u,t));return r},yo.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=[o*i.x,o*i.y,0],s=mo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=3,u=function(e){return{aabb:new go([e*o,0,0],[(e+1)*o,o,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},d=[],f=[],h=r,p=t.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var m=1;m<=3;m++)d.push(u(-m)),d.push(u(m));for(d.push(u(0));d.length>0;){var g=d.pop(),v=g.x,y=g.y,x=g.fullyVisible;if(!x){var b=g.aabb.intersects(s);if(0===b)continue;x=2===b}var w=g.aabb.distanceX(a),_=g.aabb.distanceY(a),k=Math.max(Math.abs(w),Math.abs(_)),S=c+(1<S&&g.zoom>=l)f.push({tileID:new e.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,v,y),distanceSq:e.sqrLen([a[0]-.5-v,a[1]-.5-y])});else for(var T=0;T<4;T++){var M=(v<<1)+T%2,C=(y<<1)+(T>>1);d.push({aabb:g.aabb.quadrant(T),zoom:g.zoom+1,x:M,y:C,wrap:g.wrap,fullyVisible:x})}}return f.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},yo.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},xo.unmodified.get=function(){return this._unmodified},yo.prototype.zoomScale=function(e){return Math.pow(2,e)},yo.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},yo.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},yo.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},xo.point.get=function(){return this.project(this.center)},yo.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.MercatorCoordinate(o.x-(n.x-i.x),o.y-(n.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},yo.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},yo.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},yo.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},yo.prototype.coordinateLocation=function(e){return e.toLngLat()},yo.prototype.pointCoordinate=function(t){var r=0,n=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse);var o=n[3],a=i[3],s=n[0]/o,l=i[0]/a,c=n[1]/o,u=i[1]/a,d=n[2]/o,f=i[2]/a,h=d===f?0:(r-d)/(f-d);return new e.MercatorCoordinate(e.number(s,l,h)/this.worldSize,e.number(c,u,h)/this.worldSize)},yo.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},yo.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},yo.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},yo.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},yo.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*a,o.y*a,0]),e.scale(l,l,[a/e.EXTENT,a/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},yo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},yo.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,i,o=-90,a=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var d=this.latRange;o=e.mercatorYfromLat(d[1])*this.worldSize,t=(a=e.mercatorYfromLat(d[0])*this.worldSize)-oa&&(i=a-g)}if(this.lngRange){var v=h.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==n?n:h.x,void 0!==i?i:h.y))),this._unmodified=u,this._constraining=!1}},yo.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),o=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-i,.01,Math.PI-.01)),a=this.point,s=a.x,l=a.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance),u=this.height/50,d=new Float64Array(16);e.perspective(d,this._fov,this.width/this.height,u,c),d[8]=2*-r.x/this.width,d[9]=2*r.y/this.height,e.scale(d,d,[1,-1,1]),e.translate(d,d,[0,0,-this.cameraToCenterDistance]),e.rotateX(d,d,this._pitch),e.rotateZ(d,d,this.angle),e.translate(d,d,[-s,-l,0]),this.mercatorMatrix=e.scale([],d,[this.worldSize,this.worldSize,this.worldSize]),e.scale(d,d,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=d,this.invProjMatrix=e.invert([],this.projMatrix);var f=this.width%2/2,h=this.height%2/2,p=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+p*f+m*h,v=l-Math.round(l)+p*h+m*f,y=new Float64Array(d);if(e.translate(y,y,[g>.5?g-1:g,v>.5?v-1:v,0]),this.alignedProjMatrix=y,d=e.create(),e.scale(d,d,[this.width/2,-this.height/2,1]),e.translate(d,d,[1,-1,0]),this.labelPlaneMatrix=d,d=e.create(),e.scale(d,d,[1,-1,1]),e.translate(d,d,[-1,-1,0]),e.scale(d,d,[2/this.width,2/this.height,1]),this.glCoordMatrix=d,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(d=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=d,this._posMatrixCache={},this._alignedPosMatrixCache={}}},yo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},yo.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},yo.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,i=r.y,o=r.x,a=r.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},wo.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(r){}};var _o={linearity:.3,easing:e.bezier(0,0,.3,1)},ko=e.extend({deceleration:2500,maxSpeed:1400},_o),So=e.extend({deceleration:20,maxSpeed:1400},_o),To=e.extend({deceleration:1e3,maxSpeed:360},_o),Mo=e.extend({deceleration:1e3,maxSpeed:90},_o),Co=function(e){this._map=e,this.clear()};function Ao(e,t){(!e.duration||e.duration0&&r-t[0].time>n;)t.shift()},Co.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.dblclick=function(e){return this._firePreventable(new Io(e.type,this._map,e))},Ro.prototype.mouseover=function(e){this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.mouseout=function(e){this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.touchstart=function(e){return this._firePreventable(new Oo(e.type,this._map,e))},Ro.prototype.touchmove=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype.touchend=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype.touchcancel=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Ro.prototype.isEnabled=function(){return!0},Ro.prototype.isActive=function(){return!1},Ro.prototype.enable=function(){},Ro.prototype.disable=function(){};var Lo=function(e){this._map=e};Lo.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Lo.prototype.mousemove=function(e){this._map.fire(new Io(e.type,this._map,e))},Lo.prototype.mousedown=function(){this._delayContextMenu=!0},Lo.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Io("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Lo.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new Io(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Lo.prototype.isEnabled=function(){return!0},Lo.prototype.isActive=function(){return!1},Lo.prototype.enable=function(){},Lo.prototype.disable=function(){};var jo=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Do(e,t){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=zo(t),this.touches=Do(r,t)))},Zo.prototype.touchmove=function(e,t,r){if(!this.aborted&&this.centroid){var n=Do(r,t);for(var i in this.touches){var o=this.touches[i],a=n[i];(!a||a.dist(o)>Bo)&&(this.aborted=!0)}}},Zo.prototype.touchend=function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>Fo)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Uo=function(e){this.singleTap=new Zo(e),this.numTaps=e.numTaps,this.reset()};Uo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Uo.prototype.touchstart=function(e,t,r){this.singleTap.touchstart(e,t,r)},Uo.prototype.touchmove=function(e,t,r){this.singleTap.touchmove(e,t,r)},Uo.prototype.touchend=function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime0&&(this._active=!0);var i=Do(n,r),o=new e.Point(0,0),a=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(o._add(c),a._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(e.x)}var aa=100,sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,oa(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,r){var n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,r){if(void 0!==this._valid)return this._valid;var n=2,i=e.mag()>=n,o=t.mag()>=n;if(i||o){if(!i||!o)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove0===t.y>0;return oa(e)&&oa(t)&&a}},t}($o),la={panStep:100,bearingStep:15,pitchStep:10},ca=function(){var e=la;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep};function ua(e){return e*(2-e)}ca.prototype.reset=function(){this._active=!1},ca.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,o=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:r?Math.round(l)+r*(e.shiftKey?2:1):l,bearing:s.getBearing()+n*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-o*t._panStep,-a*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},ca.prototype.enable=function(){this._enabled=!0},ca.prototype.disable=function(){this._enabled=!1,this.reset()},ca.prototype.isEnabled=function(){return this._enabled},ca.prototype.isActive=function(){return this._active};var da=4.000244140625,fa=.01,ha=1/450,pa=2,ma=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=fa,this._wheelZoomRate=ha,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ma.prototype.setZoomRate=function(e){this._defaultZoomRate=e},ma.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},ma.prototype.isEnabled=function(){return!!this._enabled},ma.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},ma.prototype.isZooming=function(){return!!this._zooming},ma.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},ma.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ma.prototype.wheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%da===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,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}},ma.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},ma.prototype._start=function(t){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,t);this._around=e.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())}},ma.prototype.renderFrame=function(){return this._onScrollFrame()},ma.prototype._onScrollFrame=function(){var t=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)>da?this._wheelZoomRate:this._defaultZoomRate,i=pa/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o="number"===typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"===typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var d=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),f=c(d);a=e.number(l,s,f),d<1?this._frameId||(this._frameId=!0):u=!0}else a=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:a-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ma.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,i=(e.browser.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=e.bezier(a,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r},ma.prototype.reset=function(){this._active=!1};var ga=function(e,t){this._clickZoom=e,this._tapZoom=t};ga.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ga.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ga.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ga.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var va=function(){this.reset()};va.prototype.reset=function(){this._active=!1},va.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}},va.prototype.enable=function(){this._enabled=!0},va.prototype.disable=function(){this._enabled=!1,this.reset()},va.prototype.isEnabled=function(){return this._enabled},va.prototype.isActive=function(){return this._active};var ya=function(){this._tap=new Uo({numTouches:1,numTaps:1}),this.reset()};ya.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ya.prototype.touchstart=function(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>No&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))},ya.prototype.touchmove=function(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)},ya.prototype.touchend=function(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)},ya.prototype.touchcancel=function(){this.reset()},ya.prototype.enable=function(){this._enabled=!0},ya.prototype.disable=function(){this._enabled=!1,this.reset()},ya.prototype.isEnabled=function(){return this._enabled},ya.prototype.isActive=function(){return this._active};var xa=function(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r};xa.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ba=function(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r};ba.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ba.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ba.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ba.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var wa=function(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};wa.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},wa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},wa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},wa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},wa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},wa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var _a=function(e){return e.zoom||e.drag||e.pitch||e.rotate},ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function Sa(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var Ta=function(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Co(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.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],[e.window.document,"mousemove",{capture:!0}],[e.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],[e.window,"blur",void 0]];for(var o=0,a=this._listeners;oo?Math.min(2,w):Math.max(.5,w),_=Math.pow(g,1-t),k=i.unproject(x.add(b.mult(t*_)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?k.wrap():k,p)}n._fireMoveEvents(r)}),(function(e){n._afterEase(r,e)}),t),this},r.prototype._prepareEase=function(t,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},r.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,o.minZoom,o.maxZoom):a,d="bearing"in t?this._normalizeBearing(t.bearing,s):s,f="pitch"in t?+t.pitch:l,h="padding"in t?t.padding:o.padding,p=o.zoomScale(u-a),m=e.Point.convert(t.offset),g=o.centerPoint.add(m),v=o.pointLocation(g),y=e.LngLat.convert(t.center||v);this._normalizeCenter(y);var x=o.project(v),b=o.project(y).sub(x),w=t.curve,_=Math.max(o.width,o.height),k=_/p,S=b.mag();if("minZoom"in t){var T=e.clamp(Math.min(t.minZoom,a,u),o.minZoom,o.maxZoom),M=_/o.zoomScale(T-a);w=Math.sqrt(M/S*2)}var C=w*w;function A(e){var t=(k*k-_*_+(e?-1:1)*C*C*S*S)/(2*(e?k:_)*C*S);return Math.log(Math.sqrt(t*t+1)-t)}function E(e){return(Math.exp(e)-Math.exp(-e))/2}function I(e){return(Math.exp(e)+Math.exp(-e))/2}function O(e){return E(e)/I(e)}var P=A(0),R=function(e){return I(P)/I(P+w*e)},L=function(e){return _*((I(P)*O(P+w*e)-E(P))/C)/S},j=(A(1)-P)/w;if(Math.abs(S)<1e-6||!isFinite(j)){if(Math.abs(_-k)<1e-6)return this.easeTo(t,r);var D=k<_?-1:1;j=Math.abs(Math.log(k/_))/w,L=function(){return 0},R=function(e){return Math.exp(D*w*e)}}if("duration"in t)t.duration=+t.duration;else{var z="screenSpeed"in t?+t.screenSpeed/w:+t.speed;t.duration=1e3*j/z}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==d,this._pitching=f!==l,this._padding=!o.isPaddingEqual(h),this._prepareEase(r,!1),this._ease((function(t){var i=t*j,p=1/R(i);o.zoom=1===t?u:a+o.scaleZoom(p),n._rotating&&(o.bearing=e.number(s,d,t)),n._pitching&&(o.pitch=e.number(l,f,t)),n._padding&&(o.interpolatePadding(c,h,t),g=o.centerPoint.add(m));var v=1===t?y:o.unproject(x.add(b.mult(L(i))).mult(p));o.setLocationAtPoint(o.renderWorldCopies?v.wrap():v,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(e,t){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,t)}if(!e){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),Ca=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ca.prototype.getDefaultPosition=function(){return"bottom-right"},Ca.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&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===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ca.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},Ca.prototype._updateEditLink=function(){var t=this._editLink;t||(t=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||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ca.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Aa=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Aa.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Aa.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Aa.prototype.getDefaultPosition=function(){return"bottom-left"},Aa.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Aa.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Aa.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Ea=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ea.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Ea.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitchza)throw new Error("maxPitch must be less than or equal to "+za);var i=new yo(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Ea,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Ia,t.locale),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"===typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Pa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.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)})),"undefined"!==typeof e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Ta(this,t);var o="string"===typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new wo(o).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Ca({customAttribution:t.customAttribution})),this.addControl(new Aa,t.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(t){r._update("style"===t.dataType),r.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){r.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var o={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(t,r){if(void 0===r&&t.getDefaultPosition&&(r=t.getDefaultPosition()),void 0===r&&(r="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},i.prototype.resize=function(t){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 o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null===e||void 0===e?La:e)>=La&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null===e||void 0===e?Da:e)=Da&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()za)throw new Error("maxPitch must be less than or equal to "+za);if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),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(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},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(e,t,r){var n,i=this;if("mouseenter"===e||"mouseover"===e){var o=!1,a=function(n){var a=i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[];a.length?o||(o=!0,r.call(i,new Io(e,i,n.originalEvent,{features:a}))):o=!1};return{layer:t,listener:r,delegates:{mousemove:a,mouseout:function(){o=!1}}}}if("mouseleave"===e||"mouseout"===e){var s=!1,l=function(n){(i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?s=!0:s&&(s=!1,r.call(i,new Io(e,i,n.originalEvent)))},c=function(t){s&&(s=!1,r.call(i,new Io(e,i,t.originalEvent)))};return{layer:t,listener:r,delegates:{mousemove:l,mouseout:c}}}var u=function(e){var n=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(i,e),delete e.features)};return{layer:t,listener:r,delegates:(n={},n[e]=u,n)}},i.prototype.on=function(e,t,r){if(void 0===r)return n.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(e,t,r){if(void 0===r)return n.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(e,t,r){var i=this;if(void 0===r)return n.prototype.off.call(this,e,t);var o=function(n){for(var o=n[e],a=0;a180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Va.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),r.disableDrag()},Va.prototype.move=function(e,t){var r=this.map,n=this.mouseRotate.mousemoveWindow(e,t);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Va.prototype.off=function(){var e=this.element;r.removeEventListener(e,"mousedown",this.mousedown),r.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(e,"touchmove",this.touchmove),r.removeEventListener(e,"touchend",this.touchend),r.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Va.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Va.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),r.mousePos(this.element,t)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Va.prototype.mousemove=function(e){this.move(e,r.mousePos(this.element,e))},Va.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Va.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Va.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Va.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.getEast()||r.latitudet.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(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),o=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),o,{geolocateSource:!0})},n.prototype._updateMarker=function(t){if(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),r=this._map.unproject([1,e]),n=t.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(t){if(this._map){if(this.options.trackUserLocation)if(1===t.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===t.code&&Ja)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;if(this._container.addEventListener("contextmenu",(function(e){return e.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===t){e.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 o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}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 Ya(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ya({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(t){var r=t.originalEvent&&"resize"===t.originalEvent.type;t.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 e.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":$a--,Ja=!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 e.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 e.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 t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++$a>1?(t={maximumAge:6e5,timeout:0},Ja=!0):(t=this.options.positionOptions,Ja=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.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}(e.Evented),es={maxWidth:100,unit:"metric"},ts=function(t){this.options=e.extend({},es,t),e.bindAll(["_onMove","setUnit"],this)};function rs(e,t,r){var n=r&&r.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([n,i]),s=o.distanceTo(a);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?ns(t,n,l/5280,e._getUIString("ScaleControl.Miles")):ns(t,n,l,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?ns(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?ns(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):ns(t,n,s,e._getUIString("ScaleControl.Meters"))}function ns(e,t,r,n){var i=os(r),o=i/r;e.style.width=t*o+"px",e.innerHTML=i+" "+n}function is(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}function os(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),r=e/t;return t*(r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:is(r))}ts.prototype.getDefaultPosition=function(){return"bottom-left"},ts.prototype._onMove=function(){rs(this._map,this._container,this.options)},ts.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ts.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ts.prototype.setUnit=function(e){this.options.unit=e,rs(this._map,this._container,this.options)};var as=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};as.prototype.onAdd=function(t){return this._map=t,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",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},as.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},as.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},as.prototype._setupUI=function(){var t=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},as.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},as.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},as.prototype._isFullscreen=function(){return this._fullscreen},as.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.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())},as.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.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 ss={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ls=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(ss),r),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,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 e.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 e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),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(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;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(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},n.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},n.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},n.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},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="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(e){this._update(e.point)},n.prototype._onMouseMove=function(e){this._update(e.point)},n.prototype._onDrag=function(e){this._update(e.point)},n.prototype._update=function(e){var t=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(e){return t._container.classList.add(e)})),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=Ha(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=cs(this.options.offset);if(!o){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+a.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var u=i.add(a[o]).round();r.setTransform(this._container,Wa[o]+" translate("+u.x+"px,"+u.y+"px)"),Ga(this._container,o,"popup")}},n.prototype._onClose=function(){this.remove()},n}(e.Evented);function cs(t){if(t){if("number"===typeof t){var r=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-t),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var n=e.Point.convert(t);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:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return cs(new e.Point(0,0))}var us={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Fa,NavigationControl:Ua,GeolocateControl:Qa,AttributionControl:Ca,ScaleControl:ts,FullscreenControl:as,Popup:ls,Marker:Ya,Style:gr,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:ot,clearPrewarmedResources:at,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return tt.workerCount},set workerCount(e){tt.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return us})),r}()},39489:e=>{"use strict";e.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},70816:function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,r;function n(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var r,n=[],i=e.length;for(r=0;r>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},F={};function B(e,t,r,n){var i=n;"string"===typeof n&&(i=function(){return this[n]()}),e&&(F[e]=i),t&&(F[t[0]]=function(){return j(i.apply(this,arguments),t[1],t[2])}),r&&(F[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,r,n=e.match(D);for(t=0,r=n.length;t=0&&z.test(e);)e=e.replace(z,n),z.lastIndex=0,r-=1;return e}var W={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(D).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var q="Invalid date";function Y(){return this._invalidDate}var X="%d",K=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,r,n){var i=this._relativeTime[r];return E(i)?i(e,t,r,n):i.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return E(r)?r(t):r.replace(/%s/i,t)}var te={};function re(e,t){var r=e.toLowerCase();te[r]=te[r+"s"]=te[t]=e}function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,r,n={};for(r in e)s(e,r)&&(t=ne(r))&&(n[t]=e[r]);return n}var oe={};function ae(e,t){oe[e]=t}function se(e){var t,r=[];for(t in e)s(e,t)&&r.push({unit:t,priority:oe[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}function le(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=ce(t)),r}function de(e,t){return function(r){return null!=r?(he(this,e,r),n.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(r=ue(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Qe(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function pe(e){return E(this[e=ne(e)])?this[e]():this}function me(e,t){if("object"===typeof e){var r,n=se(e=ie(e)),i=n.length;for(r=0;r68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function yt(e,t,r,n,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}function xt(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+xt(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,i){var o,a,s=1+7*(t-1)+(7+r-n)%7+bt(e,n,i);return s<=0?a=mt(o=e-1)+s:s>mt(e)?(o=e+1,a=s-mt(e)):(o=e,a=s),{year:o,dayOfYear:a}}function _t(e,t,r){var n,i,o=bt(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?n=a+kt(i=e.year()-1,t,r):a>kt(e.year(),t,r)?(n=a-kt(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function kt(e,t,r){var n=bt(e,t,r),i=bt(e+1,t,r);return(mt(e)-n+i)/7}function St(e){return _t(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),re("week","w"),re("isoWeek","W"),ae("week",5),ae("isoWeek",5),Le("w",_e),Le("ww",_e,ye),Le("W",_e),Le("WW",_e,ye),Be(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=ue(e)}));var Tt={dow:0,doy:6};function Mt(){return this._week.dow}function Ct(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Et(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),B("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),B("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),re("day","d"),re("weekday","e"),re("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Le("d",_e),Le("e",_e),Le("E",_e),Le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Le("dddd",(function(e,t){return t.weekdaysRegex(e)})),Be(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:g(r).invalidWeekday=e})),Be(["d","e","E"],(function(e,t,r,n){t[n]=ue(e)}));var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Dt=Re,zt=Re,Nt=Re;function Ft(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(r,this._week.dow):e?r[e.day()]:r}function Bt(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Zt(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null}function Vt(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Ut.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=ze(this.weekdaysMin(r,"")),i=ze(this.weekdaysShort(r,"")),o=ze(this.weekdays(r,"")),a.push(n),s.push(i),l.push(o),c.push(n),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(){return this.hours()||24}function Qt(e,t){B(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,$t),B("k",["kk",2],0,Jt),B("hmm",0,0,(function(){return""+$t.apply(this)+j(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+$t.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),re("hour","h"),ae("hour",13),Le("a",er),Le("A",er),Le("H",_e),Le("h",_e),Le("k",_e),Le("HH",_e,ye),Le("hh",_e,ye),Le("kk",_e,ye),Le("hmm",ke),Le("hmmss",Se),Le("Hmm",ke),Le("Hmmss",Se),Fe(["H","HH"],Ge),Fe(["k","kk"],(function(e,t,r){var n=ue(e);t[Ge]=24===n?0:n})),Fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Fe(["h","hh"],(function(e,t,r){t[Ge]=ue(e),g(r).bigHour=!0})),Fe("hmm",(function(e,t,r){var n=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n)),g(r).bigHour=!0})),Fe("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n,2)),t[Ye]=ue(e.substr(i)),g(r).bigHour=!0})),Fe("Hmm",(function(e,t,r){var n=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n))})),Fe("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n,2)),t[Ye]=ue(e.substr(i))}));var rr=/[ap]\.?m?\.?/i,nr=de("Hours",!0);function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var or,ar={calendar:R,longDateFormat:W,invalidDate:q,ordinal:X,dayOfMonthOrdinalParse:K,relativeTime:J,months:et,monthsShort:tt,week:Tt,weekdays:Rt,weekdaysMin:jt,weekdaysShort:Lt,meridiemParse:rr},sr={},lr={};function cr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(n=hr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&cr(i,r)>=t-1)break;t--}o++}return or}function fr(e){return null!=e.match("^[^/\\\\]*$")}function hr(t){var r=null;if(void 0===sr[t]&&e&&e.exports&&fr(t))try{r=or._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),pr(r)}catch(n){sr[t]=null}return sr[t]}function pr(e,t){var r;return e&&((r=c(t)?vr(e):mr(e,t))?or=r:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),or._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=sr[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=sr[e]._config;else if(null!=t.parentLocale)if(null!=sr[t.parentLocale])n=sr[t.parentLocale]._config;else{if(null==(r=hr(t.parentLocale)))return lr[t.parentLocale]||(lr[t.parentLocale]=[]),lr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return sr[e]=new P(O(n,t)),lr[e]&&lr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),sr[e]}return delete sr[e],null}function gr(e,t){if(null!=t){var r,n,i=ar;null!=sr[e]&&null!=sr[e].parentLocale?sr[e].set(O(sr[e]._config,t)):(null!=(n=hr(e))&&(i=n._config),t=O(i,t),null==n&&(t.abbr=e),(r=new P(t)).parentLocale=sr[e],sr[e]=r),pr(e)}else null!=sr[e]&&(null!=sr[e].parentLocale?(sr[e]=sr[e].parentLocale,e===pr()&&pr(e)):null!=sr[e]&&delete sr[e]);return sr[e]}function vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return or;if(!o(e)){if(t=hr(e))return t;e=[e]}return dr(e)}function yr(){return M(sr)}function xr(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[He]<0||r[He]>11?He:r[We]<1||r[We]>Qe(r[Ve],r[He])?We:r[Ge]<0||r[Ge]>24||24===r[Ge]&&(0!==r[qe]||0!==r[Ye]||0!==r[Xe])?Ge:r[qe]<0||r[qe]>59?qe:r[Ye]<0||r[Ye]>59?Ye:r[Xe]<0||r[Xe]>999?Xe:-1,g(e)._overflowDayOfYear&&(tWe)&&(t=We),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=$e),g(e).overflow=t),e}var br=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_r=/Z|[+-]\d\d(?::?\d\d)?/,kr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Sr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tr=/^\/?Date\((-?\d+)/i,Mr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Cr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ar(e){var t,r,n,i,o,a,s=e._i,l=br.exec(s)||wr.exec(s),c=kr.length,u=Sr.length;if(l){for(g(e).iso=!0,t=0,r=c;tmt(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),r=xt(o,0,e._dayOfYear),e._a[He]=r.getUTCMonth(),e._a[We]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[qe]&&0===e._a[Ye]&&0===e._a[Xe]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?xt:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Fr(e){var t,r,n,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,r=Dr(t.GG,e._a[Ve],_t(Yr(),1,4).year),n=Dr(t.W,1),((i=Dr(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=_t(Yr(),o,a),r=Dr(t.gg,e._a[Ve],c.year),n=Dr(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),n<1||n>kt(r,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=wt(r,n,i,o,a),e._a[Ve]=s.year,e._dayOfYear=s.dayOfYear)}function Br(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;var t,r,i,o,a,s,l,c=""+e._i,u=c.length,d=0;for(l=(i=H(e._f,e._locale).match(D)||[]).length,t=0;t0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(r)+r.length),d+=r.length),F[o]?(r?g(e).empty=!1:g(e).unusedTokens.push(o),Ze(o,r,e)):e._strict&&!r&&g(e).unusedTokens.push(o);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ge]<=12&&!0===g(e).bigHour&&e._a[Ge]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ge]=Zr(e._locale,e._a[Ge],e._meridiem),null!==(s=g(e).era)&&(e._a[Ve]=e._locale.erasConvertYear(s,e._a[Ve])),Nr(e),xr(e)}else Lr(e);else Ar(e)}function Zr(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Ur(e){var t,r,n,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()}));function $r(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yr();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _n(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Wr(t))._a?(e=t._isUTC?p(t._a):Yr(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function kn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function Tn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Mn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Cn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function An(e,t){var r,n,i,o=e,a=null;return sn(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Mn.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:ue(a[We])*r,h:ue(a[Ge])*r,m:ue(a[qe])*r,s:ue(a[Ye])*r,ms:ue(ln(1e3*a[Xe]))*r}):(a=Cn.exec(e))?(r="-"===a[1]?-1:1,o={y:En(a[2],r),M:En(a[3],r),w:En(a[4],r),d:En(a[5],r),h:En(a[6],r),m:En(a[7],r),s:En(a[8],r)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=On(Yr(o.from),Yr(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),n=new an(o),sn(e)&&s(e,"_locale")&&(n._locale=e._locale),sn(e)&&s(e,"_isValid")&&(n._isValid=e._isValid),n}function En(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function In(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=hn(t,e),e.isBefore(t)?r=In(e,t):((r=In(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Pn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),Rn(this,An(r,n),e),this}}function Rn(e,t,r,i){var o=t._milliseconds,a=ln(t._days),s=ln(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,fe(e,"Month")+s*r),a&&he(e,"Date",fe(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}An.fn=an.prototype,An.invalid=on;var Ln=Pn(1,"add"),jn=Pn(-1,"subtract");function Dn(e){return"string"===typeof e||e instanceof String}function zn(e){return k(e)||d(e)||Dn(e)||u(e)||Fn(e)||Nn(e)||null===e||void 0===e}function Nn(e){var t,r,n=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;tr.valueOf():r.valueOf()9999?V(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(r,"Z")):V(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function ti(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yr(e).isValid())?An({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yr(),e)}function ii(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yr(e).isValid())?An({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Yr(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,di=60*ui,fi=3506328*di;function hi(e,t){return(e%t+t)%t}function pi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-fi:new Date(e,t,r).valueOf()}function mi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-fi:Date.UTC(e,t,r)}function gi(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*ui),di);break;case"minute":t=this._d.valueOf(),t-=hi(t,ui);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),n.updateOffset(this,!0),this}function vi(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-hi(t+(this._isUTC?0:this.utcOffset()*ui),di)-1;break;case"minute":t=this._d.valueOf(),t+=ui-hi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function xi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ki(){return this.isValid()?this.toISOString():null}function Si(){return v(this)}function Ti(){return h({},g(this))}function Mi(){return g(this).overflow}function Ci(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var r,i,o,a=this._eras||vr("en")._eras;for(r=0,i=a.length;r=0)return l[n]}function Ii(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e(o=kt(e,n,i))&&(t=o),$i.call(this,e,t,r,n,i))}function $i(e,t,r,n,i){var o=wt(e,t,r,n,i),a=xt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ji(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Le("N",Ni),Le("NN",Ni),Le("NNN",Ni),Le("NNNN",Fi),Le("NNNNN",Bi),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?g(r).era=i:g(r).invalidEra=e})),Le("y",Ae),Le("yy",Ae),Le("yyy",Ae),Le("yyyy",Ae),Le("yo",Zi),Fe(["y","yy","yyy","yyyy"],Ve),Fe(["yo"],(function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ve]=r._locale.eraYearOrdinalParse(e,i):t[Ve]=parseInt(e,10)})),B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vi("gggg","weekYear"),Vi("ggggg","weekYear"),Vi("GGGG","isoWeekYear"),Vi("GGGGG","isoWeekYear"),re("weekYear","gg"),re("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Le("G",Ee),Le("g",Ee),Le("GG",_e,ye),Le("gg",_e,ye),Le("GGGG",Me,be),Le("gggg",Me,be),Le("GGGGG",Ce,we),Le("ggggg",Ce,we),Be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=ue(e)})),Be(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),B("Q",0,"Qo","quarter"),re("quarter","Q"),ae("quarter",7),Le("Q",ve),Fe("Q",(function(e,t){t[He]=3*(ue(e)-1)})),B("D",["DD",2],"Do","date"),re("date","D"),ae("date",9),Le("D",_e),Le("DD",_e,ye),Le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],We),Fe("Do",(function(e,t){t[We]=ue(e.match(_e)[0])}));var Qi=de("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),re("dayOfYear","DDD"),ae("dayOfYear",4),Le("DDD",Te),Le("DDDD",xe),Fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=ue(e)})),B("m",["mm",2],0,"minute"),re("minute","m"),ae("minute",14),Le("m",_e),Le("mm",_e,ye),Fe(["m","mm"],qe);var to=de("Minutes",!1);B("s",["ss",2],0,"second"),re("second","s"),ae("second",15),Le("s",_e),Le("ss",_e,ye),Fe(["s","ss"],Ye);var ro,no,io=de("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),re("millisecond","ms"),ae("millisecond",16),Le("S",Te,ve),Le("SS",Te,ye),Le("SSS",Te,xe),ro="SSSS";ro.length<=9;ro+="S")Le(ro,Ae);function oo(e,t){t[Xe]=ue(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Fe(ro,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}no=de("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var lo=_.prototype;function co(e){return Yr(1e3*e)}function uo(){return Yr.apply(null,arguments).parseZone()}function fo(e){return e}lo.add=Ln,lo.calendar=Un,lo.clone=Vn,lo.diff=Kn,lo.endOf=vi,lo.format=ti,lo.from=ri,lo.fromNow=ni,lo.to=ii,lo.toNow=oi,lo.get=pe,lo.invalidAt=Mi,lo.isAfter=Hn,lo.isBefore=Wn,lo.isBetween=Gn,lo.isSame=qn,lo.isSameOrAfter=Yn,lo.isSameOrBefore=Xn,lo.isValid=Si,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Kr,lo.min=Xr,lo.parsingFlags=Ti,lo.set=me,lo.startOf=gi,lo.subtract=jn,lo.toArray=wi,lo.toObject=_i,lo.toDate=bi,lo.toISOString=Qn,lo.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=ki,lo.toString=Jn,lo.unix=xi,lo.valueOf=yi,lo.creationData=Ci,lo.eraName=Oi,lo.eraNarrow=Pi,lo.eraAbbr=Ri,lo.eraYear=Li,lo.year=gt,lo.isLeapYear=vt,lo.weekYear=Hi,lo.isoWeekYear=Wi,lo.quarter=lo.quarters=Ji,lo.month=ut,lo.daysInMonth=dt,lo.week=lo.weeks=At,lo.isoWeek=lo.isoWeeks=Et,lo.weeksInYear=Yi,lo.weeksInWeekYear=Xi,lo.isoWeeksInYear=Gi,lo.isoWeeksInISOWeekYear=qi,lo.date=Qi,lo.day=lo.days=Ht,lo.weekday=Wt,lo.isoWeekday=Gt,lo.dayOfYear=eo,lo.hour=lo.hours=nr,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=no,lo.utcOffset=mn,lo.utc=vn,lo.local=yn,lo.parseZone=xn,lo.hasAlignedHourOffset=bn,lo.isDST=wn,lo.isLocal=kn,lo.isUtcOffset=Sn,lo.isUtc=Tn,lo.isUTC=Tn,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=T("dates accessor is deprecated. Use date instead.",Qi),lo.months=T("months accessor is deprecated. Use month instead",ut),lo.years=T("years accessor is deprecated. Use year instead",gt),lo.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),lo.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_n);var ho=P.prototype;function po(e,t,r,n){var i=vr(),o=p().set(n,t);return i[r](o,e)}function mo(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=po(e,n,r,"month");return i}function go(e,t,r,n){"boolean"===typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var i,o=vr(),a=e?o._week.dow:0,s=[];if(null!=r)return po(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,n,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function xo(e,t,r){return go(e,t,r,"weekdays")}function bo(e,t,r){return go(e,t,r,"weekdaysShort")}function wo(e,t,r){return go(e,t,r,"weekdaysMin")}ho.calendar=L,ho.longDateFormat=G,ho.invalidDate=Y,ho.ordinal=$,ho.preparse=fo,ho.postformat=fo,ho.relativeTime=Q,ho.pastFuture=ee,ho.set=I,ho.eras=Ai,ho.erasParse=Ei,ho.erasConvertYear=Ii,ho.erasAbbrRegex=Di,ho.erasNameRegex=ji,ho.erasNarrowRegex=zi,ho.months=ot,ho.monthsShort=at,ho.monthsParse=lt,ho.monthsRegex=ht,ho.monthsShortRegex=ft,ho.week=St,ho.firstDayOfYear=Ct,ho.firstDayOfWeek=Mt,ho.weekdays=Ft,ho.weekdaysMin=Zt,ho.weekdaysShort=Bt,ho.weekdaysParse=Vt,ho.weekdaysRegex=qt,ho.weekdaysShortRegex=Yt,ho.weekdaysMinRegex=Xt,ho.isPM=tr,ho.meridiem=ir,pr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=T("moment.lang is deprecated. Use moment.locale instead.",pr),n.langData=T("moment.langData is deprecated. Use moment.localeData instead.",vr);var _o=Math.abs;function ko(){var e=this._data;return this._milliseconds=_o(this._milliseconds),this._days=_o(this._days),this._months=_o(this._months),e.milliseconds=_o(e.milliseconds),e.seconds=_o(e.seconds),e.minutes=_o(e.minutes),e.hours=_o(e.hours),e.months=_o(e.months),e.years=_o(e.years),this}function So(e,t,r,n){var i=An(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function To(e,t){return So(this,e,t,1)}function Mo(e,t){return So(this,e,t,-1)}function Co(e){return e<0?Math.floor(e):Math.ceil(e)}function Ao(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Co(Io(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=ce(o/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,r=ce(t/60),l.hours=r%24,a+=ce(r/24),s+=i=ce(Eo(a)),a-=Co(Io(i)),n=ce(s/12),s%=12,l.days=a,l.months=s,l.years=n,this}function Eo(e){return 4800*e/146097}function Io(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Eo(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Io(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Po(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Ro(e){return function(){return this.as(e)}}var Lo=Ro("ms"),jo=Ro("s"),Do=Ro("m"),zo=Ro("h"),No=Ro("d"),Fo=Ro("w"),Bo=Ro("M"),Zo=Ro("Q"),Uo=Ro("y");function Vo(){return An(this)}function Ho(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Wo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Go=Wo("milliseconds"),qo=Wo("seconds"),Yo=Wo("minutes"),Xo=Wo("hours"),Ko=Wo("days"),$o=Wo("months"),Jo=Wo("years");function Qo(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=An(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),d=ea(i.as("y")),f=o<=r.ss&&["s",o]||o0,f[4]=n,ra.apply(null,f)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=na(this,!i,o,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,r=ce(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var ua=an.prototype;return ua.isValid=nn,ua.abs=ko,ua.add=To,ua.subtract=Mo,ua.as=Oo,ua.asMilliseconds=Lo,ua.asSeconds=jo,ua.asMinutes=Do,ua.asHours=zo,ua.asDays=No,ua.asWeeks=Fo,ua.asMonths=Bo,ua.asQuarters=Zo,ua.asYears=Uo,ua.valueOf=Po,ua._bubble=Ao,ua.clone=Vo,ua.get=Ho,ua.milliseconds=Go,ua.seconds=qo,ua.minutes=Yo,ua.hours=Xo,ua.days=Ko,ua.weeks=Qo,ua.months=$o,ua.years=Jo,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=ai,ua.localeData=li,ua.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=si,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Le("x",Ee),Le("X",Pe),Fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,r){r._d=new Date(ue(e))})),n.version="2.29.4",i(Yr),n.fn=lo,n.min=Jr,n.max=Qr,n.now=en,n.utc=p,n.unix=co,n.months=vo,n.isDate=d,n.locale=pr,n.invalid=y,n.duration=An,n.isMoment=k,n.weekdays=xo,n.parseZone=uo,n.localeData=vr,n.isDuration=sn,n.monthsShort=yo,n.weekdaysMin=wo,n.defineLocale=mr,n.updateLocale=gr,n.locales=yr,n.weekdaysShort=bo,n.normalizeUnits=ne,n.relativeTimeRounding=ia,n.relativeTimeThreshold=oa,n.calendarFormat=Zn,n.prototype=lo,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()},53420:(e,t,r)=>{"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==o||l(s))&&(r=0|e,i=c||0,o=u||0,t&&t(r,i,o,a))}function u(e){c(0,e)}function d(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function f(e){l(e)&&t&&t(r,i,o,a)}function h(e){0===n.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():function(){if(!s)return;s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f))}()},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(48942)},49175:e=>{var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i=e.clientX||0,o=e.clientY||0,a=(s=r,s===window||s===document||s===document.body?t:s.getBoundingClientRect());var s;return n[0]=i-a.left,n[1]=o-a.top,n}},48942:(e,t)=>{"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<{"use strict";var n=r(9126);e.exports=function(e,t,r){"function"===typeof e&&(r=!!t,t=e,e=window);var i=n("ex",e),o=function(e){r&&e.preventDefault();var n=e.deltaX||0,o=e.deltaY||0,a=e.deltaZ||0,s=1;switch(e.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(o*=s,a*=s,(n*=s)||o||a)return t(n,o,a,e)};return e.addEventListener("wheel",o),o}},4142:function(e,t,r){var n;!function(i,o,a){o[i]=o[i]||a(),e.exports?e.exports=o[i]:void 0===(n=function(){return o[i]}.call(t,r,t,e))||(e.exports=n)}("Promise","undefined"!=typeof r.g?r.g:this,(function(){"use strict";var e,t,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(g){e=function(e,t,r){return e[t]=r,e}}function o(e,n){r.add(e,n),t||(t=i(r.drain))}function a(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&o(s,r))}catch(g){u.call(new f(r),g)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&o(s,t))}function d(e,t,r,n){for(var i=0;i{"use strict";e.exports=function(e){for(var t,r=[],a=0,s=0,l=0,c=0,u=null,d=null,f=0,h=0,p=0,m=e.length;p4?(a=g[g.length-4],s=g[g.length-3]):(a=f,s=h),r.push(g)}return r};var n=r(95036);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function o(e,t,r,n,i,o){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}},71843:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{var n="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"===typeof i.get?i.get:null,a=n&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,k=Array.prototype.concat,S=Array.prototype.join,T=Array.prototype.slice,M=Math.floor,C="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,R=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var n=e<0?-M(-e):M(e);if(n!==e){var i=String(n),o=y.call(t,i.length+1);return x.call(i,r,"$&_")+"."+x.call(x.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(t,r,"$&_")}var j=r(24654),D=j.custom,z=U(D)?D:null;function N(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return x.call(String(e),/"/g,""")}function B(e){return"[object Array]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function Z(e){return"[object RegExp]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(I)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,i,s){var l=n||{};if(H(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(l,"maxStringLength")&&("number"===typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!H(l,"customInspect")||l.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(l,"numericSeparator")&&"boolean"!==typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=l.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,l);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return b?L(t,_):_}if("bigint"===typeof t){var M=String(t)+"n";return b?L(t,M):M}var A="undefined"===typeof l.depth?5:l.depth;if("undefined"===typeof i&&(i=0),i>=A&&A>0&&"object"===typeof t)return B(t)?"[Array]":"[Object]";var D=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(l,i);if("undefined"===typeof s)s=[];else if(G(s,t)>=0)return"[Circular]";function V(t,r,n){if(r&&(s=T.call(s)).push(r),n){var o={depth:l.depth};return H(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,i+1,s)}return e(t,l,i+1,s)}if("function"===typeof t&&!Z(t)){var Y=function(e){if(e.name)return e.name;var t=v.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Q(t,V);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(U(t)){var te=I?x.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t);return"object"!==typeof t||I?te:X(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var re="<"+w.call(String(t.nodeName)),ne=t.attributes||[],ie=0;ie"}if(B(t)){if(0===t.length)return"[]";var oe=Q(t,V);return D&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+J(oe,D)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var ae=Q(t,V);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ae,", ")+" }":"{ ["+String(t)+"] "+S.call(k.call("[cause]: "+V(t.cause),ae),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&j)return j(t,{depth:A-i});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(re){return!0}return e instanceof Map}catch(t){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,r){se.push(V(r,t,!0)+" => "+V(e,t))})),$("Map",o.call(t),se,D)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(r){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(V(e,t))})),$("Set",c.call(t),le,D)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(re){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return K("WeakMap");if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(re){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return K("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return K("WeakRef");if(function(e){return"[object Number]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(V(Number(t)));if(function(e){if(!e||"object"!==typeof e||!C)return!1;try{return C.call(e),!0}catch(t){}return!1}(t))return X(V(C.call(t)));if(function(e){return"[object Boolean]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(p.call(t));if(function(e){return"[object String]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(V(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!Z(t)){var ce=Q(t,V),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!ue&&O&&Object(t)===t&&O in t?y.call(W(t),8,-1):de?"Object":"",he=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+S.call(k.call([],fe||[],de||[]),": ")+"] ":"");return 0===ce.length?he+"{}":D?he+"{"+J(ce,D)+"}":he+"{ "+S.call(ce,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function W(e){return m.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(y.call(e,0,t.maxStringLength),t)+n}return N(x.call(x.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function X(e){return"Object("+e+")"}function K(e){return e+" { ? }"}function $(e,t,r,n){return e+" ("+t+") {"+(n?J(r,n):S.call(r,", "))+"}"}function J(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Q(e,t){var r=B(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";var t=function(e){return e!==e};e.exports=function(e,r){return 0===e&&0===r?1/e===1/r:e===r||!(!t(e)||!t(r))}},28199:(e,t,r)=>{"use strict";var n=r(89959),i=r(59962),o=r(64091),a=r(24584),s=r(98229),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},24584:(e,t,r)=>{"use strict";var n=r(64091);e.exports=function(){return"function"===typeof Object.is?Object.is:n}},98229:(e,t,r)=>{"use strict";var n=r(24584),i=r(89959);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},2782:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(82950),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{d(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(e){var t=null!==e&&"object"===typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),f=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(82950),o=Object.keys,a=o?function(e){return o(e)}:r(2782),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},82950:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},8047:(e,t,r)=>{"use strict";var n=r(66328),i=r(80541)(),o=r(44680),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(8047);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";function t(e,t){if("string"!==typeof e)return[e];var r=[e];"string"===typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",o=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function o(t,o,a){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach((function(e,n){for(var i,a=0;e!=i;)if(i=e,e=e.replace(t,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function e(t,r,n){for(var i,o=[],s=0;i=a.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(t.slice(0,i.index)),o.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return o.push(t),o}(r[0],r)}function r(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(o,s)}return i}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,n){return Array.isArray(e)?r(e,n):t(e,n)}n.parse=t,n.stringify=r,e.exports=n},86840:(e,t,r)=>{"use strict";var n=r(49147);e.exports=function(e){var t;arguments.length>1&&(e=arguments);"string"===typeof e?e=e.split(/\s/).map(parseFloat):"number"===typeof e&&(e=[e]);e.length&&"number"===typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=n(e,{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:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height);return t}},76170:e=>{e.exports=function(e){var i=[];return e.replace(r,(function(e,r,o){var a=r.toLowerCase();for(o=function(e){var t=e.match(n);return t?t.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==t[a])return o.unshift(r),i.push(o);if(o.length{e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3460:function(e){(function(){var t,r,n,i,o,a;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},r=process.hrtime,i=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),o=i-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},49147:e=>{"use strict";e.exports=function(e,t,n){var i,o,a={};if("string"===typeof t&&(t=r(t)),Array.isArray(t)){var s={};for(o=0;o{"use strict";var n=r(53787),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 o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},96669:(e,t,r)=>{"use strict";e.exports=r(6377)},10152:(e,t,r)=>{"use strict";e.exports=r(83538)},77298:(e,t,r)=>{"use strict";e.exports=r(36522)},72527:(e,t,r)=>{"use strict";e.exports=r(85799)},48674:(e,t,r)=>{"use strict";e.exports=r(70375)},74396:(e,t,r)=>{"use strict";e.exports=r(92829)},711:(e,t,r)=>{"use strict";e.exports=r(82315)},14381:(e,t,r)=>{"use strict";e.exports=r(177)},19373:(e,t,r)=>{"use strict";e.exports=r(4950)},60686:(e,t,r)=>{"use strict";e.exports=r(64906)},66453:(e,t,r)=>{"use strict";e.exports=r(15675)},94142:(e,t,r)=>{"use strict";e.exports=r(29969)},73138:(e,t,r)=>{"use strict";e.exports=r(332)},67217:(e,t,r)=>{"use strict";e.exports=r(46717)},26972:(e,t,r)=>{"use strict";e.exports=r(6695)},84325:(e,t,r)=>{"use strict";e.exports=r(17923)},89440:(e,t,r)=>{"use strict";e.exports=r(17266)},1047:(e,t,r)=>{"use strict";e.exports=r(62235)},93292:(e,t,r)=>{"use strict";e.exports=r(99808)},93662:(e,t,r)=>{"use strict";e.exports=r(20131)},91011:(e,t,r)=>{"use strict";e.exports=r(78799)},91973:(e,t,r)=>{"use strict";e.exports=r(82298)},91237:(e,t,r)=>{"use strict";e.exports=r(34395)},4578:(e,t,r)=>{"use strict";e.exports=r(28507)},15131:(e,t,r)=>{"use strict";e.exports=r(57569)},9435:(e,t,r)=>{"use strict";var n=r(73138);n.register([r(10152),r(72527),r(93292),r(91011),r(91973),r(91237),r(66453),r(48001),r(8422),r(84325),r(52315),r(15131),r(80406),r(78967),r(42189),r(4578),r(89440),r(54197),r(8893),r(49587),r(13820),r(71463),r(60686),r(50357),r(76670),r(14381),r(54717),r(62847),r(2434),r(93662),r(57613),r(46620),r(73718),r(19373),r(67217),r(87928),r(32269),r(41904),r(711),r(12353),r(94142),r(12224),r(74396),r(22201),r(19574),r(77298),r(80661),r(96669),r(26972),r(1047),r(89879),r(48674)]),e.exports=n},32269:(e,t,r)=>{"use strict";e.exports=r(70004)},49587:(e,t,r)=>{"use strict";e.exports=r(39204)},71463:(e,t,r)=>{"use strict";e.exports=r(11829)},12224:(e,t,r)=>{"use strict";e.exports=r(69196)},46620:(e,t,r)=>{"use strict";e.exports=r(46451)},57613:(e,t,r)=>{"use strict";e.exports=r(98735)},80406:(e,t,r)=>{"use strict";e.exports=r(39966)},2434:(e,t,r)=>{"use strict";e.exports=r(26248)},87928:(e,t,r)=>{"use strict";e.exports=r(67751)},54197:(e,t,r)=>{"use strict";e.exports=r(81284)},12353:(e,t,r)=>{"use strict";e.exports=r(31871)},76670:(e,t,r)=>{"use strict";e.exports=r(56100)},54717:(e,t,r)=>{"use strict";e.exports=r(60290)},73718:(e,t,r)=>{"use strict";e.exports=r(52959)},22201:(e,t,r)=>{"use strict";e.exports=r(91775)},19574:(e,t,r)=>{"use strict";e.exports=r(33982)},80661:(e,t,r)=>{"use strict";e.exports=r(62363)},48001:(e,t,r)=>{"use strict";e.exports=r(35104)},89879:(e,t,r)=>{"use strict";e.exports=r(61881)},62847:(e,t,r)=>{"use strict";e.exports=r(5666)},50357:(e,t,r)=>{"use strict";e.exports=r(53624)},78967:(e,t,r)=>{"use strict";e.exports=r(14347)},8893:(e,t,r)=>{"use strict";e.exports=r(44201)},41904:(e,t,r)=>{"use strict";e.exports=r(86032)},42189:(e,t,r)=>{"use strict";e.exports=r(34065)},8422:(e,t,r)=>{"use strict";e.exports=r(93537)},13820:(e,t,r)=>{"use strict";e.exports=r(10001)},52315:(e,t,r)=>{"use strict";e.exports=r(83696)},43721:(e,t,r)=>{"use strict";var n=r(71304),i=r(88060),o=r(2166);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(o(t))(4),a="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=i(Math.floor(255*e[0]),0,255),r[1]=i(Math.floor(255*e[1]),0,255),r[2]=i(Math.floor(255*e[2]),0,255),r[3]=null==e[3]?255:i(Math.floor(255*e[3]),0,255)),r)}},88531:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},71304:(e,t,r)=>{"use strict";var n=r(88531);e.exports=function(e){var t;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var r=n(e);if(!r.space)return[];var i=[0,0,0],o="h"===r.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(r.values[0],i[0]),o[0]),t[1]=Math.min(Math.max(r.values[1],i[1]),o[1]),t[2]=Math.min(Math.max(r.values[2],i[2]),o[2]),"h"===r.space[0]&&(t=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return o=255*l,[o,o,o];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*o;return i}(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}},11199:(e,t,r)=>{"use strict";var n=r(22605),i=r(94060),o=r(88060);e.exports=function(e){var t,r=n(e);return r.space?((t=Array(3))[0]=o(r.values[0],0,255),t[1]=o(r.values[1],0,255),t[2]=o(r.values[2],0,255),"h"===r.space[0]&&(t=i.rgb(t)),t.push(o(r.alpha,0,1)),t):[]}},22605:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},94060:(e,t,r)=>{"use strict";var n=r(64146);e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c]=255*o;return i}},n.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?t=0:n===s?t=(i-o)/l:i===s?t=2+(o-n)/l:o===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},64146:e=>{"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},45600:e=>{"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}]},63858:(e,t,r)=>{"use strict";var n=r(45600),i=r(92948),o=r(99727),a=r(99862).templatedArray,s=r(71896);function l(e){return["In order for absolute positioning of the arrow to work, *a"+e+"ref* must be exactly the same as *"+e+"ref*, otherwise *a"+e+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+e+"ref* can be set to *pixel*,","in which case the *a"+e+"* value is specified in pixels","relative to *"+e+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(e,t,r){return["Sets the",e,"component of the arrow tail about the arrow head.","If `a"+e+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",t,"("+t,"to",r+").","If `a"+e+"ref` is not `pixel` and is exactly the same as `"+e+"ref`,","this is an absolute value on that axis,","like `"+e+"`, specified in the same coordinates as `"+e+"ref`."].join(" ")}e.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},60275:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(48293).draw;function a(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=i.getFromId(e,t.xref),n=i.getFromId(e,t.yref),o=i.getRefType(t.xref),a=i.getRefType(t.yref);t._extremes={},"range"===o&&s(t,r),"range"===a&&s(t,n)}))}function s(e,t){var r,n=t._id,o=n.charAt(0),a=e[o],s=e["a"+o],l=e[o+"ref"],c=e["a"+o+"ref"],u=e["_"+o+"padplus"],d=e["_"+o+"padminus"],f={x:1,y:-1}[o]*e[o+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+f,m=h-f,g=3*e.startarrowsize*e.arrowwidth||0,v=g+f,y=g-f;if(c===l){var x=i.findExtremes(t,[t.r2c(a)],{ppadplus:p,ppadminus:m}),b=i.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(d,m,y)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([o,a],e)}},94132:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(99862).arrayEditor;function a(e,t){var r,n,i,o,a,l,c,u=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),d={},f=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r{"use strict";var n=r(53787),i=r(66235);e.exports=function(e,t,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),u=o("showarrow");if(o("text",u?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),u){var d,f,h=o("arrowside");-1!==h.indexOf("end")&&(d=o("arrowhead"),f=o("arrowsize")),-1!==h.indexOf("start")&&(o("startarrowhead",d),o("startarrowsize",f)),o("arrowcolor",l?t.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),m=r.hoverlabel||{};if(p){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g));n.coerceFont(o,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||v})}o("captureevents",!!p)}},70028:(e,t,r)=>{"use strict";var n=r(51908),i=r(3324);e.exports=function(e,t,r,o){t=t||{};var a="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.annotations,d=t._id.charAt(0),f=0;f{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(6228),s=r(63858);function l(e,t,r){function o(r,i){return n.coerce(e,t,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(e,t,r,o);for(var u=t.showarrow,d=["x","y"],f=[-10,-30],h={_fullLayout:r},p=0;p<2;p++){var m=d[p],g=i.coerceRef(e,t,h,m,"","paper");if("paper"!==g)i.getFromId(h,g)._annIndices.push(t._index);if(i.coercePosition(t,h,o,g,m,.5),u){var v="a"+m,y=i.coerceRef(e,t,h,v,"pixel",["pixel","paper"]);"pixel"!==y&&y!==g&&(y=t[v]="pixel");var x="pixel"===y?f[p]:.4;i.coercePosition(t,h,o,y,v,x)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(e,t,["x","y"]),u&&n.noneOrAll(e,t,["ax","ay"]),c){var b=o("xclick"),w=o("yclick");t._xclick=void 0===b?t.x:i.cleanPosition(b,h,t.xref),t._yclick=void 0===w?t.y:i.cleanPosition(w,h,t.yref)}}}e.exports=function(e,t){o(e,t,{name:"annotations",handleItemDefaults:l})}},48293:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=a.strTranslate,l=r(28605),c=r(66235),u=r(50973),d=r(76719),f=r(98224),h=r(19602),p=r(63e3),m=r(99862).arrayEditor,g=r(23449);function v(e,t){var r=e._fullLayout.annotations[t]||{},n=l.getFromId(e,r.xref),i=l.getFromId(e,r.yref);n&&n.setScale(),i&&i.setScale(),x(e,r,t,!1,n,i)}function y(e,t,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),u=s?n.h:n.w;return e?c?o+(s?-t:t)/e._length:e.p2r(e.r2p(o)+t):o+(s?-t:t)/u}function x(e,t,r,o,v,x){var b,w,_=e._fullLayout,k=e._fullLayout._size,S=e._context.edits;o?(b="annotation-"+o,w=o+".annotations"):(b="annotation",w="annotations");var T=m(e.layout,w,t),M=T.modifyBase,C=T.modifyItem,A=T.getUpdateObj;_._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var E="clip"+_._uid+"_ann"+r;if(t._input&&!1!==t.visible){var I={x:{},y:{}},O=+t.textangle||0,P=_._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",t.opacity),R=P.append("g").classed("annotation-text-g",!0),L=S[t.showarrow?"annotationTail":"annotationPosition"],j=t.captureevents||S.annotationText||L,D=R.append("g").style("pointer-events",j?"all":null).call(h,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",G(n.event))}));t.hovertext&&D.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=e.getBoundingClientRect();d.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:e})})).on("mouseout",(function(){d.loneUnhover(_._hoverlayer.node())}));var z=t.borderwidth,N=t.borderpad,F=z+N,B=D.append("rect").attr("class","bg").style("stroke-width",z+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),Z=t.width||t.height,U=_._topclips.selectAll("#"+E).data(Z?[0]:[]);U.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),U.exit().remove();var V=t.font,H=_._meta?a.templateString(t.text,_._meta):t.text,W=D.append("text").classed("annotation-text",!0).text(H);S.annotationText?W.call(f.makeEditable,{delegate:D,gd:e}).call(q).on("edit",(function(r){t.text=r,this.call(q),C("text",r),v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),i.call("_guiRelayout",e,A())})):W.call(q)}else n.selectAll("#"+E).remove();function G(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return o&&(n.subplotId=o),n}function q(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),f.convertToTspans(r,e,Y),r}function Y(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&D.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=D.select(".annotation-text-math-group"),d=!n.empty(),m=u.bBox((d?n:W).node()),b=m.width,w=m.height,T=t.width||b,j=t.height||w,N=Math.round(T+2*F),V=Math.round(j+2*F);function H(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var q=!1,Y=["x","y"],X=0;X1)&&(ne===re?((he=ie.r2fraction(t["a"+te]))<0||he>1)&&(q=!0):q=!0),K=ie._offset+ie.r2p(t[te]),Q=.5}else{var pe="domain"===fe;"x"===te?(J=t[te],K=pe?ie._offset+ie._length*J:K=k.l+k.w*J):(J=1-t[te],K=pe?ie._offset+ie._length*J:K=k.t+k.h*J),Q=t.showarrow?.5:J}if(t.showarrow){de.head=K;var me=t["a"+te];if(ee=ae*H(.5,t.xanchor)-se*H(.5,t.yanchor),ne===re){var ge=l.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),de.tail=ie._offset+ie._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=k.t+k.h*me):de.tail=k.l+k.w*me:de.tail=ie._offset+ie.r2p(me),$=ee}else de.tail=K+me,$=ee+me;de.text=de.tail+ee;var ve=_["x"===te?"width":"height"];if("paper"===re&&(de.head=a.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else $=ee=le*H(Q,ce),de.text=K+ee;de.text+=ue,ee+=ue,$+=ue,t["_"+te+"padplus"]=le/2+$,t["_"+te+"padminus"]=le/2-$,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(q)D.remove();else{var be=0,we=0;if("left"!==t.align&&(be=(T-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(we=(j-w)*("middle"===t.valign?.5:1)),d)n.select("svg").attr({x:F+be-1,y:F+we}).call(u.setClipUrl,Z?E:null,e);else{var _e=F+we-m.top,ke=F+be-m.left;W.call(f.positionText,ke,_e).call(u.setClipUrl,Z?E:null,e)}U.select("rect").call(u.setRect,F,F,T,j),B.call(u.setRect,z/2,z/2,N-z,V-z),D.call(u.setTranslate,Math.round(I.x.text-N/2),Math.round(I.y.text-V/2)),R.attr({transform:"rotate("+O+","+I.x.text+","+I.y.text+")"});var Se,Te=function(r,n){P.selectAll(".annotation-arrow-g").remove();var l=I.x.head,d=I.y.head,f=I.x.tail+r,h=I.y.tail+n,m=I.x.text+r,b=I.y.text+n,w=a.rotationXYMatrix(O,m,b),_=a.apply2DTransform(w),T=a.apply2DTransform2(w),E=+B.attr("width"),L=+B.attr("height"),j=m-.5*E,z=j+E,N=b-.5*L,F=N+L,Z=[[j,N,j,F],[j,F,z,F],[z,F,z,N],[z,N,j,N]].map(T);if(!Z.reduce((function(e,t){return e^!!a.segmentsIntersect(l,d,l+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){Z.forEach((function(e){var t=a.segmentsIntersect(f,h,l,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,h=t.y)}));var U=t.arrowwidth,V=t.arrowcolor,H=t.arrowside,W=P.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),G=W.append("path").attr("d","M"+f+","+h+"L"+l+","+d).style("stroke-width",U+"px").call(c.stroke,c.rgb(V));if(g(G,H,t),S.annotationPosition&&G.node().parentNode&&!o){var q=l,Y=d;if(t.standoff){var X=Math.sqrt(Math.pow(l-f,2)+Math.pow(d-h,2));q+=t.standoff*(f-l)/X,Y+=t.standoff*(h-d)/X}var K,$,J=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-q)+","+(h-Y),transform:s(q,Y)}).style("stroke-width",U+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=u.getTranslate(D);K=e.x,$=e.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=_(K,$),i=n[0]+e,o=n[1]+r;D.call(u.setTranslate,i,o),C("x",y(v,e,"x",k,t)),C("y",y(x,r,"y",k,t)),t.axref===t.xref&&C("ax",y(v,e,"ax",k,t)),t.ayref===t.yref&&C("ay",y(x,r,"ay",k,t)),W.attr("transform",s(e,r)),R.attr({transform:"rotate("+O+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",e,A());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&Te(0,0),L)p.init({element:D.node(),gd:e,prepFn:function(){Se=R.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?C("ax",y(v,e,"ax",k,t)):C("ax",t.ax+e),t.ayref===t.yref?C("ay",y(x,r,"ay",k.w,t)):C("ay",t.ay+r),Te(e,r);else{if(o)return;var i,a;if(v)i=y(v,e,"x",k,t);else{var l=t._xsize/k.w,c=t.x+(t._xshift-t.xshift)/k.w-l/2;i=p.align(c+e/k.w,l,0,1,t.xanchor)}if(x)a=y(x,r,"y",k,t);else{var u=t._ysize/k.h,d=t.y-(t._yshift+t.yshift)/k.h-u/2;a=p.align(d-r/k.h,u,0,1,t.yanchor)}C("x",i),C("y",a),v&&x||(n=p.getCursor(v?.5:i,x?.5:a,t.xanchor,t.yanchor))}R.attr({transform:s(e,r)+Se}),h(D,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){h(D),i.call("_guiRelayout",e,A());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(45600),a=r(53787),s=a.strScale,l=a.strRotate,c=a.strTranslate;e.exports=function(e,t,r){var a,u,d,f,h=e.node(),p=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),y=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=p.backoff*g+r.standoff,w=m.backoff*v+r.startstandoff;if("line"===h.nodeName){a={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var _=a.x-u.x,k=a.y-u.y;if(f=(d=Math.atan2(k,_))+Math.PI,b&&w&&b+w>Math.sqrt(_*_+k*k))return void L();if(b){if(b*b>_*_+k*k)return void L();var S=b*Math.cos(d),T=b*Math.sin(d);u.x+=S,u.y+=T,e.attr({x2:u.x,y2:u.y})}if(w){if(w*w>_*_+k*k)return void L();var M=w*Math.cos(d),C=w*Math.sin(d);a.x-=M,a.y-=C,e.attr({x1:a.x,y1:a.y})}}else if("path"===h.nodeName){var A=h.getTotalLength(),E="";if(A{"use strict";var n=r(48293),i=r(94132);e.exports={moduleType:"component",name:"annotations",layoutAttributes:r(63858),supplyLayoutDefaults:r(39480),includeBasePlot:r(49861)("annotations"),calcAutorange:r(60275),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(70028)}},41541:(e,t,r)=>{"use strict";var n=r(63858),i=r(18693).overrideAll,o=r(99862).templatedArray;e.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},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")},26631:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605);function o(e,t){var r=t.fullSceneLayout.domain,o=t.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,a),i.setConvert(e._xa),e._xa._offset=o.l+r.x[0]*o.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*o.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,a),i.setConvert(e._ya),e._ya._offset=o.t+(1-r.y[1])*o.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*o.h*(r.y[1]-r.y[0])}}e.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(6228),s=r(41541);function l(e,t,r,o){function l(r,i){return n.coerce(e,t,s,r,i)}function c(e){var n=e+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(t,o,l,e,e,.5)}l("visible")&&(a(e,t,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(e,t,["ax","ay"])))}e.exports=function(e,t,r){o(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},3920:(e,t,r)=>{"use strict";var n=r(48293).drawRaw,i=r(40564),o=["x","y","z"];e.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,a=t.annotations,s=0;s1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*r[0],t.yaxis.r2l(l.y)*r[1],t.zaxis.r2l(l.z)*r[2]]),n(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},29162:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(41541)}}},layoutAttributes:r(41541),handleDefaults:r(59786),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var o=r.attrRegex,a=Object.keys(e),s=0;s{"use strict";e.exports=r(53114),r(74121),r(7611),r(87646),r(60563),r(78605),r(13752),r(52986),r(42616),r(57850),r(81509),r(13339),r(72612),r(27993),r(33505),r(78982)},70375:(e,t,r)=>{"use strict";var n=r(32242),i=r(53787),o=r(24956),a=o.EPOCHJD,s=o.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,r,n){var o={};return o[r]=l,i.coerce(e,t,o,r,n)},u="##",d={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:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};var f={};function h(e){var t=f[e];return t||(t=f[e]=n.instance(e))}function p(e){return i.extendFlat({},l,{description:e})}function m(e){return"Sets the calendar system to use with `"+e+"` date data."}var g={xcalendar:p(m("x"))},v=i.extendFlat({},g,{ycalendar:p(m("y"))}),y=i.extendFlat({},v,{zcalendar:p(m("z"))}),x=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));e.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:g,candlestick:g},layout:{calendar:p(["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:p(["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:p(["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:c,handleTraceDefaults:function(e,t,r,n){for(var i=0;i{"use strict";t.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.defaultLine="#444",t.lightLine="#eee",t.background="#fff",t.borderLine="#BEC8D9",t.lightFraction=1e3/11},66235:(e,t,r)=>{"use strict";var n=r(25378),i=r(51908),o=r(50146).isTypedArray,a=e.exports={},s=r(18022);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function u(e){if(i(e)||"string"!==typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===t.charAt(3)&&4===n.length;if(!o&&3!==n.length)return e;for(var a=0;a=0))return e;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},a.rgb=function(e){return a.tinyRGB(n(e))},a.opacity=function(e){return e?n(e).getAlpha():0},a.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},a.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var i=n(t||c).toRgb(),o=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},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.contrast=function(e,t,r){var i=n(e);return 1!==i.getAlpha()&&(i=n(a.combine(e,c))),(i.isDark()?t?i.lighten(t):c:r?i.darken(r):l).toString()},a.stroke=function(e,t){var r=n(t);e.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(e,t){var r=n(t);e.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(e){if(e&&"object"===typeof e){var t,r,n,i,s=Object.keys(e);for(t=0;t{"use strict";var n=r(45446),i=r(92948),o=r(10191).extendFlat,a=r(18693).overrideAll;e.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),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",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},34529:e=>{"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"}}},68528:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(96592),a=r(64698),s=r(46139),l=r(33095),c=r(9354);e.exports=function(e,t,r){var u=i.newContainer(t,"colorbar"),d=e.colorbar||{};function f(e,t){return n.coerce(d,u,c,e,t)}var h=r.margin||{t:0,b:0,l:0,r:0},p=r.width-h.l-h.r,m=r.height-h.t-h.b,g="v"===f("orientation"),v=f("thicknessmode");f("thickness","fraction"===v?30/(g?p:m):30);var y=f("lenmode");f("len","fraction"===y?1:g?m:p);var x,b,w,_="paper"===f("yref"),k="paper"===f("xref"),S="left";g?(w="middle",S=k?"left":"right",x=k?1.02:1,b=.5):(w=_?"bottom":"top",S="center",x=.5,b=_?1.02:1),n.coerce(d,u,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:x}},"x"),n.coerce(d,u,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:b}},"y"),f("xanchor",S),f("xpad"),f("yanchor",w),f("ypad"),n.noneOrAll(d,u,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var T=n.coerce(d,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",-1!==T.indexOf("inside")?"hide past domain":"hide past div"),o(d,u,f,"linear");var M=r.font,C={outerTicks:!1,font:M};-1!==T.indexOf("inside")&&(C.bgColor="black"),l(d,u,f,"linear",C),s(d,u,f,"linear",C),a(d,u,f,"linear",C),f("title.text",r._dfltTitle.colorbar);var A=u.showticklabels?u.tickfont:M,E=n.extendFlat({},A,{color:M.color,size:n.bigFont(A.size)});n.coerceFont(f,"title.font",E),f("title.side",g?"top":"right")}},51130:(e,t,r)=>{"use strict";var n=r(8996),i=r(25378),o=r(44115),a=r(44049),s=r(28605),l=r(63e3),c=r(53787),u=c.strTranslate,d=r(10191).extendFlat,f=r(19602),h=r(50973),p=r(66235),m=r(34906),g=r(98224),v=r(25584).flipScale,y=r(90471),x=r(75486),b=r(45446),w=r(81653),_=w.LINE_SPACING,k=w.FROM_TL,S=w.FROM_BR,T=r(34529).cn;e.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(e){var t,r,n,i,o=e._fullLayout,a=e.calcdata,s=[];function l(e){return d(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"===typeof i.calc?i.calc(e,n,t):(t._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,t._zrange=[r[i.min],r[i.max]])}for(var u=0;u0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=he*c.roundUp(fe/he,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(le.tick0=0)}le.dtick=ue}le.domain=a?[ae+P/N.h,ae+Q-P/N.h]:[ae+O/N.w,ae+Q-O/N.w],le.setScale(),e.attr("transform",u(Math.round(N.l),Math.round(N.t)));var pe,me=e.select("."+T.cbtitleunshift).attr("transform",u(-Math.round(N.l),-Math.round(N.t))),ge=le.ticklabelposition,ve=le.title.font.size,ye=e.select("."+T.cbaxis),xe=0,be=0;function we(n,i){var o={propContainer:le,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:z._dfltTitle.colorbar,containerGroup:e.select("."+T.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,d(o,i||{}))}function _e(){var e,t;(a&&ce||!a&&!ce)&&("top"===U&&(e=O+N.l+ee*R,t=P+N.t+te*(1-ae-Q)+3+.75*ve),"bottom"===U&&(e=O+N.l+ee*R,t=P+N.t+te*(1-ae)-3-.25*ve),"right"===U&&(t=P+N.t+te*L+3+.75*ve,e=O+N.l+ee*ae),we(le._id+"title",{attributes:{x:e,y:t,"text-anchor":a?"start":"middle"}}))}function ke(){if(a&&!ce||!a&&ce){var e,i,o=le.position||0,s=le._offset+le._length/2;if("right"===U)i=s,e=N.l+ee*o+10+ve*(le.showticklabels?1:.5);else if(e=s,"bottom"===U&&(i=N.t+te*o+10+(-1===ge.indexOf("inside")?le.tickfont.size:0)+("intside"!==le.ticks&&t.ticklen||0)),"top"===U){var l=Z.text.split("
").length;i=N.t+te*o+10-K-_*ve*l}we((a?"h":"v")+le._id+"title",{avoid:{selection:n.select(r).selectAll("g."+le._id+"tick"),side:U,offsetTop:a?0:N.t,offsetLeft:a?N.l:0,maxShift:a?z.width:z.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Se(){if(!a&&!ce||a&&ce){var o,l=e.select("."+T.cbtitle),d=l.select("text"),f=[-M/2,M/2],p=l.select(".h"+le._id+"title-math-group").node(),m=15.6;if(d.node()&&(m=parseInt(d.node().style.fontSize,10)*_),p?(o=h.bBox(p),be=o.width,(xe=o.height)>m&&(f[1]-=(xe-m)/2)):d.node()&&!d.classed(T.jsPlaceholder)&&(o=h.bBox(d.node()),be=o.width,xe=o.height),a){if(xe){if(xe+=5,"top"===U)le.domain[1]-=xe/N.h,f[1]*=-1;else{le.domain[0]+=xe/N.h;var v=g.lineCount(d);f[1]+=(1-v)*m}l.attr("transform",u(f[0],f[1])),le.setScale()}}else be&&("right"===U&&(le.domain[0]+=(be+ve/2)/N.w),l.attr("transform",u(f[0],f[1])),le.setScale())}e.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",a?u(0,Math.round(N.h*(1-le.domain[1]))):u(Math.round(N.w*le.domain[0]),0)),ye.attr("transform",a?u(0,Math.round(-N.t)):u(Math.round(-N.l),0));var y=e.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Y);y.enter().append("rect").classed(T.cbfill,!0).attr("style",""),y.exit().remove();var x=V.map(le.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,o){var s=[0===o?V[0]:(Y[o]+Y[o-1])/2,o===Y.length-1?V[1]:(Y[o]+Y[o+1])/2].map(le.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(a?"x":"y",re).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max(K,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(t._fillgradient)h.gradient(l,r,t._id,a?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=W(e).replace("e-","");l.attr("fill",i(u).toHexString())}}));var b=e.select("."+T.cblines).selectAll("path."+T.cbline).data(B.color&&B.width?X:[]);b.enter().append("path").classed(T.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(le.c2p(e))+B.width/2%1;n.select(this).attr("d","M"+(a?t+","+r:r+","+t)+(a?"h":"v")+K).call(h.lineGroupStyle,B.width,H(e),B.dash)})),ye.selectAll("g."+le._id+"tick,path").remove();var w=re+K+(M||0)/2-("outside"===t.ticks?1:0),k=s.calcTicks(le),S=s.getTickSigns(le)[2];return s.drawTicks(r,le,{vals:"inside"===le.ticks?s.clipEnds(le,k):k,layer:ye,path:s.makeTickPath(le,w,S),transFn:s.makeTransTickFn(le)}),s.drawLabels(r,le,{vals:k,layer:ye,transFn:s.makeTransTickLabelFn(le),labelFns:s.makeLabelFns(le,w)})}function Te(){var n,s=K+M/2;-1===ge.indexOf("inside")&&(n=h.bBox(ye.node()),s+=a?n.width:n.height),pe=me.select("text");var c=0,d=a&&"top"===U,m=!a&&"right"===U,g=0;if(pe.node()&&!pe.classed(T.jsPlaceholder)){var y,x=me.select(".h"+le._id+"title-math-group").node();x&&(a&&ce||!a&&!ce)?(c=(n=h.bBox(x)).width,y=n.height):(c=(n=h.bBox(me.node())).right-N.l-(a?re:se),y=n.bottom-N.t-(a?se:re),a||"top"!==U||(s+=n.height,g=n.height)),m&&(pe.attr("transform",u(c/2+ve/2,0)),c*=2),s=Math.max(s,a?c:y)}var b=2*(a?O:P)+s+C+M/2,_=0;!a&&Z.text&&"bottom"===I&&L<=0&&(b+=_=b/2,g+=_),z._hColorbarMoveTitle=_,z._hColorbarMoveCBTitle=g;var F=C+M,B=(a?re:se)-F/2-(a?O:0),V=(a?se:re)-(a?J:P+g-_);e.select("."+T.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(b-_,2)).attr(a?"height":"width",Math.max(J+F,2)).call(p.fill,A).call(p.stroke,t.bordercolor).style("stroke-width",C);var H=m?Math.max(c-10,0):0;e.selectAll("."+T.cboutline).attr("x",(a?re:se+O)+H).attr("y",(a?se+P-J:re)+(d?xe:0)).attr(a?"width":"height",Math.max(K,2)).attr(a?"height":"width",Math.max(J-(a?2*P+xe:2*O+H),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var W=a?ne*b:0,G=a?0:(1-ie)*b-g;if(W=D?N.l-W:-W,G=j?N.t-G:-G,e.attr("transform",u(W,G)),!a&&(C||i(A).getAlpha()&&!i.equals(z.paper_bgcolor,A))){var q=ye.selectAll("text"),Y=q[0].length,X=e.select("."+T.cbbg).node(),$=h.bBox(X),Q=h.getTranslate(e),ee=2;q.each((function(e,t){var r=0,n=Y-1;if(t===r||t===n){var i,o=h.bBox(this),a=h.getTranslate(this);if(t===n){var s=o.right+a.x;(i=$.right+Q.x+se-C-ee+R-s)>0&&(i=0)}else if(t===r){var l=o.left+a.x;(i=$.left+Q.x+se+C+ee-l)<0&&(i=0)}i&&(Y<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var te={},oe=k[E],ae=S[E],ue=k[I],de=S[I],fe=b-K;a?("pixels"===f?(te.y=L,te.t=J*ue,te.b=J*de):(te.t=te.b=0,te.yt=L+l*ue,te.yb=L-l*de),"pixels"===w?(te.x=R,te.l=b*oe,te.r=b*ae):(te.l=fe*oe,te.r=fe*ae,te.xl=R-v*oe,te.xr=R+v*ae)):("pixels"===f?(te.x=R,te.l=J*oe,te.r=J*ae):(te.l=te.r=0,te.xl=R+l*oe,te.xr=R-l*ae),"pixels"===w?(te.y=1-L,te.t=b*ue,te.b=b*de):(te.t=fe*ue,te.b=fe*de,te.yt=L-v*ue,te.yb=L+v*de));var he=t.y<.5?"b":"t",be=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var we={r:z.width-B-W,l:B+te.r,b:z.height-V-G,t:V+te.b};D&&j?o.autoMargin(r,t._id,te):D?r._fullLayout._reservedMargin[t._id][he]=we[he]:j||a?r._fullLayout._reservedMargin[t._id][be]=we[be]:r._fullLayout._reservedMargin[t._id][he]=we[he]}return c.syncOrAsync([o.previousPromises,_e,Se,ke,o.previousPromises,Te],r)}(r,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,i,o,s="v"===t.orientation,c=r._fullLayout,d=c._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),f(e)},moveFn:function(r,a){e.attr("transform",n+u(r,a)),i=l.align((s?t._uFrac:t._vFrac)+r/d.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=l.align((s?t._vFrac:1-t._uFrac)-a/d.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=l.getCursor(i,o,t.xanchor,t.yanchor);f(e,c)},doneFn:function(){if(f(e),void 0!==i&&void 0!==o){var n={};n[t._propPrefix+"x"]=i,n[t._propPrefix+"y"]=o,void 0!==t._traceIndex?a.call("_guiRestyle",r,n,t._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){o.autoMargin(e,t._id)})).remove(),t.order()}}},52650:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e){return n.isPlainObject(e.colorbar)}},27632:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(9354),supplyDefaults:r(68528),draw:r(51130).draw,hasColorbar:r(52650)}},8753:(e,t,r)=>{"use strict";var n=r(9354),i=r(64563).counter,o=r(99238),a=r(88401).scales,s=o(a);function l(e){return"`"+e+"`"}e.exports=function(e,t){e=e||"";var r,o,c=(t=t||{}).cLetter||"c",u="onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),d="noScale"in t?t.noScale:"marker.line"===e,f="showScaleDflt"in t?t.showScaleDflt:"z"===c,h="string"===typeof t.colorscaleDflt?a[t.colorscaleDflt]:null,p=t.editTypeOverride||"",m=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,o=t.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=u?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",y=c+"min",x=c+"max",b=c+"mid",w=l(m+v),_=l(m+y),k=l(m+x),S=_+" and "+k,T={};T[y]=T[x]=void 0;var M={};M[v]=!1;var C={};return"color"===r&&(C.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",S,"if set."].join(" ")},t.anim&&(C.color.anim=!0)),C[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",S+g,"Defaults to `false` when",S,"are set by the user."].join(" ")},C[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},C[x]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",_,"must be set as well."].join(" ")},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:T,description:["Sets the mid-point of the color domain by scaling",_,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",w,"is `false`."].join(" ")},C.colorscale={valType:"colorscale",editType:"calc",dflt:h,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",S+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},C.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},C.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",_,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},d||(C.showscale={valType:"boolean",dflt:f,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},C.colorbar=n),t.noColorAxis||(C.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),C}},1631:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(25584).extractOpts;e.exports=function(e,t,r){var a,s=e._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(t,c).get():t,d=o(u),f=!1!==d.auto,h=d.min,p=d.max,m=d.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===h?h=g():f&&(h=u._colorAx&&n(h)?Math.min(h,g()):g()),void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),f&&void 0!==m&&(p-m>m-h?h=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,d._sync("colorscale",a))}},20525:(e,t,r)=>{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(25584).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function a(e,i){var a=i.container?n.nestedProperty(e,i.container).get():e;if(a)if(a.coloraxis)a._colorAx=t[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(51908),i=r(53787),o=r(52650),a=r(68528),s=r(88401).isValid,l=r(44049).traceIs;function c(e,t){var r=t.slice(0,t.length-1);return t?i.nestedProperty(e,r).get()||{}:e}e.exports=function e(t,r,u,d,f){var h=f.prefix,p=f.cLetter,m="_module"in r,g=c(t,h),v=c(r,h),y=c(r._template||{},h)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,d,f)};if(m){var b=u._colorAxes||{},w=d(h+"coloraxis");if(w){var _=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=b[w];return void(k?(k[2].push(x),k[0]!==_&&(k[0]=!1,i.warn(["Ignoring coloraxis:",w,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[w]=[_,r,[x]])}}var S=g[p+"min"],T=g[p+"max"],M=n(S)&&n(T)&&S{"use strict";var n=r(8996),i=r(25378),o=r(51908),a=r(53787),s=r(66235),l=r(88401).isValid;var c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function d(e){var t,r,n,i=e._colorAx,o=i||e,a={};for(r=0;r=0;n--,i++){var o=e[n];r[i]=[1-o[0],o[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,a=e.range,l=a.length,c=new Array(l),u=0;u{"use strict";var n=r(88401),i=r(25584);e.exports={moduleType:"component",name:"colorscale",attributes:r(8753),layoutAttributes:r(49962),supplyLayoutDefaults:r(22955),handleDefaults:r(5876),crossTraceDefaults:r(20525),calc:r(1631),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}},49962:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(8753),o=r(88401).scales,a="Note that `autocolorscale` must be true for this attribute to work.";e.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},22955:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(49962),a=r(5876);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=t._colorAxes;function u(e,t){return n.coerce(s,l,o.coloraxis,e,t)}for(var d in c){var f=c[d];if(f[0])s=e[d]||{},(l=i.newContainer(t,d,"coloraxis"))._name=d,a(s,l,t,u,{prefix:"",cLetter:"c"});else{for(var h=0;h{"use strict";var n=r(25378),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)"]]},o=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!==+e[0][0]||1!==+e[e.length-1][0])return!1;for(var r=0;r{"use strict";e.exports=function(e,t,r,n,i){var o=(e-r)/(n-r),a=o+t/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},48753:(e,t,r)=>{"use strict";var n=r(53787),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,o){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*t),0,2),i[t][e]}},57873:(e,t)=>{"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},63e3:(e,t,r)=>{"use strict";var n=r(49175),i=r(62206),o=r(32954),a=r(53787).removeElement,s=r(99727),l=e.exports={};l.align=r(24788),l.getCursor=r(48753);var c=r(8603);function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(e){var t,r,n,c,f,h,p,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=w,o?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=w,x.addEventListener("touchstart",w,{passive:!1})):x.ontouchstart=w;var b=e.clampFn||function(e,t,r){return Math.abs(e)y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,h),!m){var r;try{r=new MouseEvent("click",t)}catch(o){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},8603:(e,t,r)=>{"use strict";var n=r(24521),i=r(57429),o=r(90489).getGraphDiv,a=r(82133),s=e.exports={};s.wrapped=function(e,t,r){(e=o(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,i=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},93701:(e,t)=>{"use strict";t.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},t.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},50973:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(51908),s=r(25378),l=r(44049),c=r(66235),u=r(10948),d=i.strTranslate,f=r(98224),h=r(83580),p=r(81653).LINE_SPACING,m=r(26880).DESELECTDIM,g=r(26775),v=r(94244),y=r(87267).appendArrayPointValue,x=e.exports={};function b(e,t,r){var n=t.fillpattern,i=n&&x.getPatternAttr(n.shape,0,"");if(i){var o=x.getPatternAttr(n.bgcolor,0,null),a=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),u=x.getPatternAttr(n.solidity,0,.3),d=t.uid;x.pattern(e,"point",r,d,i,l,u,void 0,n.fillmode,o,a,s)}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.font=function(e,t,r,n){i.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(c.fill,n)},x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,i){e.call(x.setPosition,t,r).call(x.setSize,n,i)},x.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),o=n.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform",d(i,o)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var i=n.select(this);x.translatePoint(e,i,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,i,o){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,o)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each((function(t){var o=t[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,i,a,s)}))}))}},x.crispRound=function(e,t,r){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var o=(((e||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(t,n||o.color),x.dashLine(t,s,a)},x.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each((function(e){var o=(((e||[])[0]||{}).trace||{}).line||{},a=t||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(x.dashLine,s,a)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());b(e,((r.data()[0]||[])[0]||{}).trace||{},t)},x.fillGroupStyle=function(e,t){e.style("stroke-width",0).each((function(e){var r=n.select(this);e[0].trace&&b(r,e[0].trace,t)}))};var w=r(49447);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(w).forEach((function(e){var t=w[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function k(e,t,r,n){var i=e%100;return x.symbolFuncs[i](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(a(e))e=+e;else if("string"===typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=_||e>=400?0:Math.floor(Math.max(e,0))};var S={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},M=o("~f"),C={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:S},horizontalreversed:{node:"linearGradient",attrs:S,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};x.gradient=function(e,t,r,o,a,l){for(var u=a.length,d=C[o],f=new Array(u),h=0;h=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),n.ms2mrc){var u;u="various"===e.ms||"various"===s.size?3:n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var d=x.symbolNumber(e.mx||s.symbol)||0;e.om=d%200>=100;var f=re(e,r),h=W(e,r);t.attr("d",k(d,u,f,h))}var p,m,g,v=!1;if(e.so)g=l.outlierwidth,m=l.outliercolor,p=s.outliercolor;else{var y=(l||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=n.lineScale(e.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=c.defaultLine,v=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=s.gradient,w=e.mgt;w?v=!0:w=b&&b.type,i.isArrayOrTypedArray(w)&&(w=w[0],C[w]||(w=0));var _=s.pattern,S=_&&x.getPatternAttr(_.shape,e.i,"");if(w&&"none"!==w){var T=e.mgc;T?v=!0:T=b.color;var M=r.uid;v&&(M+="-"+e.i),x.gradient(t,o,M,w,[[0,T],[1,p]],"fill")}else if(S){var A=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,A=!0);var I=x.getPatternAttr(E,e.i,a&&a.color||null),O=x.getPatternAttr(_.bgcolor,e.i,null),P=_.fgopacity,R=x.getPatternAttr(_.size,e.i,8),L=x.getPatternAttr(_.solidity,e.i,.3);A=A||e.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.fgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity);var j=r.uid;A&&(j+="-"+e.i),x.pattern(t,"point",o,j,S,R,L,e.mcc,_.fillmode,O,I,P)}else i.isArrayOrTypedArray(p)?c.fill(t,p[e.i]):c.fill(t,p);g&&c.stroke(t,m)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(r.size||6)/2}),e.selectedpoints&&i.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},o=e.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,u=a.opacity,d=s.opacity,f=void 0!==u,h=void 0!==d;(i.isArrayOrTypedArray(c)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?o.opacity:e.mo;return e.selected?f?u:t:h?d:m*t});var p=o.color,g=a.color,v=s.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:v||t});var y=o.size,x=a.size,b=s.size,w=void 0!==x,_=void 0!==b;return l.traceIs(e,"symbols")&&(w||_)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?w?x/2:t:_?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,u=a.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:u||(l?t:c.addOpacity(t,m))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),i=t.marker||{},o=[];r.selectedOpacityFn&&o.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&o.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&o.push((function(e,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);e.attr("d",k(x.symbolNumber(o),a,re(n,t),W(n,t))),n.mrc2=a})),o.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}x.textPointStyle=function(e,t,r){if(e.size()){var o;if(t.selectedpoints){var a=x.makeSelectedTextStyleFns(t);o=a.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each((function(e){var a=n.select(this),c=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,d=u?u(e,t,l):{},h={};y(h,t,e.i);var p=t._meta||{};c=i.texttemplateString(c,d,l._d3locale,h,e,p)}var m=e.tp||t.textposition,g=I(e,t),v=o?o(e):e.tc||t.textfont.color;a.call(x.font,e.tf||t.textfont.family,g,v).text(c).call(f.convertToTspans,r).call(E,m,g,e.mrc)}else a.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var i=n.select(this),o=r.selectedTextColorFn(e),a=e.tp||t.textposition,s=I(e,t);c.fill(i,o);var u=l.traceIs(t,"bar-like");E(i,a,s,e.mrc2||e.mrc,u)}))}};var O,P;function R(e,t,r){return r&&(e=F(e)),t?j(e[1]):L(e[0])}function L(e){var t=n.round(e,2);return O=t,t}function j(e){var t=n.round(e,2);return P=t,t}function D(e,t,r,n){var i=e[0]-t[0],o=e[1]-t[1],a=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,d=(c*c*o-l*l*s)*n,f=3*c*(l+c),h=3*l*(l+c);return[[L(t[0]+(f&&u/f)),j(t[1]+(f&&d/f))],[L(t[0]-(h&&u/h)),j(t[1]-(h&&d/h))]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=c||_>=d&&_<=c)&&(k<=f&&k>=u||k>=f&&k<=u)&&(e=[_,k])}return e}x.steps=function(e){var t=z[e]||N;return function(e){for(var r="M"+L(e[0][0])+","+j(e[0][1]),n=e.length,i=1;i=1e4&&(x.savedBBoxes={},B=0),r&&(x.savedBBoxes[r]=g),B++,i.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",U(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=d(t,r)).trim(),e[i]("transform",o),o},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+t+","+r+")").trim(),e[i]("transform",o),o};var V=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(V,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var H=/translate\([^)]*\)\s*$/;function W(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(H);e=1===t&&1===r?[]:[d(a,s),"scale("+t+","+r+")",d(-a,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},x.getMarkerStandoff=W;var G,q,Y,X,K,$,J=Math.atan2,Q=Math.cos,ee=Math.sin;function te(e,t){var r=t[0],n=t[1];return[r*Q(e)-n*ee(e),r*ee(e)+n*Q(e)]}function re(e,t){var r,n,i=e.ma;void 0===i&&(i=t.marker.angle||0);var o=t.marker.angleref;if("previous"===o||"north"===o){if(t._geo){var s=t._geo.project(e.lonlat);r=s[0],n=s[1]}else{var l=t._xA,c=t._yA;if(!l||!c)return 90;r=l.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var u,d=e.lonlat[0],f=e.lonlat[1],h=t._geo.project([d,f+1e-5]),p=t._geo.project([d+1e-5,f]),m=J(p[1]-n,p[0]-r),g=J(h[1]-n,h[0]-r);if("north"===o)u=i/180*Math.PI;else if("previous"===o){var v=d/180*Math.PI,y=f/180*Math.PI,x=G/180*Math.PI,b=q/180*Math.PI,w=x-v,_=Q(b)*ee(w),k=ee(b)*Q(y)-Q(b)*ee(y)*Q(w);u=-J(_,k)-Math.PI,G=d,q=f}var S=te(m,[Q(u),0]),T=te(g,[ee(u),0]);i=J(S[1]+T[1],S[0]+T[0])/Math.PI*180,"previous"!==o||$===t.uid&&e.i===K+1||(i=null)}if("previous"===o&&!t._geo)if($===t.uid&&e.i===K+1&&a(r)&&a(n)){var M=r-Y,C=n-X,A=t.line&&t.line.shape||"",E=A.slice(A.length-1);"h"===E&&(C=0),"v"===E&&(M=0),i+=J(C,M)/Math.PI*180+90}else i=null}return Y=r,X=n,K=e.i,$=t.uid,i}x.getMarkerAngle=re},49447:(e,t,r)=>{"use strict";var n,i,o,a,s=r(76170),l=r(8996).round,c="M0,0Z",u=Math.sqrt(2),d=Math.sqrt(3),f=Math.PI,h=Math.cos,p=Math.sin;function m(e){return null===e}function g(e,t,r){if((!e||e%360===0)&&!t)return r;if(o===e&&a===t&&n===r)return i;function l(e,r){var n=h(e),i=p(e),o=r[0],a=r[1]+(t||0);return[o*n-a*i,o*i+a*n]}o=e,a=t,n=r;for(var c=e/180*f,u=0,d=0,m=s(r),g="",v=0;v{"use strict";e.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},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",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},72304:(e,t,r)=>{"use strict";var n=r(51908),i=r(44049),o=r(28605),a=r(53787),s=r(38943);function l(e,t,r,i){var l=t["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),d=0;d{"use strict";function t(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}e.exports=function(e){var r=e.type,n=e.symmetric;if("data"===r){var i=e.array||[];if(n)return function(e,t){var r=+i[t];return[r,r]};var o=e.arrayminus||[];return function(e,t){var r=+i[t],n=+o[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=t(r,e.value),s=t(r,e.valueminus);return n||void 0===e.valueminus?function(e){var t=a(e);return[t,t]}:function(e){return[s(e),a(e)]}}},70449:(e,t,r)=>{"use strict";var n=r(51908),i=r(44049),o=r(53787),a=r(99862),s=r(48672);e.exports=function(e,t,r,l){var c="error_"+l.axis,u=a.newContainer(t,c),d=e[c]||{};function f(e,t){return o.coerce(d,u,s,e,t)}if(!1!==f("visible",void 0!==d.array||void 0!==d.value||"sqrt"===d.type)){var h=f("type","array"in d?"data":"percent"),p=!0;"sqrt"!==h&&(p=f("symmetric",!(("data"===h?"arrayminus":"valueminus")in d))),"data"===h?(f("array"),f("traceref"),p||(f("arrayminus"),f("tracerefminus"))):"percent"!==h&&"constant"!==h||(f("value"),p||f("valueminus"));var m="copy_"+l.inherit+"style";if(l.inherit)(t["error_"+l.inherit]||{}).visible&&f(m,!(d.color||n(d.thickness)||n(d.width)));l.inherit&&u[m]||(f("color",r),f("thickness"),f("width",i.traceIs(t,"gl3d")?0:4))}}},71664:(e,t,r)=>{"use strict";var n=r(53787),i=r(18693).overrideAll,o=r(48672),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};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:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(70449),calc:r(72304),makeComputeError:r(38943),plot:r(93305),style:r(72209),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys));(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}},93305:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(50973),a=r(26775);e.exports=function(e,t,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,d=e._context.staticPlot;t.each((function(t){var f,h=t[0].trace,p=h.error_x||{},m=h.error_y||{};h.ids&&(f=function(e){return e.id});var g=a.hasMarkers(h)&&h.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var v=n.select(this).selectAll("g.errorbar").data(t,f);if(v.exit().remove(),t.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var y=v.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,e),v.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0)));void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),i(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0)));return n}(e,l,c);if(!g||e.vis){var o,a=t.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=m.width;o="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(o+="m-"+f+",0h"+2*f),!a.size()?a=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):u&&(a=a.transition().duration(s.duration).ease(s.easing)),a.attr("d",o)}else a.remove();var h=t.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?m:p).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),!h.size()?h=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr("d",o)}else h.remove()}}))}}))}},72209:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},54289:(e,t,r)=>{"use strict";var n=r(92948),i=r(18971).hoverlabel,o=r(10191).extendFlat;e.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},35310:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049);function o(e,t,r,i){i=i||n.identity,Array.isArray(e)&&(t[0][r]=i(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function a(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var s=0;s{"use strict";var n=r(44049),i=r(6535).hover;e.exports=function(e,t,r){var o=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function a(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&i(e,t,r,!0),e._hoverdata&&t&&t.target&&(o&&o.then?o.then(a):a(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},82133:e=>{"use strict";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},44173:(e,t,r)=>{"use strict";var n=r(53787),i=r(54289),o=r(70439);e.exports=function(e,t,r,a){var s=n.extendFlat({},a.hoverlabel);t.hovertemplate&&(s.namelength=-1),o(e,t,(function(r,o){return n.coerce(e,t,i,r,o)}),s)}},87267:(e,t,r)=>{"use strict";var n=r(53787);t.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},t.isTraceInSubplots=function(e,r){if("splom"===e.type){for(var n=e.xaxes||[],i=e.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(8996),i=r(51908),o=r(25378),a=r(53787),s=a.strTranslate,l=a.strRotate,c=r(24521),u=r(98224),d=r(45834),f=r(50973),h=r(66235),p=r(63e3),m=r(28605),g=r(44049),v=r(87267),y=r(82133),x=r(24397),b=r(36834),w=y.YANGLE,_=Math.PI*w/180,k=1/Math.sin(_),S=Math.cos(_),T=Math.sin(_),M=y.HOVERARROWSIZE,C=y.HOVERTEXTPAD,A={box:!0,ohlc:!0,violin:!0,candlestick:!0},E={scatter:!0,scattergl:!0,splom:!0};function I(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}t.hover=function(e,t,r,o){e=a.getGraphDiv(e);var s=t.target;a.throttle(e._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){!function(e,t,r,o,s){r||(r="xy");var l=Array.isArray(r)?r:[r],u=e._fullLayout,f=u._plots||[],m=f[r],y=u._has("cartesian");if(m){var x=m.overlays.map((function(e){return e.id}));l=l.concat(x)}for(var b=l.length,w=new Array(b),_=new Array(b),S=!1,T=0;Tw[0]._length||le<0||le>_[0]._length)return p.unhoverRaw(e,t)}if(t.pointerX=se+w[0]._offset,t.pointerY=le+_[0]._offset,H="xval"in t?v.flat(l,t.xval):v.p2c(w,se),W="yval"in t?v.flat(l,t.yval):v.p2c(_,le),!i(H[0])||!i(W[0]))return a.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var de=1/0;function fe(e,r){for(q=0;qre&&(ne.splice(0,re),de=ne[0].distance),y&&0!==V&&0===ne.length){te.distance=V,te.index=!1;var d=X._module.hoverPoints(te,Q,ee,"closest",{hoverLayer:u._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=V}))),d&&d.length){var f,p=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var m=p[0];i(m.x0)&&i(m.y0)&&(f=pe(m),(!oe.vLinePoint||oe.vLinePoint.spikeDistance>f.spikeDistance)&&(oe.vLinePoint=f))}var g=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(f=pe(x),(!oe.hLinePoint||oe.hLinePoint.spikeDistance>f.spikeDistance)&&(oe.hLinePoint=f))}}}}}function he(e,t,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(e.distance)Te-1;Me--)Ie(ne[Me]);ne=Ce,ye()}var Oe=e._hoverdata,Pe=[],Re=Z(e),Le=U(e);for(G=0;G1||ne.length>1)||"closest"===R&&ae&&ne.length>1,qe=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Ye=P(ne,{gd:e,hovermode:R,rotateLabels:Ge,bgColor:qe,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance}),Xe=Ye.hoverLabels;v.isUnifiedHover(R)||(!function(e,t,r,n){var i,o,a,s,l,c,u,d=t?"xa":"ya",f=t?"ya":"xa",h=0,p=1,m=e.size(),g=new Array(m),v=0,y=n.minX,x=n.maxX,b=n.minY,w=n.maxY,_=function(e){return e*r._invScaleX},S=function(e){return e*r._invScaleY};function T(e){var t=e[0],r=e[e.length-1];if(o=t.pmin-t.pos-t.dp+t.size,a=r.pos+r.dp+r.size-t.pmax,o>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=a;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=a;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}e.each((function(e){var n=e[d],i=e[f],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(p=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=L(e,t),m=e.anchor,T="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(o?S(h.y-e.by/2):_(e.bx/2+e.tx2width/2)))+(o?S(e.by):_(e.bx));else if(o)u=(c=e.crossPos+S(M+h.y)-S(e.by/2-M))+S(e.by);else{var C=_(T*M+h.x),A=C+_(T*e.bx);c=e.crossPos+Math.min(C,A),u=e.crossPos+Math.max(C,A)}o?void 0!==b&&void 0!==w&&Math.min(u,w)-Math.max(c,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(u,x)-Math.max(c,y)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(o?k:1)/2,pmin:s,pmax:l}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));for(;!i&&h<=m;){for(h++,i=!0,s=0;s.01&&E.pmin===I.pmin&&E.pmax===I.pmax){for(l=A.length-1;l>=0;l--)A[l].dp+=o;for(C.push.apply(C,A),g.splice(s+1,1),u=0,l=C.length-1;l>=0;l--)u+=C[l].dp;for(a=u/C.length,l=C.length-1;l>=0;l--)C[l].dp-=a;i=!1}else s++}g.forEach(T)}for(s=g.length-1;s>=0;s--){var O=g[s];for(l=O.length-1;l>=0;l--){var P=O[l],R=P.datum;R.offset=P.dp,R.del=P.del}}}(Xe,Ge,u,Ye.commonLabelBoundingBox),j(Xe,Ge,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Ke=g.getComponentMethod("annotations","hasClickToShow")(e,Pe);d(n.select(s),Ke?"pointer":"")}if(!s||o||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=e._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(e,0,Oe))return;Oe&&e.emit("plotly_unhover",{event:t,points:Oe});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:w,yaxes:_,xvals:H,yvals:W})}(e,t,r,o,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var i=t.gd,o=Z(i),a=U(i),s=P(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),d=Math.max(r,n),f=Math.min(s,l),p=Math.max(s,l),m=e.trace;if(g.traceIs(m,"gl3d")){var v=i._fullLayout[m.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,d+=y,f+=x,p+=x}c.bbox={x0:u+a,x1:d+a,y0:f+o,y1:p+o},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:false,bgColor:t.bgColor||h.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,l=0,c=0;return s.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function P(e,t){var r=t.gd,i=r._fullLayout,o=t.hovermode,c=t.rotateLabels,d=t.bgColor,p=t.container,m=t.outerContainer,_=t.commonLabelOpts||{};if(0===e.length)return[[]];var k=t.fontFamily||y.HOVERFONT,S=t.fontSize||y.HOVERFONTSIZE,T=e[0],A=T.xa,E=T.ya,O=o.charAt(0),P=O+"Label",L=T[P];if(void 0===L&&"multicategory"===A.type)for(var j=0;ji.width-b?(g=i.width-b,t.attr("d","M"+(b-M)+",0L"+b+","+x+M+"v"+x+(2*C+y.height)+"H-"+b+"V"+x+M+"H"+(b-2*M)+"Z")):t.attr("d","M0,0L"+M+","+x+M+"H"+b+"v"+x+(2*C+y.height)+"H-"+b+"V"+x+M+"H-"+M+"Z"),q.minX=g-b,q.maxX=g+b,"top"===A.side?(q.minY=v-(2*C+y.height),q.maxY=v-C):(q.minY=v+C,q.maxY=v+(2*C+y.height))}else{var w,I,O;"right"===E.side?(w="start",I=1,O="",g=A._offset+A._length):(w="end",I=-1,O="-",g=A._offset),v=E._offset+(T.y0+T.y1)/2,l.attr("text-anchor",w),t.attr("d","M0,0L"+O+M+","+M+"V"+(C+y.height/2)+"h"+O+(2*C+y.width)+"V-"+(C+y.height/2)+"H"+O+M+"V-"+M+"Z"),q.minY=v-(C+y.height/2),q.maxY=v+(C+y.height/2),"right"===E.side?(q.minX=g+M,q.maxX=g+M+(2*C+y.width)):(q.minX=g-M-(2*C+y.width),q.maxX=g-M);var P,R=y.height/2,j=z-y.top-R,D="clip"+i._uid+"commonlabel"+E._id;if(g=0?le:ce+fe=0?ce:be+fe=0?ae:se+he=0?se:we+he=0,"top"!==e.idealAlign&&W||!G?W?(P+=D/2,e.anchor="start"):e.anchor="middle":(P-=D/2,e.anchor="end"),e.crossPos=P;else{if(e.pos=P,W=O+j/2+q<=N,G=O-j/2-q>=0,"left"!==e.idealAlign&&W||!G)if(W)O+=j/2,e.anchor="start";else{e.anchor="middle";var Y=q/2,X=O+Y-N,K=O-Y;X>0&&(O-=X),K<0&&(O+=-K)}else O-=j/2,e.anchor="end";e.crossPos=O}_.attr("text-anchor",e.anchor),A&&T.attr("text-anchor",e.anchor),t.attr("transform",s(O,P)+(c?l(w):""))})),{hoverLabels:_e,commonLabelBoundingBox:q}}function R(e,t,r,n,i,o){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=a.templateString(e.name,e.trace._meta)),s=F(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===i?l=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"
":"")+e.text),void 0!==e.extraText&&(l+=(l?"
":"")+e.extraText),o&&""===l&&!e.hovertemplate&&(""===s&&o.remove(),l=s);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[c+"Label"]!==i&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),l=(l=a.hovertemplateString(d,f,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(O,(function(t,r){return s=F(r,e.nameLength),""}))}return[l,s]}function L(e,t){var r=0,n=e.offset;return t&&(n*=-T,r=e.offset*S),{x:r,y:n}}function j(e,t,r,i){var o=function(e){return e*r},a=function(e){return e*i};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var i=r.select("text.nums"),s=e.anchor,l="end"===s?-1:1,c=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(M+C),n=r+t*(e.txwidth+C);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+C),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),d=L(e,t),h=d.x,p=d.y,m="middle"===s;r.select("path").attr("d",m?"M-"+o(e.bx/2+e.tx2width/2)+","+a(p-e.by/2)+"h"+o(e.bx)+"v"+a(e.by)+"h-"+o(e.bx)+"Z":"M0,0L"+o(l*M+h)+","+a(M+p)+"v"+a(e.by/2-M)+"h"+o(l*e.bx)+"v-"+a(e.by)+"H"+o(l*M+h)+"V"+a(p-M)+"Z");var g=h+c.textShiftX,v=p+e.ty0-e.by/2+C,y=e.textAlign||"auto";"auto"!==y&&("left"===y&&"start"!==s?(i.attr("text-anchor","start"),g=m?-e.bx/2-e.tx2width/2+C:-e.bx-C):"right"===y&&"end"!==s&&(i.attr("text-anchor","end"),g=m?e.bx/2-e.tx2width/2-C:e.bx+C)),i.call(u.positionText,o(g),a(v)),e.tx2width&&(r.select("text.name").call(u.positionText,o(c.text2ShiftX+c.alignShift*C+h),a(p+e.ty0-e.by/2+C)),r.select("rect").call(f.setRect,o(c.text2ShiftX+(c.alignShift-1)*e.tx2width/2+h),a(p-e.by/2-1),o(e.tx2width),a(e.by+2)))}))}function D(e,t){var r=e.index,n=e.trace||{},o=e.cd[0],s=e.cd[r]||{};function l(e){return e||i(e)&&0===e}var c=Array.isArray(r)?function(e,t){var i=a.castOption(o,r,e);return l(i)?i:a.extractOption({},n,"",t)}:function(e,t){return a.extractOption(s,n,e,t)};function u(t,r,n){var i=c(r,n);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=a.constrain(e.x0,0,e.xa._length),e.x1=a.constrain(e.x1,0,e.xa._length),e.y0=a.constrain(e.y0,0,e.ya._length),e.y1=a.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:m.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:m.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!("log"===e.xa.type&&e.xerr<=0)){var d=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var f=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function z(e,t,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),d||u){var p=h.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=n._offset+y.x,v=i._offset+y.y);var x,b,w=o.readability(y.color,p)<1.5?h.contrast(p):y.color,_=i.spikemode,k=i.spikethickness,S=i.spikecolor||w,T=m.getPxPosition(e,i);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(x=T,b=g),-1!==_.indexOf("across")){var M=i._counterDomainMin,C=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),C=Math.max(C,i.position)),x=l.l+M*l.w,b=l.l+C*l.w}a.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":k,stroke:S,"stroke-dasharray":f.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":k+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?k:-k),cy:v,r:k,fill:S}).classed("spikeline",!0)}if(d){var A,E,I=t.vLinePoint;n=I&&I.xa,i=I&&I.ya,"cursor"===n.spikesnap?(A=c.pointerX,E=c.pointerY):(A=n._offset+I.x,E=i._offset+I.y);var O,P,R=o.readability(I.color,p)<1.5?h.contrast(p):I.color,L=n.spikemode,j=n.spikethickness,D=n.spikecolor||R,z=m.getPxPosition(e,n);if(-1!==L.indexOf("toaxis")||-1!==L.indexOf("across")){if(-1!==L.indexOf("toaxis")&&(O=z,P=E),-1!==L.indexOf("across")){var N=n._counterDomainMin,F=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),F=Math.max(F,n.position)),O=l.t+(1-F)*l.h,P=l.t+(1-N)*l.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:O,y2:P,"stroke-width":j,stroke:D,"stroke-dasharray":f.dashStyle(n.spikedash,j)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:O,y2:P,"stroke-width":j+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==L.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:A,cy:z-("top"!==n.side?j:-j),r:j,fill:D}).classed("spikeline",!0)}}}function N(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function F(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function B(e,t,r){var n=t[e+"a"],i=t[e+"Val"],o=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=t.trace[e+"periodalignment"];if(a){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===a?i+=u:"middle"===a&&(i+=u/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function Z(e){return e.offsetTop+e.clientTop}function U(e){return e.offsetLeft+e.clientLeft}function V(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),u=a.apply3DTransform(r._invTransform)(s,l),d=c[0],f=c[1],h=u[0],p=u[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}},70439:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87267).isUnifiedHover;e.exports=function(e,t,r,a){a=a||{};var s=t.legend;function l(e){a.font[e]||(a.font[e]=s?t.legend.font[e]:t.font[e])}t&&o(t.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),s?(a.bgcolor||(a.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},74064:(e,t,r)=>{"use strict";var n=r(53787),i=r(18971);e.exports=function(e,t){function r(r,o){return void 0!==t[r]?t[r]:n.coerce(e,t,i,r,o)}return r("clickmode"),r("hovermode")}},76719:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(63e3),a=r(87267),s=r(18971),l=r(6535);e.exports={moduleType:"component",name:"fx",constants:r(82133),schema:{layout:s},attributes:r(54289),layoutAttributes:s,supplyLayoutGlobalDefaults:r(88832),supplyDefaults:r(44173),supplyLayoutDefaults:r(10814),calc:r(35310),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(e,t,r){return i.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return i.castOption(e,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(34579)}},18971:(e,t,r)=>{"use strict";var n=r(82133),i=r(92948),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},10814:(e,t,r)=>{"use strict";var n=r(53787),i=r(18971),o=r(74064),a=r(70439);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}o(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(t.dragmode="pan"),a(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},88832:(e,t,r)=>{"use strict";var n=r(53787),i=r(70439),o=r(18971);e.exports=function(e,t){i(e,t,(function(r,i){return n.coerce(e,t,o,r,i)}))}},97481:(e,t,r)=>{"use strict";var n=r(53787),i=r(64563).counter,o=r(29707).Y,a=r(99727).idRegex,s=r(99862),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(e,t,r,n,i,o){var a=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-a),d=u*(1-a),f=0;f1){if(!f&&!h&&!p)"independent"===S("pattern")&&(f=!0);g._hasSubplotGrid=f;var x,b,w="top to bottom"===S("roworder"),_=f?.2:.1,k=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",S,_,x,y),y:u("y",S,k,b,v,w)}}else delete t.grid}function S(e,t){return n.coerce(r,g,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,i,o,a,s,l,u,f=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(p){var x=f.subplots||[];l=r.subplots=new Array(m);var b=1;for(n=0;n{"use strict";var n=r(99727),i=r(99862).templatedArray,o=r(71896);e.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},51380:(e,t,r)=>{"use strict";var n=r(51908),i=r(3324);e.exports=function(e,t,r,o){t=t||{};var a="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.images,d=t._id.charAt(0),f=0;f{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(94389);function s(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var d=c[u],f=i.coerceRef(e,t,l,d,"paper",void 0);if("paper"!==f)i.getFromId(l,f)._imgIndices.push(t._index);i.coercePosition(t,l,o,f,d,0)}return t}e.exports=function(e,t){o(e,t,{name:"images",handleItemDefaults:s})}},8129:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(28605),a=r(24279),s=r(83580);e.exports=function(e){var t,r,l=e._fullLayout,c=[],u={},d=[];for(r=0;r{"use strict";e.exports={moduleType:"component",name:"images",layoutAttributes:r(94389),supplyLayoutDefaults:r(73150),includeBasePlot:r(49861)("images"),draw:r(8129),convertCoords:r(51380)}},4903:(e,t,r)=>{"use strict";var n=r(92948),i=r(18022);e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},29558:e=>{"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}},24397:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(99862),a=r(27231),s=r(4903),l=r(79443),c=r(63798);function u(e,t,r,u){var d=t[e]||{},f=o.newContainer(r,e);function h(e,t){return i.coerce(d,f,s,e,t)}var p=i.coerceFont(h,"font",r.font);if(h("bgcolor",r.paper_bgcolor),h("bordercolor"),h("visible")){for(var m,g=function(e,t){var r=m._input,n=m;return i.coerce(r,n,a,e,t)},v=r.font||{},y=i.coerceFont(h,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1*v.size)})),x=0,b=!1,w="normal",_=(r.shapes||[]).filter((function(e){return e.showlegend})),k=u.concat(_).filter((function(t){return e===(t.legend||"legend")})),S=0;S("legend"===e?1:0));if(!1===M&&(r[e]=void 0),(!1!==M||d.uirevision)&&(h("uirevision",r.uirevision),!1!==M)){h("borderwidth");var C,A,E,I="h"===h("orientation"),O="paper"===h("yref"),P="paper"===h("xref"),R="left";if(I?(C=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?O?(A=1.1,E="bottom"):(A=1,E="top"):O?(A=-.1,E="top"):(A=0,E="bottom")):(A=1,E="auto",P?C=1.02:(C=1,R="right")),i.coerce(d,f,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:C}},"x"),i.coerce(d,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:A}},"y"),h("traceorder",w),c.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",R),h("yanchor",E),h("valign"),i.noneOrAll(d,f,["x","y"]),h("title.text")){h("title.side",I?"left":"top");var L=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(h,"title.font",L)}}}}e.exports=function(e,t,r){var n,o=r.slice(),a=t.shapes;if(a)for(n=0;n{"use strict";var n=r(8996),i=r(53787),o=r(44115),a=r(44049),s=r(24521),l=r(63e3),c=r(50973),u=r(66235),d=r(98224),f=r(97854),h=r(29558),p=r(81653),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,y=r(49736),x=r(26040),b=r(63798),w=1,_=/^legend[0-9]*$/;function k(e,t){var r,s,f=t||{},p=e._fullLayout,_=P(f),k=f._inHover;if(k?(s=f.layer,r="hover"):(s=p._infolayer,r=_),s){var C;if(r+=p._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),k){if(!f.entries)return;C=y(f.entries,f)}else{for(var R=(e.calcdata||[]).slice(),L=p.shapes,j=0;j1)}var N=p.hiddenlabels||[];if(!k&&(!p.showlegend||!C.length))return s.selectAll("."+_).remove(),p._topdefs.select("#"+r).remove(),o.autoMargin(e,_);var F=i.ensureSingle(s,"g",_,(function(e){k||e.attr("pointer-events","all")})),B=i.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),Z=i.ensureSingle(F,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));Z.call(u.stroke,f.bordercolor).call(u.fill,f.bgcolor).style("stroke-width",f.borderwidth+"px");var U,V=i.ensureSingle(F,"g","scrollbox"),H=f.title;f._titleWidth=0,f._titleHeight=0,H.text?((U=i.ensureSingle(V,"text",_+"titletext")).attr("text-anchor","start").call(c.font,H.font).text(H.text),E(U,V,e,f,w)):V.selectAll("."+_+"titletext").remove();var W=i.ensureSingle(F,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),G=V.selectAll("g.groups").data(C);G.enter().append("g").attr("class","groups"),G.exit().remove();var q=G.selectAll("g.traces").data(i.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(e){var t=e[0].trace;return a.traceIs(t,"pie-like")?-1!==N.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(M,e,f)})).call(x,e,f).each((function(){k||n.select(this).call(A,e,_)})),i.syncOrAsync([o.previousPromises,function(){return function(e,t,r,i){var o=e._fullLayout,a=P(i);i||(i=o[a]);var s=o._size,l=b.isVertical(i),u=b.isGrouped(i),d="fraction"===i.entrywidthmode,f=i.borderwidth,p=2*f,m=h.itemGap,g=i.itemwidth+2*m,v=2*(f+m),y=O(i),x=i.y<0||0===i.y&&"top"===y,w=i.y>1||1===i.y&&"bottom"===y,_=i.tracegroupgap,k={};i._maxHeight=Math.max(x||w?o.height/2:s.h,30);var T=0;i._width=0,i._height=0;var M=function(e){var t=0,r=0,n=e.title.side;n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight));return[t,r]}(i);if(l)r.each((function(e){var t=e[0].height;c.setTranslate(this,f+M[0],f+M[1]+i._height+t/2+m),i._height+=t,i._width=Math.max(i._width,e[0].width)})),T=g+i._width,i._width+=m+g+p,i._height+=v,u&&(t.each((function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var C=I(i),A=i.x<0||0===i.x&&"right"===C,E=i.x>1||1===i.x&&"left"===C,R=w||x,L=o.width/2;i._maxWidth=Math.max(A?R&&"left"===C?s.l+s.w:L:E?R&&"right"===C?s.r+s.w:L:s.w,2*g);var j=0,D=0;r.each((function(e){var t=S(e,i,g);j=Math.max(j,t),D+=t})),T=null;var z=0;if(u){var N=0,F=0,B=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=S(r,i,g),o=r[0].height;c.setTranslate(this,M[0],M[1]+f+m+o/2+t),t+=o,e=Math.max(e,n),k[r[0].trace.legendgroup]=e}));var r=e+m;F>0&&r+f+F>i._maxWidth?(z=Math.max(z,F),F=0,B+=N+_,N=t):N=Math.max(N,t),c.setTranslate(this,F,B),F+=r})),i._width=Math.max(z,F)+f,i._height=B+N+v}else{var Z=r.size(),U=D+p+(Z-1)*m=i._maxWidth&&(z=Math.max(z,G),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,M[0]+f+H,M[1]+f+W+t/2+m),G=H+r+m,H+=n,V=Math.max(V,t)})),U?(i._width=H+p,i._height=V+v):(i._width=Math.max(z,G)+p,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(f+h.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(f+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var q=e._context.edits,Y=q.legendText||q.legendPosition;r.each((function(e){var t=n.select(this).select("."+a+"toggle"),r=e[0].height,o=e[0].trace.legendgroup,s=S(e,i,g);u&&""!==o&&(s=k[o]);var f=Y?g:T||s;l||d||(f+=m/2),c.setRect(t,0,-r/2,f,r)}))}(e,G,q,f)},function(){var t,u,y,x,b=p._size,w=f.borderwidth,S="paper"===f.xref,M="paper"===f.yref;if(H.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,i=0,o=e.node(),a=c.bBox(o).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*h.titlePad-a):"top right"===t.title.side&&(i=t._width-2*r-2*h.titlePad-a),d.positionText(e,r+h.titlePad+i,r+n)}}(U,f,w),!k){var C,A;C=S?b.l+b.w*f.x-g[I(f)]*f._width:p.width*f.x-g[I(f)]*f._width,A=M?b.t+b.h*(1-f.y)-g[O(f)]*f._effHeight:p.height*(1-f.y)-g[O(f)]*f._effHeight;var E=function(e,t,r,n){var i=e._fullLayout,a=i[t],s=I(a),l=O(a),c="paper"===a.xref,u="paper"===a.yref;e._fullLayout._reservedMargin[t]={};var d=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&u)return o.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][d]=h[d]:u||"v"===a.orientation?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][d]=h[d]}(e,_,C,A);if(E)return;if(p.margin.autoexpand){var P=C,R=A;C=S?i.constrain(C,0,p.width-f._width):P,A=M?i.constrain(A,0,p.height-f._effHeight):R,C!==P&&i.log("Constrain "+_+".x to make legend fit inside graph"),A!==R&&i.log("Constrain "+_+".y to make legend fit inside graph")}c.setTranslate(F,C,A)}if(W.on(".drag",null),F.on("wheel",null),k||f._height<=f._maxHeight||e._context.staticPlot){var L=f._effHeight;k&&(L=f._height),Z.attr({width:f._width-w,height:L-w,x:w/2,y:w/2}),c.setTranslate(V,0,0),B.select("rect").attr({width:f._width-2*w,height:L-2*w,x:w,y:w}),c.setClipUrl(V,r,e),c.setRect(W,0,0,0,0),delete f._scrollY}else{var j,D,z,N=Math.max(h.scrollBarMinHeight,f._effHeight*f._effHeight/f._height),G=f._effHeight-N-2*h.scrollBarMargin,q=f._height-f._effHeight,Y=G/q,X=Math.min(f._scrollY||0,q);Z.attr({width:f._width-2*w+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-w,x:w/2,y:w/2}),B.select("rect").attr({width:f._width-2*w+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-2*w,x:w,y:w+X}),c.setClipUrl(V,r,e),J(X,N,Y),F.on("wheel",(function(){J(X=i.constrain(f._scrollY+n.event.deltaY/G*q,0,q),N,Y),0!==X&&X!==q&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;j="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,z=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(D="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/Y+e;return i.constrain(n,0,q)}(z,j,D),J(X,N,Y))}));W.call(K);var $=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(j=e.changedTouches[0].clientY,z=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(D=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/Y+e;return i.constrain(n,0,q)}(z,j,D),J(X,N,Y))}));V.call($)}function J(t,r,n){f._scrollY=e._fullLayout[_]._scrollY=t,c.setTranslate(V,0,-t),c.setRect(W,f._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),B.select("rect").attr("y",w+t)}e._context.edits.legendPosition&&(F.classed("cursor-move",!0),l.init({element:F.node(),gd:e,prepFn:function(){var e=c.getTranslate(F);y=e.x,x=e.y},moveFn:function(e,r){var n=y+e,i=x+r;c.setTranslate(F,n,i),t=l.align(n,f._width,b.l,b.l+b.w,f.xanchor),u=l.align(i+f._height,-f._height,b.t+b.h,b.t,f.yanchor)},doneFn:function(){if(void 0!==t&&void 0!==u){var r={};r[_+".x"]=t,r[_+".y"]=u,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=s.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&T(e,F,n,t,r)}}))}],e)}}function S(e,t,r){var n=e[0],i=n.width,o=t.entrywidthmode,a=n.trace.legendwidth||t.entrywidth;return"fraction"===o?t._maxWidth*a:r+(a||i)}function T(e,t,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(e,"plotly_legendclick",l);if(1===n){if(!1===c)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&f(r,e,n)}),e._context.doubleClickDelay)}else if(2===n){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&!1!==c&&f(r,e,n)}}function M(e,t,r){var n,o,s=P(r),l=e.data()[0][0],u=l.trace,f=a.traceIs(u,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=f?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var g=i.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(p?C(n,m):n);var v=r.itemwidth+2*h.itemGap;d.positionText(g,v,0),p?g.call(d.makeEditable,{gd:t,text:n}).call(E,e,t,r).on("edit",(function(n){this.text(C(n,m)).call(E,e,t,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),d=c[c.length-1],f=i.keyedContainer(o,"transforms["+d+"].styles","target","value.name");f.set(l.trace._group,n),s=f.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",t,"shapes["+u.index+"].name",s.name):a.call("_guiRestyle",t,s,u.index)})):E(g,e,t,r)}function C(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function A(e,t,r){var o,a=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-t._legendMouseDownTimea&&(s=Math.max(s-1,1)),T(t,i,e,s,n.event)}})))}function E(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void e.remove();var o=e.select("g[class*=math-group]"),a=o.node(),s=P(r);r||(r=t._fullLayout[s]);var l,u=r.borderwidth;l=n===w?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var f,p,g=l.size*m;if(a){var v=c.bBox(a);f=v.height,p=v.width,n===w?c.setTranslate(o,u,u+.75*f):c.setTranslate(o,0,.25*f)}else{var y="."+s+(n===w?"title":"")+"text",x=e.select(y),b=d.lineCount(x),_=x.node();if(f=g*b,p=_?c.bBox(_).width:0,n===w)"left"===r.title.side&&(p+=2*h.itemGap),d.positionText(x,u+h.titlePad,u+g);else{var k=2*h.itemGap+r.itemwidth;i.groupTitle&&(k=h.itemGap,p-=r.itemwidth),d.positionText(x,k,-g*((b-1)/2-.3))}}n===w?(r._titleWidth=p,r._titleHeight=f):(i.lineHeight=g,i.height=Math.max(f,16)+3,i.width=p)}(t,r,n,i)}))}function I(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function O(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}function P(e){return e._id||"legend"}e.exports=function(e,t){if(t)k(e,t);else{var r=e._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===i.indexOf(t)&&e.remove()}));for(var o=0;o{"use strict";var n=r(44049),i=r(63798);e.exports=function(e,t,r){var o,a,s=t._inHover,l=i.isGrouped(t),c=i.isReversed(t),u={},d=[],f=!1,h={},p=0,m=0;function g(e,n,o){if(!1!==t.visible&&(!r||e===t._id))if(""!==n&&i.isGrouped(t))-1===d.indexOf(n)?(d.push(n),f=!0,u[n]=[o]):u[n].push(o);else{var a="~~i"+p;d.push(a),u[a]=[o],p++}}for(o=0;oC&&(M=C)}S[o][0]._groupMinRank=M,S[o][0]._preGroupSort=o}var A=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(S.forEach((function(e,t){e[0]._preGroupSort=t})),S.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),o=0;o{"use strict";var n=r(44049),i=r(53787),o=i.pushUnique,a=!0;e.exports=function(e,t,r){var s=t._fullLayout;if(!t._dragged&&!t._editing){var l,c=s.legend.itemclick,u=s.legend.itemdoubleclick,d=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&a&&t.data&&t._context.showTips?(i.notifier(i._(t,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=u),l){var f="togglegroup"===d,h=s.hiddenlabels?s.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var m=t._fullData,g=(s.shapes||[]).filter((function(e){return e.showlegend})),v=m.concat(g),y=p.trace;y._isShape&&(y=y._fullInput);var x,b,w,_,k,S=y.legendgroup,T={},M=[],C=[],A=[],E=(s.shapes||[]).map((function(e){return e._input})),I=!1,O=y.legend,P=y._fullInput;if(!(P&&P._isShape)&&n.traceIs(y,"pie-like")){var R=p.label,L=h.indexOf(R);if("toggle"===l)-1===L?h.push(R):h.splice(L,1);else if("toggleothers"===l){var j=-1!==L,D=[];for(x=0;x{"use strict";t.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},t.isVertical=function(e){return"h"!==e.orientation},t.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},19323:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"legend",layoutAttributes:r(4903),supplyLayoutDefaults:r(24397),draw:r(36834),style:r(26040)}},26040:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=o.strTranslate,s=r(50973),l=r(66235),c=r(25584).extractOpts,u=r(26775),d=r(68872),f=r(22084).castOption,h=r(29558);function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function m(e){var t=e[0].trace,r=t.contours,n=u.hasLines(t),i=u.hasMarkers(t),o=t.visible&&t.fill&&"none"!==t.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(e,t,r){return e&&o.isArrayOrTypedArray(e)?t:e>r?r:e}e.exports=function(e,t,r){var v=t._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,w=a(b,0),_=function(e,t,r,n){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?n:Math.min(i,r)};function k(e,o,a){var u=e[0].trace,d=u.marker||{},f=d.line||{},h=a?u.visible&&u.type===a:i.traceIs(u,"bar"),p=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(h?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),p.exit().remove(),p.each((function(e){var i=n.select(this),o=e[0],a=_(o.mlw,d.line,5,2);i.style("stroke-width",a+"px");var h=o.mcc;if(!r._inHover&&"mc"in o){var p=c(d),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),h=s.tryColorscale(d,"")(m)}var v=h||o.mc||d.color,y=d.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),w=s.getPatternAttr(y.fgcolor,0,null),k=y.fgopacity,S=g(y.size,8,10),T=g(y.solidity,.5,1),M="legend-"+u.uid;i.call(s.pattern,"legend",t,M,x,S,T,h,y.fillmode,b,w,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||f.color)}))}function S(e,r,a){var s=e[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[e]:[]);if(u.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),u.exit().remove(),u.size()){var h=l.marker||{},p=_(f(h.line.width,s.pts),h.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:p}}},m),v=o.minExtend(s,{trace:g},m);d(u,v,g,t)}}e.each((function(e){var t=n.select(this),i=o.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=r.valign,l=e[0].lineHeight,c=e[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",a(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var d=i.selectAll("g.legendsymbols").data([e]);d.enter().append("g").classed("legendsymbols",!0),d.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,i=e[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["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":a=[["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":a=[["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":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",w).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,a){var u,d=n.select(this),f=c(i),h=f.colorscale,m=f.reversescale;if(h){if(!r){var g=h.length;u=0===a?h[m?g-1:0][1]:1===a?h[m?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}d.attr("d",e[0]),u?d.call(l.fill,u):d.call((function(e){if(e.size()){var n="legendfill-"+i.uid;s.gradient(e,t,n,p(m,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,k(e,this,"waterfall")}var o=[];t.visible&&r&&(o=e[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 a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",w).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(e){var r=n.select(this),i=t[e[0]].marker,o=_(void 0,i.line,5,2);r.attr("d",e[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(e){k(e,this,"funnel")})).each((function(e){k(e,this)})).each((function(e){var r=e[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[e]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),a.exit().remove(),a.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=_(void 0,r.line,5,2);e.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(e,r.line.color)}else{var c=o.minExtend(r,{marker:{size:y?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,t)}}))})).each((function(e){S(e,this,"funnelarea")})).each((function(e){S(e,this,"pie")})).each((function(e){var r,i,a=m(e),l=a.showFill,d=a.showLine,f=a.showGradientLine,h=a.showGradientFill,g=a.anyFill,v=a.anyLine,y=e[0],b=y.trace,w=c(b),k=w.colorscale,S=w.reversescale,T=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",M=n.select(this),C=M.select(".legendfill").selectAll("path").data(l||h?[e]:[]);if(C.enter().append("path").classed("js-fill",!0),C.exit().remove(),C.attr("d",T+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(l)s.fillGroupStyle(e,t);else{var r="legendfill-"+b.uid;s.gradient(e,t,r,p(S),k,"fill")}})),d||f){var A=_(void 0,b.line,10,5);i=o.minExtend(b,{line:{width:A}}),r=[o.minExtend(y,{trace:i})]}var E=M.select(".legendlines").selectAll("path").data(d||f?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",T+(f?"l"+x+",0.0001":"h"+x)).call(d?s.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;s.lineGroupStyle(e),s.gradient(e,t,r,p(S),k,"stroke")}})})).each((function(e){var r,i,a=m(e),l=a.anyFill,c=a.anyLine,d=a.showLine,f=a.showMarker,h=e[0],p=h.trace,g=!f&&!c&&!l&&u.hasText(p);function v(e,t,r,n){var i=o.nestedProperty(p,e).get(),a=o.isArrayOrTypedArray(i)&&t?t(i):i;if(y&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||g||d){var b={},_={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",o.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",o.mean,[0,5],2),_.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);b.ms=k,_.marker.size=k}d&&(_.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),r=[o.minExtend(h,b)],(i=o.minExtend(p,_)).selectedpoints=null,i.texttemplate=null}var S=n.select(this).select("g.legendpoints"),T=S.selectAll("path.scatterpts").data(f?r:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",w),T.exit().remove(),T.call(s.pointStyle,i,t),f&&(r[0].mrc=3);var M=S.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",w),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var i=n.select(this),o=t[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var i=n.select(this),o=t[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},75331:(e,t,r)=>{"use strict";var n=r(1230);e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},93640:(e,t,r)=>{"use strict";var n=r(44049),i=r(44115),o=r(24279),a=r(16322),s=r(75629).eraseActiveShape,l=r(53787),c=l._,u=e.exports={};function d(e,t){var r,i,a=t.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=o.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===s){var h,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{"use strict";var n=r(93640),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(e){!function(e){if(-1===a.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===s.indexOf(t)&&s.push(t),-1===s.indexOf(r)&&s.push(r)}}(n[e])})),s.sort(),e.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},27709:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(75331);e.exports=function(e,t){var r=e.modebar||{},s=o.newContainer(t,"modebar");function l(e,t){return n.coerce(r,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}},54514:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"modebar",layoutAttributes:r(75331),supplyLayoutDefaults:r(27709),manage:r(55371)}},55371:(e,t,r)=>{"use strict";var n=r(24279),i=r(26775),o=r(44049),a=r(87267).isUnifiedHover,s=r(78651),l=r(93640),c=r(1230).DRAW_MODES,u=r(53787).extendDeep;e.exports=function(e){var t=e._fullLayout,r=e._context,d=t._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 f,h=r.modeBarButtons;f=Array.isArray(h)&&h.length?function(e){for(var t=u([],e),r=0;r1?(P=["toggleHover"],R=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],R=["resetGeo"]):g?(P=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],R=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:y?P=["hoverClosestPie"]:T?(P=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):P=["toggleHover"];m&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(16322),s=r(75703).version,l=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(e,t){this.graphInfo=e;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",t=t.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var d=this.getLogo();r.watermark&&(d.className=d.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var i=t.createButton(e);t.buttonElements.push(i),r.appendChild(i)})),t.element.appendChild(r)}))},u.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},u.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;void 0===i?i=e.name:"function"===typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"===typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!==typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var s=e.icon;return"function"===typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},u.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",e.path),e.transform?o.setAttribute("transform",e.transform):void 0!==e.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(o)}e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]);return t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},u.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var i=e.getAttribute("data-val")||!0,a=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=n.select(e);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(t,a).get();l.classed("active",c===i)}}))},u.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(92948),i=r(18022),o=(0,r(99862).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});e.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},67364:e=>{"use strict";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},46039:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(80254),s=r(79837),l=r(67364);function c(e,t,r,i){var o=i.calendar;function a(r,i){return n.coerce(e,t,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):t.stepmode="backward",a("count")),a("label")}}e.exports=function(e,t,r,u,d){var f=e.rangeselector||{},h=o.newContainer(t,"rangeselector");function p(e,t){return n.coerce(f,h,s,e,t)}if(p("visible",a(f,h,{name:"buttons",handleItemDefaults:c,calendar:d}).length>0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),i=0,o=0;o{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(66235),s=r(50973),l=r(53787),c=l.strTranslate,u=r(98224),d=r(24279),f=r(81653),h=f.LINE_SPACING,p=f.FROM_TL,m=f.FROM_BR,g=r(67364),v=r(37473);function y(e){return e._id}function x(e,t,r){var n=l.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,t.bordercolor).call(a.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){l.ensureSingle(e,"text","selector-text",(function(e){e.attr("text-anchor","middle")})).call(s.font,t.font).text(function(e,t){if(e.label)return t?l.templateString(e.label,t):e.label;return"all"===e.step?"all":e.count+e.step.charAt(0)}(r,n._fullLayout._meta)).call((function(e){u.convertToTspans(e,n)}))}e.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=d.list(e,"x",!0),r=[],n=0;n{"use strict";var n=r(37747),i=r(53787).titleCase;e.exports=function(e,t){var r=e._name,o={};if("all"===t.step)o[r+".autorange"]=!0;else{var a=function(e,t){var r,o=e.range,a=new Date(e.r2l(o[1])),s=t.step,l=n["utc"+i(s)],c=t.count;switch(t.stepmode){case"backward":r=e.l2r(+l.offset(a,-c));break;case"todate":var u=l.offset(a,-c);r=e.l2r(+l.ceil(u))}var d=o[1];return[r,d]}(e,t);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},6834:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(79837)}}},layoutAttributes:r(79837),handleDefaults:r(46039),draw:r(15332)}},9482:(e,t,r)=>{"use strict";var n=r(18022);e.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},81028:(e,t,r)=>{"use strict";var n=r(24279).list,i=r(10351).getAutoRange,o=r(6140);e.exports=function(e){for(var t=n(e,"x",!0),r=0;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}},17485:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(24279),a=r(9482),s=r(6022);e.exports=function(e,t,r){var l=e[r],c=t[r];if(l.rangeslider||t._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,d,f=l.rangeslider,h=i.newContainer(c,"rangeslider");if(w("visible")){w("bgcolor",t.plot_bgcolor),w("bordercolor"),w("borderwidth"),w("thickness"),w("autorange",!c.isValidRange(f.range)),w("range");var p=t._subplots;if(p)for(var m=p.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===o.name2id(r)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=a.strTranslate,l=r(50973),c=r(66235),u=r(34906),d=r(48206),f=r(24279),h=r(63e3),p=r(19602),m=r(6140);function g(e,t,r,n){var i=a.ensureSingle(e,"rect",m.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,d=l.crispRound(t,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(u,u),"stroke-width":d}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function v(e,t,r,n){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(e,t,r,i){var s,c=t.calcdata,u=e.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);u.enter().append("g").attr("class",(function(e){return m.rangePlotClassName+" "+e})).call(l.setClipUrl,i._clipId,t),u.order(),u.exit().remove(),u.each((function(e,a){var l=n.select(this),u=0===a,h=f.getFromId(t,e,"y"),p=h._name,m=i[p],g={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:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[p];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:l,xaxis:v,yaxis:y,isRangePlot:!0};u?s=x:(x.mainplot="xy",x.mainplotinfo=s),d.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=z[r+1];else if(e=n.pmax)t=z[r+1];else if(er._length||v+b<0)return;u=g+b,h=v+b;break;case l:if(x="col-resize",g+b>r._length)return;u=g+b,h=v;break;case c:if(x="col-resize",v+b<0)return;u=g,h=v+b;break;default:x="ew-resize",u=m,h=m+b}if(h{"use strict";var n=r(24279),i=r(98224),o=r(6140),a=r(81653).LINE_SPACING,s=o.name;function l(e){var t=e&&e[s];return t&&t.visible}t.isVisible=l,t.makeData=function(e){var t=n.list({_fullLayout:e},"x",!0),r=e.margin,i=[];if(!e._has("gl2d"))for(var o=0;o{"use strict";var n=r(53787),i=r(9482),o=r(6022),a=r(91490);e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(9482),handleDefaults:r(17485),calcAutorange:r(81028),draw:r(25390),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},6022:e=>{"use strict";e.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},88680:(e,t,r)=>{"use strict";var n=r(63858),i=r(37471).line,o=r(93701).P,a=r(10191).extendFlat,s=r(18693).overrideAll,l=r(99862).templatedArray,c=r(71896);e.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},79901:e=>{"use strict";e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},53879:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(88680),s=r(21471);function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete t.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var u=["x","y"],d=0;d<2;d++){var f,h,p,m=u[d],g={_fullLayout:r},v=i.coerceRef(e,t,g,m);if((f=i.getFromId(g,v))._selectionIndices.push(t._index),p=s.rangeToShapePosition(f),h=s.shapePositionToRange(f),c){var y=m+"0",x=m+"1",b=e[y],w=e[x];e[y]=h(e[y],!0),e[x]=h(e[x],!0),i.coercePosition(t,g,o,v,y),i.coercePosition(t,g,o,v,x);var _=t[y],k=t[x];void 0!==_&&void 0!==k&&(t[y]=p(_),t[x]=p(k),e[y]=b,e[x]=w)}}c&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}e.exports=function(e,t){o(e,t,{name:"selections",handleItemDefaults:l});for(var r=t.selections,n=0;n{"use strict";var n=r(16541).readPaths,i=r(79971),o=r(94512).clearOutlineControllers,a=r(66235),s=r(50973),l=r(99862).arrayEditor,c=r(21471),u=c.getPathString;function d(e){var t=e._fullLayout;for(var r in o(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;S--){var T=r.append("path").attr(g).style("opacity",S?.1:v).call(a.stroke,x).call(a.fill,y).call(s.dashLine,S?"solid":w,S?4+b:b);if(p(T,e,o),_){var M=l(e.layout,"selections",o);T.style({cursor:"move"});var C={element:T.node(),plotinfo:h,gd:e,editHelpers:M,isActiveSelection:!0},A=n(c,e);i(A,T,C)}else T.style("pointer-events",S?"all":"none");k[S]=T}var E=k[0];k[1].node().addEventListener("click",(function(){return function(e,t){if(!f(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex)return void m(e);e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=m,d(e)}}(e,E)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;s.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function m(e){f(e)&&(e._fullLayout._activeSelectionIndex>=0&&(o(e),delete e._fullLayout._activeSelectionIndex,d(e)))}e.exports={draw:d,drawOne:h,activateLastSelection:function(e){if(!f(e))return;var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=m,d(e)}}},32438:(e,t,r)=>{"use strict";var n=r(93701).P,i=r(10191).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},81372:e=>{"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},58171:(e,t,r)=>{"use strict";var n=r(57873).selectMode,i=r(94512).clearOutline,o=r(16541),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var o=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,h=d.yaxis,p=t.isActiveSelection,m=t.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(53787).strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}e.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return i(e,r[t])}},getTransform:function(e){return n(e.xaxis._offset,e.yaxis._offset)}}},26002:(e,t,r)=>{"use strict";var n=r(8045),i=r(72953);e.exports={moduleType:"component",name:"selections",layoutAttributes:r(88680),supplyLayoutDefaults:r(53879),supplyDrawNewSelectionDefaults:r(81372),includeBasePlot:r(49861)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},72953:(e,t,r)=>{"use strict";var n=r(82070),i=r(84672),o=r(44049),a=r(50973).dashStyle,s=r(66235),l=r(76719),c=r(87267).makeEventData,u=r(57873),d=u.freeMode,f=u.rectMode,h=u.drawMode,p=u.openMode,m=u.selectMode,g=r(21471),v=r(59781),y=r(79971),x=r(94512).clearOutline,b=r(16541),w=b.handleEllipse,_=b.readPaths,k=r(47513).newShapes,S=r(58171),T=r(8045).activateLastSelection,M=r(53787),C=M.sorterAsc,A=r(71962),E=r(57429),I=r(24279).getFromId,O=r(24513),P=r(93415).redrawReglTraces,R=r(79901),L=R.MINSELECT,j=A.filter,D=A.tester,z=r(10977),N=z.p2r,F=z.axValue,B=z.getTransform;function Z(e){return void 0!==e.subplot}function U(e,t,r,n,i,o,a){var s,l,c,u,d,f,h,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){G(e,t,o);var w=function(e,t){var r,n,i=e[0],o=-1,a=[];for(n=0;n0?function(e,t){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(s)&&(f=$(w))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=h(r),l=m(r);if(s||l){var c,u,d=a.selectAll(".select-outline-"+n.id);if(d&&i._fullLayout._outlining)s&&(c=k(d,e)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!Z(e)&&(u=S(d,e)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:u}).then((function(){t&&T(i)}))),i._fullLayout._outlining=!1}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Y(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,o,a,s=[],l=t.map(Y),c=r.map(Y);for(a=0;a0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function J(e,t,r){var n,i;for(n=0;n-1&&t;if(!o&&t){var te=ae(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([I(e,ne,"x"),I(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,Q),f._reselect=!1}if(!o&&f._deselect){var me=f._deselect;(function(e,t,r){for(var n=0;n=0)S._fullLayout._deactivateShape(S);else if(!x){var r=T.clickmode;E.done(Me).then((function(){if(E.clear(Me),2===e){for(be.remove(),$=0;$-1&&U(t,S,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&de(S,void 0);l.click(S,t,O.id)})).catch(M.error)}},n.doneFn=function(){Se.remove(),E.done(Me).then((function(){E.clear(Me),!C&&K&&n.selectionDefs&&(K.subtract=xe,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(C||x)&&q(n,C),n.doneFnCompleted&&n.doneFnCompleted(Ce),b&&de(S,oe)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:q,selectOnClick:U}},13216:(e,t,r)=>{"use strict";var n=r(63858),i=r(92948),o=r(37471).line,a=r(93701).P,s=r(10191).extendFlat,l=r(99862).templatedArray,c=r(71896),u=r(27231),d=r(32191).R,f=r(3830);e.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},u.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:d({},{keys:Object.keys(f)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},28859:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(59781),a=r(21471);function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,i,s,l){var c=e/2,u=l;if("pixel"===t){var d=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],f=n.aggNums(Math.max,null,d),h=n.aggNums(Math.min,null,d),p=h<0?Math.abs(h)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(e,t,r,n,i){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(r)];if(n){var l,c,u,d,f=1/0,h=-1/0,p=n.match(o.segmentRE);for("date"===e.type&&(s=a.decodeDate(s)),l=0;lh&&(h=d)));return h>=f?[f,h]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var a=0;a{"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}}},49410:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(13216),s=r(21471);function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}if(t._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),u="path"!==c;u&&delete t.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var d=o("xsizemode"),f=o("ysizemode"),h=["x","y"],p=0;p<2;p++){var m,g,v,y=h[p],x=y+"anchor",b="x"===y?d:f,w={_fullLayout:r},_=i.coerceRef(e,t,w,y,void 0,"paper");if("range"===i.getRefType(_)?((m=i.getFromId(w,_))._shapeIndices.push(t._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m)):g=v=n.identity,u){var k=y+"0",S=y+"1",T=e[k],M=e[S];e[k]=g(e[k],!0),e[S]=g(e[S],!0),"pixel"===b?(o(k,0),o(S,10)):(i.coercePosition(t,w,o,_,k,.25),i.coercePosition(t,w,o,_,S,.75)),t[k]=v(t[k]),t[S]=v(t[S]),e[k]=T,e[S]=M}if("pixel"===b){var C=e[x];e[x]=g(e[x],!0),i.coercePosition(t,w,o,_,x,.25),t[x]=v(t[x]),e[x]=C}}u&&n.noneOrAll(e,t,["x0","x1","y0","y1"]);var A,E,I="line"===c;if(u&&(A=o("label.texttemplate")),A||(E=o("label.text")),E||A){o("label.textangle");var O=o("label.textposition",I?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(I,O)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}e.exports=function(e,t){o(e,t,{name:"shapes",handleItemDefaults:l})}},47845:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(98224),a=r(50973),s=r(16541).readPaths,l=r(21471),c=l.getPathString,u=r(3830),d=r(81653).FROM_TL;e.exports=function(e,t,r,f){if(f.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var h;if(r.label.texttemplate){var p={};if("path"!==r.type){var m=i.getFromId(e,r.xref),g=i.getFromId(e,r.yref);for(var v in u){var y=u[v](r,m,g);void 0!==y&&(p[v]=y)}}h=n.texttemplateStringForShapes(r.label.texttemplate,{},e._fullLayout._d3locale,p)}else h=r.label.text;var x,b,w,_,k={"data-index":t},S=r.label.font,T=f.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(h);if(r.path){var M=c(e,r),C=s(M,e);x=1/0,w=1/0,b=-1/0,_=-1/0;for(var A=0;A=e?t-n:n-t;return-180/Math.PI*Math.atan2(i,o)}(x,w,b,_):0),T.call((function(t){return t.call(a.font,S).attr({}),o.convertToTspans(t,e),t}));var Z=function(e,t,r,n,i,o,a){var s,l,c,u,f=i.label.textposition,h=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),y=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===m){"start"===f?(s=e,l=t):"end"===f?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r{"use strict";var n=r(53787).strTranslate,i=r(63e3),o=r(57873),a=o.drawMode,s=o.selectMode,l=r(44049),c=r(66235),u=r(72694),d=u.i000,f=u.i090,h=u.i180,p=u.i270,m=r(94512).clearOutlineControllers,g=r(16541),v=g.pointsOnRectangle,y=g.pointsOnEllipse,x=g.writePaths,b=r(47513).newShapes,w=r(47513).createShapeObj,_=r(58171),k=r(47845);function S(e,t){var r,n,i,o=e[t][1],a=e[t][2],s=e.length;return n=e[r=(t+1)%s][1],i=e[r][2],n===o&&i===a&&(n=e[r=(t+2)%s][1],i=e[r][2]),[r,n,i]}e.exports=function e(t,r,o,u){u||(u=0);var g=o.gd;function T(){e(t,r,o,u++),(y(t[0])||o.hasText)&&M({redrawing:!0})}function M(e){var t={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,t=b(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,t=_(r,o),g._fullLayout._reselect=!0),Object.keys(t).length&&l.call((e||{}).redrawing?"relayout":"_guiRelayout",g,t)}var C,A,E,I,O,P=g._fullLayout._zoomlayer,R=o.dragmode,L=a(R),j=s(R);((L||j)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",x(t)),u||!o.isActiveShape&&!o.isActiveSelection)||(O=function(e,t){for(var r=0;r1&&(2!==e.length||"Z"!==e[1][0])&&(0===I&&(e[0][0]="M"),t[E]=e,T(),M())}}()}}function U(e,r){!function(e,r){if(t.length)for(var n=0;n{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(28605),s=r(16541).readPaths,l=r(79971),c=r(47845),u=r(94512).clearOutlineControllers,d=r(66235),f=r(50973),h=r(99862).arrayEditor,p=r(63e3),m=r(19602),g=r(59781),v=r(21471),y=v.getPathString;function x(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove(),t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iD&&o>z&&!r.shiftKey?p.getCursor(a/i,1-s/o):"move";m(t,l),j=l.split("-")[0]}}function ne(n){b(e)||(N&&(_=Y(r.xanchor)),F&&(T=X(r.yanchor)),"path"===r.type?L=r.path:(d=N?r.x0:Y(r.x0),h=F?r.y0:X(r.y0),x=N?r.x1:Y(r.x1),w=F?r.y1:X(r.y1)),dw?(M=h,I="y0",C=w,O="y1"):(M=w,I="y1",C=h,O="y0"),re(n),le(l,r),ue(t,r,e),Q.moveFn="move"===j?ae:se,Q.altKey=n.altKey)}function ie(){b(e)||(m(t),ce(l),k(t,e,r),i.call("_guiRelayout",e,u.getUpdateObj()))}function oe(){b(e)||ce(l)}function ae(n,i){if("path"===r.type){var o=function(e){return e},a=o,u=o;N?U("xanchor",r.xanchor=K(_+n)):(a=function(e){return K(Y(e)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),F?U("yanchor",r.yanchor=$(T+i)):(u=function(e){return $(X(e)+i)},G&&"date"===G.type&&(u=v.encodeDate(u))),U("path",r.path=S(L,a,u))}else N?U("xanchor",r.xanchor=K(_+n)):(U("x0",r.x0=K(d+n)),U("x1",r.x1=K(x+n))),F?U("yanchor",r.yanchor=$(T+i)):(U("y0",r.y0=$(h+i)),U("y1",r.y1=$(w+i)));t.attr("d",y(e,r)),le(l,r),c(e,s,r,V)}function se(n,i){if(Z){var o=function(e){return e},a=o,u=o;N?U("xanchor",r.xanchor=K(_+n)):(a=function(e){return K(Y(e)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),F?U("yanchor",r.yanchor=$(T+i)):(u=function(e){return $(X(e)+i)},G&&"date"===G.type&&(u=v.encodeDate(u))),U("path",r.path=S(L,a,u))}else if(B){if("resize-over-start-point"===j){var f=d+n,p=F?h-i:h+i;U("x0",r.x0=N?f:K(f)),U("y0",r.y0=F?p:$(p))}else if("resize-over-end-point"===j){var m=x+n,g=F?w-i:w+i;U("x1",r.x1=N?m:K(m)),U("y1",r.y1=F?g:$(g))}}else{var b=function(e){return-1!==j.indexOf(e)},k=b("n"),W=b("s"),q=b("w"),J=b("e"),Q=k?M+i:M,ee=W?C+i:C,te=q?A+n:A,re=J?E+n:E;F&&(k&&(Q=M-i),W&&(ee=C-i)),(!F&&ee-Q>z||F&&Q-ee>z)&&(U(I,r[I]=F?Q:$(Q)),U(O,r[O]=F?ee:$(ee))),re-te>D&&(U(P,r[P]=N?te:K(te)),U(R,r[R]=N?re:K(re)))}t.attr("d",y(e,r)),le(l,r),c(e,s,r,V)}function le(e,t){function r(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]),i=1;n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":i}).classed("visual-cue",!0);var a=Y(N?t.xanchor:o.midRange(r?[t.x0,t.x1]:v.extractPathCoords(t.path,g.paramIsX))),s=X(F?t.yanchor:o.midRange(r?[t.y0,t.y1]:v.extractPathCoords(t.path,g.paramIsY)));if(a=v.roundPositionForSharpStrokeRendering(a,i),s=v.roundPositionForSharpStrokeRendering(s,i),N&&F){var l="M"+(a-1-i)+","+(s-1-i)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var c="M"+(a-1-i)+","+(s-9-i)+"v18 h2 v-18 Z";n.attr("d",c)}else{var u="M"+(a-9-i)+","+(s-1-i)+"h18 v2 h-18 Z";n.attr("d",u)}}(N||F)&&r()}function ce(e){e.selectAll(".visual-cue").remove()}function ue(e,t,r){var n=t.xref,i=t.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),f.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}p.init(Q),J.node().onmousemove=re}(e,z,u,t,r,j):!0===u.editable&&z.style("pointer-events",R||d.opacity(E)*A<=.5?"stroke":"all");z.node().addEventListener("click",(function(){return function(e,t){if(!w(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex)return void T(e);e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=T,x(e)}}(e,z)}))}}function k(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");f.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function S(e,t,r){return e.replace(g.segmentRE,(function(e){var n=0,i=e.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+e.substr(1).replace(g.paramRE,(function(e){return n>=s||(o[n]?e=t(e):a[n]&&(e=r(e)),n++),e}))}))}function T(e){w(e)&&(e._fullLayout._activeShapeIndex>=0&&(u(e),delete e._fullLayout._activeShapeIndex,x(e)))}e.exports={draw:x,drawOne:_,eraseActiveShape:function(e){if(!w(e))return;u(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var n=r(18693).overrideAll,i=r(27231),o=r(92948),a=r(93701).P,s=r(10191).extendFlat,l=r(32191).R,c=r(3830);e.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},72694:e=>{"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)}},66503:(e,t,r)=>{"use strict";var n=r(66235),i=r(53787);e.exports=function(e,t,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===e.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},16541:(e,t,r)=>{"use strict";var n=r(76170),i=r(72694),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(10977),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],d=[0,3,4,1,2];function f(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}t.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(57873),i=n.drawMode,o=n.openMode,a=r(72694),s=a.i000,l=a.i090,c=a.i180,u=a.i270,d=a.cos45,f=a.sin45,h=r(10977),p=h.p2r,m=h.r2p,g=r(94512).clearOutline,v=r(16541),y=v.readPaths,x=v.writePaths,b=v.ellipseOver,w=v.fixDatesForPaths;function _(e,t,r){var n,i=e[0][0],a=t.gd,h=i.getAttribute("d"),g=a._fullLayout.newshape,v=t.plotinfo,_=t.isActiveShape,k=v.xaxis,S=v.yaxis,T=!!v.domain||!v.xaxis,M=!!v.domain||!v.yaxis,C=o(r),A=y(h,a,v,_),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:T?"paper":k._id,yref:M?"paper":S._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(C||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===A.length&&(n=A[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var I=n[s][1],O=n[l][1],P=n[c][1],R=n[u][1],L=n[s][2],j=n[l][2],D=n[c][2],z=n[u][2],N=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),F=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);N&&(I=m(v.xaxis,I),O=m(v.xaxis,O),P=m(v.xaxis,P),R=m(v.xaxis,R)),F&&(L=m(v.yaxis,L),j=m(v.yaxis,j),D=m(v.yaxis,D),z=m(v.yaxis,z));var B=(O+R)/2,Z=(L+D)/2,U=b({x0:B,y0:Z,x1:B+(R-O+P-I)/2*d,y1:Z+(z-j+D-L)/2*f});N&&(U.x0=p(v.xaxis,U.x0),U.x1=p(v.xaxis,U.x1)),F&&(U.y0=p(v.yaxis,U.y0),U.y1=p(v.yaxis,U.y1)),E.x0=U.x0,E.y0=U.y0,E.x1=U.x1,E.y1=U.y1}else E.type="path",k&&S&&w(A,k,S),E.path=x(A),n=null;return E}e.exports={newShapes:function(e,t){if(e.length&&e[0][0]){var r=t.gd,n=t.isActiveShape,o=t.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";e.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}},21471:(e,t,r)=>{"use strict";var n=r(59781),i=r(53787),o=r(28605);t.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},t.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},t.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},t.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},t.extractPathCoords=function(e,t,r){var o=[];return e.match(n.segmentRE).forEach((function(e){var a=t[e.charAt(0)].drawn;if(void 0!==a){var s=e.substr(1).match(n.paramRE);if(s&&!(s.lengthh&&(e="X"),e}));return o>h&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),u+p}))}(r,s,c);if("pixel"===r.xsizemode){var b=s(r.xanchor);u=b+r.x0,d=b+r.x1}else u=s(r.x0),d=s(r.x1);if("pixel"===r.ysizemode){var w=c(r.yanchor);f=w-r.y0,h=w-r.y1}else f=c(r.y0),h=c(r.y1);if("line"===p)return"M"+u+","+f+"L"+d+","+h;if("rect"===p)return"M"+u+","+f+"H"+d+"V"+h+"H"+u+"Z";var _=(u+d)/2,k=(f+h)/2,S=Math.abs(_-u),T=Math.abs(k-f),M="A"+S+","+T,C=_+S+","+k;return"M"+C+M+" 0 1,1 "+(_+","+(k-T))+M+" 0 0,1 "+C+"Z"}},30407:(e,t,r)=>{"use strict";var n=r(75629);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(13216),supplyLayoutDefaults:r(49410),supplyDrawNewShapeDefaults:r(66503),includeBasePlot:r(49861)("shapes"),calcAutorange:r(28859),draw:n.draw,drawOne:n.drawOne}},3830:e=>{"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function i(e,r,n){return t(e.y1,n)-t(e.y0,n)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:i(e,0,r)/n(e,t)},dx:n,dy:i,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(i(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(i(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,i){return r((t(e.y1,i)+t(e.y0,i))/2,i)}}},68241:(e,t,r)=>{"use strict";var n=r(92948),i=r(84958),o=r(10191).extendDeepAll,a=r(18693).overrideAll,s=r(83672),l=r(99862).templatedArray,c=r(91127),u=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});e.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},91127:e=>{"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}},21898:(e,t,r)=>{"use strict";var n=r(53787),i=r(80254),o=r(68241),a=r(91127).name,s=o.steps;function l(e,t,r){function a(r,i){return n.coerce(e,t,o,r,i)}for(var s=i(e,t,{name:"steps",handleItemDefaults:c}),l=0,u=0;u{"use strict";var n=r(8996),i=r(44115),o=r(66235),a=r(50973),s=r(53787),l=s.strTranslate,c=r(98224),u=r(99862).arrayEditor,d=r(91127),f=r(81653),h=f.LINE_SPACING,p=f.FROM_TL,m=f.FROM_BR;function g(e){return d.autoMarginIdRoot+e._index}function v(e){return e._index}function y(e,t){var r=a.tester.selectAll("g."+d.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(d.labelGroupClass,!0);var o=0,l=0;r.each((function(e){var r=w(n.select(this),{step:e},t).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var u=t._dims={};u.inputAreaWidth=Math.max(d.railWidth,d.gripHeight);var f=e._fullLayout._size;u.lx=f.l+f.w*t.x,u.ly=f.t+f.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(f.w*t.len):u.outerLength=t.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-t.pad.l-t.pad.r);var h=(u.inputAreaLength-2*d.stepInset)/(t._stepCount-1),v=o+d.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/h)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var y=a.tester.append("g");r.each((function(e){var r=x(y,t,e.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+t.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+d.tickOffset+t.ticklen+d.labelOffset+u.labelHeight+t.pad.t+t.pad.b;var b="left";s.isRightAnchor(t)&&(u.lx-=u.outerLength,b="right"),s.isCenterAnchor(t)&&(u.lx-=u.outerLength/2,b="center");var _="top";s.isBottomAnchor(t)&&(u.ly-=u.height,_="bottom"),s.isMiddleAnchor(t)&&(u.ly-=u.height/2,_="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:t.y,b:u.height*m[_],t:u.height*p[_]};"fraction"===t.lenmode?(k.l=0,k.xl=t.x-t.len*p[b],k.r=0,k.xr=t.x+t.len*m[b]):(k.x=t.x,k.l=u.outerLength*p[b],k.r=u.outerLength*m[b]),i.autoMargin(e,g(t),k)}function x(e,t,r){if(t.currentvalue.visible){var n,i,o=t._dims;switch(t.currentvalue.xanchor){case"right":n=o.inputAreaLength-d.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=d.currentValueInset,i="left"}var l=s.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":i,"data-notex":1})})),u=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"===typeof r)u+=r;else{var f=t.steps[t.active].label,p=t._gd._fullLayout._meta;p&&(f=s.templateString(f,p)),u+=f}t.currentvalue.suffix&&(u+=t.currentvalue.suffix),l.call(a.font,t.currentvalue.font).text(u).call(c.convertToTspans,t._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*t.currentvalue.font.size*h;return c.positionText(l,n,g),l}}function b(e,t,r){s.ensureSingle(e,"rect",d.gripRectClass,(function(n){n.call(T,t,e,r).style("pointer-events","all")})).attr({width:d.gripWidth,height:d.gripHeight,rx:d.gripRadius,ry:d.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function w(e,t,r){var n=s.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":"middle","data-notex":1})})),i=t.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function _(e,t){var r=s.ensureSingle(e,"g",d.labelsClass),i=t._dims,o=r.selectAll("g."+d.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(d.labelGroupClass,!0),o.exit().remove(),o.each((function(e){var r=n.select(this);r.call(w,e,t),a.setTranslate(r,A(t,e.fraction),d.tickOffset+t.ticklen+t.font.size*h+d.labelOffset+i.currentValueTotalHeight)}))}function k(e,t,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&S(e,t,r,a,!0,i)}function S(e,t,r,n,o,a){var s=r.active;r.active=n,u(e.layout,d.name,r).applyUpdate("active",n);var l=r.steps[r.active];t.call(C,r,a),t.call(x,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(t._nextMethod?(t._nextMethod.step=l,t._nextMethod.doCallback=o,t._nextMethod.doTransition=a):(t._nextMethod={step:l,doCallback:o,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame((function(){var r=t._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function T(e,t,r){if(!t._context.staticPlot){var i=r.node(),a=n.select(t);e.on("mousedown",l),e.on("touchstart",l)}function s(){return r.data()[0]}function l(){var e=s();t.emit("plotly_sliderstart",{slider:e});var l=r.select("."+d.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,e.activebgcolor);var c=E(e,n.mouse(i)[0]);function u(){var e=s(),o=E(e,n.mouse(i)[0]);k(t,r,e,o,!1)}function f(){var e=s();e._dragging=!1,l.call(o.fill,e.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}k(t,r,e,c,!0),e._dragging=!0,a.on("mousemove",u),a.on("touchmove",u),a.on("mouseup",f),a.on("touchend",f)}}function M(e,t){var r=e.selectAll("rect."+d.tickRectClass).data(t._visibleSteps),i=t._dims;r.enter().append("rect").classed(d.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(e,r){var s=r%i.labelStride===0,l=n.select(this);l.attr({height:s?t.ticklen:t.minorticklen}).call(o.fill,t.tickcolor),a.setTranslate(l,A(t,r/(t._stepCount-1))-.5*t.tickwidth,(s?d.tickOffset:d.minorTickOffset)+i.currentValueTotalHeight)}))}function C(e,t,r){for(var n=e.select("rect."+d.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(a-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function A(e,t){var r=e._dims;return r.inputAreaStart+d.stepInset+(r.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*d.stepInset-2*r.inputAreaStart)))}function I(e,t,r){var n=r._dims,i=s.ensureSingle(e,"rect",d.railTouchRectClass,(function(n){n.call(T,t,e,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,d.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*d.railInset,i=s.ensureSingle(e,"rect",d.railRectClass);i.attr({width:n,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,t.bordercolor).call(o.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(i,d.railInset,.5*(r.inputAreaWidth-d.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,o=function(e,t){for(var r=e[d.name],n=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,g(t))}if(s.enter().append("g").classed(d.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+d.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+d.groupClassName).data(o,v);c.enter().append("g").classed(d.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u{"use strict";var n=r(91127);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(68241),supplyLayoutDefaults:r(21898),draw:r(66982)}},34906:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(44115),a=r(44049),s=r(53787),l=s.strTranslate,c=r(50973),u=r(66235),d=r(98224),f=r(26880),h=r(81653).OPPOSITE_SIDE,p=/ [XY][0-9]* /;e.exports={draw:function(e,t,r){var m,g=r.propContainer,v=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},w=r.attributes,_=r.transform,k=r.containerGroup,S=e._fullLayout,T=1,M=!1,C=g.title,A=(C&&C.text?C.text:"").trim(),E=C&&C.font?C.font:{},I=E.family,O=E.size,P=E.color;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var R=e._context.edits[m];""===A?T=0:A.replace(p," % ")===y.replace(p," % ")&&(T=.2,M=!0,R||(A="")),r._meta?A=s.templateString(A,r._meta):S._meta&&(A=s.templateString(A,S._meta));var L,j=A||R;k||(k=s.ensureSingle(S._infolayer,"g","g-"+t),L=S._hColorbarMoveTitle);var D=k.selectAll("text").data(j?[0]:[]);if(D.enter().append("text"),D.text(A).attr("class",t),D.exit().remove(),!j)return k;function z(e){s.syncOrAsync([N,F],e)}function N(t){var r;return!_&&L&&(_={}),_?(r="",_.rotate&&(r+="rotate("+[_.rotate,w.x,w.y]+")"),(_.offset||L)&&(r+=l(0,(_.offset||0)-(L||0)))):r=null,t.attr("transform",r),t.style({"font-family":I,"font-size":n.round(O,2)+"px",fill:u.rgb(P),opacity:T*u.opacity(P),"font-weight":o.fontWeight}).attr(w).call(d.convertToTspans,e),o.previousPromises(e)}function F(t){var r=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&A){r.attr("transform",null);var o=h[b.side],a="left"===b.side||"top"===b.side?-1:1,u=i(b.pad)?b.pad:2,d=c.bBox(r.node()),f={t:0,b:0,l:0,r:0},p=e._fullLayout._reservedMargin;for(var m in p)for(var v in p[m]){var y=p[m][v];f[v]=Math.max(f[v],y)}var x={left:f.l,top:f.t,right:S.width-f.r,bottom:S.height-f.b},w=b.maxShift||a*(x[b.side]-d[b.side]),_=0;if(w<0)_=w;else{var k=b.offsetLeft||0,T=b.offsetTop||0;d.left-=k,d.right-=k,d.top-=T,d.bottom-=T,b.selection.each((function(){var e=c.bBox(this);s.bBoxIntersect(d,e,u)&&(_=Math.max(_,a*(e[b.side]-d[o])+u))})),_=Math.min(w,_),g._titleScoot=Math.abs(_)}if(_>0||w<0){var M={left:[-_,0],right:[_,0],top:[0,-_],bottom:[0,_]}[b.side];r.attr("transform",l(M[0],M[1]))}}}return D.call(z),R&&(A?D.on(".opacity",null):(T=0,M=!0,D.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),D.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?a.call("_guiRestyle",e,v,t,x):a.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(z)})).on("input",(function(e){this.text(e||" ").call(d.positionText,w.x,w.y)}))),D.classed("js-placeholder",M),k}}},33508:(e,t,r)=>{"use strict";var n=r(92948),i=r(18022),o=r(10191).extendFlat,a=r(18693).overrideAll,s=r(84958),l=r(99862).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});e.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},49770:e=>{"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},61103:(e,t,r)=>{"use strict";var n=r(53787),i=r(80254),o=r(33508),a=r(49770).name,s=o.buttons;function l(e,t,r){function a(r,i){return n.coerce(e,t,o,r,i)}a("visible",i(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(e,t){function r(r,i){return n.coerce(e,t,s,r,i)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:l})}},86868:(e,t,r)=>{"use strict";var n=r(8996),i=r(44115),o=r(66235),a=r(50973),s=r(53787),l=r(98224),c=r(99862).arrayEditor,u=r(81653).LINE_SPACING,d=r(49770),f=r(12271);function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,i,o,a,s){t.active=a,c(e.layout,d.name,t).applyUpdate("active",a),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(i.attr(d.menuIndexAttrName,"-1"),g(e,n,i,o,t),s||v(e,n,i,o,t))}function g(e,t,r,n,i){var o=s.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||d.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};o.call(y,i,u,e).call(M,i,f,h),s.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(a.font,i.font).text(d.arrowSymbol[i.direction])})).attr({x:l.headerWidth-d.arrowOffsetX+i.pad.l,y:l.headerHeight/2+d.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(C,String(p(r,i)?-1:i._index)),v(e,t,r,n,i)})),o.on("mouseover",(function(){o.call(_)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(t,l.lx,l.ly)}function v(e,t,r,o,a){r||(r=t).attr("pointer-events","all");var l=function(e){return-1===+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===a.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,v=a._dims,x=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(x?g=v.headerHeight+d.gapButtonHeader:p=v.headerWidth+d.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+p+a.pad.l,y:v.ly+g+a.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},S={l:b.x+a.borderwidth,t:b.y+a.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,a,s,e).call(M,a,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(e,a,0,t,r,o,-1),i.executeAPICommand(e,s.method,s.args2)):(m(e,a,0,t,r,o,l),i.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(_)})),c.on("mouseout",(function(){c.call(k,a),u.call(w,a)}))})),u.call(w,a),x?(S.w=Math.max(v.openWidth,v.headerWidth),S.h=b.y-S.t):(S.w=b.x-S.l,S.h=Math.max(v.openHeight,v.headerHeight)),S.direction=a.direction,o&&(u.size()?function(e,t,r,n,i,o){var a,s,l,c=i.direction,u="up"===c||"down"===c,f=i._dims,h=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+d.headerGroupClassName).data(r,h);l.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u{"use strict";var n=r(49770);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(33508),supplyLayoutDefaults:r(61103),draw:r(86868)}},12271:(e,t,r)=>{"use strict";e.exports=s;var n=r(8996),i=r(66235),o=r(50973),a=r(53787);function s(e,t,r){this.gd=e,this.container=t,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(e,t,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=e;var u,d,f,h,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x="down"===y,b="left"===y,w="up"===y,_=m,k=v;x||b||"right"===y||w||(this.position.direction="down",x=!0),x||w?(d=(u=p)+_,x?(f=g,k=(h=Math.min(f+k,c))-f):k=(h=g+k)-(f=Math.max(h-k,0))):(h=(f=g)+k,b?_=(d=p+_)-(u=Math.max(d-_,0)):(u=p,_=(d=Math.min(u+_,l))-u)),this._box={l:u,t:f,w:_,h:k};var S=m>_,T=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,C=p,A=g+v;A+M>c&&(A=c-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(S?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),S?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:C,y:A,width:T,height:M}),this._hbarXMin=C+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var I=v>k,O=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,R=p+m,L=g;R+O>l&&(R=l-O);var j=this.container.selectAll("rect.scrollbar-vertical").data(I?[0]:[]);j.exit().on(".drag",null).remove(),j.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),I?(this.vbar=j.attr({rx:s.barRadius,ry:s.barRadius,x:R,y:L,width:O,height:P}),this._vbarYMin=L+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,z=u-.5,N=I?d+O+.5:d+.5,F=f-.5,B=S?h+M+.5:h+.5,Z=a._topdefs.selectAll("#"+D).data(S||I?[0]:[]);if(Z.exit().remove(),Z.enter().append("clipPath").attr("id",D).append("rect"),S||I?(this._clipRect=Z.select("rect").attr({x:Math.floor(z),y:Math.floor(F),width:Math.ceil(N)-Math.floor(z),height:Math.ceil(B)-Math.floor(F)}),this.container.call(o.setClipUrl,D,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),S||I){var U=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(U);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));S&&this.hbar.on(".drag",null).call(V),I&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,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(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,i=r+this._hbarTranslateMax;e=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(o.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=e/r;this.hbar.call(o.setTranslate,e+i*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(o.setTranslate,e,t+s*this._vbarTranslateMax)}}},81653:e=>{"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"}}},71896:e=>{"use strict";e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"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",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},59933:e=>{"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},41287:e=>{"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"}},81494:e=>{"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},72301:e=>{"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]}},79291:e=>{"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},26880:e=>{"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},24956:e=>{"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:"\u2212"}},70059:(e,t)=>{"use strict";t.CSS_DECLARATIONS=[["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"]],t.STYLE=t.CSS_DECLARATIONS.map((function(e){return e.join(": ")+"; "})).join("")},83580:(e,t)=>{"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},332:(e,t,r)=>{"use strict";t.version=r(75703).version,r(4142),r(95064);for(var n=r(44049),i=t.register=n.register,o=r(41744),a=Object.keys(o),s=0;s{"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:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},68382:(e,t)=>{"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},66523:(e,t,r)=>{"use strict";var n=r(16791),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function c(e,t){return o(t-e,s)}function u(e,t){if(l(t))return!0;var r,n;t[0](n=i(n,s))&&(n+=s);var o=i(e,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function d(e,t,r,n,i,o,c){i=i||0,o=o||0;var u,d,f,h,p,m=l([r,n]);function g(e,t){return[e*Math.cos(t)+i,o-e*Math.sin(t)]}m?(u=0,d=a,f=s):r=i&&e<=o);var i,o},pathArc:function(e,t,r,n,i){return d(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return d(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,o){return d(e,t,r,n,i,o,1)}}},50146:(e,t)=>{"use strict";var r=Array.isArray,n=ArrayBuffer,i=DataView;function o(e){return n.isView(e)&&!(e instanceof i)}function a(e){return r(e)||o(e)}function s(e,t,r){if(a(e)){if(a(e[0])){for(var n=r,i=0;i{"use strict";var n=r(51908),i=r(24956).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;e.exports=function(e){return"string"===typeof e&&(e=e.replace(o,"")),n(e)?Number(e):i}},24513:e=>{"use strict";e.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},98067:e=>{"use strict";e.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},56264:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(27231),a=r(88401),s=r(66235),l=r(26880).DESELECTDIM,c=r(22506),u=r(64563).counter,d=r(16791).modHalf,f=r(50146).isArrayOrTypedArray;function h(e,r){var n=t.valObjectMeta[r.valType];if(r.arrayOk&&f(e))return!0;if(n.validateFunction)return n.validateFunction(e,r);var i={},o=i,a={set:function(e){o=e}};return n.coerceFunction(e,a,i,r),o!==i}t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){f(e)?t.set(e):void 0!==r&&t.set(r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni.max?t.set(r):t.set(+e)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(e,t,r,i){e%1||!n(e)||void 0!==i.min&&ei.max?t.set(r):t.set(+e)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(e,t,r,n){if("string"!==typeof e){var i="number"===typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){i(e).isValid()?t.set(e):t.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(a.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){t.set(a.get(e,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(e,t,r,n){var i=n.regex||u(r);"string"===typeof e&&i.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"===typeof e&&!!u(r).test(e)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"===typeof e){for(var i=e.split("+"),o=0;o{"use strict";var n,i,o=r(97390).i$,a=r(51908),s=r(95169),l=r(16791).mod,c=r(24956),u=c.BADNUM,d=c.ONEDAY,f=c.ONEHOUR,h=c.ONEMIN,p=c.ONESEC,m=c.EPOCHJD,g=r(44049),v=r(97390).g0,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 w(e){return e&&g.componentsRegistry.calendars&&"string"===typeof e&&"gregorian"!==e}function _(e,t){return String(e+Math.pow(10,t)).substr(1)}t.dateTick0=function(e,r){var n=function(e,t){return w(e)?t?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:g.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!r);if(r<2)return n;var i=t.dateTime2ms(n,e);return i+=d*(r-1),t.ms2DateTime(i,0,e)},t.dfltRange=function(e){return w(e)?g.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},t.isJSDate=function(e){return"object"===typeof e&&null!==e&&"function"===typeof e.getTime},t.dateTime2ms=function(e,r){if(t.isJSDate(e)){var o=e.getTimezoneOffset()*h,a=(e.getUTCMinutes()-e.getMinutes())*h+(e.getUTCSeconds()-e.getSeconds())*p+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var s=3*h;o=o-s/2+l(a-o+s/2,s)}return(e=Number(e)-o)>=n&&e<=i?e:u}if("string"!==typeof e&&"number"!==typeof e)return u;e=String(e);var c=w(r),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),r="");var _=c&&"chinese"===r.substr(0,7),k=e.match(_?x:y);if(!k)return u;var S=k[1],T=k[3]||"1",M=Number(k[5]||1),C=Number(k[7]||0),A=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===S.length)return u;var I;S=Number(S);try{var O=g.getComponentMethod("calendars","getCal")(r);if(_){var P="i"===T.charAt(T.length-1);T=parseInt(T,10),I=O.newDate(S,O.toMonthIndex(S,T,P),M)}else I=O.newDate(S,Number(T),M)}catch(L){return u}return I?(I.toJD()-m)*d+C*f+A*h+E*p:u}S=2===S.length?(Number(S)+2e3-b)%100+b:Number(S),T-=1;var R=new Date(Date.UTC(2e3,T,M,C,A));return R.setUTCFullYear(S),R.getUTCMonth()!==T||R.getUTCDate()!==M?u:R.getTime()+E*p},n=t.MIN_MS=t.dateTime2ms("-9999"),i=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==u};var k=90*d,S=3*f,T=5*h;function M(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+_(t,2)+":"+_(r,2),(n||i)&&(e+=":"+_(n,2),i))){for(var o=4;i%10===0;)o-=1,i/=10;e+="."+_(i,o)}return e}t.ms2DateTime=function(e,t,r){if("number"!==typeof e||!(e>=n&&e<=i))return u;t||(t=0);var o,a,s,c,y,x,b=Math.floor(10*l(e+.05,1)),_=Math.round(e-b/10);if(w(r)){var C=Math.floor(_/d)+m,A=Math.floor(l(e,d));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(C).formatDate("yyyy-mm-dd")}catch(E){o=v("G%Y-%m-%d")(new Date(_))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=t=n+d&&e<=i-d))return u;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return M(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===u)return r;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(w(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return s.error("unrecognized date",e),r;return e};var C=/%\d?f/g,A=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function I(e,t,r,n){e=e.replace(C,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(A,(function(){return E[r("%q")(i)]})),w(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(o){return"Invalid"}return r(e)(i)}var O=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,i,o){if(i=w(i)&&i,!t)if("y"===r)t=o.year;else if("m"===r)t=o.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,d),n=_(Math.floor(r/f),2)+":"+_(l(Math.floor(r/h),60),2);if("M"!==t){a(t)||(t=0);var i=(100+Math.min(l(e/p,60),O[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(e,r)+"\n"+I(o.dayMonthYear,e,n,i);t=o.dayMonth+"\n"+o.year}return I(t,e,n,i)};var P=3*d;t.incrementMonth=function(e,t,r){r=w(r)&&r;var n=l(e,d);if(e=Math.round(e-n),r)try{var i=Math.round(e/d)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return t%12?o.add(a,t,"m"):o.add(a,t/12,"y"),(a.toJD()-m)*d+n}catch(u){s.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},t.findExactDates=function(e,t){for(var r,n,i=0,o=0,s=0,l=0,c=w(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";var n=r(8996),i=r(95169),o=r(37812),a=r(12903);function s(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t,r){var n="plotly.js-style-"+e,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):i.warn("addStyleRule failed")}function c(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function u(e){for(var t=[];d(e);)t.push(e),e=e.parentNode;return t}function d(e){return e&&(e instanceof Element||e instanceof HTMLElement)}e.exports={getGraphDiv:function(e){var t;if("string"===typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null===e||void 0===e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(e,t){l("global",e,t)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&s(r)},getFullTransformMatrix:function(e){var t=u(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=c(e);if(t){var n=o.convertCssMatrix(t);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},24521:(e,t,r)=>{"use strict";var n=r(68041).EventEmitter,i={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){"undefined"!==typeof jQuery&&jQuery(e).trigger(n,i),t.emit(n,i),r.emit(n,i)},e},triggerHandler:function(e,t,r){var n,i;"undefined"!==typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var o=e._ev;if(!o)return n;var a,s=o._events[t];if(!s)return n;function l(e){return e.listener?(o.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(o,[r]))):e.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(47623),i=Array.isArray;function o(e,t,r,a){var s,l,c,u,d,f,h,p=e[0],m=e.length;if(2===m&&i(p)&&i(e[1])&&0===p.length){if(h=function(e,t){var r,n;for(r=0;r{"use strict";e.exports=function(e){for(var t={},r=[],n=0,i=0;i{"use strict";function t(e){return!0===e.visible}function r(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}e.exports=function(e){for(var n,i=(n=e,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:t),o=[],a=0;a{"use strict";var n=r(8996),i=r(87918),o=r(94609),a=r(20866),s=r(38441),l=r(63569),c=r(95169),u=r(47623),d=r(22506),f=r(71962),h=Object.keys(i),p={"ISO-3":l,"USA-states":l,"country names":function(e){for(var t=0;t0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var o=f.tester(r);o.pts.pop(),l.push(o)}:function(e){l.push(f.tester(e))},o.type){case"MultiPolygon":for(r=0;ri&&(i=c,t=l)}else t=r;return a.default(t).geometry.coordinates}(u),n.fIn=e,n.fOut=u,s.push(u)}else c.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 f=r.features;for(n=0;n100?(clearInterval(o),n("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var a=0;a{"use strict";var n=r(24956).BADNUM;t.calcTraceToLineCoords=function(e){for(var t=e[0].trace.connectgaps,r=[],i=[],o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},t.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},t.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var n,i,o,a=r(16791).mod;function s(e,t,r,n,i,o,a,s){var l=r-e,c=i-e,u=a-i,d=n-t,f=o-t,h=s-o,p=l*h-u*d;if(0===p)return null;var m=(c*h-u*f)/p,g=(c*d-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+d*m}}function l(e,t,r,n,i){var o=n*e+i*t;if(o<0)return n*n+i*i;if(o>r){var a=n-e,s=i-t;return a*a+s*s}var l=n*t-i*e;return l*l/r}t.segmentsIntersect=s,t.segmentDistance=function(e,t,r,n,i,o,a,c){if(s(e,t,r,n,i,o,a,c))return 0;var u=r-e,d=n-t,f=a-i,h=c-o,p=u*u+d*d,m=f*f+h*h,g=Math.min(l(u,d,p,i-e,o-t),l(u,d,p,a-e,c-t),l(f,h,m,e-i,t-o),l(f,h,m,r-i,n-o));return Math.sqrt(g)},t.getTextLocation=function(e,t,r,s){if(e===i&&s===o||(n={},i=e,o=s),n[r])return n[r];var l=e.getPointAtLength(a(r-s/2,t)),c=e.getPointAtLength(a(r+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),d=e.getPointAtLength(a(r,t)),f={x:(4*d.x+l.x+c.x)/6,y:(4*d.y+l.y+c.y)/6,theta:u};return n[r]=f,f},t.clearLocationCache=function(){i=null},t.getVisibleSegment=function(e,t,r){var n,i,o=t.left,a=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(i=r);var c=r.xa?r.x-a:0,d=r.yl?r.y-l:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+r)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+r))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var i,o,a,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,d=0,f=0,h=s;d0?h=i:f=i,d++}return o}},95049:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(43721),a=r(10948),s=r(18022).defaultLine,l=r(50146).isArrayOrTypedArray,c=o(s),u=1;function d(e,t){var r=e;return r[3]*=t,r}function f(e){if(n(e))return c;var t=o(e);return t.length?t:c}function h(e){return n(e)?e:u}e.exports={formatColor:function(e,t,r){var n,i,s,p,m,g=e.color,v=l(g),y=l(t),x=a.extractOpts(e),b=[];if(n=void 0!==x.colorscale?a.makeColorScaleFuncFromTrace(e):f,i=v?function(e,t){return void 0===e[t]?c:o(n(e[t]))}:f,s=y?function(e,t){return void 0===e[t]?u:h(e[t])}:h,v||y)for(var w=0;w{"use strict";var n=r(63569);function i(e){return[e]}e.exports={keyFun:function(e){return e.key},repeat:i,descend:n,wrap:i,unwrap:function(e){return e[0]}}},63569:e=>{"use strict";e.exports=function(e){return e}},85733:e=>{"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var o=String(t).length;if(i>=String(e).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},53787:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).g0,o=r(95601).WU,a=r(51908),s=r(24956),l=s.FP_SAFE,c=-l,u=s.BADNUM,d=e.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=o(d.adjustFormat(e))}catch(r){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=r(22506),d.keyedContainer=r(37326),d.relativeAttr=r(68864),d.isPlainObject=r(47623),d.toLogRange=r(3324),d.relinkPrivateKeys=r(60077);var h=r(50146);d.isTypedArray=h.isTypedArray,d.isArrayOrTypedArray=h.isArrayOrTypedArray,d.isArray1D=h.isArray1D,d.ensureArray=h.ensureArray,d.concat=h.concat,d.maxRowLength=h.maxRowLength,d.minRowLength=h.minRowLength;var p=r(16791);d.mod=p.mod,d.modHalf=p.modHalf;var m=r(56264);d.valObjectMeta=m.valObjectMeta,d.coerce=m.coerce,d.coerce2=m.coerce2,d.coerceFont=m.coerceFont,d.coercePattern=m.coercePattern,d.coerceHoverinfo=m.coerceHoverinfo,d.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,d.validate=m.validate;var g=r(56255);d.dateTime2ms=g.dateTime2ms,d.isDateTime=g.isDateTime,d.ms2DateTime=g.ms2DateTime,d.ms2DateTimeLocal=g.ms2DateTimeLocal,d.cleanDate=g.cleanDate,d.isJSDate=g.isJSDate,d.formatDate=g.formatDate,d.incrementMonth=g.incrementMonth,d.dateTick0=g.dateTick0,d.dfltRange=g.dfltRange,d.findExactDates=g.findExactDates,d.MIN_MS=g.MIN_MS,d.MAX_MS=g.MAX_MS;var v=r(56141);d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=r(99238);var y=r(1809);d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=r(37812);d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(66523);d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var w=r(68382);d.isLeftAnchor=w.isLeftAnchor,d.isCenterAnchor=w.isCenterAnchor,d.isRightAnchor=w.isRightAnchor,d.isTopAnchor=w.isTopAnchor,d.isMiddleAnchor=w.isMiddleAnchor,d.isBottomAnchor=w.isBottomAnchor;var _=r(8224);d.segmentsIntersect=_.segmentsIntersect,d.segmentDistance=_.segmentDistance,d.getTextLocation=_.getTextLocation,d.clearLocationCache=_.clearLocationCache,d.getVisibleSegment=_.getVisibleSegment,d.findPointOnPath=_.findPointOnPath;var k=r(10191);d.extendFlat=k.extendFlat,d.extendDeep=k.extendDeep,d.extendDeepAll=k.extendDeepAll,d.extendDeepNoArrays=k.extendDeepNoArrays;var S=r(95169);d.log=S.log,d.warn=S.warn,d.error=S.error;var T=r(64563);d.counterRegex=T.counter;var M=r(57429);d.throttle=M.throttle,d.throttleDone=M.done,d.clearThrottle=M.clear;var C=r(90489);function A(e){var t={};for(var r in e)for(var n=e[r],i=0;il||e=t)&&(a(e)&&e>=0&&e%1===0)},d.noop=r(17295),d.identity=r(63569),d.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,i){for(var o=e.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(d.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,o,a=e.length,s=2*a,l=2*t-1,c=new Array(l),u=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=e[i]*c[n];u[r]=o}return u},d.syncOrAsync=function(e,t,r){var n;function i(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,r){if(e){var n,i,o=!1,a=!0;for(n=0;n0?t:0}))},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var j=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,n){var i;return j.test(n)?i=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,i=r[n]()),d.isValidTextValue(i)?i:""}))};var D={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return Z.apply(D,arguments)};var z={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return Z.apply(z,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;var F={max:10,count:0,name:"texttemplate",parseMultDiv:!0};d.texttemplateStringForShapes=function(){return Z.apply(F,arguments)};var B=/^[:|\|]/;function Z(e,t,r){var n=this,o=arguments;t||(t={});var a={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,f="xother_"===s||"yother_"===s,h="xother"===s||"yother"===s||c||f||u,p=s;(c||u)&&(p=p.substring(1)),(f||u)&&(p=p.substring(0,p.length-1));var m,g,v,y=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(N);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(m=t[p]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var U=2e9;d.seedPseudoRandom=function(){U=2e9},d.pseudoRandom=function(){var e=U;return U=(69069*U+1)%4294967296,Math.abs(U-e)<429496729?d.pseudoRandom():U/4294967296},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(i))return n(i);var o=d.extractOption(e,t,"tx","text");return d.isValidTextValue(o)?n(o):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,d.strTranslate(i-c*(r+a),o-c*(n+s))+d.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var V=d.getFirefoxVersion(),H=null!==V&&V<86;d.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},47623:e=>{"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},37326:(e,t,r)=>{"use strict";var n=r(22506),i=/^\w*$/;e.exports=function(e,t,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};t&&t.length?(l=n(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(a=0;a2)return c[t]=2|c[t],f.set(e,null);if(d){for(a=t;a{"use strict";var n=r(44049);e.exports=function(e,t){for(var r=e._context.locale,i=0;i<2;i++){for(var o=e._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[t];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return t}},95169:(e,t,r)=>{"use strict";var n=r(5734).dfltConfig,i=r(98102),o=e.exports={};o.log=function(){var e;if(n.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},o.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},o.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},41499:(e,t,r)=>{"use strict";var n=r(8996);e.exports=function(e,t,r){var i=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][o]=n.select(this)})),i}},37812:(e,t,r)=>{"use strict";var n=r(12903);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";e.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},22506:(e,t,r)=>{"use strict";var n=r(51908),i=r(50146).isArrayOrTypedArray;function o(e,t){return function(){var r,n,a,s,l,c=e;for(s=0;s{"use strict";e.exports=function(){}},98102:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=[];e.exports=function(e,t){if(-1===o.indexOf(e)){o.push(e);var r=1e3;i(t)?r=t:"long"===t&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=e.split(//g),l=0;l{"use strict";var n=r(19602),i="data-savedcursor";e.exports=function(e,t){var r=e.attr(i);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(37812).dot,i=r(24956).BADNUM,o=e.exports={};o.tester=function(e){var t,r=e.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),t=1;to||c===i||cs)&&(!t||!l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||lo||c===i||cs)return!1;var u,d,f,h,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(d,g)||c>Math.max(f,v)))if(cu||Math.abs(n(a,f))>i)return!0;return!1},o.filter=function(e,t){var r=[e[0]],n=0,i=0;function a(a){e.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(e.pop());return{addPt:a,raw:e,filtered:r}}},56162:(e,t,r)=>{"use strict";var n=r(51708),i=r(55902);e.exports=function(e,t,o){var a=e._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:t||[],cachedCode:o||{}})}catch(l){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},22375:(e,t,r)=>{"use strict";var n=r(51908),i=r(98374);e.exports=function(e){var t;if("string"!==typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;"undefined"!==typeof navigator&&(e=navigator.userAgent);e&&e.headers&&"string"===typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]);return e}()))return!0;var r=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},80809:e=>{"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n{"use strict";var n=r(53787),i=r(5734).dfltConfig;var o={add:function(e,t,r,n,o){var a,s;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},s=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(s,e.undoQueue.queue.length-s,a),e.undoQueue.index+=1):a=e.undoQueue.queue[s-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),e.undoQueue.queue.length>i.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r{"use strict";t.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===e?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+e+"([2-9]|[1-9][0-9]+)?"+i)}},68864:e=>{"use strict";var t=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;e.exports=function(e,n){for(;n;){var i=e.match(t);if(i)e=i[1];else{if(!e.match(r))throw new Error("bad relativeAttr call:"+[e,n]);e=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return e&&"["!==n.charAt(0)?e+"."+n:e+n}},60077:(e,t,r)=>{"use strict";var n=r(50146).isArrayOrTypedArray,i=r(47623);e.exports=function e(t,r){for(var o in r){var a=r[o],s=t[o];if(s!==a)if("_"===o.charAt(0)||"function"===typeof a){if(o in t)continue;t[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(51908),i=r(95169),o=r(63569),a=r(24956).BADNUM,s=1e-9;function l(e,t){return et}function d(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var o,a,f=0,h=t.length,p=0,m=h>1?(t[h-1]-t[0])/(h-1):1;for(a=m>=0?r?l:c:r?d:u,e+=m*s*(r?-1:1)*(m>=0?1:-1);f90&&i.log("Long binary search..."),f-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],d=u-i;void 0===i?(l.push(u),i=u):d>s&&(o=Math.min(o,d),l.push(u),i=u)}return{vals:l,minDiff:o}},t.roundUp=function(e,t,r){for(var n,i=0,o=t.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||o;for(var r,n=1/0,i=0;i{"use strict";e.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},51708:(e,t,r)=>{"use strict";var n=r(66235),i=function(){};e.exports=function(e){for(var t in e)"function"===typeof e[t]&&(e[t]=i);e.destroy=function(){e.container.parentNode.removeChild(e.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 o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),e.container.appendChild(r),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1}},99238:e=>{"use strict";e.exports=function(e){return Object.keys(e).sort()}},1809:(e,t,r)=>{"use strict";var n=r(51908),i=r(50146).isArrayOrTypedArray;t.aggNums=function(e,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;se.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},55115:(e,t,r)=>{"use strict";var n=r(43721);e.exports=function(e){return e?n(e):[0,0,0,1]}},75368:(e,t,r)=>{"use strict";var n=r(70059),i=r(50973),o=r(53787),a=null;e.exports=function(){if(null!==a)return a;a=!1;var e=o.isIE()||o.isSafari()||o.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"===typeof r)a=t.some((function(e){return r.apply(null,e)}));else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;a=t.some((function(e){var t=e[1];return l===t||l===t.toLowerCase()})),s.remove()}}return a}},98224:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.strTranslate,a=r(83580),s=r(81653).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,g){var C=e.text(),A=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!==typeof MathJax&&C.match(l),O=n.select(e.node().parentNode);if(!O.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":C,"data-math":"N"}),A?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),a={fontSize:r};!function(e,t,r){var o,a,s,l,f=parseInt((MathJax.version||"").split(".")[0]);if(2!==f&&3!==f)return void i.warn("No MathJax version:",MathJax.version);var h=function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:d},displayAlign:"left"})},p=function(){a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=d},m=function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},g=function(){"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},v=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===f?MathJax.Hub.Typeset(o):MathJax.typeset([o])},y=function(){var t=l.select(2===f?".MathJax_SVG":".MathJax"),o=!t.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===f?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,a,s)}else i.log("There was an error in the tex syntax.",e),r();l.remove()},x=function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)},b=function(){"svg"!==o&&(MathJax.config.startup.output=o)},w=function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)},_=function(){MathJax.config=a};2===f?MathJax.Hub.Queue(h,m,v,y,x,w):3===f&&(p(),g(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){v(),y(),b(),_()})))}(A[2],a,(function(n,i,a){O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return R(),void t();var l=O.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":C,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,u=a.height;s.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=s.select("g");f.attr({fill:d,stroke:d});var h=f.node().getBoundingClientRect(),p=h.width,m=h.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(h=s.node().getBoundingClientRect()).width,m=h.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,v,y]+")"+o(-p/2,x-m/2)});else if("l"===P[0])y=x-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),g&&g.call(e,l),t(l)}))}))):R(),e}function R(){O.empty()||(P=e.attr("class")+"-math",O.select("svg."+P).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(v," ");var r,o=!1,l=[],c=-1;function u(){c++;var t=document.createElementNS(a.svg,"tspan");n.select(t).attr({class:"line",dy:c*s+"em"}),e.appendChild(t),r=t;var i=l;if(l=[{node:t}],i.length>1)for(var o=1;o doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",t)}var A=b.test(t);A?u():(r=e,l=[{node:e}]);for(var O=t.split(y),P=0;P|>|>)/g;var d=[["$","$"],["\\(","\\)"]];var f={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"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,S=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(y),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,h-3)+"..."):o.push(c.substr(0,h));break}a=""}}return o.join("")};var C={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(e){return e.replace(A,(function(e,t){return("#"===t.charAt(0)?function(e){if(e>1114111)return;var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):C[t])||e}))}function I(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?t:""}function O(e,t,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=a()-u.left,t=o()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=E,t.sanitizeHTML=function(e){e=e.replace(v," ");for(var t=document.createElement("p"),r=t,i=[],o=e.split(y),a=0;a{"use strict";var r={};function n(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}t.throttle=function(e,t,i){var o=r[e],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+t?l():o.timer=setTimeout((function(){l(),o.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var i in r)t.clear(i)}},3324:(e,t,r)=>{"use strict";var n=r(51908);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},58268:(e,t,r)=>{"use strict";var n=e.exports={},i=r(14338).locationmodeToLayer,o=r(40506).zL;n.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(e,t){return e+t+".json"},n.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],n=t.objects[r];return o(t,n).features}},55008:e=>{"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"}}},26349:e=>{"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"}}},61099:(e,t,r)=>{"use strict";var n=r(44049);e.exports=function(e){for(var t,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=e.split("[")[0],s=0;s{"use strict";var n=r(10191).extendFlat,i=r(47623),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(e){for(var t={},r=0;r{"use strict";var n=r(51908),i=r(76778),o=r(44049),a=r(53787),s=r(44115),l=r(24279),c=r(66235),u=l.cleanId,d=l.getFromTrace,f=o.traceIs;function h(e,t){var r=e[t],n=t.charAt(0);r&&"paper"!==r&&(e[t]=u(r,n,!0))}function p(e){function t(t,r){var n=e[t],i=e.title&&e.title[r];n&&!i&&(e.title||(e.title={}),e.title[r]=e[t],delete e[t])}e&&("string"!==typeof e.title&&"number"!==typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function m(e){if(!a.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"===typeof t||"number"===typeof t)&&String(t)}function g(e,t,r,n){if(r&&!n)return e;if(n&&!r)return t;if(!e.trim())return t;if(!t.trim())return e;var i,o=Math.min(e.length,t.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,d=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(r=0;r3?(R.x=1.02,R.xanchor="left"):R.x<-2&&(R.x=-.02,R.xanchor="right"),R.y>3?(R.y=1.02,R.yanchor="bottom"):R.y<-2&&(R.y=-.02,R.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var n=r(37921);t._doPlot=n._doPlot,t.newPlot=n.newPlot,t.restyle=n.restyle,t.relayout=n.relayout,t.redraw=n.redraw,t.update=n.update,t._guiRestyle=n._guiRestyle,t._guiRelayout=n._guiRelayout,t._guiUpdate=n._guiUpdate,t._storeDirectGUIEdit=n._storeDirectGUIEdit,t.react=n.react,t.extendTraces=n.extendTraces,t.prependTraces=n.prependTraces,t.addTraces=n.addTraces,t.deleteTraces=n.deleteTraces,t.moveTraces=n.moveTraces,t.purge=n.purge,t.addFrames=n.addFrames,t.deleteFrames=n.deleteFrames,t.animate=n.animate,t.setPlotConfig=n.setPlotConfig;var i=r(90489).getGraphDiv,o=r(75629).eraseActiveShape;t.deleteActiveShape=function(e){return o(i(e))},t.toImage=r(50683),t.validate=r(89953),t.downloadImage=r(51320);var a=r(1173);t.makeTemplate=a.makeTemplate,t.validateTemplate=a.validateTemplate},39379:(e,t,r)=>{"use strict";var n=r(47623),i=r(17295),o=r(95169),a=r(56141).sorterAsc,s=r(44049);t.containerArrayMatch=r(61099);var l=t.isAddVal=function(e){return"add"===e||n(e)},c=t.isRemoveVal=function(e){return null===e||"remove"===e};t.applyContainerArrayChanges=function(e,t,r,n,u){var d=t.astr,f=s.getComponentMethod(d,"supplyLayoutDefaults"),h=s.getComponentMethod(d,"draw"),p=s.getComponentMethod(d,"drawOne"),m=n.replot||n.recalc||f===i||h===i,g=e.layout,v=e._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return o.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(f(g,v),h(e),!0)}var x,b,w,_,k,S,T,M,C=Object.keys(r).map(Number).sort(a),A=t.get(),E=A||[],I=u(v,d).get(),O=[],P=-1,R=E.length;for(x=0;xE.length-(T?0:1))o.warn("index out of range",d,w);else if(void 0!==S)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",d,w),c(S)?O.push(w):T?("add"===S&&(S={}),E.splice(w,0,S),I&&I.splice(w,0,{})):o.warn("Unrecognized full object edit value",d,w,S),-1===P&&(P=w);else for(b=0;b=0;x--)E.splice(O[x],1),I&&I.splice(O[x],1);if(E.length?A||t.set(E):t.set(null),m)return!1;if(f(g,v),p!==i){var L;if(-1===P)L=C;else{for(R=Math.max(E.length,R),L=[],x=0;x=P);x++)L.push(w);for(x=P;x{"use strict";var n=r(8996),i=r(51908),o=r(62206),a=r(53787),s=a.nestedProperty,l=r(24521),c=r(36305),u=r(44049),d=r(94043),f=r(44115),h=r(28605),p=r(59092),m=r(45446),g=r(50973),v=r(66235),y=r(62924).initInteractions,x=r(83580),b=r(26002).clearOutline,w=r(5734).dfltConfig,_=r(39379),k=r(85902),S=r(93415),T=r(18693),M=r(99727).AX_NAME_PATTERN,C=0;function A(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){a.error(r)}}function I(e,t){E(e,v.combine(t,"white"))}function O(e,t){if(!e._context){e._context=a.extendDeep({},w);var r=n.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=e._context;if(t){for(s=Object.keys(t),i=0;i=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function L(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),R(e,t,"currentIndices"),"undefined"===typeof r||Array.isArray(r)||(r=[r]),"undefined"!==typeof r&&R(e,r,"newIndices"),"undefined"!==typeof r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function j(e,t,r,n,o){!function(e,t,r,n){var i=a.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(t))throw new Error("update must be a key:value object");if("undefined"===typeof r)throw new Error("indices must be an integer or array of integers");for(var o in R(e,r,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==t[o].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")}}(e,t,r,n);for(var l=function(e,t,r,n){var o,l,c,u,d,f=a.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var m=0;m-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(t,r){e[r]=e[t],delete e[t]}}function V(e,t,r){e=a.getGraphDiv(e),k.clearPromiseQueue(e);var n={};if("string"===typeof t)n[t]=r;else{if(!a.isPlainObject(t))return a.warn("Relayout fail.",t,r),Promise.reject();n=a.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var i=X(e,n),o=i.flags;o.calc&&(e.calcdata=void 0);var s=[f.previousPromises];o.layoutReplot?s.push(S.layoutReplot):Object.keys(n).length&&(H(e,o,i)||f.supplyDefaults(e),o.legend&&s.push(S.doLegend),o.layoutstyle&&s.push(S.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(S.doTicksRelayout),o.modebar&&s.push(S.doModeBar),o.camera&&s.push(S.doCamera),o.colorbars&&s.push(S.doColorBars),s.push(A)),s.push(f.rehover,f.redrag,f.reselect),c.add(e,V,[e,i.undoit],V,[e,i.redoit]);var l=a.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",i.eventData),e}))}function H(e,t,r){var n,i,o=e._fullLayout;if(!t.axrange)return!1;for(var s in t)if("axrange"!==s&&t[s])return!1;var l=function(e,t){return a.coerce(n,i,m,e,t)},c={};for(var u in r.rangesAltered){var d=h.id2name(u);if(n=e.layout[d],i=o[d],p(n,i,l,c),i._matchGroup)for(var f in i._matchGroup)if(f!==u){var g=o[h.id2name(f)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(e,t){var r=t?function(e){var r=[];for(var n in t){var i=h.getFromId(e,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,S.doAutoRangeAndConstraints,r,S.drawData,S.finalDraw)}var G=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,Y=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,i,o=e.layout,l=e._fullLayout,c=l._guiEditing,f=F(l._preGUI,c),p=Object.keys(t),m=h.list(e),g=a.extendDeepAll({},t),v={};for(U(t),p=Object.keys(t),n=0;n0&&"string"!==typeof R.parts[j];)j--;var D=R.parts[j],z=R.parts[j-1]+"."+D,B=R.parts.slice(0,j).join("."),Z=s(e.layout,B).get(),V=s(l,B).get(),H=R.get();if(void 0!==L){S[P]=L,C[P]="reverse"===D?L:N(H);var W=d.getLayoutValObject(l,R.parts);if(W&&W.impliedEdits&&null!==L)for(var X in W.impliedEdits)A(a.relativeAttr(P,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(L){A("autosize",null);var $="height"===P?"width":"height";A($,l[$])}else l[P]=e._initialAutoSize[P];else if("autosize"===P)A("width",L?null:l.width),A("height",L?null:l.height);else if(z.match(G))O(z),s(l,B+"._inputRange").set(null);else if(z.match(q)){O(z),s(l,B+"._inputRange").set(null);var J=s(l,B).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else z.match(Y)&&s(l,B+"._inputDomain").set(null);if("type"===D){E=Z;var Q="linear"===V.type&&"log"===L,ee="log"===V.type&&"linear"===L;if(Q||ee){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var te=E.range[0],re=E.range[1];Q?(te<=0&&re<=0&&A(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),A(B+".range[0]",Math.log(te)/Math.LN10),A(B+".range[1]",Math.log(re)/Math.LN10)):(A(B+".range[0]",Math.pow(10,te)),A(B+".range[1]",Math.pow(10,re)))}else A(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[R.parts[0]]&&"radialaxis"===R.parts[1]&&delete l[R.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,V,L,A),u.getComponentMethod("images","convertCoords")(e,V,L,A)}else A(B+".autorange",!0),A(B+".range",null);s(l,B+"._inputRange").set(null)}else if(D.match(M)){var ne=s(l,P).get(),ie=(L||{}).type;ie&&"-"!==ie||(ie="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ie,A),u.getComponentMethod("images","convertCoords")(e,ne,ie,A)}var oe=_.containerArrayMatch(P);if(oe){r=oe.array,n=oe.index;var ae=oe.property,se=W||{editType:"calc"};""!==n&&""===ae&&(_.isAddVal(L)?C[P]=null:_.isRemoveVal(L)?C[P]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",t)),T.update(w,se),v[r]||(v[r]={});var le=v[r][n];le||(le=v[r][n]={}),le[ae]=L,delete t[P]}else"reverse"===D?(Z.range?Z.range.reverse():(A(B+".autorange",!0),Z.range=[1,0]),V.autorange?w.calc=!0:w.plot=!0):("dragmode"===P&&(!1===L&&!1!==H||!1!==L&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===L||"select"===L)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?w.plot=!0:W?T.update(w,W):w.calc=!0,R.set(L))}}for(r in v){_.applyContainerArrayChanges(e,f(o,r),v[r],w,f)||(w.plot=!0)}for(var ce in I){var ue=(E=h.getFromId(e,ce))&&E._constraintGroup;if(ue)for(var de in w.calc=!0,ue)I[de]||(h.getFromId(e,de)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(w.plot=!0);var fe=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=i.length?i[0]:i[e]:i}function l(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,u){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,f.transition(e,t.frame.data,t.frame.layout,k.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var p,m,g=0;function v(e){return Array.isArray(i)?g>=i.length?e.transitionOpts=i[g]:e.transitionOpts=i[0]:e.transitionOpts=i,g++,e}var y=[],x=void 0===t||null===t,b=Array.isArray(t);if(!x&&!b&&a.isPlainObject(t))y.push({type:"object",data:v(a.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&SS)&&T.push(m);y=T}}y.length>0?function(t){if(0!==t.length){for(var i=0;i=0;n--)if(a.isPlainObject(t[n])){var m=t[n].name,g=(u[m]||p[m]||{}).name,v=t[n].name,y=u[g]||p[g];g&&v&&"number"===typeof v&&y&&C<5&&(C++,a.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===C&&a.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.")),p[m]={name:m},h.push({frame:f.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"===typeof(i=h[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[i.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=f.modifyFrames,u=f.modifyFrames,d=[e,s],h=[e,o];return c&&c.add(e,l,d,u,h),f.modifyFrames(e,o)},t.addTraces=function e(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],u=t.deleteTraces,d=e,f=[r,l],h=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r{"use strict";var t={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function e(t,r){for(var n in t){var i=t[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),e(i,r[n]))}}(t,r),e.exports={configAttributes:t,dfltConfig:r}},94043:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(27231),a=r(79443),s=r(1563),l=r(83672),c=r(5734).configAttributes,u=r(18693),d=i.extendDeepAll,f=i.isPlainObject,h=i.isArrayOrTypedArray,p=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",y="_deprecated",x=[g,v,"_arrayAttrRegexps",y];function b(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(w(t[r]))r++;else if(r=o.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var a=t[r];if(!w(a))return!1;e=o[i][a]}else e=o[i]}else e=o}}return e}function w(e){return e===Math.round(e)&&e>=0}function _(){var e,t,r={};for(e in d(r,a),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[t[2]],s=3}else{var u=e._module;if(u||(u=(n.modules[e.type||o.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[a])){var d=u.basePlotModule;d&&d.attributes&&(i=d.attributes[a])}i||(i=o[a])}return b(i,t,s)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,i,o,s,l=e._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(53787),i=r(27231),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(e){return e&&"string"===typeof e}function l(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},t.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=a.name,t[o]=a[o],t},t.traceTemplater=function(e){var t,r,o={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(o[t]=0);return{newTrace:function(a){var s={type:t=n.coerce(a,{},i,"type"),_template:null};if(t in o){r=e[t];var l=o[t]%r.length;o[t]++,s._template=r[l]}return s}}},t.newContainer=function(e,t,r){var i=e._template,o=i&&(i[t]||r&&i[r]);return n.isPlainObject(o)||(o=null),e[t]={_template:o}},t.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[l(t)],a=n&&n[t];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[o]=e[o];if(!s(n))return t._template=i,t;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=t+"["+a+"]";function u(){l={},s&&(l[c]={},l[c][o]=s)}function d(e,t){s?n.nestedProperty(l[c],e).set(t):l[c+"."+e]=t}function f(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:d,getUpdateObj:f,applyUpdate:function(t,r){t&&d(t,r);var i=f();for(var o in i)n.nestedProperty(e,o).set(i[o])}}}},93415:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=r(98224),l=r(24513),c=r(66235),u=r(50973),d=r(34906),f=r(54514),h=r(28605),p=r(81653),m=r(14511),g=m.enforce,v=m.clean,y=r(10351).doAutoRange,x="start",b="middle",w="end";function _(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&(o[0]t[0]))return!0}return!1}function k(e){var r,i,s,l,d,m,g=e._fullLayout,v=g._size,y=v.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),f.manage(e),!g._has("cartesian"))return o.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:v.l+v.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",a=e._fullLayout.margin[o],s=0;"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var o=0;"middle"===r&&(o+=i/2);"t"===e?("top"===r&&(o+=i),o+=n-t*n):("bottom"===r&&(o+=i),o+=t*n);return o}(o,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b);if(s>a)return s;return 0}(e,t,m);if(g>0){!function(e,t,r,n){var i="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(e,t,r,n,i){var o="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=a.isTopAnchor(t)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(t)&&"t"===r||a.isBottomAnchor(t)&&"b"===r)&&l{"use strict";var n=r(53787),i=n.isPlainObject,o=r(94043),a=r(44115),s=r(27231),l=r(99862),c=r(5734).dfltConfig;function u(e,t){e=n.extendDeep({},e);var r,o,a=Object.keys(e).sort();function s(t,r,n){if(i(r)&&i(t))u(t,r);else if(Array.isArray(r)&&Array.isArray(t)){var a=l.arrayTemplater({_template:e},n);for(o=0;ok?u.push({code:"unused",traceType:y,templateCount:_,dataCount:k}):k>_&&u.push({code:"reused",traceType:y,templateCount:_,dataCount:k})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var o=t[n],a=m(t,n,r);i(o)?(Array.isArray(t)&&!1===o._template&&o.templateitemname&&u.push({code:"missing",path:a,templateitemname:o.templateitemname}),e(o,a)):Array.isArray(o)&&g(o)&&e(o,a)}}({data:h,layout:f},""),u.length)return u.map(v)}},50683:(e,t,r)=>{"use strict";var n=r(51908),i=r(37921),o=r(44115),a=r(53787),s=r(82231),l=r(99367),c=r(74978),u=r(75703).version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};e.exports=function(e,t){var r,f,h,p;function m(e){return!(e in t)||a.validate(t[e],d[e])}if(t=t||{},a.isPlainObject(e)?(r=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=a.getGraphDiv(e),r=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(d.format.values,", "," or ")+".");var g={};function v(e,r){return a.coerce(t,g,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),w=v("scale"),_=v("setBackground"),k=v("imageDataOnly"),S=document.createElement("div");S.style.position="absolute",S.style.left="-5000px",document.body.appendChild(S);var T=a.extendFlat({},f);x?T.width=x:null===t.width&&n(p.width)&&(T.width=p.width),b?T.height=b:null===t.height&&n(p.height)&&(T.height=p.height);var M=a.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),C=s.getRedrawFunc(S);function A(){return new Promise((function(e){setTimeout(e,s.getDelay(S._fullLayout))}))}function E(){return new Promise((function(e,t){var r=l(S,y,w),n=S._fullLayout.width,d=S._fullLayout.height;function f(){i.purge(S),document.body.removeChild(S)}if("full-json"===y){var h=o.graphJson(S,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),f(),e(k?h:s.encodeJSON(h))}if(f(),"svg"===y)return e(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),c({format:y,width:n,height:d,scale:w,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){i.newPlot(S,r,T,M).then(C).then(A).then(E).then((function(t){e(function(e){return k?e.replace(s.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},89953:(e,t,r)=>{"use strict";var n=r(53787),i=r(44115),o=r(94043),a=r(5734).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,i,o,a){a=a||[];for(var d=Object.keys(e),f=0;fx.length&&i.push(h("unused",o,v.concat(x.length)));var T,M,C,A,E,I=x.length,O=Array.isArray(S);if(O&&(I=Math.min(I,S.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(h("unused",o,v.concat(M,x[M].length)));var P=x[M].length;for(T=0;T<(O?Math.min(P,S[M].length):P);T++)C=O?S[M][T]:S,A=y[M][T],E=x[M][T],n.validate(A,C)?E!==A&&E!==+A&&i.push(h("dynamic",o,v.concat(M,T),A,E)):i.push(h("value",o,v.concat(M,T),A))}else i.push(h("array",o,v.concat(M),y[M]));else for(M=0;M1&&f.push(h("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v{"use strict";e.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},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",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},80254:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862);e.exports=function(e,t,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=t[s],u=n.isArrayOrTypedArray(e[s])?e[s]:[],d=t[s]=[],f=i.arrayTemplater(t,s,l);for(o=0;o{"use strict";var n=r(92948),i=r(54289);e.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},64594:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=i.dateTime2ms,a=i.incrementMonth,s=r(24956).ONEAVGMONTH;e.exports=function(e,t,r,i){if("date"!==t.type)return{vals:i};var l=e[r+"periodalignment"];if(!l)return{vals:i};var c,u=e[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:i}}else if("string"===typeof u&&"M"===u.charAt(0)){var d=+u.substring(1);if(!(d>0&&Math.round(d)===d))return{vals:i};c=d}for(var f=t.calendar,h="start"===l,p="end"===l,m=e[r+"period0"],g=o(m,f)||0,v=[],y=[],x=[],b=i.length,w=0;wT;)S=a(S,-c,f);for(;S<=T;)S=a(S,c,f);k=a(S,-c,f)}else{for(S=g+(_=Math.round((T-g)/u))*u;S>T;)S-=u;for(;S<=T;)S+=u;k=S-u}v[w]=h?k:p?S:(k+S)/2,y[w]=k,x[w]=S}return{vals:v,starts:y,ends:x}}},68861:e=>{"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},10351:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(24956).FP_SAFE,s=r(44049),l=r(50973),c=r(24279),u=c.getFromId,d=c.isLinked;function f(e,t){var r,n,i=[],a=e._fullLayout,s=p(a,t,0),l=p(a,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return o.simpleMap(t.range,t.r2l);var f=u[0].val,m=d[0].val;for(r=1;r0&&((T=I-s(b)-l(w))>O?M/T>P&&(_=b,k=w,P=M/T):M/I>P&&(_={val:b.val,nopad:1},k={val:w.val,nopad:1},P=M/I));if(f===m){var R=f-1,L=f+1;if(A)if(0===f)i=[0,1];else{var j=(f>0?d:u).reduce((function(e,t){return Math.max(e,l(t))}),0),D=f/(1-Math.min(.5,j/I));i=f>0?[0,D]:[D,0]}else i=E?[Math.max(0,R),Math.max(1,L)]:[R,L]}else A?(_.val>=0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(_.val-P*s(_)<0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),P=(k.val-_.val-h(t,b.val,w.val))/(I-s(_)-l(k)),i=[_.val-P*s(_),k.val+P*l(k)];return i=S(i,t),t.limitRange&&t.limitRange(),y&&i.reverse(),o.simpleMap(i,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),C=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(f=1/0,h=-1/0,_)for(n=0;n0&&(f=o),o>h&&o-a&&(f=o),o>h&&o=P;n--)O(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(e,t,r){var n,i,o,a=t._id,s=e._fullData,l=e._fullLayout,c=[],d=[];function f(e,t){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(t,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=o&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&a})}}function b(e){return i(e)&&Math.abs(e)=t}function k(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function S(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(void 0!==i){var a=t.d2l(r),s=t.d2l(n);o.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&k(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&k(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},23795:e=>{"use strict";e.exports=function(e,t,r){var n,i;if(r){var o="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[o?1:0],i=r[o?0:1]}var a=e("autorangeoptions.minallowed",null===i?n:void 0),s=e("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&e("autorangeoptions.clipmin"),void 0===s&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},28605:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(44115),a=r(44049),s=r(53787),l=s.strTranslate,c=r(98224),u=r(34906),d=r(66235),f=r(50973),h=r(45446),p=r(60047),m=r(24956),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,w=m.ONEMINQUARTER,_=m.ONEMAXMONTH,k=m.ONEAVGMONTH,S=m.ONEMINMONTH,T=m.ONEWEEK,M=m.ONEDAY,C=M/2,A=m.ONEHOUR,E=m.ONEMIN,I=m.ONESEC,O=m.MINUS_SIGN,P=m.BADNUM,R={K:"zeroline"},L={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},D={K:"tick",L:"path"},z={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"]},F=r(81653),B=F.MID_SHIFT,Z=F.CAP_SHIFT,U=F.LINE_SPACING,V=F.OPPOSITE_SIDE,H=e.exports={};H.setConvert=r(4738);var W=r(36562),G=r(24279),q=G.idSort,Y=G.isLinked;H.id2name=G.id2name,H.name2id=G.name2id,H.cleanId=G.cleanId,H.list=G.list,H.listIds=G.listIds,H.getFromId=G.getFromId,H.getFromTrace=G.getFromTrace;var X=r(10351);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var K=1e-4;function $(e){var t=(e[1]-e[0])*K;return[e[0]-t,e[1]+t]}H.coerceRef=function(e,t,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"===typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(o?"string"===typeof o?[o]:o:[]),dflt:i},s.coerce(e,t,u,c)},H.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},H.coercePosition=function(e,t,r,n,i,o){var a,l;if("range"!==H.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=H.getFromId(t,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}e[i]=a(l)},H.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(t,r).cleanPos)(e)},H.redrawComponents=function(e,t){t=t||H.listIds(e);var r=e._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},u=0;ur&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},H.saveRangeInitial=function(e,t){for(var r=H.list(e,"",!0),n=!1,i=0;i.3*f||u(n)||u(o))){var h=r.dtick/2;e+=e+ha){var l=Number(r.substr(1));o.exactYears>a&&l%12===0?e=H.tickIncrement(e,"M6","reverse")+1.5*M:o.exactMonths>a?e=H.tickIncrement(e,"M1","reverse")+15.5*M:e-=C;var c=H.tickIncrement(e,r);if(c<=n)return c}return e}(y,e,v,c,o)),g=y,0;g<=u;)g=H.tickIncrement(g,v,!1,o);return{start:t.c2r(y,0,o),end:t.c2r(g,0,o),size:v,_dataSpan:u-c}},H.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,o=t.dtick&&i(t._tmin);if(o){var a=H.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*a+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(n,t.l2r),e._isMinor=!0,H.prepTicks(e,r),o){var c=i(t.dtick),u=i(e.dtick),d=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?te(d,f)?d===2*T&&f===2*M&&(e.dtick=T):d===2*T&&f===3*M?e.dtick=T:d!==T||(t._input.minor||{}).nticks?re(d/f,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=M:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":te(d,f)?d>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(d,f)||(e.dtick=re(d/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},H.prepTicks=function(e,t){var r=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,o=e.nticks;o||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?s.bigFont(e.tickfont.size||12):15,o=e._length/n):(n="y"===e._id.charAt(0)?40:80,o=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(o*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(o*=100),e._roughDTick=Math.abs(r[1]-r[0])/o,H.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),o=H.getTickFormat(e);if(o){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(t=A,a&&!n&&e.dtick=(R?0:1);L--){var j=!L;L?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var D=L?e:s.extendFlat({},e,e.minor);if(j?H.prepMinorTicks(D,e,t):H.prepTicks(D,t),"array"!==D.tickmode)if("sync"!==D.tickmode){var z=$(u),N=z[0],F=z[1],B=i(D.dtick),Z="log"===o&&!(B||"L"===D.dtick.charAt(0)),U=H.tickFirst(D,t);if(L){if(e._tmin=U,U=F:q<=F;q=H.tickIncrement(q,Y,d,a)){if(L&&V++,D.rangebreaks&&!d){if(q=h)break}if(I.length>p||q===G)break;G=q;var X={value:q};L?(Z&&q!==(0|q)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),I.push(X)):(X.minor=!0,O.push(X))}}else I=[],m=oe(e);else L?(I=[],m=ae(e)):(O=[],E=ae(e))}if(R&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var K=I.map((function(e){return e.value})),J=[],Q=0;Q0?(o=n-1,a=n):(o=n,a=n);var s,l=e[o].value,c=e[a].value,u=Math.abs(c-l),d=r||u,f=0;d>=y?f=u>=y&&u<=g?u:v:r===b&&d>=w?f=u>=w&&u<=x?u:b:d>=S?f=u>=S&&u<=_?u:k:r===T&&d>=T?f=T:d>=M?f=M:r===C&&d>=C?f=C:r===A&&d>=A&&(f=A),f>=u&&(f=u,s=!0);var h=i+f;if(t.rangebreaks&&f>0){for(var p=0,m=0;m<84;m++){var E=(m+.5)/84;t.maskBreaks(i*(1-E)+E*h)!==P&&p++}(f*=p/84)||(e[n].drop=!0),s&&u>T&&(f=u)}(f>0||0===n)&&(e[n].periodX=i+f/2)}}(I,e,e._definedDelta),e.rangebreaks){var ie="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=I.length-1;r>-1;r--)if(I[r].drop)I.splice(r,1);else{I[r].value=je(I[r].value,e);var ce=e.c2p(I[r].value);(ie?le>ce-se:leh||deh&&(ue.periodX=h),de10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=M&&o<=10||t>=15*M)e._tickround="d";else if(t>=E&&o<=16||t>=A)e._tickround="M";else if(t>=I&&o<=19||t>=E)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(o,a)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(ye(e.exponentformat)&&!xe(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function ge(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}H.autoTicks=function(e,t,r){var n;function o(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var a=2*t;if(a>v)t/=v,n=o(10),e.dtick="M"+12*pe(t,n,se);else if(a>k)t/=k,e.dtick="M"+pe(t,1,le);else if(a>M){if(e.dtick=pe(t,M,e._hasDayOfWeekBreaks?[1,2,7,14]:ue),!r){var l=H.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else a>A?e.dtick=pe(t,A,le):a>E?e.dtick=pe(t,E,ce):a>I?e.dtick=pe(t,I,ce):(n=o(10),e.dtick=pe(t,n,se))}else if("log"===e.type){e.tick0=0;var u=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/d,n=o(10),e.dtick="L"+pe(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Le(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=o(10),e.dtick=pe(t,n,se));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},H.tickIncrement=function(e,t,r,o){var a=r?-1:1;if(i(t))return s.increment(e,a*t);var l=t.charAt(0),c=a*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,o);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?fe:de,d=e+.01*a,f=s.roundUp(s.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},H.tickFirst=function(e,t){var r=e.r2l||Number,o=s.simpleMap(e.range,r,void 0,void 0,t),a=o[1] ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,a,r,c):"log"===u?function(e,t,r,n,o){var a=e.dtick,l=t.x,c=e.tickformat,u="string"===typeof a&&a.charAt(0);"never"===o&&(o="");n&&"L"!==u&&(a="L3",u="L");if(c||"L"===u)t.text=be(Math.pow(10,l),e,o,n);else if(i(a)||"D"===u&&s.mod(l+.01,1)<.1){var d=Math.round(l),f=Math.abs(d),h=e.exponentformat;"power"===h||ye(h)&&xe(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":O)+f+"",t.fontSize*=1.25):("e"===h||"E"===h)&&f>2?t.text="1"+h+(d>0?"+":O)+f:(t.text=be(Math.pow(10,l),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(a);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,a,0,c,m):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r="");t.text=String(r)}(e,a):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?t.text=a+" - "+o:(t.text=o,t.text2=a)}(e,a,r):Le(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,i,n);else{var o=t.x/180;if(0===o)t.text="0";else{var a=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function r(e,n){return t(n,0)?e:r(n,e%n)}function n(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}var i=n(e),o=e*i,a=Math.abs(r(o,i));return[Math.round(o/a),Math.round(i/a)]}(o);if(a[1]>=100)t.text=be(s.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===a[1]?1===a[0]?t.text="\u03c0":t.text=a[0]+"\u03c0":t.text=["",a[0],"","\u2044","",a[1],"","\u03c0"].join(""),l&&(t.text=O+t.text)}}}}(e,a,r,c,m):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide");t.text=be(t.x,e,i,n)}(e,a,0,c,m),n||(e.tickprefix&&!p(e.showtickprefix)&&(a.text=e.tickprefix+a.text),e.ticksuffix&&!p(e.showticksuffix)&&(a.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(a.text)){var g=e.labelalias[a.text];"string"===typeof g&&(a.text=g)}if("boundaries"===e.tickson||e.showdividers){var v=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};a.xbnd=[v(a.x-.5),v(a.x+e.dtick-.5)]}return a},H.hoverLabelText=function(e,t,r){r&&(e=s.extendFlat({},e,{hoverformat:r}));var n=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(e,n,r)+" - "+H.hoverLabelText(e,i,r);var o="log"===e.type&&n<=0,a=H.tickText(e,e.c2l(o?-n:n),"hover").text;return o?0===n?"0":O+a:a};var ve=["f","p","n","\u03bc","m","","k","M","G","T"];function ye(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var o=e<0,a=t._tickround,l=r||t.exponentformat||"B",c=t._tickexponent,u=H.getTickFormat(t),d=t.separatethousands;if(n){var f={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};me(f),a=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var h,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(e=Math.abs(e))"+h+"
":"B"===l&&9===c?e+="B":ye(l)&&(e+=ve[c/3+5]));return o?O+e:e}function we(e,t){if(e){var r=Object.keys(N).reduce((function(e,r){return-1!==t.indexOf(r)&&N[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function _e(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=n(e))}function s(e,t){var r=null===t[0],n=null===t[1],i=o(e,t[0])>=0,a=o(e,t[1])<=0;return(r||i)&&(n||a)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var n=H.getFromId(e,t);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=H.drawOne(e,n,r);return n._shiftPusher&&Ne(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(e,t,r){var n,i,l,c=(r=r||{}).axShifts||{},h=r.overlayingShiftedAx||[];t.setScale();var p=e._fullLayout,m=t._id,g=m.charAt(0),v=H.counterLetter(m),y=p._plots[t._mainSubplot];if(y){if(t._shiftPusher=t.autoshift||-1!==h.indexOf(t._id)||-1!==h.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var x=t.linewidth/2||0;"inside"===t.ticks&&(x+=t.ticklen),Ne(t,x,c,!0),Ne(t,t.shift||0,c,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,c));var b=y[g+"axislayer"],w=t._mainLinePosition,_=w+=t._shift,k=t._mainMirrorPosition,S=t._vals=H.calcTicks(t),T=[t.mirror,_,k].join("_");for(n=0;n0?r.bottom-u:0,d))));var f=0,h=0;if(t._shiftPusher&&(f=Math.max(d,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==p._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(h+=Te(t))),t._fullDepth=Math.max(f,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var m=[0,1],y="number"===typeof t._shift?t._shift:0;if("x"===g){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,d),m.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,d),n[l]=t._depth-y):(t._depth=Math.max(r.height>0?r.right-u:0,d),n[l]=t._depth+y,m.reverse()),r.height>0){var w=r.bottom-(t._offset+t._length);w>0&&(n.yb=0,n.b=w);var _=t._offset-r.top;_>0&&(n.yt=1,n.t=_)}n[v]="free"===t.anchor?t.position:t._anchorAxis.domain[m[0]],t.title.text!==p._dfltTitle[g]&&(n[l]+=Te(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[c]+=d),!0===t.mirror||"ticks"===t.mirror?i[v]=t._anchorAxis.domain[m[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[v]=[t._counterDomainMin,t._counterDomainMax][m[1]]))}le&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(we(n,t.automargin),we(i,t.automargin)),o.autoMargin(e,Ae(t),n),o.autoMargin(e,Ee(t),i),o.autoMargin(e,Ie(t),s)})),s.syncOrAsync(ae)}}function ce(e){var r=m+(e||"tick");return M[r]||(M[r]=function(e,t){var r,n,i,o;e._selections[t].size()?(r=1/0,n=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Ce(this),t=f.bBox(e.node().parentNode);r=Math.min(r,t.top),n=Math.max(n,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}))):(r=0,n=0,i=0,o=0);return{top:r,bottom:n,left:i,right:o,height:n-r,width:o-i}}(t,r)),M[r]}},H.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===r)&&(o=o.map((function(e){return-e}))),e.side&&o.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),o},H.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},H.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=e.side,u=l?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;(a||n)&&(u+=f*Z,d+=(e.linewidth||0)/2);(i||o)&&(u+=(e.linewidth||0)/2,d+=3);s&&"top"===c&&(d-=f*(1-Z));(i||n)&&(u=-u);"bottom"!==c&&"right"!==c||(d=-d);return[l?u:0,s?d:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return l(r+e._offset+e.l2p(ke(t)),n)}:function(t){return l(n,r+e._offset+e.l2p(ke(t)))}},H.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var o=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,a=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+s*r)+"v"+o*r:"M"+(t+s*r)+",0h"+o*r},H.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",o=function(e){return-1!==n.indexOf(e)},a=o("top"),l=o("left"),c=o("right"),u=o("bottom")||l||a||c,d=o("inside"),f="inside"===n&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,m=f?e.ticklen:0;if(d?m*=-1:u&&(m=0),f&&(h+=m,r)){var g=s.deg2rad(r);h=m*Math.cos(g)+1,p=m*Math.sin(g)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size);var v,y,x,b,w,_={labelStandoff:h+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},k=0,S=e.side,T=e._id.charAt(0),M=e.tickangle;if("x"===T)b=(w=!d&&"bottom"===S||d&&"top"===S)?1:-1,d&&(b*=-1),v=p*b,y=t+h*b,x=w?1:-.2,90===Math.abs(M)&&(d?x+=B:x=-90===M&&"bottom"===S?Z:90===M&&"top"===S?B:.5,k=B/2*(M/90)),_.xFn=function(e){return e.dx+v+k*e.fontSize},_.yFn=function(e){return e.dy+y+e.fontSize*x},_.anchorFn=function(e,t){if(u){if(l)return"end";if(c)return"start"}return i(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},_.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===T){if(b=(w=!d&&"left"===S||d&&"right"===S)?1:-1,d&&(b*=-1),v=h,y=p*b,x=0,d||90!==Math.abs(M)||(x=-90===M&&"left"===S||90===M&&"right"===S?Z:.5),d){var C=i(M)?+M:0;if(0!==C){var A=s.deg2rad(C);k=Math.abs(Math.sin(A))*Z*b,x=0}}_.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+k*e.fontSize},_.yFn=function(e){return e.dy+y+e.fontSize*B},_.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":w?"end":"start"},_.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return _},H.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",o=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,Se);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return d.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return f.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),ze(t,[D]),a.attr("transform",r.transFn)},H.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var i=t._id+"grid",o=t.minor&&t.minor.showgrid,a=o?r.vals.filter((function(e){return e.minor})):[],s=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,u=0;u=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+i).data(v?s:a,Se);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(e){return d.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return f.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof r.path&&x.attr("d",r.path)}}ze(t,[L,j])}},H.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=H.shouldShowZeroLine(e,t,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return q(e.id,t.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",f.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),ze(t,[R])},H.drawLabels=function(e,t,r){r=r||{};var o=e._fullLayout,a=t._id,u=a.charAt(0),d=r.cls||a+"tick",h=r.vals.filter((function(e){return e.text})),p=r.labelFns,m=r.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],v=r.layer.selectAll("g."+d).data(t.showticklabels?h:[],Se),y=[];function x(e,o){e.each((function(e){var a=n.select(this),s=a.select(".text-math-group"),u=p.anchorFn(e,o),d=r.transFn.call(a.node(),e)+(i(o)&&0!==+o?" rotate("+o+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),h=c.lineCount(a),m=U*e.fontSize,g=p.heightFn(e,i(o)?+o:0,(h-1)*m);if(g&&(d+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:d,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=f.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",d+l(y,0))}}))}v.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),i=e._promises.length;r.call(c.positionText,p.xFn(t),p.yFn(t)).call(f.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[i]?y.push(e._promises.pop().then((function(){x(r,m)}))):x(r,m)})),ze(t,[z]),v.exit().remove(),r.repositionOnUpdate&&v.each((function(e){n.select(this).select("text").call(c.positionText,p.xFn(e),p.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===t._id.charAt(0),l=0,c=a?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),h=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var y in v.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=f.bBox(r.node()),s=0;a?(o.right>h||o.lefth||o.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},x(v,g+1?g:m);var b=null;t._selections&&(t._selections[d]=v);var w=[function(){return y.length&&Promise.all(y)}];t.automargin&&o._redrawFromAutoMarginCount&&90===g?(b=90,w.push((function(){x(v,g)}))):w.push((function(){if(x(v,m),h.length&&"x"===u&&!i(m)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,o=[];if(v.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),i=Ce(this),a=f.bBox(i.node());o.push({top:0,bottom:10,height:10,left:r-a.width/2,right:r+a.width/2+2,width:a.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var a=h.length,l=Math.abs((h[a-1].x-h[0].x)*t._m)/(a-1),c=t.ticklabelposition||"",d=function(e){return-1!==c.indexOf(e)},p=d("top"),g=d("left"),y=d("right"),w=d("bottom")||g||p||y?(t.tickwidth||0)+6:0,_=l<2.5*n||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e0?T*=1+T/(P-=T):T=0,"y"!==t._id.charAt(0)&&(T=-T),E[C]=k.p2d(k.d2p(k.range[C])+M*T),"min"===k.autorange||"max reversed"===k.autorange?(E[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):"max"!==k.autorange&&"min reversed"!==k.autorange||(E[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[k._name+".range"]=E}var N=s.syncOrAsync(w);return N&&N.then&&e._promises.push(N),N},H.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),o=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},H.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(Me(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(!i)return;var o=e._fullLayout,a=t._id.charAt(0),s=H.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(e,t){return t?n(e):"number"===typeof e}function d(e){return Math.max(1,(e-1)/1e3)}e.exports=function(e,t,r){var i=e,f=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!f&&function(e){return a(e[0])&&a(e[1])}(i))return"multicategory";if(f&&Array.isArray(i[0])){for(var h=[],p=0;p2*a}(i,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=d(r),i=0,a=0,s={},u=0;u2*i}(i,g)?"category":function(e,t){for(var r=e.length,n=0;n{"use strict";var n=r(51908),i=r(44049),o=r(53787),a=r(99862),s=r(80254),l=r(45446),c=r(96592),u=r(64698),d=r(46139),f=r(33095),h=r(29550),p=r(50923),m=r(59092),g=r(4738),v=r(99727).WEEKDAY_PATTERN,y=r(99727).HOUR_PATTERN;function x(e,t,r){function i(r,n){return o.coerce(e,t,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,u="";if(2===a.length)for(s=0;s<2;s++)if(c=w(a[s])){u=v;break}var d=i("pattern",u);if(d===v)for(s=0;s<2;s++)(c=w(a[s]))&&(t.bounds[s]=a[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=a[s],d){case v:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=a[s]=c;break;case y:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=a[s]=c}if(!1===r.autorange){var f=r.range;if(f[0]f[1])return void(t.enabled=!1)}else if(a[0]>f[0]&&a[1]{"use strict";var n=r(41287),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(e,t){return a(e,t)+[" And for dates see: "+o+".","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(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?a:s)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},24279:(e,t,r)=>{"use strict";var n=r(44049),i=r(99727);function o(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return o(t,e._axisMatchGroups)||o(t,e._axisConstraintGroups)}},29550:e=>{"use strict";e.exports=function(e,t,r,n){if("category"===t.type){var i,o=e.categoryarray,a=Array.isArray(o)&&o.length>0;a&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),a||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var r,n,i,o=t.dataAttr||e._id.charAt(0),a={};if(t.axData)r=t.axData;else for(r=[],n=0;n{"use strict";var n=r(51908),i=r(53787),o=r(24956),a=o.ONEDAY,s=o.ONEWEEK;t.dtick=function(e,t){var r="log"===t,i="date"===t,o="category"===t,s=i?a:1;if(!e)return s;if(n(e))return(e=Number(e))<=0?s:o?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if("string"!==typeof e||!i&&!r)return s;var l=e.charAt(0),c=e.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:e},t.tick0=function(e,t,r,o){return"date"===t?i.cleanDate(e,i.dateTick0(r,o%s===0?1:0)):"D1"!==o&&"D2"!==o?n(e)?Number(e):0:void 0}},99727:(e,t,r)=>{"use strict";var n=r(64563).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"}}},14511:(e,t,r)=>{"use strict";var n=r(53787),i=r(10351),o=r(24279).id2name,a=r(45446),s=r(11706),l=r(4738),c=r(24956).ALMOST_EQUAL,u=r(81653).FROM_BL;function d(e,t,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,d=t._id,m=d.charAt(0),g=((s._splomAxes||{})[m]||{})[d]||{},v=t._id,y="x"===v.charAt(0);function x(r,i){return n.coerce(e,t,a,r,i)}t._matchGroup=null,t._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(e,t,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,w,_=t.type,k=[];for(b=0;bn?i.substr(n):o.substr(r))+a:i+o+e*t:a}function g(e,t){for(var r=t._size,n=r.h/r.w,i={},o=Object.keys(e),a=0;ac*x)||k)for(r=0;rR&&zO&&(O=z);f/=(O-I)/(2*P),I=l.l2r(I),O=l.l2r(O),l.range=l._input.range=C{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(25378),s=r(32954),l=r(44049),c=i.strTranslate,u=r(98224),d=r(66235),f=r(50973),h=r(76719),p=r(28605),m=r(19602),g=r(63e3),v=r(57873),y=v.selectingOrDrawing,x=v.freeMode,b=r(81653).FROM_TL,w=r(24513),_=r(93415).redrawReglTraces,k=r(44115),S=r(24279).getFromId,T=r(26002).prepSelect,M=r(26002).clearOutline,C=r(26002).selectOnClick,A=r(11706),E=r(99727),I=E.MINDRAG,O=E.MINZOOM,P=!0;function R(e,t,r,n){var o=i.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return o.call(m,n),o.node()}function L(e,t,r,i,o,a,s){var l=R(e,"rect",t,r);return n.select(l).call(f.setRect,i,o,a,s),l}function j(e,t){for(var r=0;r=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function F(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function Z(e,t,r,n,i,o){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),U(e,t,i,o)}function U(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),P=!1)}function W(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,O)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function G(e,t,r,n,o){for(var a,s,l,c,u=!1,d={},f={},h=(o||{}).xaHash,p=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==e||ve||He(),ge)a.indexOf("select")>-1&&C(r,i,K,$,t.id,Oe),a.indexOf("event")>-1&&h.click(i,r,t.id);else if(1===e&&ve){var s=m?R:P,c="s"===m||"w"===v?0:1,d=s._name+".range["+c+"]",f=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,d,t)}))}}}function Le(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+we)),i=Math.max(0,Math.min(te,pe*r+_e)),o=Math.abs(n-we),a=Math.abs(i-_e);function s(){Ce="",ke.r=ke.l,ke.t=ke.b,Ee.attr("d","M0,0Z")}if(ke.l=Math.min(we,n),ke.r=Math.max(we,n),ke.t=Math.min(_e,i),ke.b=Math.max(_e,i),re.isSubplotConstrained)o>O||a>O?(Ce="xy",o/ee>a/te?(a=o*te/ee,_e>i?ke.t=_e-a:ke.b=_e+a):(o=a*ee/te,we>n?ke.l=we-o:ke.r=we+o),Ee.attr("d",W(ke))):s();else if(ne.isSubplotConstrained)if(o>O||a>O){Ce="xy";var l=Math.min(ke.l/ee,(te-ke.b)/te),c=Math.max(ke.r/ee,(te-ke.t)/te);ke.l=l*ee,ke.r=c*ee,ke.b=(1-l)*te,ke.t=(1-c)*te,Ee.attr("d",W(ke))}else s();else!oe||a0){var u;if(ne.isSubplotConstrained||!ie&&1===oe.length){for(u=0;u1&&(void 0!==o.maxallowed&&se===(o.range[0]1&&(void 0!==a.maxallowed&&le===(a.range[0]{"use strict";var n=r(8996),i=r(76719),o=r(63e3),a=r(19602),s=r(34189).makeDragBox,l=r(99727).DRAGGERSIZE;t.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(e,t){if((r._plots[e].mainplot&&!0)===(r._plots[t].mainplot&&!0)){var n=e.split("y"),i=t.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[e].mainplot?1:-1})).forEach((function(t){var n=r._plots[t],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(e,n,a._offset,c._offset,a._length,c._length,"ns","ew");u.onmousemove=function(r){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===t&&e._fullLayout._plots[t]&&i.hover(e,r,t)},i.hover(e,r,t),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=t},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,o.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,n,a._offset-l,c._offset-l,l,l,"n","w"),s(e,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(e,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(e,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(t===a._mainSubplot){var d=a._mainLinePosition;"top"===a.side&&(d-=l),s(e,n,a._offset+.1*a._length,d,.8*a._length,l,"","ew"),s(e,n,a._offset,d,.1*a._length,l,"","w"),s(e,n,a._offset+.9*a._length,d,.1*a._length,l,"","e")}if(t===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=l),s(e,n,f,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(e,n,f,c._offset+.9*c._length,l,.1*c._length,"s",""),s(e,n,f,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(t){t.target=e._fullLayout._lasthover,i.hover(e,t,r._hoversubplot)},a.onclick=function(t){t.target=e._fullLayout._lasthover,i.click(e,t)},a.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},t.updateFx(e)}},t.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";a(t._draggers,r)}},49861:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(24279);e.exports=function(e){return function(t,r){var a=t[e];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,u=c.xaxis,d=c.yaxis,f=c.cartesian,h=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(44115),s=r(50973),l=r(38213).a0,c=r(24279),u=r(99727),d=r(83580),f=o.ensureSingle;function h(e,t,r){return o.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function p(e,t,r,o,a){for(var c,d,f,h=u.traceLayerClasses,p=e._fullLayout,m=p._modules,g=[],v=[],y=0;y{"use strict";var n=r(92948),i=r(18022),o=r(93701).P,a=r(10191).extendFlat,s=r(99862).templatedArray,l=r(89849).descriptionWithDates,c=r(24956).ONEDAY,u=r(99727),d=u.HOUR_PATTERN,f=u.WEEKDAY_PATTERN,h={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=a({},h,{values:h.values.slice().concat(["sync"]),description:[h.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},y={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function b(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return e||(t.dflt=5),t}function w(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return e||(t.dflt=1),t}var _={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function S(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return e||(t.dflt=1),t}var T=a({},o,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};e.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},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,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[f,d,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+f+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+d+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+f+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+d+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:y,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},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",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:b(),tickwidth:w(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use \u22121 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:k,gridwidth:S(),griddash:T,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:h,nticks:m("minor"),tick0:g,dtick:v,tickvals:y,ticks:x,ticklen:b("minor"),tickwidth:w("minor"),tickcolor:_,gridcolor:k,gridwidth:S("minor"),griddash:T,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},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",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},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",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},47101:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87267).isUnifiedHover,a=r(74064),s=r(99862),l=r(79443),c=r(45446),u=r(80035),d=r(90471),f=r(14511),h=r(75486),p=r(24279),m=p.id2name,g=p.name2id,v=r(99727).AX_ID_PATTERN,y=r(44049),x=y.traceIs,b=y.getComponentMethod;function w(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}e.exports=function(e,t,r){var y,_,k=t.autotypenumbers,S={},T={},M={},C={},A={},E={},I={},O={},P={},R={};for(y=0;y{"use strict";var n=r(25378).mix,i=r(18022),o=r(53787);e.exports=function(e,t,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(e,t,a.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",a.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),f=l("gridwidth"),h=l("griddash");if(r("showgrid",a.showGrid||!!d||!!f||!!h)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var p=l("minor.gridcolor",n(t.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",t.gridwidth||1),g=l("minor.griddash",t.griddash||"solid");r("minor.showgrid",!!p||!!m||!!g)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),y=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!y)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},75486:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787);e.exports=function(e,t,r,o){var a,s,l,c,u,d,f=o.counterAxes||[],h=o.overlayableAxes||[],p=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[p][m._axisMap[t._id]],a=m._anchors[t._id],s&&(l=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(e.position)?"free":f[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,u=0,d=!1;var v=i.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(f),dflt:a}},"anchor"),y=i.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");if("free"===v){if("y"===p)r("autoshift")&&(c="left"===y?g[0]:g[1],d=!t.automargin||t.automargin,u="left"===y?-3:3),r("shift",u);r("position",c)}r("automargin",d);var x=!1;if(h.length&&(x=i.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!x){var b=r("domain",s);b[0]>b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},33095:(e,t,r)=>{"use strict";var n=r(16824);e.exports=function(e,t,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(e);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},59092:(e,t,r)=>{"use strict";var n=r(23795);e.exports=function(e,t,r,i){var o=t._template||{},a=t.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||(i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(t.insiderange=!1,s=void 0),s&&(l=r("range",s))));var c,u=t.getAutorangeDflt(l,i),d=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==d&&!0!==d)&&(null===l[0]||"min"!==d&&"max reversed"!==d)&&(null===l[1]||"max"!==d&&"min reversed"!==d)||(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(d=r("autorange",u=t.getAutorangeDflt(l,i))),d&&(n(r,d,l),"linear"!==a&&"-"!==a||r("rangemode")),t.cleanRange()}},11706:(e,t,r)=>{"use strict";var n=r(81653).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],o=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(o+(i[0]-o)*t),e.l2r(o+(i[1]-o)*t)],e.setScale()}},4738:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).g0,o=r(53787),a=o.numberFormat,s=r(51908),l=o.cleanNumber,c=o.ms2DateTime,u=o.dateTime2ms,d=o.ensureNumber,f=o.isArrayOrTypedArray,h=r(24956),p=h.FP_SAFE,m=h.BADNUM,g=h.LOG_CLIP,v=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,w=h.ONESEC,_=r(24279),k=r(99727),S=k.HOUR_PATTERN,T=k.WEEKDAY_PATTERN;function M(e){return Math.pow(10,e)}function C(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function A(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(t,r,n,i){if((i||{}).msUTC&&s(t))return+t;var a=u(t,n||e.calendar);if(a===m){if(!s(t))return m;t=+t;var l=Math.floor(10*o.mod(t+.05,1)),c=Math.round(t-l/10);a=u(new Date(c))+l/10}return a}function I(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function P(t){if(C(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"===typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return m}function R(t){if(e._categoriesMap)return e._categoriesMap[t]}function L(e){var t=R(e);return void 0!==t?t:s(e)?+e:void 0}function j(e){return s(e)?+e:R(e)}function D(e,t,r){return n.round(r+t*e,2)}function z(e,t,r){return(e-r)/t}var N=function(t){return s(t)?D(t,e._m,e._b):m},F=function(t){return z(t,e._m,e._b)};if(e.rangebreaks){var B="y"===h;N=function(t){if(!s(t))return m;var r=e._rangebreaks.length;if(!r)return D(t,e._m,e._b);var n=B;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,o=i*t,a=0,l=0;lu)){a=o<(c+u)/2?l:l+1;break}a=l+1}var d=e._B[a]||0;return isFinite(d)?D(t,e._m2,d):0},F=function(t){var r=e._rangebreaks.length;if(!r)return z(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return z(t,e._m2,e._B[n])}}e.c2l="log"===e.type?A:d,e.l2c="log"===e.type?M:d,e.l2p=N,e.p2l=F,e.c2p="log"===e.type?function(e,t){return N(A(e,t))}:N,e.p2c="log"===e.type?function(e){return M(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=F,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return A(l(e),t)},e.r2d=e.r2c=function(e){return M(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=d,e.c2r=A,e.l2d=M,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return M(F(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=F,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=o.identity,e.d2c=e.r2c=e.d2l=e.r2l=E,e.c2d=e.c2r=e.l2d=e.l2r=I,e.d2p=e.r2p=function(t,r,n){return e.l2p(E(t,0,n))},e.p2d=e.p2r=function(e,t,r){return I(F(e),t,r)},e.cleanPos=function(t){return o.cleanDate(t,m,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var r=j(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=j,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var r=L(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=R,e.l2r=e.c2r=d,e.r2l=L,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(n){var i,a,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var c in l)if(c!==r){var u=t[_.id2name(c)];s=s.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n)}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,a=o.nestedProperty(e,t).get();if(i=(i="date"===e.type?o.dfltRange(e.calendar):"y"===h?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==e.type||e.autorange||(a[0]=o.cleanDate(a[0],m,e.calendar),a[1]=o.cleanDate(a[1],m,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!o.isDateTime(a[n],e.calendar)){e[t]=i;break}if(e.r2l(a[0])===e.r2l(a[1])){var u=o.constrain(e.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=e.l2r(u-1e3),a[1]=e.l2r(u+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){e[t]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-p?a[n]=-p:a[n]>p&&(a[n]=p),a[0]===a[1]){var d=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=d,a[1]+=d}}}else o.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=_.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var o=r&&e._r?"_r":"range",a=e.calendar;e.cleanRange(o);var s,l,c=e.r2l(e[o][0],a),u=e.r2l(e[o][1],a),d="y"===h;if((d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;su&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&t=s.min&&(es.max&&(s.max=n),i=!1)}i&&c.push({min:e,max:n})}};for(n=0;n{"use strict";e.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}},46139:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235).contrast,o=r(45446),a=r(16824),s=r(80254);function l(e,t){function r(r,i){return n.coerce(e,t,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}e.exports=function(e,t,r,c,u){u||(u={});var d=r("labelalias");n.isPlainObject(d)||delete t.labelalias;var f=a(e);if(r("showticklabels")){var h=u.font||{},p=t.color,m=-1!==(t.ticklabelposition||"").indexOf("inside")?i(u.bgColor):p&&p!==o.color.dflt?p:h.color;if(n.coerceFont(r,"tickfont",{family:h.family,size:h.size,color:m}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),u.noAng||r("tickangle"),"category"!==c){var g=r("tickformat");s(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),t.tickformatstops.length||delete t.tickformatstops,u.noExp||g||"date"===c||(r("showexponent",f),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},64698:(e,t,r)=>{"use strict";var n=r(53787),i=r(45446);e.exports=function(e,t,r,o){var a=o.isMinor,s=a?e.minor||{}:e,l=a?t.minor:t,c=a?i.minor:i,u=a?"minor.":"",d=n.coerce2(s,l,c,"ticklen",a?.6*(t.ticklen||5):void 0),f=n.coerce2(s,l,c,"tickwidth",a?t.tickwidth||1:void 0),h=n.coerce2(s,l,c,"tickcolor",(a?t.tickcolor:void 0)||l.color);r(u+"ticks",!a&&o.outerTicks||d||f||h?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},96592:(e,t,r)=>{"use strict";var n=r(60047),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o,a){a||(a={});var s=a.isMinor,l=s?e.minor||{}:e,c=s?t.minor:t,u=s?"minor.":"";function d(e){var t=l[e];return void 0!==t?t:(c._template||{})[e]}var f=d("tick0"),h=d("dtick"),p=d("tickvals"),m=r(u+"tickmode",i(p)?"array":h?"linear":"auto");if("auto"===m||"sync"===m)r(u+"nticks");else if("linear"===m){var g=c.dtick=n.dtick(h,o);c.tick0=n.tick0(f,o,t.calendar,g)}else if("multicategory"!==o){void 0===r(u+"tickvals")?c.tickmode="auto":s||r("ticktext")}}},76117:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(50973),s=r(28605);e.exports=function(e,t,r,l){var c=e._fullLayout;if(0!==t.length){var u,d,f,h;l&&(u=l());var p=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},n=0;nr.duration?(!function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=o.simpleMap(t.xr0,i.r2l),m=o.simpleMap(t.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];h[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(p[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=c;if(f){var y=o.simpleMap(t.yr0,l.r2l),x=o.simpleMap(t.yr1,l.r2l),b=y[1]-y[0],w=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*w/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 h[1]=0,h[3]=u;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var _=d?c/h[2]:1,k=f?u/h[3]:1,S=d?h[0]:0,T=f?h[1]:0,M=d?h[0]/h[2]*c:0,C=f?h[1]/h[3]*u:0,A=i._offset-M,E=l._offset-C;n.clipRect.call(a.setTranslate,S,T).call(a.setScale,1/_,1/k),n.plot.call(a.setTranslate,A,E).call(a.setScale,_,k),a.setPointGroupScale(n.zoomScalePts,1/_,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/k)}s.redrawComponents(e)}},80035:(e,t,r)=>{"use strict";var n=r(44049).traceIs,i=r(36562);function o(e){return{v:"x",h:"y"}[e.orientation||"v"]}function a(e,t){var r=o(e),i=n(e,"box-violin"),a=n(e._fullInput||{},"candlestick");return i&&!a&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var r,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(e,t,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(!c)return;if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=l+"calendar",d=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0);if(f.autotypenumbers=e.autotypenumbers,a(c,l)){var h=o(c),p=[];for(r=0;r{"use strict";var n=r(44049),i=r(53787);function o(e,t,r){var n,o,a,s=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return o=i.nestedProperty(n,t.prop).get(),(a=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&a[t.prop]!==o&&(s=!0),a[t.prop]=o,{changed:s,value:o}}function a(e,t){var r=[],n=t[0],o={};if("string"===typeof n)o[n]=t[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function s(e,t){var r,n,o,a,s=[];if(n=t[0],o=t[1],r=t[2],a={},"string"===typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(t,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,e.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,t,s,n+1):t(s,o,a)}}))}t.manageCommandObserver=function(e,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(e,c,s.cache),s.check=function(){if(l){var t=o(e,c,s.cache);return t.changed&&a&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(a({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d{"use strict";var n=r(10191).extendFlat;t.Y=function(e,t){t=t||{};var r={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",o=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:e.editType};return e.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:e.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:e.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},t.c=function(e,t,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=t.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";e.exports=function(e){var t=e.editType,r=e.colorEditType;void 0===r&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t,description:""+(e.description||"")};return e.autoSize&&(n.size.dflt="auto"),e.autoColor&&(n.color.dflt="auto"),e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},1563:e=>{"use strict";e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},14338:(e,t)=>{"use strict";t.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","equal earth":"equalEarth",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"},t.axesNames=["lonaxis","lataxis"],t.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},t.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},t.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]}},t.clipPad=.001,t.precision=.1,t.landColor="#F0DC82",t.waterColor="#3399FF",t.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},t.sphereSVG={type:"Sphere"},t.fillLayers={ocean:1,land:1,lakes:1},t.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},t.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],t.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],t.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},71341:(e,t,r)=>{"use strict";var n=r(8996),i=r(9497),o=i.geoPath,a=i.geoDistance,s=r(25715),l=r(44049),c=r(53787),u=c.strTranslate,d=r(66235),f=r(50973),h=r(76719),p=r(44115),m=r(28605),g=r(10351).getAutoRange,v=r(63e3),y=r(26002).prepSelect,x=r(26002).clearOutline,b=r(26002).selectOnClick,w=r(56008),_=r(14338),k=r(426),S=r(58268),T=r(40506).zL;function M(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.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 C=M.prototype;function A(e,t){var r=_.clipPad,n=e[0]+r,i=e[1]-r,o=t[0]+r,a=t[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,o],[n,a],[n+s,a],[n+2*s,a],[n+3*s,a],[i,a],[i,o],[i-s,o],[i-2*s,o],[i-3*s,o],[n,o]]]}}e.exports=function(e){return new M(e)},C.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var o=t[this.id],a=[],s=!1;for(var l in _.layerNameToAdjective)if("frame"!==l&&o["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&a._module.calcGeoJSON(o,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,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()},C.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],l=t._size,u=n.domain,d=n.projection,f=n.lonaxis,h=n.lataxis,p=f._ax,m=h._ax,v=this.projection=function(e){var t=e.projection,r=t.type,n=_.projNames[r];n="geo"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?_.lonaxisSpan[r]/2:null,d=["center","rotate","parallels","clipExtent"],f=function(e){return e?l:[]},h=0;hu*Math.PI/180}return!1},l.getPath=function(){return o().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(_.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance);u&&l.clipAngle(u-_.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=d.rotation||{},w=f.range||[],k=h.range||[];if(n.fitbounds){p._length=y[1][0]-y[0][0],m._length=y[1][1]-y[0][1],p.range=g(r,p),m.range=g(r,m);var S=(p.range[0]+p.range[1])/2,T=(m.range[0]+m.range[1])/2;if(n._isScoped)x={lon:S,lat:T};else if(n._isClipped){x={lon:S,lat:T},b={lon:S,lat:T,roll:b.roll};var M=d.type,C=_.lonaxisSpan[M]/2||180,E=_.lataxisSpan[M]/2||90;w=[S-C,S+C],k=[T-E,T+E]}else x={lon:S,lat:T},b={lon:S,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(d.parallels);var I=A(w,k);v.fitExtent(y,I);var O=this.bounds=v.getBounds(I),P=this.fitScale=v.scale(),R=v.translate();if(n.fitbounds){var L=v.getBounds(A(p.range,m.range)),j=Math.min((O[1][0]-O[0][0])/(L[1][0]-L[0][0]),(O[1][1]-O[0][1])/(L[1][1]-L[0][1]));isFinite(j)?v.scale(j*P):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(d.scale*P);var D=this.midPt=[(O[0][0]+O[1][0])/2,(O[0][1]+O[1][1])/2];if(v.translate([R[0]+(D[0]-R[0]),R[1]+(D[1]-R[1])]).clipExtent(O),n._isAlbersUsa){var z=v([x.lon,x.lat]),N=v.translate();v.translate([N[0]-(z[0]-N[0]),N[1]-(z[1]-N[1])])}},C.updateBaseLayers=function(e,t){var r=this,i=r.topojson,o=r.layers,a=r.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(_.lineLayers[e])}function c(e){return Boolean(_.fillLayers[e])}var u=(this.hasChoropleth?_.layersForChoropleth:_.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),h=r.framework.selectAll(".layer").data(u,String);h.exit().each((function(e){delete o[e],delete a[e],n.select(this).remove()})),h.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=o[e]=n.select(this);"bg"===e?r.bgRect=t.append("rect").style("pointer-events","all"):s(e)?a[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?a[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(a[e]=t.append("path").style("stroke","none"))})),h.order(),h.each((function(r){var n=a[r],o=_.layerNameToAdjective[r];"frame"===r?n.datum(_.sphereSVG):l(r)||c(r)?n.datum(T(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,o,a=1e-6,s=2.5,l=t[e],c=_.scopeDefaults[t.scope];"lonaxis"===e?(n=c.lonaxisRange,i=c.lataxisRange,o=function(e,t){return[e,t]}):"lataxis"===e&&(n=c.lataxisRange,i=c.lonaxisRange,o=function(e,t){return[t,e]});var u={type:"linear",range:[n[0],n[1]-a],tick0:l.tick0,dtick:l.dtick};m.setConvert(u,r);var d=m.calcTicks(u);t.isScoped||"lonaxis"!==e||d.pop();for(var f=d.length,h=new Array(f),p=0;p-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,u),s.indexOf("event")>-1&&h.click(i,n.event))}))}function d(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},C.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(f.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m.setConvert(e.mockAxis,r)},C.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,t)},C.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},C._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?u(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}},33857:(e,t,r)=>{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(71341),a="geo",s=i(a),l={};l[a]={valType:"subplotid",dflt:a,editType:"calc",description:["Sets a reference between this trace's geospatial coordinates and","a geographic map.","If *geo* (the default value), the geospatial coordinates refer to","`layout.geo`.","If *geo2*, the geospatial coordinates refer to `layout.geo2`,","and so on."].join(" ")},e.exports={attr:a,name:a,idRoot:a,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(41346),supplyLayoutDefaults:r(85559),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[a],s=0;s{"use strict";var n=r(18022),i=r(29707).Y,o=r(93701).P,a=r(14338),s=r(18693).overrideAll,l=r(99238),c={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["Sets the range of this axis (in degrees),","sets the map's clipped coordinates."].join(" ")},showgrid:{valType:"boolean",dflt:!1,description:"Sets whether or not graticule are shown on the map."},tick0:{valType:"number",dflt:0,description:["Sets the graticule's starting tick longitude/latitude."].join(" ")},dtick:{valType:"number",description:["Sets the graticule's longitude/latitude tick step."].join(" ")},gridcolor:{valType:"color",dflt:n.lightLine,description:["Sets the graticule's stroke color."].join(" ")},gridwidth:{valType:"number",min:0,dflt:1,description:["Sets the graticule's stroke width (in px)."].join(" ")},griddash:o};(e.exports=s({domain:i({name:"geo"},{description:["Note that geo subplots are constrained by domain.","In general, when `projection.scale` is set to 1.","a map will fit either its x or y domain, but not both."].join(" ")}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot",description:["Determines if this subplot's view settings are auto-computed to fit trace data.","On scoped maps, setting `fitbounds` leads to `center.lon` and `center.lat` getting auto-filled.","On maps with a non-clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","and `projection.rotation.lon` getting auto-filled.","On maps with a clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","`projection.rotation.lon`, `projection.rotation.lat`, `lonaxis.range` and `lonaxis.range`","getting auto-filled.","If *locations*, only the trace's visible locations are considered in the `fitbounds` computations.","If *geojson*, the entire trace input `geojson` (if provided) is considered in the `fitbounds` computations,","Defaults to *false*."].join(" ")},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0,description:["Sets the resolution of the base layers.","The values have units of km/mm","e.g. 110 corresponds to a scale ratio of 1:110,000,000."].join(" ")},scope:{valType:"enumerated",values:l(a.scopeDefaults),dflt:"world",description:"Set the scope of the map."},projection:{type:{valType:"enumerated",values:l(a.projNames),description:"Sets the projection type."},rotation:{lon:{valType:"number",description:["Rotates the map along parallels","(in degrees East).","Defaults to the center of the `lonaxis.range` values."].join(" ")},lat:{valType:"number",description:["Rotates the map along meridians","(in degrees North)."].join(" ")},roll:{valType:"number",description:["Roll the map (in degrees)","For example, a roll of *180* makes the map appear upside down."].join(" ")}},tilt:{valType:"number",dflt:0,description:["For satellite projection type only.","Sets the tilt angle of perspective projection."].join(" ")},distance:{valType:"number",min:1.001,dflt:2,description:["For satellite projection type only.","Sets the distance from the center of the sphere to the point of view","as a proportion of the sphere\u2019s radius."].join(" ")},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["For conic projection types only.","Sets the parallels (tangent, secant)","where the cone intersects the sphere."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Zooms in or out on the map view.","A scale of *1* corresponds to the largest zoom level","that fits the map's lon and lat ranges. "].join(" ")}},center:{lon:{valType:"number",description:["Sets the longitude of the map's center.","By default, the map's longitude center lies at the middle of the longitude range","for scoped projection and above `projection.rotation.lon` otherwise."].join(" ")},lat:{valType:"number",description:["Sets the latitude of the map's center.","For all projection types, the map's latitude center lies","at the middle of the latitude range by default."].join(" ")}},visible:{valType:"boolean",dflt:!0,description:"Sets the default visibility of the base layers."},showcoastlines:{valType:"boolean",description:"Sets whether or not the coastlines are drawn."},coastlinecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the coastline color."},coastlinewidth:{valType:"number",min:0,dflt:1,description:"Sets the coastline stroke width (in px)."},showland:{valType:"boolean",dflt:!1,description:"Sets whether or not land masses are filled in color."},landcolor:{valType:"color",dflt:a.landColor,description:"Sets the land mass color."},showocean:{valType:"boolean",dflt:!1,description:"Sets whether or not oceans are filled in color."},oceancolor:{valType:"color",dflt:a.waterColor,description:"Sets the ocean color"},showlakes:{valType:"boolean",dflt:!1,description:"Sets whether or not lakes are drawn."},lakecolor:{valType:"color",dflt:a.waterColor,description:"Sets the color of the lakes."},showrivers:{valType:"boolean",dflt:!1,description:"Sets whether or not rivers are drawn."},rivercolor:{valType:"color",dflt:a.waterColor,description:"Sets color of the rivers."},riverwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the rivers."},showcountries:{valType:"boolean",description:"Sets whether or not country boundaries are drawn."},countrycolor:{valType:"color",dflt:n.defaultLine,description:"Sets line color of the country boundaries."},countrywidth:{valType:"number",min:0,dflt:1,description:"Sets line width (in px) of the country boundaries."},showsubunits:{valType:"boolean",description:["Sets whether or not boundaries of subunits within countries","(e.g. states, provinces) are drawn."].join(" ")},subunitcolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the subunits boundaries."},subunitwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the subunits boundaries."},showframe:{valType:"boolean",description:"Sets whether or not a frame is drawn around the map."},framecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color the frame."},framewidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the frame."},bgcolor:{valType:"color",dflt:n.background,description:"Set the background color of the map"},lonaxis:c,lataxis:c},"plot","from-root")).uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view","(projection and center). Defaults to `layout.uirevision`."].join(" ")}},85559:(e,t,r)=>{"use strict";var n=r(53787),i=r(38020),o=r(38213).NG,a=r(14338),s=r(41346),l=a.axesNames;function c(e,t,r,i){var s=o(i.fullData,"geo",i.id).map((function(e){return e._expandedIndex})),c=r("resolution"),u=r("scope"),d=a.scopeDefaults[u],f=r("projection.type",d.projType),h=t._isAlbersUsa="albers usa"===f;h&&(u=t.scope="usa");var p=t._isScoped="world"!==u,m=t._isSatellite="satellite"===f,g=t._isConic=-1!==f.indexOf("conic")||"albers"===f,v=t._isClipped=!!a.lonaxisSpan[f];if(!1===e.visible){var y=n.extendDeep({},t._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),t._template=y}for(var x=r("visible"),b=0;b0&&O<0&&(O+=360);var P,R,L,j=(I+O)/2;if(!h){var D=p?d.projRotate:[j,0,0];P=r("projection.rotation.lon",D[0]),r("projection.rotation.lat",D[1]),r("projection.rotation.roll",D[2]),r("showcoastlines",!p&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}(h?(R=-96.6,L=38.7):(R=p?j:P,L=(E[0]+E[1])/2),r("center.lon",R),r("center.lat",L),m&&(r("projection.tilt"),r("projection.distance")),g)&&r("projection.parallels",d.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",p&&"usa"!==u&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),p||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete t.projection.scale,p?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}e.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},56008:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(44049),a=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function d(e,t,r){var n=e.id,a=e.graphDiv,s=a.layout,l=s[n],c=a._fullLayout,u=c[n],d={},f={};function h(e,t){d[n+"."+e]=i.nestedProperty(l,e).get(),o.call("_storeDirectGUIEdit",s,c._preGUI,d);var r=i.nestedProperty(u,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),f[n+"."+e]=t)}r(h),h("projection.scale",t.scale()/e.fitScale),h("fitbounds",!1),a.emit("plotly_relayout",f)}function f(e,t){var r=u(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render(!0);var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),d(e,t,i)})),r}function h(e,t){var r,i,o,a,s,f,h,p,m,g=u(0,t),v=2;function y(e){return t.invert(e)}function x(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=t.rotate(),o=t.translate(),a=i,s=y(r)})).on("zoom",(function(){if(f=n.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>v||Math.abs(n[1]-e[1])>v}(r))return g.scale(t.scale()),void g.translate(t.translate());t.scale(n.event.scale),t.translate([o[0],n.event.translate[1]]),s?y(f)&&(p=y(f),h=[a[0]+(p[0]-s[0]),i[1],i[2]],t.rotate(h),a=h):s=y(r=f),m=!0,e.render(!0);var l=t.rotate(),c=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),m&&d(e,t,x)})),g}function p(e,t){var r,i={r:t.rotate(),k:t.scale()},o=u(0,t),f=function(e){var t=0,r=arguments.length,i=[];for(;++tp?(o=(d>0?90:-90)-h,i=0):(o=Math.asin(d/p)*s-h,i=Math.sqrt(p*p-d*d));var m=180-o-2*h,v=(Math.atan2(f,u)-Math.atan2(c,i))*s,x=(Math.atan2(f,u)-Math.atan2(c,-i))*s,b=g(r[0],r[1],o,v),w=g(r[0],r[1],m,x);return b<=w?[o,v,r[2]]:[m,x,r[2]]}(l,r,d);isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])||(h=d),t.rotate(h),d=h}}else r=m(t,c=e);f.of(this,arguments)({type:"zoom"})})),e=f.of(this,arguments),h++||e({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(c),p.call(o,"zoom",null),r=f.of(this,arguments),--h||r({type:"zoomend"}),d(e,t,v)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(o,f,"on")}function m(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*a,r=e[1]*a,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function g(e,t,r,n){var i=v(r-e),o=v(n-t);return Math.sqrt(i*i+o*o)}function v(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*a,i=e.slice(),o=0===t?1:0,s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function x(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var n=r(44049),i=r(99727).SUBPLOT_PATTERN;t.AU=function(e,t,r){var i=n.subplotsRegistry[t];if(!i)return[];for(var o=i.attr,a=[],s=0;s{"use strict";var n=r(53420),i=r(90409),o=r(49175),a=r(99727),s=r(32954);function l(e,t){this.element=e,this.plot=t,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(e){var t=e.mouseContainer,r=e.glplot,c=new l(t,r);function u(){e.xaxis.autorange=!1,e.yaxis.autorange=!1}function d(t,n,i){var o,s,l=e.calcDataBox(),d=r.viewBox,f=c.lastPos[0],h=c.lastPos[1],p=a.MINDRAG*r.pixelRatio,m=a.MINZOOM*r.pixelRatio;function g(t,r,n){var i=Math.min(r,n),o=Math.max(r,n);i!==o?(l[t]=i,l[t+2]=o,c.dataBox=l,e.setRanges(l)):(e.selectBox.selectBox=[0,0,1,1],e.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=d[3]-d[1]-i,e.fullLayout.dragmode){case"zoom":if(t){var v=n/(d[2]-d[0])*(l[2]-l[0])+l[0],y=i/(d[3]-d[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(o)*w*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(w))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/w*(o>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(w)))}}else c.boxEnabled?(o=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],o||s?(o&&(g(0,c.boxStart[0],c.boxEnd[0]),e.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,t?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n){"use strict";var n=r(28605),i=r(55115);function o(e){this.scene=e,this.gl=e.gl,this.pixelRatio=e.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 a=o.prototype,s=["xaxis","yaxis"];a.merge=function(e){var t,r,n,o,a,l,c,u,d,f,h;for(this.titleEnable=!1,this.backgroundColor=i(e.plot_bgcolor),f=0;f<2;++f){var p=(t=s[f]).charAt(0);for(n=(r=e[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[p]?"":r.title.text,h=0;h<=2;h+=2)this.labelEnable[f+h]=!1,this.labels[f+h]=n,this.labelColor[f+h]=i(r.title.font.color),this.labelFont[f+h]=r.title.font.family,this.labelSize[f+h]=r.title.font.size,this.labelPad[f+h]=this.getLabelPad(t,r),this.tickEnable[f+h]=!1,this.tickColor[f+h]=i((r.tickfont||{}).color),this.tickAngle[f+h]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[f+h]=this.getTickPad(r),this.tickMarkLength[f+h]=0,this.tickMarkWidth[f+h]=r.tickwidth||0,this.tickMarkColor[f+h]=i(r.tickcolor),this.borderLineEnable[f+h]=!1,this.borderLineColor[f+h]=i(r.linecolor),this.borderLineWidth[f+h]=r.linewidth||0;c=this.hasSharedAxis(r),a=this.hasAxisInDfltPos(t,r)&&!c,l=this.hasAxisInAltrPos(t,r)&&!c,o=r.mirror||!1,u=c?-1!==String(o).indexOf("all"):!!o,d=c?"allticks"===o:-1!==String(o).indexOf("ticks"),a?this.labelEnable[f]=!0:l&&(this.labelEnable[f+2]=!0),a?this.tickEnable[f]=r.showticklabels:l&&(this.tickEnable[f+2]=r.showticklabels),(a||u)&&(this.borderLineEnable[f]=r.showline),(l||u)&&(this.borderLineEnable[f+2]=r.showline),(a||d)&&(this.tickMarkLength[f]=this.getTickMarkLength(r)),(l||d)&&(this.tickMarkLength[f+2]=this.getTickMarkLength(r)),this.gridLineEnable[f]=r.showgrid,this.gridLineColor[f]=i(r.gridcolor),this.gridLineWidth[f]=r.gridwidth,this.zeroLineEnable[f]=r.zeroline,this.zeroLineColor[f]=i(r.zerolinecolor),this.zeroLineWidth[f]=r.zerolinewidth}},a.hasSharedAxis=function(e){var t=this.scene,r=t.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,e).indexOf(t.id)},a.hasAxisInDfltPos=function(e,t){var r=t.side;return"xaxis"===e?"bottom"===r:"yaxis"===e?"left"===r:void 0},a.hasAxisInAltrPos=function(e,t){var r=t.side;return"xaxis"===e?"top"===r:"yaxis"===e?"right"===r:void 0},a.getLabelPad=function(e,t){var r=1.5,n=t.title.font.size,i=t.showticklabels;return"xaxis"===e?"top"===t.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:"yaxis"===e?"right"===t.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},a.getTickPad=function(e){return"outside"===e.ticks?10+e.ticklen:15},a.getTickMarkLength=function(e){if(!e.ticks)return 0;var t=e.ticklen;return"inside"===e.ticks?-t:t},e.exports=function(e){return new o(e)}},27952:(e,t,r)=>{"use strict";var n=r(18693).overrideAll,i=r(18345),o=r(79443),a=r(83580),s=r(99727),l=r(48206),c=r(18971),u=r(38213).NG;t.name="gl2d",t.attr=["xaxis","yaxis"],t.idRoot=["x","y"],t.idRegex=s.idRegex,t.attrRegex=s.attrRegex,t.attributes=r(68861),t.supplyLayoutDefaults=function(e,t,r){t._has("cartesian")||l.supplyLayoutDefaults(e,t,r)},t.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),t.baseLayoutAttrOverrides=n({plot_bgcolor:o.plot_bgcolor,hoverlabel:c.hoverlabel},"plot","nested"),t.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots.gl2d,o=0;o{"use strict";var n,i,o=r(44049),a=r(28605),s=r(76719),l=r(13084).gl_plot2d,c=r(13084).gl_spikes2d,u=r(13084).gl_select_box,d=r(6514),f=r(18394),h=r(63352),p=r(51708),m=r(14511),g=m.enforce,v=m.clean,y=r(10351).doAutoRange,x=r(57873),b=x.drawMode,w=x.selectMode,_=["xaxis","yaxis"],k=r(99727).SUBPLOT_PATTERN;function S(e,t){this.container=e.container,this.graphDiv=e.graphDiv,this.pixelRatio=e.plotGlPixelRatio||window.devicePixelRatio,this.id=e.id,this.staticPlot=!!e.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(t),this.makeFramework(),this.stopped||(this.glplotOptions=f(this),this.glplotOptions.merge(t),this.glplot=l(this.glplotOptions),this.camera=h(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(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=S;var T=S.prototype;T.makeFramework=function(){if(this.staticPlot){if(!i&&(n=document.createElement("canvas"),!(i=d({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 e=this.container.querySelector(".gl-canvas-focus"),t=d({canvas:e,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!t)return p(this),void(this.stopped=!0);this.canvas=e,this.gl=t}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 o=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");o.style.position="absolute",o.style.top=o.style.left="0px",o.style.width=o.style.height="100%",o.style["z-index"]=20,o.style["pointer-events"]="none";var a=this.mouseContainer=document.createElement("div");a.style.position="absolute",a.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(o),s.appendChild(a);var l=this;a.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),a.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},T.toImage=function(e){e||(e="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var t=this.glplot.gl,r=t.drawingBufferWidth,i=t.drawingBufferHeight;t.clearColor(1,1,1,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),t.bindFramebuffer(t.FRAMEBUFFER,null);var o=new Uint8Array(r*i*4);t.readPixels(0,0,r,i,t.RGBA,t.UNSIGNED_BYTE,o);for(var a=0,s=i-1;a{"use strict";var n=r(18693).overrideAll,i=r(18971),o=r(47133),a=r(38213).NG,s=r(53787),l=r(83580),c="gl3d",u="scene";t.name=c,t.attr=u,t.idRoot=u,t.idRegex=t.attrRegex=s.counterRegex("scene"),t.attributes=r(53050),t.layoutAttributes=r(50082),t.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),t.supplyLayoutDefaults=r(82046),t.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots[c],i=0;i{"use strict";e.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},49246:(e,t,r)=>{"use strict";var n=r(66235),i=r(45446),o=r(10191).extendFlat,a=r(18693).overrideAll;e.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.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,labelalias:i.labelalias,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:o({},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")},59958:(e,t,r)=>{"use strict";var n=r(25378).mix,i=r(53787),o=r(99862),a=r(49246),s=r(80035),l=r(90471),c=["xaxis","yaxis","zaxis"];e.exports=function(e,t,r){var u,d;function f(e,t){return i.coerce(u,d,a,e,t)}for(var h=0;h{"use strict";var n=r(55115),i=r(53787),o=["xaxis","yaxis","zaxis"];function a(){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()}a.prototype.merge=function(e,t){for(var r=this,a=0;a<3;++a){var s=t[o[a]];s.visible?(r.labels[a]=e._meta?i.templateString(s.title.text,e._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},e.exports=function(e,t){var r=new a;return r.merge(e,t),r}},82046:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(44049),a=r(38020),s=r(59958),l=r(50082),c=r(38213).NG,u="gl3d";function d(e,t,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),d=["up","center","eye"],f=0;f.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(e,t,r){var i=t._basePlotModules.length>1;a(e,t,r,{type:u,attributes:l,handleDefaults:d,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!i)return n.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},50082:(e,t,r)=>{"use strict";var n=r(49246),i=r(29707).Y,o=r(10191).extendFlat,a=r(53787).counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},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},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},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"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},13370:(e,t,r)=>{"use strict";var n=r(55115),i=["xaxis","yaxis","zaxis"];function o(){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]}o.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[i[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},e.exports=function(e){var t=new o;return t.merge(e),t}},14965:(e,t,r)=>{"use strict";e.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[o[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/e.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/e.dataScale[c],u.range[1]=r[c].hi/e.dataScale[c],u._m=1/(e.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var h=n.calcTicks(u,{msUTC:!0}),p=0;p/g," "));l[c]=h,u.tickmode=d}}t.ticks=l;for(c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),o=0;o{"use strict";function t(e,t){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=e[4*r+n]*t[r];return i}e.exports=function(e,r){return t(e.projection,t(e.view,t(e.model,[r[0],r[1],r[2],1])))}},47133:(e,t,r)=>{"use strict";var n,i,o=r(13084).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(6514),c=r(32954),u=r(44049),d=r(53787),f=d.preserveDrawingBuffer(),h=r(28605),p=r(76719),m=r(55115),g=r(51708),v=r(40564),y=r(28977),x=r(13370),b=r(14965),w=r(10351).applyAutorangeOptions,_=!1;function k(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.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=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(t,t[this.id]),this.spikeOptions=x(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var S=k.prototype;S.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:f,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.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");t.gl=i,t.canvas=n}return t};var T=!0;S.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=s(t)}catch(n){if(e.staticMode||!T||f)r=!1;else{d.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{f=t.glOptions.preserveDrawingBuffer=!0,e.glplot=s(t)}catch(n){f=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return T=!1,r},S.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r="orthographic"===t.projection.type;e.camera=a(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},S.initializeGLPlot=function(){var e=this;if(e.initializeGLCamera(),!e.tryCreatePlot())return g(e);e.traces={},e.make4thDimension();var t=e.graphDiv,r=t.layout,n=function(){var t={};return e.isCameraChanged(r)&&(t[e.id+".camera"]=e.getCamera()),e.isAspectChanged(r)&&(t[e.id+".aspectratio"]=e.glplot.getAspectratio(),"manual"!==r[e.id].aspectmode&&(e.fullSceneLayout.aspectmode=r[e.id].aspectmode=t[e.id+".aspectmode"]="manual")),t},i=function(e){if(!1!==e.fullSceneLayout.dragmode){var t=n();e.saveLayout(r),e.graphDiv.emit("plotly_relayout",t)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",(function(){i(e)})),e.glplot.canvas.addEventListener("touchstart",(function(){_=!0})),e.glplot.canvas.addEventListener("wheel",(function(r){if(t._context._scrollZoom.gl3d){if(e.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(e)}}),!!c&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},S.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),u=null,f=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(S.valueLabel=h.hoverLabelText(t._mockAxis,t._mockAxis.d2l(f.traceCoordinate[3]),e.valuehoverformat),A.push("value: "+S.valueLabel),f.textLabel&&A.push(f.textLabel),x=A.join("
")):x=f.textLabel;var E={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:k};p.appendArrayPointValue(E,w,k),e._module.eventData&&(E=w._module.eventData(E,f,w,{},k));var I={points:[E]};if(t.fullSceneLayout.hovermode){var O=[];p.loneHover({trace:w,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:S.xLabel,yLabel:S.yLabel,zLabel:S.zLabel,text:x,name:u.name,color:p.castHoverOption(w,k,"bgcolor")||u.color,borderColor:p.castHoverOption(w,k,"bordercolor"),fontFamily:p.castHoverOption(w,k,"font.family"),fontSize:p.castHoverOption(w,k,"font.size"),fontColor:p.castHoverOption(w,k,"font.color"),nameLength:p.castHoverOption(w,k,"namelength"),textAlign:p.castHoverOption(w,k,"align"),hovertemplate:d.castOption(w,k,"hovertemplate"),hovertemplateLabels:d.extendFlat({},E,S),eventData:[E]},{container:n,gd:r,inOut_bbox:O}),E.bbox=O[0]}f.distance<5&&(f.buttons||_)?r.emit("plotly_click",I):r.emit("plotly_hover",I),this.oldEventData=I}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},S.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):d.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var M=["xaxis","yaxis","zaxis"];function C(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var o=M[i],a=o.charAt(0),s=n[o],l=t[a],c=t[a+"calendar"],u=t["_"+a+"length"];if(d.isArrayOrTypedArray(l))for(var f,h=0;h<(u||l.length);h++)if(d.isArrayOrTypedArray(l[h]))for(var p=0;pv[1][a])v[0][a]=-1,v[1][a]=1;else{var P=v[1][a]-v[0][a];v[0][a]-=P/32,v[1][a]+=P/32}if(b=[v[0][a],v[1][a]],b=w(b,l),v[0][a]=b[0],v[1][a]=b[1],l.isReversed()){var R=v[0][a];v[0][a]=v[1][a],v[1][a]=R}}else b=l.range,v[0][a]=l.r2l(b[0]),v[1][a]=l.r2l(b[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),y[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*h[a],max:l.range[1]*h[a]})}var L=u.aspectmode;if("cube"===L)g=[1,1,1];else if("manual"===L){var j=u.aspectratio;g=[j.x,j.y,j.z]}else{if("auto"!==L&&"data"!==L)throw new Error("scene.js aspectRatio was not one of the enumerated types");var D=[1,1,1];for(a=0;a<3;++a){var z=x[c=(l=u[M[a]]).type];D[a]=Math.pow(z.acc,1/z.count)/h[a]}g="data"===L||Math.max.apply(null,D)/Math.min.apply(null,D)<=4?D:[1,1,1]}u.aspectratio.x=d.aspectratio.x=g[0],u.aspectratio.y=d.aspectratio.y=g[1],u.aspectratio.z=d.aspectratio.z=g[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var N=u.domain||null,F=t._size||null;if(N&&F){var B=n.container.style;B.position="absolute",B.left=F.l+N.x[0]*F.w+"px",B.top=F.t+(1-N.y[1])*F.h+"px",B.width=F.w*(N.x[1]-N.x[0])+"px",B.height=F.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}},S.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},S.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},S.setViewport=function(e){var t,r=this,n=e.camera;r.camera.lookAt.apply(this,[[(t=n).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),r.glplot.setAspectratio(e.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},S.isCameraChanged=function(e){var t=this.getCamera(),r=d.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var i=["up","center","eye"],o=["x","y","z"];return t[i[r]]&&e[i[r]][o[n]]===t[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(t,r,o,a)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},S.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=d.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},S.saveLayout=function(e){var t,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(e),f=s.isAspectChanged(e),h=c||f;if(h){var p={};if(c&&(t=s.getCamera(),n=(r=d.nestedProperty(e,s.id+".camera")).get(),p[s.id+".camera"]=n),f&&(i=s.glplot.getAspectratio(),a=(o=d.nestedProperty(e,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),u.call("_storeDirectGUIEdit",e,l._preGUI,p),c)r.set(t),d.nestedProperty(l,s.id+".camera").set(t);if(f)o.set(i),d.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw()}return h},S.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var f=r.id+".camera.up",h={x:0,y:0,z:1},p={};p[f]=h;var m=i.layout;u.call("_storeDirectGUIEdit",m,o._preGUI,p),a.up=h,d.nestedProperty(m,f).set(h)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},S.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(n),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)e[o+l]=Math.min(s*e[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,o);switch(u.data.set(a),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(n),l},S.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[M[e]];h.setConvert(t,this.fullLayout),t.setScale=d.noop}},S.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(e._mockAxis,t)},e.exports=k},51577:e=>{"use strict";e.exports=function(e,t,r,n){n=n||e.length;for(var i=new Array(n),o=0;o{"use strict";var n=r(92948),i=r(83672),o=r(18022),a=r(99977),s=r(32438),l=r(84958),c=r(10191).extendFlat,u=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=o.defaultLine,e.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn\u2019t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn\u2019t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},93845:(e,t,r)=>{"use strict";var n=r(99238),i="1.10.1",o='\xa9 OpenStreetMap contributors',a=['\xa9 Carto',o].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},c=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:c,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@"+i+"."].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:",c.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\')'}}},31387:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){var r=e.split(" "),i=r[0],o=r[1],a=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+a/100,l=1.5+a/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(o){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},7428:(e,t,r)=>{"use strict";var n=r(74055),i=r(53787),o=i.strTranslate,a=i.strScale,s=r(38213).AU,l=r(83580),c=r(8996),u=r(50973),d=r(98224),f=r(14005),h="mapbox",p=t.constants=r(93845);function m(e){return"string"===typeof e&&(-1!==p.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://")||0===e.indexOf("stamen"))}t.name=h,t.attr="subplot",t.idRoot=h,t.idRegex=t.attrRegex=i.counterRegex(h),t.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc",description:["Sets a reference between this trace's data coordinates and","a mapbox subplot.","If *mapbox* (the default value), the data refer to `layout.mapbox`.","If *mapbox2*, the data refer to `layout.mapbox2`, and so on."].join(" ")}},t.layoutAttributes=r(85675),t.supplyLayoutDefaults=r(68690),t.plot=function(e){var t=e._fullLayout,r=e.calcdata,o=t._subplots[h];if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var a=function(e,t){var r=e._fullLayout,n=e._context;if(""===n.mapboxAccessToken)return"";for(var o=[],a=[],s=!1,l=!1,c=0;c1&&i.warn(p.multipleTokensErrorMsg),o[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);n.accessToken=a;for(var l=0;l_/2){var k=y.split("|").join("
");b.text(k).attr("data-unformatted",k).call(d.convertToTspans,e),w=u.bBox(b.node())}b.attr("transform",o(-3,8-w.height)),x.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;w.width+6>_&&(S=_/(w.width+6));var T=[n.l+n.w*f.x[1],n.t+n.h*(1-f.y[0])];x.attr("transform",o(T[0],T[1])+a(S))}},t.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[h],n=0;n{"use strict";var n=r(53787),i=r(98224).sanitizeHTML,o=r(31387),a=r(93845);function s(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function c(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r0}function u(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,a=o(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:r}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=c(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,c(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,o={type:r};"geojson"===r?t="data":"vector"===r?t="string"===typeof n?"url":"tiles":"raster"===r?(t="tiles",o.tileSize=256):"image"===r&&(t="url",o.coordinates=e.coordinates);o[t]=n,e.sourceattribution&&(o.attribution=i(e.sourceattribution));return o}(e);t.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r{"use strict";var n=r(53787),i=r(66235).defaultLine,o=r(29707).Y,a=r(92948),s=r(37471).textposition,l=r(18693).overrideAll,c=r(99862).templatedArray,u=r(93845),d=a({description:["Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).","Has an effect only when `type` is set to *symbol*."].join(" ")});d.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(e.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:o({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0,description:["Sets the mapbox access token to be used for this mapbox map.","Alternatively, the mapbox access token can be set in the","configuration options under `mapboxAccessToken`.","Note that accessToken are only required when `style`","(e.g with values :",u.styleValuesMapbox.join(", "),")","and/or a layout layer references the Mapbox server."].join(" ")},style:{valType:"any",values:u.styleValuesMapbox.concat(u.styleValuesNonMapbox),dflt:u.styleValueDflt,description:["Defines the map layers that are rendered by default below the trace layers defined in `data`,","which are themselves by default rendered below the layers defined in `layout.mapbox.layers`.","","These layers can be defined either explicitly as a Mapbox Style object which can contain multiple","layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS)","or implicitly by using one of the built-in style objects which use WMSes which do not require any","access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of","which require a Mapbox access token","","Note that Mapbox access token can be set in the `accesstoken` attribute","or in the `mapboxAccessToken` config option.","","Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at","https://docs.mapbox.com/mapbox-gl-js/style-spec","","The built-in plotly.js styles objects are:",u.styleValuesNonMapbox.join(", "),"","The built-in Mapbox styles are:",u.styleValuesMapbox.join(", "),"","Mapbox style URLs are of the form: mapbox://mapbox.mapbox--"].join(" ")},center:{lon:{valType:"number",dflt:0,description:"Sets the longitude of the center of the map (in degrees East)."},lat:{valType:"number",dflt:0,description:"Sets the latitude of the center of the map (in degrees North)."}},zoom:{valType:"number",dflt:1,description:"Sets the zoom level of the map (mapbox.zoom)."},bearing:{valType:"number",dflt:0,description:"Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing)."},pitch:{valType:"number",dflt:0,description:["Sets the pitch angle of the map","(in degrees, where *0* means perpendicular to the surface of the map) (mapbox.pitch)."].join(" ")},bounds:{west:{valType:"number",description:["Sets the minimum longitude of the map (in degrees East)","if `east`, `south` and `north` are declared."].join(" ")},east:{valType:"number",description:["Sets the maximum longitude of the map (in degrees East)","if `west`, `south` and `north` are declared."].join(" ")},south:{valType:"number",description:["Sets the minimum latitude of the map (in degrees North)","if `east`, `west` and `north` are declared."].join(" ")},north:{valType:"number",description:["Sets the maximum latitude of the map (in degrees North)","if `east`, `west` and `south` are declared."].join(" ")}},layers:c("layer",{visible:{valType:"boolean",dflt:!0,description:["Determines whether this layer is displayed"].join(" ")},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson",description:["Sets the source type for this layer,","that is the type of the layer data."].join(" ")},source:{valType:"any",description:["Sets the source data for this layer (mapbox.layer.source).","When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON","or a GeoJSON object.","When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or","an array of tile URLs.","When `sourcetype` is set to *image*, `source` can be a URL to an image."].join(" ")},sourcelayer:{valType:"string",dflt:"",description:["Specifies the layer to use from a vector tile source (mapbox.layer.source-layer).","Required for *vector* source type that supports multiple layers."].join(" ")},sourceattribution:{valType:"string",description:["Sets the attribution for this source."].join(" ")},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle",description:["Sets the layer type,","that is the how the layer data set in `source` will be rendered","With `sourcetype` set to *geojson*, the following values are allowed:","*circle*, *line*, *fill* and *symbol*.","but note that *line* and *fill* are not compatible with Point","GeoJSON geometries.","With `sourcetype` set to *vector*, the following values are allowed:"," *circle*, *line*, *fill* and *symbol*.","With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed."].join(" ")},coordinates:{valType:"any",description:["Sets the coordinates array contains [longitude, latitude] pairs","for the image corners listed in clockwise order:","top left, top right, bottom right, bottom left.","Only has an effect for *image* `sourcetype`."].join(" ")},below:{valType:"string",description:["Determines if the layer will be inserted","before the layer with the specified ID.","If omitted or set to '',","the layer will be inserted above every existing layer."].join(" ")},color:{valType:"color",dflt:i,description:["Sets the primary layer color.","If `type` is *circle*, color corresponds to the circle color (mapbox.layer.paint.circle-color)","If `type` is *line*, color corresponds to the line color (mapbox.layer.paint.line-color)","If `type` is *fill*, color corresponds to the fill color (mapbox.layer.paint.fill-color)","If `type` is *symbol*, color corresponds to the icon color (mapbox.layer.paint.icon-color)"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:["Sets the opacity of the layer.","If `type` is *circle*, opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity)","If `type` is *line*, opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity)","If `type` is *fill*, opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity)","If `type` is *symbol*, opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity)"].join(" ")},minzoom:{valType:"number",min:0,max:24,dflt:0,description:["Sets the minimum zoom level (mapbox.layer.minzoom).","At zoom levels less than the minzoom, the layer will be hidden."].join(" ")},maxzoom:{valType:"number",min:0,max:24,dflt:24,description:["Sets the maximum zoom level (mapbox.layer.maxzoom).","At zoom levels equal to or greater than the maxzoom, the layer will be hidden."].join(" ")},circle:{radius:{valType:"number",dflt:15,description:["Sets the circle radius (mapbox.layer.paint.circle-radius).","Has an effect only when `type` is set to *circle*."].join(" ")}},line:{width:{valType:"number",dflt:2,description:["Sets the line width (mapbox.layer.paint.line-width).","Has an effect only when `type` is set to *line*."].join(" ")},dash:{valType:"data_array",description:["Sets the length of dashes and gaps (mapbox.layer.paint.line-dasharray).","Has an effect only when `type` is set to *line*."].join(" ")}},fill:{outlinecolor:{valType:"color",dflt:i,description:["Sets the fill outline color (mapbox.layer.paint.fill-outline-color).","Has an effect only when `type` is set to *fill*."].join(" ")}},symbol:{icon:{valType:"string",dflt:"marker",description:["Sets the symbol icon image (mapbox.layer.layout.icon-image).","Full list: https://www.mapbox.com/maki-icons/"].join(" ")},iconsize:{valType:"number",dflt:10,description:["Sets the symbol icon size (mapbox.layer.layout.icon-size).","Has an effect only when `type` is set to *symbol*."].join(" ")},text:{valType:"string",dflt:"",description:["Sets the symbol text (mapbox.layer.layout.text-field)."].join(" ")},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point",description:["Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).","If `placement` is *point*, the label is placed where the geometry is located","If `placement` is *line*, the label is placed along the line of the geometry","If `placement` is *line-center*, the label is placed on the center of the geometry"].join(" ")},textfont:d,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view:","`center`, `zoom`, `bearing`, `pitch`. Defaults to `layout.uirevision`."].join(" ")}},68690:(e,t,r)=>{"use strict";var n=r(53787),i=r(38020),o=r(80254),a=r(85675);function s(e,t,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"),a=r("bounds.east"),s=r("bounds.south"),c=r("bounds.north");void 0!==i&&void 0!==a&&void 0!==s&&void 0!==c||delete t.bounds,o(e,t,{name:"layers",handleItemDefaults:l}),t._input=e}function l(e,t){function r(r,i){return n.coerce(e,t,a.layers,r,i)}if(r("visible")){var i,o=r("sourcetype"),s="raster"===o||"image"===o;r("source"),r("sourceattribution"),"vector"===o&&r("sourcelayer"),"image"===o&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=t.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(e,t,r){i(e,t,r,{type:"mapbox",attributes:a,handleDefaults:s,partition:"y",accessToken:t._mapboxAccessToken})}},14005:(e,t,r)=>{"use strict";var n=r(74055),i=r(53787),o=r(426),a=r(44049),s=r(28605),l=r(63e3),c=r(76719),u=r(57873),d=u.drawMode,f=u.selectMode,h=r(26002).prepSelect,p=r(26002).clearOutline,m=r(26002).clearSelectionsCache,g=r(26002).selectOnClick,v=r(93845),y=r(12239);function x(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._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(e,t,r){var n,i=this,o=t[i.id];i.map&&o.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(e,t,r,n)})):new Promise((function(r,n){i.createMap(e,t,r,n)})),r.push(n)},b.createMap=function(e,t,r,i){var a=this,s=t[a.id],l=a.styleObj=_(s.style,t);a.accessToken=s.accesstoken;var c=s.bounds,u=c?[[c.west,c.south],[c.east,c.north]]:null,d=a.map=new n.Map({container:a.div,style:l.style,center:S(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:u,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));d._canvas.style.left="0px",d._canvas.style.top="0px",a.rejectOnError(i),a.isStatic||a.initFx(e,t);var f=[];f.push(new Promise((function(e){d.once("load",e)}))),f=f.concat(o.fetchTraceGeoData(e)),Promise.all(f).then((function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)})).catch(i)},b.updateMap=function(e,t,r,n){var i=this,a=i.map,s=t[this.id];i.rejectOnError(n);var l=[],c=_(s.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(c)&&(i.styleObj=c,a.setStyle(c.style),i.traceHash={},l.push(new Promise((function(e){a.once("styledata",e)})))),l=l.concat(o.fetchTraceGeoData(e)),Promise.all(l).then((function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)})).catch(n)},b.fillBelowLookup=function(e,t){var r,n,i=t[this.id].layers,o=this.belowLookup={},a=!1;for(r=0;r1)for(r=0;r-1&&g(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&c.click(n,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var o,a=e.dragmode;o=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),f(a)||d(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){h(e,r,n,t.dragOptions,a)},l.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t{"use strict";e.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the left side of the component."},editType:t}}},44115:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).Dq,o=r(95601).FF,a=r(51908),s=r(44049),l=r(94043),c=r(99862),u=r(53787),d=r(66235),f=r(24956).BADNUM,h=r(24279),p=r(94512).clearOutline,m=r(61070),g=r(83672),v=r(1563),y=r(38213).a0,x=u.relinkPrivateKeys,b=u._,w=e.exports={};u.extendFlat(w,s),w.attributes=r(27231),w.attributes.type.values=w.allTypes,w.fontAttrs=r(92948),w.layoutAttributes=r(79443),w.fontWeight="normal";var _=w.transformsRegistry,k=r(10357);w.executeAPICommand=k.executeAPICommand,w.computeAPICommandBindings=k.computeAPICommandBindings,w.manageCommandObserver=k.manageCommandObserver,w.hasSimpleAPICommandBindings=k.hasSimpleAPICommandBindings,w.redrawText=function(e){return e=u.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(s.getComponentMethod("annotations","draw")(e),s.getComponentMethod("legend","draw")(e),s.getComponentMethod("colorbar","draw")(e),t(w.previousPromises(e)))}),300)}))},w.resize=function(e){var t;e=u.getGraphDiv(e);var r=new Promise((function(r,n){e&&!u.isHidden(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||u.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,s.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))}))}}),100)}));return t&&t(r),r},w.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},w.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=u.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var e=n.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=t._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));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})}}(e,a),s.text(a.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function M(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function o(e){for(var r=!0,o=0;o1&&L.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),a=0;a15&&L.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(f,l,d,n),w.cleanPlot(f,l,d,n);var F=!(!n._has||!n._has("gl2d")),B=!(!l._has||!l._has("gl2d")),Z=!(!n._has||!n._has("cartesian"))||F,U=!(!l._has||!l._has("cartesian"))||B;Z&&!U?n._bgLayer.remove():U&&!Z&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&p({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var f=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-i)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,o,a,l=s.componentsRegistry,c=t._basePlotModules,d=s.subplotsRegistry.cartesian;for(i in l)(a=l[i]).includeBasePlot&&a.includeBasePlot(e,t);for(var f in c.length||c.push(d),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:k,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),O(t);var i=t._size,o=t.margin,l={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),d=o.l,f=o.r,p=o.t,m=o.b,g=t._pushmargin,v=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==o.autoexpand){for(var b in g)v[b]||delete g[b];var _=e._fullLayout._reservedMargin;for(var k in _)for(var S in _[k]){var T=_[k][S];l[S]=Math.max(l[S],T)}for(var M in g.base={l:{val:0,size:d},r:{val:1,size:f},t:{val:1,size:p},b:{val:0,size:m}},l){var C=0;for(var A in g)"base"!==A&&a(g[A][M].size)&&(C=g[A][M].size>C?g[A][M].size:C);var E=Math.max(0,o[M]-C);l[M]=Math.max(0,l[M]-E)}for(var I in g){var P=g[I].l||{},R=g[I].b||{},L=P.val,j=P.size,D=R.val,z=R.size,N=r-l.r-l.l,F=n-l.t-l.b;for(var B in g){if(a(j)&&g[B].r){var Z=g[B].r.val,U=g[B].r.size;if(Z>L){var V=(j*Z+(U-N)*L)/(Z-L),H=(U*(1-L)+(j-N)*(1-Z))/(Z-L);V+H>d+f&&(d=V,f=H)}}if(a(z)&&g[B].t){var W=g[B].t.val,G=g[B].t.size;if(W>D){var q=(z*W+(G-F)*D)/(W-D),Y=(G*(1-D)+(z-F)*(1-W))/(W-D);q+Y>m+p&&(m=q,p=Y)}}}}}var X=u.constrain(r-o.l-o.r,2,y),K=u.constrain(n-o.t-o.b,2,x),$=Math.max(0,r-X),J=Math.max(0,n-K);if($){var Q=(d+f)/$;Q>1&&(d/=Q,f/=Q)}if(J){var ee=(m+p)/J;ee>1&&(m/=ee,p/=ee)}if(i.l=Math.round(d)+l.l,i.r=Math.round(f)+l.r,i.t=Math.round(p)+l.t,i.b=Math.round(m)+l.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(c,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=h.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(v).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function l(){return o++,function(){a++,n||a!==o||function(t){if(!e._transitionData)return;(function(e){if(e)for(;e.length;)e.shift()})(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)}(i)}}r.runFn(l),setTimeout(l())}))}],o=u.syncOrAsync(i,e);return o&&o.then||(o=Promise.resolve()),o.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,o){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var a=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!==typeof e[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"===typeof(n=e[o+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"===typeof(n=e[o+"src"])&&n.indexOf(":")>0)return;i[o]=c(e[o],t)}else t&&(i[o]="_function")})),i}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var d={data:(a||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=c(s),i)){var f=s._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(d.frames=c(l)),o&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,i,o=e._transitionData._frames,a=e._transitionData._frameHash;for(r=0;r=0;o--)if(s[o].enabled){r._indexToPoints=s[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(e,r))}Array.isArray(a)&&a[0]||(a=[{x:f,y:f}]),a[0].t||(a[0].t={}),a[0].trace=r,p[t]=a}}for(j(a,c,d),i=0;i{"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}},73355:(e,t,r)=>{"use strict";var n=r(53787),i=r(71962).tester,o=n.findIndexOfMin,a=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(e,t,r,n){var i,o,a=n[0],s=n[1],l=d(Math.sin(t)-Math.sin(e)),c=d(Math.cos(t)-Math.cos(e)),u=Math.tan(r),f=d(1/u),h=l/c,p=s-h*a;return f?l&&c?o=u*(i=p/(u-h)):c?(i=s*f,o=s):(i=a,o=a*u):l&&c?(i=0,o=p):c?(i=0,o=s):i=o=NaN,[i,o]}function u(e,t,r,i){return n.isFullCircle([t,r])?function(e,t){var r,n=t.length,i=new Array(n+1);for(r=0;r1e-10?e:0}function f(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),o=0;o0?r:1/0})),i=n.mod(r+1,t.length);return[t[r],t[i]]},findIntersectionXY:c,findXYatLength:function(e,t,r,n){var i=-t*r,o=t*t+1,a=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(a*a-4*o*s),c=(-a+l)/(2*o),u=(-a-l)/(2*o);return[[c,t*c+i+n],[u,t*u+i+n]]},clampTiny:d,pathPolygon:function(e,t,r,n,i,o){return"M"+f(u(e,t,r,n),i,o).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,o,a){var s,l;e{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(38076),a=r(30028),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc",description:["Sets a reference between this trace's data coordinates and","a polar subplot.","If *polar* (the default value), the data refer to `layout.polar`.","If *polar2*, the data refer to `layout.polar2`, and so on."].join(" ")},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:r(53770),supplyLayoutDefaults:r(67681),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[l],a=0;a{"use strict";var n=r(18022),i=r(45446),o=r(29707).Y,a=r(53787).extendFlat,s=r(18693).overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),c=s({tickmode:i.minor.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,labelalias:i.labelalias,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"),u={visible:a({},i.visible,{dflt:!0}),type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},autorange:a({},i.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc",description:["If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","If *normal*, the range is computed in relation to the extrema","of the input data (same behavior as for cartesian axes)."].join(" ")},minallowed:a({},i.minallowed,{editType:"plot"}),maxallowed:a({},i.maxallowed,{editType:"plot"}),range:a({},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",description:["Sets the angle (in degrees) from which the radial axis is drawn.","Note that by default, radial axis line on the theta=0 line","corresponds to a line pointing right (like what mathematicians prefer).","Defaults to the first `polar.sector` angle."].join(" ")},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot",description:["Determines on which side of radial axis line","the tick and tick labels appear."].join(" ")},title:{text:a({},i.title.text,{editType:"plot",dflt:""}),font:a({},i.title.font,{editType:"plot"}),editType:"plot"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, `angle`, and `title` if in `editable: true` configuration.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};a(u,l,c);var d={visible:a({},i.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the angular axis type.","If *linear*, set `thetaunit` to determine the unit in which axis value are shown.","If *category, use `period` to set the number of integer coordinates around polar axis."].join(" ")},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc",description:["Sets the format unit of the formatted *theta* values.","Has an effect only when `angularaxis.type` is *linear*."].join(" ")},period:{valType:"number",editType:"calc",min:0,description:["Set the angular period.","Has an effect only when `angularaxis.type` is *category*."].join(" ")},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc",description:["Sets the direction corresponding to positive angles."].join(" ")},rotation:{valType:"angle",editType:"calc",description:["Sets that start position (in degrees) of the angular axis","By default, polar subplots with `direction` set to *counterclockwise*","get a `rotation` of *0*","which corresponds to due East (like what mathematicians prefer).","In turn, polar with `direction` set to *clockwise* get a rotation of *90*","which corresponds to due North (like on a compass),"].join(" ")},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `rotation`.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc"};a(d,l,c),e.exports={domain:o({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot",description:["Sets angular span of this polar subplot with two angles (in degrees).","Sector are assumed to be spanned in the counterclockwise direction","with *0* corresponding to rightmost limit of the polar subplot."].join(" ")},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the fraction of the radius to cut out of the polar subplot."].join(" ")},bgcolor:{valType:"color",editType:"plot",dflt:n.background,description:"Set the background color of the subplot"},radialaxis:u,angularaxis:d,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot",description:["Determines if the radial axis grid lines and angular axis line are drawn","as *circular* sectors or as *linear* (polygon) sectors.","Has an effect only when the angular axis has `type` *category*.","Note that `radialaxis.angle` is snapped to the angle of the closest","vertex when `gridshape` is *circular*","(so that radial axis scale is the same as the data scale)."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis attributes,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc"}},67681:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(38020),s=r(38213).NG,l=r(96592),c=r(64698),u=r(46139),d=r(33095),f=r(29550),h=r(50923),p=r(23795),m=r(36562),g=r(53770),v=r(87296),y=r(30028),x=y.axisNames;function b(e,t,r,a){var m=r("bgcolor");a.bgColor=i.combine(m,a.paper_bgcolor);var b=r("sector");r("hole");var _,k=s(a.fullData,y.name,a.id),S=a.layoutOut;function T(e,t){return r(_+"."+e,t)}for(var M=0;M{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(53787),s=a.strRotate,l=a.strTranslate,c=r(66235),u=r(50973),d=r(44115),f=r(28605),h=r(4738),p=r(87296),m=r(10351).doAutoRange,g=r(34189),v=r(63e3),y=r(76719),x=r(34906),b=r(26002).prepSelect,w=r(26002).selectOnClick,_=r(26002).clearOutline,k=r(19602),S=r(24513),T=r(93415).redrawReglTraces,M=r(81653).MID_SHIFT,C=r(30028),A=r(73355),E=r(68297),I=E.smith,O=E.reactanceArc,P=E.resistanceArc,R=E.smithTransform,L=a._,j=a.mod,D=a.deg2rad,z=a.rad2deg;function N(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;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",t),this.getHole=function(e){return this.isSmith?0:e.hole},this.getSector=function(e){return this.isSmith?[0,360]:e.sector},this.getRadial=function(e){return this.isSmith?e.realaxis:e.radialaxis},this.getAngular=function(e){return this.isSmith?e.imaginaryaxis:e.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var F=N.prototype;function B(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function Z(e,t){return t[a.findIndexOfMin(t,(function(t){return a.angleDist(e,t)}))]}function U(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}e.exports=function(e,t,r){return new N(e,t,r)},F.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,o=0;o=90||l>90&&c>=450?1:d<=0&&h<=0?0:Math.max(d,h);t=l<=180&&c>=180||l>180&&c>=540?-1:u>=0&&f>=0?0:Math.min(u,f);r=l<=270&&c>=270||l>270&&c>=630?-1:d>=0&&h>=0?0:Math.min(d,h);n=c>=360?1:u<=0&&f<=0?0:Math.max(u,f);return[t,r,n,i]}(p),w=b[2]-b[0],_=b[3]-b[1],k=h/f,S=Math.abs(_/w);k>S?(m=f,x=(h-(g=f*S))/i.h/2,v=[s[0],s[1]],y=[d[0]+x,d[1]-x]):(g=h,x=(f-(m=h/S))/i.w/2,v=[s[0]+x,s[1]-x],y=[d[0],d[1]]),r.xLength2=m,r.yLength2=g,r.xDomain2=v,r.yDomain2=y;var T,M=r.xOffset2=i.l+i.w*v[0],C=r.yOffset2=i.t+i.h*(1-y[1]),A=r.radius=m/w,E=r.innerRadius=r.getHole(t)*A,I=r.cx=M-A*b[0],O=r.cy=C+A*b[3],P=r.cxx=I-M,R=r.cyy=O-C,L=o.side;"counterclockwise"===L?(T=L,L="top"):"clockwise"===L&&(T=L,L="bottom"),r.radialAxis=r.mockAxis(e,t,o,{_id:"x",side:L,_trueSide:T,domain:[E/i.w,A/i.w]}),r.angularAxis=r.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:v}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:y});var z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",z).attr("transform",l(P,R)),n.frontplot.attr("transform",l(M,C)).call(u.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",z).attr("transform",l(I,O)).call(c.fill,t.bgcolor)},F.mockAxis=function(e,t,r,n){var i=a.extendFlat({},r,n);return p(i,t,e),i},F.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,o=r._id,s=a.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[o],i=n.radialAxis._rl,a=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},F.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,o=r.getRadial(t);m(n,i);var a=i.range;o.range=a.slice(),o._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")]},F.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,o=r.radius,u=r.innerRadius,d=r.cx,h=r.cy,p=r.getRadial(t),m=j(r.getSector(t)[0],360),g=r.radialAxis,v=u90&&m<=270&&(g.tickangle=180);var x=y?function(e){var t=R(r,I([e.x,0]));return l(t[0]-d,t[1]-h)}:function(e){return l(g.l2p(e.x)+u,0)},b=y?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+u)},w=B(p);if(r.radialTickLayout!==w&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=w),v){g.setScale();var _=0,k=y?(g.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return f.tickText(g,e,!0,!1)})):f.calcTicks(g),S=y?k:f.clipEnds(g,k),T=f.getTickSigns(g)[2];y&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(T=-T),"top"===g.ticks&&"top"===g.side&&(_=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(_=g.ticklen)),f.drawTicks(n,g,{vals:k,layer:i["radial-axis"],path:f.makeTickPath(g,0,T),transFn:x,crisp:!1}),f.drawGrid(n,g,{vals:S,layer:i["radial-grid"],path:b,transFn:a.noop,crisp:!1}),f.drawLabels(n,g,{vals:k,layer:i["radial-axis"],transFn:x,labelFns:f.makeLabelFns(g,_)})}var M=r.radialAxisAngle=r.vangles?z(Z(D(p.angle),r.vangles)):p.angle,C=l(d,h),A=C+s(-M);U(i["radial-axis"],v&&(p.showticklabels||p.ticks),{transform:A}),U(i["radial-grid"],v&&p.showgrid,{transform:y?"":C}),U(i["radial-line"].select("line"),v&&p.showline,{x1:y?-o:u,y1:0,x2:o,y2:0,transform:A}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},F.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,o=n.radius,a=n.cx,s=n.cy,l=n.getRadial(t),c=n.id+"title",d=0;if(l.title){var f=u.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,p=l.side;d="top"===p?h:"counterclockwise"===p?-(f+.4*h):f+.8*h}var m=void 0!==r?r:n.radialAxisAngle,g=D(m),v=Math.cos(g),y=Math.sin(g),b=a+o/2*v+d*y,w=s-o/2*y+d*v;n.layers["radial-axis-title"]=x.draw(i,c,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:L(i,"Click to enter radial axis title"),attributes:{x:b,y:w,"text-anchor":"middle"},transform:{rotate:-m}})}},F.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,o=r.radius,u=r.innerRadius,d=r.cx,h=r.cy,p=r.getAngular(t),m=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",p.rotation),m.setGeometry(),m.setScale());var v=g?function(e){var t=R(r,I([0,e.x]));return Math.atan2(t[0]-d,t[1]-h)-Math.PI/2}:function(e){return m.t2g(e.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=z(m.tick0),m.dtick=z(m.dtick));var y=function(e){return l(d+o*Math.cos(e),h-o*Math.sin(e))},x=g?function(e){var t=R(r,I([0,e.x]));return l(t[0],t[1])}:function(e){return y(v(e))},b=g?function(e){var t=R(r,I([0,e.x])),n=Math.atan2(t[0]-d,t[1]-h)-Math.PI/2;return l(t[0],t[1])+s(-z(n))}:function(e){var t=v(e);return y(t)+s(-z(t))},w=g?function(e){return O(r,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),n=Math.sin(t);return"M"+[d+u*r,h-u*n]+"L"+[d+o*r,h-o*n]},_=f.makeLabelFns(m,0).labelStandoff,k={xFn:function(e){var t=v(e);return Math.cos(t)*_},yFn:function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(_+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=v(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=v(e);return-.5*(1+Math.sin(n))*r}},S=B(p);r.angularTickLayout!==S&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),r.angularTickLayout=S);var T,C=g?[1/0].concat(m.tickvals||[]).map((function(e){return f.tickText(m,e,!0,!1)})):f.calcTicks(m);if(g&&(C[0].text="\u221e",C[0].fontSize*=1.75),"linear"===t.gridshape?(T=C.map(v),a.angleDelta(T[0],T[1])<0&&(T=T.slice().reverse())):T=null,r.vangles=T,"category"===m.type&&(C=C.filter((function(e){return a.isAngleInsideSector(v(e),r.sectorInRad)}))),m.visible){var A="inside"===m.ticks?-1:1,E=(m.linewidth||1)/2;f.drawTicks(n,m,{vals:C,layer:i["angular-axis"],path:"M"+A*E+",0h"+A*m.ticklen,transFn:b,crisp:!1}),f.drawGrid(n,m,{vals:C,layer:i["angular-grid"],path:w,transFn:a.noop,crisp:!1}),f.drawLabels(n,m,{vals:C,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:k})}U(i["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:l(d,h)}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},F.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},F.updateHoverAndMainDrag=function(e){var t,r,s=this,c=s.isSmith,u=s.gd,d=s.layers,f=e._zoomlayer,h=C.MINZOOM,p=C.OFFEDGE,m=s.radius,x=s.innerRadius,k=s.cx,S=s.cy,T=s.cxx,M=s.cyy,E=s.sectorInRad,I=s.vangles,O=s.radialAxis,P=A.clampTiny,R=A.findXYatLength,L=A.findEnclosingVertexAngles,j=C.cornerHalfWidth,D=C.cornerLen/2,z=g.makeDragger(d,"path","maindrag",!1===e.dragmode?"none":"crosshair");n.select(z).attr("d",s.pathSubplot()).attr("transform",l(k,S)),z.onmousemove=function(e){y.hover(u,e,s.id),u._fullLayout._lasthover=z,u._fullLayout._hoversubplot=s.id},z.onmouseout=function(e){u._dragging||v.unhover(u,e)};var N,F,B,Z,U,V,H,W,G,q={element:z,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function Y(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Y(e-T,t-M)}function K(e,t){return Math.atan2(M-t,e-T)}function $(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return s.pathSector(2*j);var r=D/e,n=t-r,i=t+r,o=Math.max(0,Math.min(e,m)),a=o-j,l=o+j;return"M"+$(a,n)+"A"+[a,a]+" 0,0,0 "+$(a,i)+"L"+$(l,i)+"A"+[l,l]+" 0,0,1 "+$(l,n)+"Z"}function Q(e,t,r){if(0===e)return s.pathSector(2*j);var n,i,o=$(e,t),a=$(e,r),l=P((o[0]+a[0])/2),c=P((o[1]+a[1])/2);if(l&&c){var u=c/l,d=-1/u,f=R(j,u,l,c);n=R(D,d,f[0][0],f[0][1]),i=R(D,d,f[1][0],f[1][1])}else{var h,p;c?(h=D,p=j):(h=j,p=D),n=[[l-h,c-p],[l+h,c-p]],i=[[l-h,c+p],[l+h,c+p]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,m),x),eh?(e-1&&1===e&&w(t,u,[s.xaxis],[s.yaxis],s.id,q),r.indexOf("event")>-1&&y.click(u,t,s.id)}q.prepFn=function(e,n,o){var l=u._fullLayout.dragmode,d=z.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var h=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var p=a.apply3DTransform(h)(n-d.left,o-d.top);if(N=p[0],F=p[1],I){var v=A.findPolygonOffset(m,E[0],E[1],I);N+=T+v[0],F+=M+v[1]}switch(l){case"zoom":q.clickFn=se,c||(q.moveFn=I?ie:re,q.doneFn=oe,function(){B=null,Z=null,U=s.pathSubplot(),V=!1;var e=u._fullLayout[s.id];H=i(e.bgcolor).getLuminance(),(W=g.makeZoombox(f,H,k,S,U)).attr("fill-rule","evenodd"),G=g.makeCorners(f,k,S),_(u)}());break;case"select":case"lasso":b(e,n,o,q,l)}},v.init(q)},F.updateRadialDrag=function(e,t,r){var i=this,c=i.gd,u=i.layers,d=i.radius,f=i.innerRadius,h=i.cx,p=i.cy,m=i.radialAxis,y=C.radialDragBoxSize,x=y/2;if(m.visible){var b,w,k,M=D(i.radialAxisAngle),A=m._rl,E=A[0],I=A[1],O=A[r],P=.75*(A[1]-A[0])/(1-i.getHole(t))/d;r?(b=h+(d+x)*Math.cos(M),w=p-(d+x)*Math.sin(M),k="radialdrag"):(b=h+(f-x)*Math.cos(M),w=p-(f-x)*Math.sin(M),k="radialdrag-inner");var R,L,j,N=g.makeRectDragger(u,k,"crosshair",-x,-x,y,y),F={element:N,gd:c};!1===e.dragmode&&(F.dragmode=!1),U(n.select(N),m.visible&&f0===(r?j>E:j{"use strict";var n=r(53787),i=r(4738),o=n.deg2rad,a=n.rad2deg;e.exports=function(e,t,r){switch(i(e,r),e._id){case"x":case"radialaxis":!function(e,t){var r=t._subplot;e.setGeometry=function(){var t=e._rl[0],n=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(n-t),a=i/o,s=t>n?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+a},e.g2c=function(r){return e.l2c(r+t-a)},e.g2p=function(e){return e*o},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?o(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?a(e):e}(e,t))}}e.makeCalcdata=function(t,i){var o,a,s=t[i],l=t._length,c=function(r){return e.d2c(r,t.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(o=new Array(l),a=0;a{"use strict";e.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},68297:e=>{"use strict";function t(e){return e<0?-1:e>0?1:0}function r(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function n(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function i(e,t){return t*e.radius}e.exports={smith:r,reactanceArc:function(e,t,o,a){var s=n(e,r([o,t])),l=s[0],c=s[1],u=n(e,r([a,t])),d=u[0],f=u[1];if(0===t)return["M"+l+","+c,"L"+d+","+f].join(" ");var h=i(e,1/Math.abs(t));return["M"+l+","+c,"A"+h+","+h+" 0 0,"+(t<0?1:0)+" "+d+","+f].join(" ")},resistanceArc:function(e,o,a,s){var l=i(e,1/(o+1)),c=n(e,r([o,a])),u=c[0],d=c[1],f=n(e,r([o,s])),h=f[0],p=f[1];if(t(a)!==t(s)){var m=n(e,r([o,0]));return["M"+u+","+d,"A"+l+","+l+" 0 0,"+(0{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(38076),a=r(50420),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc",description:["Sets a reference between this trace's data coordinates and","a smith subplot.","If *smith* (the default value), the data refer to `layout.smith`.","If *smith2*, the data refer to `layout.smith2`, and so on."].join(" ")},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:r(40240),supplyLayoutDefaults:r(47627),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[l],a=0;a{"use strict";var n=r(18022),i=r(45446),o=r(29707).Y,a=r(53787).extendFlat,s=r(18693).overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),c=s({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,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"),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot",description:"Sets the values at which ticks on this axis appear."},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *top* (*bottom*), this axis' are drawn above (below)","the axis line."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of real axis line","the tick and tick labels appear."].join(" ")},editType:"calc"},l,c),d=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot",description:["Sets the values at which ticks on this axis appear.","Defaults to `realaxis.tickvals` plus the same as negatives and zero."].join(" ")},ticks:i.ticks,editType:"calc"},l,c);e.exports={domain:o({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:n.background,description:"Set the background color of the subplot"},realaxis:u,imaginaryaxis:d,editType:"calc"}},47627:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(38020),s=r(38213).NG,l=r(33095),c=r(46139),u=r(50923),d=r(4738),f=r(40240),h=r(50420),p=h.axisNames,m=function(e,t){var r={};return function(n){var i=t?t(n):n;if(i in r)return r[i];var o=e(n);return r[i]=o,o}}((function(e){return e.slice().reverse().map((function(e){return-e})).concat([0]).concat(e)}),String);function g(e,t,r,a){var g=r("bgcolor");a.bgColor=i.combine(g,a.paper_bgcolor);var v,y=s(a.fullData,h.name,a.id),x=a.layoutOut;function b(e,t){return r(v+"."+e,t)}for(var w=0;w{"use strict";var n=r(53787),i=r(99862),o=r(29707).c;e.exports=function(e,t,r,a){var s,l,c=a.type,u=a.attributes,d=a.handleDefaults,f=a.partition||"x",h=t._subplots[c],p=h.length,m=p&&h[0].replace(/\d+$/,"");function g(e,t){return n.coerce(s,l,u,e,t)}for(var v=0;v{"use strict";var n=r(41287),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(e){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e&&e.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.si=function(e,t){e=e||{};var r=s(t=t||{}),n={valType:"string",dflt:"",editType:e.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.R=function(e,t){t=t||{};var r=(e=e||{}).newshape?"new ":"",n=s(t);return{valType:"string",dflt:"",editType:e.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},70184:(e,t,r)=>{"use strict";var n=r(55241),i=r(38213).AU,o=r(53787).counterRegex,a="ternary";t.name=a;var s=t.attr="subplot";t.idRoot=a,t.idRegex=t.attrRegex=o(a),(t.attributes={})[s]={valType:"subplotid",dflt:"ternary",editType:"calc",description:["Sets a reference between this trace's data coordinates and","a ternary subplot.","If *ternary* (the default value), the data refer to `layout.ternary`.","If *ternary2*, the data refer to `layout.ternary2`, and so on."].join(" ")},t.layoutAttributes=r(20143),t.supplyLayoutDefaults=r(78631),t.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,o=t._subplots[a],s=0;s{"use strict";var n=r(18022),i=r(29707).Y,o=r(45446),a=r(18693).overrideAll,s=r(10191).extendFlat,l={title:{text:o.title.text,font:o.title.font},color:o.color,tickmode:o.minor.tickmode,nticks:s({},o.nticks,{dflt:6,min:1}),tick0:o.tick0,dtick:o.dtick,tickvals:o.tickvals,ticktext:o.ticktext,ticks:o.ticks,ticklen:o.ticklen,tickwidth:o.tickwidth,tickcolor:o.tickcolor,ticklabelstep:o.ticklabelstep,showticklabels:o.showticklabels,labelalias:o.labelalias,showtickprefix:o.showtickprefix,tickprefix:o.tickprefix,showticksuffix:o.showticksuffix,ticksuffix:o.ticksuffix,showexponent:o.showexponent,exponentformat:o.exponentformat,minexponent:o.minexponent,separatethousands:o.separatethousands,tickfont:o.tickfont,tickangle:o.tickangle,tickformat:o.tickformat,tickformatstops:o.tickformatstops,hoverformat:o.hoverformat,showline:s({},o.showline,{dflt:!0}),linecolor:o.linecolor,linewidth:o.linewidth,showgrid:s({},o.showgrid,{dflt:!0}),gridcolor:o.gridcolor,gridwidth:o.gridwidth,griddash:o.griddash,layer:o.layer,min:{valType:"number",dflt:0,min:0,description:["The minimum value visible on this axis.","The maximum is determined by the sum minus the minimum","values of the other two axes. The full view corresponds to","all the minima set to zero."].join(" ")},_deprecated:{title:o._deprecated.title,titlefont:o._deprecated.titlefont}},c=e.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:n.background,description:"Set the background color of the subplot"},sum:{valType:"number",dflt:1,min:0,description:["The number each triplet should sum to,","and the maximum range of each axis"].join(" ")},aaxis:l,baxis:l,caxis:l},"plot","from-root");c.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min` and `title`,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min`,","and `title` if in `editable: true` configuration.","Defaults to `ternary.uirevision`."].join(" ")}},78631:(e,t,r)=>{"use strict";var n=r(66235),i=r(99862),o=r(53787),a=r(38020),s=r(46139),l=r(33095),c=r(64698),u=r(96592),d=r(50923),f=r(20143),h=["aaxis","baxis","caxis"];function p(e,t,r,o){var a,s,l,c=r("bgcolor"),u=r("sum");o.bgColor=n.combine(c,o.paper_bgcolor);for(var d=0;d=u&&(f.min=0,p.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function m(e,t,r,n){var i=f[t._name];function a(r,n){return o.coerce(e,t,i,r,n)}a("uirevision",n.uirevision),t.type="linear";var h=a("color"),p=h!==i.color.dflt?h:r.font.color,m=t._name.charAt(0).toUpperCase(),g="Component "+m,v=a("title.text",g);t._hovertitle=v===g?v:m,o.coerceFont(a,"title.font",{family:r.font.family,size:o.bigFont(r.font.size),color:p}),a("min"),u(e,t,a,"linear"),l(e,t,a,"linear"),s(e,t,a,"linear"),c(e,t,a,{outerTicks:!0}),a("showticklabels")&&(o.coerceFont(a,"tickfont",{family:r.font.family,size:r.font.size,color:p}),a("tickangle"),a("tickformat")),d(e,t,a,{dfltColor:h,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}e.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:f,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}},55241:(e,t,r)=>{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(53787),s=a.strTranslate,l=a._,c=r(66235),u=r(50973),d=r(4738),f=r(10191).extendFlat,h=r(44115),p=r(28605),m=r(63e3),g=r(76719),v=r(57873),y=v.freeMode,x=v.rectMode,b=r(34906),w=r(26002).prepSelect,_=r(26002).selectOnClick,k=r(26002).clearOutline,S=r(26002).clearSelectionsCache,T=r(99727);function M(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=M;var C=M.prototype;C.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},C.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var o=0;oA*b?i=(o=b)*A:o=(i=x)/A,a=v*i/x,l=y*o/b,r=t.l+t.w*m-i/2,n=t.t+t.h*(1-g)-o/2,h.x0=r,h.y0=n,h.w=i,h.h=o,h.sum=w,h.xaxis={type:"linear",range:[_+2*S-w,w-_-2*k],domain:[m-a/2,m+a/2],_id:"x"},d(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(e){return e.a>=h.aaxis.range[0]&&e.a<=h.aaxis.range[1]&&e.b>=h.baxis.range[1]&&e.b<=h.baxis.range[0]&&e.c>=h.caxis.range[1]&&e.c<=h.caxis.range[0]},h.yaxis={type:"linear",range:[_,w-k-S],domain:[g-l/2,g+l/2],_id:"y"},d(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var T=h.yaxis.domain[0],M=h.aaxis=f({},e.aaxis,{range:[_,w-k-S],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+l*A],anchor:"free",position:0,_id:"y",_length:i});d(M,h.graphDiv._fullLayout),M.setScale();var C=h.baxis=f({},e.baxis,{range:[w-_-S,k],side:"bottom",domain:h.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});d(C,h.graphDiv._fullLayout),C.setScale();var E=h.caxis=f({},e.caxis,{range:[w-_-k,S],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+l*A],anchor:"free",position:0,_id:"y",_length:i});d(E,h.graphDiv._fullLayout),E.setScale();var I="M"+r+","+(n+o)+"h"+i+"l-"+i/2+",-"+o+"Z";h.clipDef.select("path").attr("d",I),h.layers.plotbg.select("path").attr("d",I);var O="M0,"+o+"h"+i+"l-"+i/2+",-"+o+"Z";h.clipDefRelative.select("path").attr("d",O);var P=s(r,n);h.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),h.clipDefRelative.select("path").attr("transform",null);var R=s(r-C._offset,n+o);h.layers.baxis.attr("transform",R),h.layers.bgrid.attr("transform",R);var L=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);h.layers.aaxis.attr("transform",L),h.layers.agrid.attr("transform",L);var j=s(r+i/2,n)+"rotate(-30)"+s(0,-E._offset);h.layers.caxis.attr("transform",j),h.layers.cgrid.attr("transform",j),h.drawAxes(!0),h.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+o)+"l"+i/2+",-"+o:"M0,0").call(c.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),h.layers.bline.select("path").attr("d",C.showline?"M"+r+","+(n+o)+"h"+i:"M0,0").call(c.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),h.layers.cline.select("path").attr("d",E.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+o:"M0,0").call(c.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),h.graphDiv._context.staticPlot||h.initInteractions(),u.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId,h.graphDiv)},C.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(7)+"title",i=t.layers,o=t.aaxis,a=t.baxis,s=t.caxis;if(t.drawAx(o),t.drawAx(a),t.drawAx(s),e){var c=Math.max(o.showticklabels?o.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),u=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:o,propName:t.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-o.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:a,propName:t.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*a.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*s.title.font.size+u,"text-anchor":"middle"}})}},C.drawAx=function(e){var t,r=this,n=r.graphDiv,i=e._name,o=i.charAt(0),s=e._id,l=r.layers[i],c=o+"tickLayout",u=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);r[c]!==u&&(l.selectAll("."+s+"tick").remove(),r[c]=u),e.setScale();var d=p.calcTicks(e),f=p.clipEnds(e,d),h=p.makeTransTickFn(e),m=p.getTickSigns(e)[2],g=a.deg2rad(30),v=m*(e.linewidth||1)/2,y=m*e.ticklen,x=r.w,b=r.h,w="b"===o?"M0,"+v+"l"+Math.sin(g)*y+","+Math.cos(g)*y:"M"+v+",0l"+Math.cos(g)*y+","+-Math.sin(g)*y,_={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[o];p.drawTicks(n,e,{vals:"inside"===e.ticks?f:d,layer:l,path:w,transFn:h,crisp:!1}),p.drawGrid(n,e,{vals:f,layer:r.layers[o+"grid"],path:_,transFn:h,crisp:!1}),p.drawLabels(n,e,{vals:d,layer:l,transFn:h,labelFns:p.makeLabelFns(e,0,30)})};var E=T.MINZOOM/2+.87,I="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",O="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",R=!0;function L(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}C.clearOutline=function(){S(this.dragOptions),k(this.dragOptions.gd)},C.initInteractions=function(){var e,t,r,n,d,f,h,p,v,b,k,S,M=this,C=M.layers.plotbg.select("path").node(),E=M.graphDiv,j=E._fullLayout._zoomlayer;function D(e){var t={};return t[M.id+".aaxis.min"]=e.a,t[M.id+".baxis.min"]=e.b,t[M.id+".caxis.min"]=e.c,t}function z(e,t){var r=E._fullLayout.clickmode;L(E),2===e&&(E.emit("plotly_doubleclick",null),o.call("_guiRelayout",E,D({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&_(t,E,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(E,t,M.id)}function N(e,t){return 1-t/M.h}function F(e,t){return 1-(e+(M.h-t)/Math.sqrt(3))/M.w}function B(e,t){return(e-(M.h-t)/Math.sqrt(3))/M.w}function Z(i,o){var a=r+i*e,s=n+o*t,l=Math.max(0,Math.min(1,N(0,n),N(0,s))),c=Math.max(0,Math.min(1,F(r,n),F(a,s))),u=Math.max(0,Math.min(1,B(r,n),B(a,s))),m=(l/2+u)*M.w,g=(1-l/2-c)*M.w,y=(m+g)/2,x=g-m,w=(1-l)*M.h,_=w-x/A;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),S.transition().style("opacity",1).duration(200),b=!0),E.emit("plotly_relayouting",D(h))}function U(){L(E),h!==d&&(o.call("_guiRelayout",E,D(h)),R&&E.data&&E._context.showTips&&(a.notifier(l(E,"Double-click to zoom back out"),"long"),R=!1))}function V(e,t){var r=e/M.xaxis._m,n=t/M.yaxis._m,i=[(h={a:d.a-n,b:d.b+(r+n)/2,c:d.c-(r-n)/2}).a,h.b,h.c].sort(a.sorterAsc),o=i.indexOf(h.a),l=i.indexOf(h.b),c=i.indexOf(h.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),h={a:i[o],b:i[l],c:i[c]},t=(d.a-h.a)*M.yaxis._m,e=(d.c-h.c-d.b+h.b)*M.xaxis._m);var f=s(M.x0+e,M.y0+t);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var p=s(-e,-t);M.clipDefRelative.select("path").attr("transform",p),M.aaxis.range=[h.a,M.sum-h.b-h.c],M.baxis.range=[M.sum-h.a-h.c,h.b],M.caxis.range=[M.sum-h.a-h.b,h.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,M),E.emit("plotly_relayouting",D(h))}function H(){o.call("_guiRelayout",E,D(h))}this.dragOptions={element:C,gd:E,plotinfo:{id:M.id,domain:E._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(o,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],e=E._fullLayout._invScaleX,t=E._fullLayout._invScaleY;var m=M.dragOptions.dragmode=E._fullLayout.dragmode;y(m)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===m?(M.dragOptions.moveFn=Z,M.dragOptions.clickFn=z,M.dragOptions.doneFn=U,function(e,t,o){var l=C.getBoundingClientRect();r=t-l.left,n=o-l.top,E._fullLayout._calcInverseTransform(E);var u=E._fullLayout._invTransform,m=a.apply3DTransform(u)(r,n);r=m[0],n=m[1],d={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=d,f=M.aaxis.range[1]-d.a,p=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,k=j.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:p>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),S=j.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(E)}(0,l,u)):"pan"===m?(M.dragOptions.moveFn=V,M.dragOptions.clickFn=z,M.dragOptions.doneFn=H,d={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=d,M.clearOutline(E)):(x(m)||y(m))&&w(o,l,u,M.dragOptions,m)}},C.onmousemove=function(e){g.hover(E,e,M.id),E._fullLayout._lasthover=C,E._fullLayout._hoversubplot=M.id},C.onmouseout=function(e){E._dragging||m.unhover(E,e)},m.init(this.dragOptions)}},44049:(e,t,r)=>{"use strict";var n=r(95169),i=r(17295),o=r(80809),a=r(47623),s=r(90489).addStyleRule,l=r(10191),c=r(27231),u=r(79443),d=l.extendFlat,f=l.extendDeepAll;function h(e){var r=e.name,i=e.categories,o=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])return void n.log("Plot type "+r+" already registered.");for(var i in v(e),t.subplotsRegistry[r]=e,t.componentsRegistry)b(i,e.name)}(e.basePlotModule);for(var a={},l=0;l{"use strict";var n=r(44049),i=r(53787),o=i.extendFlat,a=i.extendDeep;function s(e){var t;switch(e){case"themes__thumb":t={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":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}e.exports=function(e,t){var r,i,l=e.data,c=e.layout,u=a([],l),d=a({},c,s(t.tileClass)),f=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){d.annotations=[];var h=Object.keys(d);for(r=0;r-1&&(d[h[r]].title={text:""});for(r=0;r{"use strict";var n=r(53787),i=r(50683),o=r(97895),a=r(82231);e.exports=function(e,t){var r;return n.isPlainObject(e)||(r=n.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==t.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format.replace("-","."),c.then((function(e){return r&&(r._snapshotInProgress=!1),o(e,u,t.format)})).then((function(e){s(e)})).catch((function(e){r&&(r._snapshotInProgress=!1),l(e)}))}))}},97895:(e,t,r)=>{"use strict";var n=r(53787),i=r(82231);e.exports=function(e,t,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,u;if(n.isIE())return c=i.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,s(t);if(a)return c=i.createBlob(e,r),u=i.createObjectURL(c),o.href=u,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(u),c=null,s(t);if(n.isSafari()){var d="svg"===r?",":";base64,";return i.octetStream(d+encodeURIComponent(e)),s(t)}l(new Error("download error"))}))}},82231:(e,t,r)=>{"use strict";var n=r(44049);t.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},t.getRedrawFunc=function(e){return function(){n.getComponentMethod("colorbar","draw")(e)}},t.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},t.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var i=window.URL||window.webkitURL;t.createObjectURL=function(e){return i.createObjectURL(e)},t.revokeObjectURL=function(e){return i.revokeObjectURL(e)},t.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var n=r(82231),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(86629),toSVG:r(99367),svgToImg:r(74978),toImage:r(67574),downloadImage:r(51320)};e.exports=i},74978:(e,t,r)=>{"use strict";var n=r(53787),i=r(68041).EventEmitter,o=r(82231);e.exports=function(e){var t=e.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=e.svg,c=e.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(o.MSG_IE_BAD_FORMAT);return a(u),e.promise?r:t.emit("error",u)}var d,f,h=e.canvas,p=e.scale||1,m=e.width||300,g=e.height||150,v=p*m,y=p*g,x=h.getContext("2d",{willReadFrequently:!0}),b=new s;"svg"===c||n.isSafari()?f=o.encodeSVG(l):(d=o.createBlob(l,"svg"),f=o.createObjectURL(d)),h.width=v,h.height=y,b.onload=function(){var r;switch(d=null,o.revokeObjectURL(f),"svg"!==c&&x.drawImage(b,0,0,v,y),c){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=f;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!e.promise)return t.emit("error",n)}i(r),e.promise||t.emit("success",r)},b.onerror=function(r){if(d=null,o.revokeObjectURL(f),a(r),!e.promise)return t.emit("error",r)},b.src=f}));return e.promise?r:t}},67574:(e,t,r)=>{"use strict";var n=r(68041).EventEmitter,i=r(44049),o=r(53787),a=r(82231),s=r(86629),l=r(99367),c=r(74978);e.exports=function(e,t){var r=new n,u=s(e,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);var f=a.getRedrawFunc(d);return i.call("_doPlot",d,u.data,u.layout,u.config).then(f).then((function(){var e=a.getDelay(d._fullLayout);setTimeout((function(){var e=l(d),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){d&&document.body.removeChild(d)}}),e)})).catch((function(e){r.emit("error",e)})),r}},99367:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(66235),s=r(83580),l=/"/g,c="TOBESTRIPPED",u=new RegExp('("'+c+")|("+c+'")',"g");e.exports=function(e,t,r){var d,f=e._fullLayout,h=f._paper,p=f._toppaper,m=f.width,g=f.height;h.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,f.paper_bgcolor);var v=f._basePlotModules||[];for(d=0;d")?"":t.html(e).text()}));return t.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},59251:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(37471),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(32191).si,s=r(8753),l=r(92948),c=r(22331),u=r(93701).u,d=r(10191).extendFlat,f=l({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),h=d({},n.marker.line.width,{dflt:0}),p=d({width:h,editType:"calc"},s("marker.line")),m=d({line:p,editType:"calc"},s("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:u});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:a({editType:"plot"},{keys:c.eventDataKeys}),hovertext:n.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:d({},f,{description:"Sets the font used for `text`."}),insidetextfont:d({},f,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:d({},f,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:d({},n.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:m,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,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"],description:"Renamed to `orientation`."}}}},51717:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(25584).hasColorscale,a=r(1631),s=r(59251),l=r(35637);e.exports=function(e,t){var r,c,u,d,f,h,p=n.getFromId(e,t.xaxis||"x"),m=n.getFromId(e,t.yaxis||"y"),g={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=p.makeCalcdata(t,"x",g),u=m.makeCalcdata(t,"y"),d=i(t,m,"y",u),f=!!t.yperiodalignment,h="y"):(r=m.makeCalcdata(t,"y",g),u=p.makeCalcdata(t,"x"),d=i(t,p,"x",u),f=!!t.xperiodalignment,h="x"),c=d.vals;for(var v=Math.min(c.length,r.length),y=new Array(v),x=0;x{"use strict";e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},39713:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787).isArrayOrTypedArray,o=r(24956).BADNUM,a=r(44049),s=r(28605),l=r(14511).getAxisGroup,c=r(35817);function u(e,t,r,a,u){if(a.length){var b,w,_,k;switch(function(e,t){var r,o;for(r=0;rd+c||!n(u))}for(var h=0;h{"use strict";var n=r(53787),i=r(66235),o=r(44049),a=r(89016),s=r(17239),l=r(8743),c=r(25305),u=r(8222),d=n.coerceFont;function f(e,t,r,i,o,a){var s=!(!1===(a=a||{}).moduleHasSelected),l=!(!1===a.moduleHasUnselected),c=!(!1===a.moduleHasConstrain),u=!(!1===a.moduleHasCliponaxis),f=!(!1===a.moduleHasTextangle),h=!(!1===a.moduleHasInsideanchor),p=!!a.hasPathbar,m=Array.isArray(o)||"auto"===o,g=m||"inside"===o,v=m||"outside"===o;if(g||v){var y=d(i,"textfont",r.font),x=n.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(i,"insidetextfont",x),p){var w=n.extendFlat({},y);b&&delete w.color,d(i,"pathbar.textfont",w)}v&&d(i,"outsidetextfont",y),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),f&&i("textangle"),i("texttemplate")}g&&h&&i("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,c){function d(r,i){return n.coerce(e,t,u,r,i)}if(a(e,t,c,d)){s(e,t,c,d),d("xhoverformat"),d("yhoverformat"),d("orientation",t.x&&!t.y?"h":"v"),d("base"),d("offset"),d("width"),d("text"),d("hovertext"),d("hovertemplate");var h=d("textposition");f(e,t,c,d,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,d,r,c);var p=(t.marker.line||{}).color,m=o.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||i.defaultLine,{axis:"y"}),m(e,t,p||i.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,u,e)}if("group"===t.barmode)for(var a=0;a{"use strict";e.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},28372:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(53787).isArrayOrTypedArray;t.coerceString=function(e,t,r){if("string"===typeof t){if(t||!e.noBlank)return t}else if(("number"===typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},t.coerceNumber=function(e,t,r){if(n(t)){t=+t;var i=e.min,o=e.max;if(!(void 0!==i&&to))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return i(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return Array.isArray(e)?t{"use strict";var n=r(76719),i=r(44049),o=r(66235),a=r(53787).fillText,s=r(28372).getLineWidth,l=r(28605).hoverLabelText,c=r(24956).BADNUM;function u(e,t,r,i,o){var s,u,d,f,h,p,m,g=e.cd,v=g[0].trace,y=g[0].t,x="closest"===i,b="waterfall"===v.type,w=e.maxHoverDistance,_=e.maxSpikeDistance;"h"===v.orientation?(s=r,u=t,d="y",f="x",h=L,p=P):(s=t,u=r,d="x",f="y",p=L,h=P);var k=v[d+"period"],S=x||k;function T(e){return C(e,-1)}function M(e){return C(e,1)}function C(e,t){var r=e.w;return e[d]+t*r/2}function A(e){return e[d+"End"]-e[d+"Start"]}var E=x?T:k?function(e){return e.p-A(e)/2}:function(e){return Math.min(T(e),e.p-y.bardelta/2)},I=x?M:k?function(e){return e.p+A(e)/2}:function(e){return Math.max(M(e),e.p+y.bardelta/2)};function O(e,t,r){return o.finiteRange&&(r=0),n.inbox(e-s,t-s,r+Math.min(1,Math.abs(t-e)/m)-1)}function P(e){return O(E(e),I(e),w)}function R(e){var t=e[f];if(b){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function L(e){var t=u,r=e.b,i=R(e);return n.inbox(r-t,i-t,w+(i-t)/(i-r)-1)}var j=e[d+"a"],D=e[f+"a"];m=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));var z=n.getDistanceFunction(i,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(g,z,e),!1!==e.index&&g[e.index].p!==c){S||(E=function(e){return Math.min(T(e),e.p-y.bargroupwidth/2)},I=function(e){return Math.max(M(e),e.p+y.bargroupwidth/2)});var N=g[e.index],F=v.base?N.b+N.s:N.s;e[f+"0"]=e[f+"1"]=D.c2p(N[f],!0),e[f+"LabelVal"]=F;var B=y.extents[y.extents.round(N.p)];e[d+"0"]=j.c2p(x?E(N):B[0],!0),e[d+"1"]=j.c2p(x?I(N):B[1],!0);var Z=void 0!==N.orig_p;return e[d+"LabelVal"]=Z?N.orig_p:N.p,e.labelLabel=l(j,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=l(D,e[f+"LabelVal"],v[f+"hoverformat"]),e.baseLabel=l(D,N.b,v[f+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,i=R(e);return n.inbox(r-t,i-t,_+(i-t)/(i-r)-1)}(N)+function(e){return O(T(e),M(e),_)}(N))/2,e[d+"Spike"]=j.c2p(N.p,!0),a(N,v,e),e.hovertemplate=v.hovertemplate,e}}function d(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=s(e,t);return o.opacity(r)?r:o.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(e,t,r,n,o){var a=u(e,t,r,n,o);if(a){var s=a.cd,l=s[0].trace,c=s[a.index];return a.color=d(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,a),[a]}},hoverOnBars:u,getTraceColor:d}},83538:(e,t,r)=>{"use strict";e.exports={attributes:r(8222),layoutAttributes:r(90871),supplyDefaults:r(6099).supplyDefaults,crossTraceDefaults:r(6099).crossTraceDefaults,supplyLayoutDefaults:r(57690),calc:r(51717),crossTraceCalc:r(39713).crossTraceCalc,colorbar:r(68971),arraysToCalcdata:r(59251),plot:r(88430).plot,style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,hoverPoints:r(48363).hoverPoints,eventData:r(45058),selectPoints:r(22145),moduleType:"trace",name:"bar",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set to *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}},90871:e=>{"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},57690:(e,t,r)=>{"use strict";var n=r(44049),i=r(28605),o=r(53787),a=r(90871);e.exports=function(e,t,r){function s(r,n){return o.coerce(e,t,a,r,n)}for(var l=!1,c=!1,u=!1,d={},f=s("barmode"),h=0;h{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(98224),s=r(66235),l=r(50973),c=r(44049),u=r(28605).tickText,d=r(22684),f=d.recordMinTextSize,h=d.clearMinTextSize,p=r(29527),m=r(28372),g=r(22331),v=r(8222),y=v.text,x=v.textposition,b=r(87267).appendArrayPointValue,w=g.TEXTPAD;function _(e){return e.id}function k(e){if(e.ids)return _}function S(e,t){return e0}function C(e){return"auto"===e?0:e}function A(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function E(e,t,r,n,i,o){var a=!!o.isHorizontal,s=!!o.constrained,l=o.angle||0,c=o.anchor||"end",u="end"===c,d="start"===c,f=((o.leftToRight||0)+1)/2,h=1-f,p=i.width,m=i.height,g=Math.abs(t-e),v=Math.abs(n-r),y=g>2*w&&v>2*w?w:0;g-=2*y,v-=2*y;var x=C(l);"auto"!==l||p<=g&&m<=v||!(p>g||m>v)||(p>v||m>g)&&p.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};F=G(F,B,D),B=G(B,F,D),Z=G(Z,U,!D),U=G(U,Z,!D)}var q=T(o.ensureSingle(R,"path"),O,g,v);if(q.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((B-F)*(U-Z))||V&&e._context.staticPlot?"M0,0Z":"M"+F+","+Z+"V"+U+"H"+B+"V"+Z+"Z").call(l.setClipUrl,t.layerClipId,e),!O.uniformtext.mode&&z){var Y=l.makePointStyleFns(d);l.singlePointStyle(c,q,d,Y,e)}!function(e,t,r,n,i,s,c,d,h,g,v){var _,k=t.xaxis,M=t.yaxis,I=e._fullLayout;function O(t,r,n){return o.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(a.convertToTspans,e)}var P=n[0].trace,R="h"===P.orientation,L=function(e,t,r,n,i){var a,s=t[0].trace,l=s.texttemplate;a=l?function(e,t,r,n,i){var a=t[0].trace,s=o.castOption(a,r,"texttemplate");if(!s)return"";var l,c,d,f,h="histogram"===a.type,p="waterfall"===a.type,m="funnel"===a.type,g="h"===a.orientation;g?(l="y",c=i,d="x",f=n):(l="x",c=n,d="y",f=i);function v(e){return u(c,c.c2l(e),!0).text}function y(e){return u(f,f.c2l(e),!0).text}var x=t[r],w={};w.label=x.p,w.labelLabel=w[l+"Label"]=v(x.p);var _=o.castOption(a,x.i,"text");(0===_||_)&&(w.text=_);w.value=x.s,w.valueLabel=w[d+"Label"]=y(x.s);var k={};b(k,a,x.i),(h||void 0===k.x)&&(k.x=g?w.value:w.label);(h||void 0===k.y)&&(k.y=g?w.label:w.value);(h||void 0===k.xLabel)&&(k.xLabel=g?w.valueLabel:w.labelLabel);(h||void 0===k.yLabel)&&(k.yLabel=g?w.labelLabel:w.valueLabel);p&&(w.delta=+x.rawS||x.s,w.deltaLabel=y(w.delta),w.final=x.v,w.finalLabel=y(w.final),w.initial=w.final-w.delta,w.initialLabel=y(w.initial));m&&(w.value=x.s,w.valueLabel=y(w.value),w.percentInitial=x.begR,w.percentInitialLabel=o.formatPercent(x.begR),w.percentPrevious=x.difR,w.percentPreviousLabel=o.formatPercent(x.difR),w.percentTotal=x.sumR,w.percenTotalLabel=o.formatPercent(x.sumR));var S=o.castOption(a,x.i,"customdata");S&&(w.customdata=S);return o.texttemplateString(s,w,e._d3locale,k,w,a._meta||{})}(e,t,r,n,i):s.textinfo?function(e,t,r,n){var i=e[0].trace,a="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(e){return u(a?n:r,e,!0).text}function d(e){return u(a?r:n,+e,!0).text}var f,h=i.textinfo,p=e[t],m=h.split("+"),g=[],v=function(e){return-1!==m.indexOf(e)};v("label")&&g.push(c(e[t].p));v("text")&&(0===(f=o.castOption(i,p.i,"text"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;v("initial")&&g.push(d(b)),v("delta")&&g.push(d(y)),v("final")&&g.push(d(x))}if(l){v("value")&&g.push(d(p.s));var w=0;v("percent initial")&&w++,v("percent previous")&&w++,v("percent total")&&w++;var _=w>1;v("percent initial")&&(f=o.formatPercent(p.begR),_&&(f+=" of initial"),g.push(f)),v("percent previous")&&(f=o.formatPercent(p.difR),_&&(f+=" of previous"),g.push(f)),v("percent total")&&(f=o.formatPercent(p.sumR),_&&(f+=" of total"),g.push(f))}return g.join("
")}(t,r,n,i):m.getValue(s.text,r);return m.coerceString(y,a)}(I,n,i,k,M);_=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(x,r)}(P,i);var j="stack"===g.mode||"relative"===g.mode,D=n[i],z=!j||D._outmost;if(!L||"none"===_||(D.isBlank||s===c||d===h)&&("auto"===_||"inside"===_))return void r.select("text").remove();var N=I.font,F=p.getBarColor(n[i],P),B=p.getInsideTextFont(P,i,N,F),Z=p.getOutsideTextFont(P,i,N),U=r.datum();R?"log"===k.type&&U.s0<=0&&(s=k.range[0]0&&G>0&&(W<=Y&&G<=X||W<=X&&G<=Y||(R?Y>=W*(X/G):X>=G*(Y/W)))?_="inside":(_="outside",V.remove(),V=null);else _="inside"}if(!V){var K=(V=O(r,L,q=o.ensureUniformFontSize(e,"outside"===_?Z:B))).attr("transform");if(V.attr("transform",""),W=(H=l.bBox(V.node())).width,G=H.height,V.attr("transform",K),W<=0||G<=0)return void V.remove()}var $,J=P.textangle;$="outside"===_?function(e,t,r,n,i,o){var a,s=!!o.isHorizontal,l=!!o.constrained,c=o.angle||0,u=i.width,d=i.height,f=Math.abs(t-e),h=Math.abs(n-r);a=s?h>2*w?w:0:f>2*w?w:0;var p=1;l&&(p=s?Math.min(1,h/d):Math.min(1,f/u));var m=C(c),g=A(i,m),v=(s?g.x:g.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,_=(r+n)/2,k=0,T=0,M=s?S(t,e):S(r,n);s?(b=t-M*a,k=M*v):(_=n+M*a,T=-M*v);return{textX:y,textY:x,targetX:b,targetY:_,anchorX:k,anchorY:T,scale:p,rotate:m}}(s,c,d,h,H,{isHorizontal:R,constrained:"both"===P.constraintext||"outside"===P.constraintext,angle:J}):E(s,c,d,h,H,{isHorizontal:R,constrained:"both"===P.constraintext||"inside"===P.constraintext,angle:J,anchor:P.insidetextanchor});$.fontSize=q.size,f("histogram"===P.type?"bar":P.type,$,I),D.transform=$;var Q=T(V,I,g,v);o.setTransormAndDisplay(Q,$)}(e,t,R,r,h,F,B,Z,U,g,v),t.layerClipId&&l.hideOutsideRangePoint(c,R.select("text"),_,I,d.xcalendar,d.ycalendar)}));var Z=!1===d.cliponaxis;l.setClipUrl(c,Z?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,R,t,g)},toMoveInsideBar:E}},22145:e=>{"use strict";function t(e,t,r,n,i){var o=t.c2p(n?e.s0:e.p0,!0),a=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(o+a)/2,(s+l)/2]:n?[a,(s+l)/2]:[(o+a)/2,l]}e.exports=function(e,r){var n,i=e.cd,o=e.xaxis,a=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===r)for(n=0;n{"use strict";e.exports=i;var n=r(53787).distinctVals;function i(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(8996),i=r(66235),o=r(50973),a=r(53787),s=r(44049),l=r(22684).resizeText,c=r(8222),u=c.textfont,d=c.insidetextfont,f=c.outsidetextfont,h=r(28372);function p(e,t,r){o.pointStyle(e.selectAll("path"),t,r),m(e,t,r)}function m(e,t,r){e.selectAll("text").each((function(e){var i=n.select(this),s=a.ensureUniformFontSize(r,g(i,e,t,r));o.font(i,s)}))}function g(e,t,r,n){var i=n._fullLayout.font,o=r.textfont;if(e.classed("bartext-inside")){var a=w(t,r);o=y(r,t.i,i,a)}else e.classed("bartext-outside")&&(o=x(r,t.i,i));return o}function v(e,t,r){return b(u,e.textfont,t,r)}function y(e,t,r,n){var o=v(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(o={color:i.contrast(n),family:o.family,size:o.size}),b(d,e.insidetextfont,t,o)}function x(e,t,r){var n=v(e,t,r);return b(f,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var i=h.getValue(t.family,r),o=h.getValue(t.size,r),a=h.getValue(t.color,r);return{family:h.coerceString(e.family,i,n.family),size:h.coerceNumber(e.size,o,n.size),color:h.coerceColor(e.color,a,n.color)}}function w(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}e.exports={style:function(e){var t=n.select(e).selectAll("g.barlayer").selectAll("g.trace");l(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===i.barmode&&r>1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?function(e,t,r){o.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var i,s=n.select(this);if(e.selected){i=a.ensureUniformFontSize(r,g(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),o.font(s,i)}else o.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,i,e):(p(r,i,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:w,resizeText:l}},8743:(e,t,r)=>{"use strict";var n=r(66235),i=r(25584).hasColorscale,o=r(5876),a=r(53787).coercePattern;e.exports=function(e,t,r,s,l){var c=r("marker.color",s),u=i(e,"marker");u&&o(e,t,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(e,"marker.line")&&o(e,t,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),a(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},22684:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787);function o(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=o(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var n=r(32191).fF,i=r(10191).extendFlat,o=r(32608),a=r(8222);e.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:i({},a.base,{description:["Sets where the bar base is drawn (in radial axis units).","In *stack* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")}),offset:i({},a.offset,{description:["Shifts the angular position where the bar is drawn","(in *thetatunit* units)."].join(" ")}),width:i({},a.width,{description:["Sets the bar angular width (in *thetaunit* units)."].join(" ")}),text:i({},a.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:i({},a.hovertext,{description:"Same as `text`."}),marker:a.marker,hoverinfo:o.hoverinfo,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},39329:(e,t,r)=>{"use strict";var n=r(25584).hasColorscale,i=r(1631),o=r(59251),a=r(39713).setGroupPositions,s=r(35637),l=r(44049).traceIs,c=r(53787).extendFlat;e.exports={calc:function(e,t){for(var r=e._fullLayout,a=t.subplot,l=r[a].radialaxis,c=r[a].angularaxis,u=l.makeCalcdata(t,"r"),d=c.makeCalcdata(t,"theta"),f=t._length,h=new Array(f),p=u,m=d,g=0;g{"use strict";var n=r(53787),i=r(10123).handleRThetaDefaults,o=r(8743),a=r(62319);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}i(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),o(e,t,l,r,s),n.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}},29369:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(48363).getTraceColor,a=i.fillText,s=r(9226).makeHoverPointText,l=r(73355).isPtInsidePolygon;e.exports=function(e,t,r){var c=e.cd,u=c[0].trace,d=e.subplot,f=d.radialAxis,h=d.angularAxis,p=d.vangles,m=p?l:i.isPtInsideSector,g=e.maxHoverDistance,v=h._period||2*Math.PI,y=Math.abs(f.g2p(Math.sqrt(t*t+r*r))),x=Math.atan2(r,t);f.range[0]>f.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(e){return m(y,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/v)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var w=i.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),s(w,u,d,e),e.hovertemplate=u.hovertemplate,e.color=o(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}},36522:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(37180),categories:["polar","bar","showLegend"],attributes:r(62319),layoutAttributes:r(86280),supplyDefaults:r(7378),supplyLayoutDefaults:r(99486),calc:r(39329).calc,crossTraceCalc:r(39329).crossTraceCalc,plot:r(1401),colorbar:r(68971),formatLabels:r(33058),style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,hoverPoints:r(29369),selectPoints:r(22145),meta:{hrName:"bar_polar",description:["The data visualized by the radial span of the bars is set in `r`"].join(" ")}}},86280:e=>{"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc",description:["Sets the gap between bars of","adjacent location coordinates.","Values are unitless, they represent fractions of the minimum difference","in bar positions in the data."].join(" ")}}},99486:(e,t,r)=>{"use strict";var n=r(53787),i=r(86280);e.exports=function(e,t,r){var o,a={};function s(r,a){return n.coerce(e[o]||{},t[o],i,r,a)}for(var l=0;l{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(50973),s=r(73355);e.exports=function(e,t,r){var l=e._context.staticPlot,c=t.xaxis,u=t.yaxis,d=t.radialAxis,f=t.angularAxis,h=function(e){var t=e.cxx,r=e.cyy;if(e.vangles)return function(n,i,a,l){var c,u;o.angleDelta(a,l)>0?(c=a,u=l):(c=l,u=a);var d=[s.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,e.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,d,t,r)};return function(e,n,i,a){return o.pathAnnulus(e,n,i,a,t,r)}}(t),p=t.layers.frontplot.select("g.barlayer");o.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=o.ensureSingle(r,"g","points").selectAll("g.point").data(o.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),a=e.rp0=d.c2p(e.s0),s=e.rp1=d.c2p(e.s1),l=e.thetag0=f.c2g(e.p0),p=e.thetag1=f.c2g(e.p1);if(i(a)&&i(s)&&i(l)&&i(p)&&a!==s&&l!==p){var m=d.c2g(e.s1),g=(l+p)/2;e.ct=[c.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=h(a,s,l,p)}else t="M0,0Z";o.ensureSingle(r,"path").attr("d",t)})),a.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},94837:(e,t,r)=>{"use strict";var n=r(37471),i=r(8222),o=r(18022),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(10191).extendFlat,c=n.marker,u=c.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the y sample data or coordinates.","See overview for more info."].join(" ")},x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x sample data or coordinates.","See overview for more info."].join(" ")},x0:{valType:"any",editType:"calc+clearAxisTypes",description:["Sets the x coordinate for single-box traces","or the starting coordinate for multi-box traces","set using q1/median/q3.","See overview for more info."].join(" ")},y0:{valType:"any",editType:"calc+clearAxisTypes",description:["Sets the y coordinate for single-box traces","or the starting coordinate for multi-box traces","set using q1/median/q3.","See overview for more info."].join(" ")},dx:{valType:"number",editType:"calc",description:["Sets the x coordinate step for multi-box traces","set using q1/median/q3."].join(" ")},dy:{valType:"number",editType:"calc",description:["Sets the y coordinate step for multi-box traces","set using q1/median/q3."].join(" ")},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),name:{valType:"string",editType:"calc+clearAxisTypes",description:["Sets the trace name.","The trace name appears as the legend item and on hover.","For box traces, the name will also be used for the position","coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are","missing and the position axis is categorical"].join(" ")},q1:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Quartile 1 values.","There should be as many items as the number of boxes desired."].join(" ")},median:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the median values.","There should be as many items as the number of boxes desired."].join(" ")},q3:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Quartile 3 values.","There should be as many items as the number of boxes desired."].join(" ")},lowerfence:{valType:"data_array",editType:"calc",description:["Sets the lower fence values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `lowerfence` is not provided but a sample (in `y` or `x`) is set,","we compute the lower as the last sample point below 1.5 times the IQR."].join(" ")},upperfence:{valType:"data_array",editType:"calc",description:["Sets the upper fence values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `upperfence` is not provided but a sample (in `y` or `x`) is set,","we compute the lower as the last sample point above 1.5 times the IQR."].join(" ")},notched:{valType:"boolean",editType:"calc",description:["Determines whether or not notches are drawn.","Notches displays a confidence interval around the median.","We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N),","where IQR is the interquartile range and N is the sample size.","If two boxes' notches do not overlap there is 95% confidence their medians differ.","See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info.","Defaults to *false* unless `notchwidth` or `notchspan` is set."].join(" ")},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc",description:["Sets the width of the notches relative to","the box' width.","For example, with 0, the notches are as wide as the box(es)."].join(" ")},notchspan:{valType:"data_array",editType:"calc",description:["Sets the notch span from the boxes' `median` values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `notchspan` is not provided but a sample (in `y` or `x`) is set,","we compute it as 1.57 * IQR / sqrt(N),","where N is the sample size."].join(" ")},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc",description:["If *outliers*, only the sample points lying outside the whiskers","are shown","If *suspectedoutliers*, the outlier points are shown and","points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1","are highlighted (see `outliercolor`)","If *all*, all sample points are shown","If *false*, only the box(es) are shown with no sample points","Defaults to *suspectedoutliers* when `marker.outliercolor` or","`marker.line.outliercolor` is set.","Defaults to *all* under the q1/median/q3 signature.","Otherwise defaults to *outliers*."].join(" ")},jitter:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the amount of jitter in the sample points drawn.","If *0*, the sample points align along the distribution axis.","If *1*, the sample points are drawn in a random jitter of width","equal to the width of the box(es)."].join(" ")},pointpos:{valType:"number",min:-2,max:2,editType:"calc",description:["Sets the position of the sample points in relation to the box(es).","If *0*, the sample points are places over the center of the box(es).","Positive (negative) values correspond to positions to the","right (left) for vertical boxes and above (below) for horizontal boxes"].join(" ")},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1,description:["Scales the box size when sizemode=sd","Allowing boxes to be drawn across any stddev range","For example 1-stddev, 3-stddev, 5-stddev"].join(" ")},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles",description:["Sets the upper and lower bound for the boxes","quartiles means box is drawn between Q1 and Q3","SD means the box is drawn between Mean +- Standard Deviation","Argument sdmultiple (default 1) to scale the box size","So it could be drawn 1-stddev, 3-stddev etc"].join(" ")},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc",description:["If *true*, the mean of the box(es)' underlying distribution is","drawn as a dashed line inside the box(es).","If *sd* the standard deviation is also drawn.","Defaults to *true* when `mean` is set.","Defaults to *sd* when `sd` is set","Otherwise defaults to *false*."].join(" ")},mean:{valType:"data_array",editType:"calc",description:["Sets the mean values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `mean` is not provided but a sample (in `y` or `x`) is set,","we compute the mean for each box using the sample values."].join(" ")},sd:{valType:"data_array",editType:"calc",description:["Sets the standard deviation values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `sd` is not provided but a sample (in `y` or `x`) is set,","we compute the standard deviation for each box using the sample values."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the box(es).","If *v* (*h*), the distribution is visualized along","the vertical (horizontal)."].join(" ")},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc",description:["Sets the method used to compute the sample's Q1 and Q3 quartiles.","The *linear* method uses the 25th percentile for Q1 and 75th percentile for Q3","as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html).","The *exclusive* method uses the median to divide the ordered dataset into two halves","if the sample is odd, it does not include the median in either half -","Q1 is then the median of the lower half and","Q3 the median of the upper half.","The *inclusive* method also uses the median to divide the ordered dataset into two halves","but if the sample is odd, it includes the median in both halves -","Q1 is then the median of the lower half and","Q3 the median of the upper half."].join(" ")},width:{valType:"number",min:0,dflt:0,editType:"calc",description:["Sets the width of the box in data coordinate","If *0* (default value) the width is automatically selected based on the positions","of other box traces in the same subplot."].join(" ")},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style",description:"Sets the color of the outlier sample points."},symbol:l({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},c.angle,{arrayOk:!1,editType:"calc"}),size:l({},c.size,{arrayOk:!1,editType:"calc"}),color:l({},c.color,{arrayOk:!1,editType:"style"}),line:{color:l({},u.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:l({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style",description:["Sets the border line color of the outlier sample points.","Defaults to marker.color"].join(" ")},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style",description:["Sets the border line width (in px) of the outlier sample points."].join(" ")},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style",description:"Sets the color of line bounding the box(es)."},width:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the width (in px) of line bounding the box(es)."},editType:"plot"},fillcolor:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc",description:["Sets the width of the whiskers relative to","the box' width.","For example, with 1, the whiskers are as wide as the box(es)."].join(" ")},showwhiskers:{valType:"boolean",editType:"calc",description:["Determines whether or not whiskers are visible.","Defaults to true for `sizemode` *quartiles*, false for *sd*."].join(" ")},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:l({},n.text,{description:["Sets the text elements associated with each sample value.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertext:l({},n.hovertext,{description:"Same as `text`."}),hovertemplate:s({description:["N.B. This only has an effect when hovering on points."].join(" ")}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style",description:["Do the hover effects highlight individual boxes ","or sample points or both?"].join(" ")}}},90497:(e,t,r)=>{"use strict";var n=r(51908),i=r(28605),o=r(64594),a=r(53787),s=r(24956).BADNUM,l=a._;e.exports=function(e,t){var r,c,y,x,b,w,_,k=e._fullLayout,S=i.getFromId(e,t.xaxis||"x"),T=i.getFromId(e,t.yaxis||"y"),M=[],C="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(y=S,x="x",b=T,w="y",_=!!t.yperiodalignment):(y=T,x="y",b=S,w="x",_=!!t.xperiodalignment);var A,E,I,O,P,R,L=function(e,t,r,i){var s,l=t in e,c=t+"0"in e,u="d"+t in e;if(l||c&&u){var d=r.makeCalcdata(e,t);return[o(e,r,t,d).vals,d]}s=c?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(e.name)&&"date"===r.type)?e.name:i;for(var f="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]),h=e._length,p=new Array(h),m=0;mA.uf};if(t._hasPreCompStats){var Z=t[x],U=function(e){return y.d2c((t[e]||[])[r])},V=1/0,H=-1/0;for(r=0;r=A.q1&&A.q3>=A.med){var G=U("lowerfence");A.lf=G!==s&&G<=A.q1?G:h(A,I,O);var q=U("upperfence");A.uf=q!==s&&q>=A.q3?q:p(A,I,O);var Y=U("mean");A.mean=Y!==s?Y:O?a.mean(I,O):(A.q1+A.q3)/2;var X=U("sd");A.sd=Y!==s&&X>=0?X:O?a.stdev(I,O,A.mean):A.q3-A.q1,A.lo=m(A),A.uo=g(A);var K=U("notchspan");K=K!==s&&K>0?K:v(A,O),A.ln=A.med-K,A.un=A.med+K;var $=A.lf,J=A.uf;t.boxpoints&&I.length&&($=Math.min($,I[0]),J=Math.max(J,I[O-1])),t.notched&&($=Math.min($,A.ln),J=Math.max(J,A.un)),A.min=$,A.max=J}else{var Q;a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+A.q1,"median = "+A.med,"q3 = "+A.q3].join("\n")),Q=A.med!==s?A.med:A.q1!==s?A.q3!==s?(A.q1+A.q3)/2:A.q1:A.q3!==s?A.q3:0,A.med=Q,A.q1=A.q3=Q,A.lf=A.uf=Q,A.mean=A.sd=Q,A.ln=A.un=Q,A.min=A.max=Q}V=Math.min(V,A.min),H=Math.max(H,A.max),A.pts2=E.filter(B),M.push(A)}}t._extremes[y._id]=i.findExtremes(y,[V,H],{padded:!0})}else{var ee=y.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ue,de;if((A={}).pos=A[w]=N[r],E=A.pts=ne[r].sort(d),O=(I=A[x]=E.map(f)).length,A.min=I[0],A.max=I[O-1],A.mean=a.mean(I,O),A.sd=a.stdev(I,O,A.mean)*t.sdmultiple,A.med=a.interp(I,.5),O%2&&(le||ce))le?(ue=I.slice(0,O/2),de=I.slice(O/2+1)):ce&&(ue=I.slice(0,O/2+1),de=I.slice(O/2)),A.q1=a.interp(ue,.5),A.q3=a.interp(de,.5);else A.q1=a.interp(I,.25),A.q3=a.interp(I,.75);A.lf=h(A,I,O),A.uf=p(A,I,O),A.lo=m(A),A.uo=g(A);var fe=v(A,O);A.ln=A.med-fe,A.un=A.med+fe,oe=Math.min(oe,A.ln),ae=Math.max(ae,A.un),A.pts2=E.filter(B),M.push(A)}t._extremes[y._id]=i.findExtremes(y,t.notched?ee.concat([oe,ae]):ee,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:k[C],dPos:F,posLetter:w,valLetter:x,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?l(e,"mean \xb1 \u03c3:").replace("\u03c3",1===t.sdmultiple?"\u03c3":t.sdmultiple+"\u03c3"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},k[C]++,M):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(e,t,r){for(var n in c)a.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[n][r[0]])&&(e[c[n]]=t[n][r[0]][r[1]]):e[c[n]]=t[n][r])}function d(e,t){return e.v-t.v}function f(e){return e.v}function h(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function p(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function m(e){return 4*e.q1-3*e.q3}function g(e){return 4*e.q3-3*e.q1}function v(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},27203:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(14511).getAxisGroup,a=["v","h"];function s(e,t,r,a){var s,l,c,u=t.calcdata,d=t._fullLayout,f=a._id,h=f.charAt(0),p=[],m=0;for(s=0;s1,b=1-d[e+"gap"],w=1-d[e+"groupgap"];for(s=0;s0){var H=A.pointpos,W=A.jitter,G=A.marker.size/2,q=0;H+W>=0&&((q=U*(H+W))>M?(V=!0,B=G,N=q):q>D&&(B=G,N=M)),q<=M&&(N=M);var Y=0;H-W<=0&&((Y=-U*(H-W))>C?(V=!0,Z=G,F=Y):Y>z&&(Z=G,F=C)),Y<=C&&(F=C)}else N=M,F=C;var X=new Array(c.length);for(l=0;l{"use strict";var n=r(53787),i=r(44049),o=r(66235),a=r(17239),s=r(25305),l=r(36562),c=r(94837);function u(e,t,r,o){function a(e){var t=0;return e&&e.length&&(t+=1,n.isArrayOrTypedArray(e[0])&&e[0].length&&(t+=1)),t}function s(t){return n.validate(e[t],c[t])}var u,d=r("y"),f=r("x");if("box"===t.type){var h=r("q1"),p=r("median"),m=r("q3");t._hasPreCompStats=h&&h.length&&p&&p.length&&m&&m.length,u=Math.min(n.minRowLength(h),n.minRowLength(p),n.minRowLength(m))}var g,v,y=a(d),x=a(f),b=y&&n.minRowLength(d),w=x&&n.minRowLength(f),_=o.calendar,k={autotypenumbers:o.autotypenumbers};if(t._hasPreCompStats)switch(String(x)+String(y)){case"00":var S=s("x0")||s("dx");g=(s("y0")||s("dy"))&&!S?"h":"v",v=u;break;case"10":g="v",v=Math.min(u,w);break;case"20":g="h",v=Math.min(u,f.length);break;case"01":g="h",v=Math.min(u,b);break;case"02":g="v",v=Math.min(u,d.length);break;case"12":g="v",v=Math.min(u,w,d.length);break;case"21":g="h",v=Math.min(u,f.length,b);break;case"11":v=0;break;case"22":var T,M=!1;for(T=0;T0?(g="v",v=x>0?Math.min(w,b):Math.min(b)):x>0?(g="h",v=Math.min(w)):v=0;if(v){t._length=v;var C=r("orientation",g);t._hasPreCompStats?"v"===C&&0===x?(r("x0",0),r("dx",1)):"h"===C&&0===y&&(r("y0",0),r("dy",1)):"v"===C&&0===x?r("x0"):"h"===C&&0===y&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o)}else t.visible=!1}function d(e,t,r,i){var o=i.prefix,a=n.coerce2(e,t,c,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(a||s)&&(l="suspectedoutliers");var u=r(o+"points",l);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",t.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 t.marker;var d=r("hoveron");"all"!==d&&-1===d.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}e.exports={supplyDefaults:function(e,t,r,i){function s(r,i){return n.coerce(e,t,c,r,i)}if(u(e,t,s,i),!1!==t.visible){a(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||r),s("line.width"),s("fillcolor",o.addOpacity(t.line.color,.5));var f=!1;if(l){var h=s("mean"),p=s("sd");h&&h.length&&(f=!0,p&&p.length&&(f="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",f)),s("showwhiskers","quartiles"===g),"sd"!==g&&"sd"!==m||s("sdmultiple"),s("width"),s("quartilemethod");var v=!1;if(l){var y=s("notchspan");y&&y.length&&(v=!0)}else n.validate(e.notchwidth,c.notchwidth)&&(v=!0);s("notched",v)&&s("notchwidth"),d(e,t,s,{prefix:"box"})}},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,c,e)}for(var a=0;a{"use strict";e.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},86333:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(76719),a=r(66235),s=i.fillText;function l(e,t,r,s){var l,c,u,d,f,h,p,m,g,v,y,x,b,w,_=e.cd,k=e.xa,S=e.ya,T=_[0].trace,M=_[0].t,C="violin"===T.type,A=M.bdPos,E=M.wHover,I=function(e){return u.c2l(e.pos)+M.bPos-u.c2l(h)};C&&"both"!==T.side?("positive"===T.side&&(g=function(e){var t=I(e);return o.inbox(t,t+E,v)},x=A,b=0),"negative"===T.side&&(g=function(e){var t=I(e);return o.inbox(t-E,t,v)},x=0,b=A)):(g=function(e){var t=I(e);return o.inbox(t-E,t+E,v)},x=b=A),w=C?function(e){return o.inbox(e.span[0]-f,e.span[1]-f,v)}:function(e){return o.inbox(e.min-f,e.max-f,v)},"h"===T.orientation?(f=t,h=r,p=w,m=g,l="y",u=S,c="x",d=k):(f=r,h=t,p=g,m=w,l="x",u=k,c="y",d=S);var O=Math.min(1,A/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(p(e)+m(e))/2}v=e.maxHoverDistance-O,y=e.maxSpikeDistance-O;var R=o.getDistanceFunction(s,p,m,P);if(o.getClosest(_,R,e),!1===e.index)return[];var L=_[e.index],j=T.line.color,D=(T.marker||{}).color;a.opacity(j)&&T.line.width?e.color=j:a.opacity(D)&&T.boxpoints?e.color=D:e.color=T.fillcolor,e[l+"0"]=u.c2p(L.pos+M.bPos-b,!0),e[l+"1"]=u.c2p(L.pos+M.bPos+x,!0),e[l+"LabelVal"]=void 0!==L.orig_p?L.orig_p:L.pos;var z=l+"Spike";e.spikeDistance=P(L)*y/v,e[z]=u.c2p(L.pos,!0);var N=T.boxmean||"sd"===T.sizemode||(T.meanline||{}).visible,F=T.boxpoints||T.points,B=F&&N?["max","uf","q3","med","mean","q1","lf","min"]:F&&!N?["max","uf","q3","med","q1","lf","min"]:!F&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],Z=d.range[1]{"use strict";e.exports={attributes:r(94837),layoutAttributes:r(56335),supplyDefaults:r(5580).supplyDefaults,crossTraceDefaults:r(5580).crossTraceDefaults,supplyLayoutDefaults:r(65235).supplyLayoutDefaults,calc:r(90497),crossTraceCalc:r(27203).crossTraceCalc,plot:r(96710).plot,style:r(90714).style,styleOnSelect:r(90714).styleOnSelect,hoverPoints:r(86333).hoverPoints,eventData:r(89202),selectPoints:r(1118),moduleType:"trace",name:"box",basePlotModule:r(48206),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{description:["Each box spans from quartile 1 (Q1) to quartile 3 (Q3).","The second quartile (Q2, i.e. the median) is marked by a line inside the box.","The fences grow outward from the boxes' edges,","by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1),","The sample mean and standard deviation as well as notches and","the sample, outlier and suspected outliers points can be optionally","added to the box plot.","The values and positions corresponding to each boxes can be input","using two signatures.","The first signature expects users to supply the sample values in the `y`","data array for vertical boxes (`x` for horizontal boxes).","By supplying an `x` (`y`) array, one box per distinct `x` (`y`) value is drawn","If no `x` (`y`) {array} is provided, a single box is drawn.","In this case, the box is positioned with the trace `name` or with `x0` (`y0`) if provided.","The second signature expects users to supply the boxes corresponding Q1, median and Q3","statistics in the `q1`, `median` and `q3` data arrays respectively.","Other box features relying on statistics namely `lowerfence`, `upperfence`, `notchspan`","can be set directly by the users.","To have plotly compute them or to show sample points besides the boxes,","users can set the `y` data array for vertical boxes (`x` for horizontal boxes)","to a 2D array with the outer length corresponding","to the number of boxes in the traces and the inner length corresponding the sample size."].join(" ")}}},56335:e=>{"use strict";e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how boxes at the same location coordinate","are displayed on the graph.","If *group*, the boxes are plotted next to one another","centered around the shared location.","If *overlay*, the boxes are plotted over one another,","you might need to set *opacity* to see them multiple boxes.","Has no effect on traces that have *width* set."].join(" ")},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc",description:["Sets the gap (in plot fraction) between boxes of","adjacent location coordinates.","Has no effect on traces that have *width* set."].join(" ")},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc",description:["Sets the gap (in plot fraction) between boxes of","the same location coordinate.","Has no effect on traces that have *width* set."].join(" ")}}},65235:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(56335);function a(e,t,r,i,o){for(var a=o+"Layout",s=!1,l=0;l{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=5,s=.01;function l(e,t,r,o,a){var s,l,c="h"===r.orientation,u=t.val,d=t.pos,f=!!d.rangebreaks,h=o.bPos,p=o.wdPos||0,m=o.bPosPxOffset||0,g=r.whiskerwidth||0,v=!1!==r.showwhiskers,y=r.notched||!1,x=y?1-2*r.notchwidth:1;Array.isArray(o.bdPos)?(s=o.bdPos[0],l=o.bdPos[1]):(s=o.bdPos,l=o.bdPos);var b=e.selectAll("path.box").data("violin"!==r.type||r.box.visible?i.identity:[]);b.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each((function(e){if(e.empty)return n.select(this).attr("d","M0,0Z");var t=d.c2l(e.pos+h,!0),o=d.l2p(t-s)+m,a=d.l2p(t+l)+m,b=f?(o+a)/2:d.l2p(t)+m,w=r.whiskerwidth,_=f?o*w+(1-w)*b:d.l2p(t-p)+m,k=f?a*w+(1-w)*b:d.l2p(t+p)+m,S=d.l2p(t-s*x)+m,T=d.l2p(t+l*x)+m,M="sd"===r.sizemode,C=u.c2p(M?e.mean-e.sd:e.q1,!0),A=M?u.c2p(e.mean+e.sd,!0):u.c2p(e.q3,!0),E=i.constrain(M?u.c2p(e.mean,!0):u.c2p(e.med,!0),Math.min(C,A)+1,Math.max(C,A)-1),I=void 0===e.lf||!1===r.boxpoints||M,O=u.c2p(I?e.min:e.lf,!0),P=u.c2p(I?e.max:e.uf,!0),R=u.c2p(e.ln,!0),L=u.c2p(e.un,!0);c?n.select(this).attr("d","M"+E+","+S+"V"+T+"M"+C+","+o+"V"+a+(y?"H"+R+"L"+E+","+T+"L"+L+","+a:"")+"H"+A+"V"+o+(y?"H"+L+"L"+E+","+S+"L"+R+","+o:"")+"Z"+(v?"M"+C+","+b+"H"+O+"M"+A+","+b+"H"+P+(0===g?"":"M"+O+","+_+"V"+k+"M"+P+","+_+"V"+k):"")):n.select(this).attr("d","M"+S+","+E+"H"+T+"M"+o+","+C+"H"+a+(y?"V"+R+"L"+T+","+E+"L"+a+","+L:"")+"V"+A+"H"+o+(y?"V"+L+"L"+S+","+E+"L"+o+","+R:"")+"Z"+(v?"M"+b+","+C+"V"+O+"M"+b+","+A+"V"+P+(0===g?"":"M"+_+","+O+"H"+k+"M"+_+","+P+"H"+k):""))}))}function c(e,t,r,n){var l=t.x,c=t.y,u=n.bdPos,d=n.bPos,f=r.boxpoints||r.points;i.seedPseudoRandom();var h=e.selectAll("g.points").data(f?function(e){return e.forEach((function(e){e.t=n,e.trace=r})),e}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var p=h.selectAll("path").data((function(e){var t,n,o=e.pts2,l=Math.max((e.max-e.min)/10,e.q3-e.q1),c=1e-9*l,h=l*s,p=[],m=0;if(r.jitter){if(0===l)for(m=1,p=new Array(o.length),t=0;te.lo&&(w.so=!0)}return o}));p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(o.translatePoints,l,c)}function u(e,t,r,o){var a,s,l=t.val,c=t.pos,u=!!c.rangebreaks,d=o.bPos,f=o.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(o.bdPos)?(a=o.bdPos[0],s=o.bdPos[1]):(a=o.bdPos,s=o.bdPos);var p=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=c.c2l(e.pos+d,!0),i=c.l2p(t-a)+f,o=c.l2p(t+s)+f,p=u?(i+o)/2:c.l2p(t)+f,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),v=l.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+m+","+i+"V"+o+("sd"===h?"m0,0L"+g+","+p+"L"+m+","+i+"L"+v+","+p+"Z":"")):n.select(this).attr("d","M"+i+","+m+"H"+o+("sd"===h?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+v+"Z":""))}))}e.exports={plot:function(e,t,r,o){var a=e._context.staticPlot,s=t.xaxis,d=t.yaxis;i.makeTraceGroups(o,r,"trace boxes").each((function(e){var t,r,i=n.select(this),o=e[0],f=o.t,h=o.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():("h"===h.orientation?(t=d,r=s):(t=s,r=d),l(i,{pos:t,val:r},h,f,a),c(i,{x:s,y:d},h,f),u(i,{pos:t,val:r},h,f))}))},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},1118:e=>{"use strict";e.exports=function(e,t){var r,n,i=e.cd,o=e.xaxis,a=e.yaxis,s=[];if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(50973);e.exports={style:function(e,t,r){var a=r||n.select(e).selectAll("g.trace.boxes");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(t){var r=n.select(this),a=t[0].trace,s=a.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(i.stroke,r).call(i.fill,n)}var c=r.selectAll("path.box");if("candlestick"===a.type)c.each((function(e){if(!e.empty){var t=n.select(this),r=a[e.dir];l(t,r.line.width,r.line.color,r.fillcolor),t.style("opacity",a.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,a.line.color,a.fillcolor),r.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,a.line.color);var u=r.selectAll("path.point");o.pointStyle(u,a,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?o.selectedPointStyle(i,n):o.pointStyle(i,n,e)}}},68643:(e,t,r)=>{"use strict";var n=r(53787).extendFlat,i=r(89849).axisHoverFormat,o=r(94962),a=r(94837);function s(e){return{line:{color:n({},a.line.color,{dflt:e}),width:a.line.width,editType:"style"},fillcolor:a.fillcolor,editType:"style"}}e.exports={xperiod:o.xperiod,xperiod0:o.xperiod0,xperiodalignment:o.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:o.x,open:o.open,high:o.high,low:o.low,close:o.close,line:{width:n({},a.line.width,{description:[a.line.width.description,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),editType:"style"},increasing:s(o.increasing.line.color.dflt),decreasing:s(o.decreasing.line.color.dflt),text:o.text,hovertext:o.hovertext,whiskerwidth:n({},a.whiskerwidth,{dflt:0}),hoverlabel:o.hoverlabel}},62866:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(64594),a=r(16707).calcCommon;function s(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}e.exports=function(e,t){var r=e._fullLayout,l=i.getFromId(e,t.xaxis),c=i.getFromId(e,t.yaxis),u=l.makeCalcdata(t,"x"),d=o(t,l,"x",u).vals,f=a(e,t,u,d,c,s);return f.length?(n.extendFlat(f[0].t,{num:r._numBoxes,dPos:n.distinctVals(d).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,f):[{t:{empty:!0}}]}},50080:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87160),a=r(17239),s=r(68643);function l(e,t,r,n){var o=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",i.addOpacity(o,.5))}e.exports=function(e,t,r,i){function c(r,i){return n.coerce(e,t,s,r,i)}o(e,t,c,i)?(a(e,t,i,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),l(e,t,c,"increasing"),l(e,t,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),i._requestRangeslider[t.xaxis]=!0):t.visible=!1}},92829:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"candlestick",basePlotModule:r(48206),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{description:["The candlestick is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The boxes represent the spread between the `open` and `close` values and","the lines represent the spread between the `low` and `high` values","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing candles are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:r(68643),layoutAttributes:r(56335),supplyLayoutDefaults:r(65235).supplyLayoutDefaults,crossTraceCalc:r(27203).crossTraceCalc,supplyDefaults:r(50080),calc:r(62866),plot:r(96710).plot,layerName:"boxlayer",style:r(90714).style,hoverPoints:r(90934).hoverPoints,selectPoints:r(98274)}},47379:(e,t,r)=>{"use strict";var n=r(60373),i=r(99862);e.exports=function(e,t,r,o,a){o("a")||(o("da"),o("a0")),o("b")||(o("db"),o("b0")),function(e,t,r,o){["aaxis","baxis"].forEach((function(a){var s=a.charAt(0),l=e[a]||{},c=i.newContainer(t,a),u={noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:t.font,name:a,data:e[s],calendar:t.calendar,dfltColor:o,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};n(l,c,u),c._categories=c._categories||[],e[a]||"-"===l.type||(e[a]={type:l.type})}))}(e,t,r,a)}},91195:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;function i(e,t){if(!n(e)||t>=10)return null;for(var r=1/0,o=-1/0,a=e.length,s=0;s{"use strict";var n=r(92948),i=r(15732),o=r(18022),a=n({editType:"calc",description:"The default font used for axis & tick labels on this carpet"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=o.defaultLine,e.exports={carpet:{valType:"string",editType:"calc",description:["An identifier for this carpet, so that `scattercarpet` and","`contourcarpet` traces can specify a carpet plot on which","they lie"].join(" ")},x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["A two dimensional array of x coordinates at each carpet point.","If omitted, the plot is a cheater plot and the xaxis is hidden","by default."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:"A two dimensional array of y coordinates at each carpet point."},a:{valType:"data_array",editType:"calc",description:["An array containing values of the first parameter value"].join(" ")},a0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `a`.","Builds a linear space of a coordinates.","Use with `da`","where `a0` is the starting coordinate and `da` the step."].join(" ")},da:{valType:"number",dflt:1,editType:"calc",description:["Sets the a coordinate step.","See `a0` for more info."].join(" ")},b:{valType:"data_array",editType:"calc",description:"A two dimensional array of y coordinates at each carpet point."},b0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `b`.","Builds a linear space of a coordinates.","Use with `db`","where `b0` is the starting coordinate and `db` the step."].join(" ")},db:{valType:"number",dflt:1,editType:"calc",description:["Sets the b coordinate step.","See `b0` for more info."].join(" ")},cheaterslope:{valType:"number",dflt:1,editType:"calc",description:["The shift applied to each successive row of data in creating a cheater plot.","Only used if `x` is been omitted."].join(" ")},aaxis:i,baxis:i,font:a,color:{valType:"color",dflt:o.defaultLine,editType:"plot",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},transforms:void 0}},97639:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,i){var o,a,s,l,c,u,d,f,h,p,m,g,v,y=n(r)?"a":"b",x=("a"===y?e.aaxis:e.baxis).smoothing,b="a"===y?e.a2i:e.b2j,w="a"===y?r:i,_="a"===y?i:r,k="a"===y?t.a.length:t.b.length,S="a"===y?t.b.length:t.a.length,T=Math.floor("a"===y?e.b2j(_):e.a2i(_)),M="a"===y?function(t){return e.evalxy([],t,T)}:function(t){return e.evalxy([],T,t)};x&&(s=Math.max(0,Math.min(S-2,T)),l=T-s,a="a"===y?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var C=b(w[0]),A=b(w[1]),E=C0?Math.floor:Math.ceil,P=E>0?Math.ceil:Math.floor,R=E>0?Math.min:Math.max,L=E>0?Math.max:Math.min,j=O(C+I),D=P(A-I),z=[[d=M(C)]];for(o=j;o*E{"use strict";var n=r(92948),i=r(18022),o=r(45446),a=r(89849).descriptionWithDates,s=r(18693).overrideAll,l=r(93701).P,c=r(10191).extendFlat;e.exports={color:{valType:"color",editType:"calc",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"calc",description:["Sets this axis' title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),offset:{valType:"number",dflt:10,editType:"calc",description:["An additional amount by which to offset the title from the tick","labels, given in pixels.","Note that this used to be set","by the now deprecated `titleoffset` attribute."].join(" ")},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc",description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:o.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc",description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data."].join(" ")},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},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",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")},tickvals:{valType:"data_array",editType:"calc",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},ticktext:{valType:"data_array",editType:"calc",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc",description:["Determines whether axis labels are drawn on the low side,","the high side, both, or neither side of the axis."].join(" ")},labelalias:c({},o.labelalias,{editType:"calc"}),tickfont:n({editType:"calc",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"calc",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"calc",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"calc",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"calc",description:["Hide SI prefix for 10^n if |n| is below this number"].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"calc",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"calc",description:a("tick label")},tickformatstops:s(o.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},labelpadding:{valType:"integer",dflt:10,editType:"calc",description:"Extra padding between label and the axis"},labelprefix:{valType:"string",editType:"calc",description:"Sets a axis label prefix."},labelsuffix:{valType:"string",dflt:"",editType:"calc",description:"Sets a axis label suffix."},showline:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"calc",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the axis line."},gridcolor:{valType:"color",editType:"calc",description:"Sets the axis line color."},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the axis line."},griddash:c({},l,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc",description:"Sets the number of minor grid ticks per major grid tick"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the grid lines."},minorgriddash:c({},l,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:i.lightLine,editType:"calc",description:"Sets the color of the grid lines."},startline:{valType:"boolean",editType:"calc",description:["Determines whether or not a line is drawn at along the starting value","of this axis.","If *true*, the start line is drawn on top of the grid lines."].join(" ")},startlinecolor:{valType:"color",editType:"calc",description:"Sets the line color of the start line."},startlinewidth:{valType:"number",dflt:1,editType:"calc",description:"Sets the width (in px) of the start line."},endline:{valType:"boolean",editType:"calc",description:["Determines whether or not a line is drawn at along the final value","of this axis.","If *true*, the end line is drawn on top of the grid lines."].join(" ")},endlinewidth:{valType:"number",dflt:1,editType:"calc",description:"Sets the width (in px) of the end line."},endlinecolor:{valType:"color",editType:"calc",description:"Sets the line color of the end line."},tick0:{valType:"number",min:0,dflt:0,editType:"calc",description:"The starting index of grid lines along the axis"},dtick:{valType:"number",min:0,dflt:1,editType:"calc",description:"The stride between grid lines along the axis"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc",description:"The starting index of grid lines along the axis"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc",description:"The stride between grid lines along the axis"},_deprecated:{title:{valType:"string",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:n({editType:"calc",description:"Deprecated in favor of `title.font`."}),titleoffset:{valType:"number",dflt:10,editType:"calc",description:"Deprecated in favor of `title.offset`."}},editType:"calc"}},60373:(e,t,r)=>{"use strict";var n=r(24451),i=r(66235).addOpacity,o=r(44049),a=r(53787),s=r(96592),l=r(46139),c=r(33095),u=r(29550),d=r(4738),f=r(36562);e.exports=function(e,t,r){var h=r.letter,p=r.font||{},m=n[h+"axis"];function g(r,n){return a.coerce(e,t,m,r,n)}function v(r,n){return a.coerce2(e,t,m,r,n)}r.name&&(t._name=r.name,t._id=r.name),g("autotypenumbers",r.autotypenumbersDflt);var y=g("type");("-"===y&&(r.data&&function(e,t){if("-"!==e.type)return;var r=e._id.charAt(0),n=e[r+"calendar"];e.type=f(t,n,{autotypenumbers:e.autotypenumbers})}(t,r.data),"-"===t.type?t.type="linear":y=e.type=t.type),g("smoothing"),g("cheatertype"),g("showticklabels"),g("labelprefix",h+" = "),g("labelsuffix"),g("showtickprefix"),g("showticksuffix"),g("separatethousands"),g("tickformat"),g("exponentformat"),g("minexponent"),g("showexponent"),g("categoryorder"),g("tickmode"),g("tickvals"),g("ticktext"),g("tick0"),g("dtick"),"array"===t.tickmode&&(g("arraytick0"),g("arraydtick")),g("labelpadding"),t._hovertitle=h,"date"===y)&&o.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",r.calendar);d(t,r.fullLayout),t.c2p=a.identity;var x=g("color",r.dfltColor),b=x===e.color?x:p.color;g("title.text")&&(a.coerceFont(g,"title.font",{family:p.family,size:a.bigFont(p.size),color:b}),g("title.offset")),g("tickangle"),g("autorange",!t.isValidRange(e.range))&&g("rangemode"),g("range"),t.cleanRange(),g("fixedrange"),s(e,t,g,y),c(e,t,g,y,r),l(e,t,g,y,r),u(e,t,g,{data:r.data,dataAttr:h});var w=v("gridcolor",i(x,.3)),_=v("gridwidth"),k=v("griddash"),S=g("showgrid");S||(delete t.gridcolor,delete t.gridwidth,delete t.griddash);var T=v("startlinecolor",x),M=v("startlinewidth",_);g("startline",t.showgrid||!!T||!!M)||(delete t.startlinecolor,delete t.startlinewidth);var C=v("endlinecolor",x),A=v("endlinewidth",_);return g("endline",t.showgrid||!!C||!!A)||(delete t.endlinecolor,delete t.endlinewidth),S?(g("minorgridcount"),g("minorgridwidth",_),g("minorgriddash",k),g("minorgridcolor",i(w,.06)),t.minorgridcount||(delete t.minorgridwidth,delete t.minorgriddash,delete t.minorgridcolor)):(delete t.gridcolor,delete t.gridwidth,delete t.griddash),"none"===t.showticklabels&&(delete t.tickfont,delete t.tickangle,delete t.showexponent,delete t.exponentformat,delete t.minexponent,delete t.tickformat,delete t.showticksuffix,delete t.showtickprefix),t.showticksuffix||delete t.ticksuffix,t.showtickprefix||delete t.tickprefix,g("tickmode"),t}},23897:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787).isArray1D,o=r(74957),a=r(91195),s=r(14237),l=r(5546),c=r(7287),u=r(48854),d=r(32676),f=r(84446),h=r(55953);e.exports=function(e,t){var r=n.getFromId(e,t.xaxis),p=n.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,v=t.x,y=t.y,x=[];v&&i(v)&&x.push("x"),y&&i(y)&&x.push("y"),x.length&&f(t,m,g,"a","b",x);var b=t._a=t._a||t.a,w=t._b=t._b||t.b;v=t._x||t.x,y=t._y||t.y;var _={};if(t._cheater){var k="index"===m.cheatertype?b.length:b,S="index"===g.cheatertype?w.length:w;v=o(k,S,t.cheaterslope)}t._x=v=u(v),t._y=y=u(y),d(v,b,w),d(y,b,w),h(t),t.setScale();var T=a(v),M=a(y),C=.5*(T[1]-T[0]),A=.5*(T[1]+T[0]),E=.5*(M[1]-M[0]),I=.5*(M[1]+M[0]),O=1.3;return T=[A-C*O,A+C*O],M=[I-E*O,I+E*O],t._extremes[r._id]=n.findExtremes(r,T,{padded:!0}),t._extremes[p._id]=n.findExtremes(p,M,{padded:!0}),s(t,"a","b"),s(t,"b","a"),l(t,m),l(t,g),_.clipsegments=c(t._xctrl,t._yctrl,m,g),_.x=v,_.y=y,_.a=b,_.b=w,[_]}},7287:e=>{"use strict";e.exports=function(e,t,r,n){var i,o,a,s=[],l=!!r.smoothing,c=!!n.smoothing,u=e[0].length-1,d=e.length-1;for(i=0,o=[],a=[];i<=u;i++)o[i]=e[0][i],a[i]=t[0][i];for(s.push({x:o,y:a,bicubic:l}),i=0,o=[],a=[];i<=d;i++)o[i]=e[i][u],a[i]=t[i][u];for(s.push({x:o,y:a,bicubic:c}),i=u,o=[],a=[];i>=0;i--)o[u-i]=e[d][i],a[u-i]=t[d][i];for(s.push({x:o,y:a,bicubic:l}),i=d,o=[],a=[];i>=0;i--)o[d-i]=e[i][0],a[d-i]=t[i][0];return s.push({x:o,y:a,bicubic:c}),s}},14237:(e,t,r)=>{"use strict";var n=r(28605),i=r(10191).extendFlat;e.exports=function(e,t,r){var o,a,s,l,c,u,d,f,h,p,m,g,v,y,x=e["_"+t],b=e[t+"axis"],w=b._gridlines=[],_=b._minorgridlines=[],k=b._boundarylines=[],S=e["_"+r],T=e[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=e._xctrl,C=e._yctrl,A=M[0].length,E=M.length,I=e._a.length,O=e._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function R(n){var i,o,a,s,l,c,u,d,h,p,m,g,v=[],y=[],x={};if("b"===t)for(o=e.b2j(n),a=Math.floor(Math.max(0,Math.min(O-2,o))),s=o-a,x.length=O,x.crossLength=I,x.xy=function(t){return e.evalxy([],t,o)},x.dxy=function(t,r){return e.dxydi([],t,a,r,s)},i=0;i0&&(h=e.dxydi([],i-1,a,0,s),v.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),p=e.dxydi([],i-1,a,1,s),v.push(d[0]-p[0]/3),y.push(d[1]-p[1]/3)),v.push(d[0]),y.push(d[1]),l=d;else for(i=e.a2i(n),c=Math.floor(Math.max(0,Math.min(I-2,i))),u=i-c,x.length=I,x.crossLength=O,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},o=0;o0&&(m=e.dxydj([],c,o-1,u,0),v.push(l[0]+m[0]/3),y.push(l[1]+m[1]/3),g=e.dxydj([],c,o-1,u,1),v.push(d[0]-g[0]/3),y.push(d[1]-g[1]/3)),v.push(d[0]),y.push(d[1]),l=d;return x.axisLetter=t,x.axis=b,x.crossAxis=T,x.value=n,x.constvar=r,x.index=f,x.x=v,x.y=y,x.smoothing=T.smoothing,x}function L(n){var i,o,a,s,l,c=[],u=[],d={};if(d.length=x.length,d.crossLength=S.length,"b"===t)for(a=Math.max(0,Math.min(O-2,n)),l=Math.min(1,Math.max(0,n-a)),d.xy=function(t){return e.evalxy([],t,n)},d.dxy=function(t,r){return e.dxydi([],t,a,r,l)},i=0;ix.length-1||w.push(i(L(a),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u;fx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],v=x[m],o=0;ox[x.length-1]||_.push(i(R(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(L(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(L(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(e,t){return e-t})))[0],d=c[1],f=u;f<=d;f++)h=b.tick0+b.dtick*f,w.push(i(R(h),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u-1;fx[x.length-1]||_.push(i(R(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(R(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(R(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},5546:(e,t,r)=>{"use strict";var n=r(28605),i=r(10191).extendFlat;e.exports=function(e,t){var r,o,a,s=t._labels=[],l=t._gridlines;for(r=0;r{"use strict";e.exports=function(e,t,r,n){var i=e[0]-t[0],o=e[1]-t[1],a=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,d=(c*c*o-l*l*s)*n,f=c*(l+c)*3,h=l*(l+c)*3;return[[t[0]+(f&&u/f),t[1]+(f&&d/f)],[t[0]-(h&&u/h),t[1]-(h&&d/h)]]}},74957:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r){var i,o,a,s,l,c,u=[],d=n(e)?e.length:e,f=n(t)?t.length:t,h=n(e)?e:null,p=n(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(d-1)),p&&(s=(p.length-1)/(p[p.length-1]-p[0])/(f-1));var m=1/0,g=-1/0;for(o=0;o{"use strict";var n=r(62951),i=r(53787).ensureArray;function o(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}e.exports=function(e,t,r,a,s,l){var c,u,d,f,h,p,m,g,v,y,x=r[0].length,b=r.length,w=s?3*x-2:x,_=l?3*b-2:b;for(e=i(e,_),t=i(t,_),d=0;d<_;d++)e[d]=i(e[d],w),t[d]=i(t[d],w);for(u=0,f=0;u{"use strict";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},67623:e=>{"use strict";e.exports=function(e,t,r){return t&&r?function(t,r,n,i,o){var a,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var f=i*i,h=1-i,p=h*h,m=h*i*2,g=-3*p,v=3*(p-m),y=3*(m-f),x=3*f,b=o*o,w=b*o,_=1-o,k=_*_,S=k*_;for(d=0;d{"use strict";e.exports=function(e,t,r){return t&&r?function(t,r,n,i,o){var a,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var f=i*i,h=f*i,p=1-i,m=p*p,g=m*p,v=o*o,y=1-o,x=y*y,b=y*o*2,w=-3*x,_=3*(x-b),k=3*(b-v),S=3*v;for(d=0;d{"use strict";e.exports=function(e,t,r,n,i){var o=t-2,a=r-2;return n&&i?function(t,r,n){var i,s,l,c,u,d;t||(t=[]);var f=Math.max(0,Math.min(Math.floor(r),o)),h=Math.max(0,Math.min(Math.floor(n),a)),p=Math.max(0,Math.min(1,r-f)),m=Math.max(0,Math.min(1,n-h));f*=3,h*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,w=m*m,_=w*m,k=1-m,S=k*k,T=S*k;for(d=0;d{"use strict";var n=r(53787),i=r(36968),o=r(47379),a=r(24451),s=r(18022);e.exports=function(e,t,r,l){function c(r,i){return n.coerce(e,t,a,r,i)}t._clipPathId="clip"+t.uid+"carpet";var u=c("color",s.defaultLine);(n.coerceFont(c,"font"),c("carpet"),o(e,t,l,c,u),t.a&&t.b)?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),i(e,t,c)||(t.visible=!1),t._cheater&&c("cheaterslope")):t.visible=!1}},82315:(e,t,r)=>{"use strict";e.exports={attributes:r(24451),supplyDefaults:r(41055),plot:r(46132),calc:r(23897),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:r(48206),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{description:["The data describing carpet axis layout is set in `y` and (optionally)","also `x`. If only `y` is present, `x` the plot is interpreted as a","cheater plot and is filled in using the `y` values.","`x` and `y` may either be 2D arrays matching with each dimension matching","that of `a` and `b`, or they may be 1D arrays with total length equal to","that of `a` and `b`."].join(" ")}}},94624:e=>{"use strict";e.exports=function(e,t){for(var r,n=e._fullData.length,i=0;i{"use strict";e.exports=function(e,t,r){if(0===e.length)return"";var n,i=[],o=r?3:1;for(n=0;n{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r){var i;for(n(e)?e.length>t.length&&(e=e.slice(0,t.length)):e=[],i=0;i{"use strict";e.exports=function(e,t,r,n,i,o){var a=i[0]*e.dpdx(t),s=i[1]*e.dpdy(r),l=1,c=1;if(o){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),d=Math.sqrt(o[0]*o[0]+o[1]*o[1]),f=(i[0]*o[0]+i[1]*o[1])/u/d;c=Math.max(0,f)}var h=180*Math.atan2(s,a)/Math.PI;return h<-90?(h+=180,l=-l):h>90&&(h-=180,l=-l),{angle:h,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}},46132:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(71596),a=r(20979),s=r(3332),l=r(98224),c=r(53787),u=c.strRotate,d=c.strTranslate,f=r(81653);function h(e,t,r,s,l,c,u){var d="const-"+l+"-lines",f=r.selectAll("."+d).data(c);f.enter().append("path").classed(d,!0).style("vector-effect",u?"none":"non-scaling-stroke"),f.each((function(r){var s=r,l=s.x,c=s.y,u=o([],l,e.c2p),d=o([],c,t.c2p),f="M"+a(u,d,s.smoothing);n.select(this).attr("d",f).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 p(e,t,r,o,a,c,f,h){var p=c.selectAll("text."+h).data(f);p.enter().append("text").classed(h,!0);var m=0,g={};return p.each((function(a,c){var f;if("auto"===a.axis.tickangle)f=s(o,t,r,a.xy,a.dxy);else{var h=(a.axis.tickangle+180)*Math.PI/180;f=s(o,t,r,a.xy,[Math.cos(h),Math.sin(h)])}c||(g={angle:f.angle,flip:f.flip});var p=(a.endAnchor?-1:1)*f.flip,v=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,a.font).text(a.text).call(l.convertToTspans,e),y=i.bBox(this);v.attr("transform",d(f.p[0],f.p[1])+u(f.angle)+d(a.axis.labelpadding*p,.3*y.height)),m=Math.max(m,y.width+a.axis.labelpadding)})),p.exit().remove(),g.maxExtent=m,g}e.exports=function(e,t,r,i){var l=e._context.staticPlot,u=t.xaxis,d=t.yaxis,f=e._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each((function(t){var r=n.select(this),i=t[0],m=i.trace,g=m.aaxis,y=m.baxis,x=c.ensureSingle(r,"g","minorlayer"),b=c.ensureSingle(r,"g","majorlayer"),w=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",m.opacity),h(u,d,b,g,"a",g._gridlines,!0),h(u,d,b,y,"b",y._gridlines,!0),h(u,d,x,g,"a",g._minorgridlines,!0),h(u,d,x,y,"b",y._minorgridlines,!0),h(u,d,w,g,"a-boundary",g._boundarylines,l),h(u,d,w,y,"b-boundary",y._boundarylines,l);var k=p(e,u,d,m,i,_,g._labels,"a-label"),S=p(e,u,d,m,i,_,y._labels,"b-label");!function(e,t,r,n,i,o,a,l){var u,d,f,h,p=c.aggNums(Math.min,null,r.a),m=c.aggNums(Math.max,null,r.a),g=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(p+m),d=g,f=r.ab2xy(u,d,!0),h=r.dxyda_rough(u,d),void 0===a.angle&&c.extendFlat(a,s(r,i,o,f,r.dxydb_rough(u,d)));v(e,t,r,n,f,h,r.aaxis,i,o,a,"a-title"),u=p,d=.5*(g+y),f=r.ab2xy(u,d,!0),h=r.dxydb_rough(u,d),void 0===l.angle&&c.extendFlat(l,s(r,i,o,f,r.dxyda_rough(u,d)));v(e,t,r,n,f,h,r.baxis,i,o,l,"b-title")}(e,_,m,i,u,d,k,S),function(e,t,r,n,i){var s,l,u,d,f=r.select("#"+e._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var h=c.ensureSingle(f,"path","carpetboundary"),p=t.clipsegments,m=[];for(d=0;d90&&y<270,b=n.select(this);b.text(f.title.text).call(l.convertToTspans,e),x&&(w=(-l.lineCount(b)+g)*m*o-w),b.attr("transform",d(t.p[0],t.p[1])+u(t.angle)+d(0,w)).attr("text-anchor","middle").call(i.font,f.title.font)})),b.exit().remove()}},55953:(e,t,r)=>{"use strict";var n=r(30385),i=r(56141).findBin,o=r(59616),a=r(48098),s=r(67623),l=r(65087);e.exports=function(e){var t=e._a,r=e._b,c=t.length,u=r.length,d=e.aaxis,f=e.baxis,h=t[0],p=t[c-1],m=r[0],g=r[u-1],v=t[t.length-1]-t[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;h-=x,p+=x,m-=b,g+=b,e.isVisible=function(e,t){return e>h&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,n=o(e._xctrl,e._yctrl,t,r,d.smoothing,f.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,d.smoothing,f.smoothing),e.dxydi=s([e._xctrl,e._yctrl],d.smoothing,f.smoothing),e.dxydj=l([e._xctrl,e._yctrl],d.smoothing,f.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),c-2)),n=t[r],o=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(o-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,r),u-2)),n=r[t],o=r[t+1];return Math.max(0,Math.min(u-1,t+(e-n)/(o-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,i,o){if(!o&&(nt[c-1]|ir[u-1]))return[!1,!1];var a=e.a2i(n),s=e.b2j(i),l=e.evalxy([],a,s);if(o){var d,f,h,p,m=0,g=0,v=[];nt[c-1]?(d=c-2,f=1,m=(n-t[c-1])/(t[c-1]-t[c-2])):f=a-(d=Math.max(0,Math.min(c-2,Math.floor(a)))),ir[u-1]?(h=u-2,p=1,g=(i-r[u-1])/(r[u-1]-r[u-2])):p=s-(h=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(e.dxydi(v,d,h,f,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(e.dxydj(v,d,h,f,p),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(r.length-2,e));return r[t+1]-r[t]},e.dxyda=function(t,r,n,i){var o=e.dxydi(null,t,r,n,i),a=e.dadi(t,n);return[o[0]/a,o[1]/a]},e.dxydb=function(t,r,n,i){var o=e.dxydj(null,t,r,n,i),a=e.dbdj(r,i);return[o[0]/a,o[1]/a]},e.dxyda_rough=function(t,r,n){var i=v*(n||.1),o=e.ab2xy(t+i,r,!0),a=e.ab2xy(t-i,r,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dxydb_rough=function(t,r,n){var i=y*(n||.1),o=e.ab2xy(t,r+i,!0),a=e.ab2xy(t,r-i,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},32676:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r){var i,o,a,s=[],l=[],c=e[0].length,u=e.length;function d(t,r){var n,i=0,o=0;return t>0&&void 0!==(n=e[r][t-1])&&(o++,i+=n),t0&&void 0!==(n=e[r-1][t])&&(o++,i+=n),r0&&o0&&i1e-5);return n.log("Smoother converged to",S,"after",T,"iterations"),e}},36968:(e,t,r)=>{"use strict";var n=r(53787).isArray1D;e.exports=function(e,t,r){var i=r("x"),o=i&&i.length,a=r("y"),s=a&&a.length;if(!o&&!s)return!1;if(t._cheater=!i,o&&!n(i)||s&&!n(a))t._length=null;else{var l=o?i.length:1/0;s&&(l=Math.min(l,a.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},41225:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(20958),o=r(8753),a=r(27231),s=r(18022).defaultLine,l=r(10191).extendFlat,c=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc",description:["Sets the coordinates via location IDs or names.","See `locationmode` for more info."].join(" ")},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc",description:"Sets the color values."},geojson:l({},i.geojson,{description:["Sets optional GeoJSON data associated with this trace.","If not given, the features on the base map are used.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")}),featureidkey:i.featureidkey,text:l({},i.text,{description:"Sets the text elements associated with each location."}),hovertext:l({},i.hovertext,{description:"Same as `text`."}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the locations."},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({},a.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},a.showlegend,{dflt:!1})},o("",{cLetter:"z",editTypeOverride:"calc"}))},70420:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(1631),a=r(62532),s=r(35637);function l(e){return e&&"string"===typeof e}e.exports=function(e,t){var r,c=t._length,u=new Array(c);r=t.geojson?function(e){return l(e)||n(e)}:l;for(var d=0;d{"use strict";var n=r(53787),i=r(5876),o=r(41225);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("locations"),c=s("z");if(l&&l.length&&n.isArrayOrTypedArray(c)&&c.length){t._length=Math.min(l.length,c.length);var u,d=s("geojson");("string"===typeof d&&""!==d||n.isPlainObject(d))&&(u="geojson-id"),"geojson-id"===s("locationmode",u)&&s("featureidkey"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)}else t.visible=!1}},10873:e=>{"use strict";e.exports=function(e,t,r,n,i){e.location=t.location,e.z=t.z;var o=n[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e.ct=o.ct,e}},61524:(e,t,r)=>{"use strict";var n=r(28605),i=r(41225),o=r(53787).fillText;e.exports=function(e,t,r){var a,s,l,c,u=e.cd,d=u[0].trace,f=e.subplot,h=[t,r],p=[t+360,r];for(s=0;s")}(e,d,a),[e]}},177:(e,t,r)=>{"use strict";e.exports={attributes:r(41225),supplyDefaults:r(32055),colorbar:r(53693),calc:r(70420),calcGeoJSON:r(9446).calcGeoJSON,plot:r(9446).plot,style:r(98316).style,styleOnSelect:r(98316).styleOnSelect,hoverPoints:r(61524),eventData:r(10873),selectPoints:r(12268),moduleType:"trace",name:"choropleth",basePlotModule:r(33857),categories:["geo","noOpacity","showLegend"],meta:{description:["The data that describes the choropleth value-to-color mapping","is set in `z`.","The geographic locations corresponding to each value in `z`","are set in `locations`."].join(" ")}}},9446:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(426),a=r(58268).getTopojsonFeatures,s=r(10351).findExtremes,l=r(98316).style;e.exports={calcGeoJSON:function(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?o.extractTraceFeature(e):a(r,i.topojson),d=[],f=[],h=0;h{"use strict";e.exports=function(e,t){var r,n,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(50973),a=r(10948);function s(e,t){var r=t[0].trace,s=t[0].node3.selectAll(".choroplethlocation"),l=r.marker||{},c=l.line||{},u=a.makeColorScaleFuncFromTrace(r);s.each((function(e){n.select(this).attr("fill",u(e.z)).call(i.stroke,e.mlc||c.color).call(o.dashLine,"",e.mlw||c.width||0).style("opacity",l.opacity)})),o.selectedPointStyle(s,r)}e.exports={style:function(e,t){t&&s(e,t)},styleOnSelect:function(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?o.selectedPointStyle(r.selectAll(".choroplethlocation"),n):s(0,t)}}},94225:(e,t,r)=>{"use strict";var n=r(41225),i=r(8753),o=r(32191).fF,a=r(27231),s=r(10191).extendFlat;e.exports=s({locations:{valType:"data_array",editType:"calc",description:["Sets which features found in *geojson* to plot using","their feature `id` field."].join(" ")},z:{valType:"data_array",editType:"calc",description:"Sets the color values."},geojson:{valType:"any",editType:"calc",description:["Sets the GeoJSON data associated with this trace.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")},featureidkey:s({},n.featureidkey,{description:["Sets the key in GeoJSON features which is used as id to match the items","included in the `locations` array.","Support nested property, for example *properties.name*."].join(" ")}),below:{valType:"string",editType:"plot",description:["Determines if the choropleth polygons will be inserted","before the layer with the specified ID.","By default, choroplethmapbox traces are placed above the water layers.","If set to '',","the layer will be inserted above every existing layer."].join(" ")},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:o({},{keys:["properties"]}),showlegend:s({},a.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},57237:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(10948),a=r(50973),s=r(31360).makeBlank,l=r(426);function c(e){var t,r=e[0].trace,n=r._opts;if(r.selectedpoints){for(var o=a.makeSelectedPointStyleFns(r),s=0;s{"use strict";var n=r(53787),i=r(5876),o=r(94225);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("locations"),c=s("z"),u=s("geojson");n.isArrayOrTypedArray(l)&&l.length&&n.isArrayOrTypedArray(c)&&c.length&&("string"===typeof u&&""!==u||n.isPlainObject(u))?(s("featureidkey"),t._length=Math.min(l.length,c.length),s("below"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)):t.visible=!1}},4950:(e,t,r)=>{"use strict";e.exports={attributes:r(94225),supplyDefaults:r(392),colorbar:r(53693),calc:r(70420),plot:r(29061),hoverPoints:r(61524),eventData:r(10873),selectPoints:r(12268),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"===typeof i&&0===i.indexOf("water"))for(var o=n+1;o{"use strict";var n=r(57237).convert,i=r(57237).convertOnSelect,o=r(93845).traceLayerPrefix;function a(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",o+t+"-fill"],["line",o+t+"-line"]],this.below=null}var s=a.prototype;s.update=function(e){this._update(n(e)),e[0].trace._glTrace=this},s.updateOnSelect=function(e){this._update(i(e))},s._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new a(e,r.uid),o=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}},30681:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates of the vector field","and of the displayed cones."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the y coordinates of the vector field","and of the displayed cones."].join(" ")},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the z coordinates of the vector field","and of the displayed cones."].join(" ")},u:{valType:"data_array",editType:"calc",description:"Sets the x components of the vector field."},v:{valType:"data_array",editType:"calc",description:"Sets the y components of the vector field."},w:{valType:"data_array",editType:"calc",description:"Sets the z components of the vector field."},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled",description:["Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar","(normalized by the max u/v/w norm in the vector field) or as","*absolute* value (in the same units as the vector field)."].join(" ")},sizeref:{valType:"number",editType:"calc",min:0,description:["Adjusts the cone size scaling.","The size of the cones is determined by their u/v/w norm multiplied a factor and `sizeref`.",'This factor (computed internally) corresponds to the minimum "time" to travel across',"two successive x/y/z positions at the average velocity of those two successive positions.","All cones in a given trace use the same factor.","With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*","With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field,","its the default value is half the sample's maximum vector norm."].join(" ")},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm",description:["Sets the cones' anchor with respect to their x/y/z positions.","Note that *cm* denote the cone's center of mass which corresponds to","1/4 from the tail to tip."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets the text elements associated with the cones.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},hovertemplate:o({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(c,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},35830:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){for(var r=t.u,i=t.v,o=t.w,a=Math.min(t.x.length,t.y.length,t.z.length,r.length,i.length,o.length),s=-1/0,l=1/0,c=0;c{"use strict";var n=r(13084).gl_cone3d,i=r(13084).gl_cone3d.createConeMesh,o=r(53787).simpleMap,a=r(95049).parseColorScale,s=r(10948).extractOpts,l=r(51577);function c(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var u=c.prototype;u.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],o=this.data.u[t],a=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,o,a,s,Math.sqrt(o*o+a*a+s*s)];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&void 0!==l[t]?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var d={xaxis:0,yaxis:1,zaxis:2},f={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function p(e,t){var r=e.fullSceneLayout,i=e.dataScale,c={};function u(e,t){var n=r[t],a=i[d[t]];return o(e,(function(e){return n.d2l(e)*a}))}c.vectors=l(u(t.u,"xaxis"),u(t.v,"yaxis"),u(t.w,"zaxis"),t._len),c.positions=l(u(t.x,"xaxis"),u(t.y,"yaxis"),u(t.z,"zaxis"),t._len);var p=s(t);c.colormap=a(t),c.vertexIntensityBounds=[p.min/t._normMax,p.max/t._normMax],c.coneOffset=f[t.anchor],"scaled"===t.sizemode?c.coneSize=t.sizeref||.5:c.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5;var m=n(c),g=t.lightposition;return m.lightPosition=[g.x,g.y,g.z],m.ambient=t.lighting.ambient,m.diffuse=t.lighting.diffuse,m.specular=t.lighting.specular,m.roughness=t.lighting.roughness,m.fresnel=t.lighting.fresnel,m.opacity=t.opacity,t._pad=h[t.anchor]*m.vectorScale*m.coneScale*t._normMax,m}u.update=function(e){this.data=e;var t=p(this.scene,e);this.mesh.update(t)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(e,t){var r=e.glplot.gl,n=p(e,t),o=i(r,n),a=new c(e,t.uid);return a.mesh=o,a.data=t,o._trace=a,e.glplot.add(o),a}},85970:(e,t,r)=>{"use strict";var n=r(53787),i=r(5876),o=r(30681);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),f=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length&&h&&h.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(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},64906:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"cone",basePlotModule:r(36390),categories:["gl3d","showLegend"],attributes:r(30681),supplyDefaults:r(85970),colorbar:{min:"cmin",max:"cmax"},calc:r(35830),plot:r(13107),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{description:["Use cone traces to visualize vector fields.","","Specify a vector field using 6 1D arrays,","3 position arrays `x`, `y` and `z`","and 3 vector component arrays `u`, `v`, `w`.","The cones are drawn exactly at the positions given","by `x`, `y` and `z`."].join(" ")}}},24515:(e,t,r)=>{"use strict";var n=r(38710),i=r(37471),o=r(89849),a=o.axisHoverFormat,s=o.descriptionOnlyNumbers,l=r(8753),c=r(93701).P,u=r(92948),d=r(10191).extendFlat,f=r(81494),h=f.COMPARISON_OPS2,p=f.INTERVAL_OPS,m=i.line;e.exports=d({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:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:n.hovertemplate,texttemplate:d({},n.texttemplate,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",n.texttemplate.description].join(" ")}),textfont:d({},n.textfont,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",n.textfont.description].join(" ")}),hoverongaps:n.hoverongaps,connectgaps:d({},n.connectgaps,{description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in.","It is defaulted to true if `z` is a","one dimensional array","otherwise it is defaulted to false."].join(" ")}),fillcolor:{valType:"color",editType:"calc",description:["Sets the fill color if `contours.type` is *constraint*.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0},description:["Determines whether or not the contour level attributes are","picked by an algorithm.","If *true*, the number of contour levels can be set in `ncontours`.","If *false*, set the contour level attributes in `contours`."].join(" ")},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc",description:["Sets the maximum number of contour levels. The actual number","of contours will be chosen automatically to be less than or","equal to the value of `ncontours`.","Has an effect only if `autocontour` is *true* or if","`contours.size` is missing."].join(" ")},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc",description:["If `levels`, the data is represented as a contour plot with multiple","levels displayed. If `constraint`, the data is represented as constraints","with the invalid region shaded as specified by the `operation` and","`value` parameters."].join(" ")},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the starting contour level value.","Must be less than `contours.end`"].join(" ")},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the end contour level value.","Must be more than `contours.start`"].join(" ")},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the step between each contour level.","Must be positive."].join(" ")},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *heatmap*, a heatmap gradient coloring is applied","between each contour level.","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},showlines:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not the contour lines are drawn.","Has an effect only if `contours.coloring` is set to *fill*."].join(" ")},showlabels:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether to label the contour lines with their values."].join(" ")},labelfont:u({editType:"plot",colorEditType:"style",description:["Sets the font used for labeling the contour levels.","The default color comes from the lines, if shown.","The default family and size come from `layout.font`."].join(" ")}),labelformat:{valType:"string",dflt:"",editType:"plot",description:s("contour label")},operation:{valType:"enumerated",values:[].concat(h).concat(p),dflt:"=",editType:"calc",description:["Sets the constraint operation.","*=* keeps regions equal to `value`","*<* and *<=* keep regions less than `value`","*>* and *>=* keep regions greater than `value`","*[]*, *()*, *[)*, and *(]* keep regions inside `value[0]` to `value[1]`","*][*, *)(*, *](*, *)[* keep regions outside `value[0]` to value[1]`","Open vs. closed intervals make no difference to constraint display, but","all versions are allowed for consistency with filter transforms."].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values of the constraint boundary.","When `operation` is set to one of the comparison values","("+h+")","*value* is expected to be a number.","When `operation` is set to one of the interval values","("+p+")","*value* is expected to be an array of two numbers where the first","is the lower bound and the second is the upper bound."].join(" ")},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:d({},m.color,{editType:"style+colorbars",description:["Sets the color of the contour level.","Has no effect if `contours.coloring` is set to *lines*."].join(" ")}),width:{valType:"number",min:0,editType:"style+colorbars",description:["Sets the contour line width in (in px)","Defaults to *0.5* when `contours.type` is *levels*.","Defaults to *2* when `contour.type` is *constraint*."].join(" ")},dash:c,smoothing:d({},m.smoothing,{description:["Sets the amount of smoothing for the contour lines,","where *0* corresponds to no smoothing."].join(" ")}),editType:"plot"}},l("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},58167:(e,t,r)=>{"use strict";var n=r(10948),i=r(9398),o=r(62897),a=r(69832);e.exports=function(e,t){var r=i(e,t),s=r[0].z;o(t,s);var l,c=t.contours,u=n.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var d=c.start,f=a(c),h=c.size||1,p=Math.floor((f-d)/h)+1;isFinite(h)||(h=1,p=1);var m=d-h/2;l=[m,m+p*h]}else l=s;return n.calc(e,t,{vals:l,cLetter:"z"}),r}},95503:e=>{"use strict";e.exports=function(e,t){var r,n=e[0],i=n.z;switch(t.type){case"levels":var o=Math.min(i[0][0],i[0][1]);for(r=0;ra.level||a.starts.length&&o===a.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":h>c&&(n.prefixBoundary=!0);break;case"<":(hc||n.starts.length&&f===u)&&(n.prefixBoundary=!0);break;case"][":d=Math.min(h[0],h[1]),f=Math.max(h[0],h[1]),dc&&(n.prefixBoundary=!0)}}}},70232:(e,t,r)=>{"use strict";var n=r(10948),i=r(79945),o=r(69832);e.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var a=t.contours,s=t.line,l=a.size||1,c=a.coloring,u=i(t,{isColorbar:!0});if("heatmap"===c){var d=n.extractOpts(t);r._fillgradient=d.reversescale?n.flipScale(d.colorscale):d.colorscale,r._zrange=[d.min,d.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==a.showlines?s.width:0,dash:s.dash},r._levels={start:a.start,end:o(a),size:l}}}},69786:e=>{"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}}},41850:(e,t,r)=>{"use strict";var n=r(51908),i=r(65559),o=r(66235),a=o.addOpacity,s=o.opacity,l=r(81494),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(e,t,r,o,l,d){var f,h,p,m=t.contours,g=r("contours.operation");(m._operation=c[g],function(e,t){var r;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===g?f=m.showlines=!0:(f=r("contours.showlines"),p=r("fillcolor",a((e.line||{}).color||l,.5))),f)&&(h=r("line.color",p&&s(p)?a(t.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),i(r,o,h,d)}},29353:(e,t,r)=>{"use strict";var n=r(81494),i=r(51908);function o(e,t){var r,o=Array.isArray(t);function a(e){return i(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=a(o?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=o?[a(t[0]),a(t[1])]:[a(t),a(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=o?t.map(a):[a(t)]),r}function a(e){return function(t){t=o(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function s(e){return function(t){return{start:t=o(e,t),end:1/0,size:1/0}}}e.exports={"[]":a("[]"),"][":a("]["),">":s(">"),"<":s("<"),"=":s("=")}},4347:e=>{"use strict";e.exports=function(e,t,r,n){var i=n("contours.start"),o=n("contours.end"),a=!1===i||!1===o,s=r("contours.size");!(a?t.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},34213:(e,t,r)=>{"use strict";var n=r(53787);function i(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}e.exports=function(e,t){var r,o,a,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),o=e[0],r=0;r{"use strict";var n=r(53787),i=r(54777),o=r(17239),a=r(41850),s=r(4347),l=r(18779),c=r(51202),u=r(24515);e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,u,r,i)}if(i(e,t,f,d)){o(e,t,d,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate");var h="constraint"===f("contours.type");f("connectgaps",n.isArray1D(t.z)),h?a(e,t,f,d,r):(s(e,t,f,(function(r){return n.coerce2(e,t,u,r)})),l(e,t,f,d)),t.contours&&"heatmap"===t.contours.coloring&&c(f,d)}else t.visible=!1}},77491:(e,t,r)=>{"use strict";var n=r(53787),i=r(29353),o=r(69832);e.exports=function(e,t,r){for(var a="constraint"===e.type?i[e._operation](e.value):e,s=a.size,l=[],c=o(a),u=r.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},f=a.start;f1e3){n.warn("Too many contours, clipping at 1000",e);break}return l}},69832:e=>{"use strict";e.exports=function(e){return e.end+e.size/1e6}},49514:(e,t,r)=>{"use strict";var n=r(53787),i=r(69786);function o(e,t,r,n){return Math.abs(e[0]-t[0])20&&t?208===e||1114===e?n=0===r[0]?1:-1:o=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(e)?o=1:-1!==i.LEFTSTART.indexOf(e)?n=1:-1!==i.TOPSTART.indexOf(e)?o=-1:n=-1;return[n,o]}(f,r,t),p=[l(e,t,[-h[0],-h[1]])],m=e.z.length,g=e.z[0].length,v=t.slice(),y=h.slice();for(u=0;u<1e4;u++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],e.crossings[d]=i.SADDLEREMAINDER[f]):delete e.crossings[d],!(h=i.NEWDELTA[f])){n.log("Found bad marching index:",f,t,e.level);break}p.push(l(e,t,h)),t[0]+=h[0],t[1]+=h[1],d=t.join(","),o(p[p.length-1],p[p.length-2],s,c)&&p.pop();var x=h[0]&&(t[0]<0||t[0]>g-2)||h[1]&&(t[1]<0||t[1]>m-2);if(t[0]===v[0]&&t[1]===v[1]&&h[0]===y[0]&&h[1]===y[1]||r&&x)break;f=e.crossings[d]}1e4===u&&n.log("Infinite loop in contour?");var b,w,_,k,S,T,M,C,A,E,I,O=o(p[0],p[p.length-1],s,c),P=0,R=.2*e.smoothing,L=[],j=0;for(u=1;u=j;u--)if((b=L[u])=j&&b+L[w]C&&A--,e.edgepaths[A]=I.concat(p,E));break}F||(e.edgepaths[C]=p.concat(E))}for(C=0;C{"use strict";var n=r(66235),i=r(88338);e.exports=function(e,t,r,o,a){a||(a={}),a.isContour=!0;var s=i(e,t,r,o,a);return s&&s.forEach((function(e){var t=e.trace;"constraint"===t.contours.type&&(t.fillcolor&&n.opacity(t.fillcolor)?e.color=n.addOpacity(t.fillcolor,1):t.contours.showlines&&n.opacity(t.line.color)&&(e.color=n.addOpacity(t.line.color,1)))})),s}},15675:(e,t,r)=>{"use strict";e.exports={attributes:r(24515),supplyDefaults:r(51726),calc:r(58167),plot:r(77551).plot,style:r(45660),colorbar:r(70232),hoverPoints:r(53233),moduleType:"trace",name:"contour",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{description:["The data from which contour lines are computed is set in `z`.","Data in `z` must be a {2D array} of numbers.","Say that `z` has N rows and M columns, then by default,","these N rows correspond to N y coordinates","(set in `y` or auto-generated) and the M columns","correspond to M x coordinates (set in `x` or auto-generated).","By setting `transpose` to *true*, the above behavior is flipped."].join(" ")}}},65559:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r,i){if(i||(i={}),e("contours.showlabels")){var o=t.font;n.coerceFont(e,"contours.labelfont",{family:o.family,size:o.size,color:r}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}},79945:(e,t,r)=>{"use strict";var n=r(8996),i=r(10948),o=r(69832);e.exports=function(e){var t=e.contours,r=t.start,a=o(t),s=t.size||1,l=Math.floor((a-r)/s)+1,c="lines"===t.coloring?0:1,u=i.extractOpts(e);isFinite(s)||(s=1,l=1);var d,f,h=u.reversescale?i.flipScale(u.colorscale):u.colorscale,p=h.length,m=new Array(p),g=new Array(p),v=u.min,y=u.max;if("heatmap"===t.coloring){for(f=0;f=y)&&(r<=v&&(r=v),a>=y&&(a=y),l=Math.floor((a-r)/s)+1,c=0),f=0;fv&&(m.unshift(v),g.unshift(g[0])),m[m.length-1]{"use strict";var n=r(69786);function i(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(e){var t,r,o,a,s,l,c,u,d,f=e[0].z,h=f.length,p=f[0].length,m=2===h||2===p;for(r=0;r{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(10948),s=r(98224),l=r(28605),c=r(4738),u=r(91581),d=r(59450),f=r(49514),h=r(77491),p=r(34213),m=r(95503),g=r(69786),v=g.LABELOPTIMIZER;function y(e,t){var r,n,a,s,l,c,u,d="",f=0,h=e.edgepaths.map((function(e,t){return t})),p=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function v(e){return Math.abs(e[0]-t[2][0])<.01}for(;h.length;){for(c=o.smoothopen(e.edgepaths[f],e.smoothing),d+=p?c:c.replace(/^M/,"L"),h.splice(h.indexOf(f),1),r=e.edgepaths[f][e.edgepaths[f].length-1],s=-1,a=0;a<4;a++){if(!r){i.log("Missing end?",f,e);break}for(u=r,Math.abs(u[1]-t[0][1])<.01&&!v(r)?n=t[1]:g(r)?n=t[0]:m(r)?n=t[3]:v(r)&&(n=t[2]),l=0;l=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;d+="L"+n}if(s===e.edgepaths.length){i.log("unclosed perimeter path");break}f=s,(p=-1===h.indexOf(f))&&(f=h[0],d+="Z")}for(f=0;fn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*a)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(d)+Math.cos(c)*a);if(f<1||h<1)return 1/0;var p=v.EDGECOST*(1/(f-1)+1/(h-1));p+=v.ANGLECOST*c*c;for(var m=s-u,g=l-d,y=s+u,x=l+d,b=0;b2*v.MAXCOST)break;h&&(s/=2),l=(a=c-s/2)+1.5*s}if(f<=v.MAXCOST)return u},t.addLabelData=function(e,t,r,n){var i=t.fontSize,o=t.width+i/3,a=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),d=Math.cos(c),f=function(e,t){return[s+e*d-t*u,l+e*u+t*d]},h=[f(-o/2,-a/2),f(-o/2,a/2),f(o/2,a/2),f(o/2,-a/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:o,height:a}),n.push(h)},t.drawLabels=function(e,t,r,o,a){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+i+")"}).call(s.convertToTspans,r)})),a){for(var c="",u=0;u{"use strict";var n=r(28605),i=r(53787);function o(e,t,r){var i={type:"linear",range:[e,t]};return n.autoTicks(i,(t-e)/(r||15)),i}e.exports=function(e,t){var r=e.contours;if(e.autocontour){var a=e.zmin,s=e.zmax;(e.zauto||void 0===a)&&(a=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=o(a,s,e.ncontours);r.size=l.dtick,r.start=n.tickFirst(l),l.range.reverse(),r.end=n.tickFirst(l),r.start===a&&(r.start+=r.size),r.end===s&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,d=r.end,f=e._input.contours;if(u>d&&(r.start=f.start=d,d=r.end=f.end=u,u=r.start),!(r.size>0))c=u===d?1:o(u,d,e.ncontours).dtick,f.size=r.size=c}}},45660:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(78290),a=r(79945);e.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=n.select(this),r=e[0].trace,o=r.contours,s=r.line,l=o.size||1,c=o.start,u="constraint"===o.type,d=!u&&"lines"===o.coloring,f=!u&&"fill"===o.coloring,h=d||f?a(r):null;t.selectAll("g.contourlevel").each((function(e){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,d?h(e.level):s.color,s.dash)}));var p=o.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){i.font(n.select(this),{family:p.family,size:p.size,color:p.color||(d?h(e.level):s.color)})})),u)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){var m;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===m&&(m=e.level),h(e.level+.5*l)})),void 0===m&&(m=c),t.selectAll("g.contourbg path").style("fill",h(m-.5*l))}})),o(e)}},18779:(e,t,r)=>{"use strict";var n=r(5876),i=r(65559);e.exports=function(e,t,r,o,a){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,o,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,o,c,a)}},62820:(e,t,r)=>{"use strict";var n=r(38710),i=r(24515),o=r(8753),a=r(10191).extendFlat,s=i.contours;e.exports=a({carpet:{valType:"string",editType:"calc",description:["The `carpet` of the carpet axes on which this contour trace lies"].join(" ")},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",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},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},o("",{cLetter:"z",autoColorDflt:!1}))},15904:(e,t,r)=>{"use strict";var n=r(1631),i=r(53787),o=r(84446),a=r(48854),s=r(83622),l=r(98878),c=r(43006),u=r(2383),d=r(94624),f=r(62897);e.exports=function(e,t){var r=t._carpetTrace=d(e,t);if(r&&r.visible&&"legendonly"!==r.visible){if(!t.a||!t.b){var h=e.data[r.index],p=e.data[t.index];p.a||(p.a=h.a),p.b||(p.b=h.b),u(p,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var r,u,d,f,h,p,m,g=t._carpetTrace,v=g.aaxis,y=g.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(t.z)&&o(t,v,y,"a","b",["z"]);r=t._a=t._a||t.a,f=t._b=t._b||t.b,r=r?v.makeCalcdata(t,"_a"):[],f=f?y.makeCalcdata(t,"_b"):[],u=t.a0||0,d=t.da||1,h=t.b0||0,p=t.db||1,m=t._z=a(t._z||t.z,t.transpose),t._emptypoints=l(m),s(m,t._emptypoints);var x=i.maxRowLength(m),b="scaled"===t.xtype?"":r,w=c(t,b,u,d,x,v),_="scaled"===t.ytype?"":f,k=c(t,_,h,p,m.length,y),S={a:w,b:k,z:m};"levels"===t.contours.type&&"none"!==t.contours.coloring&&n(e,t,{vals:m,containerStr:"",cLetter:"z"});return[S]}(e,t);return f(t,t._z),m}}},2383:(e,t,r)=>{"use strict";var n=r(53787),i=r(54777),o=r(62820),a=r(41850),s=r(4347),l=r(18779);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,o,r,i)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?a(e,t,u,c,r,{hasHover:!1}):(s(e,t,u,(function(r){return n.coerce2(e,t,o,r)})),l(e,t,u,c,{hasHover:!1}))}else t._defaultColor=r,t._length=null}},29969:(e,t,r)=>{"use strict";e.exports={attributes:r(62820),supplyDefaults:r(2383),colorbar:r(70232),calc:r(15904),plot:r(28422),style:r(45660),moduleType:"trace",name:"contourcarpet",basePlotModule:r(48206),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{hrName:"contour_carpet",description:["Plots contours on either the first carpet axis or the","carpet axis with a matching `carpet` attribute. Data `z`","is interpreted as matching that of the corresponding carpet","axis."].join(" ")}}},28422:(e,t,r)=>{"use strict";var n=r(8996),i=r(71596),o=r(20979),a=r(50973),s=r(53787),l=r(59450),c=r(49514),u=r(77551),d=r(69786),f=r(34213),h=r(77491),p=r(95503),m=r(94624),g=r(97639);function v(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),o=i.x-n.x,a=i.y-n.y,s=Math.sqrt(o*o+a*a);return[o/s,a/s]}function y(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function x(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-r*r)/r}e.exports=function(e,t,r,b){var w=t.xaxis,_=t.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],S=k.trace,T=S._carpetTrace=m(e,S),M=e.calcdata[T.index][0];if(T.visible&&"legendonly"!==T.visible){var C=k.a,A=k.b,E=S.contours,I=h(E,t,k),O="constraint"===E.type,P=E._operation,R=O?"="===P?"lines":"fill":E.coloring,L=[[C[0],A[A.length-1]],[C[C.length-1],A[A.length-1]],[C[C.length-1],A[0]],[C[0],A[0]]];l(I);var j=1e-8*(C[C.length-1]-C[0]),D=1e-8*(A[A.length-1]-A[0]);c(I,j,D);var z,N,F,B,Z=I;"constraint"===E.type&&(Z=f(I,P)),function(e,t){var r,n,i,o,a,s,l,c,u;for(r=0;r=0;B--)z=M.clipsegments[B],N=i([],z.x,w.c2p),F=i([],z.y,_.c2p),N.reverse(),F.reverse(),U.push(o(N,F,z.bicubic));var V="M"+U.join("L")+"Z";!function(e,t,r,n,a,l){var c,u,d,f,h=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||a?[]:[0]);h.enter().append("path"),h.exit().remove();var p=[];for(f=0;f=0&&(f=E,p=m):Math.abs(d[1]-f[1])<_?Math.abs(d[1]-E[1])<_&&(E[0]-d[0])*(f[0]-E[0])>=0&&(f=E,p=m):s.log("endpt to newendpt is not vert. or horz.",d,f,E)}if(p>=0)break;y+=C(d,f),d=f}if(p===t.edgepaths.length){s.log("unclosed perimeter path");break}u=p,(b=-1===x.indexOf(u))&&(u=x[0],y+=C(d,f)+"Z",d=null)}for(u=0;ug&&(n.max=g);n.len=n.max-n.min}(n,r,e,i,c,t.height),!(i.len<(t.width+t.height)*d.LABELMIN)))for(var o=Math.min(Math.ceil(i.len/R),d.LABELMAX),a=0;a{"use strict";var n=r(8753),i=r(32191).fF,o=r(27231),a=r(36018),s=r(10191).extendFlat;e.exports=s({lon:a.lon,lat:a.lat,z:{valType:"data_array",editType:"calc",description:["Sets the points' weight.","For example, a value of 10 would be equivalent to having 10 points of weight 1","in the same spot"].join(" ")},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30,description:["Sets the radius of influence of one `lon` / `lat` point in pixels.","Increasing the value makes the densitymapbox trace smoother, but less detailed."].join(" ")},below:{valType:"string",editType:"plot",description:["Determines if the densitymapbox trace will be inserted","before the layer with the specified ID.","By default, densitymapbox traces are placed below the first","layer of type symbol","If set to '',","the layer will be inserted above every existing layer."].join(" ")},text:a.text,hovertext:a.hovertext,hoverinfo:s({},o.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:i(),showlegend:s({},o.showlegend,{dflt:!1})},n("",{cLetter:"z",editTypeOverride:"calc"}))},20050:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787).isArrayOrTypedArray,o=r(24956).BADNUM,a=r(1631),s=r(53787)._;e.exports=function(e,t){for(var r=t._length,l=new Array(r),c=t.z,u=i(c)&&c.length,d=0;d{"use strict";var n=r(51908),i=r(53787),o=r(66235),a=r(10948),s=r(24956).BADNUM,l=r(31360).makeBlank;e.exports=function(e){var t=e[0].trace,r=!0===t.visible&&0!==t._length,c=t._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:l()};if(!r)return c;var u,d=[],f=t.z,h=t.radius,p=i.isArrayOrTypedArray(f)&&f.length,m=i.isArrayOrTypedArray(h);for(u=0;u0?+h[u]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var b=a.extractOpts(t),w=b.reversescale?a.flipScale(b.colorscale):b.colorscale,_=w[0][1],k=["interpolate",["linear"],["heatmap-density"],0,o.opacity(_)<1?_:o.addOpacity(_,0)];for(u=1;u{"use strict";var n=r(53787),i=r(5876),o=r(66762);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(t._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(e,t,a,s,{prefix:"",cLetter:"z"})):t.visible=!1}},45433:e=>{"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},89704:(e,t,r)=>{"use strict";var n=r(28605),i=r(16016).hoverPoints,o=r(16016).getExtraText;e.exports=function(e,t,r){var a=i(e,t,r);if(a){var s=a[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var d=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(d,d.c2l(u.z),"hover").text}return s.extraText=o(c,u,l[0].t.labels),[s]}}},46717:(e,t,r)=>{"use strict";e.exports={attributes:r(66762),supplyDefaults:r(18010),colorbar:r(53693),formatLabels:r(71652),calc:r(20050),plot:r(95715),hoverPoints:r(89704),eventData:r(45433),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";var n=r(53273),i=r(93845).traceLayerPrefix;function o(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=o.prototype;a.update=function(e){var t=this.subplot,r=this.layerList,i=n(e),o=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),o!==this.below&&(this._removeLayers(),this._addLayers(i,o),this.below=o);for(var a=0;a=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new o(e,r.uid),a=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},60938:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(8222),i=r(37471).line,o=r(27231),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(2537),u=r(10191).extendFlat,d=r(66235);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:a("x"),yhoverformat:a("y"),hovertext:n.hovertext,hovertemplate:s({},{keys:c.eventDataKeys}),hoverinfo:u({},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,description:["Determines which trace information appear on the graph.","In the case of having multiple funnels, percentages & totals","are computed separately (per trace)."].join(" ")},texttemplate:l({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),text:n.text,textposition:n.textposition,insidetextanchor:u({},n.insidetextanchor,{dflt:"middle"}),textangle:u({},n.textangle,{dflt:0}),textfont:n.textfont,insidetextfont:n.insidetextfont,outsidetextfont:n.outsidetextfont,constraintext:n.constraintext,cliponaxis:n.cliponaxis,orientation:u({},n.orientation,{description:["Sets the orientation of the funnels.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal).","By default funnels are tend to be oriented horizontally;","unless only *y* array is presented or orientation is set to *v*.","Also regarding graphs including only 'horizontal' funnels,","*autorange* on the *y-axis* are set to *reversed*."].join(" ")}),offset:u({},n.offset,{arrayOk:!1}),width:u({},n.width,{arrayOk:!1}),marker:function(){var e=u({},n.marker);return delete e.pattern,e}(),connector:{fillcolor:{valType:"color",editType:"style",description:["Sets the fill color."].join(" ")},line:{color:u({},i.color,{dflt:d.defaultLine}),width:u({},i.width,{dflt:0,editType:"plot"}),dash:i.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if connector regions and lines are drawn."].join(" ")},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},8167:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(60938),a=r(35637),s=r(24956).BADNUM;function l(e){return e===s?0:e}e.exports=function(e,t){var r,c,u,d,f,h,p,m,g=n.getFromId(e,t.xaxis||"x"),v=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=g.makeCalcdata(t,"x"),u=v.makeCalcdata(t,"y"),d=i(t,v,"y",u),f=!!t.yperiodalignment,h="y"):(r=v.makeCalcdata(t,"y"),u=g.makeCalcdata(t,"x"),d=i(t,g,"x",u),f=!!t.xperiodalignment,h="x"),c=d.vals;var y,x=Math.min(c.length,r.length),b=new Array(x);for(t._base=[],p=0;p{"use strict";e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},23612:(e,t,r)=>{"use strict";var n=r(39713).setGroupPositions;e.exports=function(e,t){var r,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],f=[];for(i=0;i{"use strict";var n=r(53787),i=r(25305),o=r(6099).handleText,a=r(89016),s=r(17239),l=r(53252),c=r(66235);e.exports={supplyDefaults:function(e,t,r,i){function u(r,i){return n.coerce(e,t,l,r,i)}if(a(e,t,i,u)){s(e,t,i,u),u("xhoverformat"),u("yhoverformat"),u("orientation",t.y&&!t.x?"v":"h"),u("offset"),u("width");var d=u("text");u("hovertext"),u("hovertemplate");var f=u("textposition");o(e,t,i,u,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"===t.textposition||t.texttemplate||u("textinfo",Array.isArray(d)?"text+value":"value");var h=u("marker.color",r);if(u("marker.line.color",c.defaultLine),u("marker.line.width"),u("connector.visible"))u("connector.fillcolor",function(e){var t=n.isArrayOrTypedArray(e)?"#000":e;return c.addOpacity(t,.5*c.opacity(t))}(h)),u("connector.line.width")&&(u("connector.line.color"),u("connector.line.dash"))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,o;function a(e){return n.coerce(o._input,o,l,e)}if("group"===t.funnelmode)for(var s=0;s{"use strict";e.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},91568:(e,t,r)=>{"use strict";var n=r(66235).opacity,i=r(48363).hoverOnBars,o=r(53787).formatPercent;e.exports=function(e,t,r,a,s){var l=i(e,t,r,a,s);if(l){var c=l.cd,u=c[0].trace,d="h"===u.orientation,f=c[l.index];l[(d?"x":"y")+"LabelVal"]=f.s,l.percentInitial=f.begR,l.percentInitialLabel=o(f.begR,1),l.percentPrevious=f.difR,l.percentPreviousLabel=o(f.difR,1),l.percentTotal=f.sumR,l.percentTotalLabel=o(f.sumR,1);var h=f.hi||u.hoverinfo,p=[];if(h&&"none"!==h&&"skip"!==h){var m="all"===h,g=h.split("+"),v=function(e){return m||-1!==g.indexOf(e)};v("percent initial")&&p.push(l.percentInitialLabel+" of initial"),v("percent previous")&&p.push(l.percentPreviousLabel+" of previous"),v("percent total")&&p.push(l.percentTotalLabel+" of total")}return l.extraText=p.join("
"),l.color=function(e,t){var r=e.marker,i=t.mc||r.color,o=t.mlc||r.line.color,a=t.mlw||r.line.width;if(n(i))return i;if(n(o)&&a)return o}(u,f),[l]}}},17923:(e,t,r)=>{"use strict";e.exports={attributes:r(53252),layoutAttributes:r(94540),supplyDefaults:r(94431).supplyDefaults,crossTraceDefaults:r(94431).crossTraceDefaults,supplyLayoutDefaults:r(2010),calc:r(8167),crossTraceCalc:r(23612),plot:r(69324),style:r(17846).style,hoverPoints:r(91568),eventData:r(46101),selectPoints:r(22145),moduleType:"trace",name:"funnel",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Visualize stages in a process using length-encoded bars. This trace can be used","to show data in either a part-to-whole representation wherein each item appears",'in a single stage, or in a "drop-off" representation wherein each item appears in','each stage it traversed. See also the "funnelarea" trace type for a different',"approach to visualizing funnel data."].join(" ")}}},94540:e=>{"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},funnelgap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},2010:(e,t,r)=>{"use strict";var n=r(53787),i=r(94540);e.exports=function(e,t,r){var o=!1;function a(r,o){return n.coerce(e,t,i,r,o)}for(var s=0;s{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(24956).BADNUM,s=r(88430),l=r(22684).clearMinTextSize;function c(e,t,r,n){var i=[],o=[],a=n?t:r,s=n?r:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),i[3]=a.c2p(e.nextS1,!0),o[3]=s.c2p(e.nextP1,!0),n?[i,o]:[o,i]}e.exports=function(e,t,r,u){var d=e._fullLayout;l("funnel",d),function(e,t,r,s){var l=t.xaxis,u=t.yaxis;i.makeTraceGroups(s,r,"trace bars").each((function(r){var s=n.select(this),d=r[0].trace,f=i.ensureSingle(s,"g","regions");if(d.connector&&d.connector.visible){var h="h"===d.orientation,p=f.selectAll("g.region").data(i.identity);p.enter().append("g").classed("region",!0),p.exit().remove();var m=p.size();p.each((function(r,s){if(s===m-1||r.cNext){var d=c(r,l,u,h),f=d[0],p=d[1],g="";f[0]!==a&&p[0]!==a&&f[1]!==a&&p[1]!==a&&f[2]!==a&&p[2]!==a&&f[3]!==a&&p[3]!==a&&(g+=h?"M"+f[0]+","+p[1]+"L"+f[2]+","+p[2]+"H"+f[3]+"L"+f[1]+","+p[1]+"Z":"M"+f[1]+","+p[1]+"L"+f[2]+","+p[3]+"V"+p[2]+"L"+f[1]+","+p[0]+"Z"),""===g&&(g="M0,0Z"),i.ensureSingle(n.select(this),"path").attr("d",g).call(o.setClipUrl,t.layerClipId,e)}}))}else f.remove()}))}(e,t,r,u),function(e,t,r,a){var s=t.xaxis,l=t.yaxis;i.makeTraceGroups(a,r,"trace bars").each((function(r){var a=n.select(this),u=r[0].trace,d=i.ensureSingle(a,"g","lines");if(u.connector&&u.connector.visible&&u.connector.line.width){var f="h"===u.orientation,h=d.selectAll("g.line").data(i.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var p=h.size();h.each((function(r,a){if(a===p-1||r.cNext){var u=c(r,s,l,f),d=u[0],h=u[1],m="";void 0!==d[3]&&void 0!==h[3]&&(f?(m+="M"+d[0]+","+h[1]+"L"+d[2]+","+h[2],m+="M"+d[1]+","+h[1]+"L"+d[3]+","+h[2]):(m+="M"+d[1]+","+h[1]+"L"+d[2]+","+h[3],m+="M"+d[1]+","+h[0]+"L"+d[2]+","+h[2])),""===m&&(m="M0,0Z"),i.ensureSingle(n.select(this),"path").attr("d",m).call(o.setClipUrl,t.layerClipId,e)}}))}else d.remove()}))}(e,t,r,u),s.plot(e,t,r,u,{mode:d.funnelmode,norm:d.funnelmode,gap:d.funnelgap,groupgap:d.funnelgroupgap})}},17846:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(26880).DESELECTDIM,s=r(29527),l=r(22684).resizeText,c=s.styleTextPoints;e.exports={style:function(e,t,r){var s=r||n.select(e).selectAll("g.funnellayer").selectAll("g.trace");l(e,s,"funnel"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var r=n.select(this),s=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s.marker;n.select(this).call(o.fill,e.mc||t.color).call(o.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(r,s,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(o.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},50706:(e,t,r)=>{"use strict";var n=r(10650),i=r(27231),o=r(29707).Y,a=r(32191).fF,s=r(32191).si,l=r(10191).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,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:n.marker.pattern,editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{description:["If there are multiple funnelareas that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")}),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:a({},{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:o({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the ratio between height and width"].join(" ")},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot",description:["Sets the ratio between bottom length and maximum top length."].join(" ")}}},10923:(e,t,r)=>{"use strict";var n=r(44115);t.name="funnelarea",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},81393:(e,t,r)=>{"use strict";var n=r(21412);e.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},56169:(e,t,r)=>{"use strict";var n=r(53787),i=r(50706),o=r(29707).c,a=r(6099).handleText,s=r(24530).handleLabelsAndValues,l=r(24530).handleMarkerDefaults;e.exports=function(e,t,r,c){function u(r,o){return n.coerce(e,t,i,r,o)}var d=u("labels"),f=u("values"),h=s(d,f),p=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),p){t._length=p,l(e,t,c,u),u("scalegroup");var m,g=u("text"),v=u("texttemplate");if(v||(m=u("textinfo",Array.isArray(g)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),v||m&&"none"!==m){var y=u("textposition");a(e,t,c,u,y,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}o(t,c,u),u("title.text")&&(u("title.position"),n.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}else t.visible=!1}},17266:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(10923),categories:["pie-like","funnelarea","showLegend"],attributes:r(50706),layoutAttributes:r(34916),supplyDefaults:r(56169),supplyLayoutDefaults:r(30259),calc:r(81393).calc,crossTraceCalc:r(81393).crossTraceCalc,plot:r(59156),style:r(92527),styleOne:r(68872),meta:{description:["Visualize stages in a process using area-encoded trapezoids. This trace can be used",'to show data in a part-to-whole representation similar to a "pie" trace, wherein','each item appears in a single stage. See also the "funnel" trace type for a different',"approach to visualizing funnel data."].join(" ")}}},34916:(e,t,r)=>{"use strict";var n=r(24873).hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc",description:["Sets the default funnelarea slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendfunnelareacolors`."].join(" ")},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the funnelarea slice colors (whether given by `funnelareacolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},30259:(e,t,r)=>{"use strict";var n=r(53787),i=r(34916);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},59156:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(53787),a=o.strScale,s=o.strTranslate,l=r(98224),c=r(88430).toMoveInsideBar,u=r(22684),d=u.recordMinTextSize,f=u.clearMinTextSize,h=r(22084),p=r(3213),m=p.attachFxHandlers,g=p.determineInsideTextFont,v=p.layoutAreas,y=p.prerenderTitles,x=p.positionTitleOutside,b=p.formatSliceLabel;function w(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function _(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}e.exports=function(e,t){var r=e._context.staticPlot,u=e._fullLayout;f("funnelarea",u),y(t,e),v(t,u._size),o.makeTraceGroups(u._funnelarealayer,t,"trace").each((function(t){var f=n.select(this),p=t[0],v=p.trace;!function(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var o,a=Math.pow(i,2),s=t.vTotal,l=s,c=s*a/(1-a)/s;function u(){var e=Math.sqrt(c);return{x:e,y:-e}}function d(){var e=u();return[e.x,e.y]}var f,h,p=[];for(p.push(d()),f=e.length-1;f>-1;f--)if(!(h=e[f]).hidden){var m=h.v/l;c+=m,p.push(d())}var g=1/0,v=-1/0;for(f=0;f-1;f--)if(!(h=e[f]).hidden){var C=p[M+=1][0],A=p[M][1];h.TL=[-C,A],h.TR=[C,A],h.BL=S,h.BR=T,h.pxmid=_(h.TR,h.BR),S=h.TL,T=h.TR}}(t),f.each((function(){var f=n.select(this).selectAll("g.slice").data(t);f.enter().append("g").classed("slice",!0),f.exit().remove(),f.each((function(a,s){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=v.index;var f=p.cx,y=p.cy,x=n.select(this),_=x.selectAll("path.surface").data([a]);_.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(m,e,t);var k="M"+(f+a.TR[0])+","+(y+a.TR[1])+w(a.TR,a.BR)+w(a.BR,a.BL)+w(a.BL,a.TL)+"Z";_.attr("d",k),b(e,a,p);var S=h.castOption(v.textposition,a.pts),T=x.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each((function(){var r=o.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),h=o.ensureUniformFontSize(e,g(v,a,u.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,h).call(l.convertToTspans,e);var p,m,x,b=i.bBox(r.node()),w=Math.min(a.BL[1],a.BR[1])+y,_=Math.max(a.TL[1],a.TR[1])+y;m=Math.max(a.TL[0],a.BL[0])+f,x=Math.min(a.TR[0],a.BR[0])+f,(p=c(m,x,w,_,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=h.size,d(v.type,p,u),t[s].transform=p,o.setTransormAndDisplay(r,p)}))}}));var y=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var t=o.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),r=v.title.text;v._meta&&(r=o.templateString(r,v._meta)),t.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,v.title.font).call(l.convertToTspans,e);var c=x(p,u._size);t.attr("transform",s(c.x,c.y)+a(Math.min(1,c.scale))+s(c.tx,c.ty))}))}))}))}},92527:(e,t,r)=>{"use strict";var n=r(8996),i=r(68872),o=r(22684).resizeText;e.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");o(e,t,"funnelarea"),t.each((function(t){var r=t[0].trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},38710:(e,t,r)=>{"use strict";var n=r(37471),i=r(27231),o=r(92948),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(8753),u=r(10191).extendFlat;e.exports=u({z:{valType:"data_array",editType:"calc",description:"Sets the z data."},x:u({},n.x,{impliedEdits:{xtype:"array"}}),x0:u({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},n.y,{impliedEdits:{ytype:"array"}}),y0:u({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"calc",description:"Same as `text`."},transpose:{valType:"boolean",dflt:!1,editType:"calc",description:"Transposes the z data."},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes",description:["If *array*, the heatmap's x coordinates are given by *x*","(the default behavior when `x` is provided).","If *scaled*, the heatmap's x coordinates are given by *x0* and *dx*","(the default behavior when `x` is not provided)."].join(" ")},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes",description:["If *array*, the heatmap's y coordinates are given by *y*","(the default behavior when `y` is provided)","If *scaled*, the heatmap's y coordinates are given by *y0* and *dy*","(the default behavior when `y` is not provided)"].join(" ")},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc",description:["Picks a smoothing algorithm use to smooth `z` data."].join(" ")},hoverongaps:{valType:"boolean",dflt:!0,editType:"none",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data have hover labels associated with them."].join(" ")},connectgaps:{valType:"boolean",editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in.","It is defaulted to true if `z` is a","one dimensional array and `zsmooth` is not false;","otherwise it is defaulted to false."].join(" ")},xgap:{valType:"number",dflt:0,min:0,editType:"plot",description:"Sets the horizontal gap (in pixels) between bricks."},ygap:{valType:"number",dflt:0,min:0,editType:"plot",description:"Sets the vertical gap (in pixels) between bricks."},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:o({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style",description:"Sets the text font."}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},9398:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(28605),a=r(64594),s=r(1823),l=r(1631),c=r(84446),u=r(48854),d=r(83622),f=r(98878),h=r(43006),p=r(24956).BADNUM;function m(e){for(var t=[],r=e.length,n=0;n1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(S=0;Sr)return!1}return!0}(M.rangebreaks||C.rangebreaks)&&(k=function(e,t,r){for(var n=[],i=-1,o=0;o{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM;e.exports=function(e,t,r,a){var s,l,c,u,d,f;function h(e){if(n(e))return+e}if(t&&t.transpose){for(s=0,d=0;d{"use strict";e.exports={min:"zmin",max:"zmax"}},84446:(e,t,r)=>{"use strict";var n=r(53787),i=r(24956).BADNUM,o=r(64594);e.exports=function(e,t,r,a,s,l){var c=e._length,u=t.makeCalcdata(e,a),d=r.makeCalcdata(e,s);u=o(e,t,a,u).vals,d=o(e,r,s,d).vals;var f,h,p,m,g=e.text,v=void 0!==g&&n.isArray1D(g),y=e.hovertext,x=void 0!==y&&n.isArray1D(y),b=n.distinctVals(u),w=b.vals,_=n.distinctVals(d),k=_.vals,S=[],T=k.length,M=w.length;for(f=0;f{"use strict";var n=r(53787),i=r(54777),o=r(51202),a=r(17239),s=r(69904),l=r(5876),c=r(38710);e.exports=function(e,t,r,u){function d(r,i){return n.coerce(e,t,c,r,i)}i(e,t,d,u)?(a(e,t,u,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hovertemplate"),o(d,u),s(e,t,d,u),d("hoverongaps"),d("connectgaps",n.isArray1D(t.z)&&!1!==t.zsmooth),l(e,t,u,d,{prefix:"",cLetter:"z"})):t.visible=!1}},98878:(e,t,r)=>{"use strict";var n=r(53787).maxRowLength;e.exports=function(e){var t,r,i,o,a,s,l,c,u=[],d={},f=[],h=e[0],p=[],m=[0,0,0],g=n(e);for(r=0;r=0;a--)(s=((d[[(r=(o=f[a])[0])-1,i=o[1]]]||m)[2]+(d[[r+1,i]]||m)[2]+(d[[r,i-1]]||m)[2]+(d[[r,i+1]]||m)[2])/20)&&(l[o]=[r,i,s],f.splice(a,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(o in l)d[o]=l[o],u.push(l[o])}return u.sort((function(e,t){return t[2]-e[2]}))}},88338:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(28605),a=r(10948).extractOpts;e.exports=function(e,t,r,s,l){l||(l={});var c,u,d,f,h=l.isContour,p=e.cd[0],m=p.trace,g=e.xa,v=e.ya,y=p.x,x=p.y,b=p.z,w=p.xCenter,_=p.yCenter,k=p.zmask,S=m.zhoverformat,T=y,M=x;if(!1!==e.index){try{d=Math.round(e.index[1]),f=Math.round(e.index[0])}catch(F){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(d<0||d>=b[0].length||f<0||f>b.length)return}else{if(n.inbox(t-y[0],t-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(h){var C;for(T=[2*y[0]-y[1]],C=1;C{"use strict";e.exports={attributes:r(38710),supplyDefaults:r(23699),calc:r(9398),plot:r(91581),colorbar:r(53693),style:r(78290),hoverPoints:r(88338),moduleType:"trace",name:"heatmap",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","showLegend"],meta:{description:["The data that describes the heatmap value-to-color mapping","is set in `z`.","Data in `z` can either be a {2D array} of values (ragged or not)","or a 1D array of values.","In the case where `z` is a {2D array},","say that `z` has N rows and M columns.","Then, by default, the resulting heatmap will have N partitions along","the y axis and M partitions along the x axis.","In other words, the i-th row/ j-th column cell in `z`","is mapped to the i-th partition of the y axis","(starting from the bottom of the plot) and the j-th partition","of the x-axis (starting from the left of the plot).","This behavior can be flipped by using `transpose`.","Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) elements.","If M (N), then the coordinates correspond to the center of the","heatmap cells and the cells have equal width.","If M+1 (N+1), then the coordinates correspond to the edges of the","heatmap cells.","In the case where `z` is a 1D {array}, the x and y coordinates must be","provided in `x` and `y` respectively to form data triplets."].join(" ")}}},83622:(e,t,r)=>{"use strict";var n=r(53787),i=[[-1,0],[1,0],[0,-1],[0,1]];function o(e){return.5-.25*Math.min(1,.5*e)}function a(e,t,r){var n,o,a,s,l,c,u,d,f,h,p,m,g,v=0;for(s=0;sm&&(v=Math.max(v,Math.abs(e[o][a]-p)/(g-m))))}return v}e.exports=function(e,t){var r,i=1;for(a(e,t),r=0;r.01;r++)i=a(e,t,o(i));return i>.01&&n.log("interp2d didn't converge quickly",i),e}},51202:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){e("texttemplate");var r=n.extendFlat({},t.font,{color:"auto",size:"auto"});n.coerceFont(e,"textfont",r)}},43006:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o,a,s){var l,c,u,d=[],f=n.traceIs(e,"contour"),h=n.traceIs(e,"histogram"),p=n.traceIs(e,"gl2d");if(i(t)&&t.length>1&&!h&&"category"!==s.type){var m=t.length;if(!(m<=a))return f?t.slice(0,a):t.slice(0,a+1);if(f||p)d=t.slice(0,a);else if(1===a)d=[t[0]-.5,t[0]+.5];else{for(d=[1.5*t[0]-.5*t[1]],u=1;u{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(50973),s=r(28605),l=r(53787),c=r(98224),u=r(48529),d=r(66235),f=r(10948).extractOpts,h=r(10948).makeColorScaleFuncFromTrace,p=r(83580),m=r(81653).LINE_SPACING,g=r(75368),v=r(70059).STYLE,y="heatmap-label";function x(e){return e.selectAll("g."+y)}function b(e){x(e).remove()}function w(e,t){var r=t.length-2,n=l.constrain(l.findBin(e,t),0,r),i=t[n],o=t[n+1],a=l.constrain(n+(e-i)/(o-i)-.5,0,r),s=Math.round(a),c=Math.abs(a-s);return a&&a!==r&&c?{bin0:s,frac:c,bin1:Math.round(s+c/(a-s))}:{bin0:s,bin1:s,frac:0}}function _(e,t){var r=t.length-1,n=l.constrain(l.findBin(e,t),0,r),i=t[n],o=(e-i)/(t[n+1]-i)||0;return o<=0?{bin0:n,bin1:n,frac:0}:o<.5?{bin0:n,bin1:n+1,frac:o}:{bin0:n+1,bin1:n,frac:1-o}}function k(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(255*r[3])}e.exports=function(e,t,r,S){var T=t.xaxis,M=t.yaxis;l.makeTraceGroups(S,r,"hm").each((function(t){var r,S,C,A,E,I,O,P,R=n.select(this),L=t[0],j=L.trace,D=j.xgap||0,z=j.ygap||0,N=L.z,F=L.x,B=L.y,Z=L.xCenter,U=L.yCenter,V=o.traceIs(j,"contour"),H=V?"best":j.zsmooth,W=N.length,G=l.maxRowLength(N),q=!1,Y=!1;for(I=0;void 0===r&&I0;)S=T.c2p(F[I]),I--;for(S0;)E=M.c2p(B[I]),I--;E=T._length||S<=0||A>=M._length||E<=0)return R.selectAll("image").data([]).exit().remove(),void b(R);"fast"===X?($=G,J=W):($=Q,J=ee);var te=document.createElement("canvas");te.width=$,te.height=J;var re,ne,ie=te.getContext("2d",{willReadFrequently:!0}),oe=h(j,{noNumericCheck:!0,returnArray:!0});"fast"===X?(re=q?function(e){return G-1-e}:l.identity,ne=Y?function(e){return W-1-e}:l.identity):(re=function(e){return l.constrain(Math.round(T.c2p(F[e])-r),0,Q)},ne=function(e){return l.constrain(Math.round(M.c2p(B[e])-A),0,ee)});var ae,se,le,ce,ue=ne(0),de=[ue,ue],fe=q?0:1,he=Y?0:1,pe=0,me=0,ge=0,ve=0;function ye(e,t){if(void 0!==e){var r=oe(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),pe+=t,me+=r[0]*t,ge+=r[1]*t,ve+=r[2]*t,r}return[0,0,0,0]}function xe(e,t,r,n){var i=e[r.bin0];if(void 0===i)return ye(void 0,1);var o,a=e[r.bin1],s=t[r.bin0],l=t[r.bin1],c=a-i||0,u=s-i||0;return o=void 0===a?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-a-s)/3:void 0===s?2*(2*l-a-i)/3:l+i-a-s,ye(i+r.frac*c+n.frac*(u+r.frac*o))}if("default"!==X){var be,we=0;try{be=new Uint8Array($*J*4)}catch(vt){be=new Array($*J*4)}if("smooth"===X){var _e,ke,Se,Te=Z||F,Me=U||B,Ce=new Array(Te.length),Ae=new Array(Me.length),Ee=new Array(Q),Ie=Z?_:w,Oe=U?_:w;for(I=0;IXe||Xe>M._length))for(O=We;O$e||$e>T._length)){var Je=u({x:Ke,y:Ye},j,e._fullLayout);Je.x=Ke,Je.y=Ye;var Qe=L.z[I][O];void 0===Qe?(Je.z="",Je.zLabel=""):(Je.z=Qe,Je.zLabel=s.tickText(Ze,Qe,"hover").text);var et=L.text&&L.text[I]&&L.text[I][O];void 0!==et&&!1!==et||(et=""),Je.text=et;var tt=l.texttemplateString(Fe,Je,e._fullLayout._d3locale,Je,j._meta||{});if(tt){var rt=tt.split("
"),nt=rt.length,it=0;for(P=0;P{"use strict";var n=r(8996);e.exports=function(e){n.select(e).selectAll(".hm image").style("opacity",(function(e){return e.trace.opacity}))}},69904:e=>{"use strict";e.exports=function(e,t,r){!1===r("zsmooth")&&(r("xgap"),r("ygap")),r("zhoverformat")}},54777:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(44049);function a(e,t){var r=t(e);return"scaled"===(r?t(e+"type","array"):"scaled")&&(t(e+"0"),t("d"+e)),r}e.exports=function(e,t,r,s,l,c){var u,d,f=r("z");if(l=l||"x",c=c||"y",void 0===f||!f.length)return 0;if(i.isArray1D(e.z)){u=r(l),d=r(c);var h=i.minRowLength(u),p=i.minRowLength(d);if(0===h||0===p)return 0;t._length=Math.min(h,p,f.length)}else{if(u=a(l,r),d=a(c,r),!function(e){for(var t,r=!0,o=!1,a=!1,s=0;s0&&(o=!0);for(var l=0;l{"use strict";for(var n=r(38710),i=r(8753),o=r(10191).extendFlat,a=r(18693).overrideAll,s=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],l={},c=0;c{"use strict";var n=r(13084).gl_heatmap2d,i=r(28605),o=r(55115);function a(e,t){this.scene=e,this.uid=t,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(e.glplot,this.options),this.heatmap._trace=this}var s=a.prototype;s.handlePick=function(e){var t=this.options,r=t.shape,n=e.pointId,i=n%r[0],o=Math.floor(n/r[0]),a=n;return{trace:this,dataCoord:e.dataCoord,traceCoord:[t.x[i],t.y[o],t.z[a]],textLabel:this.textLabels[n],name:this.name,pointIndex:[o,i],hoverinfo:this.hoverinfo}},s.update=function(e,t){var r=t[0];this.index=e.index,this.name=e.name,this.hoverinfo=e.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var a=n[0].length,s=n.length;this.options.shape=[a,s],this.options.x=r.x,this.options.y=r.y,this.options.zsmooth=e.zsmooth;var l=function(e){for(var t=e.colorscale,r=e.zmin,n=e.zmax,i=t.length,a=new Array(i),s=new Array(4*i),l=0;l{"use strict";var n=r(53787),i=r(54777),o=r(5876),a=r(38234);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}i(e,t,l,s)?(l("text"),l("zsmooth"),o(e,t,s,l,{prefix:"",cLetter:"z"})):t.visible=!1}},20131:(e,t,r)=>{"use strict";var n=["*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:r(38234),supplyDefaults:r(84678),colorbar:r(53693),calc:r(9398),plot:r(7930),moduleType:"trace",name:"heatmapgl",basePlotModule:r(27952),categories:["gl","gl2d","2dMap"],meta:{description:[n,"WebGL version of the heatmap trace type."].join(" ")}}},24750:(e,t,r)=>{"use strict";var n=r(8222),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(32191).si,s=r(92948),l=r(77071),c=r(17458),u=r(10191).extendFlat;e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:i("x"),yhoverformat:i("y"),text:u({},n.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:u({},n.hovertext,{description:"Same as `text`."}),orientation:n.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:l("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:l("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:o({},{keys:c.eventDataKeys}),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:u({},n.textposition,{arrayOk:!1}),textfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),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}}},92791:e=>{"use strict";e.exports=function(e,t){for(var r=e.length,n=0,i=0;i{"use strict";e.exports=function(e,t){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",t?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",t?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}}},83321:(e,t,r)=>{"use strict";var n=r(51908);e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,i){var o=i[t];return n(o)?(o=Number(o),r[e]+=o,o):0},avg:function(e,t,r,i,o){var a=i[t];return n(a)&&(a=Number(a),r[e]+=a,o[e]++),0},min:function(e,t,r,i){var o=i[t];if(n(o)){if(o=Number(o),!n(r[e]))return r[e]=o,o;if(r[e]>o){var a=o-r[e];return r[e]=o,a}}return 0},max:function(e,t,r,i){var o=i[t];if(n(o)){if(o=Number(o),!n(r[e]))return r[e]=o,o;if(r[e]{"use strict";var n=r(24956),i=n.ONEAVGYEAR,o=n.ONEAVGMONTH,a=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=r(28605).tickIncrement;function d(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),o="date"===r.type,a=f(i,o),s=0;s<10;s++){var l=f(80*a,o);if(a===l)break;if(!h(l,e,t,o,r,n))break;a=l}return a}function f(e,t){return t&&e>c?e>a?e>1.1*i?i:e>1.1*o?o:a:e>s?s:e>l?l:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,o,s){if(n&&e>a){var l=p(t,o,s),c=p(r,o,s),u=e===i?0:1;return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(e,t,r,n,o){var s,l,c=-1.1*t,f=-.1*t,h=e-f,p=r[0],m=r[1],g=Math.min(d(p+f,p+h,n,o),d(m+f,m+h,n,o)),v=Math.min(d(p+c,p+f,n,o),d(m+c,m+f,n,o));if(g>v&&va){var y=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var a=n.c2d(t,i,o),s=a.indexOf("-",y);s>0&&(a=a.substr(0,s));var c=n.d2c(a,0,o);if(c{"use strict";var n=r(51908),i=r(53787),o=r(44049),a=r(28605),s=r(59251),l=r(83321),c=r(68403),u=r(92791),d=r(87359);function f(e,t,r,s,l){var c,u,d,h,p,m,g,v=s+"bins",y=e._fullLayout,x=t["_"+s+"bingroup"],b=y._histogramBinOpts[x],w="overlay"===y.barmode,_=function(e){return r.r2c(e,0,h)},k=function(e){return r.c2r(e,0,h)},S="date"===r.type?function(e){return e||0===e?i.cleanDate(e,null,h):null}:function(e){return n(e)?Number(e):null};function T(e,t,r){t[e+"Found"]?(t[e]=S(t[e]),null===t[e]&&(t[e]=r[e])):(m[e]=t[e]=r[e],i.nestedProperty(u[0],v+"."+e).set(r[e]))}if(t["_"+s+"autoBinFinished"])delete t["_"+s+"autoBinFinished"];else{u=b.traces;var M=[],C=!0,A=!1,E=!1;for(c=0;cr.r2l(N)&&(B=a.tickIncrement(B,b.size,!0,h)),L.start=r.l2r(B),z||i.nestedProperty(t,v+".start").set(L.start)}var Z=b.end,U=r.r2l(R.end),V=void 0!==U;if((b.endFound||V)&&U!==r.r2l(Z)){var H=V?U:i.aggNums(Math.max,null,p);L.end=r.l2r(H),V||i.nestedProperty(t,v+".start").set(L.end)}var W="autobin"+s;return!1===t._input[W]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[W],delete t[W]),[L,p]}e.exports={calc:function(e,t){var r,o,h,p,m=[],g=[],v="h"===t.orientation,y=a.getFromId(e,v?t.yaxis:t.xaxis),x=v?"y":"x",b={x:"y",y:"x"}[x],w=t[x+"calendar"],_=t.cumulative,k=f(e,t,y,x),S=k[0],T=k[1],M="string"===typeof S.size,C=[],A=M?C:S,E=[],I=[],O=[],P=0,R=t.histnorm,L=t.histfunc,j=-1!==R.indexOf("density");_.enabled&&j&&(R=R.replace(/ ?density$/,""),j=!1);var D,z="max"===L||"min"===L?null:0,N=l.count,F=c[R],B=!1,Z=function(e){return y.r2c(e,0,w)};for(i.isArrayOrTypedArray(t[b])&&"count"!==L&&(D=t[b],B="avg"===L,N=l[L]),r=Z(S.start),h=Z(S.end)+(r-a.tickIncrement(r,S.size,!1,w))/1e6;r=0&&p=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(g,_.direction,_.currentbin);var $=Math.min(m.length,g.length),J=[],Q=0,ee=$-1;for(r=0;r<$;r++)if(g[r]){Q=r;break}for(r=$-1;r>=Q;r--)if(g[r]){ee=r;break}for(r=Q;r<=ee;r++)if(n(m[r])&&n(g[r])){var te={p:m[r],s:g[r],b:0};_.enabled||(te.pts=O[r],G?te.ph0=te.ph1=O[r].length?T[O[r][0]]:m[r]:(t._computePh=!0,te.ph0=H(C[r]),te.ph1=H(C[r+1],!0))),J.push(te)}return 1===J.length&&(J[0].width1=a.tickIncrement(J[0].p,S.size,!1,w)-J[0].p),s(J,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(J,t,X),J},calcAllAutoBins:f}},17458:e=>{"use strict";e.exports={eventDataKeys:["binNumber"]}},46700:(e,t,r)=>{"use strict";var n=r(53787),i=r(24279),o=r(44049).traceIs,a=r(25305),s=n.nestedProperty,l=r(14511).getAxisGroup,c=[{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"}],u=["x","y"];e.exports=function(e,t){var r,d,f,h,p,m,g,v=t._histogramBinOpts={},y=[],x={},b=[];function w(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function _(e){return"v"===e.orientation?"x":"y"}function k(e,r,o){var a=e.uid+"__"+o;r||(r=a);var s=function(e,r){return i.getFromTrace({_fullLayout:t},e,r).type}(e,o),l=e[o+"calendar"]||"",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(o)):(r=a,s!==c.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[r]={traces:[e],dirs:[o],axType:s,calendar:e[o+"calendar"]||""}),e["_"+o+"bingroup"]=r}for(p=0;p{"use strict";var n=r(44049),i=r(53787),o=r(66235),a=r(6099).handleText,s=r(8743),l=r(24750);e.exports=function(e,t,r,c){function u(r,n){return i.coerce(e,t,l,r,n)}var d=u("x"),f=u("y");u("cumulative.enabled")&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var h=u("textposition");a(e,t,c,u,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat");var p=u("orientation",f&&!d?"h":"v"),m="v"===p?"x":"y",g="v"===p?"y":"x",v=d&&f?Math.min(i.minRowLength(d)&&i.minRowLength(f)):i.minRowLength(t[m]||[]);if(v){t._length=v,n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],c),t[g]&&u("histfunc"),u("histnorm"),u("autobin"+m),s(e,t,u,r,c),i.coerceSelectionMarkerOpacity(t,u);var y=(t.marker.line||{}).color,x=n.getComponentMethod("errorbars","supplyDefaults");x(e,t,y||o.defaultLine,{axis:"y"}),x(e,t,y||o.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},56002:e=>{"use strict";e.exports=function(e,t,r,n,i){if(e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(r.cumulative||{}).enabled){var o,a=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(e.pointNumbers=a,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex,r._indexToPoints){o=[];for(var s=0;s{"use strict";var n=r(48363).hoverPoints,i=r(28605).hoverLabelText;e.exports=function(e,t,r,o,a){var s=n(e,t,r,o,a);if(s){var l=(e=s[0]).cd[e.index],c=e.cd[0].trace;if(!c.cumulative.enabled){var u="h"===c.orientation?"y":"x";e[u+"Label"]=i(e[u+"a"],[l.ph0,l.ph1],c[u+"hoverformat"])}return s}}},78799:(e,t,r)=>{"use strict";e.exports={attributes:r(24750),layoutAttributes:r(90871),supplyDefaults:r(92287),crossTraceDefaults:r(46700),supplyLayoutDefaults:r(57690),calc:r(94683).calc,crossTraceCalc:r(39713).crossTraceCalc,plot:r(88430).plot,layerName:"barlayer",style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,colorbar:r(68971),hoverPoints:r(5377),selectPoints:r(22145),eventData:r(56002),moduleType:"trace",name:"histogram",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}}},68403:e=>{"use strict";e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";var n=r(24750),i=r(77071),o=r(38710),a=r(27231),s=r(89849).axisHoverFormat,l=r(32191).fF,c=r(32191).si,u=r(8753),d=r(10191).extendFlat;e.exports=d({x:n.x,y:n.y,z:{valType:"data_array",editType:"calc",description:"Sets the aggregation data."},marker:{color:{valType:"data_array",editType:"calc",description:"Sets the aggregation data."},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:d({},n.bingroup,{description:["Set the `xbingroup` and `ybingroup` default prefix","For example, setting a `bingroup` of *1* on two histogram2d traces","will make them their x-bins and y-bins match separately."].join(" ")}),xbingroup:d({},n.bingroup,{description:["Set a group of histogram traces which will have compatible x-bin settings.","Using `xbingroup`, histogram2d and histogram2dcontour traces ","(on axes of the same axis type) can have compatible x-bin settings.","Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`"].join(" ")}),ybingroup:d({},n.bingroup,{description:["Set a group of histogram traces which will have compatible y-bin settings.","Using `ybingroup`, histogram2d and histogram2dcontour traces ","(on axes of the same axis type) can have compatible y-bin settings.","Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`"].join(" ")}),xgap:o.xgap,ygap:o.ygap,zsmooth:o.zsmooth,xhoverformat:s("x"),yhoverformat:s("y"),zhoverformat:s("z",1),hovertemplate:l({},{keys:"z"}),texttemplate:c({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:o.textfont,showlegend:d({},a.showlegend,{dflt:!1})},u("",{cLetter:"z",autoColorDflt:!1}))},1823:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(83321),a=r(68403),s=r(92791),l=r(87359),c=r(94683).calcAllAutoBins;function u(e,t,r,n){var i,o=new Array(e);if(n)for(i=0;iC&&k.splice(C,k.length-C),M.length>C&&M.splice(C,M.length-C);var A=[],E=[],I=[],O="string"===typeof _.size,P="string"===typeof T.size,R=[],L=[],j=O?R:_,D=P?L:T,z=0,N=[],F=[],B=t.histnorm,Z=t.histfunc,U=-1!==B.indexOf("density"),V="max"===Z||"min"===Z?null:0,H=o.count,W=a[B],G=!1,q=[],Y=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==Z&&(G="avg"===Z,H=o[Z]);var K=_.size,$=x(_.start),J=x(_.end)+($-i.tickIncrement($,K,!1,v))/1e6;for(r=$;r=0&&h=0&&p{"use strict";var n=r(53787),i=r(18867),o=r(69904),a=r(5876),s=r(51202),l=r(54733);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,l,r,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,c),a(e,t,c,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),s(u,c),u("xhoverformat"),u("yhoverformat"))}},82700:(e,t,r)=>{"use strict";var n=r(88338),i=r(28605).hoverLabelText;e.exports=function(e,t,r,o,a){var s=n(e,t,r,o,a);if(s){var l=(e=s[0]).index,c=l[0],u=l[1],d=e.cd[0],f=d.trace,h=d.xRanges[u],p=d.yRanges[c];return e.xLabel=i(e.xa,[h[0],h[1]],f.xhoverformat),e.yLabel=i(e.ya,[p[0],p[1]],f.yhoverformat),s}}},82298:(e,t,r)=>{"use strict";e.exports={attributes:r(54733),supplyDefaults:r(82147),crossTraceDefaults:r(46700),calc:r(9398),plot:r(91581),layerName:"heatmaplayer",colorbar:r(53693),style:r(78290),hoverPoints:r(82700),eventData:r(56002),moduleType:"trace",name:"histogram2d",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{hrName:"histogram_2d",description:["The sample data from which statistics are computed is set in `x`","and `y` (where `x` and `y` represent marginal distributions,","binning is set in `xbins` and `ybins` in this case)","or `z` (where `z` represent the 2D distribution and binning set,","binning is set by `x` and `y` in this case).","The resulting distribution is visualized as a heatmap."].join(" ")}}},18867:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports=function(e,t,r,o){var a=r("x"),s=r("y"),l=i.minRowLength(a),c=i.minRowLength(s);l&&c?(t._length=Math.min(l,c),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o),(r("z")||r("marker.color"))&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")):t.visible=!1}},44112:(e,t,r)=>{"use strict";var n=r(54733),i=r(24515),o=r(8753),a=r(89849).axisHoverFormat,s=r(10191).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,description:"Sets the contour line width in (in px)"}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:n.hovertemplate,texttemplate:i.texttemplate,textfont:i.textfont},o("",{cLetter:"z",editTypeOverride:"calc"}))},54504:(e,t,r)=>{"use strict";var n=r(53787),i=r(18867),o=r(4347),a=r(18779),s=r(51202),l=r(44112);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,l,r,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,(function(r){return n.coerce2(e,t,l,r)})),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),t.contours&&"heatmap"===t.contours.coloring&&s(u,c))}},34395:(e,t,r)=>{"use strict";e.exports={attributes:r(44112),supplyDefaults:r(54504),crossTraceDefaults:r(46700),calc:r(58167),plot:r(77551).plot,layerName:"contourlayer",style:r(45660),colorbar:r(70232),hoverPoints:r(53233),moduleType:"trace",name:"histogram2dcontour",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{hrName:"histogram_2d_contour",description:["The sample data from which statistics are computed is set in `x`","and `y` (where `x` and `y` represent marginal distributions,","binning is set in `xbins` and `ybins` in this case)","or `z` (where `z` represent the 2D distribution and binning set,","binning is set by `x` and `y` in this case).","The resulting distribution is visualized as a contour plot."].join(" ")}}},72607:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(8753),a=r(29707).Y,s=r(10650),l=r(75542),c=r(67304),u=r(50668),d=r(10191).extendFlat,f=r(93701).u;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",description:["When set in conjunction with `tiling.flip`, determines on","which side the root nodes are drawn in the chart. If","`tiling.orientation` is *v* and `tiling.flip` is **, the root","nodes appear at the top. If `tiling.orientation` is *v* and","`tiling.flip` is *y*, the root nodes appear at the bottom. If","`tiling.orientation` is *h* and `tiling.flip` is **, the","root nodes appear at the left. If `tiling.orientation` is *h*","and `tiling.flip` is *x*, the root nodes appear at the right."].join(" ")},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:d({colors:l.marker.colors,line:l.marker.line,pattern:f,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,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.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:a({name:"icicle",trace:!0,editType:"calc"})}},2513:(e,t,r)=>{"use strict";var n=r(44115);t.name="icicle",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},96482:(e,t,r)=>{"use strict";var n=r(27411);t.y=function(e,t){return n.calc(e,t)},t.T=function(e){return n._runCrossTraceCalc("icicle",e)}},24546:(e,t,r)=>{"use strict";var n=r(53787),i=r(72607),o=r(66235),a=r(29707).c,s=r(6099).handleText,l=r(22331).TEXTPAD,c=r(24530).handleMarkerDefaults,u=r(10948),d=u.hasColorscale,f=u.handleDefaults;e.exports=function(e,t,r,u){function h(r,o){return n.coerce(e,t,i,r,o)}var p=h("labels"),m=h("parents");if(p&&p.length&&m&&m.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"),t.texttemplate||h("textinfo",Array.isArray(v)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(e,t,u,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition"),c(e,t,u,h);var x=t._hasColorscale=d(e,"marker","colors")||(e.marker||{}).coloraxis;x&&f(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:o.contrast(u.paper_bgcolor)}}},y&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),a(t,u,h),t._length=null}else t.visible=!1}},94748:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(19331),l=r(70397).styleOne,c=r(50668),u=r(34636),d=r(38638),f=r(96938).formatSliceLabel,h=!1;e.exports=function(e,t,r,p,m){var g=m.width,v=m.height,y=m.viewX,x=m.viewY,b=m.pathSlice,w=m.toMoveInsideSlice,_=m.strTransform,k=m.hasTransition,S=m.handleSlicesExit,T=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,C=m.prevEntry,A=e._context.staticPlot,E=e._fullLayout,I=t[0].trace,O=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),R=-1!==I.textposition.indexOf("bottom"),L=s(r,[g,v],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}).descendants(),j=1/0,D=-1/0;L.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(j=Math.min(j,t),D=Math.max(D,t))})),p=p.data(L,u.getPtId),I._maxVisibleLayers=isFinite(D)?D-j+1:0,p.enter().append("g").classed("slice",!0),S(p,h,{},[g,v],b),p.order();var z=null;if(k&&C){var N=u.getPtId(C);p.each((function(e){null===z&&u.getPtId(e)===N&&(z={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var F=function(){return z||{x0:0,x1:g,y0:0,y1:v}},B=p;return k&&(B=B.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.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-I.tiling.pad),s._hoverY=x(R?s.y1-I.tiling.pad/2:s.y0+I.tiling.pad/2);var p=n.select(this),m=i.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?m.transition().attrTween("d",(function(e){var t=T(e,h,F(),[g,v],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(e){return b(t(e))}})):m.attr("d",b),p.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),m.call(l,s,I,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=f(s,r,I,t,E)||"";var S=i.ensureSingle(p,"g","slicetext"),C=i.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),L=i.ensureUniformFontSize(e,u.determineTextFont(I,s,E.font));C.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":O?"start":"middle").call(o.font,L).call(a.convertToTspans,e),s.textBB=o.bBox(C.node()),s.transform=w(s,{fontSize:L.size}),s.transform.fontSize=L.size,k?C.transition().attrTween("transform",(function(e){var t=M(e,h,F(),[g,v]);return function(e){return _(t(e))}})):C.attr("transform",_(s))})),z}},28507:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"icicle",basePlotModule:r(2513),categories:[],animatable:!0,attributes:r(72607),layoutAttributes:r(91936),supplyDefaults:r(24546),supplyLayoutDefaults:r(98940),calc:r(96482).y,crossTraceCalc:r(96482).T,plot:r(14243),style:r(70397).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The icicle sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}},91936:e=>{"use strict";e.exports={iciclecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default icicle slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendiciclecolors`."].join(" ")},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the icicle slice colors (whether given by `iciclecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},98940:(e,t,r)=>{"use strict";var n=r(53787),i=r(91936);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("iciclecolorway",t.colorway),r("extendiciclecolors")}},19331:(e,t,r)=>{"use strict";var n=r(23554),i=r(72276);e.exports=function(e,t,r){var o=r.flipX,a=r.flipY,s="h"===r.orientation,l=r.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var d=n.partition().padding(r.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||o||a)&&i(d,t,{swapXY:s,flipX:o,flipY:a}),d}},14243:(e,t,r)=>{"use strict";var n=r(62470),i=r(94748);e.exports=function(e,t,r,o){return n(e,t,r,o,{type:"icicle",drawDescendants:i})}},70397:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(22684).resizeText,s=r(74927);function l(e,t,r,n){var a=t.data.data,l=!t.children,c=a.i,u=o.castOption(r,c,"marker.line.color")||i.defaultLine,d=o.castOption(r,c,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",d).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},95399:(e,t,r)=>{"use strict";for(var n=r(27231),i=r(32191).fF,o=r(10191).extendFlat,a=r(58589).colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],c=[],u=0;u][;base64],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:s,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",l.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",c.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:o({},n.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:i({},{keys:["z","color","colormodel"]}),transforms:void 0})},79585:(e,t,r)=>{"use strict";var n=r(53787),i=r(58589),o=r(51908),a=r(28605),s=r(53787).maxRowLength,l=r(89361).A;function c(e,t,r,i){return function(o){return n.constrain((o-e)*t,r,i)}}function u(e,t){return function(r){return n.constrain(r,e,t)}}e.exports=function(e,t){var r,n;if(t._hasZ)r=t.z.length,n=s(t.z);else if(t._hasSource){var d=l(t.source);r=d.height,n=d.width}var f,h=a.getFromId(e,t.xaxis||"x"),p=a.getFromId(e,t.yaxis||"y"),m=h.d2c(t.x0)-t.dx/2,g=p.d2c(t.y0)-t.dy/2,v=[m,m+n*t.dx],y=[g,g+r*t.dy];if(h&&"log"===h.type)for(f=0;f{"use strict";e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}},80338:(e,t,r)=>{"use strict";var n=r(53787),i=r(95399),o=r(58589),a=r(82231).IMAGE_URL_PREFIX;e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=r("z");(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),t._hasZ||t._hasSource)?(r("x0"),r("y0"),r("dx"),r("dy"),t._hasZ?(r("colormodel","rgb"),r("zmin",(s=o.colormodel[t.colormodel]).zminDflt||s.min),r("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=o.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),t._length=null):t.visible=!1}},86166:e=>{"use strict";e.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}},89361:(e,t,r)=>{"use strict";var n=r(2132),i=r(82231).IMAGE_URL_PREFIX,o=r(40918).Buffer;t.A=function(e){var t=e.replace(i,""),r=new o(t,"base64");return n(r)}},58555:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(58589);e.exports=function(e,t,r){var a=e.cd[0],s=a.trace,l=e.xa,c=e.ya;if(!(n.inbox(t-a.x0,t-(a.x0+a.w*s.dx),0)>0||n.inbox(r-a.y0,r-(a.y0+a.h*s.dy),0)>0)){var u,d=Math.floor((t-a.x0)/s.dx),f=Math.floor(Math.abs(r-a.y0)/s.dy);if(s._hasZ?u=a.z[f][d]:s._hasSource&&(u=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,f,1,1).data),u){var h,p=a.hi||s.hoverinfo;if(p){var m=p.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(h=!0)}var g,v=o.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),w=v.suffix,_=[];(s.hovertemplate||h)&&(_.push("["+[b[0]+w[0],b[1]+w[1],b[2]+w[2]].join(", ")),4===x&&_.push(", "+b[3]+w[3]),_.push("]"),_=_.join(""),e.extraText=y.toUpperCase()+": "+_),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[f])?g=s.hovertext[f][d]:Array.isArray(s.text)&&Array.isArray(s.text[f])&&(g=s.text[f][d]);var k=c.c2p(a.y0+(f+.5)*s.dy),S=a.x0+(d+.5)*s.dx,T=a.y0+(f+.5)*s.dy,M="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[f,d],x0:l.c2p(a.x0+d*s.dx),x1:l.c2p(a.x0+(d+1)*s.dx),y0:k,y1:k,color:b,xVal:S,xLabelVal:S,yVal:T,yLabelVal:T,zLabelVal:M,text:g,hovertemplateLabels:{zLabel:M,colorLabel:_,"color[0]Label":b[0]+w[0],"color[1]Label":b[1]+w[1],"color[2]Label":b[2]+w[2],"color[3]Label":b[3]+w[3]}})]}}}},57569:(e,t,r)=>{"use strict";e.exports={attributes:r(95399),supplyDefaults:r(80338),calc:r(79585),plot:r(94428),style:r(41280),hoverPoints:r(58555),eventData:r(86166),moduleType:"trace",name:"image",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{description:["Display an image, i.e. data on a 2D regular raster.","By default, when an image is displayed in a subplot,","its y axis will be reversed (ie. `autorange: 'reversed'`),","constrained to the domain (ie. `constrain: 'domain'`)","and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`)","in order for pixels to be rendered as squares."].join(" ")}}},94428:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.strTranslate,a=r(83580),s=r(58589),l=r(75368),c=r(70059).STYLE;e.exports=function(e,t,r,u){var d=t.xaxis,f=t.yaxis,h=!e._context._exportedPlot&&l();i.makeTraceGroups(u,r,"im").each((function(t){var r=n.select(this),l=t[0],u=l.trace,p=("fast"===u.zsmooth||!1===u.zsmooth&&h)&&!u._hasZ&&u._hasSource&&"linear"===d.type&&"linear"===f.type;u._realImage=p;var m,g,v,y,x,b,w=l.z,_=l.x0,k=l.y0,S=l.w,T=l.h,M=u.dx,C=u.dy;for(b=0;void 0===m&&b0;)g=d.c2p(_+b*M),b--;for(b=0;void 0===y&&b0;)x=f.c2p(k+b*C),b--;if(gR[0];if(L||j){var D=m+A/2,z=y+E/2;O+="transform:"+o(D+"px",z+"px")+"scale("+(L?-1:1)+","+(j?-1:1)+")"+o(-D+"px",-z+"px")+";"}}I.attr("style",O);var N=new Promise((function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===S&&u._canvas.el.height===T&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=S,t.height=T;var r=t.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:t,source:u.source},e()},n.setAttribute("src",u.source)}})).then((function(){var e,t;if(u._hasZ)t=F((function(e,t){return w[t][e]})),e=t.toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var r=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,S,T).data;t=F((function(e,t){var n=4*(t*S+e);return[r[n],r[n+1],r[n+2],r[n+3]]})),e=t.toDataURL("image/png")}I.attr({"xlink:href":e,height:E,width:A,x:m,y:y})}));e._promises.push(N)}function F(e){var t=document.createElement("canvas");t.width=A,t.height=E;var r,n=t.getContext("2d",{willReadFrequently:!0}),o=function(e){return i.constrain(Math.round(d.c2p(_+e*M)-m),0,A)},a=function(e){return i.constrain(Math.round(f.c2p(k+e*C)-y),0,E)},c=s.colormodel[u.colormodel],h=c.colormodel||u.colormodel,p=c.fmt;for(b=0;b{"use strict";var n=r(8996);e.exports=function(e){n.select(e).selectAll(".im image").style("opacity",(function(e){return e[0].trace.opacity}))}},75983:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(10191).extendDeep,o=r(18693).overrideAll,a=r(92948),s=r(18022),l=r(29707).Y,c=r(45446),u=r(99862).templatedArray,d=r(59933),f=r(89849).descriptionOnlyNumbers,h=a({editType:"plot",colorEditType:"plot"}),p={color:{valType:"color",editType:"plot",description:["Sets the background color of the arc."].join(" ")},line:{color:{valType:"color",dflt:s.defaultLine,editType:"plot",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot",description:["Sets the thickness of the bar as a fraction of the total thickness of the gauge."].join(" ")},editType:"calc"},m={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot",description:["Sets the range of this axis."].join(" ")},g=u("step",i({},p,{range:m}));e.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number",description:["Determines how the value is displayed on the graph.","`number` displays the value numerically in text.","`delta` displays the difference to a reference value in text.","Finally, `gauge` displays the value graphically on an axis."].join(" ")},value:{valType:"number",editType:"calc",anim:!0,description:["Sets the number to be displayed."].join(" ")},align:{valType:"enumerated",values:["left","center","right"],editType:"plot",description:["Sets the horizontal alignment of the `text` within the box.","Note that this attribute has no effect if an angular gauge is displayed:","in this case, it is always centered"].join(" ")},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot",description:["Sets the title of this indicator."].join(" ")},align:{valType:"enumerated",values:["left","center","right"],editType:"plot",description:["Sets the horizontal alignment of the title.","It defaults to `center` except for bullet charts","for which it defaults to right."].join(" ")},font:n({},h,{description:["Set the font used to display the title"].join(" ")}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:f("value")},font:n({},h,{description:["Set the font used to display main number"].join(" ")}),prefix:{valType:"string",dflt:"",editType:"plot",description:["Sets a prefix appearing before the number."].join(" ")},suffix:{valType:"string",dflt:"",editType:"plot",description:["Sets a suffix appearing next to the number."].join(" ")},editType:"plot"},delta:{reference:{valType:"number",editType:"calc",description:["Sets the reference value to compute the delta.","By default, it is set to the current value."].join(" ")},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot",description:["Sets the position of delta with respect to the number."].join(" ")},relative:{valType:"boolean",editType:"plot",dflt:!1,description:["Show relative change"].join(" ")},valueformat:{valType:"string",editType:"plot",description:f("value")},increasing:{symbol:{valType:"string",dflt:d.INCREASING.SYMBOL,editType:"plot",description:["Sets the symbol to display for increasing value"].join(" ")},color:{valType:"color",dflt:d.INCREASING.COLOR,editType:"plot",description:["Sets the color for increasing value."].join(" ")},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:d.DECREASING.SYMBOL,editType:"plot",description:["Sets the symbol to display for increasing value"].join(" ")},color:{valType:"color",dflt:d.DECREASING.COLOR,editType:"plot",description:["Sets the color for increasing value."].join(" ")},editType:"plot"},font:n({},h,{description:["Set the font used to display the delta"].join(" ")}),prefix:{valType:"string",dflt:"",editType:"plot",description:["Sets a prefix appearing before the delta."].join(" ")},suffix:{valType:"string",dflt:"",editType:"plot",description:["Sets a suffix appearing next to the delta."].join(" ")},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"],description:["Set the shape of the gauge"].join(" ")},bar:i({},p,{color:{dflt:"green"},description:["Set the appearance of the gauge's value"].join(" ")}),bgcolor:{valType:"color",editType:"plot",description:"Sets the gauge background color."},bordercolor:{valType:"color",dflt:s.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the gauge."},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot",description:"Sets the width (in px) of the border enclosing the gauge."},axis:o({range:m,visible:n({},c.visible,{dflt:!0}),tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:n({},c.ticks,{dflt:"outside"}),ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:a({description:"Sets the color bar's tick label font"}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,editType:"plot"},"plot"),steps:g,threshold:{line:{color:n({},p.line.color,{description:["Sets the color of the threshold line."].join(" ")}),width:n({},p.line.width,{dflt:1,description:["Sets the width (in px) of the threshold line."].join(" ")}),editType:"plot"},thickness:n({},p.thickness,{dflt:.85,description:["Sets the thickness of the threshold line as a fraction of the thickness of the gauge."].join(" ")}),value:{valType:"number",editType:"calc",dflt:!1,description:["Sets a treshold value drawn as a line."].join(" ")},editType:"plot"},description:"The gauge of the Indicator plot.",editType:"plot"}}},94240:(e,t,r)=>{"use strict";var n=r(44115);t.name="indicator",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},76980:e=>{"use strict";e.exports={calc:function(e,t){var r=[],n=t.value;"number"!==typeof t._lastValue&&(t._lastValue=t.value);var i=t._lastValue,o=i;return t._hasDelta&&"number"===typeof t.delta.reference&&(o=t.delta.reference),r[0]={y:n,lastY:i,delta:n-o,relativeDelta:(n-o)/o},r}}},39613:e=>{"use strict";e.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},16542:(e,t,r)=>{"use strict";var n=r(53787),i=r(75983),o=r(29707).c,a=r(99862),s=r(80254),l=r(39613),c=r(96592),u=r(64698),d=r(46139),f=r(33095);function h(e,t){function r(r,o){return n.coerce(e,t,i.gauge.steps,r,o)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}e.exports={supplyDefaults:function(e,t,r,p){function m(r,o){return n.coerce(e,t,i,r,o)}o(t,p,m),m("mode"),t._hasNumber=-1!==t.mode.indexOf("number"),t._hasDelta=-1!==t.mode.indexOf("delta"),t._hasGauge=-1!==t.mode.indexOf("gauge");var g=m("value");t._range=[0,"number"===typeof g?1.5*g:1];var v,y,x,b,w,_,k=new Array(2);function S(e,t){return n.coerce(x,b,i.gauge,e,t)}function T(e,t){return n.coerce(w,_,i.gauge.axis,e,t)}if(t._hasNumber&&(m("number.valueformat"),m("number.font.color",p.font.color),m("number.font.family",p.font.family),m("number.font.size"),void 0===t.number.font.size&&(t.number.font.size=l.defaultNumberFontSize,k[0]=!0),m("number.prefix"),m("number.suffix"),v=t.number.font.size),t._hasDelta&&(m("delta.font.color",p.font.color),m("delta.font.family",p.font.family),m("delta.font.size"),void 0===t.delta.font.size&&(t.delta.font.size=(t._hasNumber?.5:1)*(v||l.defaultNumberFontSize),k[1]=!0),m("delta.reference",t.value),m("delta.relative"),m("delta.valueformat",t.delta.relative?"2%":""),m("delta.increasing.symbol"),m("delta.increasing.color"),m("delta.decreasing.symbol"),m("delta.decreasing.color"),m("delta.position"),m("delta.prefix"),m("delta.suffix"),y=t.delta.font.size),t._scaleNumbers=(!t._hasNumber||k[0])&&(!t._hasDelta||k[1])||!1,m("title.font.color",p.font.color),m("title.font.family",p.font.family),m("title.font.size",.25*(v||y||l.defaultNumberFontSize)),m("title.text"),t._hasGauge){(x=e.gauge)||(x={}),b=a.newContainer(t,"gauge"),S("shape"),(t._isBullet="bullet"===t.gauge.shape)||m("title.align","center"),(t._isAngular="angular"===t.gauge.shape)||m("align","center"),S("bgcolor",p.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width"),S("bar.thickness",l.valueThickness*("bullet"===t.gauge.shape?.5:1)),s(x,b,{name:"steps",handleItemDefaults:h}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),w={},x&&(w=x.axis||{}),_=a.newContainer(b,"axis"),T("visible"),t._range=T("range",t._range);var M={outerTicks:!0};c(w,_,T,"linear"),f(w,_,T,"linear",M),d(w,_,T,"linear",M),u(w,_,T,M)}else m("title.align","center"),m("align","center"),t._isAngular=t._isBullet=!1;t._length=null}}},70004:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"indicator",basePlotModule:r(94240),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:r(75983),supplyDefaults:r(16542).supplyDefaults,calc:r(76980).calc,plot:r(20261),meta:{description:["An indicator is used to visualize a single `value` along with some","contextual information such as `steps` or a `threshold`, using a","combination of three visual elements: a number, a delta, and/or a gauge.","Deltas are taken with respect to a `reference`.","Gauges can be either angular or bullet (aka linear) gauges."].join(" ")}}},20261:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).sX,o=r(81105).k4,a=r(53787),s=a.strScale,l=a.strTranslate,c=a.rad2deg,u=r(81653).MID_SHIFT,d=r(50973),f=r(39613),h=r(98224),p=r(28605),m=r(90471),g=r(75486),v=r(45446),y=r(66235),x={left:"start",center:"middle",right:"end"},b={left:0,center:.5,right:1},w=/[yzafpn\xb5mkMGTPEZY]/;function _(e){return e&&e.duration>0}function k(e){e.each((function(e){y.stroke(n.select(this),e.line.color)})).each((function(e){y.fill(n.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function S(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,v,e,t)}return m(i,o,l,s,n),g(i,o,l,s),o}function T(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function M(e,t,r,i){var o=document.createElementNS("http://www.w3.org/2000/svg","text"),a=n.select(o);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(h.convertToTspans,i).call(d.font,t),d.bBox(a.node())}function C(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}e.exports=function(e,t,r,m){var g,v=e._fullLayout;_(r)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each((function(t){var m,A,E,I,O,P=t[0].trace,R=n.select(this),L=P._hasGauge,j=P._isAngular,D=P._isBullet,z=P.domain,N={w:v._size.w*(z.x[1]-z.x[0]),h:v._size.h*(z.y[1]-z.y[0]),l:v._size.l+v._size.w*z.x[0],r:v._size.r+v._size.w*(1-z.x[1]),t:v._size.t+v._size.h*(1-z.y[1]),b:v._size.b+v._size.h*z.y[0]},F=N.l+N.w/2,B=N.t+N.h/2,Z=Math.min(N.w/2,N.h),U=f.innerRadius*Z,V=P.align||"center";if(A=B,L){if(j&&(m=F,A=B+Z/2,E=function(e){return function(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}(e,.9*U)}),D){var H=f.bulletPadding,W=1-f.bulletNumberDomainSize+H;m=N.l+(W+(1-W)*b[V])*N.w,E=function(e){return T(e,(f.bulletNumberDomainSize-H)*N.w,N.h)}}}else m=N.l+b[V]*N.w,E=function(e){return T(e,N.w,N.h)};!function(e,t,r,i){var c,u,f,m=r[0].trace,g=i.numbersX,v=i.numbersY,k=m.align||"center",T=x[k],A=i.transitionOpts,E=i.onComplete,I=a.ensureSingle(t,"g","numbers"),O=[];m._hasNumber&&O.push("number");m._hasDelta&&(O.push("delta"),"left"===m.delta.position&&O.reverse());var P=I.selectAll("text").data(O);function R(t,r,n,i){if(!t.match("s")||n>=0===i>=0||r(n).slice(-1).match(w)||r(i).slice(-1).match(w))return r;var o=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),a=S(e,{tickformat:o});return function(e){return Math.abs(e)<1?p.tickText(a,e).text:r(e)}}function L(){var t=S(e,{tickformat:m.number.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=m.number.suffix,s=m.number.prefix,l=I.select("text.number");function u(){var t="number"===typeof r[0].y?s+i(r[0].y)+a:"-";l.text(t).call(d.font,m.number.font).call(h.convertToTspans,e)}return _(A)?l.transition().duration(A.duration).ease(A.easing).each("end",(function(){u(),E&&E()})).each("interrupt",(function(){u(),E&&E()})).attrTween("text",(function(){var e=n.select(this),t=o(r[0].lastY,r[0].y);m._lastValue=r[0].y;var l=R(m.number.valueformat,i,r[0].lastY,r[0].y);return function(r){e.text(s+l(t(r))+a)}})):u(),c=M(s+i(r[0].y)+a,m.number.font,T,e),l}function j(){var t=S(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!==typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+a},f=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(r[0]));var g=I.select("text.delta");function v(){g.text(c(l(r[0]),i)).call(y.fill,f(r[0])).call(h.convertToTspans,e)}return g.call(d.font,m.delta.font).call(y.fill,f({delta:m._deltaLastValue})),_(A)?g.transition().duration(A.duration).ease(A.easing).tween("text",(function(){var e=n.select(this),t=l(r[0]),a=m._deltaLastValue,s=R(m.delta.valueformat,i,a,t),u=o(a,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,f({delta:u(t)}))}})).each("end",(function(){v(),E&&E()})).each("interrupt",(function(){v(),E&&E()})):v(),u=M(c(l(r[0]),i),m.delta.font,T,e),g}P.enter().append("text"),P.attr("text-anchor",(function(){return T})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var D,z=m.mode+m.align;m._hasDelta&&(D=j(),z+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,z+=m.delta.increasing.symbol+m.delta.decreasing.symbol,f=u);m._hasNumber&&(L(),z+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,f=c);if(m._hasDelta&&m._hasNumber){var N,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],Z=[(u.left+u.right)/2,(u.top+u.bottom)/2],U=.75*m.delta.font.size;"left"===m.delta.position&&(N=C(m,"deltaPos",0,-1*(c.width*b[m.align]+u.width*(1-b[m.align])+U),z,Math.min),F=B[1]-Z[1],f={width:c.width+u.width+U,height:Math.max(c.height,u.height),left:u.left+N,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"right"===m.delta.position&&(N=C(m,"deltaPos",0,c.width*(1-b[m.align])+u.width*b[m.align]+U,z,Math.max),F=B[1]-Z[1],f={width:c.width+u.width+U,height:Math.max(c.height,u.height),left:c.left,right:u.right+N,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"bottom"===m.delta.position&&(N=null,F=u.height,f={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),"top"===m.delta.position&&(N=null,F=c.top,f={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),D.attr({dx:N,dy:F})}(m._hasNumber||m._hasDelta)&&I.attr("transform",(function(){var e=i.numbersScaler(f);z+=e[2];var t,r=C(m,"numbersScale",1,e[0],z,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*f.bottom:v-r*(f.top+f.bottom)/2,m._numbersTop=r*f.top+t;var n=f[k];"center"===k&&(n=(f.left+f.right)/2);var o=g-r*n;return o=C(m,"numbersTranslate",0,o,z,Math.max),l(o,t)+s(r)}))}(e,R,t,{numbersX:m,numbersY:A,numbersScaler:E,transitionOpts:r,onComplete:g}),L&&(I={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},O={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var G=R.selectAll("g.angular").data(j?t:[]);G.exit().remove();var q=R.selectAll("g.angularaxis").data(j?t:[]);q.exit().remove(),j&&function(e,t,r,o){var a,s,d,f,h=r[0].trace,m=o.size,g=o.radius,v=o.innerRadius,y=o.gaugeBg,x=o.gaugeOutline,b=[m.l+m.w/2,m.t+m.h/2+g/2],w=o.gauge,T=o.layer,M=o.transitionOpts,C=o.onComplete,A=Math.PI/2;function E(e){var t=h.gauge.axis.range[0],r=(e-t)/(h.gauge.axis.range[1]-t)*Math.PI-A;return r<-A?-A:r>A?A:r}function I(e){return n.svg.arc().innerRadius((v+g)/2-e/2*(g-v)).outerRadius((v+g)/2+e/2*(g-v)).startAngle(-A)}function O(e){e.attr("d",(function(e){return I(e.thickness).startAngle(E(e.range[0])).endAngle(E(e.range[1]))()}))}w.enter().append("g").classed("angular",!0),w.attr("transform",l(b[0],b[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),a=S(e,h.gauge.axis),a.type="linear",a.range=h.gauge.axis.range,a._id="xangularaxis",a.ticklabeloverflow="allow",a.setScale();var P=function(e){return(a.range[0]-e.x)/(a.range[1]-a.range[0])*Math.PI+Math.PI},R={},L=p.makeLabelFns(a,0).labelStandoff;R.xFn=function(e){var t=P(e);return Math.cos(t)*L},R.yFn=function(e){var t=P(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(L+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*u)},R.anchorFn=function(e){var t=P(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},R.heightFn=function(e,t,r){var n=P(e);return-.5*(1+Math.sin(n))*r};var j=function(e){return l(b[0]+g*Math.cos(e),b[1]-g*Math.sin(e))};d=function(e){return j(P(e))};var D=function(e){var t=P(e);return j(t)+"rotate("+-c(t)+")"};if(s=p.calcTicks(a),f=p.getTickSigns(a)[2],a.visible){f="inside"===a.ticks?-1:1;var z=(a.linewidth||1)/2;p.drawTicks(e,a,{vals:s,layer:T,path:"M"+f*z+",0h"+f*a.ticklen,transFn:D}),p.drawLabels(e,a,{vals:s,layer:T,transFn:d,labelFns:R})}var N=[y].concat(h.gauge.steps),F=w.selectAll("g.bg-arc").data(N);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(O).call(k),F.exit().remove();var B=I(h.gauge.bar.thickness),Z=w.selectAll("g.value-arc").data([h.gauge.bar]);Z.enter().append("g").classed("value-arc",!0).append("path");var U=Z.select("path");_(M)?(U.transition().duration(M.duration).ease(M.easing).each("end",(function(){C&&C()})).each("interrupt",(function(){C&&C()})).attrTween("d",(V=B,H=E(r[0].lastY),W=E(r[0].y),function(){var e=i(H,W);return function(t){return V.endAngle(e(t))()}})),h._lastValue=r[0].y):U.attr("d","number"===typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var V,H,W;U.call(k),Z.exit().remove(),N=[];var G=h.gauge.threshold.value;(G||0===G)&&N.push({range:[G,G],color:h.gauge.threshold.color,line:{color:h.gauge.threshold.line.color,width:h.gauge.threshold.line.width},thickness:h.gauge.threshold.thickness});var q=w.selectAll("g.threshold-arc").data(N);q.enter().append("g").classed("threshold-arc",!0).append("path"),q.select("path").call(O).call(k),q.exit().remove();var Y=w.selectAll("g.gauge-outline").data([x]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(O).call(k),Y.exit().remove()}(e,0,t,{radius:Z,innerRadius:U,gauge:G,layer:q,size:N,gaugeBg:I,gaugeOutline:O,transitionOpts:r,onComplete:g});var Y=R.selectAll("g.bullet").data(D?t:[]);Y.exit().remove();var X=R.selectAll("g.bulletaxis").data(D?t:[]);X.exit().remove(),D&&function(e,t,r,n){var i,o,a,s,c,u=r[0].trace,d=n.gauge,h=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,w=n.onComplete;d.enter().append("g").classed("bullet",!0),d.attr("transform",l(v.l,v.t)),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var T=v.h,M=u.gauge.bar.thickness*T,C=x.x[0],A=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-f.bulletNumberDomainSize:1);i=S(e,u.gauge.axis),i._id="xbulletaxis",i.domain=[C,A],i.setScale(),o=p.calcTicks(i),a=p.makeTransTickFn(i),s=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,o):o,layer:h,path:p.makeTickPath(i,c,s),transFn:a}),p.drawLabels(e,i,{vals:o,layer:h,transFn:a,labelFns:p.makeLabelFns(i,c)}));function E(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*T})).attr("height",(function(e){return e.thickness*T}))}var I=[m].concat(u.gauge.steps),O=d.selectAll("g.bg-bullet").data(I);O.enter().append("g").classed("bg-bullet",!0).append("rect"),O.select("rect").call(E).call(k),O.exit().remove();var P=d.selectAll("g.value-bullet").data([u.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",M).attr("y",(T-M)/2).call(k),_(b)?P.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){w&&w()})).each("interrupt",(function(){w&&w()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"===typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var R=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),L=d.selectAll("g.threshold-bullet").data(R);L.enter().append("g").classed("threshold-bullet",!0).append("line"),L.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*T).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),L.exit().remove();var j=d.selectAll("g.gauge-outline").data([g]);j.enter().append("g").classed("gauge-outline",!0).append("rect"),j.select("rect").call(E).call(k),j.exit().remove()}(e,0,t,{gauge:Y,layer:X,size:N,gaugeBg:I,gaugeOutline:O,transitionOpts:r,onComplete:g});var K=R.selectAll("text.title").data(t);K.exit().remove(),K.enter().append("text").classed("title",!0),K.attr("text-anchor",(function(){return D?x.right:x[P.title.align]})).text(P.title.text).call(d.font,P.title.font).call(h.convertToTspans,e),K.attr("transform",(function(){var e,t=N.l+N.w*b[P.title.align],r=f.titlePadding,n=d.bBox(K.node());if(L){if(j)if(P.gauge.axis.visible)e=d.bBox(q.node()).top-r-n.bottom;else e=N.t+N.h/2-Z/2-n.bottom-r;D&&(e=A-(n.top+n.bottom)/2,t=N.l-f.bulletPadding*N.w)}else e=P._numbersTop-r-n.bottom;return l(t,e)}))}))}},93720:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c=r(18693).overrideAll;function u(e){return{show:{valType:"boolean",dflt:!1,description:["Determines whether or not slice planes about the",e,"dimension are drawn."].join(" ")},locations:{valType:"data_array",dflt:[],description:["Specifies the location(s) of slices on the axis.","When not specified slices would be created for","all points of the axis",e,"except start and end."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `slices`. The default fill value of the","`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}function d(e){return{show:{valType:"boolean",dflt:!0,description:["Sets the fill ratio of the `slices`. The default fill value of the",e,"`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `caps`. The default fill value of the","`caps` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}var f=e.exports=c(l({x:{valType:"data_array",description:["Sets the X coordinates of the vertices on X axis."].join(" ")},y:{valType:"data_array",description:["Sets the Y coordinates of the vertices on Y axis."].join(" ")},z:{valType:"data_array",description:["Sets the Z coordinates of the vertices on Z axis."].join(" ")},value:{valType:"data_array",description:["Sets the 4th dimension (value) of the vertices."].join(" ")},isomin:{valType:"number",description:["Sets the minimum boundary for iso-surface plot."].join(" ")},isomax:{valType:"number",description:["Sets the maximum boundary for iso-surface plot."].join(" ")},surface:{show:{valType:"boolean",dflt:!0,description:["Hides/displays surfaces between minimum and maximum iso-values."].join(" ")},count:{valType:"integer",dflt:2,min:1,description:["Sets the number of iso-surfaces between minimum and maximum iso-values.","By default this value is 2 meaning that only minimum and maximum surfaces","would be drawn."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the iso-surface. The default fill value of the","surface is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all",description:["Sets the surface pattern of the iso-surface 3-D sections. The default pattern of","the surface is `all` meaning that the rest of surface elements would be shaded.","The check options (either 1 or 2) could be used to draw half of the squares","on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E`","may also be used to reduce the number of triangles on the iso-surfaces and","creating other patterns of interest."].join(" ")}},spaceframe:{show:{valType:"boolean",dflt:!1,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:.15,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 0.15 meaning that only 15% of the area of every faces of tetras would be","shaded. Applying a greater `fill` ratio would allow the creation of stronger","elements or could be sued to have entirely closed areas (in case of using 1)."].join(" ")}},slices:{x:u("x"),y:u("y"),z:u("z")},caps:{x:d("x"),y:d("y"),z:d("z")},text:{valType:"string",dflt:"",arrayOk:!0,description:["Sets the text elements associated with the vertices.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,description:"Same as `text`."},hovertemplate:o(),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:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");f.flatshading.dflt=!0,f.lighting.facenormalsepsilon.dflt=0,f.x.editType=f.y.editType=f.z.editType=f.value.editType="calc+clearAxisTypes",f.transforms=void 0},81139:(e,t,r)=>{"use strict";var n=r(1631),i=r(67265).processGrid,o=r(67265).filter;e.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=o(t.x,t._len),t._y=o(t.y,t._len),t._z=o(t.z,t._len),t._value=o(t.value,t._len);var r=i(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;for(var a=1/0,s=-1/0,l=0;l{"use strict";var n=r(13084).gl_mesh3d,i=r(95049).parseColorScale,o=r(55115),a=r(10948).extractOpts,s=r(51577),l=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function D(e,t){return null===e?t:e}function z(t,r,n){I();var i,o,a,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(e,t){var r=e[0],n=e[1],i=e[2],o=function(e,t,r){for(var n=[],i=0;i-1?n[h]:E(p,m,v);f[h]=x>-1?x:P(p,m,v,D(t,y))}i=f[0],o=f[1],a=f[2],e._meshI.push(i),e._meshJ.push(o),e._meshK.push(a),++g}}function N(e,t,r,n){var i=e[3];in&&(i=n);for(var o=(e[3]-i)/(e[3]-t[3]+1e-9),a=[],s=0;s<4;s++)a[s]=(1-o)*e[s]+o*t[s];return a}function F(e,t,r){return e>=t&&e<=r}function B(e){var t=.001*(A-C);return e>=C-t&&e<=A+t}function Z(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}var U=3;function V(e,t,r,n,i,o){o||(o=1),r=[-1,-1,-1];var a=!1,s=[F(t[0][3],n,i),F(t[1][3],n,i),F(t[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return B(t[0][3])&&B(t[1][3])&&B(t[2][3])?(z(e,t,r),!0):oMath.abs(k-M)?[T,k]:[k,M];ee(r,E[0],E[1])}}var I=[[Math.min(C,M),Math.max(C,M)],[Math.min(T,A),Math.max(T,A)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(d.push(p.id),"x"===r?f.push([p.distRatio,0,0]):"y"===r?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else u=ie(1,"x"===r?b-1:"y"===r?w-1:_-1);d.length>0&&(n[o]="x"===r?te(t,d,a,s,f,n[o]):"y"===r?re(t,d,a,s,f,n[o]):ne(t,d,a,s,f,n[o]),o++),u.length>0&&(n[o]="x"===r?K(t,u,a,s,n[o]):"y"===r?$(t,u,a,s,n[o]):J(t,u,a,s,n[o]),o++)}var m=e.caps[r];m.show&&m.fill&&(L(m.fill),n[o]="x"===r?K(t,[0,b-1],a,s,n[o]):"y"===r?$(t,[0,w-1],a,s,n[o]):J(t,[0,_-1],a,s,n[o]),o++)}})),0===g&&O(),e._meshX=n,e._meshY=i,e._meshZ=o,e._meshIntensity=a,e._Xs=v,e._Ys=y,e._Zs=x}(),e}e.exports={findNearestOnAxis:l,generateIsoMeshes:f,createIsosurfaceTrace:function(e,t){var r=e.glplot.gl,i=n({gl:r}),o=new c(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}}},25430:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(93720),a=r(5876);function s(e,t,r,n,o){var s=o("isomin"),l=o("isomax");void 0!==l&&null!==l&&void 0!==s&&null!==s&&s>l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),d=o("z"),f=o("value");c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length?(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach((function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))})),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("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(e){o(e)})),a(e,t,n,o,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}e.exports={supplyDefaults:function(e,t,r,i){s(e,t,r,i,(function(r,i){return n.coerce(e,t,o,r,i)}))},supplyIsoDefaults:s}},39204:(e,t,r)=>{"use strict";e.exports={attributes:r(93720),supplyDefaults:r(25430).supplyDefaults,calc:r(81139),colorbar:{min:"cmin",max:"cmax"},plot:r(90648).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws isosurfaces between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}},27933:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(72547),s=r(27231),l=r(10191).extendFlat;e.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the X coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Y coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},i:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *first* vertex of a triangle. For example, `{i[m], j[m], k[m]}`","together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a","point in space, which is the first vertex of a triangle."].join(" ")},j:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *second* vertex of a triangle. For example, `{i[m], j[m], k[m]}` ","together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a","point in space, which is the second vertex of a triangle."].join(" ")},k:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *third* vertex of a triangle. For example, `{i[m], j[m], k[m]}`","together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet ","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a","point in space, which is the third vertex of a triangle."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets the text elements associated with the vertices.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},hovertemplate:o({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc",description:["Sets the Delaunay axis, which is the axis that is perpendicular to the surface of the","Delaunay triangulation.","It has an effect if `i`, `j`, `k` are not provided and `alphahull` is set to indicate","Delaunay triangulation."].join(" ")},alphahull:{valType:"number",dflt:-1,editType:"calc",description:["Determines how the mesh surface triangles are derived from the set of","vertices (points) represented by the `x`, `y` and `z` arrays, if","the `i`, `j`, `k` arrays are not supplied.","For general use of `mesh3d` it is preferred that `i`, `j`, `k` are","supplied.","If *-1*, Delaunay triangulation is used, which is mainly suitable if the","mesh is a single, more or less layer surface that is perpendicular to `delaunayaxis`.","In case the `delaunayaxis` intersects the mesh surface at more than one point","it will result triangles that are very long in the dimension of `delaunayaxis`.","If *>0*, the alpha-shape algorithm is used. In this case, the positive `alphahull` value","signals the use of the alpha-shape algorithm, _and_ its value","acts as the parameter for the mesh fitting.","If *0*, the convex-hull algorithm is used. It is suitable for convex bodies","or if the intention is to enclose the `x`, `y` and `z` point set into a convex","hull."].join(" ")},intensity:{valType:"data_array",editType:"calc",description:["Sets the intensity values for vertices or cells","as defined by `intensitymode`.","It can be used for plotting fields on meshes."].join(" ")},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc",description:["Determines the source of `intensity` values."].join(" ")},color:{valType:"color",editType:"calc",description:"Sets the color of the whole mesh"},vertexcolor:{valType:"data_array",editType:"calc",description:["Sets the color of each vertex","Overrides *color*. While Red, green and blue colors","are in the range of 0 and 255; in the case of having","vertex color data in RGBA format, the alpha color","should be normalized to be between 0 and 1."].join(" ")},facecolor:{valType:"data_array",editType:"calc",description:["Sets the color of each face","Overrides *color* and *vertexcolor*."].join(" ")},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not normal smoothing is applied to the meshes,","creating meshes with an angular, low-poly look via flat reflections."].join(" ")},contour:{show:l({},a.contours.x.show,{description:["Sets whether or not dynamic contours are shown on hover"].join(" ")}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:l({},a.lightposition.x,{dflt:1e5}),y:l({},a.lightposition.y,{dflt:1e5}),z:l({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},a.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},13146:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){t.intensity&&n(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},86395:(e,t,r)=>{"use strict";var n=r(13084).gl_mesh3d,i=r(13084).delaunay_triangulate,o=r(13084).alpha_shape,a=r(13084).convex_hull,s=r(95049).parseColorScale,l=r(55115),c=r(10948).extractOpts,u=r(51577);function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=d.prototype;function h(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}f.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},f.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n,d=e.x.length,f=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,d)||!g(e.j,d)||!g(e.k,d))return;n=u(m(e.i),m(e.j),m(e.k))}else n=0===e.alphahull?a(f):e.alphahull>0?o(e.alphahull,f):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],o=t.length,a=0;a{"use strict";var n=r(44049),i=r(53787),o=r(5876),a=r(27933);e.exports=function(e,t,r,s){function l(r,n){return i.coerce(e,t,a,r,n)}function c(e){var t=e.map((function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["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(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),o(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",r)),l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null):t.visible=!1):t.visible=!1}},11829:(e,t,r)=>{"use strict";e.exports={attributes:r(27933),supplyDefaults:r(8699),calc:r(13146),colorbar:{min:"cmin",max:"cmax"},plot:r(86395),moduleType:"trace",name:"mesh3d",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws sets of triangles with coordinates given by","three 1-dimensional arrays in `x`, `y`, `z` and","(1) a sets of `i`, `j`, `k` indices","(2) Delaunay triangulation or","(3) the Alpha-shape algorithm or","(4) the Convex-hull algorithm"].join(" ")}}},94962:(e,t,r)=>{"use strict";var n=r(53787).extendFlat,i=r(37471),o=r(89849).axisHoverFormat,a=r(93701).P,s=r(54289),l=r(59933),c=l.INCREASING.COLOR,u=l.DECREASING.COLOR,d=i.line;function f(e){return{line:{color:n({},d.color,{dflt:e}),width:d.width,dash:a,editType:"style"},editType:"style"}}e.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:n({},d.width,{description:[d.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:n({},a,{description:[a.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:f(c),decreasing:f(u),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:n({},s.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})}},16707:(e,t,r)=>{"use strict";var n=r(53787),i=n._,o=r(28605),a=r(64594),s=r(24956).BADNUM;function l(e,t,r,n){return{o:e,h:t,l:r,c:n}}function c(e,t,r,a,l,c){for(var u=l.makeCalcdata(t,"open"),d=l.makeCalcdata(t,"high"),f=l.makeCalcdata(t,"low"),h=l.makeCalcdata(t,"close"),p=Array.isArray(t.text),m=Array.isArray(t.hovertext),g=!0,v=null,y=!!t.xperiodalignment,x=[],b=0;bv):g=T>_,v=T;var M=c(_,k,S,T);M.pos=w,M.yc=(_+T)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[S,k],y&&(M.orig_p=r[b]),p&&(M.tx=t.text[b]),m&&(M.htx=t.hovertext[b]),x.push(M)}else x.push({pos:w,empty:!0})}return t._extremes[l._id]=o.findExtremes(l,n.concat(f,d),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}e.exports={calc:function(e,t){var r=o.getFromId(e,t.xaxis),i=o.getFromId(e,t.yaxis),s=function(e,t,r){var i=r._minDiff;if(!i){var o,s=e._fullData,l=[];for(i=1/0,o=0;o{"use strict";var n=r(53787),i=r(87160),o=r(17239),a=r(94962);function s(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}e.exports=function(e,t,r,l){function c(r,i){return n.coerce(e,t,a,r,i)}i(e,t,c,l)?(o(e,t,l,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),c("line.dash"),s(e,t,c,"increasing"),s(e,t,c,"decreasing"),c("text"),c("hovertext"),c("tickwidth"),l._requestRangeslider[t.xaxis]=!0):t.visible=!1}},90934:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(76719),a=r(66235),s=r(53787).fillText,l=r(59933),c={increasing:l.INCREASING.SYMBOL,decreasing:l.DECREASING.SYMBOL};function u(e,t,r,n){var i,s,l=e.cd,c=e.xa,u=l[0].trace,d=l[0].t,f=u.type,h="ohlc"===f?"l":"min",p="ohlc"===f?"h":"max",m=d.bPos||0,g=function(e){return e.pos+m-t},v=d.bdPos||d.tickLen,y=d.wHover,x=Math.min(1,v/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function b(e){var t=g(e);return o.inbox(t-y,t+y,i)}function w(e){var t=e[h],n=e[p];return t===n||o.inbox(t-r,n-r,i)}function _(e){return(b(e)+w(e))/2}i=e.maxHoverDistance-x,s=e.maxSpikeDistance-x;var k=o.getDistanceFunction(n,b,w,_);if(o.getClosest(l,k,e),!1===e.index)return null;var S=l[e.index];if(S.empty)return null;var T=u[S.dir],M=T.line.color;return a.opacity(M)&&T.line.width?e.color=M:e.color=T.fillcolor,e.x0=c.c2p(S.pos+m-v,!0),e.x1=c.c2p(S.pos+m+v,!0),e.xLabelVal=void 0!==S.orig_p?S.orig_p:S.pos,e.spikeDistance=_(S)*s/i,e.xSpike=c.c2p(S.pos,!0),e}function d(e,t,r,o){var a=e.cd,s=e.ya,l=a[0].trace,c=a[0].t,d=[],f=u(e,t,r,o);if(!f)return[];var h=a[f.index].hi||l.hoverinfo,p=h.split("+");if(!("all"===h||-1!==p.indexOf("y")))return[];for(var m=["high","open","close","low"],g={},v=0;v"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},f)).y0=y.y1=w,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name="",d.push(y),g[b]=y)}return d}function f(e,t,r,i){var o=e.cd,a=e.ya,l=o[0].trace,d=o[0].t,f=u(e,t,r,i);if(!f)return[];var h=o[f.index],p=f.index=h.i,m=h.dir;function g(e){return d.labels[e]+n.hoverLabelText(a,l[e][p],l.yhoverformat)}var v=h.hi||l.hoverinfo,y=v.split("+"),x="all"===v,b=x||-1!==y.indexOf("y"),w=x||-1!==y.indexOf("text"),_=b?[g("open"),g("high"),g("low"),g("close")+" "+c[m]]:[];return w&&s(h,l,_),f.extraText=_.join("
"),f.y0=f.y1=a.c2p(h.yc,!0),[f]}e.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?d(e,t,r,n):f(e,t,r,n)},hoverSplit:d,hoverOnPoints:f}},69196:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:r(48206),categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:r(94962),supplyDefaults:r(69254),calc:r(16707).calc,plot:r(7945),style:r(11104),hoverPoints:r(90934).hoverPoints,selectPoints:r(98274)}},87160:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports=function(e,t,r,o){var a=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],o),s&&l&&c&&u){var d=Math.min(s.length,l.length,c.length,u.length);return a&&(d=Math.min(d,i.minRowLength(a))),t._length=d,d}}},7945:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787);e.exports=function(e,t,r,o){var a=t.yaxis,s=t.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(o,r,"trace ohlc").each((function(e){var t=n.select(this),r=e[0],o=r.t;if(!0!==r.trace.visible||o.empty)t.remove();else{var c=o.tickLen,u=t.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=s.c2p(e.pos-c,!0),r=s.c2p(e.pos+c,!0),n=l?(t+r)/2:s.c2p(e.pos,!0);return"M"+t+","+a.c2p(e.o,!0)+"H"+n+"M"+n+","+a.c2p(e.h,!0)+"V"+a.c2p(e.l,!0)+"M"+r+","+a.c2p(e.c,!0)+"H"+n}))}}))}},98274:e=>{"use strict";e.exports=function(e,t){var r,n=e.cd,i=e.xaxis,o=e.yaxis,a=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(50973),o=r(66235);e.exports=function(e,t,r){var a=r||n.select(e).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(e){var t=e[0].trace;n.select(this).selectAll("path").each((function(e){if(!e.empty){var r=t[e.dir].line;n.select(this).style("fill","none").call(o.stroke,r.color).call(i.dashLine,r.dash,r.width).style("opacity",t.selectedpoints&&!e.selected?.3:1)}}))}))}},16674:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(27231),o=r(92948),a=r(8753),s=r(32191).fF,l=r(29707).Y,c=n({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot",description:["Sets the shape of the paths.","If `linear`, paths are composed of straight lines.","If `hspline`, paths are composed of horizontal curved splines"].join(" ")},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"],description:["This value here applies when hovering over lines."].join(" ")})});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",description:["Sets the hover interaction mode for the parcats diagram.","If `category`, hover interaction take place per category.","If `color`, hover interactions take place per color per category.","If `dimension`, hover interactions take place across all categories per dimension."].join(" ")},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"],description:["This value here applies when hovering over dimensions.","Note that `*categorycount`, *colorcount* and *bandcolorcount*","are only available when `hoveron` contains the *color* flag"].join(" ")}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot",description:["Sets the drag interaction mode for categories and dimensions.","If `perpendicular`, the categories can only move along a line perpendicular to the paths.","If `freeform`, the categories can freely move on the plane.","If `fixed`, the categories and dimensions are stationary."].join(" ")},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot",description:"Sort paths so that like colors are bundled together within each category."},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot",description:["Sets the path sorting algorithm.","If `forward`, sort paths based on dimension categories from left to right.","If `backward`, sort paths based on dimensions categories from right to left."].join(" ")},labelfont:o({editType:"calc",description:"Sets the font for the `dimension` labels."}),tickfont:o({editType:"calc",description:"Sets the font for the `category` labels."}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc",description:"The shown name of the dimension."},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the categories in the dimension.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories in this dimension appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},ticktext:{valType:"data_array",editType:"calc",description:["Sets alternative tick labels for the categories in this dimension.","Only has an effect if `categoryorder` is set to *array*.","Should be an array the same length as `categoryarray`","Used with `categoryorder`."].join(" ")},values:{valType:"data_array",dflt:[],editType:"calc",description:["Dimension values. `values[n]` represents the category value of the `n`th point in the dataset,","therefore the `values` vector for all dimensions must be the same (longer vectors","will be truncated)."].join(" ")},displayindex:{valType:"integer",editType:"calc",description:["The display index of dimension, from left to right, zero indexed, defaults to dimension","index."].join(" ")},editType:"calc",description:"The dimensions (variables) of the parallel categories diagram.",visible:{valType:"boolean",dflt:!0,editType:"calc",description:"Shows the dimension when set to `true` (the default). Hides the dimension for `false`."}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc",description:["The number of observations represented by each state. Defaults to 1 so that each state represents","one observation"].join(" ")},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},46737:(e,t,r)=>{"use strict";var n=r(38213).a0,i=r(79716),o="parcats";t.name=o,t.plot=function(e,t,r,a){var s=n(e.calcdata,o);if(s.length){var l=s[0];i(e,l,r,a)}},t.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),o=t._has&&t._has("parcats");i&&!o&&n._paperdiv.selectAll(".parcats").remove()}},72965:(e,t,r)=>{"use strict";var n=r(41689).wrap,i=r(25584).hasColorscale,o=r(1631),a=r(15302),s=r(50973),l=r(53787),c=r(51908);function u(e,t,r){e.valueInds.push(t),e.count+=r}function d(e,t,r){e.valueInds.push(t),e.count+=r}e.exports=function(e,t){var r=l.filterVisible(t.dimensions);if(0===r.length)return[];var f,h,p,m=r.map((function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,n=0;n=e.length)return!1;if(void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(r))for(t=0;t{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(5876),a=r(29707).c,s=r(80254),l=r(16674),c=r(47796);function u(e,t){function r(r,i){return n.coerce(e,t,l.dimensions,r,i)}var i=r("values"),o=r("visible");if(i&&i.length||(o=t.visible=!1),o){r("label"),r("displayindex",t._index);var a,s=e.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(a="array");var u=r("categoryorder",a);"array"===u?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),c||"array"!==u||(t.categoryorder="trace")}}e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,l,r,i)}var h=s(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,r,a,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",a.colorway[0]);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,d,f);a(t,d,f),Array.isArray(h)&&h.length||(t.visible=!1),c(t,h,"values",p),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var m={family:d.font.family,size:Math.round(d.font.size),color:d.font.color};n.coerceFont(f,"labelfont",m);var g={family:d.font.family,size:Math.round(d.font.size/1.2),color:d.font.color};n.coerceFont(f,"tickfont",g)}},46451:(e,t,r)=>{"use strict";e.exports={attributes:r(16674),supplyDefaults:r(5126),calc:r(72965),plot:r(79716),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:r(46737),categories:["noOpacity"],meta:{description:["Parallel categories diagram for multidimensional categorical data."].join(" ")}}},18732:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).k4,o=r(37921),a=r(76719),s=r(53787),l=s.strTranslate,c=r(50973),u=r(25378),d=r(98224);function f(e,t,r,i){var o=t._context.staticPlot,a=e.map(z.bind(0,t,r)),u=i.selectAll("g.parcatslayer").data([null]);u.enter().append("g").attr("class","parcatslayer").style("pointer-events",o?"none":"all");var f=u.selectAll("g.trace.parcats").data(a,h),y=f.enter().append("g").attr("class","trace parcats");f.attr("transform",(function(e){return l(e.x,e.y)})),y.append("g").attr("class","paths");var x=f.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),h);x.attr("fill",(function(e){return e.model.color}));var _=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);w(_),x.attr("d",(function(e){return e.svgD})),_.empty()||x.sort(m),x.exit().remove(),x.on("mouseover",g).on("mouseout",v).on("click",b),y.append("g").attr("class","dimensions");var T=f.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),h);T.enter().append("g").attr("class","dimension"),T.attr("transform",(function(e){return l(e.x,0)})),T.exit().remove();var M=T.selectAll("g.category").data((function(e){return e.categories}),h),C=M.enter().append("g").attr("class","category");M.attr("transform",(function(e){return l(0,e.y)})),C.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),k(C);var A=M.selectAll("rect.bandrect").data((function(e){return e.bands}),h);A.each((function(){s.raiseToTop(this)})),A.attr("fill",(function(e){return e.color}));var L=A.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);A.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),S(L),A.exit().remove(),C.append("text").attr("class","catlabel").attr("pointer-events","none");var j=t._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",d.makeTextShadow(j)).style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){c.font(n.select(this),e.parcatsViewModel.categorylabelfont),d.convertToTspans(n.select(this),t)})),C.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){c.font(n.select(this),e.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",I),M.exit().remove(),T.call(n.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",O).on("drag",P).on("dragend",R)),f.each((function(e){e.traceSelection=n.select(this),e.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),f.exit().remove()}function h(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function m(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),E=n.mouse(d)[0];a.loneHover({trace:f,x:b-p.left+m.left,y:w-p.top+m.top,text:A,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:E1&&f.displayInd===d.dimensions.length-1?(i=c.left,o="left"):(i=c.left+c.width,o="right");var m=u.model.count,g=u.model.categoryLabel,v=m/u.parcatsViewModel.model.count,y={countLabel:m,categoryLabel:g,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
");return{trace:h,x:a*(i-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:o,hovertemplate:h.hovertemplate,hovertemplateLabels:y,eventData:[{data:h._input,fullData:h,count:m,category:g,probability:v}]}}function E(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var t,r=e.parcatsViewModel.graphDiv,i=r._fullLayout,o=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,c=this;if("color"===l?(!function(e){var t=n.select(e).datum(),r=T(t);_(r),r.each((function(){s.raiseToTop(this)})),n.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){s.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(c),C(c,"plotly_hover",n.event)):(!function(e){n.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=T(e);_(t),t.each((function(){s.raiseToTop(this)}))})),n.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(c),M(c,"plotly_hover",n.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===l?t=A(r,o,c):"color"===l?t=function(e,t,r){e._fullLayout._calcInverseTransform(e);var i,o,a=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),d=c.categoryViewModel,f=d.parcatsViewModel,h=f.model.dimensions[d.model.dimensionInd],p=f.trace,m=l.y+l.height/2;f.dimensions.length>1&&h.displayInd===f.dimensions.length-1?(i=l.left,o="left"):(i=l.left+l.width,o="right");var g=d.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(e){e.color===c.color&&(y+=e.count)}));var x=d.model.count,b=0;f.pathSelection.each((function(e){e.model.color===c.color&&(b+=e.model.count)}));var w=y/v,_=y/b,k=y/x,S={countLabel:v,categoryLabel:g,probabilityLabel:w.toFixed(3)},T=[];-1!==d.parcatsViewModel.hoverinfoItems.indexOf("count")&&T.push(["Count:",S.countLabel].join(" ")),-1!==d.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(T.push("P(color \u2229 "+g+"): "+S.probabilityLabel),T.push("P("+g+" | color): "+_.toFixed(3)),T.push("P(color | "+g+"): "+k.toFixed(3)));var M=T.join("
"),C=u.mostReadable(c.color,["black","white"]);return{trace:p,x:a*(i-t.left),y:s*(m-t.top),text:M,color:c.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:C,fontSize:10,idealAlign:o,hovertemplate:p.hovertemplate,hovertemplateLabels:S,eventData:[{data:p._input,fullData:p,category:g,count:v,probability:w,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,o,c):"dimension"===l&&(t=function(e,t,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(A(e,t,this))})),i}(r,o,c)),t&&a.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function I(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(w(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),S(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(m),-1===t.hoverinfoItems.indexOf("skip"))){"color"===e.parcatsViewModel.hoveron?C(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event)}}function O(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yd.y+d.height/2&&(a.model.displayInd=d.model.displayInd,d.model.displayInd=l),e.dragCategoryDisplayInd=a.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){o.model.dragX=n.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];void 0!==f&&o.model.dragXh.x&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=o.model.displayInd}B(e.parcatsViewModel),F(e.parcatsViewModel),D(e.parcatsViewModel),j(e.parcatsViewModel)}}function R(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var t={},r=L(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),a=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));a&&i.forEach((function(r,n){var i=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),d=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[d],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?C(e.potentialClickBand,"plotly_click",n.event.sourceEvent):M(e.potentialClickBand,"plotly_click",n.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd)e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null;e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,B(e.parcatsViewModel),F(e.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){D(e.parcatsViewModel,!0),j(e.parcatsViewModel,!0)})).each("end",(function(){(a||s)&&o.restyle(e.parcatsViewModel.graphDiv,t,[r])}))}}function L(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n),u+="l-"+r[s]+",0 ";return u+="Z"}function F(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),o=e.model.dimensions.map((function(e){return e.displayInd})),a=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function d(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return a.map((function(e){return t[e]}))}c.sort((function(t,r){var n=d(t),i=d(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var f=new Array(c.length),h=t[0].model.count,p=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?p*(v.count/h):0;for(var y,x=new Array(n.length),b=0;b1?(e.width-80-16)/(n-1):0)*i;var o,a,s,l,c,u=[],d=e.model.maxCats,f=t.categories.length,h=t.count,p=e.height-8*(d-1),m=8*(d-f)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c0?a.count/h*p:0,s={key:a.valueInds[0],model:a,width:16,height:o,y:null!==a.dragY?a.dragY:m,bands:[],parcatsViewModel:e},m=m+o+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(e,t,r,n){f(r,e,n,t)}},79716:(e,t,r)=>{"use strict";var n=r(18732);e.exports=function(e,t,r,i){var o=e._fullLayout,a=o._paper,s=o._size;n(e,a,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},59692:(e,t,r)=>{"use strict";var n=r(8753),i=r(45446),o=r(92948),a=r(29707).Y,s=r(10191).extendFlat,l=r(99862).templatedArray;e.exports={domain:a({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot",description:["Sets the angle of the labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the labels vertically.","Tilted labels with *labelangle* may be positioned better","inside margins when `labelposition` is set to *bottom*."].join(" ")},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Specifies the location of the `label`.","*top* positions labels above, next to the title","*bottom* positions labels below the graph","Tilted labels with *labelangle* may be positioned better","inside margins when `labelposition` is set to *bottom*."].join(" ")},labelfont:o({editType:"plot",description:"Sets the font for the `dimension` labels."}),tickfont:o({editType:"plot",description:"Sets the font for the `dimension` tick values."}),rangefont:o({editType:"plot",description:"Sets the font for the `dimension` range values."}),dimensions:l("dimension",{label:{valType:"string",editType:"plot",description:"The shown name of the dimension."},tickvals:s({},i.tickvals,{editType:"plot",description:["Sets the values at which ticks on this axis appear."].join(" ")}),ticktext:s({},i.ticktext,{editType:"plot",description:["Sets the text displayed at the ticks position via `tickvals`."].join(" ")}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Shows the dimension when set to `true` (the default). Hides the dimension for `false`."},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot",description:["The domain range that represents the full, shown axis extent. Defaults to the `values` extent.","Must be an array of `[fromValue, toValue]` with finite numbers as elements."].join(" ")},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["The domain range to which the filter on the dimension is constrained. Must be an array","of `[fromValue, toValue]` with `fromValue <= toValue`, or if `multiselect` is not","disabled, you may give an array of arrays, where each inner array is `[fromValue, toValue]`."].join(" ")},multiselect:{valType:"boolean",dflt:!0,editType:"plot",description:"Do we allow multiple selection ranges or just a single range?"},values:{valType:"data_array",editType:"calc",description:["Dimension values. `values[n]` represents the value of the `n`th point in the dataset,","therefore the `values` vector for all dimensions must be the same (longer vectors","will be truncated). Each value must be a finite number."].join(" ")},editType:"calc",description:"The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported."}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot",description:["Sets the base color of unselected lines.","in connection with `unselected.line.opacity`."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot",description:["Sets the opacity of unselected lines.","The default *auto* decreases the opacity smoothly as the number of lines increases.","Use *1* to achieve exact `unselected.line.color`."].join(" ")},editType:"plot"},editType:"plot"}}},56737:(e,t,r)=>{"use strict";var n=r(46964),i=r(8996),o=r(41689).keyFun,a=r(41689).repeat,s=r(53787).sorterAsc,l=r(53787).strTranslate,c=n.bar.snapRatio;function u(e,t){return e*(1-c)+t*c}var d=n.bar.snapClose;function f(e,t){return e*(1-d)+t*d}function h(e,t,r,n){if(function(e,t){for(var r=0;r=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,o=0,a=t.length-1;if(i<0){var s=o;o=a,a=s}for(var l=t[o],c=l,d=o;i*dt){f=r;break}}if(o=u,isNaN(o)&&(o=isNaN(d)||isNaN(f)?isNaN(d)?f:d:t-c[d][1]e[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(p,t);m&&(a.interval=l[o],a.intervalPix=p,a.region=m)}}if(e.ordinal&&!a.region){var g=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(r=0;r=x[0]&&y<=x[1]){a.clickableOrdinalRange=x;break}}}return a}function _(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,o=t.brush.svgBrush;o.wasDragged=!0,o._dragging=!0,o.grabbingBar?o.newExtent=[r-o.grabPoint,r+o.barLength-o.grabPoint].map(t.unitToPaddedPx.invert):o.newExtent=[o.startExtent,t.unitToPaddedPx.invert(r)].sort(s),t.brush.filterSpecified=!0,o.extent=o.stayingIntervals.concat([o.newExtent]),o.brushCallback(t),b(e.parentNode)}function k(e,t){var r=w(t,t.height-i.mouse(e)[1]-2*n.verticalPadding),o="crosshair";r.clickableOrdinalRange?o="pointer":r.region&&(o=r.region+"-resize"),i.select(document.body).style("cursor",o)}function S(e){e.on("mousemove",(function(e){i.event.preventDefault(),e.parent.inBrushDrag||k(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,o=t.unitToPaddedPx.invert(r),a=t.brush,s=w(t,r),l=s.interval,c=a.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:o,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){_(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,n=r.filter,o=r.svgBrush;o._dragging||(k(e,t),_(e,t),t.brush.svgBrush.wasDragged=!1),o._dragging=!1,i.event.sourceEvent.stopPropagation();var a=o.grabbingBar;if(o.grabbingBar=!1,o.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!o.wasDragged)return o.wasDragged=void 0,o.clickableOrdinalRange?r.filterSpecified&&t.multiselect?o.extent.push(o.clickableOrdinalRange):(o.extent=[o.clickableOrdinalRange],r.filterSpecified=!0):a?(o.extent=o.stayingIntervals,0===o.extent.length&&M(r)):M(r),o.brushCallback(t),b(e.parentNode),void o.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]o.newExtent[0];o.extent=o.stayingIntervals.concat(c?[o.newExtent]:[]),o.extent.length||M(r),o.brushCallback(t),c?b(e.parentNode,s):(s(),b(e.parentNode))}else s();o.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)})))}function T(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function C(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(e,t,r,n,i,o){var a,l=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(s)})).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=C(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(r),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(a=i,function(e){var t=e.brush,r=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t),n=r.slice();t.filter.set(n),a()}),brushEndCallback:o}}},ensureAxisBrush:function(e,t,r){var i=e.selectAll("."+n.cn.axisBrush).data(a,o);i.enter().append("g").classed(n.cn.axisBrush,!0),function(e,t,r){var i=r._context.staticPlot,o=e.selectAll(".background").data(a);o.enter().append("rect").classed("background",!0).call(p).call(m).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),o.call(S).attr("height",(function(e){return e.height-n.verticalPadding}));var s=e.selectAll(".highlight-shadow").data(a);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",t).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(e){return e.height})).call(x);var c=e.selectAll(".highlight").data(a);c.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"),c.attr("y1",(function(e){return e.height})).call(x)}(i,t,r)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?C(e.sort(T)):[e[0]]):e=[e.sort(s)],t.tickvals){var r=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[h(0,r,e[0],[]),h(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},89338:(e,t,r)=>{"use strict";e.exports={attributes:r(59692),supplyDefaults:r(88860),calc:r(61009),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(69837),categories:["gl","regl","noOpacity","noHover"],meta:{description:["Parallel coordinates for multidimensional exploratory data analysis.","The samples are specified in `dimensions`.","The colors are set in `line.color`."].join(" ")}}},69837:(e,t,r)=>{"use strict";var n=r(8996),i=r(38213).a0,o=r(55136),a=r(83580);t.name="parcoords",t.plot=function(e){var t=i(e.calcdata,"parcoords")[0];t.length&&o(e,t)},t.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),o=t._has&&t._has("parcoords");i&&!o&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},t.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,r=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:a.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},61009:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray,i=r(10948),o=r(41689).wrap;e.exports=function(e,t){var r,a;return i.hasColorscale(t,"line")&&n(t.line.color)?(r=t.line.color,a=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(e){for(var t=new Array(e),r=0;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"}}},88860:(e,t,r)=>{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(5876),a=r(29707).c,s=r(80254),l=r(28605),c=r(59692),u=r(56737),d=r(46964).maxDimensionCount,f=r(47796);function h(e,t,r,i){function o(r,i){return n.coerce(e,t,c.dimensions,r,i)}var a=o("values"),s=o("visible");if(a&&a.length||(s=t.visible=!1),s){o("label"),o("tickvals"),o("ticktext"),o("tickformat");var d=o("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:d},l.setConvert(t._ax,i.layout),o("multiselect");var f=o("constraintrange");f&&(t.constraintrange=u.cleanRanges(f,t))}}e.exports=function(e,t,r,l){function u(r,i){return n.coerce(e,t,c,r,i)}var p=e.dimensions;Array.isArray(p)&&p.length>d&&(n.log("parcoords traces support up to "+d+" dimensions at the moment"),p.splice(d));var m=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:h}),g=function(e,t,r,a,s){var l=s("line.color",r);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,l,u);a(t,l,u),Array.isArray(m)&&m.length||(t.visible=!1),f(t,m,"values",g);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",v),n.coerceFont(u,"tickfont",v),n.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},90785:(e,t,r)=>{"use strict";var n=r(53787).isTypedArray;t.convertTypedArray=function(e){return n(e)?Array.prototype.slice.call(e):e},t.isOrdinal=function(e){return!!e.tickvals},t.isVisible=function(e){return e.visible||!("visible"in e)}},98735:(e,t,r)=>{"use strict";var n=r(89338);n.plot=r(55136),e.exports=n},67365:(e,t,r)=>{"use strict";var n=r(26234),i=n("./shaders/vertex.glsl"),o=n("./shaders/fragment.glsl"),a=r(46964).maxDimensionCount,s=r(53787),l=1e-6,c=2048,u=new Uint8Array(4),d=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,i){var o=e._gl;o.enable(o.SCISSOR_TEST),o.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function p(e,t,r,n,i,o){var a=o.key;r.drawCompleted||(!function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[a]),delete r.currentRafs[a],h(e,o.scissorX,o.scissorY,o.scissorWidth,o.viewBoxSize[1])),r.clearOnly||(o.count=2*c,o.offset=2*l*n,t(o),l*n+c>>8*t)%256/255}function v(e,t,r){for(var n=new Array(8*t),i=0,o=0;od&&(d=e[i].dim1.canvasX,a=i);0===s&&h(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var o=!e&&n{"use strict";e.exports=function(e,t,r,n){var i,o;for(n||(n=1/0),i=0;i{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(11199),s=r(28605),l=i.strRotate,c=i.strTranslate,u=r(98224),d=r(50973),f=r(10948),h=r(41689),p=h.keyFun,m=h.repeat,g=h.unwrap,v=r(90785),y=r(46964),x=r(56737),b=r(67365);function w(e,t,r){return i.aggNums(e,null,t,r)}function _(e,t){return S(w(Math.min,e,t),w(Math.max,e,t))}function k(e){var t=e.range;return t?S(t[0],t[1]):_(e.values,e._length)}function S(e,t){return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(t)&&isFinite(t)||(t=0),e===t&&(0===e?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function T(e,t,r,i,a){var s,l,c=k(r);return i?n.scale.ordinal().domain(i.map((s=o(r.tickformat),l=a,l?function(e,t){var r=l[t];return null===r||void 0===r?s(e):r}:s))).range(i.map((function(r){var n=(r-c[0])/(c[1]-c[0]);return e-t+n*(2*t-e)}))):n.scale.linear().domain(c).range([e-t,t])}function M(e){if(e.tickvals){var t=k(e);return n.scale.ordinal().domain(e.tickvals).range(e.tickvals.map((function(e){return(e-t[0])/(t[1]-t[0])})))}}function C(e){var t=e.map((function(e){return e[0]})),r=e.map((function(e){var t=a(e[1]);return n.rgb("rgb("+t[0]+","+t[1]+","+t[2]+")")})),i="rgb".split("").map((function(e){return n.scale.linear().clamp(!0).domain(t).range(r.map((i=e,function(e){return e[i]})));var i}));return function(e){return i.map((function(t){return t(e)}))}}function A(e){return e.dimensions.some((function(e){return e.brush.filterSpecified}))}function E(e,t,r){var o=g(t),s=o.trace,l=v.convertTypedArray(o.lineColor),c=s.line,u={color:a(s.unselected.line.color),opacity:s.unselected.line.opacity},d=f.extractOpts(c),h=d.reversescale?f.flipScale(o.cscale):o.cscale,p=s.domain,m=s.dimensions,x=e.width,b=s.labelangle,w=s.labelside,_=s.labelfont,S=s.tickfont,T=s.rangefont,M=i.extendDeepNoArrays({},c,{color:l.map(n.scale.linear().domain(k({values:l,range:[d.min,d.max],_length:s._length}))),blockLineCount:y.blockLineCount,canvasOverdrag:y.overdrag*y.canvasPixelRatio}),A=Math.floor(x*(p.x[1]-p.x[0])),E=Math.floor(e.height*(p.y[1]-p.y[0])),I=e.margin||{l:80,r:80,t:100,b:80},O=A,P=E;return{key:r,colCount:m.filter(v.isVisible).length,dimensions:m,tickDistance:y.tickDistance,unitToColor:C(h),lines:M,deselectedLines:u,labelAngle:b,labelSide:w,labelFont:_,tickFont:S,rangeFont:T,layoutWidth:x,layoutHeight:e.height,domain:p,translateX:p.x[0]*x,translateY:e.height-p.y[1]*e.height,pad:I,canvasWidth:O*y.canvasPixelRatio+2*M.canvasOverdrag,canvasHeight:P*y.canvasPixelRatio,width:O,height:P,canvasPixelRatio:y.canvasPixelRatio}}function I(e,t,r){var a=r.width,s=r.height,l=r.dimensions,c=r.canvasPixelRatio,u=function(e){return a*e/Math.max(1,r.colCount-1)},d=y.verticalPadding/s,f=function(e,t){return n.scale.linear().range([t,e-t])}(s,y.verticalPadding),h={key:r.key,xScale:u,model:r,inBrushDrag:!1},p={};return h.dimensions=l.filter(v.isVisible).map((function(a,l){var m=function(e,t){return n.scale.linear().domain(k(e)).range([t,1-t])}(a,d),g=p[a.label];p[a.label]=(g||0)+1;var b=a.label+(g?"__"+g:""),w=a.constraintrange,_=w&&w.length;_&&!Array.isArray(w[0])&&(w=[w]);var S=_?w.map((function(e){return e.map(m)})):[[-1/0,1/0]],C=a.values;C.length>a._length&&(C=C.slice(0,a._length));var E,I=a.tickvals;function O(e,t){return{val:e,text:E[t]}}function P(e,t){return e.val-t.val}if(Array.isArray(I)&&I.length){E=a.ticktext,Array.isArray(E)&&E.length?E.length>I.length?E=E.slice(0,I.length):I.length>E.length&&(I=I.slice(0,E.length)):E=I.map(o(a.tickformat));for(var R=1;R=r||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],d=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:d};d!==z&&(u?o.hover(f):o.unhover&&o.unhover(f),z=d)}})),D.style("opacity",(function(e){return e.pick?0:1})),h.style("background","rgba(255, 255, 255, 0)");var N=h.selectAll("."+y.cn.parcoords).data(C,p);N.exit().remove(),N.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var F=N.selectAll("."+y.cn.parcoordsControlView).data(m,p);F.enter().append("g").classed(y.cn.parcoordsControlView,!0),F.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var B=F.selectAll("."+y.cn.yAxis).data((function(e){return e.dimensions}),p);B.enter().append("g").classed(y.cn.yAxis,!0),F.each((function(e){R(B,e,k)})),D.each((function(e){if(e.viewModel){!e.lineLayer||o?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||o;e.lineLayer.render(e.viewModel.panels,t)}})),B.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),B.call(n.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;M.linePickActive(!1),e.x=Math.max(-y.overdrag,Math.min(e.model.width+y.overdrag,n.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,B.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),R(B,t,k),B.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),n.select(this).attr("transform",c(e.x,0)),B.each((function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,R(B,t,k),n.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),M.linePickActive(!0),o&&o.axesMoved&&o.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),B.exit().remove();var Z=B.selectAll("."+y.cn.axisOverlays).data(m,p);Z.enter().append("g").classed(y.cn.axisOverlays,!0),Z.selectAll("."+y.cn.axis).remove();var U=Z.selectAll("."+y.cn.axis).data(m,p);U.enter().append("g").classed(y.cn.axis,!0),U.each((function(e){var t=e.model.height/e.model.tickDistance,r=e.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return v.isOrdinal(e)?t:L(e.model.dimensions[e.visibleIndex],t)})).scale(r)),d.font(U.selectAll("text"),e.model.tickFont)})),U.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),U.selectAll("text").style("text-shadow",u.makeTextShadow(T)).style("cursor","default");var V=Z.selectAll("."+y.cn.axisHeading).data(m,p);V.enter().append("g").classed(y.cn.axisHeading,!0);var H=V.selectAll("."+y.cn.axisTitle).data(m,p);H.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),H.text((function(e){return e.label})).each((function(t){var r=n.select(this);d.font(r,t.model.labelFont),u.convertToTspans(r,e)})).attr("transform",(function(e){var t=P(e.model.labelAngle,e.model.labelSide),r=y.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)})).attr("text-anchor",(function(e){var t=P(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var W=Z.selectAll("."+y.cn.axisExtent).data(m,p);W.enter().append("g").classed(y.cn.axisExtent,!0);var G=W.selectAll("."+y.cn.axisExtentTop).data(m,p);G.enter().append("g").classed(y.cn.axisExtentTop,!0),G.attr("transform",c(0,-y.axisExtentOffset));var q=G.selectAll("."+y.cn.axisExtentTopText).data(m,p);q.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(O),q.text((function(e){return j(e,!0)})).each((function(e){d.font(n.select(this),e.model.rangeFont)}));var Y=W.selectAll("."+y.cn.axisExtentBottom).data(m,p);Y.enter().append("g").classed(y.cn.axisExtentBottom,!0),Y.attr("transform",(function(e){return c(0,e.model.height+y.axisExtentOffset)}));var X=Y.selectAll("."+y.cn.axisExtentBottomText).data(m,p);X.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(O),X.text((function(e){return j(e,!1)})).each((function(e){d.font(n.select(this),e.model.rangeFont)})),x.ensureAxisBrush(Z,T,e)}},55136:(e,t,r)=>{"use strict";var n=r(93616),i=r(56162),o=r(90785).isVisible,a={};function s(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return-1===i&&(i+=t.length),i}(e.exports=function(e,t){var r=e._fullLayout;if(i(e,[],a)){var l={},c={},u={},d={},f=r._size;t.forEach((function(t,r){var n=t[0].trace;u[r]=n.index;var i=d[r]=n._fullInput.index;l[r]=e.data[i].dimensions,c[r]=e.data[i].dimensions.slice()}));n(e,t,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(t,n,i){var o=c[t][n],a=i.map((function(e){return e.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===l[s]){var f=o.constraintrange;l[s]=f||null}var h=e._fullData[u[t]].dimensions[n];a.length?(1===a.length&&(a=a[0]),o.constraintrange=a,h.constraintrange=a.slice(),a=[a]):(delete o.constraintrange,delete h.constraintrange,a=null);var p={};p[s]=a,e.emit("plotly_restyle",[p,[d[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return s(e,t,r)-s(e,t,n)}}(r,c[t].filter(o));l[t].sort(n),c[t].filter((function(e){return!o(e)})).sort((function(e){return c[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[d[t]]])}})}}).reglPrecompiled=a},10650:(e,t,r)=>{"use strict";var n=r(27231),i=r(29707).Y,o=r(92948),a=r(18022),s=r(32191).fF,l=r(32191).si,c=r(10191).extendFlat,u=r(93701).u,d=o({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."});e.exports={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:c({},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",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:c({},d,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:c({},d,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:c({},d,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:c({},d,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:c({},d,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}}},20268:(e,t,r)=>{"use strict";var n=r(44115);t.name="pie",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},21412:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(66235),a={};function s(e){return function(t,r){return!!t&&(!!(t=i(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t))}}function l(e,t){var r,n=JSON.stringify(e),o=t[n];if(!o){for(o=e.slice(),r=0;r=0})),("funnelarea"===t.type?v:t.sort)&&o.sort((function(e,t){return t.v-e.v})),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,o=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(o=l(o,a));for(var c=0,u=0;u{"use strict";var n=r(51908),i=r(53787),o=r(10650),a=r(29707).c,s=r(6099).handleText,l=r(53787).coercePattern;function c(e,t){var r=Array.isArray(e),o=i.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,o?t.length:1/0);if(isFinite(a)||(a=0),a&&o){for(var s,l=0;l0){s=!0;break}}s||(a=0)}return{hasLabels:r,hasValues:o,len:a}}function u(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");l(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:c,handleMarkerDefaults:u,supplyDefaults:function(e,t,r,n){function l(r,n){return i.coerce(e,t,o,r,n)}var d=c(l("labels"),l("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(l("label0"),l("dlabel")),f){t._length=f,u(e,t,n,l,!0),l("scalegroup");var h,p=l("text"),m=l("texttemplate");if(m||(h=l("textinfo",Array.isArray(p)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),m||h&&"none"!==h){var g=l("textposition");s(e,t,n,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&l("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&l("insidetextorientation")}a(t,n,l);var v=l("hole");if(l("title.text")){var y=l("title.position",v?"middle center":"top center");v||"middle center"!==y||(t.title.position="top center"),i.coerceFont(l,"title.font",n.font)}l("sort"),l("direction"),l("rotation"),l("pull")}else t.visible=!1}}},51938:(e,t,r)=>{"use strict";var n=r(87267).appendArrayMultiPointValues;e.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},61337:(e,t,r)=>{"use strict";var n=r(50973),i=r(66235);e.exports=function(e,t,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(e,r,o,t):i.fill(e,t.color)}},22084:(e,t,r)=>{"use strict";var n=r(53787);function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=i((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=i(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports={attributes:r(10650),supplyDefaults:r(24530).supplyDefaults,supplyLayoutDefaults:r(76683),layoutAttributes:r(24873),calc:r(21412).calc,crossTraceCalc:r(21412).crossTraceCalc,plot:r(3213).plot,style:r(62570),styleOne:r(68872),moduleType:"trace",name:"pie",basePlotModule:r(20268),categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}}},24873:e=>{"use strict";e.exports={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},76683:(e,t,r)=>{"use strict";var n=r(53787),i=r(24873);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}},3213:(e,t,r)=>{"use strict";var n=r(8996),i=r(44115),o=r(76719),a=r(66235),s=r(50973),l=r(53787),c=l.strScale,u=l.strTranslate,d=r(98224),f=r(22684),h=f.recordMinTextSize,p=f.clearMinTextSize,m=r(22331).TEXTPAD,g=r(22084),v=r(51938),y=r(53787).isValidTextValue;function x(e,t,r){var i=r[0],a=i.cx,s=i.cy,c=i.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",(function(e){var r=t._fullLayout,d=t._fullData[c.index];if(!t._dragging&&!1!==r.hovermode){var f=d.hoverinfo;if(Array.isArray(f)&&(f=o.castHoverinfo({hoverinfo:[g.castOption(f,e.pts)],_module:c._module},r,0)),"all"===f&&(f="label+text+value+percent+name"),d.hovertemplate||"none"!==f&&"skip"!==f&&f){var h=e.rInscribed||0,p=a+e.pxmid[0]*(1-h),m=s+e.pxmid[1]*(1-h),y=r.separators,x=[];if(f&&-1!==f.indexOf("label")&&x.push(e.label),e.text=g.castOption(d.hovertext||d.text,e.pts),f&&-1!==f.indexOf("text")){var b=e.text;l.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,y),f&&-1!==f.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/i.vTotal,e.percentLabel=g.formatPiePercent(e.percent,y),f&&-1!==f.indexOf("percent")&&x.push(e.percentLabel);var w=d.hoverlabel,_=w.font,k=[];o.loneHover({trace:c,x0:p-h*i.r,x1:p+h*i.r,y:m,_x0:u?a+e.TL[0]:p-h*i.r,_x1:u?a+e.TR[0]:p+h*i.r,_y0:u?s+e.TL[1]:m-h*i.r,_y1:u?s+e.BL[1]:m+h*i.r,text:x.join("
"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(w.bgcolor,e.pts)||e.color,borderColor:g.castOption(w.bordercolor,e.pts),fontFamily:g.castOption(_.family,e.pts),fontSize:g.castOption(_.size,e.pts),fontColor:g.castOption(_.color,e.pts),nameLength:g.castOption(w.namelength,e.pts),textAlign:g.castOption(w.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:k}),e.bbox=k[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,i=t._fullData[c.index],a=n.select(this).datum();c._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[v(a,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(o.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,i=t._fullData[c.index];t._dragging||!1===r.hovermode||(t._hoverdata=[v(e,i)],o.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var i=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,o=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n||a.contrast(t.color),family:i,size:o}}function w(e,t){for(var r,n,i=0;it&&t>n||r=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||h){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(s||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((o={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,o.scale>=1)return o;m.push(o)}(p||h)&&((o=k(e,n,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(o)),(p||f)&&((o=S(e,n,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(o));for(var x=0,b=0,w=0;w=1)break}return m[x]}function k(e,t,r,n,i){t=Math.max(0,t-2*m);var o=e.width/e.height,a=C(o,n,t,r);return{scale:2*a/e.height,rCenter:T(o,a/t),rotate:M(i)}}function S(e,t,r,n,i){t=Math.max(0,t-2*m);var o=e.height/e.width,a=C(o,n,t,r);return{scale:2*a/e.width,rCenter:T(o,a/t),rotate:M(i+Math.PI/2)}}function T(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function C(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function A(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function E(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,o=e.height/2;return r<0&&(i*=-1),n<0&&(o*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(o)*(i>0?1:-1)/2,y:o/(1+r*r/(n*n)),outside:!0}}function I(e,t){var r,n,i,o=e.trace,a={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=o.title.font.size,i=P(o),-1!==o.title.position.indexOf("top")?(a.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==o.title.position.indexOf("bottom")&&(a.y+=(1+i)*e.r);var l,c,u=(l=e.r,c=e.trace.aspectratio,l/(void 0===c?1:c)),d=t.w*(o.domain.x[1]-o.domain.x[0])/2;return-1!==o.title.position.indexOf("left")?(d+=u,a.x-=(1+i)*u,s.tx+=e.titleBox.width/2):-1!==o.title.position.indexOf("center")?d*=2:-1!==o.title.position.indexOf("right")&&(d+=u,a.x+=(1+i)*u,s.tx-=e.titleBox.width/2),r=d/e.titleBox.width,n=O(e,t)/e.titleBox.height,{x:a.x,y:a.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function O(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function R(e,t){for(var r=[],n=0;n1?u=(c=r.r)/i.aspectratio:c=(u=r.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}a=Math.min(a,l/r.vTotal)}for(n=0;n")}if(o){var x=l.castOption(i,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")}}(t),w=g.getFirstFilled(i.text,t.pts);(y(w)||""===w)&&(b.text=w),t.text=l.texttemplateString(x,b,e._fullLayout._d3locale,b,i._meta||{})}else t.text=""}}function D(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=(t.left+t.right)/2,a=(t.top+t.bottom)/2;e.textX=o*n-a*i,e.textY=o*i+a*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,o=e._fullLayout,f=o._size;p("pie",o),w(t,e),R(t,f);var m=l.makeTraceGroups(o._pielayer,t,"trace").each((function(t){var p=n.select(this),m=t[0],v=m.trace;!function(e){var t,r,n,i=e[0],o=i.r,a=i.trace,s=g.getRotationAngle(a.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===a.direction){for(t=0;ti.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-a.hole,r.rInscribed=A(r,i))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=n.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var w=[[[],[]],[[],[]]],k=!1;y.each((function(i,a){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=v.index,w[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var c=m.cx,u=m.cy,f=n.select(this),p=f.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),f.call(x,e,t),v.pull){var y=+g.castOption(v.pull,i.pts)||0;y>0&&(c+=y*i.pxmid[0],u+=y*i.pxmid[1])}i.cxFinal=c,i.cyFinal=u;var S=v.hole;if(i.v===m.vTotal){var T="M"+(c+i.px0[0])+","+(u+i.px0[1])+O(i.px0,i.pxmid,!0,1)+O(i.pxmid,i.px0,!0,1)+"Z";S?p.attr("d","M"+(c+S*i.px0[0])+","+(u+S*i.px0[1])+O(i.px0,i.pxmid,!1,S)+O(i.pxmid,i.px0,!1,S)+"Z"+T):p.attr("d",T)}else{var M=O(i.px0,i.px1,!0,1);if(S){var C=1-S;p.attr("d","M"+(c+S*i.px1[0])+","+(u+S*i.px1[1])+O(i.px1,i.px0,!1,S)+"l"+C*i.px0[0]+","+C*i.px0[1]+M+"Z")}else p.attr("d","M"+c+","+u+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}j(e,i,m);var A=g.castOption(v.textposition,i.pts),I=f.selectAll("g.slicetext").data(i.text&&"none"!==A?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each((function(){var r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=l.ensureUniformFontSize(e,"outside"===A?function(e,t,r){var n=g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,i=g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,o=g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:i,size:o}}(v,i,o.font):b(v,i,o.font));r.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,f).call(d.convertToTspans,e);var p,y=s.bBox(r.node());if("outside"===A)p=E(y,i);else if(p=_(y,i,m),"auto"===A&&p.scale<1){var x=l.ensureUniformFontSize(e,v.outsidetextfont);r.call(s.font,x),p=E(y=s.bBox(r.node()),i)}var w=p.textPosAngle,S=void 0===w?i.pxmid:L(m.r,w);if(p.targetX=c+S[0]*p.rCenter+(p.x||0),p.targetY=u+S[1]*p.rCenter+(p.y||0),D(p,y),p.outside){var T=p.targetY;i.yLabelMin=T-y.height/2,i.yLabelMid=T,i.yLabelMax=T+y.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}p.fontSize=f.size,h(v.type,p,o),t[a].transform=p,l.setTransormAndDisplay(r,p)}))}function O(e,t,r,n){var o=n*(t[0]-e[0]),a=n*(t[1]-e[1]);return"a"+n*m.r+","+n*m.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+o+","+a}}));var S=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(S.enter().append("g").classed("titletext",!0),S.exit().remove(),S.each((function(){var t,r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=v.title.text;v._meta&&(i=l.templateString(i,v._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,v.title.font).call(d.convertToTspans,e),t="middle center"===v.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(m):I(m,f),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),k&&function(e,t){var r,n,i,o,a,s,l,c,u,d,f,h,p;function m(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,r){r||(r={});var i,c,u,f,h=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),p=n?e.yLabelMin:e.yLabelMax,m=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+a(e.px0[1],e.px1[1]),y=h-p;if(y*l>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c=(g.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+a(u.px0[1],u.px1[1])-p-e.labelExtraY)*l>0&&(e.labelExtraY+=y):(m+e.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-d.indexOf(e)),(f=u.cxFinal+o(u.px0[0],u.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=f)))}for(n=0;n<2;n++)for(i=n?m:v,a=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(o=r?Math.max:Math.min,s=r?1:-1,(c=e[n][r]).sort(i),u=e[1-n][r],d=u.concat(c),h=[],f=0;fMath.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(o+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(y,v),k&&v.automargin){var T=s.bBox(p.node()),M=v.domain,C=f.w*(M.x[1]-M.x[0]),A=f.h*(M.y[1]-M.y[0]),O=(.5*C-m.r)/f.w,P=(.5*A-m.r)/f.h;i.autoMargin(e,"pie."+v.uid+".automargin",{xl:M.x[0]-O,xr:M.x[1]+O,yb:M.y[0]-P,yt:M.y[1]+P,l:Math.max(m.cx-m.r-T.left,0),r:Math.max(T.right-(m.cx+m.r),0),b:Math.max(T.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-T.top,0),pad:5})}}))}));setTimeout((function(){m.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:j,transformInsideText:_,determineInsideTextFont:b,positionTitleOutside:I,prerenderTitles:w,layoutAreas:R,attachFxHandlers:x,computeTransform:D}},62570:(e,t,r)=>{"use strict";var n=r(8996),i=r(68872),o=r(22684).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");o(e,t,"pie"),t.each((function(t){var r=t[0].trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},68872:(e,t,r)=>{"use strict";var n=r(66235),i=r(22084).castOption,o=r(61337);e.exports=function(e,t,r,a){var s=r.marker.line,l=i(s.color,t.pts)||n.defaultLine,c=i(s.width,t.pts)||0;e.call(o,t,r,a).style("stroke-width",c).call(n.stroke,l)}},97365:(e,t,r)=>{"use strict";var n=r(37471);e.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc",description:["Faster alternative to specifying `x` and `y` separately.","If supplied, it must be a typed `Float32Array` array that","represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`"].join(" ")},indices:{valType:"data_array",editType:"calc",description:["A sequential value, 0..n, supply it to avoid creating this array inside plotting.","If specified, it must be a typed `Int32Array` array.","Its length must be equal to or greater than the number of points.","For the best performance and memory use, create one large `indices` typed array","that is guaranteed to be at least as long as the largest number of points during","use, and reuse it on each `Plotly.restyle()` call."].join(" ")},xbounds:{valType:"data_array",editType:"calc",description:["Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through","the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits."].join(" ")},ybounds:{valType:"data_array",editType:"calc",description:["Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through","the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits."].join(" ")},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc",description:["Sets the marker fill color. It accepts a specific color.","If the color is not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc",description:["Sets the marker opacity. The default value is `1` (fully opaque).","If the markers are not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning.","Opacity fades the color even if `blend` is left on `false` even if there","is no translucency effect in that case."].join(" ")},blend:{valType:"boolean",dflt:null,editType:"calc",description:["Determines if colors are blended together for a translucency effect","in case `opacity` is specified as a value less then `1`.","Setting `blend` to `true` reduces zoom/pan","speed if used with large numbers of points."].join(" ")},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc",description:["Sets the minimum size (in px) of the rendered marker points, effective when","the `pointcloud` shows a million or more points."].join(" ")},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc",description:["Sets the maximum size (in px) of the rendered marker points.","Effective when the `pointcloud` shows only few points."].join(" ")},border:{color:{valType:"color",arrayOk:!1,editType:"calc",description:["Sets the stroke color. It accepts a specific color.","If the color is not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning."].join(" ")},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Specifies what fraction of the marker area is covered with the","border."].join(" ")},editType:"calc"},editType:"calc"},transforms:void 0}},19433:(e,t,r)=>{"use strict";var n=r(13084).gl_pointcloud2d,i=r(55115),o=r(10351).findExtremes,a=r(83821);function s(e,t){this.scene=e,this.uid=t,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(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=a(e,{})},l.updateFast=function(e){var t,r,n,a,s,l,c=this.xData=this.pickXData=e.x,u=this.yData=this.pickYData=e.y,d=this.pickXYData=e.xy,f=e.xbounds&&e.ybounds,h=e.indices,p=this.bounds;if(d){if(n=d,t=d.length>>>1,f)p[0]=e.xbounds[0],p[2]=e.xbounds[1],p[1]=e.ybounds[0],p[3]=e.ybounds[1];else for(l=0;lp[2]&&(p[2]=a),sp[3]&&(p[3]=s);if(h)r=h;else for(r=new Int32Array(t),l=0;lp[2]&&(p[2]=a),sp[3]&&(p[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var m=i(e.marker.color),g=i(e.marker.border.color),v=e.opacity*e.marker.opacity;m[3]*=v,this.pointcloudOptions.color=m;var y=e.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,g[3]*=v,this.pointcloudOptions.borderColor=g;var x=e.marker.sizemin,b=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var w=this.scene.xaxis,_=this.scene.yaxis,k=b/2||.5;e._extremes[w._id]=o(w,[p[0],p[2]],{ppad:k}),e._extremes[_._id]=o(_,[p[1],p[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(e,t){var r=new s(e,t.uid);return r.update(t),r}},73523:(e,t,r)=>{"use strict";var n=r(53787),i=r(97365);e.exports=function(e,t,r){function o(r,o){return n.coerce(e,t,i,r,o)}o("x"),o("y"),o("xbounds"),o("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),o("text"),o("marker.color",r),o("marker.opacity"),o("marker.blend"),o("marker.sizemin"),o("marker.sizemax"),o("marker.border.color",r),o("marker.border.arearatio"),t._length=null}},26248:(e,t,r)=>{"use strict";var n=["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" ");e.exports={attributes:r(97365),supplyDefaults:r(73523),calc:r(51454),plot:r(19433),moduleType:"trace",name:"pointcloud",basePlotModule:r(27952),categories:["gl","gl2d","showLegend"],meta:{description:[n,"The data visualized as a point cloud set in `x` and `y`","using the WebGl plotting engine."].join(" ")}}},25499:(e,t,r)=>{"use strict";var n=r(92948),i=r(27231),o=r(18022),a=r(54289),s=r(29707).Y,l=r(32191).fF,c=r(8753),u=r(99862).templatedArray,d=r(89849).descriptionOnlyNumbers,f=r(10191).extendFlat,h=r(18693).overrideAll;(e.exports=h({hoverinfo:f({},i.hoverinfo,{flags:[],arrayOk:!1,description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired.","Note that this attribute is superseded by `node.hoverinfo` and `node.hoverinfo`","for nodes and links respectively."].join(" ")}),hoverlabel:a.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h",description:"Sets the orientation of the Sankey diagram."},valueformat:{valType:"string",dflt:".3s",description:d("value")},valuesuffix:{valType:"string",dflt:"",description:["Adds a unit to follow the value in the hover tooltip. Add a space if a separation","is necessary from the value."].join(" ")},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap",description:["If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to","preserve space between nodes specified via `nodepad`.","If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow.","If value is `freeform`, the nodes can freely move on the plane.","If value is `fixed`, the nodes are stationary."].join(" ")},textfont:n({description:"Sets the font for node labels"}),customdata:void 0,node:{label:{valType:"data_array",dflt:[],description:"The shown name of the node."},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"},description:["Groups of nodes.","Each group is defined by an array with the indices of the nodes it contains.","Multiple groups can be specified."].join(" ")},x:{valType:"data_array",dflt:[],description:"The normalized horizontal position of the node."},y:{valType:"data_array",dflt:[],description:"The normalized vertical position of the node."},color:{valType:"color",arrayOk:!0,description:["Sets the `node` color. It can be a single value, or an array for specifying color for each `node`.","If `node.color` is omitted, then the default `Plotly` color palette will be cycled through","to have a variety of colors. These defaults are not fully opaque, to allow some visibility of","what is beneath the node."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data to each node."].join(" ")},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,description:["Sets the color of the `line` around each `node`."].join(" ")},width:{valType:"number",min:0,dflt:.5,arrayOk:!0,description:["Sets the width (in px) of the `line` around each `node`."].join(" ")}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20,description:"Sets the padding (in px) between the `nodes`."},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20,description:"Sets the thickness (in px) of the `nodes`."},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all",description:["Determines which trace information appear when hovering nodes.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:a.hoverlabel,hovertemplate:l({},{description:"Variables `sourceLinks` and `targetLinks` are arrays of link objects.",keys:["value","label"]}),description:"The nodes of the Sankey plot."},link:{arrowlen:{valType:"number",min:0,dflt:0,description:["Sets the length (in px) of the links arrow, if 0 no arrow will be drawn."].join(" ")},label:{valType:"data_array",dflt:[],description:"The shown name of the link."},color:{valType:"color",arrayOk:!0,description:["Sets the `link` color. It can be a single value, or an array for specifying color for each `link`.","If `link.color` is omitted, then by default, a translucent grey link will be used."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data to each link."].join(" ")},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,description:["Sets the color of the `line` around each `link`."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,description:["Sets the width (in px) of the `line` around each `link`."].join(" ")}},source:{valType:"data_array",dflt:[],description:"An integer number `[0..nodes.length - 1]` that represents the source node."},target:{valType:"data_array",dflt:[],description:"An integer number `[0..nodes.length - 1]` that represents the target node."},value:{valType:"data_array",dflt:[],description:"A numeric value representing the flow volume value."},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all",description:["Determines which trace information appear when hovering links.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:a.hoverlabel,hovertemplate:l({},{description:"Variables `source` and `target` are node objects.",keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",description:"The label of the links to color based on their concentration within a flow.",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1,description:"Sets the upper bound of the color domain."},cmin:{valType:"number",editType:"calc",dflt:0,description:"Sets the lower bound of the color domain."},colorscale:f(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),description:"The links of the Sankey plot."}},"calc","nested")).transforms=void 0},53436:(e,t,r)=>{"use strict";var n=r(18693).overrideAll,i=r(38213).a0,o=r(1549),a=r(18971),s=r(19602),l=r(63e3),c=r(26002).prepSelect,u=r(53787),d=r(44049),f="sankey";function h(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,o="pan"===n.dragmode?"move":"crosshair",a=r._bgRect;if(a&&"pan"!==i&&"zoom"!==i){s(a,o);var f={_id:"x",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},p={gd:e,element:a.node(),plotinfo:{id:t,xaxis:f,yaxis:h,fillRangeItems:u.noop},subplot:t,xaxes:[f],yaxes:[h],doneFnCompleted:function(r){var n,i=e._fullData[t],o=i.node.groups.slice(),a=[];function s(e){for(var t=i._sankey.graph.nodes,r=0;r{"use strict";var n=r(47978),i=r(53787),o=r(41689).wrap,a=i.isArrayOrTypedArray,s=i.isIndex,l=r(10948);function c(e){var t,r=e.node,o=e.link,c=[],u=a(o.color),d=a(o.customdata),f={},h={},p=o.colorscales.length;for(t=0;ty&&(y=o.source[t]),o.target[t]>y&&(y=o.target[t]);var x,b=y+1;e.node._count=b;var w=e.node.groups,_={};for(t=0;t0&&s(A,b)&&s(E,b)&&(!_.hasOwnProperty(A)||!_.hasOwnProperty(E)||_[A]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(A)&&(A=_[A]),E=+E,f[A=+A]=f[E]=!0;var I="";o.label&&o.label[t]&&(I=o.label[t]);var O=null;I&&h.hasOwnProperty(I)&&(O=h[I]),c.push({pointNumber:t,label:I,color:u?o.color[t]:o.color,customdata:d?o.customdata[t]:o.customdata,concentrationscale:O,source:A,target:E,value:+C}),M.source.push(A),M.target.push(E)}}var P=b+w.length,R=a(r.color),L=a(r.customdata),j=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:D,color:R?r.color[t]:r.color,customdata:L?r.customdata[t]:r.customdata})}var z=!1;return function(e,t,r){for(var o=i.init2dArray(e,0),a=0;a1}))}(P,M.source,M.target)&&(z=!0),{circular:z,links:c,nodes:j,groups:w,groupLookup:_}}e.exports=function(e,t){var r=c(t);return o({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},54421:e=>{"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"}}},57530:(e,t,r)=>{"use strict";var n=r(53787),i=r(25499),o=r(66235),a=r(25378),s=r(29707).c,l=r(70439),c=r(99862),u=r(80254);function d(e,t){function r(r,o){return n.coerce(e,t,i.link.colorscales,r,o)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(e,t,r,f){function h(r,o){return n.coerce(e,t,i,r,o)}var p=n.extendDeep(f.hoverlabel,e.hoverlabel),m=e.node,g=c.newContainer(t,"node");function v(e,t){return n.coerce(m,g,i.node,e,t)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",e.hoverinfo),l(m,g,v,p),v("hovertemplate");var y=f.colorway;v("color",g.label.map((function(e,t){return o.addOpacity(function(e){return y[e%y.length]}(t),.8)}))),v("customdata");var x=e.link||{},b=c.newContainer(t,"link");function w(e,t){return n.coerce(x,b,i.link,e,t)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",e.hoverinfo),l(x,b,w,p),w("hovertemplate");var _,k=a(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";w("color",n.repeat(k,b.value.length)),w("customdata"),u(x,b,{name:"colorscales",handleItemDefaults:d}),s(t,f,h),h("orientation"),h("valueformat"),h("valuesuffix"),g.x.length&&g.y.length&&(_="freeform"),h("arrangement",_),n.coerceFont(h,"textfont",n.extendFlat({},f.font)),t._length=null}},67751:(e,t,r)=>{"use strict";e.exports={attributes:r(25499),supplyDefaults:r(57530),calc:r(59691),plot:r(1549),moduleType:"trace",name:"sankey",basePlotModule:r(53436),selectPoints:r(7531),categories:["noOpacity"],meta:{description:["Sankey plots for network flow data analysis.","The nodes are specified in `nodes` and the links between sources and targets in `links`.","The colors are set in `nodes[i].color` and `links[i].color`, otherwise defaults are used."].join(" ")}}},1549:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(36709),s=r(76719),l=r(66235),c=r(54421).cn,u=i._;function d(e){return""!==e}function f(e,t){return e.filter((function(e){return e.key===t.traceId}))}function h(e,t){n.select(e).select("path").style("fill-opacity",t),n.select(e).select("rect").style("fill-opacity",t)}function p(e){n.select(e).select("text.name").style("fill","black")}function m(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function g(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function v(e,t,r){t&&r&&f(r,t).selectAll("."+c.sankeyLink).filter(m(t)).call(x.bind(0,t,r,!1))}function y(e,t,r){t&&r&&f(r,t).selectAll("."+c.sankeyLink).filter(m(t)).call(b.bind(0,t,r,!1))}function x(e,t,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),i&&f(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),r&&f(t,e).selectAll("."+c.sankeyNode).filter(g(e)).call(v)}function b(e,t,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(e){return e.tinyColorAlpha})),i&&f(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),r&&f(t,e).selectAll(c.sankeyNode).filter(g(e)).call(y)}function w(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}e.exports=function(e,t){for(var r=e._fullLayout,i=r._paper,f=r._size,m=0;m"),color:w(a,"bgcolor")||l.addOpacity(m.color,1),borderColor:w(a,"bordercolor"),fontFamily:w(a,"font.family"),fontSize:w(a,"font.size"),fontColor:w(a,"font.color"),nameLength:w(a,"namelength"),textAlign:w(a,"align"),idealAlign:n.event.x"),color:w(a,"bgcolor")||i.tinyColorHue,borderColor:w(a,"bordercolor"),fontFamily:w(a,"font.family"),fontSize:w(a,"font.size"),fontColor:w(a,"font.color"),nameLength:w(a,"namelength"),textAlign:w(a,"align"),idealAlign:"left",hovertemplate:a.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e});h(_,.85),p(_)}}},unhover:function(t,i,o){!1!==e._fullLayout.hovermode&&(n.select(t).call(y,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(t,r,i){var o=r.node;o.originalEvent=n.event,e._hoverdata=[o],n.select(t).call(y,r,i),s.click(e,{target:!0})}}})}},36709:(e,t,r)=>{"use strict";var n=r(98020),i=r(81105).k4,o=r(8996),a=r(22854),s=r(6954),l=r(54421),c=r(25378),u=r(66235),d=r(50973),f=r(53787),h=f.strTranslate,p=f.strRotate,m=r(41689),g=m.keyFun,v=m.repeat,y=m.unwrap,x=r(98224),b=r(44049),w=r(81653),_=w.CAP_SHIFT,k=w.LINE_SPACING;function S(e,t,r){var n,i=y(t),o=i.trace,u=o.domain,d="h"===o.orientation,h=o.node.pad,p=o.node.thickness,m=e.width*(u.x[1]-u.x[0]),g=e.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(l.sankeyIterations).size(d?[m,g]:[g,m]).nodeWidth(p).nodePadding(h).nodeId((function(e){return e.pointNumber})).nodes(v).links(x);var w,_,k,S=n();for(var T in n.nodePadding()=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+h}))}(function(e){var t,r,n=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),i=[],o=-1,a=-1/0;for(w=0;wa+p&&(o+=1,t=s.x0),a=s.x0,i[o]||(i[o]=[]),i[o].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i}(v=S.nodes));n.update(S)}return{circular:b,key:r,trace:o,guid:f.randstr(),horizontal:d,width:m,height:g,nodePad:o.node.pad,nodeLineColor:o.node.line.color,nodeLineWidth:o.node.line.width,linkLineColor:o.link.line.color,linkLineWidth:o.link.line.width,linkArrowLength:o.link.arrowlen,valueFormat:o.valueformat,valueSuffix:o.valuesuffix,textFont:o.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:d?g:m,dragPerpendicular:d?m:g,arrangement:o.arrangement,sankey:n,graph:S,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function T(e,t,r){var n=c(t.color),i=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function M(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var r=e.width/2,n=e.circularPathData;return"top"===e.circularLinkType?"M "+(n.targetX-t)+" "+(n.targetY+r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(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-t)+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"L"+(n.targetX-t)+" "+(n.targetY-r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z":"M "+(n.targetX-t)+" "+(n.targetY-r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(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-t)+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"L"+(n.targetX-t)+" "+(n.targetY+r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z"}(e.link,t);var r=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>r&&(t=r);var n=e.link.source.x1,o=e.link.target.x0-t,a=i(n,o),s=a(.5),l=a(.5),c=e.link.y0-e.link.width/2,u=e.link.y0+e.link.width/2,d=e.link.y1-e.link.width/2,f=e.link.y1+e.link.width/2,h="M"+n+","+c,p="C"+s+","+c+" "+l+","+d+" "+o+","+d,m="C"+l+","+f+" "+s+","+u+" "+n+","+u,g=t>0?"L"+(o+t)+","+(d+e.link.width/2):"";return h+p+(g+="L"+o+","+f)+m+"Z"}}function C(e,t){var r=c(t.color),n=l.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var o=t.dx,a=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=f.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(o),visibleHeight:a,zoneX:-n,zoneY:-i,zoneWidth:o+2*n,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function A(e){e.attr("transform",(function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function E(e){e.call(A)}function I(e,t){e.call(E),t.attr("d",M())}function O(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function P(e){return e.link.width>1||e.linkLineWidth>0}function R(e){return h(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function L(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)}))}function j(e,t,r,i){var a=o.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(o){if("fixed"!==o.arrangement&&(f.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),f.raiseToTop(this),o.interactionState.dragInProgress=o.node,z(o.node),o.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,o.interactionState.hovered),o.interactionState.hovered=!1),"snap"===o.arrangement)){var a=o.traceId+"|"+o.key;o.forceLayouts[a]?o.forceLayouts[a].alpha(1):function(e,t,r,i){!function(e){for(var t=0;t0&&n.forceLayouts[t].alpha(0)}}(0,t,o,r)).stop()}(0,a,o),function(e,t,r,n,i){window.requestAnimationFrame((function o(){var a;for(a=0;a0)window.requestAnimationFrame(o);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,D(r,i)}}))}(e,t,o,a,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=o.event.x,i=o.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),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),I(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t{"use strict";e.exports=function(e,t){for(var r=[],n=e.cd[0].trace,i=n._sankey.graph.nodes,o=0;o{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(89849).axisHoverFormat,i=r(32191).si,o=r(32191).fF,a=r(8753),s=r(92948),l=r(93701).P,c=r(93701).u,u=r(50973),d=r(80775),f=r(10191).extendFlat;function h(e){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+e+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function p(e){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+e+" axis.","When `"+e+"period` is round number of weeks,","the `"+e+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function m(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+e+" axis."].join(" ")}}e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:h("x"),yperiod:h("y"),xperiod0:p("x0"),yperiod0:p("y0"),xperiodalignment:m("x"),yperiodalignment:m("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+d.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:d.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:f({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},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",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})}},18719:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(28605),a=r(64594),s=r(24956).BADNUM,l=r(26775),c=r(65664),u=r(62532),d=r(35637);function f(e,t,r,n,i,a,s){var c=t._length,u=e._fullLayout,d=r._id,f=n._id,h=u._firstScatter[m(t)]===t.uid,p=(g(t,u,r,n)||{}).orientation,v=t.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};s&&(y.ppad=x.ppad=s);var b=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];b&&("tozerox"===v||"tonextx"===v&&(h||"h"===p))?y.tozero=!0:(t.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(t)||l.hasText(t))||(y.padded=!1,y.ppad=0),b&&("tozeroy"===v||"tonexty"===v&&(h||"v"===p))?x.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(x.padded=!1),d&&(t._extremes[d]=o.findExtremes(r,i,y)),f&&(t._extremes[f]=o.findExtremes(n,a,x))}function h(e,t){if(l.hasMarkers(e)){var r,n=e.marker,a=1.6*(e.marker.sizeref||1);if(r="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/a),3)}:function(e){return Math.max((e||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(e.marker,"size"),u=new Array(t),d=0;dl&&I[v].gap;)v--;for(x=I[v].s,m=I.length-1;m>v;m--)I[m].s=x;for(;l{"use strict";var n=r(53787);e.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},65664:(e,t,r)=>{"use strict";var n=r(25584).hasColorscale,i=r(1631),o=r(26775);e.exports=function(e,t){o.hasLines(t)&&n(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(t)&&(n(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},80775:e=>{"use strict";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},42344:(e,t,r)=>{"use strict";var n=r(18719),i=r(39713).setGroupPositions;function o(e,t,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,e.splice(t,0,s),t&&r===e[t-1][a]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(e,t,r,n){var i=e[t-1],o=e[t+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(e,t,r,a));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}e.exports=function(e,t){"group"===e._fullLayout.scattermode&&function(e,t){for(var r=t.xaxis,n=t.yaxis,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=[],c=[],u=0;uC[d]&&d{"use strict";var n=r(53787),i=r(25305),o=r(37471);e.exports=function(e,t){var r,a,s;function l(e){return n.coerce(a._input,a,o,e)}if("group"===t.scattermode)for(s=0;s=0;d--){var f=e[d];if("scatter"===f.type&&f.xaxis===c.xaxis&&f.yaxis===c.yaxis){f.opacity=void 0;break}}}}}},539:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(37471),a=r(80775),s=r(26775),l=r(89016),c=r(17239),u=r(12507),d=r(6408),f=r(82028),h=r(80156),p=r(37480),m=r(4363),g=r(53787).coercePattern;e.exports=function(e,t,r,v){function y(r,i){return n.coerce(e,t,o,r,i)}var x=l(e,t,v,y);if(x||(t.visible=!1),t.visible){c(e,t,v,y),y("xhoverformat"),y("yhoverformat");var b=u(e,t,v,y);"group"===v.scattermode&&void 0===t.orientation&&y("orientation","v");var w=!b&&x{"use strict";var n=r(66235),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o){var a=!1;if(t.marker){var s=t.marker.color,l=(t.marker.line||{}).color;s&&!i(s)?a=s:l&&!i(l)&&(a=l)}o("fillcolor",n.addOpacity((t.line||{}).color||a||r,.5))}},48529:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,t,"x"),s=n.getFromTrace(o,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},83821:(e,t,r)=>{"use strict";var n=r(66235),i=r(26775);e.exports=function(e,t){var r,o;if("lines"===e.mode)return(r=e.line.color)&&n.opacity(r)?r:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var a=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(e.line||{}).color)&&n.opacity(r)&&i.hasLines(e)&&e.line.width?r:e.fillcolor}},25305:(e,t,r)=>{"use strict";var n=r(14511).getAxisGroup;e.exports=function(e,t,r,i){var o=t.orientation,a=t[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),u=l[s];u||(u=l[s]={});var d=u[c];d?d.traces.push(t):d=u[c]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var f=i("offsetgroup"),h=d.offsetGroups,p=h[f];f&&(p||(p=h[f]={offsetIndex:Object.keys(h).length}),t._offsetIndex=p.offsetIndex)}},77128:(e,t,r)=>{"use strict";var n=r(53787),i=r(76719),o=r(44049),a=r(83821),s=r(66235),l=n.fillText;e.exports=function(e,t,r,c){var u=e.cd,d=u[0].trace,f=e.xa,h=e.ya,p=f.c2p(t),m=h.c2p(r),g=[p,m],v=d.hoveron||"",y=-1!==d.mode.indexOf("markers")?3:.5,x=!!d.xperiodalignment,b=!!d.yperiodalignment;if(-1!==v.indexOf("points")){var w=function(e){var t=Math.max(y,e.mrc||0),r=f.c2p(e.x)-p,n=h.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-y/t)},_=i.getDistanceFunction(c,(function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,o=Math.abs(f.c2p(e.x)-p);return o=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,o=Math.abs(h.c2p(e.y)-m);return oq!==(F=L[P][1])>=q&&(D=L[P-1][0],z=L[P][0],F-N&&(j=D+(z-D)*(q-N)/(F-N),V=Math.min(V,j),H=Math.max(H,j)));V=Math.max(V,0),H=Math.min(H,f._length);var Y=s.defaultLine;return s.opacity(d.fillcolor)?Y=d.fillcolor:s.opacity((d.line||{}).color)&&(Y=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:V,x1:H,y0:q,y1:q,color:Y,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},88975:(e,t,r)=>{"use strict";var n=r(26775);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(37471),layoutAttributes:r(61070),supplyDefaults:r(539),crossTraceDefaults:r(22551),supplyLayoutDefaults:r(95227),calc:r(18719).calc,crossTraceCalc:r(42344),arraysToCalcdata:r(62532),plot:r(96865),colorbar:r(68971),formatLabels:r(48529),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(77128),selectPoints:r(97976),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(48206),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},61070:e=>{"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},95227:(e,t,r)=>{"use strict";var n=r(53787),i=r(61070);e.exports=function(e,t){var r,o,a="group"===t.barmode;"group"===t.scattermode&&(r="scattergap",o=a?t.bargap:.2,n.coerce(e,t,i,r,o))}},82028:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray,i=r(25584).hasColorscale,o=r(5876);e.exports=function(e,t,r,a,s,l){l||(l={});var c=(e.marker||{}).color;(s("line.color",r),i(e,"line"))?o(e,t,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r);s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},84542:(e,t,r)=>{"use strict";var n=r(50973),i=r(24956),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(53787),u=c.segmentsIntersect,d=c.constrain,f=r(80775);e.exports=function(e,t){var r,i,a,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A=t.trace||{},E=t.xaxis,I=t.yaxis,O="log"===E.type,P="log"===I.type,R=E._length,L=I._length,j=t.backoff,D=A.marker,z=t.connectGaps,N=t.baseTolerance,F=t.shape,B="linear"===F,Z=A.fill&&"none"!==A.fill,U=[],V=f.minTolerance,H=e.length,W=new Array(H),G=0;function q(r){var n=e[r];if(!n)return!1;var i=t.linearized?E.l2p(n.x):E.c2p(n.x),a=t.linearized?I.l2p(n.y):I.c2p(n.y);if(i===o){if(O&&(i=E.c2p(n.x,!0)),i===o)return!1;P&&a===o&&(i*=Math.abs(E._m*L*(E._m>0?s:l)/(I._m*R*(I._m>0?s:l)))),i*=1e3}if(a===o){if(P&&(a=I.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Y(e,t,r,n){var i=r-e,o=n-t,a=.5-e,s=.5-t,l=i*i+o*o,c=i*a+o*s;if(c>0&&cae||e[1]le)return[d(e[0],oe,ae),d(e[1],se,le)]}function de(e,t){return e[0]===t[0]&&(e[0]===oe||e[0]===ae)||(e[1]===t[1]&&(e[1]===se||e[1]===le)||void 0)}function fe(e,t,r){return function(n,i){var o=ue(n),a=ue(i),s=[];if(o&&a&&de(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[e]+i[e])/2,t,r)-((o||n)[e]+(a||i)[e]);l&&((o&&a?l>0===o[e]>a[e]?o:a:o||a)[e]+=l);return s}}function he(e){var t=e[0],r=e[1],n=t===W[G-1][0],i=r===W[G-1][1];if(!n||!i)if(G>1){var o=t===W[G-2][0],a=r===W[G-2][1];n&&(t===oe||t===ae)&&o?a?G--:W[G-1]=e:i&&(r===se||r===le)&&a?o?G--:W[G-1]=e:W[G++]=e}else W[G++]=e}function pe(e){W[G-1][0]!==e[0]&&W[G-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===F||"spline"===F?ne=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var o=ce[i],a=u(e[0],e[1],t[0],t[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&K(a,e)ae?ae:0,J=t[1]le?le:0,$||J){if(G)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),W[G++]=n[1])}else re=ne(W[G-1],t)[0],W[G++]=re;else W[G++]=[$||t[0],J||t[1]];var i=W[G-1];$&&J&&(i[0]!==$||i[1]!==J)?(te&&(Q!==$&&ee!==J?he(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?oe:ae,le]:[n>0?ae:oe,se]}(te,t):[Q||$,ee||J]):Q&&ee&&he([Q,ee])),he([$,J])):Q-$&&ee-J&&he([$||Q,J||ee]),te=t,Q=$,ee=J}else te&&pe(ne(te,t)[0]),W[G++]=t}for(r=0;rX(m,ve))break;a=m,(_=y[0]*v[0]+y[1]*v[1])>b?(b=_,h=m,g=!1):_=e.length||!m)break;ge(m),i=m}}else ge(h)}te&&he([Q||te[0],ee||te[1]]),U.push(W.slice(0,G))}var ye=F.slice(F.length-1);if(j&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,we=[],_e=0;_e{"use strict";e.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},98022:e=>{"use strict";var t={tonextx:1,tonexty:1,tonext:1};e.exports=function(e,r,n){var i,o,a,s,l,c={},u=!1,d=-1,f=0,h=-1;for(o=0;o=0?l=h:(l=h=f,f++),l{"use strict";var n=r(51908);e.exports=function(e,t){t||(t=2);var r=e.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var r=a(e/t);return n(r)&&r>0?Math.max(r,o):0}}},68971:e=>{"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},6408:(e,t,r)=>{"use strict";var n=r(66235),i=r(25584).hasColorscale,o=r(5876),a=r(26775);e.exports=function(e,t,r,s,l,c){var u=a.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(r=d),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(e,"marker")&&o(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),i(e,"marker.line")&&o(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},17239:(e,t,r)=>{"use strict";var n=r(53787).dateTick0,i=r(24956).ONEWEEK;function o(e,t){return n(t,e%i===0?1:0)}e.exports=function(e,t,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,t.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,t.ycalendar)),n("yperiodalignment"))}}},96865:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=o.ensureSingle,s=o.identity,l=r(50973),c=r(26775),u=r(84542),d=r(98022),f=r(71962).tester;function h(e,t,r,d,h,p,m){var g,v=e._context.staticPlot;!function(e,t,r,i,a){var s=r.xaxis,l=r.yaxis,u=n.extent(o.simpleMap(s.range,s.r2c)),d=n.extent(o.simpleMap(l.range,l.r2c)),f=i[0].trace;if(!c.hasMarkers(f))return;var h=f.marker.maxdisplayed;if(0===h)return;var p=i.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(p.length/h),g=0;a.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return y?e.transition():e}var b=r.xaxis,w=r.yaxis,_=d[0].trace,k=_.line,S=n.select(p),T=a(S,"g","errorbars"),M=a(S,"g","lines"),C=a(S,"g","points"),A=a(S,"g","text");if(i.getComponentMethod("errorbars","plot")(e,T,r,m),!0===_.visible){var E,I;x(S).style("opacity",_.opacity);var O=_.fill.charAt(_.fill.length-1);"x"!==O&&"y"!==O&&(O=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=S;var P,R,L="",j=[],D=_._prevtrace;D&&(L=D._prevRevpath||"",I=D._nextFill,j=D._polygons);var z,N,F,B,Z,U,V,H="",W="",G=[],q=o.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(I&&I.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(z=l.steps(k.shape),N=l.steps(k.shape.split("").reverse().join(""))):z=N="spline"===k.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),k.smoothing):l.smoothopen(e,k.smoothing)}:function(e){return"M"+e.join("L")},F=function(e){return N(e.reverse())},G=u(d,{xaxis:b,yaxis:w,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),g=0;g0,g=d(e,t,r);((u=i.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,r){t.each((function(t){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,e);var o=t[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(e){o[e]=null})).remove(),u.order().each((function(e){o[e]=a(n.select(this),"path","js-fill")}))}))}(e,u,t),m)?(c&&(f=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){i.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,o)}))}))):u.each((function(r,n){h(e,n,t,r,g,this,o)}));p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},97976:(e,t,r)=>{"use strict";var n=r(26775);e.exports=function(e,t){var r,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],d=s[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r{"use strict";var t=["orientation","groupnorm","stackgaps"];e.exports=function(e,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],u=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},u=!0);for(var d={orientation:r.x&&!r.y?"h":"v"},f=0;f{"use strict";var n=r(8996),i=r(50973),o=r(44049);function a(e,t,r){i.pointStyle(e.selectAll("path.point"),t,r)}function s(e,t,r){i.textPointStyle(e.selectAll("text"),t,r)}e.exports={style:function(e){var t=n.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){a(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){s(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,e),o.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:s,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,e),s(r,n,e))}}},26775:(e,t,r)=>{"use strict";var n=r(53787);e.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){return n.isPlainObject(e.marker)&&n.isArrayOrTypedArray(e.marker.size)}}},37480:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},89016:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049);e.exports=function(e,t,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return t._length=a,a}},50844:(e,t,r)=>{"use strict";var n=r(37471),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(32191).si,l=r(27231),c=r(72301),u=r(79291),d=r(10191).extendFlat,f=r(18693).overrideAll,h=r(99238),p=n.line,m=n.marker,g=m.line,v=d({width:p.width,dash:{valType:"enumerated",values:h(c),dflt:"solid",description:"Sets the dash style of the lines."}},i("line"));function y(e){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",e,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=e.exports=f({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:d({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:s({},{}),hovertext:d({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:d({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:v,marker:d({symbol:{valType:"enumerated",values:h(u),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:d({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:d({},m.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:m.colorbar,line:d({width:d({},g.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:d({},n.textposition,{dflt:"top center"}),textfont:{color:n.textfont.color,size:n.textfont.size,family:d({},n.textfont.family,{arrayOk:!1})},opacity:l.opacity,hoverinfo:d({},l.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},51454:(e,t,r)=>{"use strict";var n=r(62532),i=r(65664);e.exports=function(e,t){var r=[{x:!1,y:!1,trace:t,t:{}}];return n(r,t),i(e,t),r}},42561:(e,t,r)=>{"use strict";var n=r(44049);function i(e,t,r,i){if(!t||!t.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),s=0;s0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else a[s]=[-l[0]*r,l[1]*r]}return a}e.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],o=function(e){for(var t=0;t{"use strict";var n=r(13084).gl_line3d,i=r(13084).gl_scatter3d,o=r(13084).gl_error3d,a=r(13084).gl_mesh3d,s=r(13084).delaunay_triangulate,l=r(53787),c=r(55115),u=r(95049).formatColor,d=r(94244),f=r(72301),h=r(79291),p=r(28605),m=r(87267).appendArrayPointValue,g=r(42561);function v(e,t){this.scene=e,this.uid=t,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=v.prototype;function x(e){return null===e||void 0===e?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function b(e){return null===e||void 0===e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function w(e,t){return t(4*e)}function _(e){return h[e]}function k(e,t,r,n,i){var o=null;if(l.isArrayOrTypedArray(e)){o=[];for(var a=0;a=0){var m=function(e,t,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(44049),i=r(53787),o=r(26775),a=r(6408),s=r(82028),l=r(37480),c=r(50844);e.exports=function(e,t,r,u){function d(r,n){return i.coerce(e,t,c,r,n)}var f=function(e,t,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),t._length=t._xlength=t._ylength=t._zlength=o);return o}(e,t,d,u);if(f){d("text"),d("hovertext"),d("hovertemplate"),d("xhoverformat"),d("yhoverformat"),d("zhoverformat"),d("mode"),o.hasLines(t)&&(d("connectgaps"),s(e,t,r,u,d)),o.hasMarkers(t)&&a(e,t,r,u,d,{noSelect:!0,noAngle:!0}),o.hasText(t)&&(d("texttemplate"),l(e,t,u,d,{noSelect:!0}));var h=(t.line||{}).color,p=(t.marker||{}).color;d("surfaceaxis")>=0&&d("surfacecolor",h||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];d(v+".show")&&(d(v+".opacity"),d(v+".scale"))}var y=n.getComponentMethod("errorbars","supplyDefaults");y(e,t,h||p||r,{axis:"z"}),y(e,t,h||p||r,{axis:"y",inherit:"z"}),y(e,t,h||p||r,{axis:"x",inherit:"z"})}else t.visible=!1}},81284:(e,t,r)=>{"use strict";e.exports={plot:r(62211),attributes:r(50844),markerSymbols:r(79291),supplyDefaults:r(42020),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(51454),moduleType:"trace",name:"scatter3d",basePlotModule:r(36390),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},35355:(e,t,r)=>{"use strict";var n=r(37471),i=r(27231),o=r(32191).fF,a=r(32191).si,s=r(8753),l=r(10191).extendFlat,c=n.marker,u=n.line,d=c.line;e.exports={carpet:{valType:"string",editType:"calc",description:["An identifier for this carpet, so that `scattercarpet` and","`contourcarpet` traces can specify a carpet plot on which","they lie"].join(" ")},a:{valType:"data_array",editType:"calc",description:"Sets the a-axis coordinates."},b:{valType:"data_array",editType:"calc",description:"Sets the b-axis coordinates."},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{description:["Sets text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:a({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{description:["Sets hover text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:d.width,editType:"calc"},s("marker.line")),gradient:c.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:o()}},39738:(e,t,r)=>{"use strict";var n=r(51908),i=r(65664),o=r(62532),a=r(35637),s=r(18719).calcMarkerSize,l=r(94624);e.exports=function(e,t){var r=t._carpetTrace=l(e,t);if(r&&r.visible&&"legendonly"!==r.visible){var c;t.xaxis=r.xaxis,t.yaxis=r.yaxis;var u,d,f=t._length,h=new Array(f),p=!1;for(c=0;c{"use strict";var n=r(53787),i=r(80775),o=r(26775),a=r(6408),s=r(82028),l=r(80156),c=r(37480),u=r(4363),d=r(35355);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}h("carpet"),t.xaxis="x",t.yaxis="y";var p=h("a"),m=h("b"),g=Math.min(p.length,m.length);if(g){t._length=g,h("text"),h("texttemplate"),h("hovertext"),h("mode",g{"use strict";e.exports=function(e,t,r,n,i){var o=n[i];return e.a=o.a,e.b=o.b,e.y=o.y,e}},18039:e=>{"use strict";e.exports=function(e,t){var r={},n=t._carpet,i=n.ab2ij([e.a,e.b]),o=Math.floor(i[0]),a=i[0]-o,s=Math.floor(i[1]),l=i[1]-s,c=n.evalxy([],o,s,a,l);return r.yLabel=c[1].toFixed(3),r}},74092:(e,t,r)=>{"use strict";var n=r(77128),i=r(53787).fillText;e.exports=function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index){var l=1-s.y0/e.ya._length,c=e.xa._length,u=c*l/2,d=c-u;return s.x0=Math.max(Math.min(s.x0,d),u),s.x1=Math.max(Math.min(s.x1,d),u),a}var f=s.cd[s.index];s.a=f.a,s.b=f.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var h=s.trace,p=h._carpet,m=h._module.formatLabels(f,h);s.yLabel=m.yLabel,delete s.text;var g=[];if(!h.hovertemplate){var v=(f.hi||h.hoverinfo).split("+");-1!==v.indexOf("all")&&(v=["a","b","text"]),-1!==v.indexOf("a")&&y(p.aaxis,f.a),-1!==v.indexOf("b")&&y(p.baxis,f.b),g.push("y: "+s.yLabel),-1!==v.indexOf("text")&&i(f,h,g),s.extraText=g.join("
")}return a}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}},31871:(e,t,r)=>{"use strict";e.exports={attributes:r(35355),supplyDefaults:r(77050),colorbar:r(68971),formatLabels:r(18039),calc:r(39738),plot:r(87349),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(74092),selectPoints:r(97976),eventData:r(1651),moduleType:"trace",name:"scattercarpet",basePlotModule:r(48206),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{hrName:"scatter_carpet",description:["Plots a scatter trace on either the first carpet axis or the","carpet axis with a matching `carpet` attribute."].join(" ")}}},87349:(e,t,r)=>{"use strict";var n=r(96865),i=r(28605),o=r(50973);e.exports=function(e,t,r,a){var s,l,c,u=r[0][0].carpet,d=i.getFromId(e,u.xaxis||"x"),f=i.getFromId(e,u.yaxis||"y"),h={xaxis:d,yaxis:f,plot:t.plot};for(s=0;s{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(37471),a=r(27231),s=r(8753),l=r(93701).P,c=r(10191).extendFlat,u=r(18693).overrideAll,d=o.marker,f=o.line,h=d.line;e.exports=u({lon:{valType:"data_array",description:"Sets the longitude coordinates (in degrees East)."},lat:{valType:"data_array",description:"Sets the latitude coordinates (in degrees North)."},locations:{valType:"data_array",description:["Sets the coordinates via location IDs or names.","Coordinates correspond to the centroid of each location given.","See `locationmode` for more info."].join(" ")},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3",description:["Determines the set of locations used to match entries in `locations`","to regions on the map.","Values *ISO-3*, *USA-states*, *country names* correspond to features on","the base map and value *geojson-id* corresponds to features from a custom","GeoJSON linked to the `geojson` attribute."].join(" ")},geojson:{valType:"any",editType:"calc",description:["Sets optional GeoJSON data associated with this trace.","If not given, the features on the base map are used when `locations` is set.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")},featureidkey:{valType:"string",editType:"calc",dflt:"id",description:["Sets the key in GeoJSON features which is used as id to match the items","included in the `locations` array.","Only has an effect when `geojson` is set.","Support nested property, for example *properties.name*."].join(" ")},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{description:["Sets text elements associated with each (lon,lat) pair","or item in `locations`.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) or `locations` coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:c({},o.hovertext,{description:["Sets hover text elements associated with each (lon,lat) pair","or item in `locations`.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) or `locations` coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),textfont:o.textfont,textposition:o.textposition,line:{color:f.color,width:f.width,dash:l},connectgaps:o.connectgaps,marker:c({symbol:d.symbol,opacity:d.opacity,angle:d.angle,angleref:c({},d.angleref,{values:["previous","up","north"],description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen.","With *north*, angle 0 points north based on the current map projection."].join(" ")}),standoff:d.standoff,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,colorbar:d.colorbar,line:c({width:h.width},s("marker.line")),gradient:d.gradient},s("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape."].join(" ")},fillcolor:o.fillcolor,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:n()},"calc","nested")},73997:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(65664),a=r(62532),s=r(35637),l=r(53787)._;function c(e){return e&&"string"===typeof e}e.exports=function(e,t){var r,u=Array.isArray(t.locations),d=u?t.locations.length:t._length,f=new Array(d);r=t.geojson?function(e){return c(e)||n(e)}:c;for(var h=0;h{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(37480),l=r(4363),c=r(20958);e.exports=function(e,t,r,u){function d(r,i){return n.coerce(e,t,c,r,i)}var f,h=d("locations");if(h&&h.length){var p,m=d("geojson");("string"===typeof m&&""!==m||n.isPlainObject(m))&&(p="geojson-id"),"geojson-id"===d("locationmode",p)&&d("featureidkey"),f=h.length}else{var g=d("lon")||[],v=d("lat")||[];f=Math.min(g.length,v.length)}f?(t._length=f,d("text"),d("hovertext"),d("hovertemplate"),d("mode"),i.hasLines(t)&&(a(e,t,r,u,d),d("connectgaps")),i.hasMarkers(t)&&o(e,t,r,u,d,{gradient:!0}),i.hasText(t)&&(d("texttemplate"),s(e,t,u,d)),d("fill"),"none"!==t.fill&&l(e,t,r,d),n.coerceSelectionMarkerOpacity(t,d)):t.visible=!1}},77070:e=>{"use strict";e.exports=function(e,t,r,n,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var o=n[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e}},16087:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.geo]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=n.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=n.tickText(o,o.c2l(a[1]),!0).text,i}},40914:(e,t,r)=>{"use strict";var n=r(76719),i=r(24956).BADNUM,o=r(83821),a=r(53787).fillText,s=r(20958);e.exports=function(e,t,r){var l=e.cd,c=l[0].trace,u=e.xa,d=e.ya,f=e.subplot,h=f.projection.isLonLatOverEdges,p=f.project;if(n.getClosest(l,(function(e){var n=e.lonlat;if(n[0]===i)return 1/0;if(h(n))return 1/0;var o=p(n),a=p([t,r]),s=Math.abs(o[0]-a[0]),l=Math.abs(o[1]-a[1]),c=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)}),e),!1!==e.index){var m=l[e.index],g=m.lonlat,v=[u.c2p(g),d.c2p(g)],y=m.mrc||1;e.x0=v[0]-y,e.x1=v[0]+y,e.y0=v[1]-y,e.y1=v[1]+y,e.loc=m.loc,e.lon=g[0],e.lat=g[1];var x={};x[c.geo]={_subplot:f};var b=c._module.formatLabels(m,c,x);return e.lonLabel=b.lonLabel,e.latLabel=b.latLabel,e.color=o(c,m),e.extraText=function(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,o="all"===i?s.hoverinfo.flags:i.split("+"),l=-1!==o.indexOf("location")&&Array.isArray(e.locations),c=-1!==o.indexOf("lon"),u=-1!==o.indexOf("lat"),d=-1!==o.indexOf("text"),f=[];function h(e){return e+"\xb0"}l?f.push(t.loc):c&&u?f.push("("+h(r.latLabel)+", "+h(r.lonLabel)+")"):c?f.push(n.lon+h(r.lonLabel)):u&&f.push(n.lat+h(r.latLabel));d&&a(t,e,f);return f.join("
")}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},56100:(e,t,r)=>{"use strict";e.exports={attributes:r(20958),supplyDefaults:r(42807),colorbar:r(68971),formatLabels:r(16087),calc:r(73997),calcGeoJSON:r(77910).calcGeoJSON,plot:r(77910).plot,style:r(62443),styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(40914),eventData:r(77070),selectPoints:r(47483),moduleType:"trace",name:"scattergeo",basePlotModule:r(33857),categories:["geo","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_geo",description:["The data visualized as scatter point or lines on a geographic map","is provided either by longitude/latitude pairs in `lon` and `lat`","respectively or by geographic location IDs or names in `locations`."].join(" ")}}},77910:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(58268).getTopojsonFeatures,a=r(31360),s=r(426),l=r(10351).findExtremes,c=r(24956).BADNUM,u=r(18719).calcMarkerSize,d=r(26775),f=r(62443);e.exports={calcGeoJSON:function(e,t){var r,n,i=e[0].trace,a=t[i.geo],d=a._subplot,f=i._length;if(Array.isArray(i.locations)){var h=i.locationmode,p="geojson-id"===h?s.extractTraceFeature(e):o(i,d.topojson);for(r=0;r{"use strict";var n=r(26775),i=r(24956).BADNUM;e.exports=function(e,t){var r,o,a,s,l,c=e.cd,u=e.xaxis,d=e.yaxis,f=[],h=c[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===t)for(l=0;l{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(5196),s=a.stylePoints,l=a.styleText;e.exports=function(e,t){t&&function(e,t){var r=t[0].trace,a=t[0].node3;a.style("opacity",t[0].trace.opacity),s(a,r,e),l(a,r,e),a.selectAll("path.js-line").style("fill","none").each((function(e){var t=n.select(this),r=e.trace,a=r.line||{};t.call(o.stroke,a.color).call(i.dashLine,a.dash||"",a.width||0),"none"!==r.fill&&t.call(o.fill,r.fillcolor)}))}(e,t)}},50474:(e,t,r)=>{"use strict";var n=r(27231),i=r(37471),o=r(89849).axisHoverFormat,a=r(8753),s=r(99238),l=r(10191).extendFlat,c=r(18693).overrideAll,u=r(45201).DASHES,d=i.line,f=i.marker,h=f.line,p=e.exports=c({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:o("x"),yhoverformat:o("y"),text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:d.color,width:d.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:s(u),dflt:"solid",description:"Sets the style of the lines."}},marker:l({},a("marker"),{symbol:f.symbol,angle:f.angle,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:l({},a("marker.line"),{width:h.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");p.x.editType=p.y.editType=p.x0.editType=p.y0.editType="calc+clearAxisTypes",p.hovertemplate=i.hovertemplate,p.texttemplate=i.texttemplate},78121:(e,t,r)=>{"use strict";var n=r(36689);e.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(48206),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(50474),supplyDefaults:r(58458),crossTraceDefaults:r(22551),colorbar:r(68971),formatLabels:r(76890),calc:r(88762),hoverPoints:n.hoverPoints,selectPoints:r(23691),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},88762:(e,t,r)=>{"use strict";var n=r(28984),i=r(53787),o=r(24279),a=r(10351).findExtremes,s=r(64594),l=r(18719),c=l.calcMarkerSize,u=l.calcAxisExpansion,d=l.setFirstScatter,f=r(65664),h=r(13925),p=r(31444),m=r(24956).BADNUM,g=r(45201).TOO_MANY_POINTS;function v(e,t,r){var n=e._extremes[t._id],i=a(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}e.exports=function(e,t){var r,a=e._fullLayout,l=t._xA=o.getFromId(e,t.xaxis,"x"),y=t._yA=o.getFromId(e,t.yaxis,"y"),x=a._plots[t.xaxis+t.yaxis],b=t._length,w=b>=g,_=2*b,k={},S=l.makeCalcdata(t,"x"),T=y.makeCalcdata(t,"y"),M=s(t,l,"x",S),C=s(t,y,"y",T),A=M.vals,E=C.vals;t._x=A,t._y=E,t.xperiodalignment&&(t._origX=S,t._xStarts=M.starts,t._xEnds=M.ends),t.yperiodalignment&&(t._origY=T,t._yStarts=C.starts,t._yEnds=C.ends);var I=new Array(_),O=new Array(b);for(r=0;r1&&i.extendFlat(s.line,h.linePositions(e,r,n));if(s.errorX||s.errorY){var l=h.errorBarPositions(e,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},h.textPosition(e,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},h.textPosition(e,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},h.textPosition(e,r,s.text,s.markerUnsel)));return s}(e,0,t,I,A,E),L=p(e,x);return d(a,t),w?R.marker&&(P=R.marker.sizeAvg||Math.max(R.marker.size,3)):P=c(t,b),u(e,t,l,y,A,E,P),R.errorX&&v(t,l,R.errorX),R.errorY&&v(t,y,R.errorY),R.fill&&!L.fill2d&&(L.fill2d=!0),R.marker&&!L.scatter2d&&(L.scatter2d=!0),R.line&&!L.line2d&&(L.line2d=!0),!R.errorX&&!R.errorY||L.error2d||(L.error2d=!0),R.text&&!L.glText&&(L.glText=!0),R.marker&&(R.marker.snap=b),L.lineOptions.push(R.line),L.errorXOptions.push(R.errorX),L.errorYOptions.push(R.errorY),L.fillOptions.push(R.fill),L.markerOptions.push(R.marker),L.markerSelectedOptions.push(R.markerSel),L.markerUnselectedOptions.push(R.markerUnsel),L.textOptions.push(R.text),L.textSelectedOptions.push(R.textSel),L.textUnselectedOptions.push(R.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),k._scene=L,k.index=L.count,k.x=A,k.y=E,k.positions=I,L.count++,[{x:!1,y:!1,t:k,trace:t}]}},45201:e=>{"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]}}},13925:(e,t,r)=>{"use strict";var n=r(51908),i=r(53203),o=r(43721),a=r(44049),s=r(53787),l=r(50973),c=r(24279),u=r(95049).formatColor,d=r(26775),f=r(94244),h=r(43497),p=r(45201),m=r(26880).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=r(87267).appendArrayPointValue;function y(e,t){var r,i=e._fullLayout,o=t._length,a=t.textfont,l=t.textposition,c=Array.isArray(l)?l:[l],u=a.color,d=a.size,f=a.family,h={},p=e._context.plotGlPixelRatio,m=t.texttemplate;if(m){h.text=[];var g=i._d3locale,y=Array.isArray(m),x=y?Math.min(m.length,o):o,b=y?function(e){return m[e]}:function(){return m};for(r=0;rp.TOO_MANY_POINTS||d.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var f=n[0],h=n[1];for(i=0;i1?l[i]:l[0]:l,p=Array.isArray(c)?c.length>1?c[i]:c[0]:c,m=g[h],v=g[p],y=u?u/.8+1:0,x=-v*y-.5*v;a.offset[i]=[m*y/f,x/f]}}return a}}},58458:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(43497),a=r(50474),s=r(80775),l=r(26775),c=r(89016),u=r(17239),d=r(6408),f=r(82028),h=r(4363),p=r(37480);e.exports=function(e,t,r,m){function g(r,i){return n.coerce(e,t,a,r,i)}var v=!!e.marker&&o.isOpenSymbol(e.marker.symbol),y=l.isBubble(e),x=c(e,t,m,g);if(x){u(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x{"use strict";var n=r(53787),i=r(66235),o=r(26880).DESELECTDIM;e.exports={styleTextSelection:function(e){var t,r,a=e[0],s=a.trace,l=a.t,c=l._scene,u=l.index,d=c.selectBatch[u],f=c.unselectBatch[u],h=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=n.extendFlat({},h);if(d.length||f.length){var v=p.color,y=m.color,x=h.color,b=Array.isArray(x);for(g.color=new Array(s._length),t=0;t{"use strict";var n=r(48529);e.exports=function(e,t,r){var i=e.i;return"x"in e||(e.x=t._x[i]),"y"in e||(e.y=t._y[i]),n(e,t,r)}},43497:(e,t,r)=>{"use strict";var n=r(45201);t.isOpenSymbol=function(e){return"string"===typeof e?n.OPEN_RE.test(e):e%200>100},t.isDotSymbol=function(e){return"string"===typeof e?n.DOT_RE.test(e):e>200}},36689:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(83821);function a(e,t,r,a){var s=e.xa,l=e.ya,c=e.distance,u=e.dxy,d=e.index,f={pointNumber:d,x:t[d],y:r[d]};f.tx=Array.isArray(a.text)?a.text[d]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[d]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[d]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[d]:a.textposition;var h=a.textfont;h&&(f.ts=i.isArrayOrTypedArray(h.size)?h.size[d]:h.size,f.tc=Array.isArray(h.color)?h.color[d]:h.color,f.tf=Array.isArray(h.family)?h.family[d]:h.family);var p=a.marker;p&&(f.ms=i.isArrayOrTypedArray(p.size)?p.size[d]:p.size,f.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[d]:p.opacity,f.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[d]:p.symbol,f.ma=i.isArrayOrTypedArray(p.angle)?p.angle[d]:p.angle,f.mc=i.isArrayOrTypedArray(p.color)?p.color[d]:p.color);var m=p&&p.line;m&&(f.mlc=Array.isArray(m.color)?m.color[d]:m.color,f.mlw=i.isArrayOrTypedArray(m.width)?m.width[d]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(f.mgt=Array.isArray(g.type)?g.type[d]:g.type,f.mgc=Array.isArray(g.color)?g.color[d]:g.color);var v=s.c2p(f.x,!0),y=l.c2p(f.y,!0),x=f.mrc||1,b=a.hoverlabel;b&&(f.hbg=Array.isArray(b.bgcolor)?b.bgcolor[d]:b.bgcolor,f.hbc=Array.isArray(b.bordercolor)?b.bordercolor[d]:b.bordercolor,f.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[d]:b.font.size,f.htc=Array.isArray(b.font.color)?b.font.color[d]:b.font.color,f.htf=Array.isArray(b.font.family)?b.font.family[d]:b.font.family,f.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[d]:b.namelength);var w=a.hoverinfo;w&&(f.hi=Array.isArray(w)?w[d]:w);var _=a.hovertemplate;_&&(f.ht=Array.isArray(_)?_[d]:_);var k={};k[e.index]=f;var S=a._origX,T=a._origY,M=i.extendFlat({},e,{color:o(a,f),x0:v-x,x1:v+x,xLabelVal:S?S[d]:f.x,y0:y-x,y1:y+x,yLabelVal:T?T[d]:f.y,cd:k,distance:c,spikeDistance:u,hovertemplate:f.ht});return f.htx?M.text=f.htx:f.tx?M.text=f.tx:a.text&&(M.text=a.text),i.fillText(f,a,M),n.getComponentMethod("errorbars","hoverInfo")(f,a,M),M}e.exports={hoverPoints:function(e,t,r,n){var i,o,s,l,c,u,d,f,h,p,m=e.cd,g=m[0].t,v=m[0].trace,y=e.xa,x=e.ya,b=g.x,w=g.y,_=y.c2p(t),k=x.c2p(r),S=e.distance;if(g.tree){var T=y.p2c(_-S),M=y.p2c(_+S),C=x.p2c(k-S),A=x.p2c(k+S);i="x"===n?g.tree.range(Math.min(T,M),Math.min(x._rl[0],x._rl[1]),Math.max(T,M),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(T,M),Math.min(C,A),Math.max(T,M),Math.max(C,A))}else i=g.ids;var E=S;if("x"===n){var I=!!v.xperiodalignment,O=!!v.yperiodalignment;for(u=0;u=Math.min(P,R)&&_<=Math.max(P,R)?0:1/0}if(d=Math.min(L,j)&&k<=Math.max(L,j)?0:1/0}p=Math.sqrt(d*d+f*f),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[o=i[u]],c=w[o],d=y.c2p(l)-_,f=x.c2p(c)-k,(h=Math.sqrt(d*d+f*f)){"use strict";var n=r(78121);n.plot=r(69551),e.exports=n},69551:(e,t,r)=>{"use strict";var n=r(76768),i=r(929),o=r(56026),a=r(55808),s=r(53787),l=r(57873).selectMode,c=r(56162),u=r(26775),d=r(98022),f=r(96667).styleTextSelection,h={};function p(e,t,r,n){var i=e._size,o=e.width*n,a=e.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,d=i.w*n,f=i.h*n;return[s+t.domain[0]*d,l+r.domain[0]*f,o-c-(1-t.domain[1])*d,a-u-(1-r.domain[1])*f]}(e.exports=function(e,t,r){if(r.length){var m,g,v=e._fullLayout,y=t._scene,x=t.xaxis,b=t.yaxis;if(y)if(c(e,["ANGLE_instanced_arrays","OES_element_index_uint"],h)){var w=y.count,_=v._glcanvas.data()[0].regl;if(d(e,t,r),y.dirty){if(!0===y.error2d&&(y.error2d=o(_)),!0===y.line2d&&(y.line2d=i(_)),!0===y.scatter2d&&(y.scatter2d=n(_)),!0===y.fill2d&&(y.fill2d=i(_)),!0===y.glText)for(y.glText=new Array(w),m=0;my.glText.length){var k=w-y.glText.length;for(m=0;mr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),y.line2d.update(y.lineOptions)),y.error2d){var T=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(T)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,w),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(e,t){var n=r[t];if(e&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=y.lineOptions[t],u=[];s._ownfill&&u.push(t),s._nexttrace&&u.push(t+1),u.length&&(y.fillOrder[t]=u);var d,f,h=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(d=0;dd&&isNaN(p[f+1]);)f-=2;0!==p[d+1]&&(h=[p[d],0]),h=h.concat(p.slice(d,f+2)),0!==p[f+1]&&(h=h.concat([p[f],0]))}else if("tozerox"===s.fill){for(d=0;dd&&isNaN(p[f]);)f-=2;0!==p[d]&&(h=[0,p[d+1]]),h=h.concat(p.slice(d,f+2)),0!==p[f]&&(h=h.concat([0,p[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],i=0,e.splitNull=!0,o=0;o-1;for(m=0;m{"use strict";var n=r(53787);e.exports=function(e,t){var r=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((r=t._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(e){var t=n.repeat(e,r.count);if(r.fill2d&&r.fill2d.update(t),r.scatter2d&&r.scatter2d.update(t),r.line2d&&r.line2d.update(t),r.error2d&&r.error2d.update(t.concat(t)),r.select2d&&r.select2d.update(t),r.glText)for(var i=0;i{"use strict";var n=r(26775),i=r(96667).styleTextSelection;e.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,s=[],l=r[0].trace,c=r[0].t,u=l._length,d=c.x,f=c.y,h=c._scene,p=c.index;if(!h)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var y=[],x=[];if(!1!==t&&!t.degenerate)for(var b=0;b{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(20958),a=r(37471),s=r(85675),l=r(27231),c=r(8753),u=r(10191).extendFlat,d=r(18693).overrideAll,f=r(85675),h=o.line,p=o.marker;e.exports=d({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean",description:"Determines whether clustering is enabled or disabled."},maxzoom:u({},f.layers.maxzoom,{description:["Sets the maximum zoom level.","At zoom levels equal to or greater than this, points will never be clustered."].join(" ")}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1,description:["Sets how many points it takes to create a cluster or advance to the next cluster step.","Use this in conjunction with arrays for `size` and / or `color`.","If an integer, steps start at multiples of this number.","If an array, each step extends from the given value until one less than the next value."].join(" ")},size:{valType:"number",arrayOk:!0,dflt:20,min:0,description:["Sets the size for each cluster step."].join(" ")},color:{valType:"color",arrayOk:!0,description:["Sets the color for each cluster step."].join(" ")},opacity:u({},p.opacity,{dflt:1})},mode:u({},a.mode,{dflt:"markers",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover."].join(" ")}),text:u({},a.text,{description:["Sets text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:u({},a.hovertext,{description:["Sets hover text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:h.color,width:h.width},connectgaps:a.connectgaps,marker:u({symbol:{valType:"string",dflt:"circle",arrayOk:!0,description:["Sets the marker symbol.","Full list: https://www.mapbox.com/maki-icons/","Note that the array `marker.color` and `marker.size`","are only available for *circle* symbols."].join(" ")},angle:{valType:"number",dflt:"auto",arrayOk:!0,description:["Sets the marker orientation from true North, in degrees clockwise.","When using the *auto* default, no rotation would be applied","in perspective views which is different from using a zero angle."].join(" ")},allowoverlap:{valType:"boolean",dflt:!1,description:["Flag to draw all symbols, even if they overlap."].join(" ")},opacity:p.opacity,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode},c("marker")),fill:o.fill,fillcolor:a.fillcolor,textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:"string",description:["Determines if this scattermapbox trace's layers are to be inserted","before the layer with the specified ID.","By default, scattermapbox layers are inserted","above all the base layers.","To place the scattermapbox layers above every other layer, set `below` to *''*."].join(" ")},selected:{marker:a.selected.marker},unselected:{marker:a.unselected.marker},hoverinfo:u({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:n()},"calc","nested")},64902:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM,a=r(31360),s=r(10948),l=r(50973),c=r(94244),u=r(26775),d=r(31387),f=r(87267).appendArrayPointValue,h=r(98224).NEWLINES,p=r(98224).BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return i.isArrayOrTypedArray(e)?t?function(t){return n(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:v}function v(){return""}function y(e){return e[0]===o}function x(e,t){var r;if(i.isArrayOrTypedArray(e)&&i.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(37480),l=r(4363),c=r(36018),u=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,c,r,i)}function h(r,i){return n.coerce2(e,t,c,r,i)}var p=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],o=Math.min(n.length,i.length);return t._length=o,o}(0,t,f);if(p){if(f("text"),f("texttemplate"),f("hovertext"),f("hovertemplate"),f("mode"),f("below"),i.hasLines(t)&&(a(e,t,r,d,f,{noDash:!0}),f("connectgaps")),i.hasMarkers(t)){o(e,t,r,d,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(n.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),n.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}var g=h("cluster.maxzoom"),v=h("cluster.step"),y=h("cluster.color",t.marker&&t.marker.color||r),x=h("cluster.size"),b=h("cluster.opacity");f("cluster.enabled",!1!==g||!1!==v||!1!==y||!1!==x||!1!==b),i.hasText(t)&&s(e,t,d,f,{noSelect:!0,font:{family:-1!==u.indexOf(d.font.family)?d.font.family:"Open Sans Regular",size:d.font.size,color:d.font.color}}),f("fill"),"none"!==t.fill&&l(e,t,r,f),n.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},34249:e=>{"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}},71652:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=n.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=n.tickText(o,o.c2l(a[1]),!0).text,i}},16016:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(83821),a=i.fillText,s=r(24956).BADNUM,l=r(93845).traceLayerPrefix;function c(e,t,r){if(!e.hovertemplate){var n=(t.hi||e.hoverinfo).split("+"),i=-1!==n.indexOf("all"),o=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=t.lonlat,c=[];return i||o&&s?c.push("("+u(l[1])+", "+u(l[0])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(i||-1!==n.indexOf("text"))&&a(t,e,c),c.join("
")}function u(e){return e+"\xb0"}}e.exports={hoverPoints:function(e,t,r){var a=e.cd,u=a[0].trace,d=e.xa,f=e.ya,h=e.subplot,p=[],m=l+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var v=h.map.queryRenderedFeatures(null,{layers:[m]});p=v.map((function(e){return e.id}))}var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-y;if(n.getClosest(a,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;if(g&&-1===p.indexOf(e.i+1))return 1/0;var n=i.modHalf(t[0],360),o=t[1],a=h.project([n,o]),l=a.x-d.c2p([x,o]),c=a.y-f.c2p([n,r]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var b=a[e.index],w=b.lonlat,_=[i.modHalf(w[0],360)+y,w[1]],k=d.c2p(_),S=f.c2p(_),T=b.mrc||1;e.x0=k-T,e.x1=k+T,e.y0=S-T,e.y1=S+T;var M={};M[u.subplot]={_subplot:h};var C=u._module.formatLabels(b,u,M);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=o(u,b),e.extraText=c(u,b,a[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:c}},52959:(e,t,r)=>{"use strict";e.exports={attributes:r(36018),supplyDefaults:r(31971),colorbar:r(68971),formatLabels:r(71652),calc:r(73997),plot:r(56361),hoverPoints:r(16016).hoverPoints,eventData:r(34249),selectPoints:r(40028),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(7428),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_mapbox",description:["The data visualized as scatter point, lines or marker symbols","on a Mapbox GL geographic map","is provided by longitude/latitude pairs in `lon` and `lat`."].join(" ")}}},56361:(e,t,r)=>{"use strict";var n=r(53787),i=r(64902),o=r(93845).traceLayerPrefix,a={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:o+t+"-fill",line:o+t+"-line",circle:o+t+"-circle",symbol:o+t+"-symbol",cluster:o+t+"-cluster",clusterCount:o+t+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[e]);o?o.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)},l.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},l.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i,o=this.layerIds[e],a=this.subplot.getMapLayers(),s=0;s=0;r--){var i=t[r];n.removeLayer(u.layerIds[i])}e||n.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var i=t[r];n.removeLayer(u.layerIds[i]),e||n.removeSource(u.sourceIds[i])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},e.exports=function(e,t){var r,n,o,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,d=new s(e,l.uid,c,u),f=i(e.gd,t),h=d.below=e.belowLookup["trace-"+l.uid];if(c)for(d.addSource("circle",f.circle,l.cluster),r=0;r{"use strict";var n=r(53787),i=r(26775),o=r(24956).BADNUM;e.exports=function(e,t){var r,a=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=a[0].trace;if(!i.hasMarkers(u))return[];if(!1===t)for(r=0;r{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(10191).extendFlat,a=r(37471),s=r(27231),l=a.line;e.exports={mode:a.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the radial coordinates"},theta:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the angular coordinates"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Alternate to `r`.","Builds a linear space of r coordinates.","Use with `dr`","where `r0` is the starting coordinate and `dr` the step."].join(" ")},dr:{valType:"number",dflt:1,editType:"calc",description:"Sets the r coordinate step."},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Alternate to `theta`.","Builds a linear space of theta coordinates.","Use with `dtheta`","where `theta0` is the starting coordinate and `dtheta` the step."].join(" ")},dtheta:{valType:"number",editType:"calc",description:["Sets the theta coordinate step.","By default, the `dtheta` step equals the subplot's period divided","by the length of the `r` coordinates."].join(" ")},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes",description:["Sets the unit of input *theta* values.","Has an effect only when on *linear* angular axes."].join(" ")},text:a.text,texttemplate:i({editType:"plot"},{keys:["r","theta","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterpolar has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:a.hoveron,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},70422:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(28605),a=r(65664),s=r(62532),l=r(35637),c=r(18719).calcMarkerSize;e.exports=function(e,t){for(var r=e._fullLayout,u=t.subplot,d=r[u].radialaxis,f=r[u].angularaxis,h=d.makeCalcdata(t,"r"),p=f.makeCalcdata(t,"theta"),m=t._length,g=new Array(m),v=0;v{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(80156),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(32608);function f(e,t,r,n){var i,o=n("r"),a=n("theta");if(o)a?i=Math.min(o.length,a.length):(i=o.length,n("theta0"),n("dtheta"));else{if(!a)return 0;i=t.theta.length,n("r0"),n("dr")}return t._length=i,i}e.exports={handleRThetaDefaults:f,supplyDefaults:function(e,t,r,h){function p(r,i){return n.coerce(e,t,d,r,i)}var m=f(e,t,h,p);if(m){p("thetaunit"),p("mode",m{"use strict";var n=r(53787),i=r(28605);e.exports=function(e,t,r){var o,a,s={},l=r[t.subplot]._subplot;l?(o=l.radialAxis,a=l.angularAxis):(o=(l=r[t.subplot]).radialaxis,a=l.angularaxis);var c=o.c2l(e.r);s.rLabel=i.tickText(o,c,!0).text;var u="degrees"===a.thetaunit?n.rad2deg(e.theta):e.theta;return s.thetaLabel=i.tickText(a,u,!0).text,s}},9226:(e,t,r)=>{"use strict";var n=r(77128);function i(e,t,r,n){var i=r.radialAxis,o=r.angularAxis;i._hovertitle="r",o._hovertitle="\u03b8";var a={};a[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,a);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var d=l.split("+");-1!==d.indexOf("all")&&(d=["r","theta","text"]),-1!==d.indexOf("r")&&u(i,n.rLabel),-1!==d.indexOf("theta")&&u(o,n.thetaLabel),-1!==d.indexOf("text")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join("
")}}e.exports={hoverPoints:function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},91775:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:r(37180),categories:["polar","symbols","showLegend","scatter-like"],attributes:r(32608),supplyDefaults:r(10123).supplyDefaults,colorbar:r(68971),formatLabels:r(33058),calc:r(70422),plot:r(68356),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(9226).hoverPoints,selectPoints:r(97976),meta:{hrName:"scatter_polar",description:["The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts","in polar coordinates.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},68356:(e,t,r)=>{"use strict";var n=r(96865),i=r(24956).BADNUM;e.exports=function(e,t,r){for(var o=t.layers.frontplot.select("g.scatterlayer"),a=t.xaxis,s=t.yaxis,l={xaxis:a,yaxis:s,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},c=t.radialAxis,u=t.angularAxis,d=0;d{"use strict";var n=r(32608),i=r(50474),o=r(32191).si;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:o({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}},56085:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:r(37180),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:r(33430),supplyDefaults:r(34451),colorbar:r(68971),formatLabels:r(9130),calc:r(29066),hoverPoints:r(61784).hoverPoints,selectPoints:r(23691),meta:{hrName:"scatter_polar_gl",description:["The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts","in polar coordinates using the WebGL plotting engine.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},29066:(e,t,r)=>{"use strict";var n=r(65664),i=r(18719).calcMarkerSize,o=r(13925),a=r(28605),s=r(45201).TOO_MANY_POINTS;e.exports=function(e,t){var r=e._fullLayout,l=t.subplot,c=r[l].radialaxis,u=r[l].angularaxis,d=t._r=c.makeCalcdata(t,"r"),f=t._theta=u.makeCalcdata(t,"theta"),h=t._length,p={};h{"use strict";var n=r(53787),i=r(26775),o=r(10123).handleRThetaDefaults,a=r(6408),s=r(82028),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(33430);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p=o(e,t,f,h);p?(h("thetaunit"),h("mode",p{"use strict";var n=r(33058);e.exports=function(e,t,r){var i=e.i;return"r"in e||(e.r=t._r[i]),"theta"in e||(e.theta=t._theta[i]),n(e,t,r)}},61784:(e,t,r)=>{"use strict";var n=r(36689),i=r(9226).makeHoverPointText;e.exports={hoverPoints:function(e,t,r,o){var a=e.cd[0].t,s=a.r,l=a.theta,c=n.hoverPoints(e,t,r,o);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var d=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=s[u.index],f.theta=l[u.index],d.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,i(f,h,d,u),c}}}},33982:(e,t,r)=>{"use strict";var n=r(56085);n.plot=r(51047),e.exports=n},51047:(e,t,r)=>{"use strict";var n=r(28984),i=r(51908),o=r(69551),a=r(31444),s=r(13925),l=r(53787),c=r(45201).TOO_MANY_POINTS;e.exports=function(e,t,r){if(r.length){var u=t.radialAxis,d=t.angularAxis,f=a(e,t);return r.forEach((function(r){if(r&&r[0]&&r[0].trace){var o,a=r[0],h=a.trace,p=a.t,m=h._length,g=p.r,v=p.theta,y=p.opts,x=g.slice(),b=v.slice();for(o=0;o=c&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=w),y.line&&w.length>1&&l.extendFlat(y.line,s.linePositions(e,h,w)),y.text&&(l.extendFlat(y.text,{positions:w},s.textPosition(e,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:w},s.textPosition(e,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:w},s.textPosition(e,h,y.text,y.markerUnsel))),y.fill&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),p.x=_,p.y=k,p.rawx=_,p.rawy=k,p.r=g,p.theta=v,p.positions=w,p._scene=f,p.index=f.count,f.count++}})),o(e,t,r)}},e.exports.reglPrecompiled={}},42037:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(10191).extendFlat,a=r(37471),s=r(27231),l=a.line;e.exports={mode:a.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the real component of the data, in units of normalized impedance","such that real=1, imag=0 is the center of the chart."].join(" ")},imag:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the imaginary component of the data, in units of normalized impedance","such that real=1, imag=0 is the center of the chart."].join(" ")},text:a.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scattersmith has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:a.hoveron,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},86536:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(65664),a=r(62532),s=r(35637),l=r(18719).calcMarkerSize;e.exports=function(e,t){for(var r=e._fullLayout,c=t.subplot,u=r[c].realaxis,d=r[c].imaginaryaxis,f=u.makeCalcdata(t,"real"),h=d.makeCalcdata(t,"imag"),p=t._length,m=new Array(p),g=0;g{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(80156),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(42037);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p=function(e,t,r,n){var i,o=n("real"),a=n("imag");o&&a&&(i=Math.min(o.length,a.length));return t._length=i,i}(0,t,0,h);if(p){h("mode",p{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot;return i.realLabel=n.tickText(o.radialAxis,e.real,!0).text,i.imagLabel=n.tickText(o.angularAxis,e.imag,!0).text,i}},88598:(e,t,r)=>{"use strict";var n=r(77128);function i(e,t,r,n){var i=r.radialAxis,o=r.angularAxis;i._hovertitle="real",o._hovertitle="imag";var a={};a[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,a);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var d=l.split("+");-1!==d.indexOf("all")&&(d=["real","imag","text"]),-1!==d.indexOf("real")&&u(i,n.realLabel),-1!==d.indexOf("imag")&&u(o,n.imagLabel),-1!==d.indexOf("text")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join("
")}}e.exports={hoverPoints:function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},62363:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:r(17389),categories:["smith","symbols","showLegend","scatter-like"],attributes:r(42037),supplyDefaults:r(37061),colorbar:r(68971),formatLabels:r(77769),calc:r(86536),plot:r(12480),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(88598).hoverPoints,selectPoints:r(97976),meta:{hrName:"scatter_smith",description:["The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts","in smith coordinates.","The data visualized as scatter point or lines is set in","`real` and `imag` (imaginary) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},12480:(e,t,r)=>{"use strict";var n=r(96865),i=r(24956).BADNUM,o=r(68297).smith;e.exports=function(e,t,r){for(var a=t.layers.frontplot.select("g.scatterlayer"),s=t.xaxis,l=t.yaxis,c={xaxis:s,yaxis:l,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},u=0;u{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(37471),a=r(27231),s=r(8753),l=r(93701).P,c=r(10191).extendFlat,u=o.marker,d=o.line,f=u.line;e.exports={a:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},b:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},c:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},sum:{valType:"number",dflt:0,min:0,editType:"calc",description:["The number each triplet should sum to,","if only two of `a`, `b`, and `c` are provided.","This overrides `ternary.sum` to normalize this specific","trace, but does not affect the values displayed on the axes.","0 (or missing) means to use ternary.sum"].join(" ")},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{description:["Sets text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},o.hovertext,{description:["Sets hover text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:d.color,width:d.width,dash:l,backoff:d.backoff,shape:c({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:c({},o.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:o.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,angle:u.angle,angleref:u.angleref,standoff:u.standoff,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:n()}},45216:(e,t,r)=>{"use strict";var n=r(51908),i=r(65664),o=r(62532),a=r(35637),s=r(18719).calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(e,t){var r,u,d,f,h,p,m=e._fullLayout[t.subplot].sum,g=t.sum||m,v={a:t.a,b:t.b,c:t.c};for(r=0;r{"use strict";var n=r(53787),i=r(80775),o=r(26775),a=r(6408),s=r(82028),l=r(80156),c=r(37480),u=r(4363),d=r(43859);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p,m=h("a"),g=h("b"),v=h("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),p){t._length=p,h("sum"),h("text"),h("hovertext"),"fills"!==t.hoveron&&h("hovertemplate"),h("mode",p{"use strict";e.exports=function(e,t,r,n,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[i]){var o=n[i];e.a=o.a,e.b=o.b,e.c=o.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}},16675:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot;return i.aLabel=n.tickText(o.aaxis,e.a,!0).text,i.bLabel=n.tickText(o.baxis,e.b,!0).text,i.cLabel=n.tickText(o.caxis,e.c,!0).text,i}},16893:(e,t,r)=>{"use strict";var n=r(77128);e.exports=function(e,t,r,i){var o=n(e,t,r,i);if(o&&!1!==o[0].index){var a=o[0];if(void 0===a.index){var s=1-a.y0/e.ya._length,l=e.xa._length,c=l*s/2,u=l-c;return a.x0=Math.max(Math.min(a.x0,u),c),a.x1=Math.max(Math.min(a.x1,u),c),o}var d=a.cd[a.index],f=a.trace,h=a.subplot;a.a=d.a,a.b=d.b,a.c=d.c,a.xLabelVal=void 0,a.yLabelVal=void 0;var p={};p[f.subplot]={_subplot:h};var m=f._module.formatLabels(d,f,p);a.aLabel=m.aLabel,a.bLabel=m.bLabel,a.cLabel=m.cLabel;var g=d.hi||f.hoverinfo,v=[];if(!f.hovertemplate){var y=g.split("+");-1!==y.indexOf("all")&&(y=["a","b","c"]),-1!==y.indexOf("a")&&x(h.aaxis,a.aLabel),-1!==y.indexOf("b")&&x(h.baxis,a.bLabel),-1!==y.indexOf("c")&&x(h.caxis,a.cLabel)}return a.extraText=v.join("
"),a.hovertemplate=f.hovertemplate,o}function x(e,t){v.push(e._hovertitle+": "+t)}}},35104:(e,t,r)=>{"use strict";e.exports={attributes:r(43859),supplyDefaults:r(54507),colorbar:r(68971),formatLabels:r(16675),calc:r(45216),plot:r(18591),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(16893),selectPoints:r(97976),eventData:r(86716),moduleType:"trace",name:"scatterternary",basePlotModule:r(70184),categories:["ternary","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_ternary",description:["Provides similar functionality to the *scatter* type but on a ternary phase diagram.","The data is provided by at least two arrays out of `a`, `b`, `c` triplets."].join(" ")}}},18591:(e,t,r)=>{"use strict";var n=r(96865);e.exports=function(e,t,r){var i=t.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var o=t.xaxis,a=t.yaxis,s={xaxis:o,yaxis:a,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},l=t.layers.frontplot.select("g.scatterlayer"),c=0;c{"use strict";var n=r(37471),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(50474),l=r(99727).idRegex,c=r(99862).templatedArray,u=r(10191).extendFlat,d=n.marker,f=d.line,h=u(i("marker.line",{editTypeOverride:"calc"}),{width:u({},f.width,{editType:"calc"}),editType:"calc"}),p=u(i("marker"),{symbol:d.symbol,angle:d.angle,size:u({},d.size,{editType:"markerSize"}),sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:h,editType:"calc"});function m(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:l[e],editType:"plot"},description:["Sets the list of "+e+" axes","corresponding to dimensions of this splom trace.","By default, a splom will match the first N "+e+"axes","where N is the number of input dimensions.","Note that, in case where `diagonal.visible` is false and `showupperhalf`","or `showlowerhalf` is false, this splom trace will generate","one less x-axis and one less y-axis."].join(" ")}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:c("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not this dimension is shown on the graph.","Note that even visible false dimension contribute to the","default grid generate by this splom trace."].join(" ")},label:{valType:"string",editType:"calc",description:"Sets the label corresponding to this splom dimension."},values:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the dimension values to be plotted."},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes",description:["Sets the axis type for this dimension's generated","x and y axes.","Note that the axis `type` values set in layout take","precedence over this attribute."].join(" ")},matches:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not the x & y axes generated by this","dimension match.","Equivalent to setting the `matches` axis attribute in the layout","with the correct axis id."].join(" ")},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:u({},s.text,{description:["Sets text elements associated with each (x,y) pair to appear on hover.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates."].join(" ")}),hovertext:u({},s.hovertext,{description:"Same as `text`."}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),marker:p,xaxes:m("x"),yaxes:m("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the diagonal are displayed."].join(" ")},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the upper half","from the diagonal are displayed."].join(" ")},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the lower half","from the diagonal are displayed."].join(" ")},selected:{marker:s.selected.marker,editType:"calc"},unselected:{marker:s.unselected.marker,editType:"calc"},opacity:s.opacity}},7339:(e,t,r)=>{"use strict";var n=r(44049),i=r(97481);e.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:r(32213),supplyDefaults:r(38459),colorbar:r(68971),calc:r(36445),plot:r(29169),hoverPoints:r(82989).hoverPoints,selectPoints:r(66378),editStyle:r(22764),meta:{description:["Splom traces generate scatter plot matrix visualizations.","Each splom `dimensions` items correspond to a generated axis.","Values for each of those dimensions are set in `dimensions[i].values`.","Splom traces support all `scattergl` marker style attributes.","Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes","for more control over the axis positioning and style. "].join(" ")}},n.register(i)},42471:(e,t,r)=>{"use strict";var n=r(929),i=r(44049),o=r(56162),a=r(38213).a0,s=r(48206),l=r(24279).getFromId,c=r(28605).shouldShowZeroLine,u="splom",d={};function f(e,t,r){for(var n=r.matrixOptions.data.length,i=t._visibleDims,o=r.viewOpts.ranges=new Array(n),a=0;a{"use strict";var n=r(53787),i=r(24279),o=r(18719).calcMarkerSize,a=r(18719).calcAxisExpansion,s=r(65664),l=r(13925).markerSelection,c=r(13925).markerStyle,u=r(52799),d=r(24956).BADNUM,f=r(45201).TOO_MANY_POINTS;e.exports=function(e,t){var r,h,p,m,g,v,y=t.dimensions,x=t._length,b={},w=b.cdata=[],_=b.data=[],k=t._visibleDims=[];function S(e,r){for(var i=e.makeCalcdata({v:r.values,vcalendar:t.calendar},"v"),o=0;of?b.sizeAvg||Math.max(b.size,3):o(t,x),h=0;h{"use strict";var n=r(53787),i=r(80254),o=r(32213),a=r(26775),s=r(6408),l=r(47796),c=r(43497).isOpenSymbol;function u(e,t){function r(r,i){return n.coerce(e,t,o.dimensions,r,i)}r("label");var i=r("values");i&&i.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,o,r,i)}var h=i(e,t,{name:"dimensions",handleItemDefaults:u}),p=f("diagonal.visible"),m=f("showupperhalf"),g=f("showlowerhalf");if(l(t,h,"values")&&(p||m||g)){f("text"),f("hovertext"),f("hovertemplate"),f("xhoverformat"),f("yhoverformat"),s(e,t,r,d,f,{noAngleRef:!0,noStandOff:!0});var v=c(t.marker.symbol),y=a.isBubble(t);f("marker.line.width",v||y?1:0),function(e,t,r,n){var i,o,a=t.dimensions,s=a.length,l=t.showupperhalf,c=t.showlowerhalf,u=t.diagonal.visible,d=new Array(s),f=new Array(s);for(i=0;io&&l||i{"use strict";var n=r(53787),i=r(65664),o=r(13925).markerStyle;e.exports=function(e,t){var r=t.trace,a=e._fullLayout._splomScenes[r.uid];if(a){i(e,r),n.extendFlat(a.matrixOptions,o(e,r));var s=n.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(s,null)}}},39947:(e,t)=>{"use strict";t.getDimIndex=function(e,t){for(var r=t._id,n={x:0,y:1}[r.charAt(0)],i=e._visibleDims,o=0;o{"use strict";var n=r(39947),i=r(36689).calcHover;e.exports={hoverPoints:function(e,t,r){var o=e.cd[0].trace,a=e.scene.matrixOptions.cdata,s=e.xa,l=e.ya,c=s.c2p(t),u=l.c2p(r),d=e.distance,f=n.getDimIndex(o,s),h=n.getDimIndex(o,l);if(!1===f||!1===h)return[e];for(var p,m,g=a[f],v=a[h],y=d,x=0;x{"use strict";var n=r(7339);n.basePlotModule=r(42471),e.exports=n},29169:(e,t,r)=>{"use strict";var n=r(55358),i=r(53787),o=r(24279),a=r(57873).selectMode;function s(e,t){var r,s,l,c,u,d=e._fullLayout,f=d._size,h=t.trace,p=t.t,m=d._splomScenes[h.uid],g=m.matrixOptions,v=g.cdata,y=d._glcanvas.data()[0].regl,x=d.dragmode;if(0!==v.length){g.lower=h.showupperhalf,g.upper=h.showlowerhalf,g.diagonal=h.diagonal.visible;var b=h._visibleDims,w=v.length,_=m.viewOpts={};for(_.ranges=new Array(w),_.domains=new Array(w),u=0;u-1,O=!0;if(a(x)||!!h.selectedpoints||I){var P=h._length;if(h.selectedpoints){m.selectBatch=h.selectedpoints;var R=h.selectedpoints,L={};for(l=0;l{"use strict";var n=r(53787);e.exports=function(e,t){var r=e._fullLayout,i=t.uid,o=r._splomScenes;o||(o=r._splomScenes={});var a={dirty:!0,selectBatch:[],unselectBatch:[]},s=o[t.uid];return s||((s=o[i]=n.extendFlat({},a,{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,a),s}},66378:(e,t,r)=>{"use strict";var n=r(53787),i=n.pushUnique,o=r(26775),a=r(39947);e.exports=function(e,t){var r=e.cd,s=r[0].trace,l=r[0].t,c=e.scene,u=c.matrixOptions.cdata,d=e.xaxis,f=e.yaxis,h=[];if(!c)return h;var p=!o.hasMarkers(s)&&!o.hasText(s);if(!0!==s.visible||p)return h;var m=a.getDimIndex(s,d),g=a.getDimIndex(s,f);if(!1===m||!1===g)return h;var v=l.xpx[m],y=l.ypx[g],x=u[m],b=u[g],w=(e.scene.selectBatch||[]).slice(),_=[];if(!1!==t&&!t.degenerate)for(var k=0;k{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the x coordinates of the vector field."},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the y coordinates of the vector field."},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the z coordinates of the vector field."},u:{valType:"data_array",editType:"calc",description:"Sets the x components of the vector field."},v:{valType:"data_array",editType:"calc",description:"Sets the y components of the vector field."},w:{valType:"data_array",editType:"calc",description:"Sets the z components of the vector field."},starts:{x:{valType:"data_array",editType:"calc",description:["Sets the x components of the starting position of the streamtubes"].join(" ")},y:{valType:"data_array",editType:"calc",description:["Sets the y components of the starting position of the streamtubes"].join(" ")},z:{valType:"data_array",editType:"calc",description:["Sets the z components of the starting position of the streamtubes"].join(" ")},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc",description:["The maximum number of displayed segments in a streamtube."].join(" ")},sizeref:{valType:"number",editType:"calc",min:0,dflt:1,description:["The scaling factor for the streamtubes.","The default is 1, which avoids two max divergence tubes from touching","at adjacent starting positions."].join(" ")},text:{valType:"string",dflt:"",editType:"calc",description:["Sets a text element associated with this trace.","If trace `hoverinfo` contains a *text* flag,","this text element will be seen in all hover labels.","Note that streamtube traces do not support array `text` values."].join(" ")},hovertext:{valType:"string",dflt:"",editType:"calc",description:"Same as `text`."},hovertemplate:o({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(c,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},67265:(e,t,r)=>{"use strict";var n=r(53787),i=r(1631);function o(e){var t,r,i,o,s,l,c,u,d,f,h,p,m=e._x,g=e._y,v=e._z,y=e._len,x=-1/0,b=1/0,w=-1/0,_=1/0,k=-1/0,S=1/0,T="";for(y&&(c=m[0],d=g[0],h=v[0]),y>1&&(u=m[y-1],f=g[y-1],p=v[y-1]),t=0;tu?"-":"+")+"x")).replace("y",(d>f?"-":"+")+"y")).replace("z",(h>p?"-":"+")+"z");var E=function(){y=0,M=[],C=[],A=[]};(!y||y{"use strict";var n=r(13084).gl_streamtube3d,i=n.createTubeMesh,o=r(53787),a=r(95049).parseColorScale,s=r(10948).extractOpts,l=r(51577),c={xaxis:0,yaxis:1,zaxis:2};function u(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var d=u.prototype;function f(e){var t=e.length;return t>2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function h(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var r=e.fullSceneLayout,i=e.dataScale,u=t._len,d={};function p(e,t){var n=r[t],a=i[c[t]];return o.simpleMap(e,(function(e){return n.d2l(e)*a}))}if(d.vectors=l(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),v=p(t._Zs,"zaxis");if(d.meshgrid=[m,g,v],d.gridFill=t._gridFill,t._slen)d.startingPositions=l(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var y=g[0],x=f(m),b=f(v),w=new Array(x.length*b.length),_=0,k=0;k{"use strict";var n=r(53787),i=r(5876),o=r(921);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),f=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length&&h&&h.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(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},53624:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"streamtube",basePlotModule:r(36390),categories:["gl3d","showLegend"],attributes:r(921),supplyDefaults:r(98988),colorbar:{min:"cmin",max:"cmax"},calc:r(67265).calc,plot:r(92063),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{description:["Use a streamtube trace to visualize flow in a vector field.","","Specify a vector field using 6 1D arrays of equal length,","3 position arrays `x`, `y` and `z`","and 3 vector component arrays `u`, `v`, and `w`.","","By default, the tubes' starting positions will be cut from the vector field's","x-z plane at its minimum y value.","To specify your own starting position, use attributes `starts.x`, `starts.y`","and `starts.z`.","The color is encoded by the norm of (u, v, w), and the local radius","by the divergence of (u, v, w)."].join(" ")}}},75542:(e,t,r)=>{"use strict";var n=r(27231),i=r(32191).fF,o=r(32191).si,a=r(8753),s=r(29707).Y,l=r(10650),c=r(424),u=r(10191).extendFlat,d=r(93701).u;e.exports={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:u({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:u({},l.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:d,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:o({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}},51998:(e,t,r)=>{"use strict";var n=r(44115);t.name="sunburst",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},27411:(e,t,r)=>{"use strict";var n=r(23554),i=r(51908),o=r(53787),a=r(10948).makeColorScaleFuncFromTrace,s=r(21412).makePullColorFn,l=r(21412).generateExtendedColors,c=r(10948).calc,u=r(24956).ALMOST_EQUAL,d={},f={},h={};function p(e,t,r){var n=0,i=e.children;if(i){for(var o=i.length,a=0;a=0};y?(r=Math.min(v.length,b.length),l=function(e){return M(v[e])&&C(e)},d=function(e){return String(v[e])}):(r=Math.min(x.length,b.length),l=function(e){return M(x[e])&&C(e)},d=function(e){return String(x[e])}),_&&(r=Math.min(r,w.length));for(var A=0;A1){for(var P=o.randstr(),R=0;R{"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},17688:(e,t,r)=>{"use strict";var n=r(53787),i=r(75542),o=r(29707).c,a=r(6099).handleText,s=r(24530).handleMarkerDefaults,l=r(10948),c=l.hasColorscale,u=l.handleDefaults;e.exports=function(e,t,r,l){function d(r,o){return n.coerce(e,t,i,r,o)}var f=d("labels"),h=d("parents");if(f&&f.length&&h&&h.length){var p=d("values");p&&p.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),s(e,t,l,d);var m=t._hasColorscale=c(e,"marker","colors")||(e.marker||{}).coloraxis;m&&u(e,t,l,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",m?1:.7);var g=d("text");d("texttemplate"),t.texttemplate||d("textinfo",Array.isArray(g)?"text+label":"label"),d("hovertext"),d("hovertemplate");a(e,t,l,d,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("insidetextorientation"),d("sort"),d("rotation"),d("root.color"),o(t,l,d),t._length=null}else t.visible=!1}},74927:(e,t,r)=>{"use strict";var n=r(50973),i=r(66235);e.exports=function(e,t,r,o,a){var s=t.data.data,l=s.i,c=a||s.color;if(l>=0){t.i=s.i;var u=r.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),n.pointStyle(e,r,o,t)}else i.fill(e,c)}},38638:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(87267).appendArrayPointValue,a=r(76719),s=r(53787),l=r(24521),c=r(34636),u=r(22084).formatPieValue;function d(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a"),name:T||L("name")?y.name:void 0,color:S("hoverlabel.bgcolor")||x.color,borderColor:S("hoverlabel.bordercolor"),fontFamily:S("hoverlabel.font.family"),fontSize:S("hoverlabel.font.size"),fontColor:S("hoverlabel.font.color"),nameLength:S("hoverlabel.namelength"),textAlign:S("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:O,eventData:l};g&&(z.x0=A-i.rInscribed*i.rpx1,z.x1=A+i.rInscribed*i.rpx1,z.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(z.x=A,z.idealAlign=A<0?"left":"right");var N=[];a.loneHover(z,{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:r,inOut_bbox:N}),l[0].bbox=N[0],p._hasHoverLabel=!0}if(v){var F=e.select("path.surface");f.styleOne(F,i,y,r,{hovered:!0})}p._hasHoverEvent=!0,r.emit("plotly_hover",{points:l||[d(i,y,f.eventDataKeys)],event:n.event})}})),e.on("mouseout",(function(t){var i=r._fullLayout,o=r._fullData[p.index],s=n.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=n.event,r.emit("plotly_unhover",{points:[d(s,o,f.eventDataKeys)],event:n.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),v){var l=e.select("path.surface");f.styleOne(l,s,o,r,{hovered:!1})}})),e.on("click",(function(e){var t=r._fullLayout,o=r._fullData[p.index],s=g&&(c.isHierarchyRoot(e)||c.isLeaf(e)),u=c.getPtId(e),h=c.isEntry(e)?c.findEntryWithChild(m,u):c.findEntryWithLevel(m,u),v=c.getPtId(h),y={points:[d(e,o,f.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,"plotly_"+p.type+"click",y);if(!1!==x&&t.hovermode&&(r._hoverdata=[d(e,o,f.eventDataKeys)],a.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:v}],traces:[p.index]},w={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",r,b,w)}}))}},34636:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(19602),a=r(22084);function s(e){return e.data.data.pid}t.findEntryWithLevel=function(e,r){var n;return r&&e.eachAfter((function(e){if(t.getPtId(e)===r)return n=e.copy()})),n||e},t.findEntryWithChild=function(e,r){var n;return e.eachAfter((function(e){for(var i=e.children||[],o=0;o0)},t.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},t.isHeader=function(e,r){return!(t.isLeaf(e)||e.depth===r._maxDepth-1)},t.getParent=function(e,r){return t.findEntryWithLevel(e,s(r))},t.listPath=function(e,r){var n=e.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return t.listPath(n,r).concat(i)},t.getPath=function(e){return t.listPath(e,"label").join("/")+"/"},t.formatValue=a.formatPieValue,t.formatPercent=function(e,t){var r=n.formatPercent(e,0);return"0%"===r&&(r=a.formatPiePercent(e,t)),r}},14347:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:r(51998),categories:[],animatable:!0,attributes:r(75542),layoutAttributes:r(88984),supplyDefaults:r(17688),supplyLayoutDefaults:r(22223),calc:r(27411).calc,crossTraceCalc:r(27411).crossTraceCalc,plot:r(96938).plot,style:r(41154).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data spanning outward radially from root to leaves.","The sunburst sectors are determined by the entries in *labels* or *ids*","and in *parents*."].join(" ")}}},88984:e=>{"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default sunburst slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendsunburstcolors`."].join(" ")},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the sunburst slice colors (whether given by `sunburstcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},22223:(e,t,r)=>{"use strict";var n=r(53787),i=r(88984);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}},96938:(e,t,r)=>{"use strict";var n=r(8996),i=r(23554),o=r(81105).sX,a=r(50973),s=r(53787),l=r(98224),c=r(22684),u=c.recordMinTextSize,d=c.clearMinTextSize,f=r(3213),h=r(22084).getRotationAngle,p=f.computeTransform,m=f.transformInsideText,g=r(41154).styleOne,v=r(29527).resizeText,y=r(38638),x=r(424),b=r(34636);function w(e,r,c,d){var f=e._context.staticPlot,v=e._fullLayout,w=!v.uniformtext.mode&&b.hasTransition(d),k=n.select(c).selectAll("g.slice"),S=r[0],T=S.trace,M=S.hierarchy,C=b.findEntryWithLevel(M,T.level),A=b.getMaxDepth(T),E=v._size,I=T.domain,O=E.w*(I.x[1]-I.x[0]),P=E.h*(I.y[1]-I.y[0]),R=.5*Math.min(O,P),L=S.cx=E.l+E.w*(I.x[1]+I.x[0])/2,j=S.cy=E.t+E.h*(1-I.y[0])-P/2;if(!C)return k.remove();var D=null,z={};w&&k.each((function(e){z[b.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!D&&b.isEntry(e)&&(D=e)}));var N=function(e){return i.partition().size([2*Math.PI,e.height+1])(e)}(C).descendants(),F=C.height+1,B=0,Z=A;S.hasMultipleRoots&&b.isHierarchyRoot(C)&&(N=N.slice(1),F-=1,B=1,Z+=1),N=N.filter((function(e){return e.y1<=Z}));var U=h(T.rotation);U&&N.forEach((function(e){e.x0+=U,e.x1+=U}));var V=Math.min(F,A),H=function(e){return(e-B)/V*R},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},G=function(e){return s.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,L,j)},q=function(e){return L+_(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Y=function(e){return j+_(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(k=k.data(N,b.getPtId)).enter().append("g").classed("slice",!0),w?k.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=b.getPtId(e),n=z[r],i=z[b.getPtId(C)];if(i){var a=(e.x1>i.x1?2*Math.PI:0)+U;t=e.rpx1X?2*Math.PI:0)+U;t={x0:i,x1:i}}else t={rpx0:R,rpx1:R},s.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:U,x1:U};return o(t,n)}(e);return function(e){return G(t(e))}})):d.attr("d",G),c.call(y,C,e,r,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),d.call(g,i,T,e);var h=s.ensureSingle(c,"g","slicetext"),_=s.ensureSingle(h,"text","",(function(e){e.attr("data-notex",1)})),k=s.ensureUniformFontSize(e,b.determineTextFont(T,i,v.font));_.text(t.formatSliceLabel(i,C,T,r,v)).classed("slicetext",!0).attr("text-anchor","middle").call(a.font,k).call(l.convertToTspans,e);var M=a.bBox(_.node());i.transform=m(M,i,S),i.transform.targetX=q(i),i.transform.targetY=Y(i);var A=function(e,t){var r=e.transform;return p(r,t),r.fontSize=k.size,u(T.type,r,v),s.getTextTransform(r)};w?_.transition().attrTween("transform",(function(e){var t=function(e){var t,r=z[b.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(e.parent)if(X){var i=e.x1>X?2*Math.PI:0;t.x0=t.x1=i}else s.extendFlat(t,J(e));else t.x0=t.x1=U;else t.x0=t.x1=U;var a=o(t.transform.textPosAngle,e.transform.textPosAngle),l=o(t.rpx1,e.rpx1),c=o(t.x0,e.x0),d=o(t.x1,e.x1),f=o(t.transform.scale,n.scale),h=o(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,m=o(t.transform.rCenter,n.rCenter),g=function(e){return m(Math.pow(e,p))};return function(e){var t=l(e),r=c(e),i=d(e),o=g(e),s={pxmid:W(t,(r+i)/2),rpx1:t,transform:{textPosAngle:a(e),rCenter:o,x:n.x,y:n.y}};return u(T.type,n,v),{transform:{targetX:q(s),targetY:Y(s),scale:f(e),rotate:h(e),rCenter:o}}}}(e);return function(e){return A(t(e),M)}})):_.attr("transform",A(i,M))}))}function _(e){return t=e.rpx1,r=e.transform.textPosAngle,[t*Math.sin(r),-t*Math.cos(r)];var t,r}t.plot=function(e,t,r,i){var o,a,s=e._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(d("sunburst",s),(o=l.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u)?(i&&(a=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){a&&a()})).each("interrupt",(function(){a&&a()})).each((function(){l.selectAll("g.trace").each((function(t){w(e,t,this,r)}))}))):(o.each((function(t){w(e,t,this,r)})),s.uniformtext.mode&&v(e,s._sunburstlayer.selectAll(".trace"),"sunburst"));c&&o.exit().remove()},t.formatSliceLabel=function(e,t,r,n,i){var o=r.texttemplate,a=r.textinfo;if(!o&&(!a||"none"===a))return"";var l=i.separators,c=n[0],u=e.data.data,d=c.hierarchy,f=b.isHierarchyRoot(e),h=b.getParent(d,e),p=b.getValue(e);if(!o){var m,g=a.split("+"),v=function(e){return-1!==g.indexOf(e)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(b.formatValue(u.v,l)),!f){v("current path")&&y.push(b.getPath(e.data));var x=0;v("percent parent")&&x++,v("percent entry")&&x++,v("percent root")&&x++;var w=x>1;if(x){var _,k=function(e){m=b.formatPercent(_,l),w&&(m+=" of "+e),y.push(m)};v("percent parent")&&!f&&(_=p/b.getValue(h),k("parent")),v("percent entry")&&(_=p/b.getValue(t),k("entry")),v("percent root")&&(_=p/b.getValue(d),k("root"))}}return v("text")&&(m=s.castOption(r,u.i,"text"),s.isValidTextValue(m)&&y.push(m)),y.join("
")}var S=s.castOption(r,u.i,"texttemplate");if(!S)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=b.formatValue(u.v,l)),T.currentPath=b.getPath(e.data),f||(T.percentParent=p/b.getValue(h),T.percentParentLabel=b.formatPercent(T.percentParent,l),T.parent=b.getPtLabel(h)),T.percentEntry=p/b.getValue(t),T.percentEntryLabel=b.formatPercent(T.percentEntry,l),T.entry=b.getPtLabel(t),T.percentRoot=p/b.getValue(d),T.percentRootLabel=b.formatPercent(T.percentRoot,l),T.root=b.getPtLabel(d),u.hasOwnProperty("color")&&(T.color=u.color);var M=s.castOption(r,u.i,"text");return(s.isValidTextValue(M)||""===M)&&(T.text=M),T.customdata=s.castOption(r,u.i,"customdata"),s.texttemplateString(S,T,i._d3locale,T,r._meta||{})}},41154:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(22684).resizeText,s=r(74927);function l(e,t,r,n){var a=t.data.data,l=!t.children,c=a.i,u=o.castOption(r,c,"marker.line.color")||i.defaultLine,d=o.castOption(r,c,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",d).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},72547:(e,t,r)=>{"use strict";var n=r(66235),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(27231),l=r(10191).extendFlat,c=r(18693).overrideAll;function u(e){return{valType:"boolean",dflt:!1,description:["Determines whether or not these contour lines are projected","on the",e,"plane.","If `highlight` is set to *true* (the default), the projected","lines are shown on hover.","If `show` is set to *true*, the projected lines are shown","in permanence."].join(" ")}}function d(e){return{show:{valType:"boolean",dflt:!1,description:["Determines whether or not contour lines about the",e,"dimension are drawn."].join(" ")},start:{valType:"number",dflt:null,editType:"plot",description:["Sets the starting contour level value.","Must be less than `contours.end`"].join(" ")},end:{valType:"number",dflt:null,editType:"plot",description:["Sets the end contour level value.","Must be more than `contours.start`"].join(" ")},size:{valType:"number",dflt:null,min:0,editType:"plot",description:["Sets the step between each contour level.","Must be positive."].join(" ")},project:{x:u("x"),y:u("y"),z:u("z")},color:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the contour lines."},usecolormap:{valType:"boolean",dflt:!1,description:["An alternate to *color*.","Determines whether or not the contour lines are colored using","the trace *colorscale*."].join(" ")},width:{valType:"number",min:1,max:16,dflt:2,description:"Sets the width of the contour lines."},highlight:{valType:"boolean",dflt:!0,description:["Determines whether or not contour lines about the",e,"dimension are highlighted on hover."].join(" ")},highlightcolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the highlighted contour lines."},highlightwidth:{valType:"number",min:1,max:16,dflt:2,description:"Sets the width of the highlighted contour lines."}}}var f=e.exports=c(l({z:{valType:"data_array",description:"Sets the z coordinates."},x:{valType:"data_array",description:"Sets the x coordinates."},y:{valType:"data_array",description:"Sets the y coordinates."},text:{valType:"string",dflt:"",arrayOk:!0,description:["Sets the text elements associated with each z value.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,description:"Same as `text`."},hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in."].join(" ")},surfacecolor:{valType:"data_array",description:["Sets the surface color values,","used for setting a color scale independent of `z`."].join(" ")}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:d("x"),y:d("y"),z:d("z")},hidesurface:{valType:"boolean",dflt:!1,description:["Determines whether or not a surface is drawn.","For example, set `hidesurface` to *false*","`contours.x.show` to *true* and","`contours.y.show` to *true* to draw a wire frame plot."].join(" ")},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10,description:"Numeric vector, representing the X coordinate for each vertex."},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4,description:"Numeric vector, representing the Y coordinate for each vertex."},z:{valType:"number",min:-1e5,max:1e5,dflt:0,description:"Numeric vector, representing the Z coordinate for each vertex."}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8,description:"Ambient light increases overall color visibility but can wash out the image."},diffuse:{valType:"number",min:0,max:1,dflt:.8,description:"Represents the extent that incident rays are reflected in a range of angles."},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2,description:["Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective","when viewing it from the edge of the paper (almost 90 degrees), causing shine."].join(" ")}},opacity:{valType:"number",min:0,max:1,dflt:1,description:["Sets the opacity of the surface.","Please note that in the case of using high `opacity` values for example a value","greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an","overlay of multiple transparent surfaces may not perfectly be sorted in depth by the","webgl API. This behavior may be improved in the near future and is subject to change."].join(" ")},opacityscale:{valType:"any",editType:"calc",description:["Sets the opacityscale.","The opacityscale must be an array containing","arrays mapping a normalized value to an opacity value.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values would have","higher opacity values and those in the middle would be more transparent","Alternatively, `opacityscale` may be a palette name string","of the following list: 'min', 'max', 'extremes' and 'uniform'.","The default is 'uniform'."].join(" ")},_deprecated:{zauto:l({},i.zauto,{description:"Obsolete. Use `cauto` instead."}),zmin:l({},i.zmin,{description:"Obsolete. Use `cmin` instead."}),zmax:l({},i.zmax,{description:"Obsolete. Use `cmax` instead."})},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},37042:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){t.surfacecolor?n(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):n(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},87223:(e,t,r)=>{"use strict";var n=r(13084).gl_surface3d,i=r(13084).ndarray,o=r(13084).ndarray_linear_interpolate.d2,a=r(83622),s=r(98878),l=r(53787).isArrayOrTypedArray,c=r(95049).parseColorScale,u=r(55115),d=r(10948).extractOpts;function f(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 h=f.prototype;h.getXat=function(e,t,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===r?i:n.d2l(i,0,r)},h.getYat=function(e,t,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===r?i:n.d2l(i,0,r)},h.getZat=function(e,t,r,n){var i=this.data.z[t][e];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),void 0===r?i:n.d2l(i,0,r)},h.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.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 o=0;o<3;o++){var a=e.dataCoordinate[o];null!==a&&void 0!==a&&(e.dataCoordinate[o]*=this.scene.dataScale[o])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?e.textLabel=s[i][n]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var p=[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 m(e,t){if(e0){r=p[n];break}return r}function y(e,t){if(!(e<1||t<1)){for(var r=g(e),n=g(t),i=1,o=0;ow;)r--,r/=v(r),++r1?n:1},h.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],o=e[0].shape[1],a=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*r+1),l=1+n+1,c=1+o+1,u=i(new Float32Array(l*c),[l,c]),d=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];to&&(this.minValues[t]=o),this.maxValues[t]{"use strict";var n=r(44049),i=r(53787),o=r(5876),a=r(72547),s=.1;function l(e,t,r,n){var i=n("opacityscale");"max"===i?t.opacityscale=[[0,s],[1,1]]:"min"===i?t.opacityscale=[[0,1],[1,s]]:"extremes"===i?t.opacityscale=function(e,t){for(var r=[],n=0;n<32;n++){var i=n/31,o=t+(1-t)*(1-Math.pow(Math.sin(e*i*Math.PI),2));r.push([i,Math.max(0,Math.min(1,o))])}return r}(1,s):function(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!==+e[0][0]||1!==+e[e.length-1][0])return!1;for(var r=0;r{"use strict";e.exports={attributes:r(72547),supplyDefaults:r(10).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:r(37042),plot:r(87223),moduleType:"trace",name:"surface",basePlotModule:r(36390),categories:["gl3d","2dMap","showLegend"],meta:{description:["The data the describes the coordinates of the surface is set in `z`.","Data in `z` should be a {2D array}.","Coordinates in `x` and `y` can either be 1D {arrays}","or {2D arrays} (e.g. to graph parametric surfaces).","If not provided in `x` and `y`, the x and y coordinates are assumed","to be linear starting at 0 with a unit step.","The color scale corresponds to the `z` values by default.","For custom color scales, use `surfacecolor` which should be a {2D array},","where its bounds can be controlled using `cmin` and `cmax`."].join(" ")}}},75921:(e,t,r)=>{"use strict";var n=r(63858),i=r(10191).extendFlat,o=r(18693).overrideAll,a=r(92948),s=r(29707).Y,l=r(89849).descriptionOnlyNumbers;(e.exports=o({domain:s({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null,description:["The width of columns expressed as a ratio. Columns fill the available width","in proportion of their specified column widths."].join(" ")},columnorder:{valType:"data_array",description:["Specifies the rendered order of the data columns; for example, a value `2` at position `0`","means that column index `0` in the data will be rendered as the","third column, as columns have an index base of zero."].join(" ")},header:{values:{valType:"data_array",dflt:[],description:["Header cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:28,description:"The height of cells."},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",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[],description:["Cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:20,description:"The height of cells."},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",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:i({},a({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},71591:(e,t,r)=>{"use strict";var n=r(38213).a0,i=r(10388),o="table";t.name=o,t.plot=function(e){var t=n(e.calcdata,o)[0];t.length&&i(e,t)},t.clean=function(e,t,r,n){var i=n._has&&n._has(o),a=t._has&&t._has(o);i&&!a&&n._paperdiv.selectAll(".table").remove()}},64981:(e,t,r)=>{"use strict";var n=r(41689).wrap;e.exports=function(){return n({})}},46322:e=>{"use strict";e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}},57749:(e,t,r)=>{"use strict";var n=r(46322),i=r(10191).extendFlat,o=r(51908);function a(e){if(Array.isArray(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(n[i]=a,a.key=l++,a.firstRowIndex=s,a.lastRowIndex=c,a={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=o,s=c+1,o=0);return n}e.exports=function(e,t){var r=l(t.cells.values),h=function(e){return e.slice(t.header.values.length,e.length)},p=l(t.header.values);p.length&&!p[0].length&&(p[0]=[""],p=l(p));var m=p.concat(h(r).map((function(){return c((p[0]||[""]).length)}))),g=t.domain,v=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),y=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),x=t.header.values.length?m[0].map((function(){return t.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return t.cells.height})):[],w=x.reduce(s,0),_=f(b,y-w+n.uplift),k=d(f(x,w),[]),S=d(_,k),T={},M=t._fullInput.columnorder.concat(h(r.map((function(e,t){return t})))),C=m.map((function(e,r){var n=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return o(n)?Number(n):1})),A=C.reduce(s,0);C=C.map((function(e){return e/A*v}));var E=Math.max(a(t.header.line.width),a(t.cells.line.width)),I={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:E,height:y,columnOrder:M,groupHeight:y,rowBlocks:S,headerRowBlocks:k,scrollY:0,cells:i({},t.cells,{values:r}),headerCells:i({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var r=T[e];return T[e]=(r||0)+1,{key:e+"__"+T[e],label:e,specIndex:t,xIndex:M[t],xScale:u,x:void 0,calcdata:void 0,columnWidth:C[t]}}))};return I.columns.forEach((function(e){e.calcdata=I,e.x=u(e)})),I}},1662:(e,t,r)=>{"use strict";var n=r(10191).extendFlat;t.splitToPanels=function(e){var t=[0,0],r=n({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:n({},e.calcdata,{cells:e.calcdata.headerCells})});return[n({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r]},t.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"===typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}},1468:(e,t,r)=>{"use strict";var n=r(53787),i=r(75921),o=r(29707).c;e.exports=function(e,t,r,a){function s(r,o){return n.coerce(e,t,i,r,o)}o(t,a,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({},a.font)),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),o=i.slice().sort((function(e,t){return e-t})),a=i.map((function(e){return o.indexOf(e)})),s=a.length;s{"use strict";e.exports={attributes:r(75921),supplyDefaults:r(1468),calc:r(64981),plot:r(10388),moduleType:"trace",name:"table",basePlotModule:r(71591),categories:["noOpacity"],meta:{description:["Table view for detailed data viewing.","The data are arranged in a grid of rows and columns.","Most styling can be specified for columns, rows or individual cells.","Table is using a column-major order, ie. the grid is represented as a vector of column vectors."].join(" ")}}},10388:(e,t,r)=>{"use strict";var n=r(46322),i=r(8996),o=r(53787).numberFormat,a=r(41689),s=r(50973),l=r(98224),c=r(53787).raiseToTop,u=r(53787).strTranslate,d=r(53787).cancelTransition,f=r(57749),h=r(1662),p=r(66235);function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function v(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function y(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function x(e,t,r){var o=e.selectAll("."+n.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append("g").classed(n.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),o.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return j(t,t.length-1)+(t.length?D(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-C(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){var t=e.width+n.scrollbarWidth/2+n.scrollbarOffset;return u(t,C(e))}));var s=o.selectAll("."+n.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append("g").classed(n.cn.scrollbar,!0);var l=s.selectAll("."+n.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append("g").classed(n.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return u(0,e.scrollbarState.topY||0)}));var c=l.selectAll("."+n.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.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),c.attr("y2",(function(e){return e.scrollbarState.barLength-n.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||r?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr("stroke-opacity",0);var d=s.selectAll("."+n.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);d.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,o=this.getBoundingClientRect(),a=r.scrollbarState,s=n-o.top,l=i.scale.linear().domain([0,a.scrollableAreaHeight]).range([0,a.totalHeight]).clamp(!0);a.topY<=s&&s<=a.bottomY||E(t,e,null,l(s-a.barLength/2))(r)})).call(i.behavior.drag().origin((function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",E(t,e)).on("dragend",(function(){}))),d.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),d.remove())}function b(e,t,r,o){var l=function(e){var t=e.selectAll("."+n.cn.columnCells).data(a.repeat,a.keyFun);return t.enter().append("g").classed(n.cn.columnCells,!0),t.exit().remove(),t}(r),c=function(e){var t=e.selectAll("."+n.cn.columnCell).data(h.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.columnCell,!0),t.exit().remove(),t}(l);!function(e){e.each((function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,i={size:k(r.size,n,t),color:k(r.color,n,t),family:k(r.family,n,t)};e.rowNumber=e.key,e.align=k(e.calcdata.cells.align,n,t),e.cellBorderWidth=k(e.calcdata.cells.line.width,n,t),e.font=i}))}(c);var u=function(e){var t=e.selectAll("."+n.cn.cellRect).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(n.cn.cellRect,!0),t}(c);!function(e){e.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=i.select(this);p.stroke(t,k(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,k(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}))}(u);var d=function(e){var t=e.selectAll("."+n.cn.cellTextHolder).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(c),f=function(e){var t=e.selectAll("."+n.cn.cellText).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(n.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){i.event.stopPropagation()})),t}(d);!function(e){e.each((function(e){s.font(i.select(this),e.font)}))}(f),w(f,t,o,e),L(c)}function w(e,t,r,a){e.text((function(e){var t=e.column.specIndex,r=e.rowNumber,i=e.value,a="string"===typeof i,s=a&&i.match(/
/i),l=!a||s;e.mayHaveMarkup=a&&i.match(/[<&>]/);var c,u="string"===typeof(c=i)&&c.match(n.latexCheck);e.latex=u;var d,f,h=u?"":k(e.calcdata.cells.prefix,t,r)||"",p=u?"":k(e.calcdata.cells.suffix,t,r)||"",m=u?null:k(e.calcdata.cells.format,t,r)||null,g=h+(m?o(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!u&&(d=_(g)),e.cellHeightMayIncrease=s||u||e.mayHaveMarkup||(void 0===d?_(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var v=(" "===n.wrapSplitCharacter?g.replace(/i&&n.push(o),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=j(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(I(e,r,t,c,n.prevPages,n,0),I(e,r,t,c,n.prevPages,n,1),x(r,e))}}function E(e,t,r,o){return function(a){var s=a.calcdata?a.calcdata:a,l=t.filter((function(e){return s.key===e.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===o?s.scrollY+c*i.event.dy:o;var d=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(T);return A(e,d,l),s.scrollY===u}}function I(e,t,r,n,i,o,a){n[a]!==i[a]&&(clearTimeout(o.currentRepaint[a]),o.currentRepaint[a]=setTimeout((function(){var o=r.filter((function(e,t){return t===a&&n[t]!==i[t]}));b(e,t,o,r),i[a]=n[a]})))}function O(e,t,r,o){return function(){var a=i.select(t.parentNode);a.each((function(e){var t=e.fragments;a.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var r,i,o=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*n.cellPad;for(e.value="";s.length;)c+(i=(r=s.shift()).width+o)>u&&(e.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(e.value+=l.join(n.wrapSpacer)),e.wrapped=!0})),a.selectAll("tspan.line").remove(),w(a.select("."+n.cn.cellText),r,e,o),i.select(t.parentNode.parentNode).call(L)}}function P(e,t,r,o,a){return function(){if(!a.settledY){var s=i.select(t.parentNode),l=N(a),c=a.key-l.firstRowIndex,d=l.rows[c].rowHeight,f=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*n.cellPad:d,h=Math.max(f,d);h-l.rows[c].rowHeight&&(l.rows[c].rowHeight=h,e.selectAll("."+n.cn.columnCell).call(L),A(null,e.filter(T),0),x(r,o,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),r=i.select(e.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),o=e.transform.baseVal.consolidate(),s=r.top-t.top+(o?o.matrix.f:n.cellPad);return u(R(a,i.select(e.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),a.settledY=!0}}}function R(e,t){switch(e.align){case"left":default:return n.cellPad;case"right":return e.column.columnWidth-(t||0)-n.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function L(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+D(t,1/0)}),0),r=D(N(e),e.key);return u(0,r+t)})).selectAll("."+n.cn.cellRect).attr("height",(function(e){return(t=N(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight;var t,r}))}function j(e,t){for(var r=0,n=t-1;n>=0;n--)r+=z(e[n]);return r}function D(e,t){for(var r=0,n=0;n{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(8753),a=r(29707).Y,s=r(10650),l=r(75542),c=r(50668),u=r(10191).extendFlat,d=r(93701).u;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",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:l.marker.colors,pattern:d,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:u({},s.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},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({},s.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),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",description:["Sets the positions of the `text` elements."].join(" ")},sort:s.sort,root:l.root,domain:a({name:"treemap",trace:!0,editType:"calc"})}},96959:(e,t,r)=>{"use strict";var n=r(44115);t.name="treemap",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},70331:(e,t,r)=>{"use strict";var n=r(27411);t.y=function(e,t){return n.calc(e,t)},t.T=function(e){return n._runCrossTraceCalc("treemap",e)}},50668:e=>{"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},5731:(e,t,r)=>{"use strict";var n=r(53787),i=r(67304),o=r(66235),a=r(29707).c,s=r(6099).handleText,l=r(22331).TEXTPAD,c=r(24530).handleMarkerDefaults,u=r(10948),d=u.hasColorscale,f=u.handleDefaults;e.exports=function(e,t,r,u){function h(r,o){return n.coerce(e,t,i,r,o)}var p=h("labels"),m=h("parents");if(p&&p.length&&m&&m.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"),t.texttemplate||h("textinfo",Array.isArray(v)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(e,t,u,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var x=-1!==t.textposition.indexOf("bottom");c(e,t,u,h),(t._hasColorscale=d(e,"marker","colors")||(e.marker||{}).coloraxis)?f(e,t,u,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;h("marker.pad.t",x?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",x?b:b/4),h("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:o.contrast(u.paper_bgcolor)}}},y&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),a(t,u,h),t._length=null}else t.visible=!1}},62470:(e,t,r)=>{"use strict";var n=r(8996),i=r(34636),o=r(22684).clearMinTextSize,a=r(29527).resizeText,s=r(39193);e.exports=function(e,t,r,l,c){var u,d,f=c.type,h=c.drawDescendants,p=e._fullLayout,m=p["_"+f+"layer"],g=!r;(o(f,p),(u=m.selectAll("g.trace."+f).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(f,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(r))?(l&&(d=l()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){m.selectAll("g.trace").each((function(t){s(e,t,this,r,h)}))}))):(u.each((function(t){s(e,t,this,r,h)})),p.uniformtext.mode&&a(e,m.selectAll(".trace"),f));g&&u.exit().remove()}},67616:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(70427),l=r(94571).styleOne,c=r(50668),u=r(34636),d=r(38638),f=!0;e.exports=function(e,t,r,h,p){var m=p.barDifY,g=p.width,v=p.height,y=p.viewX,x=p.viewY,b=p.pathSlice,w=p.toMoveInsideSlice,_=p.strTransform,k=p.hasTransition,S=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,M=p.makeUpdateTextInterpolator,C={},A=e._context.staticPlot,E=e._fullLayout,I=t[0],O=I.trace,P=I.hierarchy,R=g/O._entryDepth,L=u.listPath(r.data,"id"),j=s(P.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(j=j.filter((function(e){var t=L.indexOf(e.data.id);return-1!==t&&(e.x0=R*t,e.x1=R*(t+1),e.y0=m,e.y1=m+v,e.onPathbar=!0,!0)}))).reverse(),(h=h.data(j,u.getPtId)).enter().append("g").classed("pathbar",!0),S(h,f,C,[g,v],b),h.order();var D=h;k&&(D=D.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),D.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(g,v)/2),s._hoverY=x(s.y1-v/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?p.transition().attrTween("d",(function(e){var t=T(e,f,C,[g,v]);return function(e){return b(t(e))}})):p.attr("d",b),h.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),p.call(l,s,O,e,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var m=i.ensureSingle(h,"g","slicetext"),S=i.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),I=i.ensureUniformFontSize(e,u.determineTextFont(O,s,E.font,{onPathbar:!0}));S.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(o.font,I).call(a.convertToTspans,e),s.textBB=o.bBox(S.node()),s.transform=w(s,{fontSize:I.size,onPathbar:!0}),s.transform.fontSize=I.size,k?S.transition().attrTween("transform",(function(e){var t=M(e,f,C,[g,v]);return function(e){return _(t(e))}})):S.attr("transform",_(s))}))}},53221:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(70427),l=r(94571).styleOne,c=r(50668),u=r(34636),d=r(38638),f=r(96938).formatSliceLabel,h=!1;e.exports=function(e,t,r,p,m){var g=m.width,v=m.height,y=m.viewX,x=m.viewY,b=m.pathSlice,w=m.toMoveInsideSlice,_=m.strTransform,k=m.hasTransition,S=m.handleSlicesExit,T=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,C=m.prevEntry,A=e._context.staticPlot,E=e._fullLayout,I=t[0].trace,O=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),R=-1!==I.textposition.indexOf("bottom"),L=!R&&!I.marker.pad.t||R&&!I.marker.pad.b,j=s(r,[g,v],{packing:I.tiling.packing,squarifyratio:I.tiling.squarifyratio,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}).descendants(),D=1/0,z=-1/0;j.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),z=Math.max(z,t))})),p=p.data(j,u.getPtId),I._maxVisibleLayers=isFinite(z)?z-D+1:0,p.enter().append("g").classed("slice",!0),S(p,h,{},[g,v],b),p.order();var N=null;if(k&&C){var F=u.getPtId(C);p.each((function(e){null===N&&u.getPtId(e)===F&&(N={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var B=function(){return N||{x0:0,x1:g,y0:0,y1:v}},Z=p;return k&&(Z=Z.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),Z.each((function(s){var p=u.isHeader(s,I);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-I.marker.pad.r),s._hoverY=x(R?s.y1-I.marker.pad.b/2:s.y0+I.marker.pad.t/2);var m=n.select(this),S=i.ensureSingle(m,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?S.transition().attrTween("d",(function(e){var t=T(e,h,B(),[g,v]);return function(e){return b(t(e))}})):S.attr("d",b),m.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),S.call(l,s,I,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?L?"":u.getPtLabel(s)||"":f(s,r,I,t,E)||"";var C=i.ensureSingle(m,"g","slicetext"),j=i.ensureSingle(C,"text","",(function(e){e.attr("data-notex",1)})),D=i.ensureUniformFontSize(e,u.determineTextFont(I,s,E.font));j.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":O||p?"start":"middle").call(o.font,D).call(a.convertToTspans,e),s.textBB=o.bBox(j.node()),s.transform=w(s,{fontSize:D.size,isHeader:p}),s.transform.fontSize=D.size,k?j.transition().attrTween("transform",(function(e){var t=M(e,h,B(),[g,v]);return function(e){return _(t(e))}})):j.attr("transform",_(s))})),N}},72276:e=>{"use strict";e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var o=t.children;if(o)for(var a=0;a{"use strict";e.exports={moduleType:"trace",name:"treemap",basePlotModule:r(96959),categories:[],animatable:!0,attributes:r(67304),layoutAttributes:r(37895),supplyDefaults:r(5731),supplyLayoutDefaults:r(71364),calc:r(70331).y,crossTraceCalc:r(70331).T,plot:r(51902),style:r(94571).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}},37895:e=>{"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},71364:(e,t,r)=>{"use strict";var n=r(53787),i=r(37895);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}},70427:(e,t,r)=>{"use strict";var n=r(23554),i=r(72276);e.exports=function(e,t,r){var o,a=r.flipX,s=r.flipY,l="dice-slice"===r.packing,c=r.pad[s?"bottom":"top"],u=r.pad[a?"right":"left"],d=r.pad[a?"left":"right"],f=r.pad[s?"top":"bottom"];l&&(o=u,u=c,c=o,o=d,d=f,f=o);var h=n.treemap().tile(function(e,t){switch(e){case"squarify":return n.treemapSquarify.ratio(t);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(u).paddingRight(d).paddingTop(c).paddingBottom(f).size(l?[t[1],t[0]]:t)(e);return(l||a||s)&&i(h,t,{swapXY:l,flipX:a,flipY:s}),h}},51902:(e,t,r)=>{"use strict";var n=r(62470),i=r(53221);e.exports=function(e,t,r,o){return n(e,t,r,o,{type:"treemap",drawDescendants:i})}},39193:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).sX,o=r(34636),a=r(53787),s=r(22331).TEXTPAD,l=r(88430).toMoveInsideBar,c=r(22684).recordMinTextSize,u=r(50668),d=r(67616);function f(e){return o.isHierarchyRoot(e)?"":o.getPtId(e)}e.exports=function(e,t,r,h,p){var m=e._fullLayout,g=t[0],v=g.trace,y="icicle"===v.type,x=g.hierarchy,b=o.findEntryWithLevel(x,v.level),w=n.select(r),_=w.selectAll("g.pathbar"),k=w.selectAll("g.slice");if(!b)return _.remove(),void k.remove();var S=o.isHierarchyRoot(b),T=!m.uniformtext.mode&&o.hasTransition(h),M=o.getMaxDepth(v),C=m._size,A=v.domain,E=C.w*(A.x[1]-A.x[0]),I=C.h*(A.y[1]-A.y[0]),O=E,P=v.pathbar.thickness,R=v.marker.line.width+u.gapWithPathbar,L=v.pathbar.visible?v.pathbar.side.indexOf("bottom")>-1?I+R:-(P+R):0,j={x0:O,x1:O,y0:L,y1:L+P},D=function(e,t,r){var n=v.tiling.pad,i=function(e){return e-n<=t.x0},o=function(e){return e+n>=t.x1},a=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:o(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:o(e.x1+n)?r[0]:e.x1,y0:a(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:a(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},z=null,N={},F={},B=null,Z=function(e,t){return t?N[f(e)]:F[f(e)]},U=function(e,t,r,n){if(t)return N[f(x)]||j;var i=F[v.level]||r;return function(e){return e.data.depth-b.data.depth=(n-=(y?te:te.r)-s)){var h=(r+n)/2;r=h,n=h}var p;ae?i<(p=o-(y?te:te.b))&&p"===ee?(l.x-=o,c.x-=o,u.x-=o,d.x-=o):"/"===ee?(u.x-=o,d.x-=o,a.x-=o/2,s.x-=o/2):"\\"===ee?(l.x-=o,c.x-=o,a.x-=o/2,s.x-=o/2):"<"===ee&&(a.x-=o,s.x-=o),Q(l),Q(d),Q(a),Q(c),Q(u),Q(s),"M"+$(l.x,l.y)+"L"+$(c.x,c.y)+"L"+$(s.x,s.y)+"L"+$(u.x,u.y)+"L"+$(d.x,d.y)+"L"+$(a.x,a.y)+"Z"},toMoveInsideSlice:se,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ue,handleSlicesExit:de,hasTransition:T,strTransform:fe}):_.remove()}},94571:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(34636),s=r(22684).resizeText,l=r(74927);function c(e,t,r,n,s){var c,u,d=(s||{}).hovered,f=t.data.data,h=f.i,p=f.color,m=a.isHierarchyRoot(t),g=1;if(d)c=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(m&&p===r.root.color)g=100,c="rgba(0,0,0,0)",u=0;else if(c=o.castOption(r,h,"marker.line.color")||i.defaultLine,u=o.castOption(r,h,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var v=r.marker.depthfade;if(v){var y,x=i.combine(i.addOpacity(r._backgroundColor,.75),p);if(!0===v){var b=a.getMaxDepth(r);y=isFinite(b)?a.isLeaf(t)?0:r._maxVisibleLayers-(t.data.depth-r._entryDepth):t.data.height+1}else y=t.data.depth-r._entryDepth,r._atRootLevel||y++;if(y>0)for(var w=0;w{"use strict";var n=r(94837),i=r(10191).extendFlat,o=r(89849).axisHoverFormat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,xhoverformat:o("x"),yhoverformat:o("y"),name:i({},n.name,{description:["Sets the trace name.","The trace name appears as the legend item and on hover.","For violin traces, the name will also be used for the position","coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are","missing and the position axis is categorical.","Note that the trace name is also used as a default value","for attribute `scalegroup` (please see its description for details)."].join(" ")}),orientation:i({},n.orientation,{description:["Sets the orientation of the violin(s).","If *v* (*h*), the distribution is visualized along","the vertical (horizontal)."].join(" ")}),bandwidth:{valType:"number",min:0,editType:"calc",description:["Sets the bandwidth used to compute the kernel density estimate.","By default, the bandwidth is determined by Silverman's rule of thumb."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple violins that should be sized according to","to some metric (see `scalemode`), link them by providing a non-empty group id here","shared by every trace in the same group.","If a violin's `width` is undefined, `scalegroup` will default to the trace's name.","In this case, violins with the same names will be linked together"].join(" ")},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc",description:["Sets the metric by which the width of each violin is determined.","*width* means each violin has the same (max) width","*count* means the violins are scaled by the number of sample points making","up each violin."].join(" ")},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc",description:["Sets the method by which the span in data space where the density function will be computed.","*soft* means the span goes from the sample's minimum value minus two bandwidths","to the sample's maximum value plus two bandwidths.","*hard* means the span goes from the sample's minimum to its maximum value.","For custom span settings, use mode *manual* and fill in the `span` attribute."].join(" ")},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the span in data space for which the density function will be computed.","Has an effect only when `spanmode` is set to *manual*."].join(" ")},line:{color:{valType:"color",editType:"style",description:"Sets the color of line bounding the violin(s)."},width:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the width (in px) of line bounding the violin(s)."},editType:"plot"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{description:["If *outliers*, only the sample points lying outside the whiskers","are shown","If *suspectedoutliers*, the outlier points are shown and","points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1","are highlighted (see `outliercolor`)","If *all*, all sample points are shown","If *false*, only the violins are shown with no sample points.","Defaults to *suspectedoutliers* when `marker.outliercolor` or","`marker.line.outliercolor` is set,","otherwise defaults to *outliers*."].join(" ")}),jitter:i({},n.jitter,{description:["Sets the amount of jitter in the sample points drawn.","If *0*, the sample points align along the distribution axis.","If *1*, the sample points are drawn in a random jitter of width","equal to the width of the violins."].join(" ")}),pointpos:i({},n.pointpos,{description:["Sets the position of the sample points in relation to the violins.","If *0*, the sample points are places over the center of the violins.","Positive (negative) values correspond to positions to the","right (left) for vertical violins and above (below) for horizontal violins."].join(" ")}),width:i({},n.width,{description:["Sets the width of the violin in data coordinates.","If *0* (default value) the width is automatically selected based on the positions","of other violin traces in the same subplot."].join(" ")}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,quartilemethod:n.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines if an miniature box plot is drawn inside the violins. "].join(" ")},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot",description:["Sets the width of the inner box plots relative to","the violins' width.","For example, with 1, the inner box plots are as wide as the violins."].join(" ")},fillcolor:{valType:"color",editType:"style",description:"Sets the inner box plot fill color."},line:{color:{valType:"color",editType:"style",description:"Sets the inner box plot bounding line color."},width:{valType:"number",min:0,editType:"style",description:"Sets the inner box plot bounding line width."},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines if a line corresponding to the sample's mean is shown","inside the violins.","If `box.visible` is turned on, the mean line is drawn inside the inner box.","Otherwise, the mean line is drawn from one side of the violin to other."].join(" ")},color:{valType:"color",editType:"style",description:"Sets the mean line color."},width:{valType:"number",min:0,editType:"style",description:"Sets the mean line width."},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc",description:["Determines on which side of the position value the density function making up","one half of a violin is plotted.","Useful when comparing two violin traces under *overlay* mode, where one trace","has `side` set to *positive* and the other to *negative*."].join(" ")},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",description:["Do the hover effects highlight individual violins","or sample points or the kernel density estimate or any combination of them?"].join(" ")}}},99130:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(90497),a=r(56332),s=r(24956).BADNUM;function l(e,t,r){var i=t.max-t.min;if(!i)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,i/1e4);var o=r.length,a=n.stdev(r,o-1,t.mean);return Math.max(function(e,t,r){return 1.059*Math.min(t,r/1.349)*Math.pow(e,-.2)}(o,a,t.q3-t.q1),i/100)}function c(e,t,r,n){var o,a=e.spanmode,l=e.span||[],c=[t.min,t.max],u=[t.min-2*n,t.max+2*n];function d(n){var i=l[n],o="multicategory"===r.type?r.r2c(i):r.d2c(i,0,e[t.valLetter+"calendar"]);return o===s?u[n]:o}var f={type:"linear",range:o="soft"===a?u:"hard"===a?c:[d(0),d(1)]};return i.setConvert(f),f.cleanRange(),o}e.exports=function(e,t){var r=o(e,t);if(r[0].t.empty)return r;for(var s=e._fullLayout,u=i.getFromId(e,t["h"===t.orientation?"xaxis":"yaxis"]),d=1/0,f=-1/0,h=0,p=0,m=0;m{"use strict";var n=r(27203).setPositionOffset,i=["v","h"];e.exports=function(e,t){for(var r=e.calcdata,o=t.xaxis,a=t.yaxis,s=0;s{"use strict";var n=r(53787),i=r(66235),o=r(5580),a=r(46830);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}function c(r,i){return n.coerce2(e,t,a,r,i)}if(o.handleSampleDefaults(e,t,l,s),!1!==t.visible){l("bandwidth"),l("side"),l("width")||(l("scalegroup",t.name),l("scalemode"));var u,d=l("span");Array.isArray(d)&&(u="manual"),l("spanmode",u);var f=l("line.color",(e.marker||{}).color||r),h=l("line.width"),p=l("fillcolor",i.addOpacity(t.line.color,.5));o.handlePointsDefaults(e,t,l,{prefix:""});var m=c("box.width"),g=c("box.fillcolor",p),v=c("box.line.color",f),y=c("box.line.width",h);l("box.visible",Boolean(m||g||v||y))||(t.box={visible:!1});var x=c("meanline.color",f),b=c("meanline.width",h);l("meanline.visible",Boolean(x||b))||(t.meanline={visible:!1}),l("quartilemethod")}}},56332:(e,t,r)=>{"use strict";var n=r(53787),i=function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)};t.makeKDE=function(e,t,r){var n=r.length,o=i,a=e.bandwidth,s=1/(n*a);return function(e){for(var t=0,i=0;i{"use strict";var n=r(66235),i=r(53787),o=r(28605),a=r(86333),s=r(56332);e.exports=function(e,t,r,l,c){c||(c={});var u,d,f=c.hoverLayer,h=e.cd,p=h[0].trace,m=p.hoveron,g=-1!==m.indexOf("violins"),v=-1!==m.indexOf("kde"),y=[];if(g||v){var x=a.hoverOnBoxes(e,t,r,l);if(v&&x.length>0){var b,w,_,k,S,T=e.xa,M=e.ya;"h"===p.orientation?(S=t,b="y",_=M,w="x",k=T):(S=r,b="x",_=T,w="y",k=M);var C=h[e.index];if(S>=C.span[0]&&S<=C.span[1]){var A=i.extendFlat({},e),E=k.c2p(S,!0),I=s.getKdeValue(C,p,S),O=s.getPositionOnKdePath(C,p,E),P=_._offset,R=_._length;A[b+"0"]=O[0],A[b+"1"]=O[1],A[w+"0"]=A[w+"1"]=E,A[w+"Label"]=w+": "+o.hoverLabelText(k,S,p[w+"hoverformat"])+", "+h[0].t.labels.kde+" "+I.toFixed(3);for(var L=0,j=0;j{"use strict";e.exports={attributes:r(46830),layoutAttributes:r(24476),supplyDefaults:r(81626),crossTraceDefaults:r(5580).crossTraceDefaults,supplyLayoutDefaults:r(91119),calc:r(99130),crossTraceCalc:r(95556),plot:r(97051),style:r(57961),styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(59750),selectPoints:r(1118),moduleType:"trace",name:"violin",basePlotModule:r(48206),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{description:["In vertical (horizontal) violin plots,","statistics are computed using `y` (`x`) values.","By supplying an `x` (`y`) array, one violin per distinct x (y) value","is drawn","If no `x` (`y`) {array} is provided, a single violin is drawn.","That violin position is then positioned with","with `name` or with `x0` (`y0`) if provided."].join(" ")}}},24476:(e,t,r)=>{"use strict";var n=r(56335),i=r(53787).extendFlat;e.exports={violinmode:i({},n.boxmode,{description:["Determines how violins at the same location coordinate","are displayed on the graph.","If *group*, the violins are plotted next to one another","centered around the shared location.","If *overlay*, the violins are plotted over one another,","you might need to set *opacity* to see them multiple violins.","Has no effect on traces that have *width* set."].join(" ")}),violingap:i({},n.boxgap,{description:["Sets the gap (in plot fraction) between violins of","adjacent location coordinates.","Has no effect on traces that have *width* set."].join(" ")}),violingroupgap:i({},n.boxgroupgap,{description:["Sets the gap (in plot fraction) between violins of","the same location coordinate.","Has no effect on traces that have *width* set."].join(" ")})}},91119:(e,t,r)=>{"use strict";var n=r(53787),i=r(24476),o=r(65235);e.exports=function(e,t,r){o._supply(e,t,r,(function(r,o){return n.coerce(e,t,i,r,o)}),"violin")}},97051:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(96710),s=r(84542),l=r(56332);e.exports=function(e,t,r,c){var u=e._context.staticPlot,d=e._fullLayout,f=t.xaxis,h=t.yaxis;function p(e,t){var r=s(e,{xaxis:f,yaxis:h,trace:t,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return o.smoothopen(r[0],1)}i.makeTraceGroups(c,r,"trace violins").each((function(e){var r=n.select(this),o=e[0],s=o.t,c=o.trace;if(!0!==c.visible||s.empty)r.remove();else{var m=s.bPos,g=s.bdPos,v=t[s.valLetter+"axis"],y=t[s.posLetter+"axis"],x="both"===c.side,b=x||"positive"===c.side,w=x||"negative"===c.side,_=r.selectAll("path.violin").data(i.identity);_.enter().append("path").style("vector-effect",u?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each((function(e){var t,r,i,o,a,l,u,f,h=n.select(this),_=e.density,k=_.length,S=y.c2l(e.pos+m,!0),T=y.l2p(S);if(c.width)t=s.maxKDE/g;else{var M=d._violinScaleGroupStats[c.scalegroup];t="count"===c.scalemode?M.maxKDE/g*(M.maxCount/e.pts.length):M.maxKDE/g}if(b){for(u=new Array(k),a=0;a{"use strict";var n=r(8996),i=r(66235),o=r(5196).stylePoints;e.exports=function(e){var t=n.select(e).selectAll("g.trace.violins");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(t){var r=t[0].trace,a=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",l.width+"px").call(i.stroke,l.color).call(i.fill,s.fillcolor);var d={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(d).call(i.stroke,c.color),a.selectAll("path.meanline").style(d).call(i.stroke,c.color),o(a,r,e)}))}},41688:(e,t,r)=>{"use strict";var n=r(8753),i=r(93720),o=r(72547),a=r(27231),s=r(10191).extendFlat,l=r(18693).overrideAll,c=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,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 1 meaning that they are entirely shaded. Applying a `fill` ratio less","than one would allow the creation of openings parallel to the edges."].join(" ")}},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:o.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},a.hoverinfo),showlegend:s({},a.showlegend,{dflt:!1})}),"calc","nested");c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},34014:(e,t,r)=>{"use strict";var n=r(13084).gl_mesh3d,i=r(95049).parseColorScale,o=r(55115),a=r(10948).extractOpts,s=r(51577),l=r(90648).findNearestOnAxis,c=r(90648).generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var d=u.prototype;d.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],o=this.data._Ys.length,a=this.data._Zs.length,s=l(r,this.data._Xs).id,c=l(n,this.data._Ys).id,u=l(i,this.data._Zs).id,d=e.index=u+a*c+a*o*s;e.traceCoordinate=[this.data._meshX[d],this.data._meshY[d],this.data._meshZ[d],this.data._value[d]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[d]?e.textLabel=f[d]:f&&(e.textLabel=f),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=c(e);var l={positions:s(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=a(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(e,t){var r=e.glplot.gl,i=n({gl:r}),o=new u(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}},66226:(e,t,r)=>{"use strict";var n=r(53787),i=r(41688),o=r(25430).supplyIsoDefaults,a=r(10).opacityscaleDefaults;e.exports=function(e,t,r,s){function l(r,o){return n.coerce(e,t,i,r,o)}o(e,t,r,s,l),a(e,t,s,l)}},10001:(e,t,r)=>{"use strict";e.exports={attributes:r(41688),supplyDefaults:r(66226),calc:r(81139),colorbar:{min:"cmin",max:"cmax"},plot:r(34014),moduleType:"trace",name:"volume",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws volume trace between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}},90508:(e,t,r)=>{"use strict";var n=r(8222),i=r(37471).line,o=r(27231),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(81348),u=r(10191).extendFlat,d=r(66235);function f(e){return{marker:{color:u({},n.marker.color,{arrayOk:!1,editType:"style",description:"Sets the marker color of all "+e+" values."}),line:{color:u({},n.marker.line.color,{arrayOk:!1,editType:"style",description:"Sets the line color of all "+e+" values."}),width:u({},n.marker.line.width,{arrayOk:!1,editType:"style",description:"Sets the line width of all "+e+" values."}),editType:"style"},editType:"style"},editType:"style"}}e.exports={measure:{valType:"data_array",dflt:[],editType:"calc",description:["An array containing types of values.","By default the values are considered as 'relative'.","However; it is possible to use 'total' to compute the sums.","Also 'absolute' could be applied to reset the computed total","or to declare an initial value where needed."].join(" ")},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc",description:["Sets where the bar base is drawn (in position axis units)."].join(" ")},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:a("x"),yhoverformat:a("y"),hovertext:n.hovertext,hovertemplate:s({},{keys:c.eventDataKeys}),hoverinfo:u({},o.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1,description:["Determines which trace information appear on the graph.","In the case of having multiple waterfalls, totals","are computed separately (per trace)."].join(" ")},texttemplate:l({editType:"plot"},{keys:c.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:f("increasing"),decreasing:f("decreasing"),totals:f("intermediate sums and total"),connector:{line:{color:u({},i.color,{dflt:d.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot",description:["Sets the shape of connector lines."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if connector lines are drawn. "].join(" ")},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},91184:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(53787).mergeArray,a=r(35637),s=r(24956).BADNUM;function l(e){return"a"===e||"absolute"===e}function c(e){return"t"===e||"total"===e}e.exports=function(e,t){var r,u,d,f,h,p,m=n.getFromId(e,t.xaxis||"x"),g=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=m.makeCalcdata(t,"x"),d=g.makeCalcdata(t,"y"),f=i(t,g,"y",d),h=!!t.yperiodalignment,p="y"):(r=g.makeCalcdata(t,"y"),d=m.makeCalcdata(t,"x"),f=i(t,m,"x",d),h=!!t.xperiodalignment,p="x"),u=f.vals;for(var v,y=Math.min(u.length,r.length),x=new Array(y),b=0,w=!1,_=0;_{"use strict";e.exports={eventDataKeys:["initial","delta","final"]}},69054:(e,t,r)=>{"use strict";var n=r(39713).setGroupPositions;e.exports=function(e,t){var r,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],f=[];for(i=0;i{"use strict";var n=r(53787),i=r(25305),o=r(6099).handleText,a=r(89016),s=r(17239),l=r(90508),c=r(66235),u=r(59933),d=u.INCREASING.COLOR,f=u.DECREASING.COLOR;function h(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",c.defaultLine),e(t+".marker.line.width")}e.exports={supplyDefaults:function(e,t,r,i){function c(r,i){return n.coerce(e,t,l,r,i)}if(a(e,t,i,c)){s(e,t,i,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var u=c("textposition");if(o(e,t,i,c,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),t.texttemplate||c("textinfo")),h(c,"increasing",d),h(c,"decreasing",f),h(c,"totals","#4499FF"),c("connector.visible"))c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,o;function a(e){return n.coerce(o._input,o,l,e)}if("group"===t.waterfallmode)for(var s=0;s{"use strict";e.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},43723:(e,t,r)=>{"use strict";var n=r(28605).hoverLabelText,i=r(66235).opacity,o=r(48363).hoverOnBars,a=r(59933),s=a.INCREASING.SYMBOL,l=a.DECREASING.SYMBOL;e.exports=function(e,t,r,a,c){var u=o(e,t,r,a,c);if(u){var d=u.cd,f=d[0].trace,h="h"===f.orientation,p=h?"x":"y",m=h?e.xa:e.ya,g=d[u.index],v=g.isSum?g.b+g.s:g.rawS;u.initial=g.b+g.s-v,u.delta=v,u.final=u.initial+u.delta;var y=S(Math.abs(u.delta));u.deltaLabel=v<0?"("+y+")":y,u.finalLabel=S(u.final),u.initialLabel=S(u.initial);var x=g.hi||f.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var w="all"===x,_=x.split("+"),k=function(e){return w||-1!==_.indexOf(e)};g.isSum||(!k("final")||k(h?"x":"y")||b.push(u.finalLabel),k("delta")&&(v<0?b.push(u.deltaLabel+" "+l):b.push(u.deltaLabel+" "+s)),k("initial")&&b.push("Initial: "+u.initialLabel))}return b.length&&(u.extraText=b.join("
")),u.color=function(e,t){var r=e[t.dir].marker,n=r.color,o=r.line.color,a=r.line.width;if(i(n))return n;if(i(o)&&a)return o}(f,g),[u]}function S(e){return n(m,e,f[p+"hoverformat"])}}},83696:(e,t,r)=>{"use strict";e.exports={attributes:r(90508),layoutAttributes:r(2810),supplyDefaults:r(75431).supplyDefaults,crossTraceDefaults:r(75431).crossTraceDefaults,supplyLayoutDefaults:r(28654),calc:r(91184),crossTraceCalc:r(69054),plot:r(13474),style:r(5037).style,hoverPoints:r(43723),eventData:r(24050),selectPoints:r(22145),moduleType:"trace",name:"waterfall",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Draws waterfall trace which is useful graph to displays the","contribution of various elements (either positive or negative)","in a bar chart. The data visualized by the span of the bars is","set in `y` if `orientation` is set to *v* (the default) and the","labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}},2810:e=>{"use strict";e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},waterfallgap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},28654:(e,t,r)=>{"use strict";var n=r(53787),i=r(2810);e.exports=function(e,t,r){var o=!1;function a(r,o){return n.coerce(e,t,i,r,o)}for(var s=0;s{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(24956).BADNUM,s=r(88430),l=r(22684).clearMinTextSize;e.exports=function(e,t,r,c){var u=e._fullLayout;l("waterfall",u),s.plot(e,t,r,c,{mode:u.waterfallmode,norm:u.waterfallmode,gap:u.waterfallgap,groupgap:u.waterfallgroupgap}),function(e,t,r,s){var l=t.xaxis,c=t.yaxis;i.makeTraceGroups(s,r,"trace bars").each((function(r){var s=n.select(this),u=r[0].trace,d=i.ensureSingle(s,"g","lines");if(u.connector&&u.connector.visible){var f="h"===u.orientation,h=u.connector.mode,p=d.selectAll("g.line").data(i.identity);p.enter().append("g").classed("line",!0),p.exit().remove();var m=p.size();p.each((function(r,s){if(s===m-1||r.cNext){var u=function(e,t,r,n){var i=[],o=[],a=n?t:r,s=n?r:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),n?[i,o]:[o,i]}(r,l,c,f),d=u[0],p=u[1],g="";d[0]!==a&&p[0]!==a&&d[1]!==a&&p[1]!==a&&("spanning"===h&&!r.isSum&&s>0&&(g+=f?"M"+d[0]+","+p[1]+"V"+p[0]:"M"+d[1]+","+p[0]+"H"+d[0]),"between"!==h&&(r.isSum||s{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(26880).DESELECTDIM,s=r(29527),l=r(22684).resizeText,c=s.styleTextPoints;e.exports={style:function(e,t,r){var s=r||n.select(e).selectAll("g.waterfalllayer").selectAll("g.trace");l(e,s,"waterfall"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var r=n.select(this),s=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;n.select(this).call(o.fill,t.color).call(o.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(r,s,e),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},6377:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(94043),a=r(95355).p,s=r(24956).BADNUM;t.moduleType="transform",t.name="aggregate";var l=t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this aggregate transform is enabled or disabled."].join(" ")},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the grouping target to which the aggregation is applied.","Data points with matching group values will be coalesced into","one point, using the supplied aggregation functions to reduce data","in other data arrays.","If a string, `groups` is assumed to be a reference to a data array","in the parent trace object.","To aggregate by nested variables, use *.* to access them.","For example, set `groups` to *marker.color* to aggregate","about the marker color array.","If an array, `groups` is itself the data array by which we aggregate."].join(" ")},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc",description:["A reference to the data array in the parent trace to aggregate.","To aggregate by nested variables, use *.* to access them.","For example, set `groups` to *marker.color* to aggregate","over the marker color array.","The referenced array must already exist, unless `func` is *count*,","and each array may only be referenced once."].join(" ")},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc",description:["Sets the aggregation function.","All values from the linked `target`, corresponding to the same value","in the `groups` array, are collected and reduced by this function.","*count* is simply the number of values in the `groups` array, so does","not even require the linked array to exist. *first* (*last*) is just","the first (last) linked value.","Invalid values are ignored, so for example in *avg* they do not","contribute to either the numerator or the denominator.","Any data type (numeric, date, category) may be aggregated with any","function, even though in certain cases it is unlikely to make sense,","for example a sum of dates or average of categories.","*median* will return the average of the two central values if there is","an even count. *mode* will return the first value to reach the maximum","count, in case of a tie.","*change* will return the difference between the first and last linked values.","*range* will return the difference between the min and max linked values."].join(" ")},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc",description:["*stddev* supports two formula variants: *sample* (normalize by N-1)","and *population* (normalize by N)."].join(" ")},enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this aggregation function is enabled or disabled."].join(" ")},editType:"calc"},editType:"calc"},c=l.aggregations;function u(e,t,r,o){if(o.enabled){for(var a=o.target,l=i.nestedProperty(t,a),c=l.get(),u=function(e,t){var r=e.func,n=t.d2c,o=t.c2d;switch(r){case"count":return d;case"first":return f;case"last":return h;case"sum":return function(e,t){for(var r=0,i=0;ii&&(i=u,a=c)}}return i?o(a):s};case"rms":return function(e,t){for(var r=0,i=0,a=0;a{"use strict";var n=r(53787),i=r(44049),o=r(28605),a=r(95355).p,s=r(81494),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;t.moduleType="transform",t.name="filter",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this filter transform is enabled or disabled."].join(" ")},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the filter target by which the filter is applied.","If a string, `target` is assumed to be a reference to a data array","in the parent trace object.","To filter about nested variables, use *.* to access them.","For example, set `target` to *marker.color* to filter","about the marker color array.","If an array, `target` is then the data array by which the filter is applied."].join(" ")},operation:{valType:"enumerated",values:[].concat(l).concat(c).concat(u),dflt:"=",editType:"calc",description:["Sets the filter operation.","*=* keeps items equal to `value`","*!=* keeps items not equal to `value`","*<* keeps items less than `value`","*<=* keeps items less than or equal to `value`","*>* keeps items greater than `value`","*>=* keeps items greater than or equal to `value`","*[]* keeps items inside `value[0]` to `value[1]` including both bounds","*()* keeps items inside `value[0]` to `value[1]` excluding both bounds","*[)* keeps items inside `value[0]` to `value[1]` including `value[0]` but excluding `value[1]","*(]* keeps items inside `value[0]` to `value[1]` excluding `value[0]` but including `value[1]","*][* keeps items outside `value[0]` to `value[1]` and equal to both bounds","*)(* keeps items outside `value[0]` to `value[1]`","*](* keeps items outside `value[0]` to `value[1]` and equal to `value[0]`","*)[* keeps items outside `value[0]` to `value[1]` and equal to `value[1]`","*{}* keeps items present in a set of values","*}{* keeps items not present in a set of values"].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values by which to filter.","Values are expected to be in the same type as the data linked","to `target`.","When `operation` is set to one of","the comparison values ("+l+")","`value` is expected to be a number or a string.","When `operation` is set to one of the interval values","("+c+")","`value` is expected to be 2-item array where the first item","is the lower bound and the second item is the upper bound.","When `operation`, is set to one of the set values","("+u+")","`value` is expected to be an array with as many items as","the desired set elements."].join(" ")},preservegaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps in data arrays produced by the filter operation","are preserved.","Setting this to *true* might be useful when plotting a line chart","with `connectgaps` set to *false*."].join(" ")},editType:"calc"},t.supplyDefaults=function(e){var r={};function o(i,o){return n.coerce(e,r,t.attributes,i,o)}if(o("enabled")){var a=o("target");if(n.isArrayOrTypedArray(a)&&0===a.length)return r.enabled=!1,r;o("preservegaps"),o("operation"),o("value");var s=i.getComponentMethod("calendars","handleDefaults");s(e,r,"valuecalendar",null),s(e,r,"targetcalendar",null)}return r},t.calcTransform=function(e,t,r){if(r.enabled){var i=n.getTargetArray(t,r);if(i){var s=r.target,d=i.length;t._length&&(d=Math.min(d,t._length));var f=r.targetcalendar,h=t._arrayAttrs,p=r.preservegaps;if("string"===typeof s){var m=n.nestedProperty(t,s+"calendar").get();m&&(f=m)}var g,v,y=function(e,t,r){var n=e.operation,i=e.value,o=Array.isArray(i);function a(e){return-1!==e.indexOf(n)}var s,d=function(r){return t(r,0,e.valuecalendar)},f=function(e){return t(e,0,r)};a(l)?s=d(o?i[0]:i):a(c)?s=o?[d(i[0]),d(i[1])]:[d(i),d(i)]:a(u)&&(s=o?i.map(d):[d(i)]);switch(n){case"=":return function(e){return f(e)===s};case"!=":return function(e){return f(e)!==s};case"<":return function(e){return f(e)":return function(e){return f(e)>s};case">=":return function(e){return f(e)>=s};case"[]":return function(e){var t=f(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=f(e);return t>s[0]&&t=s[0]&&ts[0]&&t<=s[1]};case"][":return function(e){var t=f(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=f(e);return ts[1]};case"](":return function(e){var t=f(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=f(e);return t=s[1]};case"{}":return function(e){return-1!==s.indexOf(f(e))};case"}{":return function(e){return-1===s.indexOf(f(e))}}}(r,o.getDataToCoordFunc(e,t,s,i),f),x={},b={},w=0;p?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},v=function(e,t){var r=x[e.astr][t];e.get().push(r)}),S(g);for(var _=a(t.transforms,r),k=0;k{"use strict";var n=r(53787),i=r(94043),o=r(44115),a=r(95355).p;function s(e,t){var r,s,l,c,u,d,f,h,p,m,g=t.transform,v=t.transformIndex,y=e.transforms[v].groups,x=a(e.transforms,g);if(!n.isArrayOrTypedArray(y)||0===y.length)return[e];var b=n.filterUnique(y),w=new Array(b.length),_=y.length,k=i.findArrayAttributes(e),S=g.styles||[],T={};for(r=0;r1?"%{group} (%{trace})":"%{group}");var l=e.styles,c=a.styles=[];if(l)for(o=0;o{"use strict";t.p=function(e,t){for(var r,n,i=0;i{"use strict";var n=r(53787),i=r(28605),o=r(95355).p,a=r(24956).BADNUM;t.moduleType="transform",t.name="sort",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this sort transform is enabled or disabled."].join(" ")},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the target by which the sort transform is applied.","If a string, *target* is assumed to be a reference to a data array","in the parent trace object.","To sort about nested variables, use *.* to access them.","For example, set `target` to *marker.size* to sort","about the marker size array.","If an array, *target* is then the data array by which","the sort transform is applied."].join(" ")},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc",description:["Sets the sort transform order."].join(" ")},editType:"calc"},t.supplyDefaults=function(e){var r={};function i(i,o){return n.coerce(e,r,t.attributes,i,o)}return i("enabled")&&(i("target"),i("order")),r},t.calcTransform=function(e,t,r){if(r.enabled){var s=n.getTargetArray(t,r);if(s){var l=r.target,c=s.length;t._length&&(c=Math.min(c,t._length));var u,d,f=t._arrayAttrs,h=function(e,t,r,n){var i,o=new Array(n),s=new Array(n);for(i=0;i{"use strict";t.version="2.27.1"},13084:e=>{var t;self,t=function(){return function(){var e={7386:function(e,t,r){e.exports={alpha_shape:r(2350),convex_hull:r(5537),delaunay_triangulate:r(4419),gl_cone3d:r(1140),gl_error3d:r(3110),gl_heatmap2d:r(6386),gl_line3d:r(6086),gl_mesh3d:r(8116),gl_plot2d:r(2117),gl_plot3d:r(1059),gl_pointcloud2d:r(8271),gl_scatter3d:r(2182),gl_select_box:r(6623),gl_spikes2d:r(3050),gl_streamtube3d:r(7307),gl_surface3d:r(3754),ndarray:r(5050),ndarray_linear_interpolate:r(3581)}},2146:function(e,t,r){"use strict";function n(e,t){for(var r=0;rf)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return v(e)}return m(e,t,r)}function m(e,t,r){if("string"===typeof e)return function(e,t){if("string"===typeof t&&""!==t||(t="utf8"),!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=h(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e));if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return x(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return x(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return p.from(n,t,r);var i=function(e){if(p.isBuffer(e)){var t=0|b(e.length),r=h(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!==typeof e.length||re(e.length)?h(0):y(e):"Buffer"===e.type&&Array.isArray(e.data)?y(e.data):void 0}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function v(e){return g(e),h(e<0?0:0|b(e))}function y(e){for(var t=e.length<0?0:0|b(e.length),r=h(t),n=0;n=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function w(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function k(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function S(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),re(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=p.from(t,n)),p.isBuffer(t))return 0===t.length?-1:T(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):T(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o,a=t.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,u=void 0,d=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128===(192&(l=e[i+1]))&&(d=(31&o)<<6|63&l)>127&&(a=d);break;case 3:l=e[i+1],c=e[i+2],128===(192&l)&&128===(192&c)&&(d=(15&o)<<12|(63&l)<<6|63&c)>2047&&(d<55296||d>57343)&&(a=d);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&d<1114112&&(a=d)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?(p.isBuffer(o)||(o=p.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!p.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},p.byteLength=w,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},d&&(p.prototype[d]=p.prototype.inspect),p.prototype.compare=function(e,t,r,n,i){if(te(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function L(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,r,n,i,o){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i){Y(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function Z(e,t,r,n,i){Y(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,4),u.write(e,t,r,n,23,4),r+4}function H(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,8),u.write(e,t,r,n,52,8),r+8}p.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},p.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},p.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||N(e,4,this.length),u.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),u.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),u.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),u.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ie((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ie((function(e){return Z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},p.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},p.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ie((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ie((function(e){return Z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,r){return V(this,e,t,!0,r)},p.prototype.writeFloatBE=function(e,t,r){return V(this,e,t,!1,r)},p.prototype.writeDoubleLE=function(e,t,r){return H(this,e,t,!0,r)},p.prototype.writeDoubleBE=function(e,t,r){return H(this,e,t,!1,r)},p.prototype.copy=function(e,t,r,n){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function Y(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,r){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,o)}function X(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw X(e,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(l(t))}),TypeError),G("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=q(String(r)):"bigint"===typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=q(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function J(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,r,n){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function re(e){return e!==e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();function ie(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},2321:function(e){"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;var o=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},3910:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),u=0,d=l>0?a-4:a;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3187:function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},1152:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=n(),d=i(),f=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,t,r,s),new a({turntable:u,orbit:d,matrix:f},c)};var n=r(3440),i=r(7774),o=r(9298);function a(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.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=a.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r0?c=c.ushln(d):d<0&&(u=u.ushln(-d)),s(c,u)}},234:function(e,t,r){"use strict";var n=r(3218);e.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},4275:function(e,t,r){"use strict";var n=r(1928);e.exports=function(e){return e.cmp(new n(0))}},9958:function(e,t,r){"use strict";var n=r(4275);e.exports=function(e){var t=e.length,r=e.words,i=0;if(1===t)i=r[0];else if(2===t)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},3218:function(e,t,r){"use strict";r(1928),e.exports=function(e){return e&&"object"===typeof e&&Boolean(e.words)}},5514:function(e,t,r){"use strict";var n=r(1928),i=r(8362);e.exports=function(e){var t=i.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},8524:function(e,t,r){"use strict";var n=r(5514),i=r(4275);e.exports=function(e,t){var r=i(e),o=i(t);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(e=e.neg(),t=t.neg());var a=e.gcd(t);return a.cmpn(1)?[e.div(a),t.div(a)]:[e,t]}},2813:function(e,t,r){"use strict";var n=r(1928);e.exports=function(e){return new n(e)}},3962:function(e,t,r){"use strict";var n=r(8524);e.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},4951:function(e,t,r){"use strict";var n=r(4275);e.exports=function(e){return n(e[0])*n(e[1])}},4354:function(e,t,r){"use strict";var n=r(8524);e.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},7999:function(e,t,r){"use strict";var n=r(9958),i=r(1112);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var o=t.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(f=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var d=r.bitLength()-l.bitLength()+53,f=n(l.ushln(d).divRound(r));return d<1023?c*f*Math.pow(2,-d):c*(f*=Math.pow(2,-1023))*Math.pow(2,1023-d)}},5070:function(e){"use strict";function t(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>=0?(o=a,i=a-1):n=a+1}return o}function r(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>0?(o=a,i=a-1):n=a+1}return o}function n(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<0?(o=a,n=a+1):i=a-1}return o}function i(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<=0?(o=a,n=a+1):i=a-1}return o}function o(e,t,r,n,i){for(;n<=i;){var o=n+i>>>1,a=e[o],s=void 0!==r?r(a,t):a-t;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(e,t,r,n,i,o){return"function"===typeof r?o(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,o){return a(e,r,n,i,o,t)},gt:function(e,t,n,i,o){return a(e,t,n,i,o,r)},lt:function(e,t,r,i,o){return a(e,t,r,i,o,n)},le:function(e,t,r,n,o){return a(e,t,r,n,o,i)},eq:function(e,t,r,n,i){return a(e,t,r,n,i,o)}}},2288:function(e,t){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},1928:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(6601).Buffer}catch(T){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","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"],d=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,x=0|a[3],b=8191&x,w=x>>>13,_=0|a[4],k=8191&_,S=_>>>13,T=0|a[5],M=8191&T,C=T>>>13,A=0|a[6],E=8191&A,I=A>>>13,O=0|a[7],P=8191&O,R=O>>>13,L=0|a[8],j=8191&L,D=L>>>13,z=0|a[9],N=8191&z,F=z>>>13,B=0|s[0],Z=8191&B,U=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,G=0|s[2],q=8191&G,Y=G>>>13,X=0|s[3],K=8191&X,$=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(d,Z))|0)+((8191&(i=(i=Math.imul(d,U))+Math.imul(f,Z)|0))<<13)|0;c=((o=Math.imul(f,U))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,Z),i=(i=Math.imul(p,U))+Math.imul(m,Z)|0,o=Math.imul(m,U);var ve=(c+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;c=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,Z),i=(i=Math.imul(v,U))+Math.imul(y,Z)|0,o=Math.imul(y,U),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var ye=(c+(n=n+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,q)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(b,Z),i=(i=Math.imul(b,U))+Math.imul(w,Z)|0,o=Math.imul(w,U),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,Y)|0;var xe=(c+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(k,Z),i=(i=Math.imul(k,U))+Math.imul(S,Z)|0,o=Math.imul(S,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,$)|0;var be=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,Z),i=(i=Math.imul(M,U))+Math.imul(C,Z)|0,o=Math.imul(C,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,Z),i=(i=Math.imul(E,U))+Math.imul(I,Z)|0,o=Math.imul(I,U),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,Z),i=(i=Math.imul(P,U))+Math.imul(R,Z)|0,o=Math.imul(R,U),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,U))+Math.imul(D,Z)|0,o=Math.imul(D,U),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Se=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,U))+Math.imul(F,Z)|0,o=Math.imul(F,U),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Te=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,W))+Math.imul(F,H)|0,o=Math.imul(F,W),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,Y))+Math.imul(F,q)|0,o=Math.imul(F,Y),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,$)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,fe)|0;var Ce=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(F,K)|0,o=Math.imul(F,$),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ae=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Ee=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ie=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(N,oe),i=(i=Math.imul(N,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Oe=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,le),i=(i=Math.imul(N,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),n=n+Math.imul(j,de)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,de),i=(i=Math.imul(N,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=xe,l[4]=be,l[5]=we,l[6]=_e,l[7]=ke,l[8]=Se,l[9]=Te,l[10]=Me,l[11]=Ce,l[12]=Ae,l[13]=Ee,l[14]=Ie,l[15]=Oe,l[16]=Pe,l[17]=Re,l[18]=Le,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(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 w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(x,y),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),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)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},2692:function(e){"use strict";e.exports=function(e){var t,r,n,i=e.length,o=0;for(t=0;t>>1;if(!(u<=0)){var d,f=i.mallocDouble(2*u*s),h=i.mallocInt32(s);if((s=l(e,u,f,h))>0){if(1===u&&n)o.init(s),d=o.sweepComplete(u,r,0,s,f,h,0,s,f,h);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(t,u,p,m))>0&&(o.init(s+c),d=1===u?o.sweepBipartite(u,r,0,s,f,h,0,c,p,m):a(u,r,n,s,f,h,c,p,m),i.free(p),i.free(m))}i.free(f),i.free(h)}return d}}}function u(e,t){n.push([e,t])}},7333:function(e,t){"use strict";function r(e){return e?function(e,t,r,n,i,o,a,s,l,c,u){return i-n>l-s?function(e,t,r,n,i,o,a,s,l,c,u){for(var d=2*e,f=n,h=d*n;fc-l?n?function(e,t,r,n,i,o,a,s,l,c,u){for(var d=2*e,f=n,h=d*n;f0;){var L=(P-=1)*b,j=_[L],D=_[L+1],z=_[L+2],N=_[L+3],F=_[L+4],B=_[L+5],Z=P*w,U=k[Z],V=k[Z+1],H=1&B,W=!!(16&B),G=u,q=C,Y=E,X=I;if(H&&(G=E,q=I,Y=u,X=C),!(2&B&&D>=(z=g(e,j,D,z,G,q,V)))&&!(4&B&&(D=v(e,j,D,z,G,q,U))>=z)){var K=z-D,$=F-N;if(W){if(e*K*(K+$)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,f=2*e,h=d,p=s[f*d+t];c=x?(h=y,p=x):v>=w?(h=g,p=v):(h=b,p=w):x>=w?(h=y,p=x):w>=v?(h=g,p=v):(h=b,p=w);for(var _=f*(u-1),k=f*h,S=0;Sr&&i[d+t]>c;--u,d-=a){for(var f=d,h=d+a,p=0;pf;++f,l+=s)if(i[l+d]===a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"lof;++f,l+=s)if(i[l+d]h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"lo<=p0":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=e+t,f=r;n>f;++f,l+=s)if(i[l+d]<=a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"hi<=p0":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=e+t,f=r;n>f;++f,l+=s)if(i[l+d]<=a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"loh;++h,l+=s){var p=i[l+d],m=i[l+f];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=o[h];o[h]=o[u],o[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=t,f=e+t,h=r;n>h;++h,l+=s){var p=i[l+d],m=i[l+f];if(p<=a&&a<=m)if(u===h)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=o[h];o[h]=o[u],o[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,o,a,s){for(var l=2*e,c=l*r,u=c,d=r,f=t,h=e+t,p=r;n>p;++p,c+=l){var m=i[c+f],g=i[c+h];if(!(m>=a)&&!(s>=g))if(d===p)d+=1,u+=l;else{for(var v=0;l>v;++v){var y=i[c+v];i[c+v]=i[u],i[u++]=y}var x=o[p];o[p]=o[d],o[d++]=x}}return d}}},309:function(e){"use strict";e.exports=function(e,n){n<=4*t?r(0,n-1,e):c(0,n-1,e)};var t=32;function r(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function l(e,t,r,n){var i=n[e*=2];return i>1,g=m-f,v=m+f,y=h,x=g,b=m,w=v,_=p,k=e+1,S=u-1,T=0;s(y,x,d)&&(T=y,y=x,x=T),s(w,_,d)&&(T=w,w=_,_=T),s(y,b,d)&&(T=y,y=b,b=T),s(x,b,d)&&(T=x,x=b,b=T),s(y,w,d)&&(T=y,y=w,w=T),s(b,w,d)&&(T=b,b=w,w=T),s(x,_,d)&&(T=x,x=_,_=T),s(x,b,d)&&(T=x,x=b,b=T),s(w,_,d)&&(T=w,w=_,_=T);for(var M=d[2*x],C=d[2*x+1],A=d[2*w],E=d[2*w+1],I=2*y,O=2*b,P=2*_,R=2*h,L=2*m,j=2*p,D=0;D<2;++D){var z=d[I+D],N=d[O+D],F=d[P+D];d[R+D]=z,d[L+D]=N,d[j+D]=F}i(g,e,d),i(v,u,d);for(var B=k;B<=S;++B)if(l(B,M,C,d))B!==k&&n(B,k,d),++k;else if(!l(B,A,E,d))for(;;){if(l(S,A,E,d)){l(S,M,C,d)?(o(B,k,S,d),++k,--S):(n(B,S,d),--S);break}if(--S>>1;o(p,C);var A=0,E=0;for(k=0;k=a)m(u,d,E--,I=I-a|0);else if(I>=0)m(l,c,A--,I);else if(I<=-a){I=-I-a|0;for(var O=0;O>>1;o(p,A);var E=0,I=0,O=0;for(S=0;S>1===p[2*S+3]>>1&&(R=2,S+=1),P<0){for(var L=-(P>>1)-1,j=0;j>1)-1,0===R?m(l,c,E--,L):1===R?m(u,d,I--,L):2===R&&m(f,h,O--,L)}},scanBipartite:function(e,t,r,n,i,s,u,d,f,h,v,y){var x=0,b=2*e,w=t,_=t+e,k=1,S=1;n?S=a:k=a;for(var T=i;T>>1;o(p,E);var I=0;for(T=0;T=a?(P=!n,M-=a):(P=!!n,M-=1),P)g(l,c,I++,M);else{var R=y[M],L=b*M,j=v[L+t+1],D=v[L+t+1+e];e:for(var z=0;z>>1;o(p,k);var S=0;for(x=0;x=a)l[S++]=b-a;else{var M=h[b-=1],C=g*b,A=f[C+t+1],E=f[C+t+1+e];e:for(var I=0;I=0;--I)if(l[I]===b){for(L=I+1;L0;){for(var h=r.pop(),p=(u=-1,d=-1,l=a[s=r.pop()],1);p=0||(t.flip(s,h),i(e,t,r,u,s,d),i(e,t,r,s,d,u),i(e,t,r,d,h,u),i(e,t,r,h,u,d))}}},7098:function(e,t,r){"use strict";var n=r(5070);function i(e,t,r,n,i,o,a){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,a=0;a0||l.length>0;){for(;s.length>0;){var h=s.pop();if(c[h]!==-a){c[h]=a,u[h];for(var p=0;p<3;++p){var m=f[3*h+p];m>=0&&0===c[m]&&(d[3*h+p]?l.push(m):(s.push(m),c[m]=a))}}}var g=l;l=s,s=g,l.length=0,a=-a}var v=function(e,t,r){for(var n=0,i=0;i1&&i(r[f[h-2]],r[f[h-1]],o)>0;)e.push([f[h-1],f[h-2],a]),h-=1;f.length=h,f.push(a);var p=d.upperIds;for(h=p.length;h>1&&i(r[p[h-2]],r[p[h-1]],o)<0;)e.push([p[h-2],p[h-1],a]),h-=1;p.length=h,p.push(a)}}function d(e,t){var r;return(r=e.a[0]m[0]&&i.push(new s(m,p,2,c),new s(p,m,1,c))}i.sort(l);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,[],[],[],[])],y=[],x=(c=0,i.length);c=0}}(),o.removeTriangle=function(e,t,r){var n=this.stars;a(n[e],t,r),a(n[t],r,e),a(n[r],e,t)},o.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},o.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;nt[2]?1:0)}function v(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--o){var x=t[u=(C=n[o])[0]],b=x[0],w=x[1],_=e[b],k=e[w];if((_[0]-k[0]||_[1]-k[1])<0){var S=b;b=w,w=S}x[0]=b;var T,M=x[1]=C[1];for(i&&(T=x[2]);o>0&&n[o-1][0]===u;){var C,A=(C=n[--o])[1];i?t.push([M,A,T]):t.push([M,A]),M=A}i?t.push([M,w,T]):t.push([M,w])}return f}(e,t,f,g,r),x=p(e,y);return v(t,x,r),!!x||f.length>0||g.length>0}},5528:function(e,t,r){"use strict";e.exports=function(e,t,r,n){var o=s(t,e),d=s(n,r),f=u(o,d);if(0===a(f))return null;var h=s(e,r),p=u(d,h),m=i(p,f),g=c(o,m);return l(e,g)};var n=r(3962),i=r(9189),o=r(4354),a=r(4951),s=r(6695),l=r(7584),c=r(4469);function u(e,t){return o(n(e[0],t[1]),n(e[1],t[0]))}},5692:function(e){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]}]}},9156:function(e,t,r){"use strict";var n=r(5692),i=r(3578);function o(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function a(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,c,u,d,f,h,p,m;if(e||(e={}),h=(e.nshades||72)-1,f=e.format||"hex",(d=e.colormap)||(d="jet"),"string"===typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");u=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>h+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*h)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m0||l(e,t,o)?-1:1:0===s?c>0||l(e,t,r)?1:-1:i(c-s)}var d=n(e,t,r);return d>0?a>0&&n(e,t,o)>0?1:-1:d<0?a>0||n(e,t,o)>0?1:-1:n(e,t,o)>0||l(e,t,r)?1:-1};var n=r(417),i=r(7538),o=r(87),a=r(2019),s=r(9662);function l(e,t,r){var n=o(e[0],-t[0]),i=o(e[1],-t[1]),l=o(r[0],-t[0]),c=o(r[1],-t[1]),u=s(a(n,l),a(i,c));return u[u.length-1]>=0}},7538:function(e){"use strict";e.exports=function(e){return e<0?-1:e>0?1:0}},9209:function(e){e.exports=function(e,n){var i=e.length,o=e.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var a=e[0]+e[1],s=n[0]+n[1];if(o=a+e[2]-(s+n[2]))return o;var l=t(e[0],e[1]),c=t(n[0],n[1]);return t(l,e[2])-t(c,n[2])||t(l+e[2],a)-t(c+n[2],s);case 4:var u=e[0],d=e[1],f=e[2],h=e[3],p=n[0],m=n[1],g=n[2],v=n[3];return u+d+f+h-(p+m+g+v)||t(u,d,f,h)-t(p,m,g,v,p)||t(u+d,u+f,u+h,d+f,d+h,f+h)-t(p+m,p+g,p+v,m+g,m+v,g+v)||t(u+d+f,u+d+h,u+f+h,d+f+h)-t(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=e.slice().sort(r),x=n.slice().sort(r),b=0;be[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},8722:function(e,t,r){"use strict";e.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var i=new Array(r),o=t[r-1],a=0;a=t[l]&&(s+=1);o[a]=s}}return e}(n(o,!0),r)}};var n=r(2183),i=r(2153)},9680:function(e){"use strict";e.exports=function(e,t,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,u=i*l,d=s*(3-2*i),f=s*a;if(e.length){o||(o=new Array(e.length));for(var h=e.length-1;h>=0;--h)o[h]=c*e[h]+u*t[h]+d*r[h]+f*n[h];return o}return c*e+u*t+d*r+f*n},e.exports.derivative=function(e,t,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){o||(o=new Array(e.length));for(var u=e.length-1;u>=0;--u)o[u]=a*e[u]+s*t[u]+l*r[u]+c*n[u];return o}return a*e+s*t+l*r[u]+c*n}},4419:function(e,t,r){"use strict";var n=r(2183),i=r(1215);function o(e,t){this.point=e,this.index=t}function a(e,t){for(var r=e.point,n=t.point,i=r.length,o=0;o=2)return!1;e[r]=n}return!0})):w.filter((function(e){for(var t=0;t<=s;++t){var r=v[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(u=0;u>>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))}},3094:function(e){"use strict";function t(e,r,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o0)return function(e,t){var r,n;for(r=new Array(e),n=0;n=r-1){f=l.length-1;var p=e-t[r-1];for(h=0;h=r-1)for(var u=s.length-1,d=(t[r-1],0);d=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--d)n.push(o(l[d-1],c[d-1],arguments[d])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var f=r;f>0;--f){var h=o(c[f-1],u[f-1],arguments[f]);n.push(h),i.push((h-n[a++])*d)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,d=u>1e-6?1/u:0;this._time.push(e);for(var f=r;f>0;--f){var h=arguments[f];n.push(o(l[f-1],c[f-1],n[a++]+h)),i.push(h*d)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--d)n.push(o(l[d],c[d],n[a]+u*i[a])),i.push(0),a+=1}}},7080:function(e){"use strict";function t(e,t,r,n,i,o){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=o}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function o(e,t){this._compare=e,this.root=t}e.exports=function(e){return new o(e||h,null)};var a=o.prototype;function s(e,t){var r;return t.left&&(r=s(e,t.left))?r:(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left&&(i=l(e,t,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(e,t,r,n.right)}function c(e,t,r,n,i){var o,a=r(e,i.key),s=r(t,i.key);if(a<=0){if(i.left&&(o=c(e,t,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(e,t,r,n,i.right)}function u(e,t){this.tree=e,this._stack=t}Object.defineProperty(a,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(a,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(e,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var u=a(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var d=l.length-2;d>=0;--d)s=l[d],c[d]<=0?l[d]=new t(s._color,s.key,s.value,l[d+1],s.right,s._count+1):l[d]=new t(s._color,s.key,s.value,s.left,l[d+1],s._count+1);for(d=l.length-1;d>1;--d){var f=l[d-1];if(s=l[d],1===f._color||1===s._color)break;var h=l[d-2];if(h.left===f)if(f.left===s){if(!(p=h.right)||0!==p._color){h._color=0,h.left=f.right,f._color=1,f.right=h,l[d-2]=f,l[d-1]=s,i(h),i(f),d>=3&&((m=l[d-3]).left===h?m.left=f:m.right=f);break}f._color=1,h.right=n(1,p),h._color=0,d-=1}else{if(!(p=h.right)||0!==p._color){f.right=s.left,h._color=0,h.left=s.right,s._color=1,s.left=f,s.right=h,l[d-2]=s,l[d-1]=f,i(h),i(f),i(s),d>=3&&((m=l[d-3]).left===h?m.left=s:m.right=s);break}f._color=1,h.right=n(1,p),h._color=0,d-=1}else if(f.right===s){if(!(p=h.left)||0!==p._color){h._color=0,h.right=f.left,f._color=1,f.left=h,l[d-2]=f,l[d-1]=s,i(h),i(f),d>=3&&((m=l[d-3]).right===h?m.right=f:m.left=f);break}f._color=1,h.left=n(1,p),h._color=0,d-=1}else{var p;if(!(p=h.left)||0!==p._color){var m;f.left=s.right,h._color=0,h.right=s.left,s._color=1,s.right=f,s.left=h,l[d-2]=s,l[d-1]=f,i(h),i(f),i(s),d>=3&&((m=l[d-3]).right===h?m.right=s:m.left=s);break}f._color=1,h.left=n(1,p),h._color=0,d-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return c(t,r,this._compare,e,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new u(this,e)}}),Object.defineProperty(a,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new u(this,e)}}),a.at=function(e){if(e<0)return new u(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new u(this,[])},a.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},a.remove=function(e){var t=this.find(e);return t?t.remove():this},a.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var d=u.prototype;function f(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function h(e,t){return et?1:0}Object.defineProperty(d,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(d,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),d.clone=function(){return new u(this.tree,this._stack.slice())},d.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var a=new Array(e.length),s=e[e.length-1];a[a.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l)(s=e[l]).left===e[l+1]?a[l]=new t(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new t(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var u=a[c-1];for(a.push(new t(s._color,u.key,u.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new t(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var d=a[a.length-2];for(d.left===s?d.left=null:d.right===s&&(d.right=null),a.pop(),l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((o=e[l-1]).left===t){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,t._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=e[l-2]).left===o?c.left=a:c.right=a),void(e[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),l>1&&((c=e[l-2]).left===o?c.left=s:c.right=s),void(e[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=e[l-2]).left===o?c.left=a:c.right=a),e[l-1]=a,e[l]=o,l+11&&((c=e[l-2]).right===o?c.right=a:c.left=a),void(e[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),l>1&&((c=e[l-2]).right===o?c.right=s:c.left=s),void(e[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=e[l-2]).right===o?c.right=a:c.left=a),e[l-1]=a,e[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(d,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(d,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),d.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),d.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new t(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new t(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},d.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},7453:function(e,t,r){"use strict";e.exports=function(e,t){var r=new u(e);return r.update(t),r};var n=r(9557),i=r(1681),o=r(1011),a=r(2864),s=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function u(e){this.gl=e,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=o(e)}var d=u.prototype;function f(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,r,n){if(n in e){var i,o=e[n],a=this[n];(t?Array.isArray(o)&&Array.isArray(o[0]):Array.isArray(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}e=e||{};var r,o=t.bind(this,!1,Number),a=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(Array.isArray(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,d=!1;if("bounds"in e)for(var f=e.bounds,h=0;h<2;++h)for(var p=0;p<3;++p)f[h][p]!==this.bounds[h][p]&&(d=!0),this.bounds[h][p]=f[h][p];if("ticks"in e)for(r=e.ticks,u=!0,this.autoTicks=!1,h=0;h<3;++h)this.tickSpacing[h]=0;else o("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(h=0;h<3;++h)r[h].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(u=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(m||u)&&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&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var h=[new f,new f,new f];function p(e,t,r,n,i){for(var o=e.primalOffset,a=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var d=o,f=s,h=a,p=l;c&1<0?(h[u]=-1,p[u]=0):(h[u]=0,p[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];d.draw=function(e){e=e||g;for(var t=this.gl,r=e.model||l,n=e.view||l,i=e.projection||l,o=this.bounds,s=e._ortho||!1,u=a(r,n,i,o,s),d=u.cubeEdges,f=u.axis,b=n[12],w=n[13],_=n[14],k=n[15],S=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*w+i[11]*_+i[15]*k)/t.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=d[T],this.lastCubeProps.axis[T]=f[T];var M=h;for(T=0;T<3;++T)p(h[T],T,this.bounds,d,f);t=this.gl;var C,A,E,I=m;for(T=0;T<3;++T)this.backgroundEnable[T]?I[T]=f[T]:I[T]=0;for(this._background.draw(r,n,i,o,I,this.backgroundColor),this._lines.bind(r,n,i,this),T=0;T<3;++T){var O=[0,0,0];f[T]>0?O[T]=o[1][T]:O[T]=o[0][T];for(var P=0;P<2;++P){var R=(T+1+P)%3,L=(T+1+(1^P))%3;this.gridEnable[R]&&this._lines.drawGrid(R,L,this.bounds,O,this.gridColor[R],this.gridWidth[R]*this.pixelRatio)}for(P=0;P<2;++P)R=(T+1+P)%3,L=(T+1+(1^P))%3,this.zeroEnable[L]&&Math.min(o[0][L],o[1][L])<=0&&Math.max(o[0][L],o[1][L])>=0&&this._lines.drawZero(R,L,this.bounds,O,this.zeroLineColor[L],this.zeroLineWidth[L]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var j=c(v,M[T].primalMinor),D=c(y,M[T].mirrorMinor),z=this.lineTickLength;for(P=0;P<3;++P){var N=S/r[5*P];j[P]*=z[P]*N,D[P]*=z[P]*N}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,M[T].primalOffset,j,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,M[T].mirrorOffset,D,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function F(e){(E=[0,0,0])[e]=1}function B(e,t,r){var n=(e+1)%3,i=(e+2)%3,o=t[n],a=t[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?F(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&F(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),T=0;T<3;++T){var Z=M[T].primalMinor,U=M[T].mirrorMinor,V=c(x,M[T].primalOffset);for(P=0;P<3;++P)this.lineTickEnable[T]&&(V[P]+=S*Z[P]*Math.max(this.lineTickLength[P],0)/r[5*P]);var H=[0,0,0];if(H[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,A=1,"auto"===(C=[this.tickAlign[T],.5,A])[0]?C[0]=0:C[0]=parseInt(""+C[0]),E=[0,0,0],B(T,Z,U),P=0;P<3;++P)V[P]+=S*Z[P]*this.tickPad[P]/r[5*P];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],H,E,C)}if(this.labelEnable[T]){for(A=0,E=[0,0,0],this.labels[T].length>4&&(F(T),A=1),"auto"===(C=[this.labelAlign[T],.5,A])[0]?C[0]=0:C[0]=parseInt(""+C[0]),P=0;P<3;++P)V[P]+=S*Z[P]*this.labelPad[P]/r[5*P];V[T]+=.5*(o[0][T]+o[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],E,C)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(e,t,r){"use strict";e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,d=[0,0,0],f=[0,0,0],h=-1;h<=1;h+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),d[l]=h,f[l]=h;for(var p=-1;p<=1;p+=2){d[c]=p;for(var m=-1;m<=1;m+=2)d[u]=m,t.push(d[0],d[1],d[2],f[0],f[1],f[2]),s+=1}var g=c;c=u,u=g}var v=n(e,new Float32Array(t)),y=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:v,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:e.FLOAT,size:3,offset:12,stride:24}],y),b=o(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new a(e,v,x,b)};var n=r(5827),i=r(2944),o=r(1943).bg;function a(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(e,t,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:i,colors:o},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()}},2864:function(e,t,r){"use strict";e.exports=function(e,t,r,o,h){i(s,t,e),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=o[x][2];for(var b=0;b<2;++b){u[1]=o[b][1];for(var w=0;w<2;++w)u[0]=o[w][0],f(l[y],u,s),y+=1}}var _=-1;for(x=0;x<8;++x){for(var k=l[x][3],S=0;S<3;++S)c[x][S]=l[x][S]/k;h&&(c[x][2]*=-1),k<0&&(_<0||c[x][2]A&&(_|=1<A&&(_|=1<c[x][1])&&(D=x);var z=-1;for(x=0;x<3;++x)(F=D^1<c[N][0]&&(N=F))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(z^D)]=D&z,B[n.log2(D^N)]=D&N;var Z=7^N;Z===_||Z===j?(Z=7^z,B[n.log2(N^Z)]=Z&N):B[n.log2(z^Z)]=Z&z;var U=g,V=_;for(T=0;T<3;++T)U[T]=V&1< 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}"]);t.f=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=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}"]),u=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}"]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(e,t,r){"use strict";e.exports=function(e,t,r,o,s,l){var u=n(e),d=i(e,[{buffer:u,size:3}]),f=a(e);f.attributes.position.location=0;var h=new c(e,f,u,d);return h.update(t,r,o,s,l),h};var n=r(5827),i=r(2944),o=r(875),a=r(1943).f,s=window||process.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,d=[0,0];u.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,r,n,i){var a=[];function s(e,t,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[t];u||(u=c[t]=function(e,t){try{return o(e,t)}catch(r){return console.warn('error vectorizing text:"'+e+'" error:',r),{cells:[],positions:[]}}}(t,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(n||12)/12,f=u.positions,h=u.cells,p=0,m=h.length;p=0;--v){var y=f[g[v]];a.push(d*y[0],-d*y[1],e)}}for(var c=[0,0,0],u=[0,0,0],d=[0,0,0],f=[0,0,0],h={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){d[p]=a.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,h),f[p]=(a.length/3|0)-d[p],c[p]=a.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(e*t*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(a<0&&(u="-"+u),i){for(var d=""+c;d.length=e[0][i];--a)o.push({x:a*t[i],text:r(t[i],a)});n.push(o)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,o,i),r}function u(e,t){for(var r=n.malloc(e.length,t),i=e.length,o=0;o=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=o(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var d;d=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?d:d.subarray(0,e.length),t),n.free(d)}else if("object"===typeof e&&"number"===typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!==typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.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!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.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=e.createBuffer(),o=new s(e,r,i,0,n);return o.update(t),o}},1140:function(e,t,r){"use strict";var n=r(2858);e.exports=function(e,t){var r=e.positions,i=e.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,u=-1/0,d=1/0,f=-1/0,h=null,p=null,m=[],g=1/0,v=!1,y=0;ya&&(a=n.length(b)),y){var w=2*n.distance(h,x)/(n.length(p)+n.length(b));w?(g=Math.min(g,w),v=!1):v=!0}v||(h=x,p=b),m.push(b)}var _=[s,c,d],k=[l,u,f];t&&(t[0]=_,t[1]=k),0===a&&(a=1);var S=1/a;isFinite(g)||(g=1),o.vectorScale=g;var T=e.coneSize||.5;e.absoluteConeSize&&(T=e.absoluteConeSize*S),o.coneScale=T,y=0;for(var M=0;y=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(e){this.pickId=e},h.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],d=[];this.cells=r,this.positions=n,this.vectors=i;var f=e.meshColor||[1,1,1,1],h=e.vertexIntensity,p=1/0,m=-1/0;if(h)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},h.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||d,n=e.view||d,i=e.projection||d,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,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(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},h.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],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=t),i},h.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(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),u=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),d=a(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var h=i(e),p=i(e),m=i(e),g=i(e),v=i(e),y=new f(e,d,l,u,h,p,v,m,g,o(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:v,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:p,type:e.FLOAT,size:4}]),r.traceType||"cone");return y.update(t),y}},7234:function(e,t,r){var n=r(6832),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"]),o=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"]),a=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}"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(e){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"}},6603:function(e,t,r){var n=r(1950);e.exports=function(e){return n[e]}},3110:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=n(t),a=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=o(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,a,l);return c.update(e),c};var n=r(5827),i=r(2944),o=r(7667),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,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 c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||a,i=r.projection=e.projection||a;r.model=e.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var d=0;d<3;++d)t.lineWidth(this.lineWidth[d]*this.pixelRatio),r.capSize=this.capSize[d]*u,this.lineCount[d]&&t.drawArrays(t.LINES,this.lineOffset[d],this.lineCount[d]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+t)%3]=i,r.push(o)}e[t]=r}return e}();function d(e,t,r,n){for(var i=u[n],o=0;o0&&((h=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,h[0],h[1],h[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,h),a+=2+d(i,h,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(e,t,r){"use strict";var n=r(6832),i=r(5158),o=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}"]),a=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(e){return i(e,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(e,t,r){"use strict";var n=r(8931);e.exports=function(e,t,r,n){i||(i=e.FRAMEBUFFER_UNSUPPORTED,o=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;ou||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var d=1;if("color"in(n=n||{})){if((d=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(d>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(d>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+d+" draw buffers")}}var f=e.UNSIGNED_BYTE,h=e.getExtension("OES_texture_float");if(n.float&&d>0){if(!h)throw new Error("gl-fbo: Context does not support floating point textures");f=e.FLOAT}else n.preferFloat&&d>0&&h&&(f=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(e,t,r,f,d,m,g,c)};var i,o,a,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function d(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a: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 f(e,t,r,i,o,a){if(!i)return null;var s=n(e,t,r,o,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,a,e.TEXTURE_2D,s.handle,0),s}function h(e,t,r,n,i){var o=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,o),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,o),o}function p(e,t,r,n,i,o,a,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[a]);var y=r.getExtension("WEBGL_depth_texture");y?p?e.depth=f(r,i,o,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=f(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=h(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=h(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=h(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var o=c(n),a=0;a>8*h&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=e,p.pickOffset=t,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),u.pick=function(e,t,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},u.update=function(e){var t=(e=e||{}).shape||[0,0],r=e.x||i(t[0]),a=e.y||i(t[1]),s=e.z||new Float32Array(t[0]*t[1]),l=!1!==e.zsmooth;this.xData=r,this.yData=a;var c,u,f,h,p=e.colorLevels||[0],m=e.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=a[0],f=v[2]=r[r.length-1],h=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=a[0]+(a[1]-a[0])/2,f=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,h=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var y=1/(f-c),x=1/(h-u),b=t[0],w=t[1];this.shape=[b,w];var _=(l?(b-1)*(w-1):b*w)*(d.length>>>1);this.numVertices=_;for(var k=o.mallocUint8(4*_),S=o.mallocFloat32(2*_),T=o.mallocUint8(2*_),M=o.mallocUint32(_),C=0,A=l?b-1:b,E=l?w-1:w,I=0;I 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"}];t.createShader=function(e){return i(e,o,a,null,l)},t.createPickShader=function(e){return i(e,o,s,null,l)}},6086:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=d(t);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 a=f(t);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(t),l=i(t,[{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}]),u=c(new Array(1024),[256,1,4]),h=0;h<1024;++h)u.data[h]=255;var p=o(t,u);p.wrap=t.REPEAT;var m=new v(t,r,a,s,l,p);return m.update(e),m};var n=r(5827),i=r(2944),o=r(8931),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(5070),c=r(5050),u=r(248),d=u.createShader,f=u.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){for(var r=0,n=0;n<3;++n){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)}function m(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function g(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function v(e,t,r,n,i,o){this.gl=e,this.shader=t,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=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,u=0,d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=e.position||e.positions;if(f){var h=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t0){for(var _=0;_<24;++_)i.push(i[i.length-12]);u+=2,g=!0}continue e}d[0][r]=Math.min(d[0][r],b[r],w[r]),d[1][r]=Math.max(d[1][r],b[r],w[r])}Array.isArray(h[0])?(v=h.length>t-1?h[t-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>t?h[t]:h.length>0?h[h.length-1]:[0,0,0,1]):v=y=h,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=p(b,w),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],w[0],w[1],w[2],k,x,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(b[0],b[1],b[2],w[0],w[1],w[2],k,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],w[0],w[1],w[2],k,-x,v[0],v[1],v[2],v[3],w[0],w[1],w[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],w[0],w[1],w[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),o.push(s),a.push(f[f.length-1].slice()),this.bounds=d,this.vertexCount=u,this.points=a,this.arcLength=o,"dashes"in e){var S=e.dashes.slice();for(S.unshift(0),t=1;t1.0001)return null;v+=g[d]}return Math.abs(v-1)>.001?null:[f,s(e,g),g]}},2056:function(e,t,r){var n=r(6832),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"]),o=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"]),a=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}"]),c=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}"]),u=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}"]),d=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}"]),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\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}"]),h=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}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:f,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"}]}},8116:function(e,t,r){"use strict";var n=r(5158),i=r(5827),o=r(2944),a=r(8931),s=r(115),l=r(104),c=r(7437),u=r(5050),d=r(9156),f=r(7212),h=r(5306),p=r(2056),m=r(4340),g=p.meshShader,v=p.wireShader,y=p.pointShader,x=p.pickShader,b=p.pointPickShader,w=p.contourShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,k,S,T,M,C){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=d,this.triangleIds=c,this.triangleVAO=h,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=w,this.pointUVs=k,this.pointSizes=S,this.pointIds=b,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=C,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=_,this._view=_,this._projection=_,this._resolution=[1,1]}var S=k.prototype;function T(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}function M(e){var t=n(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function C(e){var t=n(e,x.vertex,x.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function A(e){var t=n(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function E(e){var t=n(e,w.vertex,w.fragment);return t.attributes.position.location=0,t}S.isOpaque=function(){return!this.hasAlpha},S.isTransparent=function(){return this.hasAlpha},S.pickSlots=1,S.setPickBase=function(e){this.pickId=e},S.highlight=function(e){if(e&&this.contourEnable){for(var t=f(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,o=r.length,a=h.mallocFloat32(6*o),s=0,l=0;l0&&((d=this.triShader).bind(),d.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((d=this.lineShader).bind(),d.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((d=this.pointShader).bind(),d.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((d=this.contourShader).bind(),d.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},S.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||_,n=e.view||_,i=e.projection||_,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},S.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=new Array(r.length),o=0;ol[S]&&(o.uniforms.dataAxis=e,o.uniforms.screenOffset=t,o.uniforms.color=g[n],o.uniforms.angle=v[n],c.drawArrays(c.TRIANGLES,l[S],l[T]-l[S]))),y[n]&&k&&(t[1^n]-=M*h*x[n],o.uniforms.dataAxis=r,o.uniforms.screenOffset=t,o.uniforms.color=b[n],o.uniforms.angle=w[n],c.drawArrays(c.TRIANGLES,_,k)),t[1^n]=M*u[2+(1^n)]-1,p[n+2]&&(t[1^n]+=M*h*m[n+2],Sl[S]&&(o.uniforms.dataAxis=e,o.uniforms.screenOffset=t,o.uniforms.color=g[n+2],o.uniforms.angle=v[n+2],c.drawArrays(c.TRIANGLES,l[S],l[T]-l[S]))),y[n+2]&&k&&(t[1^n]+=M*h*x[n+2],o.uniforms.dataAxis=r,o.uniforms.screenOffset=t,o.uniforms.color=b[n+2],o.uniforms.angle=w[n+2],c.drawArrays(c.TRIANGLES,_,k))}}(),c.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)t[u]=2*(a[u]*c-o[u])/(o[2+u]-o[u])-1;n.bind(),n.uniforms.dataAxis=e,n.uniforms.screenOffset=t,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var e=[0,0],t=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,o=n._tickBounds,a=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var c=0;c<2;++c){var u=o[c],d=o[c+2]-u,f=.5*(a[c+2]+a[c]),h=a[c+2]-a[c],p=l[c],m=l[c+2]-p,g=s[c],v=s[c+2]-g;t[c]=2*d/h*m/v,e[c]=2*(u-f)/h*m/v}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=t,i.uniforms.dataShift=e,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(e){var t,r,n,i,a,s=[],l=e.ticks,c=e.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],d=[-1/0],f=l[a];for(t=0;t=0){var m=t[p]-n[p]*(t[p+2]-t[p])/(n[p+2]-n[p]);0===p?a.drawLine(m,t[1],m,t[3],h[p],f[p]):a.drawLine(t[0],m,t[2],m,h[p],f[p])}}for(p=0;p=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},c.removeObject=function(e){for(var t=this.objects,r=0;rMath.abs(t))c.rotate(o,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*t/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,d*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(8161),i=r(1152),o=r(6145),a=r(6475),s=r(2565),l=r(5233)},8245:function(e,t,r){var n=r(6832),i=r(5158),o=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}"]),a=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(e){return i(e,o,a,null,[{name:"position",type:"vec2"}])}},1059:function(e,t,r){"use strict";var n=r(4296),i=r(7453),o=r(2771),a=r(6496),s=r(2611),l=r(4234),c=r(8126),u=r(6145),d=r(1120),f=r(5268),h=r(8245),p=r(2321)({tablet:!0,featureDetect:!0});function m(){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 g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function v(e){return"boolean"!==typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch(n){return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],x=new m,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),w=h(r),_=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,k={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:_},S=e.axes||{},T=i(r,S);T.enable=!S.disable;var M=e.spikes||{},C=a(r,M),A=[],E=[],I=[],O=[],P=!0,R=!0,L=new Array(16),j=new Array(16),D={view:null,projection:L,model:j,_ortho:!1},z=(R=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),N=e.cameraObject||n(t,k),F={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:N,axes:T,axesPixels:null,spikes:C,bounds:y,objects:A,shape:z,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:v(e.autoResize),autoBounds:v(e.autoBounds),autoScale:!!e.autoScale,autoCenter:v(e.autoCenter),clipToBounds:v(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.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(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,R=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},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)}},B=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function Z(){if(!F._stopped&&F.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),o=0|Math.ceil(n*F.pixelRatio);if(i!==t.width||o!==t.height){t.width=i,t.height=o;var a=t.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",P=!0}}}function U(){for(var e=A.length,t=O.length,n=0;n0&&0===I[t-1];)I.pop(),O.pop().dispose()}function V(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&Z(),window.addEventListener("resize",Z),F.update=function(e){F._stopped||(e=e||{},P=!0,R=!0)},F.add=function(e){F._stopped||(e.axes=T,A.push(e),E.push(-1),P=!0,R=!0,U())},F.remove=function(e){if(!F._stopped){var t=A.indexOf(e);t<0||(A.splice(t,1),E.pop(),P=!0,R=!0,U())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener("resize",Z),t.removeEventListener("webglcontextlost",V),F.mouseListener.enabled=!1,!F.contextLost)){T.dispose(),C.dispose();for(var e=0;ex.distance)continue;for(var c=0;c 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"]),t.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"]),t.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"])},8271:function(e,t,r){"use strict";var n=r(5158),i=r(5827),o=r(5306),a=r(8023);function s(e,t,r,n,i){this.plot=e,this.offsetBuffer=t,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(e,t){var r=e.gl,o=i(r),l=i(r),c=n(r,a.pointVertex,a.pointFragment),u=n(r,a.pickVertex,a.pickFragment),d=new s(e,o,l,c,u);return d.update(t),e.addObject(d),d};var l=s.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(e){var t;function r(t,r){return t in e?e[t]:r}e=e||{},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=e.positions.length>>>1,i=e.positions instanceof Float32Array,a=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=n,s=e.positions,l=i?s:o.mallocFloat32(s.length),c=a?e.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),t=0;t>>1;for(r=0;r=t[0]&&o<=t[2]&&a>=t[1]&&a<=t[3]&&n++}return n}(this.points,a),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(c,.33333)));e[0]=2/s,e[4]=2/l,e[6]=-2*a[0]/s-1,e[7]=-2*a[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=e,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=u<5,i.uniforms.pointSize=u,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),n&&(t[0]=255&r,t[1]=r>>8&255,t[2]=r>>16&255,t[3]=r>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(o.UNSIGNED_BYTE),i.uniforms.pickOffset=t,this.pickOffset=r);var d=o.getParameter(o.BLEND),f=o.getParameter(o.DITHER);return d&&!this.blend&&o.disable(o.BLEND),f&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),d&&!this.blend&&o.enable(o.BLEND),f&&o.enable(o.DITHER),r+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(e,t,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},6093:function(e){e.exports=function(e,t,r,n){var i,o,a,s,l,c=t[0],u=t[1],d=t[2],f=t[3],h=r[0],p=r[1],m=r[2],g=r[3];return(o=c*h+u*p+d*m+f*g)<0&&(o=-o,h=-h,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),e[0]=s*c+l*h,e[1]=s*u+l*p,e[2]=s*d+l*m,e[3]=s*f+l*g,e}},8240:function(e){"use strict";e.exports=function(e){return e||0===e?e.toString():""}},4123:function(e,t,r){"use strict";var n=r(875);e.exports=function(e,t,r){var o=i[t];if(o||(o=i[t]={}),e in o)return o[e];var a={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(e,a);a.triangles=!1;var l,c,u=n(e,a);if(r&&1!==r){for(l=0;l 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}"]),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 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"]),c=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}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],d={vertex:o,fragment:l,attributes:u},f={vertex:a,fragment:l,attributes:u},h={vertex:s,fragment:l,attributes:u},p={vertex:o,fragment:c,attributes:u},m={vertex:a,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return v(e,d)},t.createOrtho=function(e){return v(e,f)},t.createProject=function(e){return v(e,h)},t.createPickPerspective=function(e){return v(e,p)},t.createPickOrtho=function(e){return v(e,m)},t.createPickProject=function(e){return v(e,g)}},2182:function(e,t,r){"use strict";var n=r(3596),i=r(5827),o=r(2944),a=r(5306),s=r(104),l=r(9282),c=r(4123),u=r(8240),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*o,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*o,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*o,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*o,e}function h(e,t,r,n){return f(n,n),f(n,n),f(n,n)}function p(e,t){this.index=e,this.dataCoordinate=this.position=t}function m(e){return!0===e||e>1?1:e}function g(e,t,r,n,i,o,a,s,l,c,u,d){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,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=c,this.pickOrthoShader=u,this.pickProjectShader=d,this.points=[],this._selectResult=new p(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(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),a=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),d=i(t),f=i(t),h=i(t),p=i(t),m=o(t,[{buffer:d,size:3,type:t.FLOAT},{buffer:f,size:4,type:t.FLOAT},{buffer:h,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),v=new g(t,r,n,a,d,f,h,p,m,s,c,u);return v.update(e),v};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],w=[0,0,0,1],_=[0,0,0,1],k=d.slice(),S=[0,0,0],T=[[0,0,0],[0,0,0]];function M(e){return e[0]=e[1]=e[2]=0,e}function C(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function A(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}function E(e,t,r,n){var i,o=t.axesProject,a=t.gl,l=e.uniforms,c=r.model||d,u=r.view||d,f=r.projection||d,p=t.axesBounds,m=function(e){for(var t=T,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],y[0]=2/a.drawingBufferWidth,y[1]=2/a.drawingBufferHeight,e.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=m,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(o[g]){l.scale=t.projectScale[g],l.opacity=t.projectOpacity[g];for(var v=k,E=0;E<16;++E)v[E]=0;for(E=0;E<4;++E)v[5*E]=1;v[5*g]=0,i[g]<0?v[12+g]=p[0][g]:v[12+g]=p[1][g],s(v,c,v),l.model=v;var I=(g+1)%3,O=(g+2)%3,P=M(x),R=M(b);P[I]=1,R[O]=1;var L=h(0,0,0,C(w,P)),j=h(0,0,0,C(_,R));if(Math.abs(L[1])>Math.abs(j[1])){var D=L;L=j,j=D,D=P,P=R,R=D;var z=I;I=O,O=z}L[0]<0&&(P[I]=-1),j[1]>0&&(R[O]=-1);var N=0,F=0;for(E=0;E<4;++E)N+=Math.pow(c[4*I+E],2),F+=Math.pow(c[4*O+E],2);P[I]/=Math.sqrt(N),R[O]/=Math.sqrt(F),l.axes[0]=P,l.axes[1]=R,l.fragClipBounds[0]=A(S,m[0],g,-1e8),l.fragClipBounds[1]=A(S,m[1],g,1e8),t.vao.bind(),t.vao.draw(a.TRIANGLES,t.vertexCount),t.lineWidth>0&&(a.lineWidth(t.lineWidth*n),t.vao.draw(a.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function O(e,t,r,n,i,o,a){var s=r.gl;if((o===r.projectHasAlpha||a)&&E(t,r,n,i),o===r.hasAlpha||a){e.bind();var l=e.uniforms;l.model=n.model||d,l.view=n.view||d,l.projection=n.projection||d,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=I,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 P(e,t,r,i){var o;o=Array.isArray(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,i=t>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){Array.isArray(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=m(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=e.position,l=e.font||"normal",c=e.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var R=0,L=x,j=[0,0,0,1],D=[0,0,0,1],z=Array.isArray(h)&&Array.isArray(h[0]),N=Array.isArray(v)&&Array.isArray(v[0]);e:for(n=0;n0?1-M[0][0]:G<0?1+M[1][0]:1,q*=q>0?1-M[0][1]:q<0?1+M[1][1]:1],X=S.cells||[],K=S.positions||[];for(k=0;k0){var v=r*u;a.drawBox(d-v,f-v,h+v,f+v,o),a.drawBox(d-v,p-v,h+v,p+v,o),a.drawBox(d-v,f-v,d+v,p+v,o),a.drawBox(h-v,f-v,h+v,p+v,o)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(e,t,r){"use strict";e.exports=function(e,t){var r=t[0],o=t[1],a=n(e,r,o,{}),s=i.mallocUint8(r*o*4);return new l(e,a,s)};var n=r(4234),i=r(5306),o=r(5050),a=r(2288).nextPow2;function s(e,t,r,n,i){this.coord=[e,t],this.id=r,this.value=n,this.distance=i}function l(e,t,r){this.gl=e,this.fbo=t,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],r=this.fbo.shape[1];if(r*t*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*t*4)),o=0;or)for(e=r;et)for(e=t;e=0){for(var k=0|_.type.charAt(_.type.length-1),S=new Array(k),T=0;T=0;)M+=1;w[y]=M}var C=new Array(r.length);function A(){f.program=a.program(h,f._vref,f._fref,b,w);for(var e=0;e=0){if((p=f.charCodeAt(f.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+d+": "+f);s(e,t,h[0],i,p,o,d)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+d+": "+f);var p;if((p=f.charCodeAt(f.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+d+": "+f);l(e,t,h,i,p,o,d)}}}return o};var n=r(9068);function i(e,t,r,n,i,o){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(e,t,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,e||o.FLOAT,!!t,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var a=[function(e,t,r){return void 0===r.length?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return void 0===r.length?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,i){return void 0===r.length?e.vertexAttrib3f(t,r,n,i):e.vertexAttrib3fv(t,r)},function(e,t,r,n,i,o){return void 0===r.length?e.vertexAttrib4f(t,r,n,i,o):e.vertexAttrib4fv(t,r)}];function s(e,t,r,n,o,s,l){var c=a[o],u=new i(e,t,r,n,o,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(n[r]),c(e,n[r],t),t},get:function(){return u},enumerable:!0})}function l(e,t,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+v+"fv"](s[d],!1,f);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((v=y.charCodeAt(y.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+v+"iv"](s[d],f);break;case"v":e["uniform"+v+"fv"](s[d],f);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function c(e,t){if("object"!==typeof t)return[[e,t]];var r=[];for(var n in t){var i=t[n],o=e;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"===typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function u(e,t,n){if("object"===typeof n){var c=d(n);Object.defineProperty(e,t,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(e,t,{get:(u=n,function(e,t,r){return e.getUniform(t.program,r[u])}),set:l(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?a(r,!1):a(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type);var u}function d(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 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"]),o=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"]),a=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}"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(e,t,r){"use strict";var n=r(2858),i=r(4020),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(e,t,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var S=(k+1)%8;c.push(f[k],h[k],h[S],h[S],f[S],f[k]),d.push(y,v,v,v,y,y),p.push(m,g,g,g,m,m);var T=c.length;u.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var M=f;f=h,h=M;var C=y;y=v,v=C;var A=m;m=g,g=A}return{positions:c,cells:u,vectors:d,vertexIntensity:p}}(e,r,o,a)})),d=[],f=[],h=[],p=[];for(s=0;st)return r-1}return r},l=function(e,t,r){return er?r:e},c=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nd-1||y>f-1||x>h-1)return n.create();var b,w,_,k,S,T,M=o[0][p],C=o[0][v],A=o[1][m],E=o[1][y],I=o[2][g],O=(a-M)/(C-M),P=(c-A)/(E-A),R=(u-I)/(o[2][x]-I);switch(isFinite(O)||(O=.5),isFinite(P)||(P=.5),isFinite(R)||(R=.5),r.reversedX&&(p=d-1-p,v=d-1-v),r.reversedY&&(m=f-1-m,y=f-1-y),r.reversedZ&&(g=h-1-g,x=h-1-x),r.filled){case 5:S=g,T=x,_=m*h,k=y*h,b=p*h*f,w=v*h*f;break;case 4:S=g,T=x,b=p*h,w=v*h,_=m*h*d,k=y*h*d;break;case 3:_=m,k=y,S=g*f,T=x*f,b=p*f*h,w=v*f*h;break;case 2:_=m,k=y,b=p*f,w=v*f,S=g*f*d,T=x*f*d;break;case 1:b=p,w=v,S=g*d,T=x*d,_=m*d*h,k=y*d*h;break;default:b=p,w=v,_=m*d,k=y*d,S=g*d*f,T=x*d*f}var L=i[b+_+S],j=i[b+_+T],D=i[b+k+S],z=i[b+k+T],N=i[w+_+S],F=i[w+_+T],B=i[w+k+S],Z=i[w+k+T],U=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(U,L,N,O),n.lerp(V,j,F,O),n.lerp(H,D,B,O),n.lerp(W,z,Z,O);var G=n.create(),q=n.create();n.lerp(G,U,H,P),n.lerp(q,V,W,P);var Y=n.create();return n.lerp(Y,G,q,R),Y}(t,e,h)},m=e.getDivergence||function(e,t){var r=n.create(),i=1e-4;n.add(r,e,[i,0,0]);var o=p(r);n.subtract(o,o,t),n.scale(o,o,1/i),n.add(r,e,[0,i,0]);var a=p(r);n.subtract(a,a,t),n.scale(a,a,1/i),n.add(r,e,[0,0,i]);var s=p(r);return n.subtract(s,s,t),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=t[0][0],y=t[0][1],x=t[0][2],b=t[1][0],w=t[1][1],_=t[1][2],k=function(e){var t=e[0],r=e[1],n=e[2];return!(tb||rw||n_)},S=10*n.distance(t[0],t[1])/i,T=S*S,M=1,C=0,A=r.length;A>1&&(M=function(e){for(var t=[],r=[],n=[],i={},o={},a={},s=e.length,l=0;lC&&(C=z),j.push(z),g.push({points:O,velocities:P,divergences:j});for(var N=0;N<100*i&&O.lengthT&&n.scale(F,F,S/Math.sqrt(B)),n.add(F,F,I),R=p(F),n.squaredDistance(L,F)-T>-1e-4*T&&(O.push(F),L=F,P.push(R),D=m(F,R),z=n.length(D),isFinite(z)&&z>C&&(C=z),j.push(z)),I=F}}var Z=a(g,e.colormap,C,M);return d?Z.tubeScale=d:(0===C&&(C=1),Z.tubeScale=.5*u*M/C),Z};var u=r(9578),d=r(1140).createMesh;e.exports.createTubeMesh=function(e,t){return d(e,t,{shaders:u,traceType:"streamtube"})}},9054:function(e,t,r){var n=r(5158),i=r(6832),o=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"]),a=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 \u2014 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"]);t.createShader=function(e){var t=n(e,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},3754:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=y(t),n=b(t),s=x(t),l=w(t),c=i(t),u=o(t,[{buffer:c,size:4,stride:_,offset:0},{buffer:c,size:3,stride:_,offset:16},{buffer:c,size:3,stride:_,offset:28}]),d=i(t),f=o(t,[{buffer:d,size:4,stride:20,offset:0},{buffer:d,size:1,stride:20,offset:16}]),h=i(t),p=o(t,[{buffer:h,size:2,type:t.FLOAT}]),m=a(t,1,C,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new A(t,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,d,f,h,p,[0,0,0]),v={levels:[[],[],[]]};for(var k in e)v[k]=e[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(2288),i=r(5827),o=r(2944),a=r(8931),s=r(5306),l=r(9156),c=r(7498),u=r(7382),d=r(5050),f=r(4162),h=r(104),p=r(7437),m=r(5070),g=r(9144),v=r(9054),y=v.createShader,x=v.createContourShader,b=v.createPickShader,w=v.createPickContourShader,_=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],S=[[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(e,t,r,n,i){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=T[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var C=256;function A(e,t,r,n,i,o,a,l,c,u,f,h,p,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=h,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=p,this._dynamicVAO=m,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=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(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}var E=A.prototype;E.genColormap=function(e,t){var r=!1,n=u([l({colormap:e,nshades:C,format:"rgba"}).map((function(e,n){var i=t?function(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(e){this.pickId=e};var I=[0,0,0],O={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var r,n,i,o=t.axes&&t.axes.lastCubeProps.axis||I,a=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(a=a||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=O.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]=t.axesBounds[+(o[r]>0)][r],h(l,e.model,l);var c=O.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=e.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return O.showSurface=a,O.showContour=s,O}var R={model:k,view:k,projection:k,inverseModel:k.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},L=k.slice(),j=[1,0,0,0,1,0,0,0,1];function D(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=R;n.model=e.model||k,n.view=e.view||k,n.projection=e.projection||k,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=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=j,n.vertexColor=this.vertexColor;var s=L;for(h(s,n.view,n.model),h(s,n.projection,s),p(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 c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var u=P(n,this);if(u.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=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var d=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,d.bind(),d.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(d.uniforms.permutation=T[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var d=u?o:1-o,f=0;f<2;++f)for(var h=i+u,p=s+f,g=d*(f?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(h,p)*g;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=m.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(w-c[x])&&(y[x]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=a/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},E.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=B(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=B(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=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 e||"coords"in e){var i=(t.shape[0]+2)*(t.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]=d(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=d(this._field[a].data,[o[0]+2,o[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var h=u[a];if((Array.isArray(h)||h.length)&&(h=d(h)),h.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=d(h.data,o);p.stride[a]=h.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=d(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var xe=0;xe<5;++xe)J.pop();Z-=1}continue e}J.push(ne[0],ne[1],ae[0],ae[1],ne[2]),Z+=1}}re.push(Z)}this._contourOffsets[Q]=te,this._contourCounts[Q]=re}var be=s.mallocFloat(J.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(a,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var d,h,g=0;if(2===a.length)g=e.LUMINANCE,a=[a[0],a[1],1],t=n(t.data,a,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=e.ALPHA;else if(2===a[2])g=e.LUMINANCE_ALPHA;else if(3===a[2])g=e.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}}c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var v=t.size;if(l)d=0===t.offset&&t.data.length===v?t.data:t.data.subarray(t.offset,t.offset+v);else{var y=[a[2],a[2]*a[0],1];h=o.malloc(v,r);var x=n(h,a,y,0);"float32"!==r&&"float64"!==r||c!==e.UNSIGNED_BYTE?i.assign(x,t):u(x,t),d=h.subarray(0,v)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,g,a[0],a[1],0,g,c,d),l||o.free(h),new f(e,b,a[0],a[1],g,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function d(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,r,n,i,o){this.gl=e,this.handle=t,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(e){return a.wrapS=e}},{get:function(){return a._wrapT},set:function(e){return a.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(e){return a.width=e}},{get:function(){return a._shape[1]},set:function(e){return a.height=e}}]),this._shapeVector=l}var h=f.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,i){var o=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new f(e,a,t,r,n,i)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==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(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[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),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),h.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},h.setPixels=function(e,t,r,a){var s=this.gl;this.bind(),Array.isArray(t)?(a=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),a=a||0;var l=c(e)?e:e.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>a||r+e.shape[0]>this._shape[0]>>>a||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,a,s,l,c,d){var f=d.dtype,h=d.shape.slice();if(h.length<2||h.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(h,d.stride.slice());if("float32"===f?m=e.FLOAT:"float64"===f?(m=e.FLOAT,v=!1,f="float32"):"uint8"===f?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,v=!1,f="uint8"),2===h.length)g=e.LUMINANCE,h=[h[0],h[1],1],d=n(d.data,h,[d.stride[0],d.stride[1],1],d.offset);else{if(3!==h.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===h[2])g=e.ALPHA;else if(2===h[2])g=e.LUMINANCE_ALPHA;else if(3===h[2])g=e.RGB;else{if(4!==h[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}h[2]}if(g!==e.LUMINANCE&&g!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=d.size,x=c.indexOf(a)<0;if(x&&c.push(a),m===l&&v)0===d.offset&&d.data.length===y?x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,d.data):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,d.data):x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,d.data.subarray(d.offset,d.offset+y)):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,d.data.subarray(d.offset,d.offset+y));else{var b;b=l===e.FLOAT?o.mallocFloat32(y):o.mallocUint8(y);var w=n(b,h,[h[2],h[2]*h[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(w,d):i.assign(w,d),x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,b.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,b.subarray(0,y)),l===e.FLOAT?o.freeFloat32(b):o.freeUint8(b)}}(s,t,r,a,this.format,this.type,this._mipLevels,e)}}},3056:function(e){"use strict";e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(5415),i=r(899),o=r(9305)},8827:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},7622:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},8782:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},8501:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},903:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2];return e[0]=i*l-o*s,e[1]=o*a-n*l,e[2]=n*s-i*a,e}},5981:function(e,t,r){e.exports=r(8288)},8288:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}},8629:function(e,t,r){e.exports=r(7979)},7979:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},9305:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},154:function(e){e.exports=1e-6},4932:function(e,t,r){e.exports=function(e,t){var r=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(154)},5777:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},3306:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},7447:function(e,t,r){e.exports=function(e,t,r,i,o,a){var s,l;for(t||(t=3),r||(r=0),l=i?Math.min(i*t+r,e.length):e.length,s=r;s0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}},6660:function(e){e.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},392:function(e){e.exports=function(e,t,r,n){var i=r[1],o=r[2],a=t[1]-i,s=t[2]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=i+a*c-s*l,e[2]=o+a*l+s*c,e}},3222:function(e){e.exports=function(e,t,r,n){var i=r[0],o=r[2],a=t[0]-i,s=t[2]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=i+s*l+a*c,e[1]=t[1],e[2]=o+s*c-a*l,e}},3388:function(e){e.exports=function(e,t,r,n){var i=r[0],o=r[1],a=t[0]-i,s=t[1]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=i+a*c-s*l,e[1]=o+a*l+s*c,e[2]=t[2],e}},1624:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},5685:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},6722:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},831:function(e){e.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},5294:function(e,t,r){e.exports=r(6403)},3303:function(e,t,r){e.exports=r(4337)},6403:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},4337:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},8921:function(e,t,r){e.exports=r(911)},911:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},9908:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}},3255:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,e[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,e[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,e[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,e}},6568:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,d=c*i+l*n-a*o,f=c*o+a*i-s*n,h=-a*n-s*i-l*o;return e[0]=u*c+h*-a+d*-l-f*-s,e[1]=d*c+h*-s+f*-a-u*-l,e[2]=f*c+h*-l+u*-s-d*-a,e}},3433:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},1413:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},3470:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},5313:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},5446:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},205:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},4242:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},5680:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},4020:function(e,t,r){e.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},8177:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}},8746:function(e){e.exports=function(e,t,r,n){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=a+n*(r[2]-a),e[3]=s+n*(r[3]-s),e}},3030:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2170:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},746:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},6459:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},381:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=n*a,e[2]=i*a,e[3]=o*a),e}},3770:function(e,t,r){var n=r(381),i=r(5510);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},5510:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4224:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},6453:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},1542:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o}},9037:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},2705:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},6342:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,e}},5022:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,d=c*i+l*n-a*o,f=c*o+a*i-s*n,h=-a*n-s*i-l*o;return e[0]=u*c+h*-a+d*-l-f*-s,e[1]=d*c+h*-s+f*-a-u*-l,e[2]=f*c+h*-l+u*-s-d*-a,e[3]=t[3],e}},9365:function(e,t,r){var n=r(8096),i=r(7896);e.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return F(r),O+=r.length,(C=C.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function Y(){return"."===t||/[eE]/.test(t)?(C.push(t),M=m,r=t,S+1):"x"===t&&1===C.length&&"0"===C[0]?(M=w,C.push(t),r=t,S+1):/[^\d]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function X(){return"f"===t&&(C.push(t),r=t,S+=1),/[eE]/.test(t)?(C.push(t),r=t,S+1):("-"!==t&&"+"!==t||!/[eE]/.test(r))&&/[^\d]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function K(){if(/[^\d\w_]/.test(t)){var e=C.join("");return M=N[e]?y:z[e]?v:g,F(C.join("")),M=l,S}return C.push(t),r=t,S+1}};var n=r(399),i=r(9746),o=r(9525),a=r(9458),s=r(3585),l=999,c=9999,u=0,d=1,f=2,h=3,p=4,m=5,g=6,v=7,y=8,x=9,b=10,w=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(e,t,r){var n=r(9525);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),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"])},9525:function(e){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"]},9458:function(e,t,r){var n=r(399);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"])},399:function(e){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"]},9746:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(e,t,r){var n=r(3193);e.exports=function(e,t){var r=n(t),i=[];return i=(i=i.concat(r(e))).concat(r(null))}},6832:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n0;)for(var s=(e=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,d=0;d<=r;++d){var f=u[d];i[d]=f<0?t:o[f]}var h=this.orient();if(h>0)return c;c.lastVisited=-n,0===h&&a.push(c)}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)o[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var d=c[u];if(!(d.lastVisited>=r)){var f=o[u];o[u]=e;var h=this.orient();if(o[u]=f,h<0){s=d;continue e}d.boundary?d.lastVisited=-r:d.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,d=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var f=[];d.length>0;){var h=(t=d.pop()).vertices,p=t.adjacent,m=h.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=e):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),d.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,_=h.slice(),k=p.slice(),S=new o(_,k,!0);u.push(S);var T=w.indexOf(t);if(!(T<0))for(w[T]=S,k[m]=v,_[g]=-1,k[g]=t,p[g]=S,S.flip(),b=0;b<=n;++b){var M=_[b];if(!(M<0||M===r)){for(var C=new Array(n-1),A=0,E=0;E<=n;++E){var I=_[E];I<0||E===b||(C[A++]=I)}f.push(new a(C,S,b))}}}}}for(f.sort(s),g=0;g+1=0?a[l++]=s[u]:c=1&u;if(c===(1&e)){var d=a[0];a[0]=a[1],a[1]=d}t.push(a)}}return t}},9014:function(e,t,r){"use strict";var n=r(5070);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return e&&0!==e.length?new v(g(e)):new v(null)};var o=i.prototype;function a(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function u(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function f(e,t){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=n.ge(this.leftPoints,e,p),i=n.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},o.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){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 o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,e,p);othis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:d(this.rightPoints,e,t):f(this.leftPoints,t);var r},o.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?d(this.rightPoints,e,r):f(this.leftPoints,r)};var y=v.prototype;y.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},y.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},y.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},y.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,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([]):[]}})},9560:function(e){"use strict";e.exports=function(e){for(var t=new Array(e),r=0;r13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},3578:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},7191:function(e,t,r){var n=r(4690),i=r(9823),o=r(7332),a=r(7787),s=r(7437),l=r(2142),c={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},u=i(),d=i(),f=[0,0,0,0],h=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,n,i){e[0]=t[0]*n+r[0]*i,e[1]=t[1]*n+r[1]*i,e[2]=t[2]*n+r[2]*i}e.exports=function(e,t,r,i,g,v){if(t||(t=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,e))return!1;if(o(d,u),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(a(d)<1e-8))return!1;var y,x,b=u[3],w=u[7],_=u[11],k=u[12],S=u[13],T=u[14],M=u[15];if(0!==b||0!==w||0!==_){if(f[0]=b,f[1]=w,f[2]=_,f[3]=M,!s(d,d))return!1;l(d,d),function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a}(g,f,d)}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=k,t[1]=S,t[2]=T,x=u,(y=h)[0][0]=x[0],y[0][1]=x[1],y[0][2]=x[2],y[1][0]=x[4],y[1][1]=x[5],y[1][2]=x[6],y[2][0]=x[8],y[2][1]=x[9],y[2][2]=x[10],r[0]=c.length(h[0]),c.normalize(h[0],h[0]),i[0]=c.dot(h[0],h[1]),m(h[1],h[1],h[0],1,-i[0]),r[1]=c.length(h[1]),c.normalize(h[1],h[1]),i[0]/=r[1],i[1]=c.dot(h[0],h[2]),m(h[2],h[2],h[0],1,-i[1]),i[2]=c.dot(h[1],h[2]),m(h[2],h[2],h[1],1,-i[2]),r[2]=c.length(h[2]),c.normalize(h[2],h[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,h[1],h[2]),c.dot(h[0],p)<0)for(var C=0;C<3;C++)r[C]*=-1,h[C][0]*=-1,h[C][1]*=-1,h[C][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+h[0][0]-h[1][1]-h[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-h[0][0]+h[1][1]-h[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-h[0][0]-h[1][1]+h[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+h[0][0]+h[1][1]+h[2][2],0)),h[2][1]>h[1][2]&&(v[0]=-v[0]),h[0][2]>h[2][0]&&(v[1]=-v[1]),h[1][0]>h[0][1]&&(v[2]=-v[2]),!0}},4690:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)e[i]=t[i]*n;return!0}},7649:function(e,t,r){var n=r(1868),i=r(1102),o=r(7191),a=r(7787),s=r(1116),l=d(),c=d(),u=d();function d(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,d){if(0===a(t)||0===a(r))return!1;var f=o(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),h=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!h)&&(n(u.translate,l.translate,c.translate,d),n(u.skew,l.skew,c.skew,d),n(u.scale,l.scale,c.scale,d),n(u.perspective,l.perspective,c.perspective,d),s(u.quaternion,l.quaternion,c.quaternion,d),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},1102:function(e,t,r){var n={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)},i=(n.create(),n.create());e.exports=function(e,t,r,o,a,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=a[0],e[7]=a[1],e[11]=a[2],e[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(e,e,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(e,e,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},9298:function(e,t,r){"use strict";var n=r(5070),i=r(7649),o=r(7437),a=r(6109),s=r(7115),l=r(5240),c=r(3012),u=r(998),d=(r(3668),r(899)),f=[0,0,0];function h(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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(e){return new h((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=h.prototype;p.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var u=t[r+1]-t[r],f=(l=16*r,this.prevMatrix),h=!0;for(c=0;c<16;++c)f[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],h=h&&f[c]===p[c];if(u<1e-6||h)for(c=0;c<16;++c)a[c]=f[c];else i(a,f,p,(e-t[r])/u)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],d(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-a[2+4*c]*b}},p.idle=function(e){if(!(e1&&n(e[a[u-2]],e[a[u-1]],c)<=0;)u-=1,a.pop();for(a.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var d=0,f=(i=0,a.length);i0;--h)r[d++]=s[h];return r};var n=r(417)[3]},6145:function(e,t,r){"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==o||l(s))&&(r=0|e,i=c||0,o=u||0,t&&t(r,i,o,a))}function u(e){c(0,e)}function d(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function f(e){l(e)&&t&&t(r,i,o,a)}function h(e){0===n.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4110)},2565:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=e.clientX||0,a=e.clientY||0,s=(i=r)===window||i===document||i===document.body?t:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4110:function(e,t){"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0"),"function"!==typeof e.vertex&&t("Must specify vertex creation function"),"function"!==typeof e.cell&&t("Must specify cell creation function"),"function"!==typeof e.phase&&t("Must specify phase function");for(var s=e.getters||[],l=new Array(o),c=0;c=0?l[c]=!0:l[c]=!1;return function(e,t,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,0,r,l)};var i={"false,0,1":function(e,t,r,n,i){return function(o,a,s,l){var c,u=0|o.shape[0],d=0|o.shape[1],f=o.data,h=0|o.offset,p=0|o.stride[0],m=0|o.stride[1],g=h,v=0|-p,y=0,x=0|-m,b=0,w=-p-m|0,_=0,k=0|p,S=m-p*u|0,T=0,M=0,C=0,A=2*u|0,E=n(A),I=n(A),O=0,P=0,R=-1,L=-1,j=0,D=0|-u,z=0|u,N=0,F=-u-1|0,B=u-1|0,Z=0,U=0,V=0;for(T=0;T0){if(M=1,E[O++]=r(f[g],a,s,l),g+=k,u>0)for(T=1,c=f[g],P=E[O]=r(c,a,s,l),j=E[O+R],N=E[O+D],Z=E[O+F],P===j&&P===N&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,j,N,Z,a,s,l),U=I[O]=C++),O+=1,g+=k,T=2;T0)for(T=1,c=f[g],P=E[O]=r(c,a,s,l),j=E[O+R],N=E[O+D],Z=E[O+F],P===j&&P===N&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,j,N,Z,a,s,l),U=I[O]=C++,Z!==N&&t(I[O+D],U,b,_,N,Z,a,s,l)),O+=1,g+=k,T=2;T0){if(T=1,E[O++]=r(f[g],a,s,l),g+=k,d>0)for(M=1,c=f[g],P=E[O]=r(c,a,s,l),N=E[O+D],j=E[O+R],Z=E[O+F],P===N&&P===j&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,N,j,Z,a,s,l),U=I[O]=C++),O+=1,g+=k,M=2;M0)for(M=1,c=f[g],P=E[O]=r(c,a,s,l),N=E[O+D],j=E[O+R],Z=E[O+F],P===N&&P===j&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,N,j,Z,a,s,l),U=I[O]=C++,Z!==N&&t(I[O+D],U,_,y,Z,N,a,s,l)),O+=1,g+=k,M=2;M2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),e.pick(0,-1,1).lo(1).hi(o[1]-2)),t(e.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),e.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),t(e.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),e.pick(-1,0,0).lo(1).hi(o[0]-2)),t(e.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),e.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),t(e.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(o[0]-1,0,0,0),e.set(o[0]-1,0,1,0),e.set(0,o[1]-1,0,0),e.set(0,o[1]-1,1,0),e.set(o[0]-1,o[1]-1,0,0),e.set(o[0]-1,o[1]-1,1,0),e}}e.exports=function(e,t,r){return Array.isArray(r)||(r=n(t.dimension,"string"===typeof r?r:"clamp")),0===t.size?e:0===t.dimension?(e.set(0),e):function(e){var t=e.join();if(o=u[t])return o;for(var r=e.length,n=[d,f],i=1;i<=r;++i)n.push(h(i));var o=p.apply(void 0,n);return u[t]=o,o}(r)(e,t)}},3581:function(e){"use strict";function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),n=v+x*d+b*f,a=y+x*p+b*m;var w=0,_=0,k=0,S=h,T=d-u*h,M=f-l*d,C=g,A=p-u*g,E=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=h+m*u+g*c,a=p+m*f+g*d;var v=0,y=0,x=u,b=c-l*u,w=f,_=d-l*f;for(y=0;y0;){y<64?(c=y,y=0):(c=64,y-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+y*f+x*u+b*d,a=v+y*m+x*h+b*p;var w=0,_=0,k=0,S=f,T=u-c*f,M=d-s*u,C=m,A=h-c*m,E=p-s*h;for(k=0;kr;){v=0,y=m-a;t:for(g=0;gb)break t;y+=d,v+=f}for(v=m,y=m-a,g=0;g>1,H=V-B,W=V+B,G=Z,q=H,Y=V,X=W,K=U,$=i+1,J=o-1,Q=!0,ee=0,te=0,re=0,ne=d,ie=t(ne),oe=t(ne);T=l*G,M=l*q,F=s;e:for(S=0;S0){g=G,G=q,q=g;break e}if(re<0)break e;F+=h}T=l*X,M=l*K,F=s;e:for(S=0;S0){g=X,X=K,K=g;break e}if(re<0)break e;F+=h}T=l*G,M=l*Y,F=s;e:for(S=0;S0){g=G,G=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*Y,F=s;e:for(S=0;S0){g=q,q=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*G,M=l*X,F=s;e:for(S=0;S0){g=G,G=X,X=g;break e}if(re<0)break e;F+=h}T=l*Y,M=l*X,F=s;e:for(S=0;S0){g=Y,Y=X,X=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*K,F=s;e:for(S=0;S0){g=q,q=K,K=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*Y,F=s;e:for(S=0;S0){g=q,q=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*X,M=l*K,F=s;e:for(S=0;S0){g=X,X=K,K=g;break e}if(re<0)break e;F+=h}for(T=l*G,M=l*q,C=l*Y,A=l*X,E=l*K,I=l*Z,O=l*V,P=l*U,N=0,F=s,S=0;S0)){if(re<0){for(T=l*b,M=l*$,C=l*J,F=s,S=0;S0)for(;;){for(w=s+J*l,N=0,S=0;S0)){for(w=s+J*l,N=0,S=0;SU){e:for(;;){for(w=s+$*l,N=0,F=s,S=0;S1&&n?s(r,n[0],n[1]):s(r)}(e,t,l);return n(l,c)}},8729:function(e,t,r){"use strict";var n=r(8139),i={};e.exports=function(e){var t=e.order,r=e.dtype,o=[t,r].join(":"),a=i[o];return a||(i[o]=a=n(t,r)),a(e),e}},5050:function(e,t,r){var n=r(4780),i="undefined"!==typeof Float64Array;function o(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,r=new Array(t.length);for(e=0;e=0&&(t+=o*(r=0|e),i-=r),new n(this.data,i,o,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"===typeof e&&((o=0|e)<0?(i+=r*(t-1),t=a(-t/o)):t=a(t/o),r*=o),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"===typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,o){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=e,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(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"===typeof e&&e>=0&&(r+=s*(i=0|e),o-=i),"number"===typeof t&&t>=0&&(r+=l*(i=0|t),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"===typeof e&&((l=0|e)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"===typeof t&&((l=0|t)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],o=this.offset;return"number"===typeof e&&e>=0?o=o+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"===typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,o)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,o,a,s){this.data=e,this.shape=[t,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=e,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 e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],d=this.stride[2];return"number"===typeof e&&e>=0&&(i+=c*(o=0|e),a-=o),"number"===typeof t&&t>=0&&(i+=u*(o=0|t),s-=o),"number"===typeof r&&r>=0&&(i+=d*(o=0|r),l-=o),new n(this.data,a,s,l,c,u,d,i)},i.step=function(e,t,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,d=0,f=Math.ceil;return"number"===typeof e&&((d=0|e)<0?(u+=s*(i-1),i=f(-i/d)):i=f(i/d),s*=d),"number"===typeof t&&((d=0|t)<0?(u+=l*(o-1),o=f(-o/d)):o=f(o/d),l*=d),"number"===typeof r&&((d=0|r)<0?(u+=c*(a-1),a=f(-a/d)):a=f(a/d),c*=d),new n(this.data,i,o,a,s,l,c,u)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[e],i[t],i[r],o[e],o[t],o[r],this.offset)},i.pick=function(e,r,n){var i=[],o=[],a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,t[i.length+1])(this.data,i,o,a)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,o,a,s,l,c){this.data=e,this.shape=[t,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=e,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(t,r,n,i,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"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(e,t,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],d=this.stride[0],f=this.stride[1],h=this.stride[2],p=this.stride[3];return"number"===typeof e&&e>=0&&(o+=d*(a=0|e),s-=a),"number"===typeof t&&t>=0&&(o+=f*(a=0|t),l-=a),"number"===typeof r&&r>=0&&(o+=h*(a=0|r),c-=a),"number"===typeof i&&i>=0&&(o+=p*(a=0|i),u-=a),new n(this.data,s,l,c,u,d,f,h,p,o)},i.step=function(e,t,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],d=this.stride[2],f=this.stride[3],h=this.offset,p=0,m=Math.ceil;return"number"===typeof e&&((p=0|e)<0?(h+=c*(o-1),o=m(-o/p)):o=m(o/p),c*=p),"number"===typeof t&&((p=0|t)<0?(h+=u*(a-1),a=m(-a/p)):a=m(a/p),u*=p),"number"===typeof r&&((p=0|r)<0?(h+=d*(s-1),s=m(-s/p)):s=m(s/p),d*=p),"number"===typeof i&&((p=0|i)<0?(h+=f*(l-1),l=m(-l/p)):l=m(l/p),f*=p),new n(this.data,o,a,s,l,c,u,d,f,h)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],a[e],a[t],a[r],a[i],this.offset)},i.pick=function(e,r,n,i){var o=[],a=[],s=this.offset;return"number"===typeof e&&e>=0?s=s+this.stride[0]*e|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"===typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"===typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,t[o.length+1])(this.data,o,a,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,o,a,s,l,c,u,d){this.data=e,this.shape=[t,r,n,i,o],this.stride=[a,s,l,c,u],this.offset=0|d}var i=n.prototype;return i.dtype=e,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(t,r,n,i,o,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(t,r,n,i,o){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,o){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,"number"!==typeof i||i<0?this.shape[3]:0|i,"number"!==typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.shape[3],f=this.shape[4],h=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"===typeof e&&e>=0&&(a+=h*(s=0|e),l-=s),"number"===typeof t&&t>=0&&(a+=p*(s=0|t),c-=s),"number"===typeof r&&r>=0&&(a+=m*(s=0|r),u-=s),"number"===typeof i&&i>=0&&(a+=g*(s=0|i),d-=s),"number"===typeof o&&o>=0&&(a+=v*(s=0|o),f-=s),new n(this.data,l,c,u,d,f,h,p,m,g,v,a)},i.step=function(e,t,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],d=this.stride[0],f=this.stride[1],h=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,y=Math.ceil;return"number"===typeof e&&((v=0|e)<0?(g+=d*(a-1),a=y(-a/v)):a=y(a/v),d*=v),"number"===typeof t&&((v=0|t)<0?(g+=f*(s-1),s=y(-s/v)):s=y(s/v),f*=v),"number"===typeof r&&((v=0|r)<0?(g+=h*(l-1),l=y(-l/v)):l=y(l/v),h*=v),"number"===typeof i&&((v=0|i)<0?(g+=p*(c-1),c=y(-c/v)):c=y(c/v),p*=v),"number"===typeof o&&((v=0|o)<0?(g+=m*(u-1),u=y(-u/v)):u=y(u/v),m*=v),new n(this.data,a,s,l,c,u,d,f,h,p,m,g)},i.transpose=function(e,t,r,i,o){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],a[o],s[e],s[t],s[r],s[i],s[o],this.offset)},i.pick=function(e,r,n,i,o){var a=[],s=[],l=this.offset;return"number"===typeof e&&e>=0?l=l+this.stride[0]*e|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"===typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"===typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"===typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"===typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,t[a.length+1])(this.data,a,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(e,t){var r=-1===t?"T":String(t),n=s[r];return-1===t?n(e):0===t?n(e,c[e][0]):n(e,c[e],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,o){if(void 0===e)return(0,c.array[0])([]);"number"===typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=new Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===o)for(o=0,s=0;s>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var r=n.hi(e),a=n.lo(e);return t>e===e>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},115:function(e,t){t.vertexNormals=function(e,t,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var b=i[c],w=1/Math.sqrt(g*y);for(x=0;x<3;++x){var _=(x+1)%3,k=(x+2)%3;b[x]+=w*(v[_]*m[k]-v[k]*m[_])}}}for(a=0;ao)for(w=1/Math.sqrt(S),x=0;x<3;++x)b[x]*=w;else for(x=0;x<3;++x)b[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(h):0,c=0;c<3;++c)f[c]*=h;i[a]=f}return i}},567:function(e){"use strict";e.exports=function(e,t,r,n,i,o,a,s,l,c){var u=t+o+c;if(d>0){var d=Math.sqrt(u+1);e[0]=.5*(a-l)/d,e[1]=.5*(s-n)/d,e[2]=.5*(r-o)/d,e[3]=.5*d}else{var f=Math.max(t,o,c);d=Math.sqrt(2*f-u+1),t>=f?(e[0]=.5*d,e[1]=.5*(i+r)/d,e[2]=.5*(s+n)/d,e[3]=.5*(a-l)/d):o>=f?(e[0]=.5*(r+i)/d,e[1]=.5*d,e[2]=.5*(l+a)/d,e[3]=.5*(s-n)/d):(e[0]=.5*(n+s)/d,e[1]=.5*(a+l)/d,e[2]=.5*d,e[3]=.5*(r-i)/d)}return e}},7774:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var i=new d(r,t,Math.log(n));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var n=r(8444),i=r(3012),o=r(5950),a=r(7437),s=r(567);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function u(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=c(r,n,i,o);a>1e-6?(e[0]=r/a,e[1]=n/a,e[2]=i/a,e[3]=o/a):(e[0]=e[1]=e[2]=0,e[3]=1)}function d(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),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 f=d.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;o(r,t);var n=this.computedCenter,i=this.computedEye,a=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],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,d=0;d<3;++d)c+=r[l+4*d]*i[d];r[12+l]=-c}},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},f.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},f.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},f.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var u=i[0],d=i[4],f=i[8],h=u*o+d*a+f*s,p=l(u-=o*h,d-=a*h,f-=s*h);u/=p,d/=p,f/=p;var m=i[2],g=i[6],v=i[10],y=m*o+g*a+v*s,x=m*u+g*d+v*f,b=l(m-=y*o+x*u,g-=y*a+x*d,v-=y*s+x*f);m/=b,g/=b,v/=b;var w=u*t+o*r,_=d*t+a*r,k=f*t+s*r;this.center.move(e,w,_,k);var S=Math.exp(this.computedRadius[0]);S=Math.max(1e-4,S+n),this.radius.set(e,Math.log(S))},f.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],u=i[1],d=i[5],f=i[9],h=i[2],p=i[6],m=i[10],g=t*o+r*u,v=t*a+r*d,y=t*s+r*f,x=-(p*y-m*v),b=-(m*g-h*y),w=-(h*v-p*g),_=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(w,2))),k=c(x,b,w,_);k>1e-6?(x/=k,b/=k,w/=k,_/=k):(x=b=w=0,_=1);var S=this.computedRotation,T=S[0],M=S[1],C=S[2],A=S[3],E=T*_+A*x+M*w-C*b,I=M*_+A*b+C*x-T*w,O=C*_+A*w+T*b-M*x,P=A*_-T*x-M*b-C*w;if(n){x=h,b=p,w=m;var R=Math.sin(n)/l(x,b,w);x*=R,b*=R,w*=R,P=P*(_=Math.cos(t))-(E=E*_+P*x+I*w-O*b)*x-(I=I*_+P*b+O*x-E*w)*b-(O=O*_+P*w+E*b-I*x)*w}var L=c(E,I,O,P);L>1e-6?(E/=L,I/=L,O/=L,P/=L):(E=I=O=0,P=1),this.rotation.set(e,E,I,O,P)},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,t,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),u(a,a),this.rotation.set(e,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},f.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},f.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,t);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(e);var d=Math.exp(this.computedRadius[0]);this.center.set(e,o-n[2]*d,l-n[6]*d,c-n[10]*d),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.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]}},f.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},4930:function(e,t,r){"use strict";var n=r(6184);e.exports=function(e,t,r){return n(r="undefined"!==typeof r?r+"":" ",t)+e}},4405:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=0|t.length,i=e.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[u][r][0],l=u;break}s=a[1^l];for(var d=0;d<2;++d)for(var f=o[d][r],h=0;h0&&(a=p,s=m,l=d)}return i||a&&c(a,l),s}function d(e,r){var i=o[r][e][0],a=[e];c(i,r);for(var s=i[1^r];;){for(;s!==e;)a.push(s),s=u(a[a.length-2],s,!1);if(o[0][e].length+o[1][e].length===0)break;var l=a[a.length-1],d=e,f=a[1],h=u(l,d,!0);if(n(t[l],t[d],t[f],t[h])<0)break;a.push(e),s=u(l,d)}return a}function f(e,t){return t[1]===t[t.length-1]}for(a=0;a0;){o[0][a].length;var m=d(a,h);f(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var n=r(9398)},3959:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=n(e,t.length),i=new Array(t.length),o=new Array(t.length),a=[],s=0;s0;){i[h=a.pop()]=!1;var c=r[h];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(h=0;h0;){var N=D.pop(),F=A[N];l(F,(function(e,t){return e-t}));var B,Z=F.length,U=z[N];for(0===U&&(B=[V=p[N]]),h=0;h=0||(z[H]=1^U,D.push(H),0===U&&(j(V=p[H])||(V.reverse(),B.push(V))))}0===U&&r.push(B)}return r};var n=r(8348),i=r(4166),o=r(211),a=r(9660),s=r(9662),l=r(1215),c=r(3959);function u(e,t){for(var r=new Array(e),n=0;n0&&t[i]===r[0]))return 1;o=e[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(o),y)};var n=r(417)[3],i=r(4385),o=r(9014),a=r(5070);function s(){return!0}function l(e){for(var t={},r=0;r=c?(S=1,y=c+2*f+p):y=f*(S=-f/c)+p):(S=0,h>=0?(T=0,y=p):-h>=d?(T=1,y=d+2*h+p):y=h*(T=-h/d)+p);else if(T<0)T=0,f>=0?(S=0,y=p):-f>=c?(S=1,y=c+2*f+p):y=f*(S=-f/c)+p;else{var M=1/k;y=(S*=M)*(c*S+u*(T*=M)+2*f)+T*(u*S+d*T+2*h)+p}else S<0?(b=d+h)>(x=u+f)?(w=b-x)>=(_=c-2*u+d)?(S=1,T=0,y=c+2*f+p):y=(S=w/_)*(c*S+u*(T=1-S)+2*f)+T*(u*S+d*T+2*h)+p:(S=0,b<=0?(T=1,y=d+2*h+p):h>=0?(T=0,y=p):y=h*(T=-h/d)+p):T<0?(b=c+f)>(x=u+h)?(w=b-x)>=(_=c-2*u+d)?(T=1,S=0,y=d+2*h+p):y=(S=1-(T=w/_))*(c*S+u*T+2*f)+T*(u*S+d*T+2*h)+p:(T=0,b<=0?(S=1,y=c+2*f+p):f>=0?(S=0,y=p):y=f*(S=-f/c)+p):(w=d+h-u-f)<=0?(S=0,T=1,y=d+2*h+p):w>=(_=c-2*u+d)?(S=1,T=0,y=c+2*f+p):y=(S=w/_)*(c*S+u*(T=1-S)+2*f)+T*(u*S+d*T+2*h)+p;var C=1-S-T;for(l=0;l0){var c=e[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},6184:function(e){"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,i)}},8161:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(e){"use strict";e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var o=r;(l=(s=e[i])-((r=o+s)-o))&&(e[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:d(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],o=t[0]-n[0],a=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],c=r[1]-n[1],u=e[2]-n[2],d=t[2]-n[2],h=r[2]-n[2],p=o*c,m=a*l,g=a*s,v=i*c,y=i*l,x=o*s,b=u*(p-m)+d*(g-v)+h*(y-x),w=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(d)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>w||-b>w?b:f(e,t,r,n)}];function p(e){var t=h[e.length];return t||(t=h[e.length]=u(e.length)),t.apply(void 0,e)}function m(e,t,r,n,i,o,a){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return o(t,r,s,l);case 5:return a(t,r,s,l,c)}for(var u=new Array(arguments.length),d=0;d0&&a>0||o<0&&a<0)return!1;var s=n(r,e,t),l=n(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var o=e[i],a=t[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],u=n[i],d=Math.min(c,u);if(Math.max(c,u)=n?(i=d,(l+=1)=n?(i=d,(l+=1)>1,c=t[2*l+1];if(c===o)return l;o>1,c=t[2*l+1];if(c===o)return l;o>1,c=t[2*l+1];if(c===o)return l;o0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6656:function(e,t,r){"use strict";var n=r(9392),i=r(9521);function o(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var o=e[0]+e[1],a=t[0]+t[1];if(s=o+e[2]-(a+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],o)-i(c+t[2],a);default:var u=e.slice(0);u.sort();var d=t.slice(0);d.sort();for(var f=0;f>1,s=o(e[a],t);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function u(e,t){for(var r=new Array(e.length),i=0,a=r.length;i=e.length||0!==o(e[g],s)););}return r}function d(e,t){if(t<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=d,t.boundary=function(e){for(var t=[],r=0,n=e.length;r>1:(e>>1)-1}function x(e){for(var t=v(e);;){var r=t,n=2*e+1,i=2*(e+1),o=e;if(n0;){var r=y(e);if(!(r>=0&&t0){var e=S[0];return g(0,M-1),M-=1,x(0),e}return-1}function _(e,t){var r=S[e];return c[r]===t?e:(c[r]=-1/0,b(e),w(),c[r]=t,b((M+=1)-1))}function k(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&_(T[t],m(t)),T[r]>=0&&_(T[r],m(r))}}var S=[],T=new Array(o);for(d=0;d>1;d>=0;--d)x(d);for(;;){var C=w();if(C<0||c[C]>r)break;k(C)}var A=[];for(d=0;d=0&&r>=0&&t!==r){var n=T[t],i=T[r];n!==i&&I.push([n,i])}})),i.unique(i.normalize(I)),{positions:A,edges:I}};var n=r(417),i=r(6656)},6638:function(e,t,r){"use strict";e.exports=function(e,t){var r,o,a,s;if(t[0][0]t[1][0]))return i(t,e);r=t[1],o=t[0]}if(e[0][0]e[1][0]))return-i(e,t);a=e[1],s=e[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(417);function i(e,t){var r,i,o,a;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}r=t[1],i=t[0]}e[0][1]0)if(t[0]!==a[1][0])r=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==a[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function d(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=c(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?a(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var d=this.horizontal[t];if(d.length>0){var f=n.ge(d,e[1],l);if(f=d.length)return i;h=d[f]}}if(h.start)if(s){var p=o(s[0],s[1],[e[0],h.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=h.index)}else i=h.index;else h.y!==e[1]&&(i=h.index)}}}return i}},4670:function(e,t,r){"use strict";var n=r(9130),i=r(9662);function o(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function a(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=e.length,s=new Array(a),l=0;l0||i>0&&u<0){var d=a(s,u,l,i);r.push(d),n.push(d.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(e,t){for(var r=[],n=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(e,t){for(var r=[],n=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},8974:function(e,t,r){var n;!function(){"use strict";var i={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 o(e){return function(e,t){var r,n,a,s,l,c,u,d,f,h=1,p=e.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||d&&!s.sign?f="":(f=d?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?f+r+l:"0"===c?f+l+r:l+f+r)}return m}(function(e){if(s[e])return s[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=o,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}()},4162:function(e,t,r){"use strict";e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(e,t,r,n,i,o,a,s,l,c,u,d,f){var h=(a<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==h&&15!==h)switch(h){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(n+r-2*f)/(r-n),t-.25-.25*(i+r-2*f)/(r-i)]);break;case 2:u.push([e-.75-.25*(-n-r+2*f)/(n-r),t-.25-.25*(o+n-2*f)/(n-o)]);break;case 3:u.push([e-.5,t-.5-.5*(i+r+o+n-4*f)/(r-i+n-o)]);break;case 4:u.push([e-.25-.25*(o+i-2*f)/(i-o),t-.75-.25*(-i-r+2*f)/(i-r)]);break;case 5:u.push([e-.5-.5*(n+r+o+i-4*f)/(r-n+i-o),t-.5]);break;case 6:u.push([e-.5-.25*(-n-r+o+i)/(n-r+i-o),t-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:u.push([e-.75-.25*(o+i-2*f)/(i-o),t-.75-.25*(o+n-2*f)/(n-o)]);break;case 8:u.push([e-.75-.25*(-o-i+2*f)/(o-i),t-.75-.25*(-o-n+2*f)/(o-n)]);break;case 9:u.push([e-.5-.25*(n+r+-o-i)/(r-n+o-i),t-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:u.push([e-.5-.5*(-n-r-o-i+4*f)/(n-r+o-i),t-.5]);break;case 11:u.push([e-.25-.25*(-o-i+2*f)/(o-i),t-.75-.25*(i+r-2*f)/(r-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-r-o-n+4*f)/(i-r+o-n)]);break;case 13:u.push([e-.75-.25*(n+r-2*f)/(r-n),t-.25-.25*(-o-n+2*f)/(o-n)]);break;case 14:u.push([e-.25-.25*(-n-r+2*f)/(n-r),t-.25-.25*(-i-r+2*f)/(i-r)])}},cell:function(e,t,r,n,i,o,a,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},a={}},6946:function(e,t,r){"use strict";e.exports=function e(t,r,i){i=i||{};var a=o[t];a||(a=o[t]={" ":{data:new Float32Array(0),shape:.2}});var s=a[r];if(!s)if(r.length<=1||!/\d/.test(r))s=a[r]=function(e){for(var t=e.cells,r=e.positions,n=new Float32Array(6*t.length),i=0,o=0,a=0;a0&&(d+=.02);var h=new Float32Array(u),p=0,m=-.5*d;for(f=0;fMath.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=e[l]*e[l],a+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=a/o*e[l];return s(i,i),i}function f(e,t,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var h=f.prototype;h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=t[o]*r[o],n+=t[o]*t[o];var l=Math.sqrt(n),u=0;for(o=0;o<3;++o)r[o]-=t[o]*i/n,u+=r[o]*r[o],t[o]/=l;var d=Math.sqrt(u);for(o=0;o<3;++o)r[o]/=d;var f=this.computedToward;a(f,t,r),s(f,f);var h=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),x=Math.sin(m),b=this.computedCenter,w=g*y,_=v*y,k=x,S=-g*x,T=-v*x,M=y,C=this.computedEye,A=this.computedMatrix;for(o=0;o<3;++o){var E=w*r[o]+_*f[o]+k*t[o];A[4*o+1]=S*r[o]+T*f[o]+M*t[o],A[4*o+2]=E,A[4*o+3]=0}var I=A[1],O=A[5],P=A[9],R=A[2],L=A[6],j=A[10],D=O*j-P*L,z=P*R-I*j,N=I*L-O*R,F=c(D,z,N);for(D/=F,z/=F,N/=F,A[0]=D,A[4]=z,A[8]=N,o=0;o<3;++o)C[o]=b[o]+A[2+4*o]*h;for(o=0;o<3;++o){u=0;for(var B=0;B<3;++B)u+=A[o+4*B]*C[B];A[12+o]=-u}A[15]=1},h.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var p=[0,0,0];h.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,a[0],a[1],a[2]),this.right.set(e,s[0],s[1],s[2])}},h.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var u=i[0],d=i[4],f=i[8],h=u*o+d*a+f*s,p=c(u-=o*h,d-=a*h,f-=s*h),m=(u/=p)*t+o*r,g=(d/=p)*t+a*r,v=(f/=p)*t+s*r;this.center.move(e,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(e,Math.log(y))},h.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},h.setMatrix=function(e,t,r,n){var o=1;"number"===typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[o],l=t[o+4],d=t[o+8];if(n){var f=Math.abs(s),h=Math.abs(l),p=Math.abs(d),m=Math.max(f,h,p);f===m?(s=s<0?-1:1,l=d=0):p===m?(d=d<0?-1:1,s=l=0):(l=l<0?-1:1,s=d=0)}else{var g=c(s,l,d);s/=g,l/=g,d/=g}var v,y,x=t[a],b=t[a+4],w=t[a+8],_=x*s+b*l+w*d,k=c(x-=s*_,b-=l*_,w-=d*_),S=l*(w/=k)-d*(b/=k),T=d*(x/=k)-s*w,M=s*b-l*x,C=c(S,T,M);if(S/=C,T/=C,M/=C,this.center.jump(e,H,W,G),this.radius.idle(e),this.up.jump(e,s,l,d),this.right.jump(e,x,b,w),2===o){var A=t[1],E=t[5],I=t[9],O=A*x+E*b+I*w,P=A*S+E*T+I*M;v=D<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,O)}else{var R=t[2],L=t[6],j=t[10],D=R*s+L*l+j*d,z=R*x+L*b+j*w,N=R*S+L*T+j*M;v=Math.asin(u(D)),y=Math.atan2(N,z)}this.angle.jump(e,y,v),this.recalcMatrix(e);var F=t[2],B=t[6],Z=t[10],U=this.computedMatrix;i(U,t);var V=U[15],H=U[12]/V,W=U[13]/V,G=U[14]/V,q=Math.exp(this.computedRadius[0]);this.center.jump(e,H-F*q,W-B*q,G-Z*q)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},h.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=t[0]-r[0],d=t[1]-r[1],f=t[2]-r[2],h=c(l,d,f);if(!(h<1e-6)){l/=h,d/=h,f/=h;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=i*m+o*g+a*v,x=c(m-=y*i,g-=y*o,v-=y*a);if(!(x<.01&&(x=c(m=o*f-a*d,g=a*l-i*f,v=i*d-o*l))<1e-6)){m/=x,g/=x,v/=x,this.up.set(e,i,o,a),this.right.set(e,m,g,v),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(h));var b=o*v-a*g,w=a*m-i*v,_=i*g-o*m,k=c(b,w,_),S=i*l+o*d+a*f,T=m*l+g*d+v*f,M=(b/=k)*l+(w/=k)*d+(_/=k)*f,C=Math.asin(u(S)),A=Math.atan2(M,T),E=this.angle._state,I=E[E.length-1],O=E[E.length-2];I%=2*Math.PI;var P=Math.abs(I+2*Math.PI-A),R=Math.abs(I-A),L=Math.abs(I-2*Math.PI-A);P0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(h(e),0,e)}function m(e){return new Uint16Array(h(2*e),0,e)}function g(e){return new Uint32Array(h(4*e),0,e)}function v(e){return new Int8Array(h(e),0,e)}function y(e){return new Int16Array(h(2*e),0,e)}function x(e){return new Int32Array(h(4*e),0,e)}function b(e){return new Float32Array(h(4*e),0,e)}function w(e){return new Float64Array(h(8*e),0,e)}function _(e){return a?new Uint8ClampedArray(h(e),0,e):p(e)}function k(e){return s?new BigUint64Array(h(8*e),0,e):null}function S(e){return l?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=d[t];return r.length>0?r.pop():new o(e)}t.free=function(e){if(o.isBuffer(e))d[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){f(e.buffer)},t.freeArrayBuffer=f,t.freeBuffer=function(e){d[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return v(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return w(e);case"uint8_clamped":return _(e);case"bigint64":return S(e);case"biguint64":return k(e);case"buffer":return M(e);case"data":case"dataview":return T(e);default:return null}return null},t.mallocArrayBuffer=h,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=v,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=w,t.mallocUint8Clamped=_,t.mallocBigUint64=k,t.mallocBigInt64=S,t.mallocDataView=T,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,d[e].length=0}},1731:function(e){"use strict";function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=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,o+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",_(function(e,t,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(e[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(z(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",z())),T+=.25*E*(l-s)}if(!0===a.superscripts){var c=e.indexOf(p),d=r.indexOf(p),h=c>-1?parseInt(e[1+c]):0,m=d>-1?parseInt(r[1+d]):0;h!==m&&(n=n.replace(z(),"?px "),M*=Math.pow(.75,m-h),n=n.replace("?px ",z())),T-=.25*E*(m-h)}if(!0===a.bolds){var g=e.indexOf(u)>-1,y=r.indexOf(u)>-1;!g&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!y&&(n=n.replace("bold ",""))}if(!0===a.italics){var x=e.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}t.font=n}for(_=0;_",o="",a=i.length,s=o.length,l=t[0]===p||t[0]===v,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(o,c+a))&&!(u<=c);){for(var d=c;d=u)n[d]=null,r=r.substr(0,d)+" "+r.substr(d+1);else if(null!==n[d]){var f=n[d].indexOf(t[0]);-1===f?n[d]+=t:l&&(n[d]=n[d].substr(0,f+1)+(1+parseInt(n[d][f+1]))+n[d].substr(f+2))}var h=c+a,m=r.substr(h,u-h).indexOf(i);c=-1!==m?m:u+s}return n}function b(e,t){var r=n(e,128);return t?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function w(e,t,r,n){var i=b(e,n),o=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=e.length,l=0;l=0?t[o]:i}))},has___:{value:x((function(t){var n=y(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:x((function(n,i){var o,a=y(n);return a?a[r]=i:(o=e.indexOf(n))>=0?t[o]=i:(o=e.length,t[o]=i,e[o]=n),this}))},delete___:{value:x((function(n){var i,o,a=y(n);return a?r in a&&delete a[r]:!((i=e.indexOf(n))<0)&&(o=e.length-1,e[i]=void 0,t[i]=t[o],e[i]=e[o],e.length=o,t.length=o,!0)}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"===typeof r?function(){function n(){this instanceof m||b();var e,n=new r,i=void 0,o=!1;return e=t?function(e,t){return n.set(e,t),n.has(e)||(i||(i=new m),i.set(e,t)),this}:function(e,t){if(o)try{n.set(e,t)}catch(r){i||(i=new m),i.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:x((function(e,t){return i?n.has(e)?n.get(e):i.get___(e,t):n.get(e,t)}))},has___:{value:x((function(e){return n.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!n.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}t&&"undefined"!==typeof Proxy&&(Proxy=void 0),n.prototype=m.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=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function v(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return a(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(r){return}}}function x(e){return e.prototype=null,Object.freeze(e)}function b(){h||"undefined"===typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},9222:function(e,t,r){var n=r(7178);e.exports=function(){var e={};return function(t){if(("object"!==typeof t||null===t)&&"function"!==typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},7178:function(e){e.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},4037:function(e,t,r){var n=r(9222);e.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},6183:function(e){"use strict";var t=function(){return function(e,t,r,n,i,o){var a=e[0],s=r[0],l=[0],c=s;n|=0;var u=0,d=s;for(u=0;u=0!==h>=0&&i.push(l[0]+.5+.5*(f+h)/(f-h)),n+=d,++l[0]}}};e.exports=function(e){return r={funcName:e.funcName},function(e){var t={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=t[s];return l||(t[s]=l=e([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(t.bind(void 0,r));var r}({funcName:"zeroCrossings"})},9584:function(e,t,r){"use strict";e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(6183)},6601:function(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r(7386)}()},e.exports=t()},84672:e=>{e.exports=function(e,t,r,n){var i=e[0],o=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=n-r,l=0,c=s-1;lo!==h>o&&i<(f-u)*(o-d)/(h-d)+u&&(a=!a)}return a}},82070:(e,t,r)=>{var n,i=r(41725),o=r(44877),a=r(24780),s=r(42987),l=r(64652),c=r(20812),u=!1,d=o();function f(e,t,r){var i=n.segments(e),o=n.segments(t),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(e){return!0===e?u=i():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=a(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:a(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,d,e)},union:function(e,t){return f(e,t,n.selectUnion)},intersect:function(e,t){return f(e,t,n.selectIntersect)},difference:function(e,t){return f(e,t,n.selectDifference)},differenceRev:function(e,t){return f(e,t,n.selectDifferenceRev)},xor:function(e,t){return f(e,t,n.selectXor)}},"object"===typeof window&&(window.PolyBool=n),e.exports=n},41725:e=>{e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},44877:e=>{e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=t[0];return(a-i)*(t[1]-o)-(s-o)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],o=n[0]-r[0],a=t[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=a-i>e&&(o-c)*(i-u)/(a-u)+c-n>e&&(s=!s),o=c,a=u}return s}};return t}},20812:e=>{var t={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),i=1;i{var n=r(74122);e.exports=function(e,t,r){function i(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(e,r){o.insertBefore(e,(function(n){return function(e,r,n,i,o,a){var s=t.pointsCompare(r,o);return 0!==s?s:t.pointsSame(n,a)?0:e!==i?e?1:-1:t.pointAboveOrOnLine(n,i?o:a,i?a:o)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function s(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return a(r,e.end),r}(e,t);return function(e,t,r){var i=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=i,a(i,e.pt)}(r,e,t),r}function l(e,t){var n=i(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,a(e.other,e.pt)}(e,t),s(n,e.primary)}function c(i,a){var s=n.create();function c(e){return s.findTransition((function(r){return function(e,r){var n=e.seg.start,i=e.seg.end,o=r.seg.start,a=r.seg.end;return t.pointsCollinear(n,o,a)?t.pointsCollinear(i,o,a)||t.pointAboveOrOnLine(i,o,a)?1:-1:t.pointAboveOrOnLine(n,o,a)?1:-1}(e,r.ev)>0}))}function u(e,n){var i=e.seg,o=n.seg,a=i.start,s=i.end,c=o.start,u=o.end;r&&r.checkIntersection(i,o);var d=t.linesIntersect(a,s,c,u);if(!1===d){if(!t.pointsCollinear(a,s,c))return!1;if(t.pointsSame(a,u)||t.pointsSame(s,c))return!1;var f=t.pointsSame(a,c),h=t.pointsSame(s,u);if(f&&h)return n;var p=!f&&t.pointBetween(a,c,u),m=!h&&t.pointBetween(s,c,u);if(f)return m?l(n,s):l(e,u),n;p&&(h||(m?l(n,s):l(e,u)),l(n,a))}else 0===d.alongA&&(-1===d.alongB?l(e,c):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,u)),0===d.alongB&&(-1===d.alongA?l(n,a):0===d.alongA?l(n,d.pt):1===d.alongA&&l(n,s));return!1}for(var d=[];!o.isEmpty();){var f=o.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var h=c(f),p=h.before?h.before.ev:null,m=h.after?h.after.ev:null;function g(){if(p){var e=u(f,p);if(e)return e}return!!m&&u(f,m)}r&&r.tempStatus(f.seg,!!p&&p.seg,!!m&&m.seg);var v,y=g();if(y){var x;if(e)(x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(y.seg),f.other.remove(),f.remove()}if(o.getHead()!==f){r&&r.rewind(f.seg);continue}if(e)x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:i,f.seg.myFill.above=x?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill)v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?a:i,f.seg.otherFill={above:v,below:v};r&&r.status(f.seg,!!p&&p.seg,!!m&&m.seg),f.other.status=h.insert(n.node({ev:f}))}else{var b=f.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)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!f.primary){var w=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=w}d.push(f.seg)}o.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,i,o,a=e[e.length-1],l=0;l{e.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},42987:e=>{e.exports=function(e,t,r){var n=[],i=[];return e.forEach((function(e){var o=e.start,a=e.end;if(t.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u{function t(e,t,r){var n=[];return e.forEach((function(e){var i=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[i]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[i],below:2===t[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(e,r){return t(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return t(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return t(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return t(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return t(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};e.exports=r},52023:(e,t,r)=>{"use strict";var n=r(13841).Transform,i=r(85944);function o(){n.call(this,{readableObjectMode:!0})}function a(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,i(o.prototype),t.OF=function(e,t,r){for(var n=t,i=0;i{"use strict";function t(e,t){var r=new Error(e);return r.code=t,r}function r(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function n(e,r,n){this.input=e.subarray(r,n),this.start=r;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==i&&"MM\0*"!==i)throw t("invalid TIFF signature","EBADDATA");this.big_endian="M"===i[0]}n.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},n.prototype.read_uint16=function(e){var r=this.input;if(e+2>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?256*r[e]+r[e+1]:r[e]+256*r[e+1]},n.prototype.read_uint32=function(e){var r=this.input;if(e+4>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[e]+65536*r[e+1]+256*r[e+2]+r[e+3]:r[e]+256*r[e+1]+65536*r[e+2]+16777216*r[e+3]},n.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},n.prototype.exif_format_length=function(e){switch(e){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}},n.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return r=this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return r=this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},n.prototype.scan_ifd=function(e,n,i){var o=this.read_uint16(n);n+=2;for(var a=0;athis.input.length)throw t("unexpected EOF","EBADDATA");for(var p=[],m=f,g=0;g0&&(this.ifds_to_read.push({id:s,offset:p[0]}),h=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:n+this.start,data_length:d,data_offset:f+this.start,value:p,is_subifd_link:h}))return void(this.aborted=!0);n+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(n)})},e.exports.ExifParser=n,e.exports.get_orientation=function(e){var t=0;try{return new n(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch(r){return-1}}},64736:(e,t,r)=>{"use strict";var n=r(52023).n8,i=r(52023).Ag;function o(e,t){if(e.length<4+t)return null;var r=i(e,t);return e.length>4&15,i=15&e[4],o=e[5]>>4&15,a=n(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t})),r=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>r.height||t.width===r.height&&t.height>r.width?t:r}(t.sizes),n=1;t.transforms.forEach((function(e){var t={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"===e.type&&(n=0===e.value?r[n]:t[n=t[n=r[n]]]),"irot"===e.type)for(var i=0;i{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=r(64736),s=r(51193),l=n("ftyp");e.exports=function(e){if(i(e,4,l)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var n,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){n=u.data;break}}if(n){var d=a.readSizeFromMeta(n);if(d){var f={width:d.width,height:d.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(d.variants.length>1&&(f.variants=d.variants),d.orientation&&(f.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=e.length){var h=o(e,d.exif_location.offset),p=e.slice(d.exif_location.offset+h+4,d.exif_location.offset+d.exif_location.length),m=s.get_orientation(p);m>0&&(f.orientation=m)}return f}}}}}}},82184:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=n("BM");e.exports=function(e){if(!(e.length<26)&&i(e,0,a))return{width:o(e,18),height:o(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},94857:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=n("GIF87a"),s=n("GIF89a");e.exports=function(e){if(!(e.length<10)&&(i(e,0,a)||i(e,0,s)))return{width:o(e,6),height:o(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},35234:(e,t,r)=>{"use strict";var n=r(52023).mP;e.exports=function(e){var t=n(e,0),r=n(e,2),i=n(e,4);if(0===t&&1===r&&i){for(var o=[],a={width:0,height:0},s=0;sa.width||c>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:o,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},65731:(e,t,r)=>{"use strict";var n=r(52023).n8,i=r(52023).eG,o=r(52023).OF,a=r(51193),s=i("Exif\0\0");e.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var r,i,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(e.length-t<2)return;r=n(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&r>=10&&o(e,t,s)&&(i=a.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=i),c}t+=r}}},91229:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=n("\x89PNG\r\n\x1a\n"),s=n("IHDR");e.exports=function(e){if(!(e.length<24)&&i(e,0,a)&&i(e,12,s))return{width:o(e,16),height:o(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},56211:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=n("8BPS\0\x01");e.exports=function(e){if(!(e.length<22)&&i(e,0,a))return{width:o(e,18),height:o(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},2223:e=>{"use strict";function t(e){return"number"===typeof e&&isFinite(e)&&e>0}var r=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(e){return s.test(e)?e.match(s)[0]:"px"}e.exports=function(e){if(function(e){var t,r=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);r{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=r(52023).n8,s=r(52023).nm,l=r(52023).Ag,c=n("II*\0"),u=n("MM\0*");function d(e,t,r){return r?a(e,t):o(e,t)}function f(e,t,r){return r?l(e,t):s(e,t)}function h(e,t,r){var n=d(e,t+2,r);return 1!==f(e,t+4,r)||3!==n&&4!==n?null:3===n?d(e,t+8,r):f(e,t+8,r)}e.exports=function(e){if(!(e.length<8)&&(i(e,0,c)||i(e,0,u))){var t=77===e[0],r=f(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var o=12*d(e,n+0,t);if(!(o<=0)&&(n+=2,!(e.length-n{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=r(52023).nm,s=r(51193),l=n("RIFF"),c=n("WEBP");function u(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&o(e,t+6),height:16383&o(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function d(e,t){if(47===e[t]){var r=a(e,t+1);return{width:1+(16383&r),height:1+(r>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function f(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?r=r||u(e,t+8):"VP8L"===h&&p>=9?r=r||d(e,t+8):"VP8X"===h&&p>=10?r=r||f(e,t+8):"EXIF"===h&&(n=s.get_orientation(e.slice(t+8,t+8+p)),t=1/0),t+=8+p}else t++;if(r)return n>0&&(r.orientation=n),r}}}},80075:(e,t,r)=>{"use strict";e.exports={avif:r(43211),bmp:r(82184),gif:r(94857),ico:r(35234),jpeg:r(65731),png:r(91229),psd:r(56211),svg:r(2223),tiff:r(73126),webp:r(36992)}},2132:(e,t,r)=>{"use strict";var n=r(80075);e.exports=function(e){return function(e){for(var t=Object.keys(n),r=0;r{"use strict";var n=r(79165);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==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 t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},75192:(e,t,r)=>{e.exports=r(61729)()},79165:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5609:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},74776:(e,t,r)=>{"use strict";var n=r(2816),i=r(67668),o=r(5609);e.exports={formats:o,parse:i,stringify:n}},67668:(e,t,r)=>{"use strict";var n=r(49837),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&null!==(s=a.exec(o))&&d=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var r,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,d),h=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=n.combine(c[m],g):c[m]=g}return c}(e,r):e,d=r.plainObjects?Object.create(null):{},f=Object.keys(u),h=0;h{"use strict";var n=r(73170),i=r(49837),o=r(5609),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,f=o.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},m=function e(t,r,o,a,s,c,d,f,m,g,v,y,x,b,w,_){for(var k,S=t,T=_,M=0,C=!1;void 0!==(T=T.get(p))&&!C;){var A=T.get(t);if(M+=1,"undefined"!==typeof A){if(A===M)throw new RangeError("Cyclic object value");C=!0}"undefined"===typeof T.get(p)&&(M=0)}if("function"===typeof f?S=f(r,S):S instanceof Date?S=v(S):"comma"===o&&l(S)&&(S=i.maybeMap(S,(function(e){return e instanceof Date?v(e):e}))),null===S){if(s)return d&&!b?d(r,h.encoder,w,"key",y):r;S=""}if("string"===typeof(k=S)||"number"===typeof k||"boolean"===typeof k||"symbol"===typeof k||"bigint"===typeof k||i.isBuffer(S))return d?[x(b?r:d(r,h.encoder,w,"key",y))+"="+x(d(S,h.encoder,w,"value",y))]:[x(r)+"="+x(String(S))];var E,I=[];if("undefined"===typeof S)return I;if("comma"===o&&l(S))b&&d&&(S=i.maybeMap(S,d)),E=[{value:S.length>0?S.join(",")||null:void 0}];else if(l(f))E=f;else{var O=Object.keys(S);E=m?O.sort(m):O}for(var P=a&&l(S)&&1===S.length?r+"[]":r,R=0;R0?w+b:""}},49837:(e,t,r)=>{"use strict";var n=r(5609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{for(var n=r(3460),i="undefined"===typeof window?r.g:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c{"use strict";var n=r(47313),i=r(62224);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r
, or turn it into a ")+"drag source or a drop target itself.")}(i);const o=r?t=>e(t,r):e;return function(e,t){const r=e.ref;return P$("string"!==typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,n.cloneElement)(e,{ref:e=>{r3(r,e),r3(t,e)}}):(0,n.cloneElement)(e,{ref:t})}(i,o)}}function t3(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const e=e3(n);t[r]=()=>e}})),t}function r3(e,t){"function"===typeof e?e(t):e.current=t}class n3{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!J2(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=t3({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Q2(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function i3(){const{dragDropManager:e}=(0,n.useContext)(LJ);return P$(null!=e,"Expected drag drop context"),e}let o3=!1;class a3{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;P$(!o3,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return o3=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{o3=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}class s3{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function l3(e,t,r){const i=i3(),o=function(e,t){const r=(0,n.useMemo)((()=>new s3(e,t)),[t]);return(0,n.useEffect)((()=>{r.spec=e}),[e]),r}(e,t),a=function(e){const{accept:t}=e;return(0,n.useMemo)((()=>(P$(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t])),[t])}(e);q2((function(){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}(a,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}),[i,t,o,r,a.map((e=>e.toString())).join("|")])}function c3(e,t){const r=K2(e,t),i=function(){const e=i3();return(0,n.useMemo)((()=>new a3(e)),[e])}(),o=function(e){const t=i3(),r=(0,n.useMemo)((()=>new n3(t.getBackend())),[t]);return q2((()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget())),[e]),r}(r.options);return l3(r,i,o),[X2(r.collect,i,o),$2(o)]}function u3(){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},n.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function d3(){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},n.createElement("path",{d:"M0 0h32v4.2H0z"}))}function f3(){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},n.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function h3(){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},n.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function p3(){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},n.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const m3=e=>{let{children:t,className:r,...i}=e;return n.createElement("button",{type:"button",className:nm(["react-flow__controls-button",r]),...i},t)};m3.displayName="ControlButton";const g3=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),v3=e=>{let{style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:o=!0,fitViewOptions:a,onZoomIn:s,onZoomOut:l,onFitView:c,onInteractiveChange:u,className:d,children:f,position:h="bottom-left"}=e;const p=ky(),[m,g]=(0,n.useState)(!1),{isInteractive:v,minZoomReached:y,maxZoomReached:x}=_y(g3,um),{zoomIn:b,zoomOut:w,fitView:_}=Eb();if((0,n.useEffect)((()=>{g(!0)}),[]),!m)return null;return n.createElement(Ty,{className:nm(["react-flow__controls",d]),position:h,style:t,"data-testid":"rf__controls"},r&&n.createElement(n.Fragment,null,n.createElement(m3,{onClick:()=>{b(),null===s||void 0===s||s()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:x},n.createElement(u3,null)),n.createElement(m3,{onClick:()=>{w(),null===l||void 0===l||l()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:y},n.createElement(d3,null))),i&&n.createElement(m3,{className:"react-flow__controls-fitview",onClick:()=>{_(a),null===c||void 0===c||c()},title:"fit view","aria-label":"fit view"},n.createElement(f3,null)),o&&n.createElement(m3,{className:"react-flow__controls-interactive",onClick:()=>{p.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),null===u||void 0===u||u(!v)},title:"toggle interactivity","aria-label":"toggle interactivity"},v?n.createElement(p3,null):n.createElement(h3,null)),f)};v3.displayName="Controls";var y3=(0,n.memo)(v3);const x3="TREE_ITEM";var b3=r(37850),w3=r(57822);function _3(e){return(0,Hn.Z)("MuiButtonGroup",e)}const k3=(0,Mn.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),S3=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],T3=(0,nn.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{["& .".concat(k3.grouped)]:t.grouped},{["& .".concat(k3.grouped)]:t["grouped".concat((0,$n.Z)(r.orientation))]},{["& .".concat(k3.grouped)]:t["grouped".concat((0,$n.Z)(r.variant))]},{["& .".concat(k3.grouped)]:t["grouped".concat((0,$n.Z)(r.variant)).concat((0,$n.Z)(r.orientation))]},{["& .".concat(k3.grouped)]:t["grouped".concat((0,$n.Z)(r.variant)).concat((0,$n.Z)(r.color))]},{["& .".concat(k3.firstButton)]:t.firstButton},{["& .".concat(k3.lastButton)]:t.lastButton},{["& .".concat(k3.middleButton)]:t.middleButton},t.root,t[r.variant],!0===r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,"vertical"===r.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:r}=e;return(0,P.Z)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===r.variant&&{boxShadow:(t.vars||t).shadows[2]},r.disableElevation&&{boxShadow:"none"},r.fullWidth&&{width:"100%"},"vertical"===r.orientation&&{flexDirection:"column"},{["& .".concat(k3.grouped)]:(0,P.Z)({minWidth:40,"&:hover":(0,P.Z)({},"contained"===r.variant&&{boxShadow:"none"})},"contained"===r.variant&&{boxShadow:"none"}),["& .".concat(k3.firstButton,",& .").concat(k3.middleButton)]:(0,P.Z)({},"horizontal"===r.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===r.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===r.variant&&"horizontal"===r.orientation&&{borderRight:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(k3.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===r.variant&&"vertical"===r.orientation&&{borderBottom:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(k3.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===r.variant&&"inherit"!==r.color&&{borderColor:t.vars?"rgba(".concat(t.vars.palette[r.color].mainChannel," / 0.5)"):(0,rn.Fq)(t.palette[r.color].main,.5)},"outlined"===r.variant&&"horizontal"===r.orientation&&{borderRightColor:"transparent"},"outlined"===r.variant&&"vertical"===r.orientation&&{borderBottomColor:"transparent"},"contained"===r.variant&&"horizontal"===r.orientation&&{borderRight:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(k3.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===r.variant&&"vertical"===r.orientation&&{borderBottom:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(k3.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===r.variant&&"inherit"!==r.color&&{borderColor:(t.vars||t).palette[r.color].dark},{"&:hover":(0,P.Z)({},"outlined"===r.variant&&"horizontal"===r.orientation&&{borderRightColor:"currentColor"},"outlined"===r.variant&&"vertical"===r.orientation&&{borderBottomColor:"currentColor"})}),["& .".concat(k3.lastButton,",& .").concat(k3.middleButton)]:(0,P.Z)({},"horizontal"===r.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===r.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===r.variant&&"horizontal"===r.orientation&&{marginLeft:-1},"outlined"===r.variant&&"vertical"===r.orientation&&{marginTop:-1})})})),M3=n.forwardRef((function(e,t){const r=(0,on.Z)({props:e,name:"MuiButtonGroup"}),{children:i,className:o,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:h="horizontal",size:p="medium",variant:m="outlined"}=r,g=(0,R.Z)(r,S3),v=(0,P.Z)({},r,{color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:h,size:p,variant:m}),y=(e=>{const{classes:t,color:r,disabled:n,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,"vertical"===a&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped","grouped".concat((0,$n.Z)(a)),"grouped".concat((0,$n.Z)(s)),"grouped".concat((0,$n.Z)(s)).concat((0,$n.Z)(a)),"grouped".concat((0,$n.Z)(s)).concat((0,$n.Z)(r)),n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,tn.Z)(l,_3,t)})(v),x=n.useMemo((()=>({className:y.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:p,variant:m})),[a,l,c,u,d,f,p,m,y.grouped]),b=function(e){return n.Children.toArray(e).filter((e=>n.isValidElement(e)))}(i),w=b.length,_=e=>{const t=0===e,r=e===w-1;return t&&r?"":t?y.firstButton:r?y.lastButton:y.middleButton};return(0,z.jsx)(T3,(0,P.Z)({as:s,role:"group",className:(0,en.Z)(y.root,o),ref:t,ownerState:v},g,{children:(0,z.jsx)(gp.Provider,{value:x,children:b.map(((e,t)=>(0,z.jsx)(vp.Provider,{value:_(t),children:e},t)))})}))})),C3=M3;function A3(e,t,r){return"".concat(e,"--").concat(t,"--").concat(r)}function E3(e){return e.split("--")[2]}function I3(e){if(null!=e.sourceHandle&&null!=e.targetHandle){const t=E3(e.sourceHandle),r=E3(e.targetHandle);return"SpikingActivityData"===t?"FluoData"===r||"SpikingActivityData"===r:t===r}return!0}function O3(e){var t;return b((t=e,e=>null!=e.handleColor.colorMap[t]?e.handleColor.colorMap[t]:void 0))}const P3=e=>{let{children:t,nodeId:r,selected:n,updated:i}=e;const o=zo();let a;return i?a=n?(0,rn.Fq)(o.palette.warning.light,.3):(0,rn.Fq)(o.palette.warning.light,.1):n&&(a=(0,rn.Fq)(o.palette.primary.light,.2)),(0,z.jsxs)("div",{style:{height:"100%",width:"100%",background:a,display:"flex",flexDirection:"column"},children:[(0,z.jsx)(yi,{margin:1,marginBottom:0,children:t}),(0,z.jsx)(Eh,{title:r,placement:"bottom-start",children:(0,z.jsx)(Ki,{marginX:1,marginTop:"auto",marginBottom:"4px",color:lQ.Z[600],fontSize:14,variant:"body2",overflow:"ellipsis",children:r})})]})};function R3(e){return"child"===e.type}function L3(e,t){let r=null;for(const[n,i]of Object.entries(e))if(R3(i)?n===t&&(r=i):r=L3(i.children,t),null!=r)break;return r}function j3(e){const t={};return Object.entries(e).forEach((e=>{let[r,n]=e;if(Object.prototype.hasOwnProperty.call(n,"children"))t[r]={type:"parent",children:j3(n.children)};else{const e=n;t[r]={type:"child",functionPath:e.path,args:e.args,returns:e.returns}}})),t}const D3=e=>e.algorithmList,z3=e=>D3(e).isLatest,N3=e=>D3(e).tree,F3=e=>e.flowElement.flowNodes,B3=e=>e.flowElement.flowEdges,Z3=e=>e.flowElement.flowPosition,U3=e=>t=>F3(t).find((t=>t.id===e)),V3=e=>t=>{var r,n;return null===(r=U3(e)(t))||void 0===r||null===(n=r.data)||void 0===n?void 0:n.label},H3=e=>t=>{const r=(e=>t=>B3(t).filter((t=>t.target===e)).map((e=>e.source)))(e)(t);return 0!==r.length&&(!!r.some((e=>(e=>t=>{var r;return null===(r=t.algorithmNode[e])||void 0===r?void 0:r.isUpdate})(e)(t)))||r.some((e=>H3(e)(t))))},W3="none",G3="nwb",q3="paramForm",Y3="snakemake",X3={open:!1,mode:W3,currendNodeId:null},K3=Vl({name:"rightDrawer",initialState:X3,reducers:{openRightDrawer:(e,t)=>{e.open=!0,e.mode=t.payload},closeRightDrawer:e=>{e.open=!1,e.mode=W3},toggleParamForm:(e,t)=>{e.open&&e.mode===q3&&e.currendNodeId===t.payload?(e.open=!1,e.mode=W3,e.currendNodeId=null):(e.open=!0,e.mode=q3,e.currendNodeId=t.payload)},toggleNwb:e=>{e.open&&e.mode===G3?(e.open=!1,e.mode=W3):(e.open=!0,e.mode=G3),e.currendNodeId=null},toggleSnakemake:e=>{e.open&&e.mode===Y3?(e.open=!1,e.mode=W3):(e.open=!0,e.mode=Y3),e.currendNodeId=null}},extraReducers:e=>{e.addCase(uk,((e,t)=>{t.payload.findIndex((t=>t.id===e.currendNodeId))>0&&(e.currendNodeId=null)})).addCase(fk,((e,t)=>{t.payload===e.currendNodeId&&(e.currendNodeId=null)})).addMatcher(Jl(ik,X_.fulfilled,K_.fulfilled,Y_.fulfilled,Y_.rejected),(()=>X3))}}),{toggleParamForm:$3,toggleNwb:J3,toggleSnakemake:Q3,openRightDrawer:e5,closeRightDrawer:t5}=K3.actions,r5=K3.reducer,n5=(0,n.memo)((function(e){var t;return b((t=e.id,e=>Object.keys(e.algorithmNode).includes(t)))?(0,z.jsx)(i5,{...e}):null})),i5=(0,n.memo)((function(e){let{id:t,selected:r,isConnectable:i,data:o}=e;const{onOpenOutputDialog:a}=(0,n.useContext)(G1),s=E(),l=h5(t),c=b(Rk),u=b(H3(t)),d=b(N1(t)),f="undefined"!==typeof c&&(d||u);return(0,z.jsxs)(P3,{nodeId:t,selected:r,updated:!!f,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{s(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(o5,{nodeId:t}),(0,z.jsxs)(zp,{container:!0,paddingBottom:1,justifyContent:"space-between",children:[(0,z.jsx)(zp,{item:!0,xs:10,children:(0,z.jsx)(a5,{nodeId:t,data:o})}),(0,z.jsx)(zp,{item:!0,xs:2,children:(0,z.jsx)(d5,{nodeId:t})})]}),(0,z.jsxs)(C3,{children:[(0,z.jsx)(Sp,{size:"small",onClick:()=>{s($3(t))},disabled:l===kk.PENDING,children:"Param"}),(0,z.jsx)(Sp,{size:"small",onClick:()=>{a(t)},disabled:l===kk.PENDING,children:"Output"})]}),(0,z.jsx)(s5,{nodeId:t}),(0,z.jsx)(l5,{nodeId:t,isConnectable:i})]})})),o5=(0,n.memo)((function(e){let{nodeId:t}=e;const r=h5(t);return b(Nk)===xk&&r===kk.PENDING?(0,z.jsx)("div",{style:{paddingLeft:8,paddingRight:8},children:(0,z.jsx)(VQ,{})}):null})),a5=function(e){let{nodeId:t,data:r}=e;const n=zo(),i=h5(t);return(0,z.jsx)("div",{className:"algoName",children:(0,z.jsx)(Ki,{style:{textAlign:"left",color:i===kk.ERROR?n.palette.error.main:void 0},children:r.label})})},s5=(0,n.memo)((function(e){let{nodeId:t}=e;const r=b((e=>t=>{const r=D1(e)(t);if(null!=r){const e=L3(N3(t),r);return null===e||void 0===e?void 0:e.args}})(t),f5);return(0,z.jsx)(z.Fragment,{children:null!=r?r.filter((e=>"params"!==e.type)).map(((e,r)=>(0,z.jsx)(c5,{algoInfo:e,i:r,nodeId:t},r))):null})})),l5=(0,n.memo)((function(e){let{nodeId:t,isConnectable:r}=e;const n=b((e=>t=>{const r=D1(e)(t);if(null!=r){const e=L3(N3(t),r);return null===e||void 0===e?void 0:e.returns}})(t),f5);return(0,z.jsx)(z.Fragment,{children:null!=n?null===n||void 0===n?void 0:n.map(((e,r)=>(0,z.jsx)(u5,{algoInfo:e,i:r,nodeId:t},r))):(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:"".concat(t),style:{...m_},isConnectable:r})})}));const c5=(0,n.memo)((function(e){let{algoInfo:{name:t,type:r,isNone:i},nodeId:o,i:a}=e;const s=O3(r),l=A3(o,t,r),[c,u]=(0,n.useState)(!1),d=function(e,t){if(void 0!==e){const r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return null!==r?t?"rgba(".concat(parseInt(r[1],16),", ").concat(parseInt(r[2],16),", ").concat(parseInt(r[3],16),", 0.55)"):"rgba(".concat(parseInt(r[1],16),", ").concat(parseInt(r[2],16),", ").concat(parseInt(r[3],16),", 1)"):void 0}}(s,i);return(0,z.jsx)(Vx,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),type:"target",position:nx.Left,id:l,style:{...m_,background:d,top:25*a+15},isValidConnection:I3,children:(0,z.jsx)(Eh,{title:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(Ki,{color:"inherit",children:["name: ",t]}),(0,z.jsxs)(Ki,{color:"inherit",children:["type: ",r]})]}),open:c,placement:"left-end",arrow:!0,children:(0,z.jsx)("div",{})})},a.toFixed())})),u5=(0,n.memo)((function(e){let{algoInfo:{name:t,type:r},nodeId:i,i:o}=e;const a=O3(r),s=A3(i,t,r),[l,c]=(0,n.useState)(!1);return(0,z.jsx)(Vx,{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),type:"source",position:nx.Right,id:s,style:{...m_,background:a,top:25*o+15},isValidConnection:I3,children:(0,z.jsx)(Eh,{title:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(Ki,{color:"inherit",children:["name: ",t]}),(0,z.jsxs)(Ki,{color:"inherit",children:["type: ",r]})]}),open:l,placement:"right-end",arrow:!0,children:(0,z.jsx)("div",{})})},o.toFixed())})),d5=(0,n.memo)((function(e){let{nodeId:t}=e;const r=h5(t),i=b(Rk),o=b((e=>{var r;return null!=i&&null!==(r=(e=>t=>{const r=jk(t);return Ek(r)&&Object.keys(r.runResult).includes(e)?r.runResult[e].message:null})(t)(e))&&void 0!==r?r:null})),a=(0,n.useRef)(null),s=zo(),{onMessageError:l}=(0,n.useContext)(G1);return r===kk.ERROR?(0,z.jsx)(ni,{ref:a,onClick:()=>{l({anchorElRef:a,message:o})},size:"small",style:{color:s.palette.error.main,padding:0},children:(0,z.jsx)(w3.Z,{})}):r===kk.SUCCESS?(0,z.jsx)(b3.Z,{color:"success",style:{verticalAlign:"middle"}}):null}));function f5(e,t){return null!=e&&null!=t?e===t||e.length===t.length&&e.every(((e,r)=>e.type===t[r].type&&e.name===t[r].name)):void 0===e&&void 0===t}function h5(e){const t=b(Rk);return b((r=>null!=t?Uk(e)(r):"uninitialized"))}var p5=r(15962),m5=r(44661),g5=r(59344),v5=r(5982),y5=r(82495);function x5(e){return e.fileType===N_}function b5(e){return e.fileType===V_}function w5(e){return e.fileType===B_}const _5=e=>t=>t.inputNode[e],k5=e=>t=>Object.keys(t.inputNode).includes(e),S5=e=>t=>{const r=_5(e)(t);if(x5(r))return r.selectedFilePath;throw new Error("invalid input node type")},T5=e=>t=>{const r=_5(e)(t);if(r.fileType===F_)return r.selectedFilePath;throw new Error("invalid input node type")},M5=e=>t=>{const r=_5(e)(t);if(w5(r))return r.selectedFilePath;throw new Error("invalid input node type")},C5=e=>t=>{const r=_5(e)(t);if(b5(r))return r.selectedFilePath;throw new Error("invalid input node type")},A5=e=>t=>{const r=_5(e)(t);if(r.fileType===H_)return r.selectedFilePath;throw new Error("invalid input node type")},E5=e=>0===Object.keys(e.inputNode).length||Object.values(e.inputNode).filter((e=>{if(w5(e))return null==e.selectedFilePath||null==e.hdf5Path;{const t=e.selectedFilePath;return Array.isArray(t)?0===t.length:null==t}})).length>0,I5=e=>t=>{const r=_5(e)(t);if(x5(r))return r.param;throw new Error("The InputNode is not CsvInputNode. (nodeId: ".concat(e,")"))},O5=e=>t=>{const r=_5(e)(t);return w5(r)?r.hdf5Path:void 0},P5=e=>t=>{const r=_5(e)(t);return b5(r)?r.matPath:void 0},R5=e=>t=>{const r=_5(e)(t);if(function(e){return e.fileType===W_}(r))return r.selectedFilePath;throw new Error("invalid input node type")},L5={[f_]:{fileType:W_,param:{}}},j5=Vl({name:z_,initialState:L5,reducers:{deleteInputNode(e,t){delete e[t.payload]},setCsvInputNodeParam(e,t){const{nodeId:r,param:n}=t.payload,i=e[r];x5(i)&&(i.param=n)},setInputNodeMatlabPath(e,t){const{nodeId:r,path:n}=t.payload,i=e[r];b5(i)&&(i.matPath=n)},setInputNodeHDF5Path(e,t){const{nodeId:r,path:n}=t.payload,i=e[r];w5(i)&&(i.hdf5Path=n)}},extraReducers:e=>e.addCase(G_,((e,t)=>{const{nodeId:r,filePath:n}=t.payload,i=e[r];i.selectedFilePath=n,w5(i)&&(i.hdf5Path=void 0)})).addCase(D_,((e,t)=>{var r;const{node:n,fileType:i}=t.payload;if((null===(r=n.data)||void 0===r?void 0:r.type)===o_.INPUT)switch(i){case N_:e[n.id]={fileType:i,param:{setHeader:null,setIndex:!1,transpose:!1}};break;case F_:case B_:e[n.id]={fileType:i,param:{}};break;case Z_:case U_:e[n.id]={fileType:N_,param:{setHeader:null,setIndex:!1,transpose:!1}};break;case V_:case H_:case W_:e[n.id]={fileType:i,param:{}}}})).addCase(ik,(()=>L5)).addCase(uk,((e,t)=>{t.payload.forEach((t=>{var r;(null===(r=t.data)||void 0===r?void 0:r.type)===o_.INPUT&&delete e[t.id]}))})).addCase(fk,((e,t)=>{Object.keys(e).includes(t.payload)&&delete e[t.payload]})).addCase(I_.fulfilled,((e,t)=>{const{nodeId:r}=t.meta.arg;if(null!=r){const{resultPath:n}=t.payload,i=e[r];i.fileType===F_?i.selectedFilePath=[n]:i.selectedFilePath=n}})).addCase(Y_.rejected,(()=>L5)).addCase(K_.fulfilled,((e,t)=>{const r={};return Object.values(t.payload.nodeDict).filter(u_).forEach((e=>{null!=e.data&&(e.data.fileType===F_?r[e.id]={fileType:F_,param:{}}:e.data.fileType===N_?r[e.id]={fileType:N_,param:e.data.param}:e.data.fileType===V_?r[e.id]={fileType:V_,param:{}}:e.data.fileType===B_?r[e.id]={fileType:B_,param:{}}:e.data.fileType===H_?r[e.id]={fileType:H_,param:{}}:e.data.fileType===W_&&(r[e.id]={fileType:W_,param:{}}))})),r})).addMatcher(Jl(Y_.fulfilled,X_.fulfilled),((e,t)=>{const r={};return Object.values(t.payload.nodeDict).filter(u_).forEach((e=>{null!=e.data&&(e.data.fileType===F_?r[e.id]={fileType:F_,selectedFilePath:e.data.path,param:{}}:e.data.fileType===N_?r[e.id]={fileType:N_,selectedFilePath:e.data.path,param:e.data.param}:e.data.fileType===V_?r[e.id]={fileType:V_,matPath:e.data.matPath,selectedFilePath:e.data.path,param:{}}:e.data.fileType===B_?r[e.id]={fileType:B_,hdf5Path:e.data.hdf5Path,selectedFilePath:e.data.path,param:{}}:e.data.fileType===H_?r[e.id]={fileType:H_,selectedFilePath:e.data.path,param:{}}:e.data.fileType===W_&&(r[e.id]={fileType:W_,selectedFilePath:e.data.path,param:{}}))})),r}))}),{setCsvInputNodeParam:D5,setInputNodeMatlabPath:z5,setInputNodeHDF5Path:N5}=j5.actions,F5=j5.reducer,B5=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(Z5,{...e}):null})),Z5=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i=b(S5(t));return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,onChangeFilePath:e=>{Array.isArray(e)||(e=>{n(G_({nodeId:t,filePath:e}))})(e)},fileType:N_,filePath:null!==i&&void 0!==i?i:""}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"csv","CsvData"),style:{...m_}})]})})),U5=(0,n.memo)((function(e){let{nodeId:t,filePath:r}=e;const[i,o]=(0,n.useState)(!1),[a,s]=(0,n.useState)(b((e=>t=>I5(e)(t).setHeader)(t))),[l,c]=(0,n.useState)(b((e=>t=>I5(e)(t).setIndex)(t))),[u,d]=(0,n.useState)(b((e=>t=>I5(e)(t).transpose)(t))),f=E(),h=()=>{o(!1)};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ni,{onClick:()=>o(!0),sx:{padding:0},color:"primary",children:(0,z.jsx)(y5.Z,{})}),(0,z.jsxs)(Kh,{open:i,onClose:h,children:[(0,z.jsx)(rp,{children:"Csv Setting"}),(0,z.jsxs)(sp,{dividers:!0,children:[(0,z.jsxs)(yi,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,z.jsx)(yZ,{sx:{margin:e=>e.spacing(0,1,0,1),whiteSpace:"nowrap"},control:(0,z.jsx)(qV,{checked:u,onChange:e=>d(e.target.checked)}),label:"Transpose"}),(0,z.jsx)(yZ,{sx:{margin:e=>e.spacing(0,1,0,1),whiteSpace:"nowrap"},control:(0,z.jsx)(qV,{checked:null!=a,onChange:e=>{e.target.checked?s(0):s(null)}}),label:"Set Header"}),null!=a&&(0,z.jsx)(BV,{label:"header",sx:{width:100,margin:e=>e.spacing(0,1,0,1)},type:"number",InputLabelProps:{shrink:!0},onChange:e=>{const t=Number(e.target.value);t>=0&&s(t)},value:a}),(0,z.jsx)(yZ,{sx:{margin:e=>e.spacing(0,1,0,1),whiteSpace:"nowrap"},control:(0,z.jsx)(qV,{checked:l,onChange:e=>c(e.target.checked)}),label:"Set Index"})]}),(0,z.jsx)(Ki,{variant:"h6",children:"Preview"}),(0,z.jsx)(V5,{filePath:r,transpose:u,setHeader:a,setIndex:l})]}),(0,z.jsxs)(fp,{children:[(0,z.jsx)(Sp,{onClick:h,variant:"outlined",children:"cancel"}),(0,z.jsx)(Sp,{onClick:()=>{o(!1),f(D5({nodeId:t,param:{setHeader:a,setIndex:l,transpose:u}}))},variant:"contained",children:"OK"})]})]})]})})),V5=(0,n.memo)((function(e){let{filePath:t,...r}=e;const i=b(_S(t)),o=b(SS(t)),a=b(TS(t)),s=b(kS(t)),l=E(),c=b(qp);return(0,n.useEffect)((()=>{c&&!i&&l(Qk({path:t,workspaceId:c}))}),[l,i,t,c]),o?(0,z.jsx)(VQ,{}):null!=s?(0,z.jsx)(Ki,{color:"error",children:s}):a?(0,z.jsx)(KQ,{path:t,...r}):null})),H5=(0,n.memo)((function(e){return(0,z.jsxs)(yi,{display:"flex",alignItems:"center",children:[(0,z.jsx)(yi,{width:"100%",mr:1,children:(0,z.jsx)(VQ,{variant:"determinate",...e})}),(0,z.jsx)(yi,{minWidth:35,children:(0,z.jsx)(Ki,{variant:"body2",color:"textSecondary",children:"".concat(Math.round(e.value),"%")})})]})})),W5={path:void 0,fileName:void 0,isUninitialized:!0,pending:!1,fulfilled:!1,uploadingProgress:void 0,error:void 0},G5=e=>t=>Object.keys(t.fileUploader).includes(e)?t.fileUploader[e]:W5;function q5(e){let{fileType:t,nodeId:r}=e;const i=E(),o=(0,n.useRef)(Hl()),a=b(qp),s=(0,n.useCallback)(((e,n)=>{if(!a)throw new Error("workspaceId is undefined");i(I_({workspaceId:a,requestId:o.current,nodeId:r,fileName:n,formData:e,fileType:t}))}),[i,a,t,r]),l=b((e=>t=>G5(e)(t).isUninitialized)(o.current)),c=b((e=>t=>G5(e)(t).path)(o.current)),u=b((e=>t=>G5(e)(t).pending)(o.current)),d=b((e=>t=>G5(e)(t).fulfilled)(o.current)),f=b((e=>t=>G5(e)(t).uploadingProgress)(o.current)),h=b((e=>t=>G5(e)(t).error)(o.current));return{filePath:c,uninitialized:l,pending:u,fulfilled:d,progress:f,error:h,onUploadFile:s,id:o}}const Y5=(0,n.memo)((function(e){let{nameNode:t,multiSelect:r=!1,filePath:n,nodeId:i,fileType:o,setOpen:a,onChangeFilePath:s}=e;const{onUploadFile:l,pending:c,uninitialized:u,progress:d,error:f,id:h}=q5({fileType:o,nodeId:i});return(0,z.jsxs)(z.Fragment,{children:[!u&&c&&null!=d&&(0,z.jsx)("div",{style:{marginLeft:2,marginRight:2},children:(0,z.jsx)(H5,{value:d})}),(0,z.jsx)(Ki,{children:t||o}),(0,z.jsx)(X5,{multiSelect:r,filePath:n,onSelectFile:s,onUploadFile:(e,t)=>{l(e,t)},fileTreeType:o,selectButtonLabel:(0,z.jsx)(v5.Z,{}),uploadViaUrl:(0,z.jsx)(m5.Z,{}),nodeId:i,id:h.current,setOpen:a}),null!=f&&(0,z.jsx)(Ki,{variant:"caption",color:"error",children:f})]})})),X5=(0,n.memo)((function(e){let{multiSelect:t=!1,filePath:r,onSelectFile:i,onUploadFile:o,fileTreeType:a,selectButtonLabel:s,uploadButtonLabel:l,uploadViaUrl:c,nodeId:u,id:d,setOpen:f}=e;const{onOpenFileSelectDialog:h,onOpenClearWorkflowIdDialog:p,onOpenInputUrlDialog:m}=(0,n.useContext)(G1),g=E(),v=b(Rk),y=b(Bk),x=b(qp),w=(0,n.useRef)(null),_=()=>{null!=w.current&&w.current.click()};(0,n.useEffect)((()=>{u&&m({fileType:a,open:!1,filePath:r,nodeId:u,requestId:d})}),[]);const k=function(e){switch(e){case T_.MATLAB:return".mat";case T_.IMAGE:return".tif,.tiff";case T_.CSV:return".csv";case T_.HDF5:return".hdf5,.nwb";case T_.MICROSCOPE:return".nd2,.oir,.isxd,.thor.zip,.xml";default:return}}(a),S=l_(r);return(0,z.jsxs)("div",{children:[(0,z.jsxs)(C3,{size:"small",style:{marginRight:4},children:[(0,z.jsx)(Eh,{title:"Select from uploaded files",children:(0,z.jsx)("span",{children:(0,z.jsx)(ni,{color:"primary",disabled:!!y,onClick:()=>{h({open:!0,multiSelect:t,filePath:r,fileTreeType:a,onSelectFile:i}),x&&a&&g(C_({workspaceId:x,fileType:a}))},children:s||"Select File"})})}),(0,z.jsx)(Eh,{title:"Upload file",children:(0,z.jsx)("span",{children:(0,z.jsx)(ni,{onClick:()=>{null!=v?p({open:!0,handleOk:()=>{_()},handleCancel:()=>{}}):_()},color:"primary",disabled:!!y,children:l||(0,z.jsx)(g5.Z,{})})})}),c?(0,z.jsx)(Eh,{title:"Upload file via URL",children:(0,z.jsx)("span",{children:(0,z.jsx)(ni,{onClick:()=>{u&&m({fileType:a,open:!0,filePath:r,nodeId:u,requestId:d})},color:"primary",disabled:!!y,children:c})})}):null,a===T_.CSV&&!!r&&!!u&&(0,z.jsx)(Eh,{title:"Settings",children:(0,z.jsx)("span",{children:(0,z.jsx)(ni,{disabled:!!y,children:(0,z.jsx)(U5,{nodeId:u,filePath:r})})})}),[T_.HDF5,T_.MATLAB].includes(a)&&!!r&&!!u&&(0,z.jsx)(Eh,{title:"Structure",children:(0,z.jsx)("span",{children:(0,z.jsx)(ni,{color:"primary",disabled:!!y,onClick:()=>null===f||void 0===f?void 0:f(!0),children:(0,z.jsx)(p5.Z,{})})})})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)("input",{ref:w,type:"file",onChange:e=>{if(e.preventDefault(),null!=e.target.files&&null!=e.target.files[0]){const t=e.target.files[0],r=new FormData;r.append("file",t);const n=t.name;o(r,n)}},accept:k,style:{visibility:"hidden",width:0,height:0}}),(0,z.jsx)(Eh,{title:S||null,placement:"right",children:(0,z.jsx)(Ki,{className:"selectFilePath",variant:"body2",children:S||"No file is selected."})})]})]})}));const K5=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)($5,{...e}):null})),$5=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i=b(S5(t)),o="BehaviorData",a=O3(o);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,onChangeFilePath:e=>{Array.isArray(e)||(e=>{n(G_({nodeId:t,filePath:e}))})(e)},nameNode:U_,fileType:N_,filePath:null!==i&&void 0!==i?i:""}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"behavior",o),style:{...m_,background:a}})]})})),J5=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(Q5,{...e}):null})),Q5=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i="ExpDbData",o=O3(i);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(e4,{nodeId:t}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"expdb",i),style:{...m_,background:o}})]})})),e4=(0,n.memo)((function(e){let{nodeId:t}=e;const[r,i]=(0,n.useState)(!1),o=b(R5(t));return(0,z.jsxs)("div",{children:[(0,z.jsx)(Sp,{size:"small",variant:"outlined",onClick:()=>i(!0),children:"Select"}),(0,z.jsx)(t4,{nodeId:t,open:r,setOpen:i}),(0,z.jsx)(Ki,{children:o?"Selected experiment id: ".concat(o):"No experiment selected"})]})})),t4=(0,n.memo)((function(e){let{nodeId:t,open:r,setOpen:i}=e;const o=b(uE),[a,s]=(0,n.useState)(void 0),l=E(),{enqueueSnackbar:c}=Jr();return(0,z.jsxs)(Kh,{open:r,fullWidth:!0,maxWidth:"lg",children:[(0,z.jsx)(rp,{children:"Experiments"}),(0,z.jsx)(sp,{dividers:!0,children:(0,z.jsx)(Yq,{user:o,cellPath:"/console/cells",handleRowClick:e=>{s(e.row.experiment_id)},readonly:!0})}),(0,z.jsxs)(fp,{children:[(0,z.jsx)(Sp,{onClick:()=>{i(!1),s(void 0)},variant:"outlined",children:"Cancel"}),(0,z.jsx)(Sp,{onClick:()=>{try{i(!1),l(G_({nodeId:t,filePath:a}))}catch(vt){c("Select experiment failed",{variant:"error"})}},variant:"contained",disabled:!a,children:"OK"})]})]})})),r4=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(n4,{...e}):null})),n4=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i=b(S5(t)),o="FluoData",a=O3(o);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,onChangeFilePath:e=>{Array.isArray(e)||(e=>{n(G_({nodeId:t,filePath:e}))})(e)},nameNode:Z_,fileType:N_,filePath:null!==i&&void 0!==i?i:""}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"fluo",o),style:{...m_,background:a}})]})}));const i4="hdf5",o4=Xl("".concat(i4,"/getHDF5Tree"),(async(e,t)=>{let{path:r,workspaceId:n}=e;try{const e=await async function(e,t){return(await dd.get("".concat(cd,"/hdf5/").concat(e,"?workspace_id=").concat(t))).data}(r,n);return e}catch(vt){return t.rejectWithValue(vt)}})),a4=e=>null!=e.hdf5?e.hdf5:void 0,s4=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(l4,{...e}):null})),l4=(0,n.memo)((function(e){let{id:t,selected:r}=e;const i=E(),o=b(M5(t)),[a,s]=(0,n.useState)(!1);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{i(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,onChangeFilePath:e=>{Array.isArray(e)||(e=>{i(G_({nodeId:t,filePath:e}))})(e)},setOpen:s,fileType:B_,filePath:null!==o&&void 0!==o?o:""}),void 0!==o&&(0,z.jsx)(c4,{open:a,setOpen:s,nodeId:t}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"hdf5","HDF5Data"),style:{...m_}})]})})),c4=(0,n.memo)((function(e){let{nodeId:t,open:r,setOpen:n}=e;const i=b(O5(t));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ki,{className:"selectFilePath",variant:"caption",children:i||"No structure is selected."}),(0,z.jsxs)(Kh,{open:r,onClose:()=>n(!1),fullWidth:!0,children:[(0,z.jsx)(rp,{children:"Select File"}),(0,z.jsx)(u4,{nodeId:t}),(0,z.jsxs)(fp,{children:[(0,z.jsx)(Sp,{onClick:()=>n(!1),variant:"outlined",children:"cancel"}),(0,z.jsx)(Sp,{onClick:()=>n(!1),color:"primary",variant:"contained",autoFocus:!0,children:"OK"})]})]})]})})),u4=(0,n.memo)((function(e){let{nodeId:t}=e;const r=zo();return(0,z.jsx)(sp,{dividers:!0,children:(0,z.jsx)("div",{style:{height:300,overflow:"auto",marginBottom:r.spacing(1),border:"1px solid",padding:r.spacing(1),borderColor:r.palette.divider},children:(0,z.jsx)(d4,{nodeId:t})})})})),d4=(0,n.memo)((function(e){let{nodeId:t}=e;const[r,i]=function(e){const t=E(),r=b((e=>{var t;return null===(t=a4(e))||void 0===t?void 0:t.tree})),i=b((e=>{var t,r;return null!==(t=null===(r=a4(e))||void 0===r?void 0:r.isLoading)&&void 0!==t&&t})),o=b(M5(e)),a=b(qp);return(0,n.useEffect)((()=>{a&&!i&&o&&t(o4({path:o,workspaceId:a}))}),[a,o]),[r,i]}(t);return(0,z.jsxs)("div",{children:[i&&(0,z.jsx)(VQ,{}),(0,z.jsx)(z2,{children:null===r||void 0===r?void 0:r.map(((e,r)=>(0,z.jsx)(f4,{node:e,nodeId:t},"hdf5tree-".concat(t,"-").concat(r))))})]})})),f4=(0,n.memo)((function e(t){let{node:r,nodeId:n}=t;const i=E();return r.isDir?(0,z.jsx)(f2,{icon:(0,z.jsx)(Y1.Z,{htmlColor:"skyblue"}),nodeId:r.path,label:r.name,children:r.nodes.map(((t,r)=>(0,z.jsx)(e,{node:t,nodeId:n},r)))}):(0,z.jsx)(f2,{icon:(0,z.jsx)(X1.Z,{fontSize:"small"}),nodeId:r.path,label:r.name+" (shape=".concat(r.shape,", nbytes=").concat(r.nbytes,")"),onClick:()=>{return e=r.path,void i(N5({nodeId:n,path:e}));var e}})}));const h4=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(p4,{...e}):null})),p4=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i=b(T5(t),((e,t)=>null!=e&&null!=t?m$(e,t):e===t)),o="ImageData",a=O3(o);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,multiSelect:!0,onChangeFilePath:e=>{Array.isArray(e)&&(e=>{n(G_({nodeId:t,filePath:e}))})(e)},fileType:F_,filePath:"string"===typeof i?[i]:i||[]}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"image",o),style:{...m_,background:a},isValidConnection:I3})]})}));const m4=Xl("".concat(i4,"/getHDF5Tree"),(async(e,t)=>{let{path:r,workspaceId:n}=e;try{const e=await async function(e,t){return(await dd.get("".concat(cd,"/mat/").concat(e,"?workspace_id=").concat(t))).data}(r,n);return e}catch(vt){return t.rejectWithValue(vt)}})),g4=e=>null!=e.matlab?e.matlab:void 0,v4=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(y4,{...e}):null})),y4=(0,n.memo)((function(e){let{id:t,selected:r}=e;const i=E(),o=b(C5(t)),[a,s]=(0,n.useState)(!1);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{i(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(Y5,{nodeId:t,onChangeFilePath:e=>{Array.isArray(e)||(e=>{i(G_({nodeId:t,filePath:e}))})(e)},setOpen:s,fileType:V_,filePath:null!==o&&void 0!==o?o:""}),void 0!==o&&(0,z.jsx)(x4,{open:a,setOpen:s,nodeId:t}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"matlab","MatlabData"),style:{...m_}})]})})),x4=(0,n.memo)((function(e){let{nodeId:t,open:r,setOpen:i}=e;const o=E(),[a,s]=(0,n.useState)(""),l=b(P5(t));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ki,{className:"selectFilePath",variant:"caption",children:l||"No structure is selected."}),(0,z.jsxs)(Kh,{open:r,onClose:()=>i(!1),fullWidth:!0,children:[(0,z.jsx)(rp,{children:"Select File"}),(0,z.jsx)(b4,{nodeId:t,fileSelect:a,setFileSelect:s}),(0,z.jsxs)(fp,{children:[(0,z.jsx)(Sp,{onClick:()=>{s(""),null===i||void 0===i||i(!1)},color:"primary",variant:"outlined",children:"cancel"}),(0,z.jsx)(Sp,{onClick:()=>{o(z5({nodeId:t,path:a})),null===i||void 0===i||i(!1)},variant:"contained",autoFocus:!0,children:"OK"})]})]})]})})),b4=(0,n.memo)((function(e){let{nodeId:t,fileSelect:r,setFileSelect:n}=e;const i=zo();return(0,z.jsxs)(sp,{dividers:!0,children:[(0,z.jsx)("div",{style:{height:300,overflow:"auto",marginBottom:i.spacing(1),border:"1px solid",padding:i.spacing(1),borderColor:i.palette.divider},children:(0,z.jsx)(w4,{nodeId:t,fileSelect:r,setFileSelect:n})}),(0,z.jsx)(Ki,{children:"Select File"}),(0,z.jsx)(Ki,{variant:"subtitle2",children:r||"---"})]})})),w4=(0,n.memo)((function(e){let{nodeId:t,fileSelect:r,setFileSelect:i}=e;const[o,a]=function(e){const t=E(),r=b((e=>{var t;return null===(t=g4(e))||void 0===t?void 0:t.tree})),i=b((e=>{var t,r;return null!==(t=null===(r=g4(e))||void 0===r?void 0:r.isLoading)&&void 0!==t&&t})),o=b(C5(e)),a=b(qp);return(0,n.useEffect)((()=>{a&&!i&&o&&t(m4({path:o,workspaceId:a}))}),[a,o]),[r,i]}(t);return(0,z.jsxs)("div",{children:[a&&(0,z.jsx)(VQ,{}),(0,z.jsxs)(yi,{display:"flex",paddingBottom:1,children:[(0,z.jsx)(yi,{flexGrow:4,children:"Structure"}),(0,z.jsx)(yi,{flexGrow:2,children:"Type"}),(0,z.jsx)(yi,{flexGrow:3,children:"Shape"}),(0,z.jsx)(yi,{flexGrow:1})]}),(0,z.jsx)(LU,{}),(0,z.jsx)(z2,{children:null===o||void 0===o?void 0:o.map(((e,n)=>(0,z.jsx)(k4,{fileSelect:r,setFileSelect:i,node:e,nodeId:t},"matlabtree-".concat(t,"-").concat(n))))})]})})),_4=(0,n.memo)((function(e){let{isFile:t=!1,label:r,shape:n,type:i,checkboxProps:o}=e;return(0,z.jsxs)(yi,{display:"flex",alignItems:"center",gap:2,children:[(0,z.jsx)(Eh,{title:(0,z.jsx)("span",{style:{fontSize:14},children:r}),placement:"left",children:(0,z.jsx)(yi,{width:t?"35%":"32%",overflow:"hidden",textOverflow:"ellipsis",children:r})}),(0,z.jsx)(yi,{width:"20%",children:i}),(0,z.jsx)(yi,{width:"25%",children:n?"(".concat(n.join(", "),")"):""}),(0,z.jsx)(yi,{children:(0,z.jsx)(uV,{...o,disableRipple:!0,size:"small",sx:{marginRight:"4px",padding:"2px"}})})]})})),k4=(0,n.memo)((function e(t){let{node:r,nodeId:i,setFileSelect:o,fileSelect:a}=t;const s=E(),l=b(P5(i));(0,n.useEffect)((()=>{l&&(null===o||void 0===o||o(l))}),[s,l]);return r.isDir?(0,z.jsx)(f2,{icon:(0,z.jsx)(Y1.Z,{htmlColor:"skyblue"}),nodeId:r.path,label:r.name,children:r.nodes.map(((t,r)=>(0,z.jsx)(e,{setFileSelect:o,fileSelect:a,node:t,nodeId:i},r)))}):(0,z.jsx)(f2,{icon:(0,z.jsx)(X1.Z,{fontSize:"small"}),nodeId:r.path,label:(0,z.jsx)(_4,{isFile:!0,label:r.name,type:r.dataType,shape:r.shape,checkboxProps:{checked:a===r.path}}),onClick:()=>{return e=r.path,void(null===o||void 0===o||o(e===a?"":e));var e}})}));const S4=(0,n.memo)((function(e){return b(k5(e.id))?(0,z.jsx)(T4,{...e}):null})),T4=(0,n.memo)((function(e){let{id:t,selected:r}=e;const n=E(),i="MicroscopeData",o=O3(i);return(0,z.jsxs)(P3,{nodeId:t,selected:r,children:[(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{n(fk(t))},style:{color:"black",position:"absolute",top:-10,right:10},children:"\xd7"}),(0,z.jsx)(M4,{nodeId:t}),(0,z.jsx)(Vx,{type:"source",position:nx.Right,id:A3(t,"microscope",i),style:{...m_,background:o},isValidConnection:I3})]})})),M4=(0,n.memo)((function(e){let{nodeId:t}=e;const[r,i]=(0,n.useState)(!1),o=b(A5(t));return(0,z.jsxs)("div",{children:[(0,z.jsx)(Sp,{size:"small",variant:"outlined",onClick:()=>i(!0),children:"Select"}),(0,z.jsx)(t4,{nodeId:t,open:r,setOpen:i}),(0,z.jsx)(Ki,{children:o?"Selected experiment id: ".concat(o):"No experiment selected"})]})})),C4={ImageFileNode:h4,CsvFileNode:B5,MatlabFileNode:v4,HDF5FileNode:s4,AlgorithmNode:n5,FluoFileNode:r4,BehaviorFileNode:K5,MicroscopeFileNode:S4,ExpDbNode:J5},A4={buttonedge:e=>{let{id:t,sourceX:r,sourceY:n,targetX:i,targetY:o,sourcePosition:a,targetPosition:s,style:l={},markerEnd:c}=e;const[u,d,f]=gx({sourceX:r,sourceY:n,sourcePosition:a,targetX:i,targetY:o,targetPosition:s}),h=E();return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("path",{id:t,style:l,className:"react-flow__edge-path",d:u,markerEnd:c}),(0,z.jsx)("foreignObject",{width:40,height:40,x:d-20,y:f-20,className:"edgebutton-foreignobject",children:(0,z.jsx)("button",{className:"flowbutton",onClick:()=>{h(dk(t))},children:"\xd7"})})]})}};var E4=r(69883);const I4=(0,Pd.Z)((0,z.jsx)("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"}),"AddToPhotos"),O4=(0,n.memo)((function(){const[e,t]=(0,n.useState)(!1),r=E(),i=b(Bk);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Eh,{title:"Create new workflow",children:(0,z.jsx)(ni,{onClick:()=>{t(!0)},color:"primary",disabled:!!i,children:(0,z.jsx)(I4,{})})}),(0,z.jsx)(Np,{open:e,setOpen:t,onConfirm:()=>{r(ik())},title:"Create new workflow?",content:"Current workflow will be cleared.\n If the workflow has already been run, the record will NOT be deleted.",iconType:"info"})]})})),P4=(0,Pd.Z)((0,z.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFile"),R4=(0,n.memo)((function(){const e=E(),t=(0,n.useRef)(null),{enqueueSnackbar:r}=Jr(),i=b(Bk);return(0,z.jsx)(Eh,{title:"Import workflow yaml file",children:(0,z.jsxs)(ni,{onClick:()=>{var e;null===(e=t.current)||void 0===e||e.click()},color:"primary",disabled:!!i,children:[(0,z.jsx)(P4,{}),(0,z.jsx)("input",{hidden:!0,ref:t,type:"file",accept:".yaml,.yml",onChange:t=>{if(t.preventDefault(),null!=t.target.files&&null!=t.target.files[0]){const n=t.target.files[0],i=new FormData;i.append("file",n),e(K_({formData:i})).unwrap().then((()=>{r("Import success",{variant:"success"}),e(mC())})).catch((()=>{r("Invalid yaml file",{variant:"error"})}))}}})]})})}));var L4=r(99123);const j4=(0,n.memo)((function(){const e=E(),t=b(Bk);return(0,z.jsx)(Eh,{title:"NWB settings",children:(0,z.jsx)(ni,{onClick:()=>{e(J3())},color:"primary",disabled:!!t,children:(0,z.jsx)(L4.Z,{})})})})),D4=(0,Pd.Z)((0,z.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var z4=r(54406),N4=r(84764);const F4=(0,n.memo)((function(e){const{uid:t,runDisabled:r,filePathIsUndefined:i,algorithmNodeNotExist:o,handleCancelPipeline:a,handleRunPipeline:s,handleRunPipelineByUid:l}=e,c=E(),u=b(Dk),d=b(Bk),f=(0,n.useRef)(!1),[h,p]=(0,n.useState)(!1),{enqueueSnackbar:m}=Jr(),[g,v]=(0,n.useState)(!1),y=(0,n.useRef)(null),x=e=>{y.current&&y.current.contains(e.target)||v(!1)},w=null!=t;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(C3,{sx:{margin:1},variant:"contained",ref:y,disabled:r,children:[(0,z.jsx)(Sp,{onClick:()=>{let e=null;if(o&&(e="please add some algorithm nodes to the flowchart"),i&&(e="please select input file"),null!=e)m(e,{variant:"error"});else if(u===Sk.RUN_NEW)p(!0);else{if(f.current)return;f.current=!0,l(),setTimeout((()=>{f.current=!1}),3e3)}},startIcon:u===Sk.RUN_ALREADY?(0,z.jsx)(TX.Z,{}):(0,z.jsx)(D4,{}),children:Tk[u]}),(0,z.jsx)(Sp,{size:"small",onClick:()=>{v((e=>!e))},children:(0,z.jsx)(z4.Z,{})})]}),(0,z.jsx)(mh,{open:g,anchorEl:y.current,role:void 0,transition:!0,disablePortal:!0,children:e=>{let{TransitionProps:t,placement:r}=e;return(0,z.jsx)(Wo,{...t,style:{transformOrigin:"bottom"===r?"center top":"center bottom"},children:(0,z.jsx)(Pi,{children:(0,z.jsx)(wD,{onClickAway:x,children:(0,z.jsx)(So,{children:Object.values(Sk).map((e=>(0,z.jsx)(is,{disabled:!w&&e===Sk.RUN_ALREADY,selected:e===u,onClick:t=>((e,t)=>{c(GK({runBtnOption:t})),v(!1)})(0,e),children:Tk[e]},e)))})})})})}}),d&&(0,z.jsx)(Eh,{title:"Cancel Workflow",children:(0,z.jsx)(ni,{onClick:()=>{a()},children:(0,z.jsx)(N4.Z,{color:"error"})})}),(0,z.jsx)(B4,{open:h,handleRun:e=>{f.current||(f.current=!0,s(e),setTimeout((()=>{f.current=!1}),3e3),p(!1))},handleClose:()=>p(!1)})]})})),B4=(0,n.memo)((function(e){let{open:t,handleClose:r,handleRun:i}=e;const[o,a]=(0,n.useState)("New flow"),[s,l]=(0,n.useState)(null);return(0,z.jsxs)(Kh,{open:t,onClose:r,children:[(0,z.jsx)(rp,{children:"Name and run workflow"}),(0,z.jsx)(sp,{children:(0,z.jsx)(BV,{label:"name",autoFocus:!0,margin:"dense",fullWidth:!0,variant:"standard",onChange:e=>{a(e.target.value),""!==e.target.value&&l(null)},error:null!=s,helperText:s,value:o})}),(0,z.jsxs)(fp,{children:[(0,z.jsx)(Sp,{onClick:r,variant:"outlined",children:"Cancel"}),(0,z.jsx)(Sp,{onClick:()=>{""!==o?i(o):l("name is empty")},variant:"contained",children:"Run"})]})]})}));var Z4=r(4787);const U4=(0,n.memo)((function(){const e=E(),t=b(Bk);return(0,z.jsx)(Eh,{title:"Snakemake settings",children:(0,z.jsx)(ni,{onClick:()=>{e(Q3())},color:"primary",disabled:!!t,children:(0,z.jsx)(Z4.Z,{})})})})),V4=(0,n.memo)((function(e){const t=Fe(),r=b(Zp);return(0,z.jsxs)(yi,{style:{display:"flex",alignItems:"center",position:"absolute",float:"right",textAlign:"right",top:-7,right:10,zIndex:4,textTransform:"none",fontSize:"1rem"},children:[!r&&(0,z.jsxs)(Sp,{onClick:()=>t("/console/workspaces"),children:[(0,z.jsx)(E4.Z,{}),"Workspaces"]}),(0,z.jsx)(O4,{}),(0,z.jsx)(R4,{}),(0,z.jsx)(U4,{}),(0,z.jsx)(j4,{}),(0,z.jsx)(F4,{...e})]})})),H4=Yw,W4=(0,n.memo)((function(e){const t=b(F3),r=b(B3),i=r.filter((e=>!bx(e))),o=E(),a=b(Z3),[s,l]=(0,n.useState)(),c=(0,n.useRef)(null),[,u]=c3((()=>({accept:x3,drop:(e,t)=>{let r;const n=t.getClientOffset();return null!=c.current&&null!=n&&null!=s&&(r=s.project({x:n.x-c.current.offsetLeft-40,y:n.y-c.current.offsetTop-40})),{position:r}}})),[s]);return(0,z.jsx)("div",{className:"flow",children:(0,z.jsx)(H4,{children:(0,z.jsx)("div",{className:"reactflow-wrapper",ref:c,children:(0,z.jsxs)(r_,{ref:u,nodes:t,edges:r,onNodesChange:e=>o(ok(e)),onEdgesChange:e=>o(ak(e)),onConnect:e=>{o(ck([...kx({...e,animated:!1,style:{width:5},type:"buttonedge"},i)]))},onInit:e=>l(e),onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},onNodeDragStop:(e,t)=>{o(hk({nodeId:t.id,coord:{x:t.position.x,y:t.position.y}}))},nodeTypes:C4,edgeTypes:A4,defaultViewport:{x:a[0],y:a[1],zoom:a[2]},onMoveEnd:(e,t)=>{void 0!==e&&o(sk([t.x,t.y,t.zoom]))},children:[(0,z.jsx)(V4,{...e}),(0,z.jsx)(y3,{})]})})})})}));var G4=r(54045),q4=r(6306);function Y4(e){return(0,Hn.Z)("MuiAccordionDetails",e)}(0,Mn.Z)("MuiAccordionDetails",["root"]);const X4=["className"],K4=(0,nn.ZP)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}})),$4=n.forwardRef((function(e,t){const r=(0,on.Z)({props:e,name:"MuiAccordionDetails"}),{className:n}=r,i=(0,R.Z)(r,X4),o=r,a=(e=>{const{classes:t}=e;return(0,tn.Z)({root:["root"]},Y4,t)})(o);return(0,z.jsx)(K4,(0,P.Z)({className:(0,en.Z)(a.root,n),ref:t,ownerState:o},i))})),J4=$4;const Q4=n.createContext({});function e6(e){return(0,Hn.Z)("MuiAccordionSummary",e)}const t6=(0,Mn.Z)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),r6=["children","className","expandIcon","focusVisibleClassName","onClick"],n6=(0,nn.ZP)(Kn,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t,ownerState:r}=e;const n={duration:t.transitions.duration.shortest};return(0,P.Z)({display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),["&.".concat(t6.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(t6.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(t6.disabled,")")]:{cursor:"pointer"}},!r.disableGutters&&{["&.".concat(t6.expanded)]:{minHeight:64}})})),i6=(0,nn.ZP)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t,ownerState:r}=e;return(0,P.Z)({display:"flex",flexGrow:1,margin:"12px 0"},!r.disableGutters&&{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(t6.expanded)]:{margin:"20px 0"}})})),o6=(0,nn.ZP)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(t6.expanded)]:{transform:"rotate(180deg)"}}})),a6=n.forwardRef((function(e,t){const r=(0,on.Z)({props:e,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:a,focusVisibleClassName:s,onClick:l}=r,c=(0,R.Z)(r,r6),{disabled:u=!1,disableGutters:d,expanded:f,toggle:h}=n.useContext(Q4),p=(0,P.Z)({},r,{expanded:f,disabled:u,disableGutters:d}),m=(e=>{const{classes:t,expanded:r,disabled:n,disableGutters:i}=e,o={root:["root",r&&"expanded",n&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]};return(0,tn.Z)(o,e6,t)})(p);return(0,z.jsxs)(n6,(0,P.Z)({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:(0,en.Z)(m.root,o),focusVisibleClassName:(0,en.Z)(m.focusVisible,s),onClick:e=>{h&&h(e),l&&l(e)},ref:t,ownerState:p},c,{children:[(0,z.jsx)(i6,{className:m.content,ownerState:p,children:i}),a&&(0,z.jsx)(o6,{className:m.expandIconWrapper,ownerState:p,children:a})]}))})),s6=a6;function l6(e){return(0,Hn.Z)("MuiAccordion",e)}const c6=(0,Mn.Z)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),u6=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],d6=(0,nn.ZP)(Pi,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{["& .".concat(c6.region)]:t.region},t.root,!r.square&&t.rounded,!r.disableGutters&&t.gutters]}})((e=>{let{theme:t}=e;const r={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],r),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],r)},"&:first-of-type":{"&:before":{display:"none"}},["&.".concat(c6.expanded)]:{"&:before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}},["&.".concat(c6.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),(e=>{let{theme:t,ownerState:r}=e;return(0,P.Z)({},!r.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!r.disableGutters&&{["&.".concat(c6.expanded)]:{margin:"16px 0"}})})),f6=n.forwardRef((function(e,t){const r=(0,on.Z)({props:e,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,TransitionComponent:f=c$,TransitionProps:h}=r,p=(0,R.Z)(r,u6),[m,g]=(0,vh.Z)({controlled:c,default:a,name:"Accordion",state:"expanded"}),v=n.useCallback((e=>{g(!m),u&&u(e,!m)}),[m,u,g]),[y,...x]=n.Children.toArray(i),b=n.useMemo((()=>({expanded:m,disabled:s,disableGutters:l,toggle:v})),[m,s,l,v]),w=(0,P.Z)({},r,{square:d,disabled:s,disableGutters:l,expanded:m}),_=(e=>{const{classes:t,square:r,expanded:n,disabled:i,disableGutters:o}=e,a={root:["root",!r&&"rounded",n&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]};return(0,tn.Z)(a,l6,t)})(w);return(0,z.jsxs)(d6,(0,P.Z)({className:(0,en.Z)(_.root,o),ref:t,ownerState:w,square:d},p,{children:[(0,z.jsx)(Q4.Provider,{value:b,children:y}),(0,z.jsx)(f,(0,P.Z)({in:m,timeout:"auto"},h,{children:(0,z.jsx)("div",{"aria-labelledby":y.props.id,id:y.props["aria-controls"],role:"region",className:_.region,children:x})}))]}))})),h6=f6,p6=(0,nn.ZP)((e=>(0,z.jsx)(h6,{disableGutters:!0,elevation:0,square:!0,...e})))((e=>{let{theme:t}=e;return{border:"1px solid",borderColor:t.palette.divider,boxShadow:"none",overflow:"hidden","&:before":{display:"none"}}})),m6=(0,n.memo)((function(e){let{label:t,onChange:r,value:n}=e;return(0,z.jsxs)(zp,{container:!0,component:"label",alignItems:"center",justifyContent:"space-between",marginBottom:2,children:[(0,z.jsx)(zp,{item:!0,children:(0,z.jsx)(Ki,{fontSize:"0.95rem",fontWeight:"bold",color:"text.secondary",children:t})}),(0,z.jsx)(zp,{item:!0,children:(0,z.jsx)(qV,{checked:n,onChange:r})})]})})),g6=(0,nn.ZP)((e=>(0,z.jsx)(yi,{marginBottom:2,children:(0,z.jsx)(BV,{variant:"outlined",fullWidth:!0,...e})})))((e=>{let{theme:t}=e;return{"& .MuiInputLabel-root":{"&.MuiInputLabel-formControl":{position:"static",transform:"none",transition:"none",fontWeight:"bold",fontSize:"0.95rem",color:t.palette.text.secondary}},"& .MuiOutlinedInput-root":{marginTop:0},"& .MuiOutlinedInput-input":{paddingTop:"10px",paddingBottom:"8px",height:"auto"},"& .MuiOutlinedInput-notchedOutline":{top:0,"& legend":{display:"none"}}}}));function v6(e){let{paramSelector:t,paramValueSelector:r,paramUpdateActionCreator:i,requireConfirm:o}=e;function a(e){return[b(r(e)),(t,r)=>i(e,t,r)]}const s=(0,n.memo)((function(e){let{name:t,path:r,pipelineStatus:i}=e;const s=E(),[l,c]=(0,n.useState)(),[u,d]=a(r),f=(0,n.useRef)(Array.isArray(u)),h=b(Rk),{onOpenClearWorkflowIdDialog:p}=(0,n.useContext)(G1);(0,n.useEffect)((()=>{c(u)}),[]),(0,n.useEffect)((()=>{i===vk&&c(u)}),[i]);const m=e=>e.split(",").filter(Boolean).map((e=>Number(e))),g=Array.isArray(u)?u.toLocaleString():u||"";return(0,z.jsx)(g6,{label:t,value:void 0===g?"":g,onChange:e=>{const t=e.target.value;o&&null!=h?p({open:!0,handleOk:()=>{s(d(t,l))},handleCancel:()=>null}):s(d(t,l))},onBlur:f.current?e=>{const t=e.target.value;o&&null!=h?p({open:!0,handleOk:()=>{s(d(m(t),m(l)))},handleCancel:()=>null}):s(d(m(t),m(l)))}:void 0})})),l=(0,n.memo)((function(e){let{name:t,path:r,pipelineStatus:i}=e;const s=E(),[l,c]=a(r),[u,d]=(0,n.useState)(),f=b(Rk),{onOpenClearWorkflowIdDialog:h}=(0,n.useContext)(G1);if((0,n.useEffect)((()=>{d(l)}),[]),(0,n.useEffect)((()=>{i===vk&&d(l)}),[i]),"number"===typeof l){const e=e=>{const t=""===e.target.value?"":Number(e.target.value);"number"===typeof t&&(o&&null!=f?h({open:!0,handleOk:()=>{s(c(t,u))},handleCancel:()=>null}):s(c(t,u)))};return(0,z.jsx)(g6,{type:"number",label:t,value:l,onChange:e})}return null})),c=(0,n.memo)((function(e){let{name:t,path:r,pipelineStatus:i}=e;const s=E(),[l,c]=(0,n.useState)(),[u,d]=a(r),f=b(Rk),{onOpenClearWorkflowIdDialog:h}=(0,n.useContext)(G1);if((0,n.useEffect)((()=>{c(u)}),[]),(0,n.useEffect)((()=>{i===vk&&c(u)}),[i]),"boolean"===typeof u){const e=()=>{o&&null!=f?h({open:!0,handleOk:()=>{s(d(!u,l))},handleCancel:()=>null}):s(d(!u,l))};return(0,z.jsx)(m6,{label:t,value:u,onChange:e})}return null})),u=(0,n.memo)((function(e){let{name:t,path:r}=e;const n=b(Nk),[i]=a(r);return"number"===typeof i?(0,z.jsx)(l,{name:t,path:r,pipelineStatus:n}):"string"===typeof i?(0,z.jsx)(s,{name:t,path:r,pipelineStatus:n}):"boolean"===typeof i?(0,z.jsx)(c,{name:t,path:r,pipelineStatus:n}):(0,z.jsx)(s,{name:t,path:r,pipelineStatus:n})})),d=(0,n.memo)((function(e){let{path:t,name:r}=e;return(0,z.jsx)(u,{name:r,path:t})})),f=(0,n.memo)((function e(t){let{paramKey:r,param:n}=t;return R1(n)?(0,z.jsx)(d,{path:n.path,name:r}):(0,z.jsxs)(p6,{children:[(0,z.jsx)(s6,{expandIcon:(0,z.jsx)(q4.Z,{}),children:r}),(0,z.jsx)(J4,{children:(0,z.jsx)("div",{children:Object.entries(n.children).map((t=>{let[r,n]=t;return(0,z.jsx)(e,{param:n,paramKey:r},r)}))})})]})}));return(0,n.memo)((function(e){let{paramKey:r}=e;const n=b(t(r));return(0,z.jsx)(f,{paramKey:r,param:n})}))}const y6=Xl("".concat("NWB","/getNWBParams"),(async(e,t)=>{const{rejectWithValue:r}=t;try{return await async function(){return(await dd.get("".concat(cd,"/nwb"))).data}()}catch(vt){return r(vt)}})),x6=e=>e.nwb,b6=e=>Object.keys(x6(e).params),w6=e=>t=>x6(t).params[e],_6=e=>t=>{const r=x6(t).params;if(null!=r){const t=P1(e,r);return null===t||void 0===t?void 0:t.value}throw new Error("Param is null")},k6={params:{}},S6=Vl({name:"NWB",initialState:k6,reducers:{updateParam:(e,t)=>{const{path:r,newValue:n}=t.payload,i=P1(r,e.params);null!=i&&(i.value=n)}},extraReducers:e=>{e.addCase(y6.fulfilled,((e,t)=>{e.params=L1(t.payload)})).addCase(ik,(()=>k6))}}),{updateParam:T6}=S6.actions,M6=S6.reducer,C6=(0,n.memo)((function(){const e=E(),t=b(b6,m$);return(0,n.useEffect)((()=>{0===t.length&&e(y6())})),(0,z.jsx)("div",{className:"nwbParam",style:{margin:24},children:t.map(((e,t)=>(0,z.jsx)(A6,{paramKey:e},t)))})})),A6=(0,n.memo)((function(e){let{paramKey:t}=e;const r=v6({paramSelector:w6,paramValueSelector:_6,paramUpdateActionCreator:(e,t)=>T6({path:e,newValue:t}),requireConfirm:!0});return(0,z.jsx)(r,{paramKey:t})})),E6="algorithmNode",I6=Xl("".concat(E6,"/getAlgoParams"),(async(e,t)=>{let{algoName:r}=e;const{rejectWithValue:n}=t;try{return await L_(r)}catch(vt){return n(vt)}})),O6={},P6=Vl({name:E6,initialState:O6,reducers:{updateParam:(e,t)=>{const{nodeId:r,path:n,newValue:i,initValue:o}=t.payload,a=e[r].params;if(null!=a){const t=P1(n,a);null!=t&&(t.value=i,e[r].isUpdate=!(JSON.stringify(o)===JSON.stringify(i)))}}},extraReducers:e=>{e.addCase(I6.fulfilled,((e,t)=>{const{nodeId:r}=t.meta.arg;e[r].params=L1(t.payload)})).addCase(j_.fulfilled,((e,t)=>{var r;const{node:n,functionPath:i,name:o,runAlready:a}=t.meta.arg,s=t.payload;var l;(null===(r=n.data)||void 0===r?void 0:r.type)===o_.ALGORITHM&&(e[n.id]={functionPath:i,name:o,params:L1(s),originalValue:null===(l=e[n.id])||void 0===l?void 0:l.originalValue,isUpdate:null!==a&&void 0!==a&&a})})).addCase(ik,(()=>O6)).addCase(uk,((e,t)=>{t.payload.forEach((t=>{var r;(null===(r=t.data)||void 0===r?void 0:r.type)===o_.ALGORITHM&&delete e[t.id]}))})).addCase(fk,((e,t)=>{Object.keys(e).includes(t.payload)&&delete e[t.payload]})).addMatcher(Jl(Y_.fulfilled,X_.fulfilled,K_.fulfilled),((e,t)=>{const r={};return Object.values(t.payload.nodeDict).filter(d_).forEach((e=>{null!=e.data&&(r[e.id]={name:e.data.label,functionPath:e.data.path,params:e.data.param,originalValue:e.data.param,isUpdate:!1})})),r})).addMatcher(Jl(Hk.fulfilled,Wk.fulfilled),((e,t)=>{const r=t.meta.arg.runPostData;Object.values(r.nodeDict).filter(d_).forEach((t=>{e[t.id].isUpdate=!1}))}))}}),{updateParam:R6}=P6.actions,L6=P6.reducer,j6=(0,n.memo)((function(){const e=(0,n.useContext)(B6),t=E(),r=b(D1(e)),i=b((e=>t=>null!==j1(e)(t).params)(e)),o=b((e=>t=>{var r,n;return Object.keys(null!==(r=null===(n=j1(e)(t))||void 0===n?void 0:n.params)&&void 0!==r?r:{})})(e),m$);return(0,n.useEffect)((()=>{i||t(I6({nodeId:e,algoName:r}))}),[t,e,r,i]),(0,z.jsxs)("div",{style:{padding:24},children:[(0,z.jsx)(dQ,{children:r}),o.map((e=>(0,z.jsx)(D6,{paramKey:e},e)))]})})),D6=(0,n.memo)((function(e){let{paramKey:t}=e;const r=(0,n.useContext)(B6),i=v6({paramSelector:e=>((e,t)=>r=>{const n=z1(e)(r);if(null!=n)return n[t];throw new Error("AlgorithmParam is null")})(r,e),paramValueSelector:e=>((e,t)=>r=>{const n=z1(e)(r);if(null!=n){const e=P1(t,n);return null===e||void 0===e?void 0:e.value}throw new Error("AlgorithmParam is null")})(r,e),paramUpdateActionCreator:(e,t,n)=>R6({nodeId:r,path:e,newValue:t,initValue:n})});return(0,z.jsx)(i,{paramKey:t})})),z6=e=>e.rightDrawer.open,N6=e=>e.rightDrawer.mode,F6=e=>e.rightDrawer.currendNodeId,B6=(0,n.createContext)(""),Z6=()=>{const e=b(F6);return null!=e?(0,z.jsx)(B6.Provider,{value:e,children:(0,z.jsx)(j6,{})}):null};const U6="Snakemake",V6=Xl("".concat(U6,"/getSnakemakeParams"),(async(e,t)=>{const{rejectWithValue:r}=t;try{return async function(){return(await dd.get("".concat(cd,"/snakemake"))).data}()}catch(vt){return r(vt)}})),H6=e=>(e=>e.snakemake)(e).params,W6=e=>Object.keys(H6(e)),G6=e=>t=>H6(t)[e],q6=e=>t=>{const r=H6(t);if(null!=r){const t=P1(e,r);return null===t||void 0===t?void 0:t.value}throw new Error("Param is null")},Y6={params:{}},X6=Vl({name:U6,initialState:Y6,reducers:{updateParam:(e,t)=>{const{path:r,newValue:n}=t.payload,i=P1(r,e.params);null!=i&&(i.value=n)}},extraReducers:e=>{e.addCase(V6.fulfilled,((e,t)=>{e.params=L1(t.payload)})).addCase(ik,(()=>Y6))}}),{updateParam:K6}=X6.actions,$6=X6.reducer,J6=(0,n.memo)((function(){const e=E(),t=b(W6,m$);return(0,n.useEffect)((()=>{0===t.length&&e(V6())})),(0,z.jsx)("div",{className:"SnakemakeParam",style:{margin:24},children:t.map(((e,t)=>(0,z.jsx)(Q6,{paramKey:e},t)))})})),Q6=(0,n.memo)((function(e){let{paramKey:t}=e;const r=v6({paramSelector:G6,paramValueSelector:q6,paramUpdateActionCreator:(e,t)=>K6({path:e,newValue:t}),requireConfirm:!0});return(0,z.jsx)(r,{paramKey:t})})),e8=()=>{switch(b(N6)){case G3:return(0,z.jsx)(C6,{});case q3:return(0,z.jsx)(Z6,{});case Y3:return(0,z.jsx)(J6,{});default:return null}},t8=(0,nn.ZP)(BA)({width:320,flexShrink:0,["& .".concat(OA.paper)]:{width:320}}),r8=(0,nn.ZP)("main")({height:"100%"}),n8=()=>{const e=b(z6),t=E(),r=b((e=>{switch(N6(e)){case G3:return"NWB Setting";case q3:return"Param Form";case Y3:return"Snakemake";default:return"none"}}));return(0,z.jsxs)(t8,{open:e,anchor:"right",variant:"persistent",children:[(0,z.jsx)(Vi,{}),(0,z.jsxs)(yi,{display:"flex",alignItems:"center",children:[(0,z.jsx)(ni,{color:"inherit",onClick:()=>t(t5()),size:"large",children:(0,z.jsx)(G4.Z,{})}),(0,z.jsx)(Ki,{variant:"h6",children:r})]}),(0,z.jsx)(LU,{}),(0,z.jsx)(r8,{children:(0,z.jsx)(e8,{})})]})};function i8(e){return(0,n.useMemo)((()=>e.hooks.dragSource()),[e])}function o8(e){return(0,n.useMemo)((()=>e.hooks.dragPreview()),[e])}class a8{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(t?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!J2(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!J2(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=t3({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Q2(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Q2(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}let s8=!1,l8=!1;class c8{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){P$(!s8,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return s8=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{s8=!1}}isDragging(){if(!this.sourceId)return!1;P$(!l8,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return l8=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{l8=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}class u8{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return r="object"===typeof e.item?e.item:"function"===typeof e.item?e.item(t):{},null!==r&&void 0!==r?r:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"===typeof e.canDrag?e.canDrag:"function"!==typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function d8(e,t,r){const i=i3(),o=function(e,t,r){const i=(0,n.useMemo)((()=>new u8(e,t,r)),[t,r]);return(0,n.useEffect)((()=>{i.spec=e}),[e]),i}(e,t,r),a=function(e){return(0,n.useMemo)((()=>{const t=e.type;return P$(null!=t,"spec.type must be defined"),t}),[e])}(e);q2((function(){if(null!=a){const[e,n]=function(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}(a,o,i);return t.receiveHandlerId(e),r.receiveHandlerId(e),n}}),[i,t,r,o,a])}function f8(e,t){const r=K2(e,t);P$(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const i=function(){const e=i3();return(0,n.useMemo)((()=>new c8(e)),[e])}(),o=function(e,t){const r=i3(),i=(0,n.useMemo)((()=>new a8(r.getBackend())),[r]);return q2((()=>(i.dragSourceOptions=e||null,i.reconnect(),()=>i.disconnectDragSource())),[i,e]),q2((()=>(i.dragPreviewOptions=t||null,i.reconnect(),()=>i.disconnectDragPreview())),[i,t]),i}(r.options,r.previewOptions);return d8(r,i,o),[X2(r.collect,i,o),i8(o),o8(o)]}var h8=r(5211);const p8="algorithmList",m8=Xl("".concat(p8,"/getAlgoList"),(async(e,t)=>{const{rejectWithValue:r}=t;try{return await async function(){return(await dd.get("".concat(cd,"/algolist"))).data}()}catch(vt){return r(vt)}}));const g8=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){let r="",n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;for(;n--;)r+=e[Math.random()*e.length|0];return r}}("0123456789abcdefghijklmnopqrstuvwxyz",10),v8=()=>g8(),y8=(0,n.memo)((function(){const e=E(),t=b(N3),r=b(z3),i="undefined"!==typeof b(Rk);(0,n.useEffect)((()=>{r||e(m8())}),[e,r]);const o=(0,n.useCallback)(((t,r,n)=>{const o=t,a={id:"".concat(o,"_").concat(v8()),type:b_,data:{label:o,type:o_.ALGORITHM},position:n};e(j_({node:a,name:o,functionPath:r,runAlready:i}))}),[e,i]);return(0,z.jsxs)(z2,{sx:{flexGrow:1,height:"100%"},defaultCollapseIcon:(0,z.jsx)(q4.Z,{}),defaultExpandIcon:(0,z.jsx)(G4.Z,{}),children:[(0,z.jsxs)(f2,{nodeId:"Data",label:"Data",children:[(0,z.jsx)(x8,{fileName:"microscope",nodeName:"microscopeData",fileType:H_}),(0,z.jsx)(x8,{fileName:"expdb",nodeName:"expdbData",fileType:W_,displayName:"preprocessed_data"})]}),(0,z.jsx)(f2,{nodeId:"Algorithm",label:"Algorithm",children:Object.entries(t).map(((e,t)=>{let[r,n]=e;return(0,z.jsx)(b8,{name:r,node:n,onAddAlgoNode:o},t.toFixed())}))})]})})),x8=(0,n.memo)((function(e){let{fileName:t,nodeName:r,fileType:i,displayName:o}=e;const a=E(),s=(0,n.useCallback)(((e,t,r,n)=>{let i="";switch(r){case N_:i=v_;break;case F_:i=g_,r=F_;break;case B_:i=y_,r=B_;break;case Z_:i=x_,r=Z_;break;case U_:i=w_,r=U_;break;case V_:i=__,r=V_;break;case H_:i=k_,r=H_;break;case W_:i=S_,r=W_}const o={id:"input_".concat(v8()),type:i,data:{label:t,type:e},position:n};a(D_({node:o,fileType:r}))}),[a]),{isDragging:l,dragRef:c}=S8((0,n.useCallback)((e=>{s(o_.INPUT,r,i,e)}),[s,r,i]));return(0,z.jsx)(k8,{ref:c,style:{opacity:l?.6:1},onFocusCapture:e=>e.stopPropagation(),nodeId:t,label:(0,z.jsx)(_8,{name:null!==o&&void 0!==o?o:t,onClick:()=>s(o_.INPUT,r,i)})})})),b8=(0,n.memo)((function e(t){let{name:r,node:n,onAddAlgoNode:i}=t;return R3(n)?(0,z.jsx)(w8,{name:r,node:n,onAddAlgoNode:i}):(0,z.jsx)(f2,{nodeId:r,label:r,children:Object.entries(n.children).map(((t,r)=>{let[n,o]=t;return(0,z.jsx)(e,{name:n,node:o,onAddAlgoNode:i},r.toFixed())}))})})),w8=(0,n.memo)((function(e){let{name:t,node:r,onAddAlgoNode:i}=e;const{isDragging:o,dragRef:a}=S8((0,n.useCallback)((e=>{i(t,r.functionPath,e)}),[i,t,r]));return(0,z.jsx)(k8,{ref:a,style:{opacity:o?.6:1},onFocusCapture:e=>e.stopPropagation(),nodeId:t,label:(0,z.jsx)(_8,{name:t,onClick:()=>i(t,r.functionPath)})})})),_8=(0,n.memo)((function(e){let{name:t,onClick:r}=e;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ni,{"aria-label":"add",style:{padding:2},size:"large",onClick:r,children:(0,z.jsx)(h8.Z,{})}),(0,z.jsx)(Ki,{variant:"inherit",style:{textOverflow:"ellipsis",overflow:"visible",width:"8rem",display:"inline-block"},children:t})]})})),k8=(0,nn.ZP)(f2)({["& .".concat(s2.iconContainer)]:{margin:0,width:0}});function S8(e){const[{isDragging:t},r]=f8((()=>({type:x3,end:(t,r)=>{var n;const i=null===(n=r.getDropResult())||void 0===n?void 0:n.position;r.didDrop()&&null!=i&&e(i)},collect:e=>({isDragging:e.isDragging()})})),[e]);return{isDragging:t,dragRef:r}}const T8={filePath:"",open:!1,fileTreeType:void 0,multiSelect:!1,onSelectFile:()=>null},M8={open:!1,handleOk:()=>null,handleCancel:()=>null},C8=(0,n.memo)((function(e){const t=E(),r=b(z6),i=b(qp),[o,a]=(0,n.useState)(""),[s,l]=(0,n.useState)(T8),[c,u]=(0,n.useState)(M8),[d,f]=(0,n.useState)({anchorElRef:{current:null},message:""}),[h,p]=(0,n.useState)({open:!1,nodeId:"",requestId:""}),[m,g]=(0,n.useState)(""),[v,y]=(0,n.useState)(""),{enqueueSnackbar:x}=Jr(),w=(e,t)=>{x(t,{variant:e})};return(0,z.jsx)(yi,{display:"flex",children:(0,z.jsxs)(G1.Provider,{value:{onOpenOutputDialog:a,onOpenFileSelectDialog:l,onOpenClearWorkflowIdDialog:u,onOpenInputUrlDialog:p,onMessageError:f},children:[(0,z.jsxs)(NJ,{backend:sQ,children:[(0,z.jsxs)(yi,{width:240,borderRight:1,borderColor:lQ.Z[300],children:[(0,z.jsx)(yi,{overflow:"auto",marginRight:2,children:(0,z.jsx)(pQ,{})}),(0,z.jsxs)(yi,{overflow:"auto",children:[(0,z.jsx)(dQ,{children:"Nodes"}),(0,z.jsx)(y8,{})]})]}),(0,z.jsxs)(A8,{open:r,children:[(0,z.jsx)(W4,{...e}),o&&(0,z.jsx)(B1,{nodeId:o,open:!0,onClose:()=>a("")}),s.open&&(0,z.jsx)(Z2,{multiSelect:s.multiSelect,initialFilePath:s.filePath,open:s.open,onClickOk:e=>{s.onSelectFile(e),l(T8)},onClickCancel:()=>{l(T8)},fileType:s.fileTreeType}),c.open&&(0,z.jsx)(W1,{open:c.open,onConfirm:()=>{t(qK()),c.handleOk(),u(M8)},onCancel:()=>{c.handleCancel(),u(M8)}}),h.fileType?(0,z.jsx)(gQ,{open:h.open,value:m,setValue:g,handleClose:()=>{g(""),p({...h,open:!1})},onLoadFileViaUrl:async()=>{if(!i||!m)return;p({...h,open:!1});const e=await t(P_({workspaceId:i,url:m,requestId:h.requestId}));if(e.error)return void w("error","Url does not exist!");let r=!0;const n=async()=>{const o=await t(R_({workspaceId:i,file_name:e.payload.file_name,requestId:h.requestId}));o.payload.current!==o.payload.total?r?(r=!1,n()):setTimeout(n,1e3):(w("success","File upload finished!"),t(G_({nodeId:h.nodeId,filePath:e.payload.file_name})))};n(),l({...s,filePath:[e.payload.file_name]})},setError:y,error:v,fileType:h.fileType}):null,(null===d||void 0===d?void 0:d.message)&&(0,z.jsx)(Da,{open:!0,anchorEl:d.anchorElRef.current,onClose:()=>f({anchorElRef:{current:null},message:""}),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:(0,z.jsx)("div",{style:{margin:8},children:(0,z.jsx)(LV,{error:!0,children:d.message})})})]})]}),(0,z.jsx)(n8,{})]})})})),A8=(0,nn.ZP)("main")((e=>{let{theme:t}=e;return{flexDirection:"column",flexGrow:1,minHeight:mA,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginRight:-320}}),(e=>{let{open:t,theme:r}=e;return t?{transition:r.transitions.create("margin",{easing:r.transitions.easing.easeOut,duration:r.transitions.duration.enteringScreen}),marginRight:0}:void 0})),E8=C8,I8=(0,Pd.Z)((0,z.jsx)("path",{d:"m20.5 10 .5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"}),"Numbers"),O8=(0,Pd.Z)((0,z.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function P8(e,t){return(0,n.useCallback)((t=>{const{onMouseMove:r,onMouseUp:n}=e(t);document.addEventListener("mousemove",r),document.addEventListener("mouseup",(e=>{document.removeEventListener("mousemove",r),n.call(document,e)}),{once:!0})}),[t])}const R8=e=>{let{dataType:t,selectedNodeId:r,selectedFilePath:i,onSelect:o,label:a}=e;const s=b((e=>{const r=(e=>e.inputNode)(e);return Object.entries(r).map((t=>{let[r,n]=t;return{nodeId:r,filePath:n.selectedFilePath,fileType:n.fileType,dataType:L8(n.fileType),nodeName:V3(r)(e)}})).filter((e=>{let{filePath:t}=e;return null!=t})).filter((e=>{let{dataType:r}=e;return null==t||r===t}))}),((e,t)=>e.length===t.length&&e.every(((e,r)=>e.filePath===t[r].filePath&&e.fileType===t[r].fileType&&e.dataType===t[r].dataType&&e.nodeName===t[r].nodeName)))),l=b(Rk),c=b((e=>{if(null!=l){const r=(e=>{const t=jk(e);return Ek(t)?Object.entries(t.runResult).map((e=>{let[t,r]=e;return{nodeId:t,nodeResult:r}})).filter(Zk):[]})(e);return r.map((r=>{let{nodeId:n,nodeResult:i}=r;return{nodeId:n,nodeName:V3(n)(e),paths:Object.entries(i.outputPaths).map((e=>{let[t,r]=e;return{outputKey:t,filePath:r.path,type:r.type}})).filter((e=>{let{type:r}=e;return null==t||r===t}))}}))}return[]}),((e,t)=>e.length===t.length&&e.every(((e,r)=>{const n=t[r];return e.nodeId===n.nodeId&&e.nodeName===n.nodeName&&e.paths.length===n.paths.length&&e.paths.every(((e,t)=>e.outputKey===n.paths[t].outputKey&&e.filePath===n.paths[t].filePath&&e.type===n.paths[t].type))})))),[u,d]=(0,n.useState)(!1),f=()=>{d(!1)},h=(e,t,r,n)=>{o(e,t,r,n),f()},p=[];return s.forEach((e=>{const t=e.filePath;Array.isArray(t)?t.forEach((t=>{p.push((0,z.jsx)(is,{value:e.nodeId&&t?"".concat(e.nodeId,"/").concat(t):"",onClick:()=>h(e.nodeId,null!==t&&void 0!==t?t:"",e.dataType),children:c_(t)},e.nodeId))})):p.push((0,z.jsx)(is,{value:e.nodeId&&e.filePath?"".concat(e.nodeId,"/").concat(e.filePath):"",onClick:()=>h(e.nodeId,null!==t&&void 0!==t?t:"",e.dataType),children:e.nodeName},e.nodeId))})),c.forEach(((e,t)=>{p.push((0,z.jsx)(QR,{children:(0,z.jsx)(LU,{textAlign:"center",children:e.nodeName})},t)),e.paths.forEach((t=>{p.push((0,z.jsx)(is,{value:e.nodeId&&t.filePath?"".concat(e.nodeId,"/").concat(t.filePath):"",onClick:()=>h(e.nodeId,t.filePath,t.type,t.outputKey),children:t.outputKey},"".concat(e.nodeId,"/").concat(t.filePath)))}))})),(0,z.jsxs)(CV,{style:{minWidth:150,maxWidth:220},variant:"standard",children:[(0,z.jsx)(_V,{children:a||"Select Item"}),(0,z.jsx)(ZF,{value:r&&i?"".concat(r,"/").concat(i):"",open:u,onClose:f,onOpen:()=>{d(!0)},children:p}),s.length+c.length===0&&(0,z.jsx)(LV,{error:!0,children:"no data"})]})};function L8(e){switch(e){case F_:return rm.IMAGE;case N_:return rm.CSV;case B_:return rm.HDF5;case Z_:return rm.FLUO;case U_:return rm.BEHAVIOR;case V_:case H_:case W_:return rm.MATLAB}}const j8=(0,n.memo)((function(e){let{itemId:t}=e;const r=E(),i=b((e=>XS(e)===t)),{size:o,onMouseDownX:a,onMouseDownY:s,onMouseDownXY:l}=function(e){const t=E(),r=b(eT(e)),i=b(tT(e)),[o,a]=(0,n.useState)({width:r,height:i}),s=(0,n.useCallback)((r=>t(_M({itemId:e,...r}))),[t,e]),l=P8((e=>{let t=e.screenX,r=o.width;return{onMouseMove:e=>{const n=r+(e.screenX-t);r=n>=F8?n:F8,a((e=>({...e,width:r}))),t=e.screenX},onMouseUp:()=>{s({...o,width:r})}}}),[o,s]),c=P8((e=>{let t=e.screenY,r=o.height;return{onMouseMove:e=>{const n=r+(e.screenY-t);r=n>=B8?n:B8,a((e=>({...e,height:r}))),t=e.screenY},onMouseUp:()=>{s({...o,height:r})}}}),[o,s]),u=P8((e=>{let t=e.screenX,r=o.width,n=e.screenY,i=o.height;return{onMouseMove:e=>{const o=r+(e.screenX-t);r=o>=F8?o:F8;const s=i+(e.screenY-n);i=s>=B8?s:B8,a({width:r,height:i}),t=e.screenX,n=e.screenY},onMouseUp:()=>{s({width:r,height:i})}}}),[o,s]);return{size:o,onMouseDownX:l,onMouseDownY:c,onMouseDownXY:u}}(t),c=b(mS),[u,d]=(0,n.useState)("");return(0,z.jsxs)(yi,{sx:{m:1,display:"flex",flexDirection:"row",position:"relative"},children:[c&&u.includes("/cell_roi.json")?(0,z.jsx)(Ti,{position:"absolute"}):null,(0,z.jsxs)(yi,{sx:{display:"flex",flexDirection:"column"},children:[(0,z.jsxs)(Pi,{variant:"outlined",onClick:()=>{r(kM(t))},sx:{width:"".concat(o.width,"px"),minHeight:"".concat(o.height,"px"),p:1,borderColor:e=>i?e.palette.primary.light:void 0},children:[(0,z.jsx)(D8,{itemId:t,setRoiFilePath:d}),(0,z.jsx)(I1,{itemId:t})]},t),(0,z.jsxs)(yi,{sx:{display:"flex"},children:[(0,z.jsx)(yi,{sx:{flexGrow:1,position:"relative",top:"-2px",height:"4px",cursor:"row-resize"},onMouseDown:s}),(0,z.jsx)(yi,{sx:{position:"relative",top:"-2px",height:"4px",width:"12px",cursor:"nwse-resize"},onMouseDown:l})]})]}),(0,z.jsxs)(yi,{sx:{display:"flex",flexDirection:"column"},children:[(0,z.jsx)(yi,{sx:{flexGrow:1,position:"relative",left:"-2px",width:"4px",cursor:"col-resize"},onMouseDown:a}),(0,z.jsx)(yi,{sx:{position:"relative",height:"12px",width:"4px",left:"-2px",cursor:"nwse-resize"},onMouseDown:l})]})]})})),D8=(0,n.memo)((function(e){let{itemId:t,setRoiFilePath:r}=e;const n=b(rT(t)),i=b(iT(t)),o=b(FT(t)),a=E();return(0,z.jsxs)(yi,{display:"flex",justifyContent:"flex-end",children:[(0,z.jsxs)(yi,{flexGrow:1,display:"flex",children:[(0,z.jsx)(lL,{icon:(0,z.jsx)(I8,{}),size:"small",label:t,color:"primary",variant:"outlined",sx:{marginRight:2}}),(0,z.jsx)(z8,{itemId:t})]}),n===rm.TIME_SERIES&&(0,z.jsx)(yi,{flexGrow:1,children:(0,z.jsx)(N8,{itemId:t})}),n===rm.IMAGE&&(0,z.jsx)(yi,{flexGrow:1,children:(0,z.jsx)(Z8,{itemId:t,setRoiFilePath:r})}),(0,z.jsx)(yi,{children:(0,z.jsx)(ni,{onClick:e=>{e.stopPropagation(),a(GT(o&&null!=i&&null!=n?{itemId:t,deleteData:!0,filePath:i,dataType:n}:{itemId:t,deleteData:!1}))},children:(0,z.jsx)(O8,{})})})]})})),z8=(0,n.memo)((function(e){let{itemId:t}=e;const r=E(),n=b(rT(t)),i=b(nT(t)),o=b(sT(t)),a=b(FT(t));return(0,z.jsx)(R8,{selectedNodeId:i,selectedFilePath:o,onSelect:(e,i,s)=>{const l={itemId:t,nodeId:e,filePath:i,dataType:s};r(qT(a&&null!=o?{...l,deleteData:!0,prevDataType:n,prevFilePath:o}:{...l,deleteData:!1}))}})})),N8=(0,n.memo)((function(e){let{itemId:t}=e;const r=E(),n=b(KS,m$),i=b((e=>t=>{const r=JS(e)(t);if(ZS(r))return r.refImageItemId;throw new Error("invalid VisualaizeItemType")})(t));return(0,z.jsxs)(CV,{fullWidth:!0,variant:"standard",children:[(0,z.jsx)(_V,{children:"ref image"}),(0,z.jsxs)(ZF,{value:String(i),onChange:e=>{const n=Number(e.target.value);r(rC({itemId:t,refImageItemId:isNaN(n)?null:n}))},children:[(0,z.jsx)(is,{value:void 0,children:"None"}),n.map((e=>(0,z.jsx)(is,{value:e,children:e},e)))]})]})})),F8=200,B8=150;const Z8=(0,n.memo)((function(e){let{itemId:t,setRoiFilePath:r}=e;const i=E(),o=b((e=>t=>{const r=JS(e)(t);var n,i;if(BS(r))return null!==(n=null===(i=r.roiItem)||void 0===i?void 0:i.nodeId)&&void 0!==n?n:null;throw new Error("invalid VisualaizeItemType")})(t)),a=b(cT(t));(0,n.useEffect)((()=>{a&&(null===r||void 0===r||r(a))}),[a]);return(0,z.jsx)(R8,{selectedFilePath:a,selectedNodeId:o,onSelect:(e,r,n,o)=>{i(IM({itemId:t,nodeId:e,filePath:r,outputKey:o}))},dataType:rm.ROI,label:"Select Roi"})})),U8=e=>{let{itemId:t}=e;const r=E();return(0,z.jsx)(V8,{elevation:0,variant:"outlined",children:(0,z.jsx)(yi,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:(0,z.jsx)(H8,{onClick:()=>{r(null!=t?xM(t):yM())},children:(0,z.jsx)(h8.Z,{fontSize:"large",color:"primary"})})})})},V8=(0,nn.ZP)(Pi)((e=>{let{theme:t}=e;return{width:260,height:255,border:"dashed",borderWidth:2,borderColor:t.palette.divider,margin:t.spacing(1)}})),H8=(0,nn.ZP)(Sp)({width:"100%",height:"100%"}),W8=()=>{const e=b(QS,g$);return(0,z.jsxs)(yi,{display:"flex",flexWrap:"wrap",flexDirection:"column",p:1,m:1,children:[e.map(((e,t)=>(0,z.jsxs)(yi,{display:"flex",flexDirection:"row",children:[e.map((e=>(0,z.jsx)(j8,{itemId:e},e))),(0,z.jsx)(U8,{itemId:e[e.length-1]})]},t.toFixed()))),(0,z.jsx)(U8,{})]})},G8=()=>{const e=(0,n.useContext)(Poe),t=b(iT(e));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ki,{variant:"h6",fontWeight:"bold",children:"Csv"}),(0,z.jsx)(hQ,{filePath:t}),(0,z.jsx)(q8,{}),(0,z.jsx)(Y8,{}),(0,z.jsx)(X8,{})]})},q8=()=>{const e=(0,n.useContext)(Poe),t=b(RT(e)),r=E();return(0,z.jsx)(m6,{label:"Transpose",value:t,onChange:()=>{r(oC({itemId:e,transpose:!t}))}})},Y8=()=>{const e=(0,n.useContext)(Poe),t=b(LT(e)),r=E();return(0,z.jsx)(g6,{label:"Header",value:t,type:"number",onChange:t=>{const n=""===t.target.value?null:Number(t.target.value);(null===n||n>=0)&&r(aC({itemId:e,setHeader:n}))}})},X8=()=>{const e=(0,n.useContext)(Poe),t=b(jT(e)),r=E();return(0,z.jsx)(m6,{label:"SetIndex",value:t,onChange:()=>{r(sC({itemId:e,setIndex:!t}))}})};var K8=r(29584),$8={},J8=function(e,t,r,n){var i=e+"-"+t+"-"+r+(n?"-server":"");if($8[i])return $8[i];var o=function(e,t,r,n){if("undefined"===typeof document&&!n)return null;var i=n?new n:document.createElement("canvas");i.width=2*r,i.height=2*r;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),i.toDataURL()):null}(e,t,r,n);return $8[i]=o,o},Q8=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*u/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var f=void 0;if(n!==(f=c<0?0:c>o?1:Math.round(100*c/o)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null}(e,n.props.hsl,n.props.direction,n.props.a,n.container);t&&"function"===typeof n.props.onChange&&n.props.onChange(t,e)},n.handleMouseDown=function(e){n.handleChange(e),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},i7(n,r)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n7(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,r=(0,K8.ZP)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:r7({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return n.createElement("div",{style:r.alpha},n.createElement("div",{style:r.checkboard},n.createElement(t7,{renderers:this.props.renderers})),n.createElement("div",{style:r.gradient}),n.createElement("div",{style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("div",{style:r.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:r.slider}))))}}]),t}(n.PureComponent||n.Component);const a7=o7;var s7=function(){function e(e,t){for(var r=0;r-1)){var i=r.getArrowOffset(),o=38===e.keyCode?n+i:n-i;r.setUpdatedValue(o,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+c7++,r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),s7(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,K8.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return n.createElement("div",{style:t.wrap},n.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?n.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component);const d7=u7;var f7=function(){function e(e,t){for(var r=0;ro?0:360*(-100*c/o+100)/100,r.h!==u)return{h:u,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var d=void 0;if(d=l<0?0:l>i?359:100*l/i*360/100,r.h!==d)return{h:d,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}(e,n.props.direction,n.props.hsl,n.container);t&&"function"===typeof n.props.onChange&&n.props.onChange(t,e)},n.handleMouseDown=function(e){n.handleChange(e),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},h7(n,r)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f7(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,r=void 0===t?"horizontal":t,i=(0,K8.ZP)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===r});return n.createElement("div",{style:i.hue},n.createElement("div",{className:"hue-"+r,style:i.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),n.createElement("div",{style:i.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:i.slider}))))}}]),t}(n.PureComponent||n.Component);const m7=p7;const g7=function(){this.__data__=[],this.size=0};const v7=function(e,t){return e===t||e!==e&&t!==t};const y7=function(e,t){for(var r=e.length;r--;)if(v7(e[r][0],t))return r;return-1};var x7=Array.prototype.splice;const b7=function(e){var t=this.__data__,r=y7(t,e);return!(r<0)&&(r==t.length-1?t.pop():x7.call(t,r,1),--this.size,!0)};const w7=function(e){var t=this.__data__,r=y7(t,e);return r<0?void 0:t[r][1]};const _7=function(e){return y7(this.__data__,e)>-1};const k7=function(e,t){var r=this.__data__,n=y7(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function S7(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};const ree=function(e){return null!=e&&tee(e.length)&&!H7(e)};const nee=function(e){return Y9(e)&&ree(e)};const iee=function(){return!1};var oee="object"==typeof exports&&exports&&!exports.nodeType&&exports,aee=oee&&"object"==typeof module&&module&&!module.nodeType&&module,see=aee&&aee.exports===oee?P7.Buffer:void 0;const lee=(see?see.isBuffer:void 0)||iee;var cee=Function.prototype,uee=Object.prototype,dee=cee.toString,fee=uee.hasOwnProperty,hee=dee.call(Object);const pee=function(e){if(!Y9(e)||"[object Object]"!=U7(e))return!1;var t=H9(e);if(null===t)return!0;var r=fee.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dee.call(r)==hee};var mee={};mee["[object Float32Array]"]=mee["[object Float64Array]"]=mee["[object Int8Array]"]=mee["[object Int16Array]"]=mee["[object Int32Array]"]=mee["[object Uint8Array]"]=mee["[object Uint8ClampedArray]"]=mee["[object Uint16Array]"]=mee["[object Uint32Array]"]=!0,mee["[object Arguments]"]=mee["[object Array]"]=mee["[object ArrayBuffer]"]=mee["[object Boolean]"]=mee["[object DataView]"]=mee["[object Date]"]=mee["[object Error]"]=mee["[object Function]"]=mee["[object Map]"]=mee["[object Number]"]=mee["[object Object]"]=mee["[object RegExp]"]=mee["[object Set]"]=mee["[object String]"]=mee["[object WeakMap]"]=!1;const gee=function(e){return Y9(e)&&tee(e.length)&&!!mee[U7(e)]};const vee=function(e){return function(t){return e(t)}};var yee="object"==typeof exports&&exports&&!exports.nodeType&&exports,xee=yee&&"object"==typeof module&&module&&!module.nodeType&&module,bee=xee&&xee.exports===yee&&I7.process,wee=function(){try{var e=xee&&xee.require&&xee.require("util").types;return e||bee&&bee.binding&&bee.binding("util")}catch(vt){}}();var _ee=wee&&wee.isTypedArray;const kee=_ee?vee(_ee):gee;const See=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]};var Tee=Object.prototype.hasOwnProperty;const Mee=function(e,t,r){var n=e[t];Tee.call(e,t)&&v7(n,r)&&(void 0!==r||t in e)||E9(e,t,r)};const Cee=function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Gee);const Xee=function(e,t){return Yee(Vee(e,t,Bee),e+"")};const Kee=function(e,t,r){if(!V7(r))return!1;var n=typeof t;return!!("number"==n?ree(r)&&Iee(t,r.length):"string"==n&&t in r)&&v7(r[t],e)};const $ee=function(e){return Xee((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&Kee(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n=t||r<0||d&&e-c>=o}function m(){var e=ete();if(p(e))return g(e);s=setTimeout(m,function(e){var r=t-(e-l);return d?fte(r,o-(e-c)):r}(e))}function g(e){return s=void 0,f&&n?h(e):(n=i=void 0,a)}function v(){var e=ete(),r=p(e);if(n=arguments,i=this,l=e,r){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?h(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),h(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=ute(t)||0,V7(r)&&(u=!!r.leading,o=(d="maxWait"in r)?dte(ute(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=l=i=s=void 0},v.flush=function(){return void 0===s?a:g(ete())},v};const pte=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return V7(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),hte(e,t,{leading:n,maxWait:t,trailing:i})};var mte=function(){function e(e,t){for(var r=0;ri&&(l=i),c<0?c=0:c>o&&(c=o);var u=l/i,d=1-c/o;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=pte((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),mte(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,i=t.white,o=t.black,a=t.pointer,s=t.circle,l=(0,K8.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:i,black:o,pointer:a,circle:s}},{custom:!!this.props.style});return n.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),n.createElement("div",{style:l.white,className:"saturation-white"},n.createElement("div",{style:l.black,className:"saturation-black"}),n.createElement("div",{style:l.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:l.circle}))))}}]),t}(n.PureComponent||n.Component);const vte=gte;const yte=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=Xte(e,360),t=Xte(t,100),r=Xte(r,100),0===t)n=i=o=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*o}}(e.h,n,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a));return r=Yte(r),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function Ite(e,t,r){e=Xte(e,255),t=Xte(t,255),r=Xte(r,255);var n,i,o=Math.max(e,t,r),a=Math.min(e,t,r),s=(o+a)/2;if(o==a)n=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:n=(t-r)/l+(t>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Ete(n));return o}function Wte(e,t){t=t||6;for(var r=Ete(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(Ete({h:n,s:i,v:o})),o=(o+s)%1;return a}Ete.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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Yte(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ote(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ote(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Ite(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Ite(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Pte(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var o=[Jte(Math.round(e).toString(16)),Jte(Math.round(t).toString(16)),Jte(Math.round(r).toString(16)),Jte(ere(n))];if(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))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Xte(this._r,255))+"%",g:Math.round(100*Xte(this._g,255))+"%",b:Math.round(100*Xte(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Xte(this._r,255))+"%, "+Math.round(100*Xte(this._g,255))+"%, "+Math.round(100*Xte(this._b,255))+"%)":"rgba("+Math.round(100*Xte(this._r,255))+"%, "+Math.round(100*Xte(this._g,255))+"%, "+Math.round(100*Xte(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(qte[Pte(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Rte(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Ete(e);r="#"+Rte(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Ete(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(zte,arguments)},brighten:function(){return this._applyModification(Nte,arguments)},darken:function(){return this._applyModification(Fte,arguments)},desaturate:function(){return this._applyModification(Lte,arguments)},saturate:function(){return this._applyModification(jte,arguments)},greyscale:function(){return this._applyModification(Dte,arguments)},spin:function(){return this._applyModification(Bte,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Hte,arguments)},complement:function(){return this._applyCombination(Zte,arguments)},monochromatic:function(){return this._applyCombination(Wte,arguments)},splitcomplement:function(){return this._applyCombination(Vte,arguments)},triad:function(){return this._applyCombination(Ute,[3])},tetrad:function(){return this._applyCombination(Ute,[4])}},Ete.fromRatio=function(e,t){if("object"==Mte(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:Qte(e[n]));e=r}return Ete(e,t)},Ete.equals=function(e,t){return!(!e||!t)&&Ete(e).toRgbString()==Ete(t).toRgbString()},Ete.random=function(){return Ete.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Ete.mix=function(e,t,r){r=0===r?0:r||50;var n=Ete(e).toRgb(),i=Ete(t).toRgb(),o=r/100;return Ete({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},Ete.readability=function(e,t){var r=Ete(e),n=Ete(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Ete.isReadable=function(e,t,r){var n,i,o=Ete.readability(e,t);switch(i=!1,n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r),n.level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},Ete.mostReadable=function(e,t,r){var n,i,o,a,s=null,l=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var c=0;cl&&(l=n,s=Ete(t[c]));return Ete.isReadable(e,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,Ete.mostReadable(e,["#fff","#000"],r))};var Gte=Ete.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"},qte=Ete.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(Gte);function Yte(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Xte(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Kte(e){return Math.min(1,Math.max(0,e))}function $te(e){return parseInt(e,16)}function Jte(e){return 1==e.length?"0"+e:""+e}function Qte(e){return e<=1&&(e=100*e+"%"),e}function ere(e){return Math.round(255*parseFloat(e)).toString(16)}function tre(e){return $te(e)/255}var rre=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",r="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function nre(e){return!!rre.CSS_UNIT.exec(e)}var ire=function(e){var t=0,r=0;return Tte(["r","g","b","a","h","s","l","v"],(function(n){if(e[n]&&(t+=1,isNaN(e[n])||(r+=1),"s"===n||"l"===n)){/^\d+%$/.test(e[n])&&(r+=1)}})),t===r&&e},ore=function(e,t){var r=e.hex?Ete(e.hex):Ete(e),n=r.toHsl(),i=r.toHsv(),o=r.toRgb(),a=r.toHex();return 0===n.s&&(n.h=t||0,i.h=t||0),{hsl:n,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:e.h||t||n.h,source:e.source}},are=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&Ete(e).isValid()},sre=function(e){if(!e)return"#fff";var t=ore(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},lre=function(e,t){return Ete(t+" ("+e.replace("\xb0","")+")")._ok},cre=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function i(){var e,t,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=Array(n),a=0;as))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=2&r?new Sre:void 0;for(o.set(e,t),o.set(t,e);++d1&&(e.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),r.props.onChange({h:e.h||r.props.hsl.h,s:Number(hie(e.s)?r.props.hsl.s:e.s),l:Number(hie(e.l)?r.props.hsl.l:e.l),source:"hsl"},t))},r.showHighlight=function(e){e.currentTarget.style.background="#eee"},r.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?r.state={view:"rgb"}:r.state={view:e.view},r}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),mie(t,[{key:"render",value:function(){var e=this,t=(0,K8.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(d7,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(d7,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(d7,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),n.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,n.createElement("div",{style:t.toggle},n.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},n.createElement(pie.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(n.Component);gie.defaultProps={view:"hex"};const vie=gie;const yie=function(){var e=(0,K8.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n.createElement("div",{style:e.picker})};const xie=function(){var e=(0,K8.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.createElement("div",{style:e.picker})};var bie=function(e){var t=e.width,r=e.onChange,i=e.disableAlpha,o=e.rgb,a=e.hsl,s=e.hsv,l=e.hex,c=e.renderers,u=e.styles,d=void 0===u?{}:u,f=e.className,h=void 0===f?"":f,p=e.defaultView,m=(0,K8.ZP)($ee({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:i});return n.createElement("div",{style:m.picker,className:"chrome-picker "+h},n.createElement("div",{style:m.saturation},n.createElement(vte,{style:m.Saturation,hsl:a,hsv:s,pointer:xie,onChange:r})),n.createElement("div",{style:m.body},n.createElement("div",{style:m.controls,className:"flexbox-fix"},n.createElement("div",{style:m.color},n.createElement("div",{style:m.swatch},n.createElement("div",{style:m.active}),n.createElement(t7,{renderers:c}))),n.createElement("div",{style:m.toggles},n.createElement("div",{style:m.hue},n.createElement(m7,{style:m.Hue,hsl:a,pointer:yie,onChange:r})),n.createElement("div",{style:m.alpha},n.createElement(a7,{style:m.Alpha,rgb:o,hsl:a,pointer:yie,renderers:c,onChange:r})))),n.createElement(vie,{rgb:o,hsl:a,hex:l,view:p,onChange:r,disableAlpha:i})))};bie.propTypes={width:EI().oneOfType([EI().string,EI().number]),disableAlpha:EI().bool,styles:EI().object,defaultView:EI().oneOf(["hex","rgb","hsl"])},bie.defaultProps={width:225,disableAlpha:!1,styles:{}};dre(bie);const wie=function(e){var t=e.color,r=e.onClick,i=void 0===r?function(){}:r,o=e.onSwatchHover,a=e.active,s=(0,K8.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:sre(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.createElement(gre,{style:s.color,color:t,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+t}},n.createElement("div",{style:s.dot}))};const _ie=function(e){var t=e.hex,r=e.rgb,i=e.onChange,o=(0,K8.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(e,t){e.r||e.g||e.b?i({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):i({hex:e.hex,source:"hex"},t)};return n.createElement("div",{style:o.fields,className:"flexbox-fix"},n.createElement("div",{style:o.active}),n.createElement(d7,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:t,onChange:a}),n.createElement(d7,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:a}),n.createElement(d7,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:a}),n.createElement(d7,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:a}))};var kie=function(e){var t=e.onChange,r=e.onSwatchHover,i=e.colors,o=e.hex,a=e.rgb,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,K8.ZP)($ee({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},l)),f=function(e,r){e.hex?are(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return n.createElement(Qee,{style:d.Compact,styles:l},n.createElement("div",{style:d.compact,className:"compact-picker "+u},n.createElement("div",null,Vne(i,(function(e){return n.createElement(wie,{key:e,color:e,active:e.toLowerCase()===o,onClick:f,onSwatchHover:r})})),n.createElement("div",{style:d.clear})),n.createElement(_ie,{hex:o,rgb:a,onChange:f})))};kie.propTypes={colors:EI().arrayOf(EI().string),styles:EI().object},kie.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};dre(kie);const Sie=(0,K8.tz)((function(e){var t=e.hover,r=e.color,i=e.onClick,o=e.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=(0,K8.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:t});return n.createElement("div",{style:s.swatch},n.createElement(gre,{color:r,onClick:i,onHover:o,focusStyle:a}))}));var Tie=function(e){var t=e.width,r=e.colors,i=e.onChange,o=e.onSwatchHover,a=e.triangle,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,d=(0,K8.ZP)($ee({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},l),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a,"bottom-left-triangle":"bottom-left"===a,"bottom-right-triangle":"bottom-right"===a}),f=function(e,t){return i({hex:e,source:"hex"},t)};return n.createElement("div",{style:d.card,className:"github-picker "+u},n.createElement("div",{style:d.triangleShadow}),n.createElement("div",{style:d.triangle}),Vne(r,(function(e){return n.createElement(Sie,{color:e,key:e,onClick:f,onSwatchHover:o})})))};Tie.propTypes={width:EI().oneOfType([EI().string,EI().number]),colors:EI().arrayOf(EI().string),triangle:EI().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:EI().object},Tie.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};dre(Tie);const Mie=function(e){var t=e.direction,r=(0,K8.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n.createElement("div",{style:r.picker})};var Cie=Object.assign||function(e){for(var t=1;t.5});return n.createElement("div",{style:r.picker})};const Oie=function(){var e=(0,K8.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return n.createElement("div",{style:e.pointer},n.createElement("div",{style:e.left},n.createElement("div",{style:e.leftInside})),n.createElement("div",{style:e.right},n.createElement("div",{style:e.rightInside})))};const Pie=function(e){var t=e.onClick,r=e.label,i=e.children,o=e.active,a=(0,K8.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return n.createElement("div",{style:a.button,onClick:t},r||i)};const Rie=function(e){var t=e.rgb,r=e.currentColor,i=(0,K8.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.createElement("div",null,n.createElement("div",{style:i.label},"new"),n.createElement("div",{style:i.swatches},n.createElement("div",{style:i.new}),n.createElement("div",{style:i.current})),n.createElement("div",{style:i.label},"current"))};var Lie=function(){function e(e,t){for(var r=0;r100&&(e.a=100),e.a/=100,t({h:i.h,s:i.s,l:i.l,a:e.a,source:"rgb"},n))};return n.createElement("div",{style:s.fields,className:"flexbox-fix"},n.createElement("div",{style:s.double},n.createElement(d7,{style:{input:s.input,label:s.label},label:"hex",value:o.replace("#",""),onChange:l})),n.createElement("div",{style:s.single},n.createElement(d7,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:l,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:s.single},n.createElement(d7,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:l,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:s.single},n.createElement(d7,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:l,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:s.alpha},n.createElement(d7,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*r.a),onChange:l,dragLabel:"true",dragMax:"100"})))};var zie=Object.assign||function(e){for(var t=1;t({offset:e.offset,color:e.rgb}))),[o,a]=(0,n.useState)(!1);return(0,z.jsx)(ioe,{open:o,setOpen:()=>a(!o),showAnglePicker:!1,width:150,maxStops:10,paletteHeight:25,palette:i,onPaletteChange:e=>{const t=e.map((e=>{const t=e.color.replace(/[^0-9,]/g,"").split(","),r={r:Number(t[0]),g:Number(t[1]),b:Number(t[2])};return{rgb:"rgb(".concat(r.r,", ").concat(r.g,", ").concat(r.b,")"),offset:e.offset}}));r(t)},flatStyle:!0,children:(0,z.jsx)(aoe,{})})})),aoe=e=>{let{onSelect:t,color:r}=e;return(0,z.jsx)(Uie,{color:r,width:"150px",onChange:e=>{const{r:r,g:n,b:i,a:o}=e.rgb;null===t||void 0===t||t("rgb(".concat(r,", ").concat(n,", ").concat(i,")"),o)}})},soe=(0,n.memo)((function(e){let{label:t,onChange:r,value:n,children:i}=e;return(0,z.jsx)(yi,{marginBottom:2,children:(0,z.jsxs)(CV,{variant:"standard",size:"small",fullWidth:!0,children:[(0,z.jsx)(_V,{style:{position:"static",transform:"none",transition:"none",fontWeight:"bold",fontSize:"0.95rem",color:"text.secondary"},children:t}),(0,z.jsx)(ZF,{variant:"outlined",value:n,onChange:r,children:i})]})})})),loe=()=>{const e=(0,n.useContext)(Poe),t=b(oT(e)),r=b(aT(e)),i=E();return(0,z.jsxs)(uQ,{title:"SaveFig",children:[(0,z.jsxs)(soe,{label:"File Format",value:r,onChange:t=>{i(TM({itemId:e,saveFormat:t.target.value}))},children:[(0,z.jsx)(is,{value:"svg",children:"svg"}),(0,z.jsx)(is,{value:"png",children:"png"}),(0,z.jsx)(is,{value:"jpeg",children:"jpeg"}),(0,z.jsx)(is,{value:"webp",children:"webp"})]}),(0,z.jsx)(g6,{type:"text",label:"Filename",value:t,onChange:t=>{i(MM({itemId:e,saveFileName:t.target.value}))}})]})},coe=()=>{const e=(0,n.useContext)(Poe),t=E(),r=b(PT(e));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(uQ,{title:"Heatmap",children:[(0,z.jsx)(uoe,{}),(0,z.jsxs)(zp,{container:!0,component:"label",alignItems:"center",children:[(0,z.jsx)(zp,{item:!0,xs:8,children:(0,z.jsx)(fQ,{children:"Pick Color"})}),(0,z.jsx)(zp,{item:!0,xs:4,children:(0,z.jsx)(ooe,{colors:r,dispatchSetColor:r=>{t(iC({itemId:e,colors:r}))}})})]})]}),(0,z.jsx)(loe,{})]})},uoe=()=>{const e=(0,n.useContext)(Poe),t=b(OT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowScale",value:t,onChange:()=>{r(nC({itemId:e,showscale:!t}))}})},doe=()=>{const e=(0,n.useContext)(Poe),t=E(),r=b(sT(e)),i=b(vT(e));return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(uQ,{title:"Image",children:[(0,z.jsx)(hQ,{filePath:r}),(0,z.jsx)(xoe,{}),(0,z.jsx)(foe,{}),(0,z.jsx)(hoe,{}),(0,z.jsx)(poe,{}),(0,z.jsx)(moe,{}),(0,z.jsx)(goe,{}),(0,z.jsxs)(zp,{container:!0,component:"label",alignItems:"center",children:[(0,z.jsx)(zp,{item:!0,xs:8,children:(0,z.jsx)(fQ,{children:"Pick Color"})}),(0,z.jsx)(zp,{item:!0,xs:4,children:(0,z.jsx)(ooe,{colors:i,dispatchSetColor:r=>{t(BM({itemId:e,colors:r}))}})})]}),(0,z.jsx)(voe,{}),(0,z.jsx)(yoe,{})]}),(0,z.jsx)(loe,{})]})},foe=()=>{const e=(0,n.useContext)(Poe),t=b(uT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowTickLabels",value:t,onChange:()=>{r(jM({itemId:e,showticklabels:!t}))}})},hoe=()=>{const e=(0,n.useContext)(Poe),t=b(pT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowLine",value:t,onChange:()=>{r(zM({itemId:e,showline:!t}))}})},poe=()=>{const e=(0,n.useContext)(Poe),t=b(mT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowGrid",value:t,onChange:()=>{r(NM({itemId:e,showgrid:!t}))}})},moe=()=>{const e=(0,n.useContext)(Poe),t=b(gT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowScale",value:t,onChange:()=>{r(FM({itemId:e,showscale:!t}))}})},goe=()=>{const e=(0,n.useContext)(Poe),t=b(dT(e)),r=E();return(0,z.jsxs)(soe,{label:"Smooth",onChange:t=>{r(DM({itemId:e,zsmooth:t.target.value}))},value:t,children:[(0,z.jsx)(is,{value:"best",children:"best"}),(0,z.jsx)(is,{value:"fast",children:"fast"}),(0,z.jsx)(is,{value:"false",children:"False"})]})},voe=()=>{const e=(0,n.useContext)(Poe),t=E(),r=b(yT(e)),i=!(r>0);return(0,z.jsx)(g6,{label:"Image Alpha",type:"number",value:r,inputProps:{step:.1,min:0,max:1},onChange:r=>{const n=""===r.target.value?"":Number(r.target.value);"number"===typeof n&&t(VM({itemId:e,alpha:n}))},error:i,helperText:i?"index > 0":void 0})},yoe=()=>{const e=(0,n.useContext)(Poe),t=E(),r=b(xT(e)),i=!(r>0);return(0,z.jsx)(g6,{label:"Roi Alpha",type:"number",value:r,inputProps:{step:.1,min:0,max:1},onChange:r=>{const n=""===r.target.value?"":Number(r.target.value);"number"===typeof n&&t(HM({itemId:e,roiAlpha:n}))},error:i,helperText:i?"index > 0":void 0})},xoe=()=>{const e=b(qp),t=(0,n.useContext)(Poe),[r,i]=(0,n.useState)(b(fT(t))),[o,a]=(0,n.useState)(b(hT(t))),s=!(r>0),l=E(),c=b(sT(t));return(0,z.jsxs)(yi,{marginBottom:2,children:[(0,z.jsx)(fQ,{children:"Start/End Index"}),(0,z.jsxs)(yi,{sx:{display:"flex",alignItems:"flex-start"},children:[(0,z.jsx)(BV,{error:s,type:"number",inputProps:{step:1,min:0},InputLabelProps:{shrink:!0},onChange:e=>{const t=""===e.target.value?"":Number(e.target.value);"number"===typeof t&&i(t)},value:r,helperText:s?"index > 0":void 0,style:{marginRight:8}}),"~",(0,z.jsx)(BV,{type:"number",InputLabelProps:{shrink:!0},onChange:e=>{const t=""===e.target.value?"":Number(e.target.value);"number"===typeof t&&a(t)},value:o,style:{marginLeft:8,marginRight:8}}),(0,z.jsx)(Sp,{size:"small",className:"ctrl_btn",variant:"contained",onClick:()=>{r>0&&(l(ZM({itemId:t,startIndex:r})),l(UM({itemId:t,endIndex:o})),l(OM({itemId:t,startIndex:r,endIndex:o})),e&&null!==c&&l(Jk({workspaceId:e,path:c,startIndex:null!==r&&void 0!==r?r:1,endIndex:null!==o&&void 0!==o?o:10})))},children:"load"})]})]})},boe=()=>(0,z.jsx)(z.Fragment,{}),woe=()=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(uQ,{title:"TimeSeries",children:[(0,z.jsx)(_oe,{}),(0,z.jsx)(koe,{}),(0,z.jsx)(Soe,{}),(0,z.jsx)(Toe,{}),(0,z.jsx)(Moe,{}),(0,z.jsx)(Coe,{}),(0,z.jsx)(Aoe,{}),(0,z.jsx)(Eoe,{}),(0,z.jsx)(Ioe,{})]}),(0,z.jsx)(loe,{})]}),_oe=()=>{const e=(0,n.useContext)(Poe),t=b(bT(e)),r=E();return(0,z.jsx)(m6,{label:"STD",value:t,onChange:()=>{r(GM({itemId:e,stdBool:!t}))}})},koe=()=>{const e=(0,n.useContext)(Poe),t=b(wT(e)),r=E();return(0,z.jsx)(g6,{type:"number",label:"vertical offset",value:t,onChange:t=>{const n=""===t.target.value?"":Number(t.target.value);"number"===typeof n&&n>0&&r(qM({itemId:e,span:n}))}})},Soe=()=>{const e=(0,n.useContext)(Poe),t=b(_T(e)),r=E();return(0,z.jsx)(m6,{label:"ShowGrid",value:t,onChange:()=>{r(YM({itemId:e,showgrid:!t}))}})},Toe=()=>{const e=(0,n.useContext)(Poe),t=b(kT(e)),r=E();return(0,z.jsx)(m6,{label:"ShowLine",value:t,onChange:()=>{r(XM({itemId:e,showline:!t}))}})},Moe=()=>{const e=(0,n.useContext)(Poe),t=b(ST(e)),r=E();return(0,z.jsx)(m6,{label:"ShowTickLabels",value:t,onChange:()=>{r(KM({itemId:e,showticklabels:!t}))}})},Coe=()=>{const e=(0,n.useContext)(Poe),t=b(TT(e)),r=E();return(0,z.jsx)(m6,{label:"ZeroLine",value:t,onChange:()=>{r($M({itemId:e,zeroline:!t}))}})},Aoe=()=>{const e=(0,n.useContext)(Poe),t=b(VT(e)),r=E();return(0,z.jsxs)(soe,{label:"Range Unit",value:t,onChange:async t=>{r(vM({itemId:e,rangeUnit:t.target.value}))},children:[(0,z.jsx)(is,{value:"frames",children:"Frames"}),(0,z.jsx)(is,{value:"time",children:"Time"})]})},Eoe=()=>{var e,t;const r=b(Rk),i=(0,n.useContext)(Poe),o=b(ZK(r)),a=b(VT(i)),s=b(MT(i)),[l,c]=(0,n.useState)(s);(0,n.useEffect)((()=>{Object.keys(l).length<1||c("frames"===a?s:{left:Number(s.left)/o,right:Number(s.right)/o})}),[JSON.stringify(a),JSON.stringify(s)]);const u=E();return(0,z.jsxs)(zp,{container:!0,justifyContent:"space-between",children:[(0,z.jsx)(zp,{item:!0,children:(0,z.jsx)(g6,{label:"Left",type:"number",inputProps:{min:0},style:{width:105},onChange:e=>{const t=""===e.target.value?"":Number(e.target.value);"number"===typeof t&&u(JM({itemId:i,left:"frames"===a?t:t*o}))},value:null!==(e=l.left)&&void 0!==e?e:""})}),(0,z.jsx)(zp,{item:!0,children:(0,z.jsx)(g6,{label:"Right",type:"number",style:{width:105},onChange:e=>{const t=""===e.target.value?"":Number(e.target.value);"number"===typeof t&&u(QM({itemId:i,right:"frames"===a?t:t*o}))},value:null!==(t=l.right)&&void 0!==t?t:""})})]})},Ioe=()=>{const e=(0,n.useContext)(Poe),t=E(),r=b(ET(e),m$),i=b(CT(e),m$),o=b(lT(e)),a=r=>{const n=r.target.value,a=r.target.checked?[...i,n]:i.filter((e=>e!==n));t(eC({itemId:e,drawOrderList:a})),null!==o&&t(Xk({path:o,index:n}))},s=Object.fromEntries(r.map((e=>i.includes(e)?[e,!0]:[e,!1]))),l=(0,z.jsx)(yi,{sx:{display:"flex",flexDirection:"column",ml:3},children:r.map((e=>(0,z.jsx)(yZ,{label:"Index ".concat(e),control:(0,z.jsx)(uV,{checked:s[e],onChange:a,value:e})},"".concat(e))))});return(0,z.jsxs)(p6,{sx:{my:2},TransitionProps:{unmountOnExit:!0},children:[(0,z.jsx)(s6,{expandIcon:(0,z.jsx)(q4.Z,{}),children:"Legend select"}),(0,z.jsx)(J4,{children:(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(yZ,{label:"All Check",control:(0,z.jsx)(uV,{checked:Object.values(s).every((e=>e)),onChange:n=>{t(eC({itemId:e,drawOrderList:n.target.checked?r:[]})),n.target.checked&&null!==o&&t(Kk({path:o}))}})}),l]})})]})},Ooe=()=>{const e=b(XS);return(0,z.jsx)(z.Fragment,{children:null!=e?(0,z.jsx)(Poe.Provider,{value:e,children:(0,z.jsx)(Roe,{})}):"Please select item..."})},Poe=(0,n.createContext)(NaN),Roe=()=>{const e=(0,n.useContext)(Poe),t=b(rT(e));return(0,z.jsx)(Loe,{dataType:t})},Loe=e=>{let{dataType:t}=e;switch(t){case rm.IMAGE:return(0,z.jsx)(doe,{});case rm.CSV:return(0,z.jsx)(G8,{});case rm.HEAT_MAP:return(0,z.jsx)(coe,{});case rm.TIME_SERIES:return(0,z.jsx)(woe,{});case rm.ROI:return(0,z.jsx)(boe,{});case rm.SCATTER:case rm.BAR:case rm.HISTOGRAM:case rm.LINE:case rm.PIE:case rm.POLAR:return(0,z.jsx)(loe,{});case rm.HTML:return(0,z.jsx)("div",{children:"html editor"});default:return null}},joe=(0,nn.ZP)("main")({display:"flex",flexDirection:"column",flexGrow:1,minHeight:mA}),Doe=()=>(0,z.jsxs)(yi,{display:"flex",children:[(0,z.jsx)(yi,{width:240,marginRight:3,borderRight:1,borderColor:lQ.Z[300],children:(0,z.jsxs)(yi,{overflow:"auto",marginRight:2,children:[(0,z.jsx)(pQ,{}),(0,z.jsx)(Ooe,{})]})}),(0,z.jsx)(joe,{children:(0,z.jsx)(W8,{})})]}),zoe={status:"uninitialized"},Noe=Vl({name:Bp,initialState:zoe,reducers:{clearExperiments:()=>zoe},extraReducers:e=>{e.addCase(Jp.pending,(()=>({status:"pending"}))).addCase(Jp.fulfilled,((e,t)=>({status:"fulfilled",experimentList:function(e){const t={};return Object.entries(e).forEach((e=>{let[r,n]=e;t[r]=UK(n)})),t}(t.payload)}))).addCase(Jp.rejected,((e,t)=>({status:"error",message:t.error.message}))).addCase(Qp.fulfilled,((e,t)=>{t.payload&&"fulfilled"===e.status&&delete e.experimentList[t.meta.arg]})).addCase(em.fulfilled,((e,t)=>{t.payload&&"fulfilled"===e.status&&t.meta.arg.map((t=>delete e.experimentList[t]))})).addCase(Gk.fulfilled,((e,t)=>{if("fulfilled"===e.status){const r=t.meta.arg.uid,n=e.experimentList[r];Object.entries(t.payload).forEach((e=>{let[t,r]=e;"success"===r.status?n.functions[t].status="success":"error"===r.status&&(n.functions[t].status="error")}))}})).addMatcher(Jl(Y_.fulfilled,X_.fulfilled),((e,t)=>{"fulfilled"===e.status&&(e.experimentList[t.payload.unique_id]=UK(t.payload))})).addMatcher(Jl(Hk.fulfilled,Wk.fulfilled),(()=>({status:"uninitialized"})))}}),{clearExperiments:Foe}=Noe.actions,Boe=Noe.reducer,Zoe=rO((e=>x6(e).params),H6,(e=>{const t={};return B3(e).forEach((e=>{t[e.id]=e})),t}),(e=>{const t=F3(e),r={};return t.forEach((t=>{if(s_(t)){var n,i,o;const a=null!==(n=z1(t.id)(e))&&void 0!==n?n:{},s=(l=t.id,e=>j1(l)(e).functionPath)(e),c={...t,data:{...t.data,label:null!==(i=null===(o=t.data)||void 0===o?void 0:o.label)&&void 0!==i?i:"",type:o_.ALGORITHM,path:s,param:a}};r[t.id]=c}else{var a,s;const n=(e=>t=>_5(e)(t).selectedFilePath)(t.id)(e),i=(e=>t=>_5(e)(t).fileType)(t.id)(e),o=(e=>t=>_5(e)(t).param)(t.id)(e),l=O5(t.id)(e),c=P5(t.id)(e),u={...t,data:{...t.data,label:null!==(a=null===(s=t.data)||void 0===s?void 0:s.label)&&void 0!==a?a:"",type:o_.INPUT,path:null!==n&&void 0!==n?n:"",param:o,matPath:c,hdf5Path:l,fileType:i}};r[t.id]=u}var l})),r}),(e=>F3(e).filter(s_).filter((t=>{const r=N1(t.id)(e),n=Uk(t.id)(e);return r||n===kk.ERROR})).map((t=>({nodeId:t.id,name:D1(t.id)(e)})))),((e,t,r,n,i)=>({nwbParam:e,snakemakeParam:t,edgeDict:r,nodeDict:n,forceRunList:i})));function Uoe(){const e=E(),t=E(),r=b(Zp),i=Fe(),o=ze(),{workspaceId:a}=function(){let{matches:e}=n.useContext(Le),t=e[e.length-1];return t?t.params:{}}(),s=Number(a);(0,n.useEffect)((()=>(r?(e(lA(1)),e(Y_(1))):t(eA({id:s})).unwrap().then((t=>{var r;e(Y_(s));const n=null===(r=o.state)||void 0===r?void 0:r.tab;n&&e(uA(n))})).catch((e=>{i("/console/workspaces")})),()=>{e(Foe()),e(cA())})),[e,t,i,s,o.state,r]);const l=b(Rk),c=b(Fk),u=b(Bk),d=!b($p)||u,f=b(E5),h=b(F1),p=b(Zoe),m=(0,n.useCallback)((t=>{e(Hk({runPostData:{name:t,...p,forceRunList:[]}}))}),[e,p]),g=(0,n.useCallback)((()=>{e(Wk({runPostData:p}))}),[e,p]),v=(0,n.useCallback)((async()=>{if(null!=l){rc(await e(qk({uid:l})))&&x("Failed to cancel workflow. Please try again.",{variant:"error"})}}),[e,l]);(0,n.useEffect)((()=>{const t=setInterval((()=>{u&&!c&&null!=l&&e(Gk({uid:l}))}),5e3);return()=>{clearInterval(t)}}),[e,l,c,u]);const y=b(Nk),{enqueueSnackbar:x}=Jr(),[w,_]=(0,n.useState)(y);return(0,n.useEffect)((()=>{w!==y&&(y===bk?(x("Finished",{variant:"success"}),e(Jp())):y===xk?e(Jp()):y===wk?(x("Aborted",{variant:"error"}),e(Jp())):y===_k&&(x("Workflow canceled.",{variant:"success"}),e(Jp())),_(y))}),[e,y,w,x]),{filePathIsUndefined:f,algorithmNodeNotExist:h,uid:l,status:y,runDisabled:d,handleRunPipeline:m,handleRunPipelineByUid:g,handleCancelPipeline:v}}const Voe=(0,nn.ZP)("div")((e=>{let{theme:t}=e;return{flexGrow:1,backgroundColor:t.palette.background.paper,height:"100%"}}));function Hoe(e){const{children:t,value:r,index:n,...i}=e;return(0,z.jsx)("div",{style:{height:"calc(100% - 58px)"},role:"tabpanel",hidden:r!==n,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n),...i,children:r===n&&(0,z.jsx)(yi,{sx:{height:"100%"},children:t})})}const Woe=()=>{const e=Uoe(),t=b(Wp);return(0,z.jsxs)(Voe,{children:[(0,z.jsx)(Hoe,{value:t,index:0,children:(0,z.jsx)(E8,{...e})}),(0,z.jsx)(Hoe,{value:t,index:1,children:(0,z.jsx)(Doe,{})}),(0,z.jsx)(Hoe,{value:t,index:2,children:(0,z.jsx)(O$,{})})]})},Goe=Xl("/getModeStandalone",(async()=>await(async()=>(await dd.get("/is_standalone")).data)())),qoe=e=>{let{snackbarKey:t}=e;const{closeSnackbar:r}=Jr();return(0,z.jsx)(ni,{onClick:()=>r(t),size:"large",children:(0,z.jsx)(Qr.Z,{style:{color:"white"}})})},Yoe=()=>{const e=E(),t=b(Zp),r=b(Up),i=()=>{e(Goe()).unwrap().catch((()=>{new Promise((e=>setTimeout(e,5e3))).then((()=>{i()}))}))};return(0,n.useEffect)((()=>{i()}),[]),r?(0,z.jsx)(Ti,{}):(0,z.jsx)($r,{maxSnack:5,action:e=>(0,z.jsx)(qoe,{snackbarKey:e}),children:(0,z.jsx)(lt,{children:(0,z.jsx)(SE,{children:t?(0,z.jsxs)(tt,{children:[(0,z.jsx)(Qe,{path:"/",element:(0,z.jsx)(Woe,{})}),(0,z.jsx)(Qe,{path:"*",element:(0,z.jsx)(Je,{replace:!0,to:"/"})})]}):(0,z.jsxs)(tt,{children:[(0,z.jsx)(Qe,{path:"/",element:(0,z.jsx)(Je,{replace:!0,to:"/experiments"})}),(0,z.jsx)(Qe,{path:"/experiments",element:(0,z.jsx)(ZY,{})}),(0,z.jsx)(Qe,{path:"/cells",element:(0,z.jsx)(BY,{})}),(0,z.jsx)(Qe,{path:"/account-deleted",element:(0,z.jsx)(MI,{})}),(0,z.jsx)(Qe,{path:"/login",element:(0,z.jsx)(CY,{})}),(0,z.jsx)(Qe,{path:"/reset-password",element:(0,z.jsx)(lX,{})}),(0,z.jsx)(Qe,{path:"/console",element:(0,z.jsx)(kG,{})}),(0,z.jsx)(Qe,{path:"/console/account",element:(0,z.jsx)(TI,{})}),(0,z.jsx)(Qe,{path:"/console/account-manager",element:(0,z.jsx)(pG,{})}),(0,z.jsx)(Qe,{path:"/console/experiments",element:(0,z.jsx)(nY,{})}),(0,z.jsx)(Qe,{path:"/console/group-manager",element:(0,z.jsx)(mY,{})}),(0,z.jsx)(Qe,{path:"/console/administration",element:(0,z.jsx)(SG,{})}),(0,z.jsx)(Qe,{path:"/console/cells",element:(0,z.jsx)(rY,{})}),(0,z.jsxs)(Qe,{path:"/console/workspaces",children:[(0,z.jsx)(Qe,{path:"",element:(0,z.jsx)(_X,{})}),(0,z.jsx)(Qe,{path:":workspaceId",element:(0,z.jsx)(Woe,{})})]}),(0,z.jsx)(Qe,{path:"/console/*",element:(0,z.jsx)(Je,{replace:!0,to:"/console"})}),(0,z.jsx)(Qe,{path:"*",element:(0,z.jsx)(Je,{replace:!0,to:"/"})})]})})})})},Xoe=e=>{e&&e instanceof Function&&r.e(522).then(r.bind(r,89522)).then((t=>{let{getCLS:r,getFID:n,getFCP:i,getLCP:o,getTTFB:a}=t;r(e),n(e),i(e),o(e),a(e)}))},Koe=Vl({name:p8,initialState:{isLatest:!1,tree:{}},reducers:{},extraReducers:e=>{e.addCase(m8.fulfilled,((e,t)=>{e.tree=j3(t.payload),e.isLatest=!0}))}}).reducer,$oe={timeSeries:{},heatMap:{},image:{},csv:{},roi:{},scatter:{},bar:{},html:{},histogram:{},line:{},pie:{},polar:{},loading:!1,statusRoi:{temp_add_roi:[],temp_delete_roi:[],temp_merge_roi:[]}},Joe=Vl({name:tm,initialState:$oe,reducers:{},extraReducers:e=>{e.addCase(GT,((e,t)=>{if(t.payload.deleteData){const{filePath:r,dataType:n}=t.payload;Qoe(e,r,n)}})).addCase(qT,((e,t)=>{if(t.payload.deleteData){const{prevDataType:r,prevFilePath:n}=t.payload;Qoe(e,n,r)}})).addCase(Xk.pending,((e,t)=>{const{path:r}=t.meta.arg;Object.prototype.hasOwnProperty.call(e.timeSeries,r)?(e.timeSeries[r].pending=!0,e.timeSeries[r].fulfilled=!1,e.timeSeries[r].error=null):e.timeSeries[r]={type:"timeSeries",xrange:[],data:{},std:{},pending:!0,fulfilled:!1,error:null}})).addCase(Xk.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.timeSeries[n]={type:"timeSeries",xrange:[],data:{},std:{},pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(Xk.fulfilled,((e,t)=>{const{path:r,index:n}=t.meta.arg;e.timeSeries[r].pending=!1,e.timeSeries[r].fulfilled=!0,e.timeSeries[r].error=null,e.timeSeries[r].meta=t.payload.meta,e.timeSeries[r].data[n]=t.payload.data[n],void 0!==t.payload.std[n]&&(e.timeSeries[r].std[n]=t.payload.std[n])})).addCase(Kk.pending,((e,t)=>{const{path:r}=t.meta.arg;Object.prototype.hasOwnProperty.call(e.timeSeries,r)?(e.timeSeries[r].pending=!0,e.timeSeries[r].fulfilled=!1,e.timeSeries[r].error=null):e.timeSeries[r]={type:"timeSeries",xrange:[],data:{},std:{},pending:!0,fulfilled:!1,error:null}})).addCase(Kk.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.timeSeries[n]={type:"timeSeries",xrange:[],data:{},std:{},pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(Kk.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.timeSeries[r].pending=!1,e.timeSeries[r].fulfilled=!0,e.timeSeries[r].error=null,e.timeSeries[r].xrange=t.payload.xrange,e.timeSeries[r].meta=t.payload.meta,e.timeSeries[r].data=t.payload.data,void 0!==t.payload.std&&(e.timeSeries[r].std=t.payload.std)})).addCase(Yk.pending,((e,t)=>{const{path:r}=t.meta.arg;Object.prototype.hasOwnProperty.call(e.timeSeries,r)?(e.timeSeries[r].pending=!0,e.timeSeries[r].fulfilled=!1,e.timeSeries[r].error=null):e.timeSeries[r]={type:"timeSeries",xrange:[],data:{},std:{},pending:!0,fulfilled:!1,error:null}})).addCase(Yk.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.timeSeries[n]={type:"timeSeries",xrange:[],data:{},std:{},pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(Yk.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.timeSeries[r].pending=!1,e.timeSeries[r].fulfilled=!0,e.timeSeries[r].error=null,e.timeSeries[r].xrange=t.payload.xrange,e.timeSeries[r].meta=t.payload.meta,e.timeSeries[r].data=t.payload.data,e.timeSeries[r].std=t.payload.std})).addCase($k.pending,((e,t)=>{const{path:r}=t.meta.arg;e.heatMap[r]={type:"heatMap",data:[],columns:[],index:[],pending:!0,fulfilled:!1,error:null}})).addCase($k.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.heatMap[n]={type:"heatMap",data:[],columns:[],index:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase($k.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.heatMap[r]={type:"heatMap",data:t.payload.data,meta:t.payload.meta,columns:t.payload.columns,index:t.payload.index,pending:!1,fulfilled:!0,error:null}})).addCase(uS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.histogram[r]={type:"histogram",data:[],pending:!0,fulfilled:!1,error:null}})).addCase(uS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.histogram[n]={type:"histogram",data:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(uS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.histogram[r]={type:"histogram",data:t.payload.data,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(dS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.line[r]={type:"line",data:[],columns:[],index:[],pending:!0,fulfilled:!1,error:null}})).addCase(dS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.line[n]={type:"line",data:[],columns:[],index:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(dS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.line[r]={type:"line",data:t.payload.data,columns:t.payload.columns,index:t.payload.index,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(fS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.pie[r]={type:"pie",data:[],columns:[],pending:!0,fulfilled:!1,error:null}})).addCase(fS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.pie[n]={type:"pie",data:[],columns:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(fS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.pie[r]={type:"pie",data:t.payload.data,columns:t.payload.columns,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(hS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.polar[r]={type:"polar",data:[],columns:[],index:[],pending:!0,fulfilled:!1,error:null}})).addCase(hS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.polar[n]={type:"polar",data:[],columns:[],index:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(hS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.polar[r]={type:"polar",data:t.payload.data,columns:t.payload.columns,index:t.payload.index,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(Jk.pending,((e,t)=>{const{path:r}=t.meta.arg;e.image[r]={type:"image",data:[],pending:!0,fulfilled:!1,error:null}})).addCase(Jk.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.image[r]={type:"image",data:t.payload.data,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(Jk.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.image[n]={type:"image",data:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(Qk.pending,((e,t)=>{const{path:r}=t.meta.arg;e.csv[r]={type:"csv",data:[],pending:!0,fulfilled:!1,error:null}})).addCase(Qk.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.csv[r]={type:"csv",data:t.payload.data,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(Qk.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.csv[n]={type:"csv",data:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(eS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.loading=!0,e.roi[r]={type:"roi",data:[],pending:!0,fulfilled:!1,error:null,roiUniqueList:[]}})).addCase(eS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg,{data:n}=t.payload;e.loading=!1;const i=n[0].map((e=>Array.from(new Set(e.filter((e=>null!=e)))))).flat(),o=Array.from(new Set(i)).sort(((e,t)=>e-t)).map(String);e.roi[r]={type:"roi",data:n,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null,roiUniqueList:o}})).addCase(eS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.loading=!1,e.roi[n]={type:"roi",data:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected",roiUniqueList:[]}})).addCase(sS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.scatter[r]={type:"scatter",data:{},pending:!0,fulfilled:!1,error:null}})).addCase(sS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.scatter[r]={type:"scatter",data:t.payload.data,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(sS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.scatter[n]={type:"scatter",data:{},pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(lS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.bar[r]={type:"bar",data:{},columns:[],index:[],pending:!0,fulfilled:!1,error:null}})).addCase(lS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.bar[n]={type:"bar",data:{},columns:[],index:[],pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(lS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.bar[r]={type:"bar",data:t.payload.data,meta:t.payload.meta,columns:t.payload.columns,index:t.payload.index,pending:!1,fulfilled:!0,error:null}})).addCase(cS.pending,((e,t)=>{const{path:r}=t.meta.arg;e.html[r]={type:"html",data:"",pending:!0,fulfilled:!1,error:null}})).addCase(cS.fulfilled,((e,t)=>{const{path:r}=t.meta.arg;e.html[r]={type:"html",data:t.payload.data,meta:t.payload.meta,pending:!1,fulfilled:!0,error:null}})).addCase(cS.rejected,((e,t)=>{var r;const{path:n}=t.meta.arg;e.html[n]={type:"html",data:"",pending:!1,fulfilled:!1,error:null!==(r=t.error.message)&&void 0!==r?r:"rejected"}})).addCase(aS.fulfilled,((e,t)=>{e.statusRoi=t.payload,e.loading=!1})).addCase(tS.fulfilled,(e=>{e.statusRoi={temp_add_roi:[],temp_delete_roi:[],temp_merge_roi:[]},e.loading=!1})).addMatcher(Jl(tS.pending,nS.pending,iS.pending,rS.pending,oS.pending,aS.pending),(e=>{e.loading=!0})).addMatcher(Jl(tS.rejected,nS.rejected,nS.fulfilled,rS.rejected,rS.fulfilled,iS.rejected,iS.fulfilled,oS.rejected,oS.fulfilled,aS.rejected),(e=>{e.loading=!1})).addMatcher(Jl(Hk.fulfilled,Wk.fulfilled),(()=>$oe))}});function Qoe(e,t,r){r===rm.IMAGE?delete e.image[t]:r===rm.TIME_SERIES?delete e.timeSeries[t]:r===rm.CSV?delete e.csv[t]:r===rm.HEAT_MAP?delete e.heatMap[t]:r===rm.SCATTER?delete e.scatter[t]:r===rm.BAR?delete e.bar[t]:r===rm.HTML?delete e.html[t]:r===rm.HISTOGRAM?delete e.histogram[t]:r===rm.LINE?delete e.line[t]:r===rm.PIE?delete e.pie[t]:r===rm.POLAR&&delete e.polar[t]}const eae=Joe.reducer,tae=Vl({name:A_,initialState:{},reducers:{setFileUploaderStateById(e,t){e[t.payload]=W5}},extraReducers:e=>{e.addCase(E_,((e,t)=>{const{progress:r,requestId:n}=t.payload;e[n].uploadingProgress=r})).addCase(I_.pending,((e,t)=>{const{fileName:r,requestId:n}=t.meta.arg,i=e[n];e[n]={...i,fileName:r,isUninitialized:!1,pending:!0,fulfilled:!1,uploadingProgress:0}})).addCase(I_.fulfilled,((e,t)=>{const{requestId:r}=t.meta.arg,{resultPath:n}=t.payload,i=e[r];e[r]={...i,path:n,pending:!1,fulfilled:!0}})).addCase(I_.rejected,((e,t)=>{const{requestId:r}=t.meta.arg,n=e[r];e[r]={...n,pending:!1,fulfilled:!1,error:t.error.message}})).addCase(R_.pending,((e,t)=>{const{requestId:r}=t.meta.arg,n=e[r];e[r]={...n,isUninitialized:!1,pending:!0,fulfilled:!1}})).addCase(R_.fulfilled,((e,t)=>{const{current:r,total:n}=t.payload,{requestId:i}=t.meta.arg,o=e[i];e[i]={...o,pending:!(r===n),fulfilled:!0}})).addCase(R_.rejected,((e,t)=>{const{requestId:r}=t.meta.arg,n=e[r];e[r]={...n,pending:!1,fulfilled:!1,error:t.error.message}}))}}),{setFileUploaderStateById:rae}=tae.actions,nae=tae.reducer,iae=Vl({name:M_,initialState:{},reducers:{},extraReducers:e=>{e.addCase(C_.pending,((e,t)=>{const{fileType:r}=t.meta.arg;e[r]={...e[r],isLoading:!0,isLatest:!1}})).addCase(C_.fulfilled,((e,t)=>{const{fileType:r}=t.meta.arg;e[r].tree=F2(t.payload),e[r].isLatest=!0,e[r].isLoading=!1})).addCase(I_.pending,((e,t)=>{const{fileType:r}=t.meta.arg;r===F_?null!=e[T_.IMAGE]?e[T_.IMAGE].isLatest=!1:e[T_.IMAGE]={isLoading:!1,isLatest:!1,tree:[]}:r===N_?null!=e[T_.CSV]?e[T_.CSV].isLatest=!1:e[T_.CSV]={isLoading:!1,isLatest:!1,tree:[]}:r===B_?null!=e[T_.HDF5]?e[T_.HDF5].isLatest=!1:e[T_.HDF5]={isLoading:!1,isLatest:!1,tree:[]}:r===V_?null!=e[T_.MATLAB]?e[T_.MATLAB].isLatest=!1:e[T_.MATLAB]={isLoading:!1,isLatest:!1,tree:[]}:r===W_?null!=e[T_.EXPDB]?e[T_.EXPDB].isLatest=!1:e[T_.EXPDB]={isLoading:!1,isLatest:!1,tree:[]}:null!=e[T_.ALL]?e[T_.ALL].isLatest=!1:e[T_.ALL]={isLoading:!1,isLatest:!1,tree:[]}})).addCase(I_.fulfilled,((e,t)=>{const{fileType:r}=t.meta.arg;r===F_?e[T_.IMAGE].isLatest=!1:r===N_?e[T_.CSV].isLatest=!1:r===B_?e[T_.HDF5].isLatest=!1:r===V_?e[T_.MATLAB].isLatest=!1:r===W_?e[T_.EXPDB].isLatest=!1:e[T_.ALL].isLatest=!1})).addCase($_.fulfilled,(e=>{[T_.IMAGE,T_.CSV,T_.HDF5,T_.ALL].forEach((t=>{null!=e[t]&&(e[t].isLatest=!1)}))}))}}).reducer;var oae=r(51293);const aae={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},sae={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};var lae=r(23837),cae=r(69850),uae=r(89994),dae=r(2316);const fae=Vl({name:"handleTypeColor",initialState:{colorMap:{ImageData:oae.Z[500],IscellData:aae[500],TimeSeriesData:sae[500],Suite2pData:lae.Z[500],FluoData:cae.Z[500],SpikingActivityData:cae.Z[500],BehaviorData:sae[500],ExpDbData:uae.Z[300],StatData:uae.Z[800],MicroscopeData:dae.Z[500]},nextKey:0},reducers:{}}).reducer;function hae(e){return e.map((e=>e.isDir?{name:e.name,isDir:!0,nodes:hae(e.nodes),path:e.path}:{name:e.name,isDir:!1,shape:e.shape,path:e.path,nbytes:e.nbytes}))}const pae=Vl({name:i4,initialState:{isLoading:!1,tree:[]},reducers:{},extraReducers:e=>{e.addCase(o4.pending,(e=>{e.tree=[],e.isLoading=!0})).addCase(o4.fulfilled,((e,t)=>{e.tree=hae(t.payload),e.isLoading=!1}))}}).reducer;function mae(e){return e.map((e=>e.isDir?{name:e.name,isDir:!0,nodes:mae(e.nodes),path:e.path,dataType:e.dataType}:{name:e.name,isDir:!1,shape:e.shape,path:e.path,nbytes:e.nbytes,dataType:e.dataType}))}const gae=Vl({name:"matlab",initialState:{isLoading:!1,tree:[]},reducers:{},extraReducers:e=>{e.addCase(m4.pending,(e=>{e.tree=[],e.isLoading=!0})).addCase(m4.fulfilled,((e,t)=>{e.tree=mae(t.payload),e.isLoading=!1}))}}).reducer,vae=Vl({name:"modeStandalone",initialState:{mode:void 0,loading:!0},reducers:{},extraReducers(e){e.addCase(Goe.pending,(e=>{e.loading=!0})).addCase(Goe.fulfilled,((e,t)=>{e.mode=t.payload,e.loading=!1}))}}).reducer,yae={offset:0,total:0,limit:50,header:{graph_titles:[]},items:[]},xae=Vl({name:bq,initialState:{data:{public:yae,private:yae},loading:!1,type:"experiment",listShare:void 0,listGroupsShare:void 0,filterParams:void 0},reducers:{},extraReducers:e=>{e.addCase(wq.pending,(e=>{"cell"===e.type&&(e.data.private=yae,e.type="experiment"),e.loading=!0})).addCase(_q.pending,(e=>{"experiment"===e.type&&(e.data.private=yae,e.type="cell"),e.loading=!0})).addCase(kq.pending,(e=>{"cell"===e.type&&(e.data.public=yae,e.type="experiment"),e.loading=!0})).addCase(Sq.pending,(e=>{"experiment"===e.type&&(e.data.public=yae,e.type="cell"),e.loading=!0})).addCase(Mq.pending,(e=>{e.listShare=void 0,e.loading=!0})).addCase(Iq.fulfilled,((e,t)=>{e.filterParams=t.payload,e.loading=!1})).addCase(Iq.rejected,(e=>{e.loading=!0})).addMatcher(Jl(Eq.pending,Cq.pending,Tq.pending,Aq.pending,Oq.pending,Iq.pending),(e=>{e.loading=!0})).addMatcher(Jl(_q.fulfilled,wq.fulfilled),((e,t)=>{e.data.private=t.payload,e.loading=!1})).addMatcher(Jl(Sq.fulfilled,kq.fulfilled),((e,t)=>{e.data.public=t.payload,e.loading=!1})).addMatcher(Jl(Mq.fulfilled),((e,t)=>{e.listShare=t.payload,e.loading=!1})).addMatcher(Jl(wq.rejected,_q.rejected,kq.rejected,Sq.rejected,Mq.rejected,Cq.rejected,Cq.fulfilled,Tq.fulfilled,Tq.rejected,Aq.rejected,Eq.rejected,Eq.fulfilled,Oq.fulfilled,Oq.rejected,Iq.rejected),(e=>{e.loading=!1}))}}).reducer,bae=function(e){var t,r=Zl(),n=e||{},i=n.reducer,o=void 0===i?void 0:i,a=n.middleware,s=void 0===a?r():a,l=n.devTools,c=void 0===l||l,u=n.preloadedState,d=void 0===u?void 0:u,f=n.enhancers,h=void 0===f?void 0:f;if("function"===typeof o)t=o;else{if(!jl(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=ml(o)}var p=s;"function"===typeof p&&(p=p(r));var m=vl.apply(void 0,p),g=gl;c&&(g=Ll(Ol({trace:!1},"object"===typeof c&&c)));var v=new Fl(m),y=v;return Array.isArray(h)?y=kl([m],h):"function"===typeof h&&(y=h(v)),pl(t,d,g.apply(void 0,y))}({reducer:ml({algorithmList:Koe,algorithmNode:L6,displayData:eae,fileUploader:nae,flowElement:pk,inputNode:F5,handleColor:fae,filesTree:iae,nwb:M6,rightDrawer:r5,visualaizeItem:gC,snakemake:$6,pipeline:YK,hdf5:pae,matlab:gae,experiments:Boe,workspace:fA,user:Id,mode:vae,groupManager:Vl({name:GW,initialState:{groupsManagerData:{items:[],total:0,limit:50,offset:0},listUserGroup:[],listSearchGroup:[],loading:!1},reducers:{},extraReducers(e){e.addCase(qW.fulfilled,((e,t)=>{e.loading=!1,e.groupsManagerData=t.payload})).addCase(JW.fulfilled,((e,t)=>{e.loading=!1,e.listUserGroup=t.payload})).addCase(QW.fulfilled,((e,t)=>{e.loading=!1,e.listSearchGroup=t.payload})).addMatcher(Jl(QW.pending,JW.pending,$W.pending,YW.pending,qW.pending,KW.pending),(e=>{e.loading=!0})).addMatcher(Jl($W.fulfilled,JW.rejected,QW.rejected,$W.rejected,YW.rejected,qW.rejected,KW.rejected),(e=>{e.loading=!1}))}}).reducer,[bq]:xae}),middleware:e=>e({serializableCheck:!1})}),wae=(0,pi.Z)({components:{MuiTextField:{defaultProps:{variant:"standard"}},MuiSelect:{defaultProps:{variant:"standard"}},MuiDialog:{defaultProps:{disableEscapeKeyDown:!1}}}});(0,O.s)(document.getElementById("root")).render((0,z.jsx)(n.StrictMode,{children:(0,z.jsx)(T,{store:bae,children:(0,z.jsx)(G,{theme:wae,children:(0,z.jsx)(Yoe,{})})})})),Xoe()})()})(); \ No newline at end of file +/*! For license information please see main.79663488.js.LICENSE.txt */ +(()=>{var e={5296:(e,t,r)=>{"use strict";r.d(t,{Z:()=>ie});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(b,--y):0,g--,10===x&&(g=1,m--),x}function S(){return x=y2||A(x)>3?"":" "}function R(e,t){for(;--t&&S()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return C(e,M()+(t<6&&32==T()&&32==S()))}function L(e){for(;S();)switch(x){case e:return y;case 34:case 39:34!==e&&39!==e&&L(x);break;case 40:41===e&&L(e);break;case 92:S()}return y}function j(e,t){for(;S()&&e+x!==57&&(e+x!==84||47!==T()););return"/*"+C(t,y-1)+"*"+o(47===e?e:S())}function D(e){for(;!A(T());)S();return C(e,y)}var z="-ms-",N="-moz-",F="-webkit-",B="comm",Z="rule",U="decl",V="@keyframes";function H(e,t){for(var r="",n=h(e),i=0;i0&&f(N)-v&&p(x>32?K(N+";",n,r,v-1):K(l(N," ","")+";",n,r,v-2),h);break;case 59:N+=";";default:if(p(z=Y(N,t,r,m,g,i,d,E,I=[],L=[],v),a),123===A)if(0===g)q(N,t,z,z,I,a,v,d,L);else switch(99===y&&110===u(N,3)?100:y){case 100:case 108:case 109:case 115:q(e,z,z,n&&p(Y(e,z,z,0,0,i,d,E,i,I=[],v),L),i,L,v,d,n?I:L);break;default:q(N,z,z,z,[""],L,0,d,L)}}m=g=x=0,w=C=1,E=N="",v=s;break;case 58:v=1+f(N),x=b;default:if(w<1)if(123==A)--w;else if(125==A&&0==w++&&125==k())continue;switch(N+=o(A),A*w){case 38:C=g>0?1:(N+="\f",-1);break;case 44:d[m++]=(f(N)-1)*C,C=1;break;case 64:45===T()&&(N+=O(S())),y=T(),g=v=f(E=N+=D(M())),A++;break;case 45:45===b&&2==f(N)&&(w=0)}}return a}function Y(e,t,r,n,o,a,c,u,f,p,m){for(var g=o-1,v=0===o?a:[""],y=h(v),x=0,b=0,_=0;x0?v[k]+" "+S:l(S,/&\f/g,v[k])))&&(f[_++]=T);return w(e,t,r,0===o?Z:u,f,p,m)}function X(e,t,r){return w(e,t,r,B,o(x),d(e,2,-2),0)}function K(e,t,r,n){return w(e,t,r,U,d(e,0,n),d(e,n+1,-1),n)}var $=function(e,t,r){for(var n=0,i=0;n=i,i=T(),38===n&&12===i&&(t[r]=1),!A(i);)S();return C(e,y)},J=function(e,t){return I(function(e,t){var r=-1,n=44;do{switch(A(n)){case 0:38===n&&12===T()&&(t[r]=1),e[r]+=$(y-1,t,r);break;case 2:e[r]+=O(n);break;case 4:if(44===n){e[++r]=58===T()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=o(n)}}while(n=S());return e}(E(e),t))},Q=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(r))&&!n){Q.set(e,!0);for(var i=[],o=J(t,i),a=r.props,s=0,l=0;s6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+N+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?re(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===u(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+z+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+z+e+e}return e}var ne=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=re(e.value,e.length);break;case V:return H([_(e,{value:l(e.value,"@","@"+F)})],n);case Z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([_(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return H([_(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,z+"input-$1")]})],n)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||ne;var o,a,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{Z:()=>n})},3346:(e,t,r)=>{"use strict";r.d(t,{T:()=>l,i:()=>o,w:()=>s});var n=r(47313),i=r(5296),o=(r(21086),r(85696),!0),a=n.createContext("undefined"!==typeof HTMLElement?(0,i.Z)({key:"css"}):null);a.Provider;var s=function(e){return(0,n.forwardRef)((function(t,r){var i=(0,n.useContext)(a);return e(t,i,r)}))};o||(s=function(e){return function(t){var r=(0,n.useContext)(a);return null===r?(r=(0,i.Z)({key:"css"}),n.createElement(a.Provider,{value:r},e(t,r))):e(t,r)}});var l=n.createContext({})},21086:(e,t,r)=>{"use strict";r.d(t,{O:()=>p});var n={animationIterationCount:1,aspectRatio: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},i=r(91816),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,i.Z)((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(a,(function(e,t,r){return f={name:t,styles:r,next:f},t}))}return 1===n[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,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 f={name:r.name,styles:r.styles,next:f},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)f={name:n.name,styles:n.styles,next:f},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:f}}},85696:(e,t,r)=>{"use strict";var n;r.d(t,{L:()=>a,j:()=>s});var i=r(47313),o=!!(n||(n=r.t(i,2))).useInsertionEffect&&(n||(n=r.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},54911:(e,t,r)=>{"use strict";r.d(t,{My:()=>o,fp:()=>n,hC:()=>i});function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}var i=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},o=function(e,t,r){i(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},99932:(e,t,r)=>{"use strict";var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:l},u)},d),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3050:(e,t,r)=>{"use strict";var n,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:r,width:o,height:l},u)},d),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},14281:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"}),"AccountCircle");t.Z=a},15962:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M22 11V3h-7v3H9V3H2v8h7V8h2v10h4v3h7v-8h-7v3h-2V8h2v3z"}),"AccountTree");t.Z=a},5211:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=a},44661:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M8 11h8v2H8zm12.1 1H22c0-2.76-2.24-5-5-5h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1zM3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM19 12h-2v3h-3v2h3v3h2v-3h3v-2h-3z"}),"AddLink");t.Z=a},59344:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2h-3zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8h-3zM5 19l3-4 2 3 3-4 4 5H5z"}),"AddPhotoAlternate");t.Z=a},86753:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-5h2v5zm4 0h-2v-3h2v3zm0-5h-2v-2h2v2zm4 5h-2V7h2v10z"}),"Analytics");t.Z=a},69883:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");t.Z=a},54406:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");t.Z=a},48617:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7 15h7v2H7zm0-4h10v2H7zm0-4h10v2H7zm12-4h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-.14 0-.27.01-.4.04-.39.08-.74.28-1.01.55-.18.18-.33.4-.43.64-.1.23-.16.49-.16.77v14c0 .27.06.54.16.78s.25.45.43.64c.27.27.62.47 1.01.55.13.02.26.03.4.03h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7-.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75zM19 19H5V5h14v14z"}),"AssignmentOutlined");t.Z=a},91385:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}),"Autorenew");t.Z=a},84764:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"}),"Block");t.Z=a},81195:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");t.Z=a},68728:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=a},16450:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");t.Z=a},37957:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"CheckCircleOutline");t.Z=a},37850:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"}),"CheckCircleRounded");t.Z=a},5982:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 7H2v2h9V7zm0 8H2v2h9v-2zm5.34-4L12.8 7.46l1.41-1.41 2.12 2.12 4.24-4.24L22 5.34 16.34 11zm0 8-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L22 13.34 16.34 19z"}),"ChecklistRtl");t.Z=a},54045:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.Z=a},11198:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.Z=a},38966:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("path",{d:"M5 5h2v3h10V5h2v5h2V5c0-1.1-.9-2-2-2h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v-2H5V5zm7-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z"},"0"),(0,o.jsx)("path",{d:"M20.3 18.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S12 14 12 16.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l2.7 2.7 1.4-1.4-2.7-2.7zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5z"},"1")],"ContentPasteSearch");t.Z=a},51765:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard");t.Z=a},51997:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");t.Z=a},96217:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");t.Z=a},51642:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"}),"Domain");t.Z=a},64292:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=a},65954:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},57822:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");t.Z=a},59236:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");t.Z=a},6306:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=a},51671:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"}),"Folder");t.Z=a},82715:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAdd");t.Z=a},22575:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"}),"Groups");t.Z=a},64661:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule");t.Z=a},53512:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}),"InsertDriveFileOutlined");t.Z=a},29428:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");t.Z=a},3665:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp");t.Z=a},36859:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}),"KeyboardBackspace");t.Z=a},42854:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"}),"Logout");t.Z=a},35449:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("circle",{cx:"10",cy:"8",r:"4"},"0"),(0,o.jsx)("path",{d:"M10.67 13.02c-.22-.01-.44-.02-.67-.02-2.42 0-4.68.67-6.61 1.82-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.79-1.13-1.26-2.51-1.26-4 0-1.07.25-2.07.67-2.98zM20.75 16c0-.22-.03-.42-.06-.63l1.14-1.01-1-1.73-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49-1 1.73 1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01 1 1.73 1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49 1-1.73-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"},"1")],"ManageAccounts");t.Z=a},61317:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.Z=a},30129:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"}),"Portrait");t.Z=a},79236:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"}),"Public");t.Z=a},66119:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M11 8.17 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.87 20 13.48 20 12c0-3.35-2.07-6.22-5-7.41V5c0 1.1-.9 2-2 2h-2v1.17zm10.19 13.02-1.41 1.41-2.27-2.27C15.93 21.39 14.04 22 12 22 6.48 22 2 17.52 2 12c0-2.04.61-3.93 1.66-5.51L1.39 4.22 2.8 2.81l18.39 18.38zM11 18c-1.1 0-2-.9-2-2v-1l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.08 3.05 7.44 7 7.93V18z"}),"PublicOff");t.Z=a},84389:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay");t.Z=a},2630:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"}),"Reply");t.Z=a},4787:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19 15.18V7c0-2.21-1.79-4-4-4s-4 1.79-4 4v10c0 1.1-.9 2-2 2s-2-.9-2-2V8.82C8.16 8.4 9 7.3 9 6c0-1.66-1.34-3-3-3S3 4.34 3 6c0 1.3.84 2.4 2 2.82V17c0 2.21 1.79 4 4 4s4-1.79 4-4V7c0-1.1.9-2 2-2s2 .9 2 2v8.18c-1.16.41-2 1.51-2 2.82 0 1.66 1.34 3 3 3s3-1.34 3-3c0-1.3-.84-2.4-2-2.82z"}),"Route");t.Z=a},82495:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings");t.Z=a},19630:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)([(0,o.jsx)("path",{d:"M18 2h-8L4 8v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 2v16H6V8.83L10.83 4H18z"},"0"),(0,o.jsx)("path",{d:"m16 13-4 4-4-4 1.41-1.41L11 13.17V9.02L13 9v4.17l1.59-1.59L16 13z"},"1")],"SimCardDownloadOutlined");t.Z=a},13002:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");t.Z=a},99123:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"}),"Tune");t.Z=a},10237:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=a},22611:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.Z=a},19009:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M12 5.99 19.53 19H4.47L12 5.99M2.74 18c-.77 1.33.19 3 1.73 3h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18zM11 11v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zm0 5h2v2h-2z"}),"WarningAmberRounded");t.Z=a},5878:(e,t,r)=>{"use strict";var n=r(64836);t.Z=void 0;var i=n(r(45045)),o=r(46417),a=(0,i.default)((0,o.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"}),"Web");t.Z=a},45045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(28095)},89994:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},23837:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},24929:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},69850:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},2316:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"}},51293:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},96745:(e,t,r)=>{"use strict";r.d(t,{Z:()=>L});var n=r(87462),i=r(63366),o=r(77219),a=r(13019),s=r(9456),l=r(63232),c=r(63649);var u=r(17551);const d={black:"#000",white:"#fff"};var f=r(24929),h=r(2316),p=r(51293),m=r(69850),g=r(89994);const v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var y=r(23837);const x=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function _(e,t,r,n){const i=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:"light"===t?e.light=(0,u.$n)(e.main,i):"dark"===t&&(e.dark=(0,u._j)(e.main,o)))}function k(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:s=.2}=e,l=(0,i.Z)(e,x),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g.Z[200],light:g.Z[50],dark:g.Z[400]}:{main:g.Z[700],light:g.Z[400],dark:g.Z[800]}}(t),k=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h.Z[200],light:h.Z[50],dark:h.Z[400]}:{main:h.Z[500],light:h.Z[300],dark:h.Z[700]}}(t),S=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p.Z[500],light:p.Z[300],dark:p.Z[700]}:{main:p.Z[700],light:p.Z[400],dark:p.Z[800]}}(t),T=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),M=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y.Z[400],light:y.Z[300],dark:y.Z[700]}:{main:y.Z[800],light:y.Z[500],dark:y.Z[900]}}(t),C=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m.Z[400],light:m.Z[300],dark:m.Z[700]}:{main:"#ed6c02",light:m.Z[500],dark:m.Z[900]}}(t);function A(e){return(0,u.mi)(e,w.text.primary)>=r?w.text.primary:b.text.primary}const E=e=>{let{color:t,name:r,mainShade:i=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,n.Z)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.Z)(11,r?" (".concat(r,")"):"",i));if("string"!==typeof t.main)throw new Error((0,o.Z)(12,r?" (".concat(r,")"):"",JSON.stringify(t.main)));return _(t,"light",a,s),_(t,"dark",l,s),t.contrastText||(t.contrastText=A(t.main)),t},I={dark:w,light:b};return(0,a.Z)((0,n.Z)({common:(0,n.Z)({},d),mode:t,primary:E({color:c,name:"primary"}),secondary:E({color:k,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:E({color:S,name:"error"}),warning:E({color:C,name:"warning"}),info:E({color:T,name:"info"}),success:E({color:M,name:"success"}),grey:f.Z,contrastThreshold:r,getContrastText:A,augmentColor:E,tonalOffset:s},I[t]),l)}const S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const T={textTransform:"uppercase"},M='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){const r="function"===typeof t?t(e):t,{fontFamily:o=M,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:h,pxToRem:p}=r,m=(0,i.Z)(r,S);const g=s/14,v=p||(e=>"".concat(e/f*g,"rem")),y=(e,t,r,i,a)=>{return(0,n.Z)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:r},o===M?{letterSpacing:"".concat((s=i/t,Math.round(1e5*s)/1e5),"em")}:{},a,h);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,T),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,T),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.Z)((0,n.Z)({htmlFontSize:f,pxToRem:v,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},x),m,{clone:!1})}function A(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const E=["none",A(0,2,1,-1,0,1,1,0,0,1,3,0),A(0,3,1,-2,0,2,2,0,0,1,5,0),A(0,3,3,-2,0,3,4,0,0,1,8,0),A(0,2,4,-1,0,4,5,0,0,1,10,0),A(0,3,5,-1,0,5,8,0,0,1,14,0),A(0,3,5,-1,0,6,10,0,0,1,18,0),A(0,4,5,-2,0,7,10,1,0,2,16,1),A(0,5,5,-3,0,8,10,1,0,3,14,2),A(0,5,6,-3,0,9,12,1,0,3,16,2),A(0,6,6,-3,0,10,14,1,0,4,18,3),A(0,6,7,-4,0,11,15,1,0,4,20,3),A(0,7,8,-4,0,12,17,2,0,5,22,4),A(0,7,8,-4,0,13,19,2,0,5,24,4),A(0,7,9,-4,0,14,21,2,0,5,26,4),A(0,8,9,-5,0,15,22,2,0,6,28,5),A(0,8,10,-5,0,16,24,2,0,6,30,5),A(0,8,11,-5,0,17,26,2,0,6,32,5),A(0,9,11,-5,0,18,28,2,0,7,34,6),A(0,9,12,-6,0,19,29,2,0,7,36,6),A(0,10,13,-6,0,20,31,3,0,8,38,7),A(0,10,13,-6,0,21,33,3,0,8,40,7),A(0,10,14,-6,0,22,35,3,0,8,42,7),A(0,11,14,-7,0,23,36,3,0,9,44,8),A(0,11,15,-7,0,24,38,3,0,9,46,8)];var I=r(75829);const O={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:r={},transitions:u={},typography:d={}}=e,f=(0,i.Z)(e,P);if(e.vars)throw new Error((0,o.Z)(18));const h=k(r),p=(0,s.Z)(e);let m=(0,a.Z)(p,{mixins:(g=p.breakpoints,v=t,(0,n.Z)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:h,shadows:E.slice(),typography:C(h,d),transitions:(0,I.ZP)(u),zIndex:(0,n.Z)({},O)});var g,v;m=(0,a.Z)(m,f);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b(0,a.Z)(e,t)),m),m.unstable_sxConfig=(0,n.Z)({},l.Z,null==f?void 0:f.unstable_sxConfig),m.unstable_sx=function(e){return(0,c.Z)({sx:e,theme:this})},m}const L=R},75829:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>u,x9:()=>s});var n=r(63366),i=r(87462);const o=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,i.Z)({},a,e.easing),r=(0,i.Z)({},s,e.duration);return(0,i.Z)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=r.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,n.Z)(i,o);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof a?a:l(a)," ").concat(s," ").concat("string"===typeof c?c:l(c)))).join(",")}},e,{easing:t,duration:r})}},72248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(96745).Z)()},72951:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="$$material"},17592:(e,t,r)=>{"use strict";r.d(t,{Dz:()=>s,FO:()=>a,ZP:()=>l});var n=r(36541),i=r(72248),o=r(72951);const a=e=>(0,n.x9)(e)&&"classes"!==e,s=n.x9,l=(0,n.ZP)({themeId:o.Z,defaultTheme:i.Z,rootShouldForwardProp:a})},77342:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(50118),i=r(72248),o=r(72951);function a(e){let{props:t,name:r}=e;return(0,n.Z)({props:t,name:r,defaultTheme:i.Z,themeId:o.Z})}},91615:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(88831).Z},85038:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(84246).Z},81171:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x});var n=r(87462),i=r(47313),o=r(63366),a=r(94146),s=r(21921),l=r(91615),c=r(77342),u=r(17592),d=r(77430),f=r(32298);function h(e){return(0,f.Z)("MuiSvgIcon",e)}(0,d.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=r(46417);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"inherit"!==r.color&&t["color".concat((0,l.Z)(r.color))],t["fontSize".concat((0,l.Z)(r.fontSize))]]}})((e=>{let{theme:t,ownerState:r}=e;var n,i,o,a,s,l,c,u,d,f,h,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:r.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(i=n.create)?void 0:i.call(n,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[r.fontSize],color:null!=(f=null==(h=(t.vars||t).palette)||null==(h=h[r.color])?void 0:h.main)?f:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[r.color]}})),v=i.forwardRef((function(e,t){const r=(0,c.Z)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:f="inherit",component:v="svg",fontSize:y="medium",htmlColor:x,inheritViewBox:b=!1,titleAccess:w,viewBox:_="0 0 24 24"}=r,k=(0,o.Z)(r,m),S=i.isValidElement(u)&&"svg"===u.type,T=(0,n.Z)({},r,{color:f,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:_,hasSvgAsChild:S}),M={};b||(M.viewBox=_);const C=(e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.Z)(t)),"fontSize".concat((0,l.Z)(r))]};return(0,s.Z)(i,h,n)})(T);return(0,p.jsxs)(g,(0,n.Z)({as:v,className:(0,a.Z)(C.root,d),focusable:"false",color:x,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},M,k,S&&u.props,{ownerState:T,children:[S?u.props.children:u,w?(0,p.jsx)("title",{children:w}):null]}))}));v.muiName="SvgIcon";const y=v;function x(e,t){function r(r,i){return(0,p.jsx)(y,(0,n.Z)({"data-testid":"".concat(t,"Icon"),ref:i},r,{children:e}))}return r.muiName=y.muiName,i.memo(i.forwardRef(r))}},88706:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(81636).Z},28095:(e,t,r)=>{"use strict";r.r(t),r.d(t,{capitalize:()=>i.Z,createChainedFunction:()=>o.Z,createSvgIcon:()=>a.Z,debounce:()=>s.Z,deprecatedPropType:()=>l,isMuiElement:()=>c.Z,ownerDocument:()=>u.Z,ownerWindow:()=>d.Z,requirePropFactory:()=>f,setRef:()=>h,unstable_ClassNameGenerator:()=>w,unstable_useEnhancedEffect:()=>p.Z,unstable_useId:()=>m.Z,unsupportedProp:()=>g,useControlled:()=>v.Z,useEventCallback:()=>y.Z,useForkRef:()=>x.Z,useIsFocusVisible:()=>b.Z});var n=r(41271),i=r(91615),o=r(85038),a=r(81171),s=r(88706);const l=function(e,t){return()=>null};var c=r(27816),u=r(6106),d=r(23533);r(87462);const f=function(e,t){return()=>null};const h=r(89265).Z;var p=r(24993),m=r(17677);const g=function(e,t,r,n,i){return null};var v=r(53800),y=r(73236),x=r(86983),b=r(47037);const w={configure:e=>{n.Z.configure(e)}}},27816:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);const i=function(e,t){var r,i;return n.isValidElement(e)&&-1!==t.indexOf(null!=(r=e.type.muiName)?r:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},6106:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(42504).Z},23533:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(8929).Z},53800:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(35422).Z},24993:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(55094).Z},73236:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(76182).Z},86983:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(71577).Z},17677:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(28334).Z},47037:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(95669).Z},84472:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>y,Co:()=>x});var n=r(87462),i=r(47313),o=r(91816),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,o.Z)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=r(3346),c=r(54911),u=r(21086),d=r(85696),f=s,h=function(e){return"theme"!==e},p=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?f:h},m=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof n&&r&&(n=e.__emotion_forwardProp),n},g=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return(0,c.hC)(t,r,n),(0,d.L)((function(){return(0,c.My)(t,r,n)})),null},v=function e(t,r){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==r&&(o=r.label,a=r.target);var f=m(t,r,s),h=f||p(d),v=!h("as");return function(){var y=arguments,x=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&x.push("label:"+o+";"),null==y[0]||void 0===y[0].raw)x.push.apply(x,y);else{0,x.push(y[0][0]);for(var b=y.length,w=1;w{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},54929:(e,t,r)=>{"use strict";r.d(t,{L7:()=>l,P$:()=>u,VO:()=>i,W8:()=>s,dt:()=>c,k9:()=>a});var n=r(13019);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const e=n.breakpoints||o;return t.reduce(((n,i,o)=>(n[e.up(e.keys[o])]=r(t[o]),n)),{})}if("object"===typeof t){const e=n.breakpoints||o;return Object.keys(t).reduce(((n,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){n[e.up(o)]=r(t[o],o)}else{const e=o;n[e]=t[e]}return n}),{})}return r(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,r)=>(t[e.up(r)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const r=e[t];return(!r||0===Object.keys(r).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o(0,n.Z)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:r,base:n}=e;const i=n||function(e,t){if("object"!==typeof e)return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach(((t,n)=>{n{null!=e[t]&&(r[t]=!0)})),r}(t,r),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce(((e,r,n)=>(Array.isArray(t)?(e[r]=null!=t[n]?t[n]:t[a],a=n):"object"===typeof t?(e[r]=null!=t[r]?t[r]:t[a],a=r):e[r]=t,e)),{})}},17551:(e,t,r)=>{"use strict";r.d(t,{$n:()=>d,Fq:()=>c,_j:()=>u,mi:()=>l});var n=r(77219);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),r)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let r=e.match(t);return r&&1===r[0].length&&(r=r.map((e=>e+e))),r?"rgb".concat(4===r.length?"a":"","(").concat(r.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}(e));const t=e.indexOf("("),r=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,n.Z)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===r){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,n.Z)(10,i))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:r,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return-1!==t.indexOf("rgb")?n=n.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),n=-1!==t.indexOf("color")?"".concat(r," ").concat(n.join(" ")):"".concat(n.join(", ")),"".concat(t,"(").concat(n,")")}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,s=n*Math.min(i,1-i),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+r/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)};let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){const r=s(e),n=s(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(-1!==e.type.indexOf("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return a(e)}},36541:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>T,x9:()=>x});var n=r(63366),i=r(87462),o=r(84472),a=r(13019),s=r(9456),l=r(88831);const c=["variant"];function u(e){return 0===e.length}function d(e){const{variant:t}=e,r=(0,n.Z)(e,c);let i=t||"";return Object.keys(r).sort().forEach((t=>{i+="color"===t?u(i)?e[t]:(0,l.Z)(e[t]):"".concat(u(i)?t:(0,l.Z)(t)).concat((0,l.Z)(e[t].toString()))})),i}var f=r(63649);const h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];const p=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,m=e=>{const t={};return e&&e.forEach((e=>{const r=d(e.props);t[r]=e.style})),t},g=(e,t)=>{let r=[];return t&&t.components&&t.components[e]&&t.components[e].variants&&(r=t.components[e].variants),m(r)},v=(e,t,r)=>{const{ownerState:n={}}=e,i=[];return r&&r.forEach((r=>{let o=!0;Object.keys(r.props).forEach((t=>{n[t]!==r.props[t]&&e[t]!==r.props[t]&&(o=!1)})),o&&i.push(t[d(r.props)])})),i},y=(e,t,r,n)=>{var i;const o=null==r||null==(i=r.components)||null==(i=i[n])?void 0:i.variants;return v(e,t,o)};function x(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const b=(0,s.Z)(),w=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function _(e){let{defaultTheme:t,theme:r,themeId:n}=e;return i=r,0===Object.keys(i).length?t:r[n]||r;var i}function k(e){return e?(t,r)=>r[e]:null}const S=e=>{let{styledArg:t,props:r,defaultTheme:n,themeId:o}=e;const a=t((0,i.Z)({},r,{theme:_((0,i.Z)({},r,{defaultTheme:n,themeId:o}))}));let s;if(a&&a.variants&&(s=a.variants,delete a.variants),s){return[a,...v(r,m(s),s)]}return a};function T(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:r=b,rootShouldForwardProp:s=x,slotShouldForwardProp:l=x}=e,c=e=>(0,f.Z)((0,i.Z)({},e,{theme:_((0,i.Z)({},e,{defaultTheme:r,themeId:t}))}));return c.__mui_systemSx=!0,function(e){let u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Co)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:f,skipVariantsResolver:b,skipSx:T,overridesResolver:M=k(w(f))}=u,C=(0,n.Z)(u,h),A=void 0!==b?b:f&&"Root"!==f&&"root"!==f||!1,E=T||!1;let I=x;"Root"===f||"root"===f?I=s:f?I=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(I=void 0);const O=(0,o.ZP)(e,(0,i.Z)({shouldForwardProp:I,label:undefined},C)),P=function(n){for(var o=arguments.length,s=new Array(o>1?o-1:0),l=1;l{if("function"===typeof e&&e.__emotion_real!==e)return n=>S({styledArg:e,props:n,defaultTheme:r,themeId:t});if((0,a.P)(e)){let t,r=e;return e&&e.variants&&(t=e.variants,delete r.variants,r=r=>{let n=e;return v(r,m(t),t).forEach((e=>{n=(0,a.Z)(n,e)})),n}),r}return e})):[];let f=n;if((0,a.P)(n)){let e;n&&n.variants&&(e=n.variants,delete f.variants,f=t=>{let r=n;return v(t,m(e),e).forEach((e=>{r=(0,a.Z)(r,e)})),r})}else"function"===typeof n&&n.__emotion_real!==n&&(f=e=>S({styledArg:n,props:e,defaultTheme:r,themeId:t}));d&&M&&u.push((e=>{const n=_((0,i.Z)({},e,{defaultTheme:r,themeId:t})),o=p(d,n);if(o){const t={};return Object.entries(o).forEach((r=>{let[o,a]=r;t[o]="function"===typeof a?a((0,i.Z)({},e,{theme:n})):a})),M(e,t)}return null})),d&&!A&&u.push((e=>{const n=_((0,i.Z)({},e,{defaultTheme:r,themeId:t}));return y(e,g(d,n),n,d)})),E||u.push(c);const h=u.length-s.length;if(Array.isArray(n)&&h>0){const e=new Array(h).fill("");f=[...n,...e],f.raw=[...n.raw,...e]}const x=O(f,...u);return e.muiName&&(x.muiName=e.muiName),x};return O.withConfig&&(P.withConfig=O.withConfig),P}}},9456:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(87462),i=r(63366),o=r(13019);const a=["values","unit","step"],s=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,n.Z)({},e,{[t.key]:t.val})),{})};const l={borderRadius:4};var c=r(86886);var u=r(63649),d=r(63232);const f=["breakpoints","palette","spacing","shape"];const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:r={},spacing:h,shape:p={}}=e,m=(0,i.Z)(e,f),g=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:o=5}=e,l=(0,i.Z)(e,a),c=s(t),u=Object.keys(c);function d(e){const n="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(n).concat(r,")")}function f(e){const n="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(n-o/100).concat(r,")")}function h(e,n){const i=u.indexOf(n);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(r,") and ")+"(max-width:".concat((-1!==i&&"number"===typeof t[u[i]]?t[u[i]]:n)-o/100).concat(r,")")}return(0,n.Z)({keys:u,values:c,up:d,down:f,between:h,only:function(e){return u.indexOf(e)+10&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,c.hB)({spacing:e}),r=function(){for(var e=arguments.length,r=new Array(e),n=0;n{const r=t(e);return"number"===typeof r?"".concat(r,"px"):r})).join(" ")};return r.mui=!0,r}(h);let y=(0,o.Z)({breakpoints:g,direction:"ltr",components:{},palette:(0,n.Z)({mode:"light"},r),spacing:v,shape:(0,n.Z)({},l,p)},m);for(var x=arguments.length,b=new Array(x>1?x-1:0),w=1;w(0,o.Z)(e,t)),y),y.unstable_sxConfig=(0,n.Z)({},d.Z,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,u.Z)({sx:e,theme:this})},y}},77330:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(13019);const i=function(e,t){return t?(0,n.Z)(e,t,{clone:!1}):e}},86886:(e,t,r)=>{"use strict";r.d(t,{hB:()=>p,eI:()=>h,NA:()=>m,e6:()=>y,o3:()=>x});var n=r(54929),i=r(46428),o=r(77330);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return r=>(void 0===t[r]&&(t[r]=e(r)),t[r])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,r]=e.split(""),n=a[t],i=s[r]||"";return Array.isArray(i)?i.map((e=>n+e)):[n+i]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...u,...d];function h(e,t,r,n){var o;const a=null!=(o=(0,i.DW)(e,t,!1))?o:r;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function p(e){return h(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const r=e(Math.abs(t));return t>=0?r:"number"===typeof r?-r:"-".concat(r)}function g(e,t,r,i){if(-1===t.indexOf(r))return null;const o=function(e,t){return r=>e.reduce(((e,n)=>(e[n]=m(t,r),e)),{})}(c(r),i),a=e[r];return(0,n.k9)(e,a,o)}function v(e,t){const r=p(e.theme);return Object.keys(e).map((n=>g(e,t,n,r))).reduce(o.Z,{})}function y(e){return v(e,u)}function x(e){return v(e,d)}function b(e){return v(e,f)}y.propTypes={},y.filterProps=u,x.propTypes={},x.filterProps=d,b.propTypes={},b.filterProps=f},46428:(e,t,r)=>{"use strict";r.d(t,{DW:()=>o,Jq:()=>a,ZP:()=>s});var n=r(88831),i=r(54929);function o(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&r){const r="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=r)return r}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,r){let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r;return n="function"===typeof e?e(r):Array.isArray(e)?e[r]||i:o(e,r)||i,t&&(n=t(n,i,e)),n}const s=function(e){const{prop:t,cssProperty:r=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,s)||{};return(0,i.k9)(e,c,(e=>{let i=a(u,l,e);return e===i&&"string"===typeof e&&(i=a(u,l,"".concat(t).concat("default"===e?"":(0,n.Z)(e)),e)),!1===r?i:{[r]:i}}))};return c.propTypes={},c.filterProps=[t],c}},63232:(e,t,r)=>{"use strict";r.d(t,{Z:()=>L});var n=r(86886),i=r(46428),o=r(77330);const a=function(){for(var e=arguments.length,t=new Array(e),r=0;r(t.filterProps.forEach((r=>{e[r]=t})),e)),{}),i=e=>Object.keys(e).reduce(((t,r)=>n[r]?(0,o.Z)(t,n[r](e)):t),{});return i.propTypes={},i.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),i};var s=r(54929);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.ZP)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),f=c("borderRight",l),h=c("borderBottom",l),p=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),x=c("borderLeftColor"),b=c("outline",l),w=c("outlineColor"),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,n.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),r=e=>({borderRadius:(0,n.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,r)}return null};_.propTypes={},_.filterProps=["borderRadius"];a(u,d,f,h,p,m,g,v,y,x,_,b,w);const k=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,n.eI)(e.theme,"spacing",8,"gap"),r=e=>({gap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.gap,r)}return null};k.propTypes={},k.filterProps=["gap"];const S=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,n.eI)(e.theme,"spacing",8,"columnGap"),r=e=>({columnGap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.columnGap,r)}return null};S.propTypes={},S.filterProps=["columnGap"];const T=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,n.eI)(e.theme,"spacing",8,"rowGap"),r=e=>({rowGap:(0,n.NA)(t,e)});return(0,s.k9)(e,e.rowGap,r)}return null};T.propTypes={},T.filterProps=["rowGap"];a(k,S,T,(0,i.ZP)({prop:"gridColumn"}),(0,i.ZP)({prop:"gridRow"}),(0,i.ZP)({prop:"gridAutoFlow"}),(0,i.ZP)({prop:"gridAutoColumns"}),(0,i.ZP)({prop:"gridAutoRows"}),(0,i.ZP)({prop:"gridTemplateColumns"}),(0,i.ZP)({prop:"gridTemplateRows"}),(0,i.ZP)({prop:"gridTemplateAreas"}),(0,i.ZP)({prop:"gridArea"}));function M(e,t){return"grey"===t?t:e}a((0,i.ZP)({prop:"color",themeKey:"palette",transform:M}),(0,i.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,i.ZP)({prop:"backgroundColor",themeKey:"palette",transform:M}));function C(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const A=(0,i.ZP)({prop:"width",transform:C}),E=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var r,n;const i=(null==(r=e.theme)||null==(r=r.breakpoints)||null==(r=r.values)?void 0:r[t])||s.VO[t];return i?"px"!==(null==(n=e.theme)||null==(n=n.breakpoints)?void 0:n.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:C(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};E.filterProps=["maxWidth"];const I=(0,i.ZP)({prop:"minWidth",transform:C}),O=(0,i.ZP)({prop:"height",transform:C}),P=(0,i.ZP)({prop:"maxHeight",transform:C}),R=(0,i.ZP)({prop:"minHeight",transform:C}),L=((0,i.ZP)({prop:"size",cssProperty:"width",transform:C}),(0,i.ZP)({prop:"size",cssProperty:"height",transform:C}),a(A,E,I,O,P,R,(0,i.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:n.o3},pt:{style:n.o3},pr:{style:n.o3},pb:{style:n.o3},pl:{style:n.o3},px:{style:n.o3},py:{style:n.o3},padding:{style:n.o3},paddingTop:{style:n.o3},paddingRight:{style:n.o3},paddingBottom:{style:n.o3},paddingLeft:{style:n.o3},paddingX:{style:n.o3},paddingY:{style:n.o3},paddingInline:{style:n.o3},paddingInlineStart:{style:n.o3},paddingInlineEnd:{style:n.o3},paddingBlock:{style:n.o3},paddingBlockStart:{style:n.o3},paddingBlockEnd:{style:n.o3},m:{style:n.e6},mt:{style:n.e6},mr:{style:n.e6},mb:{style:n.e6},ml:{style:n.e6},mx:{style:n.e6},my:{style:n.e6},margin:{style:n.e6},marginTop:{style:n.e6},marginRight:{style:n.e6},marginBottom:{style:n.e6},marginLeft:{style:n.e6},marginX:{style:n.e6},marginY:{style:n.e6},marginInline:{style:n.e6},marginInlineStart:{style:n.e6},marginInlineEnd:{style:n.e6},marginBlock:{style:n.e6},marginBlockStart:{style:n.e6},marginBlockEnd:{style:n.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:k},rowGap:{style:T},columnGap:{style:S},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:C},maxWidth:{style:E},minWidth:{transform:C},height:{transform:C},maxHeight:{transform:C},minHeight:{transform:C},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},63649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(88831),i=r(77330),o=r(46428),a=r(54929),s=r(63232);const l=function(){function e(e,t,r,i){const s={[e]:t,theme:r},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:f}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const h=(0,o.DW)(r,u)||{};if(f)return f(s);return(0,a.k9)(s,t,(t=>{let r=(0,o.Jq)(h,d,t);return t===r&&"string"===typeof t&&(r=(0,o.Jq)(h,d,"".concat(e).concat("default"===t?"":(0,n.Z)(t)),t)),!1===c?r:{[c]:r}}))}return function t(r){var n;const{sx:o,theme:l={}}=r||{};if(!o)return null;const c=null!=(n=l.unstable_sxConfig)?n:s.Z;function u(r){let n=r;if("function"===typeof r)n=r(l);else if("object"!==typeof r)return r;if(!n)return null;const o=(0,a.W8)(l.breakpoints),s=Object.keys(o);let u=o;return Object.keys(n).forEach((r=>{const o=(s=n[r],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==o&&void 0!==o)if("object"===typeof o)if(c[r])u=(0,i.Z)(u,e(r,o,l,c));else{const e=(0,a.k9)({theme:l},o,(e=>({[r]:e})));!function(){for(var e=arguments.length,t=new Array(e),r=0;re.concat(Object.keys(t))),[]),i=new Set(n);return t.every((e=>i.size===Object.keys(e).length))}(e,o)?u=(0,i.Z)(u,e):u[r]=t({sx:o,theme:l})}else u=(0,i.Z)(u,e(r,o,l,c))})),(0,a.L7)(s,u)}return Array.isArray(o)?o.map(u):u(o)}}();l.filterProps=["sx"];const c=l},86728:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(9456),i=r(14976);const o=(0,n.Z)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;return(0,i.Z)(e)}},50118:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(29023);var i=r(86728);function o(e){let{props:t,name:r,defaultTheme:o,themeId:a}=e,s=(0,i.Z)(o);a&&(s=s[a]||s);const l=function(e){const{theme:t,name:r,props:i}=e;return t&&t.components&&t.components[r]&&t.components[r].defaultProps?(0,n.Z)(t.components[r].defaultProps,i):i}({theme:s,name:r,props:t});return l}},14976:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(3346);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=n.useContext(i.T);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}},41271:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});const n=e=>e,i=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})()},88831:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(77219);function i(e){if("string"!==typeof e)throw new Error((0,n.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},21921:(e,t,r)=>{"use strict";function n(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const n={};return Object.keys(e).forEach((i=>{n[i]=e[i].reduce(((e,n)=>{if(n){const i=t(n);""!==i&&e.push(i),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}r.d(t,{Z:()=>n})},84246:(e,t,r)=>{"use strict";function n(){for(var e=arguments.length,t=new Array(e),r=0;rnull==t?e:function(){for(var r=arguments.length,n=new Array(r),i=0;i{}))}r.d(t,{Z:()=>n})},81636:(e,t,r)=>{"use strict";function n(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,i=new Array(n),o=0;o{e.apply(this,i)}),r)}return n.clear=()=>{clearTimeout(t)},n}r.d(t,{Z:()=>n})},13019:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,Z:()=>a});var n=r(87462);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function o(e){if(!i(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=o(e[r])})),t}function a(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=r.clone?(0,n.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((n=>{"__proto__"!==n&&(i(t[n])&&n in e&&i(e[n])?s[n]=a(e[n],t[n],r):r.clone?s[n]=i(t[n])?o(t[n]):t[n]:s[n]=t[n])})),s}},77219:(e,t,r)=>{"use strict";function n(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rn})},32298:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(41271);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o=i[t];return o?"".concat(r,"-").concat(o):"".concat(n.Z.generate(e),"-").concat(t)}},77430:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(32298);function i(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach((t=>{i[t]=(0,n.Z)(e,t,r)})),i}},42504:(e,t,r)=>{"use strict";function n(e){return e&&e.ownerDocument||document}r.d(t,{Z:()=>n})},8929:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(42504);function i(e){return(0,n.Z)(e).defaultView||window}},29023:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(87462);function i(e,t){const r=(0,n.Z)({},t);return Object.keys(e).forEach((o=>{if(o.toString().match(/^(components|slots)$/))r[o]=(0,n.Z)({},e[o],r[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];r[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(r[o]=(0,n.Z)({},s),Object.keys(a).forEach((e=>{r[o][e]=i(a[e],s[e])}))):r[o]=s:r[o]=a}else void 0===r[o]&&(r[o]=e[o])})),r}},89265:(e,t,r)=>{"use strict";function n(e,t){"function"===typeof e?e(t):e&&(e.current=t)}r.d(t,{Z:()=>n})},35422:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);function i(e){let{controlled:t,default:r,name:i,state:o="value"}=e;const{current:a}=n.useRef(void 0!==t),[s,l]=n.useState(r);return[a?t:s,n.useCallback((e=>{a||l(e)}),[])]}},55094:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(47313);const i="undefined"!==typeof window?n.useLayoutEffect:n.useEffect},76182:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(55094);const o=function(e){const t=n.useRef(e);return(0,i.Z)((()=>{t.current=e})),n.useRef((function(){return(0,t.current)(...arguments)})).current}},71577:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(47313),i=r(89265);function o(){for(var e=arguments.length,t=new Array(e),r=0;rt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,i.Z)(t,e)}))}),t)}},28334:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>s});var i=r(47313);let o=0;const a=(n||(n=r.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,r]=i.useState(e),n=e||t;return i.useEffect((()=>{null==t&&(o+=1,r("mui-".concat(o)))}),[t]),n}(e)}},95669:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});var n=r(47313);let i,o=!0,a=!1;const s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(r){}return o||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!s[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function f(){const e=n.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=n.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(i),i=window.setTimeout((()=>{a=!1}),100),t.current=!1,!0)},ref:e}}},6954:(e,t,r)=>{"use strict";r.r(t),r.d(t,{sankeyCenter:()=>f,sankeyCircular:()=>I,sankeyJustify:()=>d,sankeyLeft:()=>c,sankeyRight:()=>u});var n=r(74104),i=r(71326),o=r(86978),a=r(30544),s=r.n(a);function l(e){return e.target.depth}function c(e){return e.depth}function u(e,t){return t-1-e.height}function d(e,t){return e.sourceLinks.length?e.depth:t-1}function f(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.VV)(e.sourceLinks,l)-1:0}function h(e){return function(){return e}}var p="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function m(e,t){return v(e.source,t.source)||e.index-t.index}function g(e,t){return v(e.target,t.target)||e.index-t.index}function v(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function y(e){return e.value}function x(e){return(e.y0+e.y1)/2}function b(e){return x(e.source)}function w(e){return x(e.target)}function _(e){return e.index}function k(e){return e.nodes}function S(e){return e.links}function T(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function M(e,t){return t(e)}var C=25,A=10,E=.3;function I(){var e,t,r=0,o=0,a=1,l=1,c=24,u=_,f=d,M=k,I=S,P=32,L=2,j=null;function z(){var d={nodes:M.apply(null,arguments),links:I.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,u);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==("undefined"===typeof n?"undefined":p(n))&&(n=e.source=T(t,n)),"object"!==("undefined"===typeof i?"undefined":p(i))&&(i=e.target=T(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(d),function(e,t,r){var n=0;if(null===r){for(var i=[],o=0;o0;--p)g(h*=.99,d),_();function m(i){if(t){var u=1/0;f.forEach((function(e){var r=l*t/(e.length+1);u=r0?t+C+A:t,bottom:r=r>0?r+C+A:r,left:o=o>0?o+C+A:o,right:i=i>0?i+C+A:i}}(s),p=function(e,t){var i=(0,n.Fp)(e.nodes,(function(e){return e.column})),s=a-r,u=l-o,d=s+t.right+t.left,f=u+t.top+t.bottom,h=s/d,p=u/f;return r=r*h+t.left,a=0==t.right?a:a*h,o=o*p+t.top,l*=p,e.nodes.forEach((function(e){e.x0=r+e.column*((a-r-c)/i),e.x1=e.x0+c})),p}(s,h);d*=p,s.links.forEach((function(e){e.width=e.value*d})),f.forEach((function(e){var t=e.length;e.forEach((function(e,r){e.depth==f.length-1&&1==t||0==e.depth&&1==t?(e.y0=l/2-e.value*d,e.y1=e.y0+e.value*d):e.partOfCycle?0==R(e,i)?(e.y0=l/2+r,e.y1=e.y0+e.value*d):"top"==e.circularLinkType?(e.y0=o+r,e.y1=e.y0+e.value*d):(e.y0=l-e.value*d-r,e.y1=e.y0+e.value*d):0==h.top||0==h.bottom?(e.y0=(l-o)/t*r,e.y1=e.y0+e.value*d):(e.y0=(l-o)/2-t/2+r,e.y1=e.y0+e.value*d)}))}))}function g(e,t){var r=f.length;f.forEach((function(i){var o=i.length,a=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&R(i,t)>0);else if(0==a&&1==o)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else if(a==r-1&&1==o)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else{var c=(0,n.J6)(i.sourceLinks,w),u=(0,n.J6)(i.targetLinks,b),d=((c&&u?(c+u)/2:c||u)-x(i))*e;i.y0+=d,i.y1+=d}}))}))}function _(){f.forEach((function(t){var r,n,i,a=o,s=t.length;for(t.sort(v),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+e;if((n=a-e-l)>0)for(a=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=t[i]).y1+e-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(d,P,u),N(d);for(var h=0;h<4;h++)X(d,l,u),K(d,l,u),G(d,o,l,u),X(d,l,u),K(d,l,u);return function(e,t,r){var i=e.nodes,o=e.links,a=!1,s=!1;if(o.forEach((function(e){"top"==e.circularLinkType?a=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==a||0==s){var l=(0,n.VV)(i,(function(e){return e.y0})),c=(r-t)/((0,n.Fp)(i,(function(e){return e.y1}))-l);i.forEach((function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t})),o.forEach((function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c}))}}(d,o,l),D(d,L,l,u),d}function N(e){e.nodes.forEach((function(e){e.sourceLinks.sort(g),e.targetLinks.sort(m)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return z.nodeId=function(e){return arguments.length?(u="function"===typeof e?e:h(e),z):u},z.nodeAlign=function(e){return arguments.length?(f="function"===typeof e?e:h(e),z):f},z.nodeWidth=function(e){return arguments.length?(c=+e,z):c},z.nodePadding=function(t){return arguments.length?(e=+t,z):e},z.nodes=function(e){return arguments.length?(M="function"===typeof e?e:h(e),z):M},z.links=function(e){return arguments.length?(I="function"===typeof e?e:h(e),z):I},z.size=function(e){return arguments.length?(r=o=0,a=+e[0],l=+e[1],z):[a-r,l-o]},z.extent=function(e){return arguments.length?(r=+e[0][0],a=+e[1][0],o=+e[0][1],l=+e[1][1],z):[[r,o],[a,l]]},z.iterations=function(e){return arguments.length?(P=+e,z):P},z.circularLinkGap=function(e){return arguments.length?(L=+e,z):L},z.nodePaddingRatio=function(e){return arguments.length?(t=+e,z):t},z.sortNodes=function(e){return arguments.length?(j=e,z):j},z.update=function(e){return O(e,u),N(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y11||i>1)}function j(e,t,r){return e.sort(z),e.forEach((function(n,i){var o,a,s=0;if(Q(n,r)&&L(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;la.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),e}function D(e,t,r,i){var a=(0,n.VV)(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),j(e.links.filter((function(e){return"top"==e.circularLinkType})),t,i),j(e.links.filter((function(e){return"bottom"==e.circularLinkType})),t,i),e.links.forEach((function(n){if(n.circular){if(n.circularPathData.arcRadius=n.width+A,n.circularPathData.leftNodeBuffer=5,n.circularPathData.rightNodeBuffer=5,n.circularPathData.sourceWidth=n.source.x1-n.source.x0,n.circularPathData.sourceX=n.source.x0+n.circularPathData.sourceWidth,n.circularPathData.targetX=n.target.x0,n.circularPathData.sourceY=n.y0,n.circularPathData.targetY=n.y1,Q(n,i)&&L(n))n.circularPathData.leftSmallArcRadius=A+n.width/2,n.circularPathData.leftLargeArcRadius=A+n.width/2,n.circularPathData.rightSmallArcRadius=A+n.width/2,n.circularPathData.rightLargeArcRadius=A+n.width/2,"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=n.source.y1+C+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=n.source.y0-C-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius);else{var s=n.source.column,l=n.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==n.circularLinkType?c.sort(F):c.sort(N);var u=0;c.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.leftSmallArcRadius=A+n.width/2+u,n.circularPathData.leftLargeArcRadius=A+n.width/2+r*t+u),u+=e.width})),s=n.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==n.circularLinkType?c.sort(Z):c.sort(B),u=0,c.forEach((function(e,r){e.circularLinkID==n.circularLinkID&&(n.circularPathData.rightSmallArcRadius=A+n.width/2+u,n.circularPathData.rightLargeArcRadius=A+n.width/2+r*t+u),u+=e.width})),"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=Math.max(r,n.source.y1,n.target.y1)+C+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=a-C-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius)}n.circularPathData.leftInnerExtent=n.circularPathData.sourceX+n.circularPathData.leftNodeBuffer,n.circularPathData.rightInnerExtent=n.circularPathData.targetX-n.circularPathData.rightNodeBuffer,n.circularPathData.leftFullExtent=n.circularPathData.sourceX+n.circularPathData.leftLargeArcRadius+n.circularPathData.leftNodeBuffer,n.circularPathData.rightFullExtent=n.circularPathData.targetX-n.circularPathData.rightLargeArcRadius-n.circularPathData.rightNodeBuffer}if(n.circular)n.path=function(e){var t="";t="top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY;return t}(n);else{var d=(0,o.h5)().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));n.path=d(n)}}))}function z(e,t){return U(e)==U(t)?"bottom"==e.circularLinkType?F(e,t):N(e,t):U(t)-U(e)}function N(e,t){return e.y0-t.y0}function F(e,t){return t.y0-e.y0}function B(e,t){return e.y1-t.y1}function Z(e,t){return t.y1-e.y1}function U(e){return e.target.column-e.source.column}function V(e){return e.target.x0-e.source.x1}function H(e,t){var r=P(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1+n:e.y1-n}function W(e,t){var r=P(e),n=V(t)/Math.tan(r);return"up"==J(e)?e.y1-n:e.y1+n}function G(e,t,r,n){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var o=i.source.column+1,a=i.target.column-1,s=1,l=a-o+1;for(s=1;o<=a;o++,s++)e.nodes.forEach((function(a){if(a.column==o){var c,u=s/(l+1),d=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),h=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=d*i.y0+f*i.y0+h*i.y1+p*i.y1,g=m-i.width/2,v=m+i.width/2;g>a.y0&&ga.y0&&va.y1)&&(c=v-a.y0+10,a=Y(a,c,t,r),e.nodes.forEach((function(e){M(e,n)!=M(a,n)&&e.column==a.column&&e.y0a.y1&&Y(e,c,t,r)})))}}))}}))}function q(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1)}function Y(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function X(e,t,r,n){e.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var o=e.links.filter((function(e){return M(e.source,r)==M(i,r)})),a=o.length;a>1&&o.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!$(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=W(t,e);return e.y1-r}if(t.target.column>e.target.column)return W(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;o.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),o.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!$(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function Q(e,t){return M(e.source,t)==M(e.target,t)}},22854:(e,t,r)=>{"use strict";r.r(t),r.d(t,{sankey:()=>_,sankeyCenter:()=>c,sankeyJustify:()=>l,sankeyLeft:()=>a,sankeyLinkHorizontal:()=>M,sankeyRight:()=>s});var n=r(74104),i=r(71326);function o(e){return e.target.depth}function a(e){return e.depth}function s(e,t){return t-1-e.height}function l(e,t){return e.sourceLinks.length?e.depth:t-1}function c(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,n.VV)(e.sourceLinks,o)-1:0}function u(e){return function(){return e}}function d(e,t){return h(e.source,t.source)||e.index-t.index}function f(e,t){return h(e.target,t.target)||e.index-t.index}function h(e,t){return e.y0-t.y0}function p(e){return e.value}function m(e){return(e.y0+e.y1)/2}function g(e){return m(e.source)*e.value}function v(e){return m(e.target)*e.value}function y(e){return e.index}function x(e){return e.nodes}function b(e){return e.links}function w(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function _(){var e=0,t=0,r=1,o=1,a=24,s=8,c=y,_=l,k=x,S=b,T=32,M=2/3;function C(){var l={nodes:k.apply(null,arguments),links:S.apply(null,arguments)};return function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=(0,i.UI)(e.nodes,c);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==typeof n&&(n=e.source=w(t,n)),"object"!==typeof i&&(i=e.target=w(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))}(l),function(e){e.nodes.forEach((function(e){e.value=Math.max((0,n.Sm)(e.sourceLinks,p),(0,n.Sm)(e.targetLinks,p))}))}(l),function(t){var n,i,o;for(n=t.nodes,i=[],o=0;n.length;++o,n=i,i=[])n.forEach((function(e){e.depth=o,e.sourceLinks.forEach((function(e){i.indexOf(e.target)<0&&i.push(e.target)}))}));for(n=t.nodes,i=[],o=0;n.length;++o,n=i,i=[])n.forEach((function(e){e.height=o,e.targetLinks.forEach((function(e){i.indexOf(e.source)<0&&i.push(e.source)}))}));var s=(r-e-a)/(o-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(o-1,Math.floor(_.call(null,t,o))))*s)+a}))}(l),function(e){var r=(0,i.b1)().key((function(e){return e.x0})).sortKeys(n.j2).entries(e.nodes).map((function(e){return e.values}));c(),f();for(var a=1,l=T;l>0;--l)d(a*=.99),f(),u(a),f();function c(){var i=(0,n.Fp)(r,(function(e){return e.length})),a=M*(o-t)/(i-1);s>a&&(s=a);var l=(0,n.VV)(r,(function(e){return(o-t-(e.length-1)*s)/(0,n.Sm)(e,p)}));r.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*l}))})),e.links.forEach((function(e){e.width=e.value*l}))}function u(e){r.forEach((function(t){t.forEach((function(t){if(t.targetLinks.length){var r=((0,n.Sm)(t.targetLinks,g)/(0,n.Sm)(t.targetLinks,p)-m(t))*e;t.y0+=r,t.y1+=r}}))}))}function d(e){r.slice().reverse().forEach((function(t){t.forEach((function(t){if(t.sourceLinks.length){var r=((0,n.Sm)(t.sourceLinks,v)/(0,n.Sm)(t.sourceLinks,p)-m(t))*e;t.y0+=r,t.y1+=r}}))}))}function f(){r.forEach((function(e){var r,n,i,a=t,l=e.length;for(e.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+s;if((n=a-s-o)>0)for(a=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=e[i]).y1+s-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(l),A(l),l}function A(e){e.nodes.forEach((function(e){e.sourceLinks.sort(f),e.targetLinks.sort(d)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return C.update=function(e){return A(e),e},C.nodeId=function(e){return arguments.length?(c="function"===typeof e?e:u(e),C):c},C.nodeAlign=function(e){return arguments.length?(_="function"===typeof e?e:u(e),C):_},C.nodeWidth=function(e){return arguments.length?(a=+e,C):a},C.nodePadding=function(e){return arguments.length?(s=+e,C):s},C.nodes=function(e){return arguments.length?(k="function"===typeof e?e:u(e),C):k},C.links=function(e){return arguments.length?(S="function"===typeof e?e:u(e),C):S},C.size=function(n){return arguments.length?(e=t=0,r=+n[0],o=+n[1],C):[r-e,o-t]},C.extent=function(n){return arguments.length?(e=+n[0][0],r=+n[1][0],t=+n[0][1],o=+n[1][1],C):[[e,t],[r,o]]},C.iterations=function(e){return arguments.length?(T=+e,C):T},C}var k=r(86978);function S(e){return[e.source.x1,e.y0]}function T(e){return[e.target.x0,e.y1]}function M(){return(0,k.h5)().source(S).target(T)}},8996:(e,t,r)=>{var n,i;(function(){var o={version:"3.8.0"},a=[].slice,s=function(e){return a.call(e)},l=self.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(yo){s=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(xo){var d=this.Element.prototype,f=d.setAttribute,h=d.setAttributeNS,p=this.CSSStyleDeclaration.prototype,m=p.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){m.call(this,e,t+"",r)}}function g(e,t){return et?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}o.ascending=g,o.descending=function(e,t){return te?1:t>=e?0:NaN},o.min=function(e,t){var r,n,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},o.max=function(e,t){var r,n,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},o.extent=function(e,t){var r,n,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=n){r=i=n;break}for(;++on&&(r=n),i=n){r=i=n;break}for(;++on&&(r=n),i1)return a/(l-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);function w(e){return e.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(e){return x(1===e.length?function(t,r){return g(e(t),r)}:e)},o.shuffle=function(e,t,r){(o=arguments.length)<3&&(r=e.length,o<2&&(t=0));for(var n,i,o=r-t;o;)i=Math.random()*o--|0,n=e[o+t],e[o+t]=e[i+t],e[i+t]=n;return e},o.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},o.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--a]=n[t];return r};var _=Math.abs;function k(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function S(){this._=Object.create(null)}o.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r===1/0)throw new Error("infinite range");var n,i=[],o=function(e){var t=1;for(;e*t%1;)t*=10;return t}(_(r)),a=-1;if(e*=o,t*=o,(r*=o)<0)for(;(n=e+r*++a)>t;)i.push(n/o);else for(;(n=e+r*++a)=n.length)return t?t.call(r,o):e?o.sort(e):o;for(var l,c,u,d,f=-1,h=o.length,p=n[s++],m=new S;++f=n.length)return e;var r=[],o=i[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),o?r.sort((function(e,t){return o(e.key,t.key)})):r}return r.map=function(e,t){return a(t,e,0)},r.entries=function(e){return s(a(o.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return i[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},o.set=function(e){var t=new L;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},o.event=null,o.requote=function(e){return e.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function q(e){return G(e,$),e}var Y=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},K=function(e,t){var r=e.matches||e[z(e,"matchesSelector")];return K=function(e,t){return r.call(e,t)},K(e,t)};"function"===typeof Sizzle&&(Y=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,K=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var $=o.selection.prototype=[];function J(e){return"function"===typeof e?e:function(){return Y(e,this)}}function Q(e){return"function"===typeof e?e:function(){return X(e,this)}}$.select=function(e){var t,r,n,i,o=[];e=J(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},$.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node();return(e=o.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},$.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var r=this.node(),n=(e=oe(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},$.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(e=e.slice(0,i));var l=xe.get(e);function c(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return l&&(e=l,a=we),i?t?function(){var i=a(t,s(arguments));c.call(this),this.addEventListener(e,this[n]=i,i.$=r),i._=t}:c:t?F:function(){var t,r=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var n in this)if(t=n.match(r)){var i=this[n];this.removeEventListener(t[1],i,i.$),delete this[n]}}}o.selection.enter=ge,o.selection.enter.prototype=ve,ve.append=$.append,ve.empty=$.empty,ve.node=$.node,ve.call=$.call,ve.size=$.size,ve.select=function(e){for(var t,r,n,i,o,a=[],s=-1,l=this.length;++s=t&&(t=i+1);!(a=s[t])&&++t1?Re:e<-1?-Re:Math.asin(e)}function ze(e){return((e=Math.exp(e))+1/e)/2}var Ne=Math.SQRT2;o.interpolateZoom=function(e,t){var r,n,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],c=t[2],u=s-i,d=l-o,f=u*u+d*d;if(f0&&(e=e.transition().duration(m)),e.call(_.event)}function C(){s&&s.domain(a.range().map((function(e){return(e-f.x)/f.k})).map(a.invert)),d&&d.domain(c.range().map((function(e){return(e-f.y)/f.k})).map(c.invert))}function A(e){g++||e({type:"zoomstart"})}function E(e){C(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function I(e){--g||(e({type:"zoomend"}),t=null)}function O(){var e=this,t=w.of(e,arguments),r=0,n=o.select(u(e)).on(y,(function(){r=1,T(o.mouse(e),i),E(t)})).on(x,(function(){n.on(y,null).on(x,null),a(r),I(t)})),i=k(o.mouse(e)),a=Se(e);Ji.call(e),A(t)}function P(){var e,t=this,r=w.of(t,arguments),n={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,c="touchend"+s,u=[],d=o.select(t),h=Se(t);function p(){var r=o.touches(t);return e=f.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=k(e))})),r}function m(){var e=o.event.target;o.select(e).on(l,g).on(c,y),u.push(e);for(var r=o.event.changedTouches,s=0,d=r.length;s1){v=h[0];var x=h[1],b=v[0]-x[0],w=v[1]-x[1];a=b*b+w*w}}function g(){var s,l,c,u,d=o.touches(t);Ji.call(t);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+t):r+t-r*t),new at(o(e+120),o(e),o(e-120))}function Ge(e,t,r){return this instanceof Ge?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof Ge?new Ge(e.h,e.c,e.l):rt(e instanceof Xe?e.l:(e=ht((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ge(e,t,r)}He.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,this.l/e)},He.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,e*this.l)},He.rgb=function(){return We(this.h,this.s,this.l)},o.hcl=Ge;var qe=Ge.prototype=new Ue;function Ye(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(r,Math.cos(e*=Le)*t,Math.sin(e)*t)}function Xe(e,t,r){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof Ge?Ye(e.h,e.c,e.l):ht((e=at(e)).r,e.g,e.b):new Xe(e,t,r)}qe.brighter=function(e){return new Ge(this.h,this.c,Math.min(100,this.l+Ke*(arguments.length?e:1)))},qe.darker=function(e){return new Ge(this.h,this.c,Math.max(0,this.l-Ke*(arguments.length?e:1)))},qe.rgb=function(){return Ye(this.h,this.c,this.l).rgb()},o.lab=Xe;var Ke=18,$e=.95047,Je=1,Qe=1.08883,et=Xe.prototype=new Ue;function tt(e,t,r){var n=(e+16)/116,i=n+t/500,o=n-r/200;return new at(ot(3.2404542*(i=nt(i)*$e)-1.5371385*(n=nt(n)*Je)-.4985314*(o=nt(o)*Qe)),ot(-.969266*i+1.8760108*n+.041556*o),ot(.0556434*i-.2040259*n+1.0572252*o))}function rt(e,t,r){return e>0?new Ge(Math.atan2(r,t)*je,Math.sqrt(t*t+r*r),e):new Ge(NaN,NaN,e)}function nt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function it(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ot(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e,t,r){return this instanceof at?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof at?new at(e.r,e.g,e.b):dt(""+e,at,We):new at(e,t,r)}function st(e){return new at(e>>16,e>>8&255,255&e)}function lt(e){return st(e)+""}et.brighter=function(e){return new Xe(Math.min(100,this.l+Ke*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Xe(Math.max(0,this.l-Ke*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},o.rgb=at;var ct=at.prototype=new Ue;function ut(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function dt(e,t,r){var n,i,o,a=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.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 t(mt(i[0]),mt(i[1]),mt(i[2]))}return(o=gt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function ft(e,t,r){var n,i,o=Math.min(e/=255,t/=255,r/=255),a=Math.max(e,t,r),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),n=e==a?(t-r)/s+(t0&&l<1?0:n),new Ve(n,i,l)}function ht(e,t,r){var n=it((.4124564*(e=pt(e))+.3575761*(t=pt(t))+.1804375*(r=pt(r)))/$e),i=it((.2126729*e+.7151522*t+.072175*r)/Je);return Xe(116*i-16,500*(n-i),200*(i-it((.0193339*e+.119192*t+.9503041*r)/Qe)))}function pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function mt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ct.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=r.call(i,c)}catch(yo){return void a.error.call(i,yo)}a.load.call(i,e)}else a.error.call(i,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,c)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(u=e,i):u},i.response=function(e){return r=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(r,n,o){if(2===arguments.length&&"function"===typeof n&&(o=n,n=null),c.open(r,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),c.setRequestHeader)for(var s in l)c.setRequestHeader(s,l[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,c),c.send(null==n?null:n),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==n?i:i.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}gt.forEach((function(e,t){gt.set(e,st(t))})),o.functor=vt,o.xhr=yt(j),o.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=xt(e,t,null==r?o:a(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?o:a(e)):r},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(kt),kt=setTimeout(Mt,t)),_t=0):(_t=1,St(Mt))}function Ct(){for(var e=Date.now(),t=bt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function At(){for(var e,t=bt,r=1/0;t;)t.c?(t.t1&&(t=e[o[a-2]],r=e[o[a-1]],n=e[s],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--a;o[a++]=s}return o.slice(0,a)}function Pt(e,t){return e[0]-t[0]||e[1]-t[1]}o.timer=function(){Tt.apply(this,arguments)},o.timer.flush=function(){Ct(),At()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},o.geom={},o.geom.hull=function(e){var t=Et,r=It;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=vt(t),o=vt(r),a=e.length,s=[],l=[];for(n=0;n=0;--n)h.push(e[s[c[n]][2]]);for(n=+d;nAe)s=s.L;else{if(!((i=o-Kt(s,a))>Ae)){n>-Ae?(t=s.P,r=s):i>-Ae?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Wt(e);if(Ft.insert(t,l),t||r){if(t===r)return tr(t),r=Wt(t.site),Ft.insert(l,r),l.edge=r.edge=ir(t.site,l.site),er(t),void er(r);if(r){tr(t),tr(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=r.site,m=p.x-u,g=p.y-d,v=2*(f*g-h*m),y=f*f+h*h,x=m*m+g*g,b={x:(g*y-h*x)/v+u,y:(f*x-m*y)/v+d};ar(r.edge,c,p,b),l.edge=ir(c,e,null,b),r.edge=ir(e,p,null,b),er(t),er(r)}else l.edge=ir(t.site,l.site)}}function Xt(e,t){var r=e.site,n=r.x,i=r.y,o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;var s=(r=a.site).x,l=r.y,c=l-t;if(!c)return s;var u=s-n,d=1/o-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-l+c/2+i-o/2)))/d+n:(n+s)/2}function Kt(e,t){var r=e.N;if(r)return Xt(r,t);var n=e.site;return n.y===t?n.x:1/0}function $t(e){this.site=e,this.edges=[]}function Jt(e,t){return t.angle-e.angle}function Qt(){cr(this),this.x=this.y=this.arc=this.site=this.cy=null}function er(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i.x,s=i.y,l=n.x-a,c=n.y-s,u=o.x-a,d=2*(l*(g=o.y-s)-c*u);if(!(d>=-Ee)){var f=l*l+c*c,h=u*u+g*g,p=(g*f-c*h)/d,m=(l*h-u*f)/d,g=m+s,v=Vt.pop()||new Qt;v.arc=e,v.site=i,v.x=p+a,v.y=g+Math.sqrt(p*p+m*m),v.cy=g,e.circle=v;for(var y=null,x=Zt._;x;)if(v.y=s)return;if(f>p){if(o){if(o.y>=c)return}else o={x:g,y:l};r={x:g,y:c}}else{if(o){if(o.y1)if(f>p){if(o){if(o.y>=c)return}else o={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(o){if(o.y=s)return}else o={x:a,y:n*a+i};r={x:s,y:n*s+i}}else{if(o){if(o.x0)){if(t/=f,f<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=i-l,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t0)){if(t/=h,h<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=o-c,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>u&&(u=t)}else if(h>0){if(t0&&(e.a={x:l+u*f,y:c+u*h}),d<1&&(e.b={x:l+d*f,y:c+d*h}),e}}}}}),l=a.length;l--;)(!rr(t=a[l],e)||!s(t)||_(t.a.x-t.b.x)Ae||_(i-r)>Ae)&&(s.splice(a,0,new sr(or(o.site,u,_(n-d)Ae?{x:d,y:_(t-d)Ae?{x:_(r-p)Ae?{x:f,y:_(t-f)Ae?{x:_(r-h)=r&&c.x<=i&&c.y>=n&&c.y<=a?[[r,a],[i,a],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Ae)*Ae,y:Math.round(i(e,t)/Ae)*Ae,i:t}}))}return a.links=function(e){return hr(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return hr(s(e)).cells.forEach((function(r,n){for(var i,o,a,s,l=r.site,c=r.edges.sort(Jt),u=-1,d=c.length,f=c[d-1].edge,h=f.l===l?f.r:f.l;++uo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:wr(r,n)})),o=Sr.lastIndex;return om&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(d=0;dm&&(m=x),b>g&&(g=b),c.push(x),u.push(b)}var w=m-h,k=g-p;function S(e,t,r,n,i,o,a,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(_(l-r)+_(c-n)<.01)T(e,t,r,n,i,o,a,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,l,c,i,o,a,s),T(e,t,r,n,i,o,a,s)}else e.x=r,e.y=n,e.point=t}else T(e,t,r,n,i,o,a,s)}function T(e,t,r,n,i,o,a,s){var l=.5*(i+a),c=.5*(o+s),u=r>=l,d=n>=c,f=d<<1|u;e.leaf=!1,u?i=l:a=l,d?o=c:s=c,S(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,o,a,s)}w>k?g=p+w:m=h+k;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){S(M,e,+v(e,++d),+y(e,d),h,p,m,g)}};if(M.visit=function(e){yr(e,M,h,p,m,g)},M.find=function(e){return function(e,t,r,n,i,o,a){var s,l=1/0;return function e(c,u,d,f,h){if(!(u>o||d>a||f=w)<<1|t>=b,k=_+4;_=0&&!(r=o.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function jr(e){return 1-Math.cos(e*Re)}function Dr(e){return Math.pow(2,10*(e-1))}function zr(e){return 1-Math.sqrt(1-e*e)}function Nr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Fr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Br(e){var t,r,n,i=[e.a,e.b],o=[e.c,e.d],a=Ur(i),s=Zr(i,o),l=Ur(((t=o)[0]+=(n=-s)*(r=i)[0],t[1]+=n*r[1],t))||0;i[0]*o[1]=0?e.slice(0,r):e,i=r>=0?e.slice(r+1):"in";return n=Ar.get(n)||Cr,i=Er.get(i)||j,t=i(n.apply(null,a.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var r=e.h,n=e.c,i=e.l,a=t.h-r,s=t.c-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.c:n);isNaN(a)?(a=0,r=isNaN(r)?t.h:r):a>180?a-=360:a<-180&&(a+=360);return function(e){return Ye(r+a*e,n+s*e,i+l*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var r=e.h,n=e.s,i=e.l,a=t.h-r,s=t.s-n,l=t.l-i;isNaN(s)&&(s=0,n=isNaN(n)?t.s:n);isNaN(a)?(a=0,r=isNaN(r)?t.h:r):a>180?a-=360:a<-180&&(a+=360);return function(e){return We(r+a*e,n+s*e,i+l*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var r=e.l,n=e.a,i=e.b,a=t.l-r,s=t.a-n,l=t.b-i;return function(e){return tt(r+a*e,n+s*e,i+l*e)+""}},o.interpolateRound=Fr,o.transform=function(e){var t=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var r=t.transform.baseVal.consolidate()}return new Br(r?r.matrix:Vr)})(e)},Br.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vr={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(e){return e.length?e.pop()+",":""}function Wr(e,t){var r=[],n=[];return e=o.transform(e),t=o.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:wr(e[0],t[0])},{i:i-2,x:wr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:wr(e,t)})):t&&r.push(Hr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:wr(e,t)}):t&&r.push(Hr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:wr(e[0],t[0])},{i:i-2,x:wr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Hr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,i=-1,o=n.length;++i0?r=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:r=0})):t>0&&(l.start({type:"start",alpha:r=t}),e=Tt(s.tick)),s):r},s.start=function(){var e,t,r,o=v.length,l=y.length,u=c[0],p=c[1];for(e=0;e=0;)r.push(i[n])}function sn(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a=0;)a.push(u=c[l]),u.parent=o,u.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return sn(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(an(e,(function(e){e.children&&(e.value=0)})),sn(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function r(e,t,n,i){var o=e.children;if(e.x=t,e.y=e.depth*i,e.dx=n,e.dy=i,o&&(a=o.length)){var a,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),a.push(n)}for(r=0;ri&&(n=r,i=t);return n}function wn(e){return e.reduce(_n,0)}function _n(e,t){return e+t[1]}function kn(e,t){return Sn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Sn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,o=[];++r<=t;)o[r]=i*r+n;return o}function Tn(e){return[o.min(e),o.max(e)]}function Mn(e,t){return e.value-t.value}function Cn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function An(e,t){e._pack_next=t,t._pack_prev=e}function En(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function In(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,o,a,s,l,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(On),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(Ln(r,n,i=t[2]),x(i),Cn(r,i),r._pack_prev=i,Cn(i,n),n=r._pack_next,o=3;o0)for(a=-1;++a=d[0]&&l<=d[1]&&((s=c[o.bisect(f,l,1,p)-1]).y+=m,s.push(i[a]));return c}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(r=vt(e),i):r},i.bins=function(e){return arguments.length?(n="number"===typeof e?function(t){return Sn(t,e)}:vt(e),i):n},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(Mn),r=0,n=[1,1];function i(i,o){var a=t.call(this,i,o),s=a[0],l=n[0],c=n[1],u=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(s.x=s.y=0,sn(s,(function(e){e.r=+u(e.value)})),sn(s,In),r){var d=r*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;sn(s,(function(e){e.r+=d})),sn(s,In),sn(s,(function(e){e.r-=d}))}return Rn(s,l/2,c/2,e?1:1/Math.max(2*s.r/l,2*s.r/c)),a}return i.size=function(e){return arguments.length?(n=e,i):n},i.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(r=+e,i):r},on(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=jn,r=[1,1],n=null;function i(i,o){var c=e.call(this,i,o),u=c[0],d=function(e){var t,r={A:null,children:[e]},n=[r];for(;null!=(t=n.pop());)for(var i,o=t.children,a=0,s=o.length;ah.x&&(h=e),e.depth>p.depth&&(p=e)}));var m=t(f,h)/2-f.x,g=r[0]/(h.x+t(h,f)/2+m),v=r[1]/(p.depth||1);an(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r.length){!function(e){var t,r=0,n=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var o=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,o=e,a=e,s=r,l=o.parent.children[0],c=o.m,u=a.m,d=s.m,f=l.m;s=zn(s),o=Dn(o),s&&o;)l=Dn(l),(a=zn(a)).a=e,(i=s.z+d-o.z-c+t(s._,o._))>0&&(Nn(Fn(s,e,n),e,i),c+=i,u+=i),d+=s.m,c+=o.m,f+=l.m,u+=a.m;s&&!zn(a)&&(a.t=s,a.m+=d-u),o&&!Dn(l)&&(l.t=o,l.m+=c-f,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=r[0],e.y=e.depth*r[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e)?l:null,i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:l,i):n?r:null},on(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=jn,r=[1,1],n=!1;function i(i,a){var s,l=e.call(this,i,a),c=l[0],u=0;sn(c,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(r)):(e.x=s?u+=t(e,s):0,e.y=0,s=e)}));var d=Bn(c),f=Zn(c),h=d.x-t(d,f)/2,p=f.x+t(f,d)/2;return sn(c,n?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(n=null==(r=e),i):n?null:r},i.nodeSize=function(e){return arguments.length?(n=null!=(r=e),i):n?r:null},on(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),r=Math.round,n=[1,1],i=null,a=Un,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,i=-1,o=e.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=h(s,m))<=f?(c.pop(),f=n):(s.area-=s.pop().area,p(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(p(s,m,o,!0),s.length=s.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=a(e),i=t.slice(),o=[];for(u(i,n.dx*n.dy/e.value),o.area=0;r=i.pop();)o.push(r),o.area+=r.area,null!=r.z&&(p(o,r.z?n.dx:n.dy,n,!i.length),o.length=o.area=0);t.forEach(f)}}function h(e,t){for(var r,n=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=r));return t*=t,(n*=n)?Math.max(t*i*c/n,n/(t*o*c)):1/0}function p(e,t,n,i){var o,a=-1,s=e.length,l=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((i||u>n.dy)&&(u=n.dy);++an.dx)&&(u=n.dx);++a1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Kn:Gn,l=n?qr:Gr;return i=a(e,t,l,r),o=a(t,e,l,Tr),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},s.range=function(e){return arguments.length?(t=e,a()):t},s.rangeRound=function(e){return s.range(e).interpolate(Fr)},s.clamp=function(e){return arguments.length?(n=e,a()):n},s.interpolate=function(e){return arguments.length?(r=e,a()):r},s.ticks=function(t){return ti(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Qn(e,t),a()},s.copy=function(){return $n(e,t,r,n)},a()}function Jn(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Qn(e,t){return qn(e,Yn(ei(e,t)[2])),qn(e,Yn(ei(e,t)[2])),e}function ei(e,t){null==t&&(t=10);var r=Hn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),o=t/n*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.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 ti(e,t){return o.range.apply(o,ei(e,t))}o.scale.linear=function(){return $n([0,1],[0,1],Tr,!1)};function ri(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),a):n},a.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),a):t},a.nice=function(){var t=qn(n.map(i),r?Math:ni);return e.domain(t),n=t.map(o),a},a.ticks=function(){var e=Hn(n),a=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)a.push(o(c)*f);for(c=0;a[c]l;u--);a=a.slice(c,u)}return a},a.copy=function(){return ri(e.copy(),t,r,n)},Jn(a,e)}o.scale.log=function(){return ri(o.scale.linear().domain([0,1]),10,!0,[1,10])};var ni={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ii(e,t,r){var n=oi(t),i=oi(1/t);function o(t){return e(n(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),o):r},o.ticks=function(e){return ti(r,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},o.nice=function(e){return o.domain(Qn(r,e))},o.exponent=function(a){return arguments.length?(n=oi(t=a),i=oi(1/t),e.domain(r.map(n)),o):t},o.copy=function(){return ii(e.copy(),t,r)},Jn(o,e)}function oi(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ai(e,t){var r,n,i;function a(i){return n[((r.get(i)||("range"===t.t?r.set(i,e.push(i)):NaN))-1)%n.length]}function s(t,r){return o.range(e.length).map((function(e){return t+r*e}))}return a.domain=function(n){if(!arguments.length)return e;e=[],r=new S;for(var i,o=-1,s=n.length;++o0?r[n-1]:e[0],nd?0:1;if(c=Pe)return l(c,h)+(s?l(s,1-h):"")+"Z";var p,m,g,v,y,x,b,w,_,k,S,T,M=0,C=0,A=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=n===gi?Math.sqrt(s*s+c*c):+n.apply(this,arguments),h||(C*=-1),c&&(C=De(g/c*Math.sin(v))),s&&(M=De(g/s*Math.sin(v)))),c){y=c*Math.cos(u+C),x=c*Math.sin(u+C),b=c*Math.cos(d-C),w=c*Math.sin(d-C);var E=Math.abs(d-u-2*C)<=Ie?0:1;if(C&&_i(y,x,b,w)===h^E){var I=(u+d)/2;y=c*Math.cos(I),x=c*Math.sin(I),b=w=null}}else y=x=0;if(s){_=s*Math.cos(d-M),k=s*Math.sin(d-M),S=s*Math.cos(u+M),T=s*Math.sin(u+M);var O=Math.abs(u-d+2*M)<=Ie?0:1;if(M&&_i(_,k,S,T)===1-h^O){var P=(u+d)/2;_=s*Math.cos(P),k=s*Math.sin(P),S=T=null}}else _=k=0;if(f>Ae&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function ki(e,t,r,n,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?n:-n)/Math.sqrt(o*o+a*a),l=s*a,c=-s*o,u=e[0]+l,d=e[1]+c,f=t[0]+l,h=t[1]+c,p=(u+f)/2,m=(d+h)/2,g=f-u,v=h-d,y=g*g+v*v,x=r-n,b=u*h-f*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),_=(b*v-g*w)/y,k=(-b*g-v*w)/y,S=(b*v+g*w)/y,T=(-b*g+v*w)/y,M=_-p,C=k-m,A=S-p,E=T-m;return M*M+C*C>A*A+E*E&&(_=S,k=T),[[_-l,k-c],[_*r/x,k*r/x]]}function Si(){return!0}function Ti(e){var t=Et,r=It,n=Si,i=Ci,o=i.key,a=.7;function s(o){var s,l=[],c=[],u=-1,d=o.length,f=vt(t),h=vt(r);function p(){l.push("M",i(e(c),a))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":Ei,"step-after":Ii,basis:Ri,"basis-open":function(e){if(e.length<4)return Ci(e);var t,r=[],n=-1,i=e.length,o=[0],a=[0];for(;++n<3;)t=e[n],o.push(t[0]),a.push(t[1]);r.push(Li(zi,o)+","+Li(zi,a)),--n;for(;++n9&&(i=3*t/Math.sqrt(i),a[s]=i*r,a[s+1]=i*n);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function Ci(e){return e.length>1?e.join("L"):e+"Z"}function Ai(e){return e.join("L")+"Z"}function Ei(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],o=e[l],l++,n+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var c=2;cIe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return o.radius=function(e){return arguments.length?(r=vt(e),o):r},o.source=function(t){return arguments.length?(e=vt(t),o):e},o.target=function(e){return arguments.length?(t=vt(e),o):t},o.startAngle=function(e){return arguments.length?(n=vt(e),o):n},o.endAngle=function(e){return arguments.length?(i=vt(e),o):i},o},o.svg.diagonal=function(){var e=Ui,t=Vi,r=Wi;function n(n,i){var o=e.call(this,n,i),a=t.call(this,n,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=vt(t),n):e},n.target=function(e){return arguments.length?(t=vt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=Wi,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Re;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},o.svg.symbol=function(){var e=qi,t=Gi;function r(r,n){return(Xi.get(e.call(this,r,n))||Yi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=vt(t),r):e},r.size=function(e){return arguments.length?(t=vt(e),r):t},r};var Xi=o.map({circle:Yi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*$i)),r=t*$i;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ki),r=t*Ki/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});o.svg.symbolTypes=Xi.keys();var Ki=Math.sqrt(3),$i=Math.tan(30*Le);$.transition=function(e){for(var t,r,n=to||++io,i=so(e),o=[],a=ro||{time:Date.now(),ease:Lr,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(e,a);if(o>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(o=i.time,a=Tt((function(e){var t=d.delay;if(a.t=t+o,t<=e)return f(e-t);a.c=f}),0,o),d=u[n]={tween:new S,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}no.call=$.call,no.empty=$.empty,no.node=$.node,no.size=$.size,o.transition=function(e,t){return e&&e.transition?to?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=no,no.select=function(e){var t,r,n,i=this.id,o=this.namespace,a=[];e=J(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",a[1]-a[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=o.select(o.event.target),x=r.of(v,arguments),b=o.select(v),w=y.datum(),_=!/^(n|s)$/.test(w)&&n,k=!/^(e|w)$/.test(w)&&i,S=y.classed("extent"),T=Se(v),M=o.mouse(v),C=o.select(u(v)).on("keydown.brush",(function(){32==o.event.keyCode&&(S||(d=null,M[0]-=a[1],M[1]-=s[1],S=2),U())})).on("keyup.brush",(function(){32==o.event.keyCode&&2==S&&(M[0]+=a[1],M[1]+=s[1],S=0,U())}));if(o.event.changedTouches?C.on("touchmove.brush",I).on("touchend.brush",P):C.on("mousemove.brush",I).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),S)M[0]=a[0]-M[0],M[1]=s[0]-M[1];else if(w){var A=+/w$/.test(w),E=+/^n/.test(w);g=[a[1-A]-M[0],s[1-E]-M[1]],M[0]=a[A],M[1]=s[E]}else o.event.altKey&&(d=M.slice());function I(){var e=o.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),S||(o.event.altKey?(d||(d=[(a[0]+a[1])/2,(s[0]+s[1])/2]),M[0]=a[+(e[0]{"use strict";e.exports=r(43168)},43168:(e,t,r)=>{"use strict";const n=r(63479),i=r(88060),o=r(86840),a=r(88810),s=r(49147),l=r(25218),c=r(86749),u=r(57710),d=r(2166),f=r(39489);function h(e,t){let[r,n,o,a]=t,s=1/(o-r),l=1/(a-n),c=new Array(e.length);for(let u=0,d=e.length/2;u>>1;t.dtype||(t.dtype="array"),"string"===typeof t.dtype?p=new(d(t.dtype))(g):t.dtype&&(p=t.dtype,Array.isArray(p)&&(p.length=g));for(let n=0;nr||s>1073741824){for(let e=0;er+i||S>l||T=C)return;if(a===s)return;let c=v[o];void 0===s&&(s=c.length);for(let v=a;v=p&&r<=g&&n>=m&&n<=w&&A.push(t)}let u=y[o],d=u[4*a+0],f=u[4*a+1],h=u[4*a+2],x=u[4*a+3],b=function(e,t){let r=null,n=0;for(;null===r;)if(r=e[4*t+n],n++,n>e.length)return null;return r}(u,a+1),_=.5*i,E=o+1;t(r,n,_,E,d,f||h||x||b),t(r,n+_,_,E,f,h||x||b),t(r+_,n,_,E,h,x||b),t(r+_,n+_,_,E,x,b)}(0,0,1,0,0,1),A},p;function _(e,t,r){let n=1,i=.5,o=.5,a=.5;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400),i=6378137;function o(e){var t=0;if(e&&e.length>0){t+=Math.abs(a(e[0]));for(var r=1;r2){for(l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400);function i(e){var t=[1/0,1/0,-1/0,-1/0];return n.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6400),i=r(1949);t.default=function(e,t){void 0===t&&(t={});var r=0,o=0,a=0;return n.coordEach(e,(function(e){r+=e[0],o+=e[1],a++}),!0),i.point([r/a,o/a],t.properties)}},1949:(e,t)=>{"use strict";function r(e,t,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=t||{},n.geometry=e,n}function n(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(e[0])||!h(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function i(e,t,n){void 0===n&&(n={});for(var i=0,o=e;i=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},t.radiansToLength=u,t.lengthToRadians=d,t.lengthToDegrees=function(e,t){return f(d(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=f,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(d(e,t),r)},t.convertArea=function(e,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[r];if(!i)throw new Error("invalid original units");var o=t.areaFactors[n];if(!o)throw new Error("invalid final units");return e/i*o},t.isNumber=h,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!h(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},6400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1949);function i(e,t,r){if(null!==e)for(var n,o,a,s,l,c,u,d,f=0,h=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,v=m?e.features.length:1,y=0;yc||h>u||p>d)return l=i,c=r,u=h,d=p,void(a=0);var m=n.lineString([l,i],e.properties);if(!1===t(m,r,o,p,a))return!1;a++,l=i}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s{e.exports=function(e){var t=0,r=0,n=0,i=0;return e.map((function(e){var o=(e=e.slice())[0],a=o.toUpperCase();if(o!=a)switch(e[0]=a,o){case"a":e[6]+=n,e[7]+=i;break;case"v":e[1]+=i;break;case"h":e[1]+=n;break;default:for(var s=1;s{"use strict";e.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;ni&&(i=e[a]),e[a]{"use strict";e.exports=function(e,t,r){if("function"===typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!==typeof t)throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(0===i)return-1;for(var o=0;o{"use strict";var n=r(88810);e.exports=function(e,t,r){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1);null==r&&(r=n(e,t));for(var i=0;i{e.exports=function(e,t){var r="number"===typeof e,n="number"===typeof t;r&&!n?(t=e,e=0):r||n||(e=0,t=0);var i=(t|=0)-(e|=0);if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),a=0,s=e;a{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}var x="",b="",w="",_="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function S(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function T(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(e,t,r){var n="",i="",o=0,a="",s=!1,l=T(e),c=l.split("\n"),u=T(t).split("\n"),d=0,f="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var h=c[0].length+u[0].length;if(h<=10){if(("object"!==m(e)||null===e)&&("object"!==m(t)||null===t)&&(0!==e||0!==t))return"".concat(k[r],"\n\n")+"".concat(c[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==r){if(h<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;c[0][d]===u[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",d),"^"),d=0)}}}for(var p=c[c.length-1],g=u[u.length-1];p===g&&(d++<2?a="\n ".concat(p).concat(a):n=p,c.pop(),u.pop(),0!==c.length&&0!==u.length);)p=c[c.length-1],g=u[u.length-1];var v=Math.max(c.length,u.length);if(0===v){var S=l.split("\n");if(S.length>30)for(S[26]="".concat(x,"...").concat(_);S.length>27;)S.pop();return"".concat(k.notIdentical,"\n\n").concat(S.join("\n"),"\n")}d>3&&(a="\n".concat(x,"...").concat(_).concat(a),s=!0),""!==n&&(a="\n ".concat(n).concat(a),n="");var M=0,C=k[r]+"\n".concat(b,"+ actual").concat(_," ").concat(w,"- expected").concat(_),A=" ".concat(x,"...").concat(_," Lines skipped");for(d=0;d1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(u[d-2]),M++),i+="\n ".concat(u[d-1]),M++),o=d,n+="\n".concat(w,"-").concat(_," ").concat(u[d]),M++;else if(u.length1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(c[d-2]),M++),i+="\n ".concat(c[d-1]),M++),o=d,i+="\n".concat(b,"+").concat(_," ").concat(c[d]),M++;else{var I=u[d],O=c[d],P=O!==I&&(!y(O,",")||O.slice(0,-1)!==I);P&&y(I,",")&&I.slice(0,-1)===O&&(P=!1,O+=","),P?(E>1&&d>2&&(E>4?(i+="\n".concat(x,"...").concat(_),s=!0):E>3&&(i+="\n ".concat(c[d-2]),M++),i+="\n ".concat(c[d-1]),M++),o=d,i+="\n".concat(b,"+").concat(_," ").concat(O),n+="\n".concat(w,"-").concat(_," ").concat(I),M+=2):(i+=n,n="",1!==E&&0!==d||(i+="\n ".concat(O),M++))}if(M>20&&d30)for(h[26]="".concat(x,"...").concat(_);h.length>27;)h.pop();t=1===h.length?s.call(this,"".concat(f," ").concat(h[0])):s.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var p=T(o),g="",y=k[n];"notDeepEqual"===n||"notEqual"===n?(p="".concat(k[n],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(T(a)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===n||"equal"===n?p="".concat(y,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(n," ").concat(g)),t=s.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=d,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=a,t.operator=n,Error.captureStackTrace&&Error.captureStackTrace(c(t),i),t.stack,t.name="AssertionError",l(t)}return r=u,(n=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&a(r.prototype,n),o&&a(r,o),Object.defineProperty(r,"prototype",{writable:!1}),u}(u(Error),g.custom);e.exports=C},13905:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,s,l;if(void 0===c&&(c=r(75205)),c("string"===typeof e,"'name' must be a string"),"string"===typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))l="The ".concat(e," ").concat(o," ").concat(h(t,"type"));else{var u=function(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(h(t,"type"))}return l+=". Received type ".concat(n(i))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(97736));var i=u.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=d},88527:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function L(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),u=0,d=l>0?a-4:a;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t);1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},63479:e=>{"use strict";function t(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>=0?(o=a,i=a-1):n=a+1}return o}function r(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>0?(o=a,i=a-1):n=a+1}return o}function n(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<0?(o=a,n=a+1):i=a-1}return o}function i(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<=0?(o=a,n=a+1):i=a-1}return o}function o(e,t,r,n,i){for(;n<=i;){var o=n+i>>>1,a=e[o],s=void 0!==r?r(a,t):a-t;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(e,t,r,n,i,o){return"function"===typeof r?o(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,o){return a(e,r,n,i,o,t)},gt:function(e,t,n,i,o){return a(e,t,n,i,o,r)},lt:function(e,t,r,i,o){return a(e,t,r,i,o,n)},le:function(e,t,r,n,o){return a(e,t,r,n,o,i)},eq:function(e,t,r,n,i){return a(e,t,r,n,i,o)}}},34789:(e,t)=>{"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},42990:e=>{"use strict";e.exports=function(e,n){n||(n={});var i,o,a,s,l,c,u,d,f,h,p,m=null==n.cutoff?.25:n.cutoff,g=null==n.radius?8:n.radius,v=n.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!n.width||!n.height)throw Error("For raw data width and height should be provided by options");i=n.width,o=n.height,s=e,c=n.stride?n.stride:Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(u=(d=e).getContext("2d"),i=d.width,o=d.height,s=(f=u.getImageData(0,0,i,o)).data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(u=e,i=(d=e.canvas).width,o=d.height,s=(f=u.getImageData(0,0,i,o)).data,c=4):window.ImageData&&e instanceof window.ImageData&&(f=e,i=e.width,o=e.height,s=f.data,c=4);if(a=Math.max(i,o),window.Uint8ClampedArray&&s instanceof window.Uint8ClampedArray||window.Uint8Array&&s instanceof window.Uint8Array)for(l=s,s=Array(i*o),h=0,p=Math.floor(l.length/c);h{"use strict";const n=r(2470),i=r(60545),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return c(e,t,r)}function c(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);const i=function(e){if(l.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||K(e.length)?s(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),s(e<0?0:0|p(e))}function f(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,i){let o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(l=(31&t)<<6|63&r,l>127&&(o=l));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r);for(let l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function A(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function j(e,t,r,n,i){U(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function N(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=J((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=J((function(e){return L(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=J((function(e){return j(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(i=t;i=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function U(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(o+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(o+1)-1).concat(n,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(n):">= ".concat(t).concat(n," and <= ").concat(r).concat(n),new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i),n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function Y(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!==e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"===typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},44680:(e,t,r)=>{"use strict";var n=r(28476),i=r(59962),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"===typeof r&&o(e,".prototype.")>-1?i(r):r}},59962:(e,t,r)=>{"use strict";var n=r(1199),i=r(28476),o=r(51267),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||n.call(l,s),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(h){u=null}e.exports=function(e){if("function"!==typeof e)throw new a("a function is required");var t=c(n,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(n,s,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},88060:e=>{e.exports=function(e,t,r){return tr?r:e:et?t:e}},10127:(e,t,r)=>{"use strict";var n=r(88060);function i(e,t){null==t&&(t=!0);var r=e[0],i=e[1],o=e[2],a=e[3];return null==a&&(a=t?1:255),t&&(r*=255,i*=255,o*=255,a*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((o=255&n(o,0,255))<<8)+(a=255&n(a,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(e,t){var r=(e=+e)>>>24,n=(16711680&e)>>>16,i=(65280&e)>>>8,o=255&e;return!1===t?[r,n,i,o]:[r/255,n/255,i/255,o/255]}},81238:e=>{"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]}},47367:(e,t,r)=>{"use strict";var n=r(76772),i=r(2166);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=Math.min(Math.max(Math.floor(255*e[0]),0),255),r[1]=Math.min(Math.max(Math.floor(255*e[1]),0),255),r[2]=Math.min(Math.max(Math.floor(255*e[2]),0),255),r[3]=null==e[3]?255:Math.min(Math.max(Math.floor(255*e[3]),0),255)),r)}},87473:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},76772:(e,t,r)=>{"use strict";var n=r(87473);e.exports=function(e){var t;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var r=n(e);if(!r.space)return[];var i=[0,0,0],o="h"===r.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(r.values[0],i[0]),o[0]),t[1]=Math.min(Math.max(r.values[1],i[1]),o[1]),t[2]=Math.min(Math.max(r.values[2],i[2]),o[2]),"h"===r.space[0]&&(t=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return o=255*l,[o,o,o];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*o;return i}(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}},71739:e=>{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]}]}},36839:(e,t,r)=>{"use strict";var n=r(71739),i=r(66212);function o(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function a(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,c,u,d,f,h,p,m;e||(e={});h=(e.nshades||72)-1,f=e.format||"hex",(d=e.colormap)||(d="jet");if("string"===typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");u=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>h+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1];t=u.map((function(e){return Math.round(e.index*h)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m{e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},77420:(e,t,r)=>{"use strict";e.exports={parse:r(79531),stringify:r(62196)}},65054:(e,t,r)=>{"use strict";var n=r(40402);e.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==n.indexOf(e)}}},79531:(e,t,r)=>{"use strict";var n=r(37228),i=r(38732),o=r(41901),a=r(15659),s=r(96209),l=r(83794),c=r(93116),u=r(65054).isSize;e.exports=f;var d=f.cache={};function f(e){if("string"!==typeof e)throw new Error("Font argument must be a string.");if(d[e])return d[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==o.indexOf(e))return d[e]={system:e};for(var t,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},f=c(e,/\s+/);t=f.shift();){if(-1!==i.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){r[e]=t})),d[e]=r;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===a.indexOf(t)){if(u(t)){var p=c(t,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=h(p[1]):"/"===f[0]&&(f.shift(),r.lineHeight=h(f.shift())),!f.length)throw new Error("Missing required font-family.");return r.family=c(f.join(" "),/\s*,\s*/).map(n),d[e]=r}throw new Error("Unknown or unsupported font token: "+t)}r.weight=t}else r.stretch=t;else r.variant=t;else r.style=t}throw new Error("Missing required font-size.")}function h(e){var t=parseFloat(e);return t.toString()===e?t:e}},62196:(e,t,r)=>{"use strict";var n=r(49147),i=r(65054).isSize,o=m(r(38732)),a=m(r(41901)),s=m(r(15659)),l=m(r(96209)),c=m(r(83794)),u={normal:1,"small-caps":1},d={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},f="1rem",h="serif";function p(e,t){if(e&&!t[e]&&!o[e])throw Error("Unknown keyword `"+e+"`");return e}function m(e){for(var t={},r=0;r{"use strict";var n,i=r(33138),o=r(48769),a=r(57251),s=r(27113),l=r(65843),c=r(74157),u=Function.prototype.bind,d=Object.defineProperty,f=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,i=o(t)&&a(t.value);return delete(n=s(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&f.call(this,e)?i:(t.value=u.call(i,r.resolveContext?r.resolveContext(this):this),d(this,e,t),this[e])},n},e.exports=function(e){var t=l(arguments[1]);return i(t.resolveContext)&&a(t.resolveContext),c(e,(function(e,r){return n(r,e,t)}))}},15351:(e,t,r)=>{"use strict";var n=r(33138),i=r(10912),o=r(30402),a=r(65843),s=r(77009);(e.exports=function(e,t){var r,i,l,c,u;return arguments.length<2||"string"!==typeof e?(c=t,t=e,e=null):c=arguments[2],n(e)?(r=s.call(e,"c"),i=s.call(e,"e"),l=s.call(e,"w")):(r=l=!0,i=!1),u={value:t,configurable:r,enumerable:i,writable:l},c?o(a(c),u):u}).gs=function(e,t,r){var l,c,u,d;return"string"!==typeof e?(u=r,r=t,t=e,e=null):u=arguments[3],n(t)?i(t)?n(r)?i(r)||(u=r,r=void 0):r=void 0:(u=t,t=r=void 0):t=void 0,n(e)?(l=s.call(e,"c"),c=s.call(e,"e")):(l=!0,c=!1),d={get:t,set:r,configurable:l,enumerable:c},u?o(a(u),d):d}},74104:(e,t,r)=>{"use strict";function n(e,t){return et?1:e>=t?0:NaN}r.d(t,{j2:()=>n,Fp:()=>a,J6:()=>l,TS:()=>c,VV:()=>u,w6:()=>d,Sm:()=>f});var i=function(e){var t;return 1===e.length&&(t=e,e=function(e,r){return n(t(e),r)}),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}(n);i.right,i.left;var o=Array.prototype;o.slice,o.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function a(e,t){var r,n,i=e.length,o=-1;if(null==t){for(;++o=r)for(n=r;++on&&(n=r)}else for(;++o=r)for(n=r;++on&&(n=r);return n}function s(e){return null===e?NaN:+e}function l(e,t){var r,n=e.length,i=n,o=-1,a=0;if(null==t)for(;++o=0;)for(t=(n=e[i]).length;--t>=0;)r[--a]=n[t];return r}function u(e,t){var r,n,i=e.length,o=-1;if(null==t){for(;++o=r)for(n=r;++or&&(n=r)}else for(;++o=r)for(n=r;++or&&(n=r);return n}function d(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),o=new Array(i);++n{"use strict";r.d(t,{UI:()=>a,b1:()=>s});var n="$";function i(){}function o(e,t){var r=new i;if(e instanceof i)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,o=-1,a=e.length;if(null==t)for(;++o=n.length)return null!=e&&r.sort(e),null!=t?t(r):r;for(var c,u,d,f=-1,h=r.length,p=n[i++],m=a(),g=s();++fn.length)return e;var o,a=i[r-1];return null!=t&&r>=n.length?o=e.entries():(o=[],e.each((function(e,t){o.push({key:t,values:s(e,r)})}))),null!=a?o.sort((function(e,t){return a(e.key,t.key)})):o}return r={object:function(e){return o(e,0,l,c)},map:function(e){return o(e,0,u,d)},entries:function(e){return s(o(e,0,u,d),0)},key:function(e){return n.push(e),r},sortKeys:function(e){return i[n.length-1]=e,r},sortValues:function(t){return e=t,r},rollup:function(e){return t=e,r}}}function l(){return{}}function c(e,t,r){e[t]=r}function u(){return a()}function d(e,t,r){e.set(t,r)}function f(){}var h=a.prototype;function p(e,t){var r=new f;if(e instanceof f)e.each((function(e){r.add(e)}));else if(e){var n=-1,i=e.length;if(null==t)for(;++n{"use strict";function n(e,t){var r;function n(){var n,i,o=r.length,a=0,s=0;for(n=0;n=(o=(m+v)/2))?m=o:v=o,(u=r>=(a=(g+y)/2))?g=a:y=a,i=h,!(h=h[d=u<<1|c]))return i[d]=p,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&r===l)return p.next=h,i?i[d]=p:e._root=p,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=r>=(a=(g+y)/2))?g=a:y=a}while((d=u<<1|c)===(f=(l>=a)<<1|s>=o));return i[f]=h,i[d]=p,e}function s(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function l(e){return e[0]}function c(e){return e[1]}function u(e,t,r){var n=new d(null==t?l:t,null==r?c:r,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function d(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function f(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}r.r(t),r.d(t,{forceCenter:()=>n,forceCollide:()=>g,forceLink:()=>b,forceManyBody:()=>K,forceRadial:()=>$,forceSimulation:()=>X,forceX:()=>J,forceY:()=>Q});var h=u.prototype=d.prototype;function p(e){return e.x+e.vx}function m(e){return e.y+e.vy}function g(e){var t,r,n=1,a=1;function s(){for(var e,i,s,c,d,f,h,g=t.length,v=0;vc+p||id+p||as.index){var m=c-l.x-l.vx,g=d-l.y-l.vy,v=m*m+g*g;ve.r&&(e.r=e[t].r)}function c(){if(t){var n,i,o=t.length;for(r=new Array(o),n=0;nd&&(d=n),if&&(f=i));if(c>d||u>f)return this;for(this.cover(c,u).cover(d,f),r=0;re||e>=i||n>t||t>=o;)switch(s=(th||(o=c.y0)>p||(a=c.x1)=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=x*x+b*b;if(w=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=h,!(h=h[d=u<<1|c]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,f=d)}for(;h.data!==e;)if(n=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,n?(i?n.next=i:delete n.next,this):t?(i?t[d]=i:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(r?r[f]=h:this._root=h),this):(this._root=i,this)},h.removeAll=function(e){for(var t=0,r=e.length;t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var r,n,i=new Array(r),o=0;o=0&&t._call.call(null,e),t=t._next;--E}()}finally{E=0,function(){var e,t,r=C,n=1/0;for(;r;)r._call?(n>r._time&&(n=r._time),e=r,r=r._next):(t=r._next,r._next=null,r=e?e._next=t:C=t);A=e,H(n)}(),L=0}}function V(){var e=D.now(),t=e-R;t>P&&(j-=t,R=e)}function H(e){E||(I&&(I=clearTimeout(I)),e-L>24?(e<1/0&&(I=setTimeout(U,e-D.now()-j)),O&&(O=clearInterval(O))):(O||(R=D.now(),O=setInterval(V,P)),E=1,z(U)))}function W(e){return e.x}function G(e){return e.y}B.prototype=Z.prototype={constructor:B,restart:function(e,t,r){if("function"!==typeof e)throw new TypeError("callback is not a function");r=(null==r?N():+r)+(null==t?0:+t),this._next||A===this||(A?A._next=this:C=this,A=this),this._call=e,this._time=r,H()},stop:function(){this._call&&(this._call=null,this._time=1/0,H())}};var q=10,Y=Math.PI*(3-Math.sqrt(5));function X(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=(0,v.UI)(),l=Z(u),c=M("tick","end");function u(){d(),c.call("tick",t),r1?(null==r?s.remove(e):s.set(e,h(r)),t):s.get(e)},find:function(t,r,n){var i,o,a,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(c.on(e,r),t):c.on(e)}}}function K(){var e,t,r,n,a=i(-30),s=1,l=1/0,c=.81;function d(n){var i,o=e.length,a=u(e,W,G).visitAfter(h);for(r=n,i=0;i=l)){(e.data!==t||e.next)&&(0===d&&(p+=(d=o())*d),0===f&&(p+=(f=o())*f),p{"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{WU:()=>f,FF:()=>m});var i,o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(e){if(!(t=o.exec(e)))throw new Error("invalid format: "+e);var t;return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,t){var r=n(e,t);if(!r)return e+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}a.prototype=s.prototype,s.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};const c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,t){var r=n(e,t);if(!r)return e+"";var o=r[0],a=r[1],s=a-(i=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,l=o.length;return s===l?o:s>l?o+new Array(s-l+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+n(e,Math.max(0,t+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var d,f,h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function m(e){var t,r,o=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),s=void 0===e.currency?"":e.currency[0]+"",l=void 0===e.currency?"":e.currency[1]+"",d=void 0===e.decimal?".":e.decimal+"",f=void 0===e.numerals?u:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),m=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=a(e)).fill,r=e.align,n=e.sign,u=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,w=e.trim,_=e.type;"n"===_?(x=!0,_="g"):c[_]||(void 0===b&&(b=12),w=!0,_="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var k="$"===u?s:"#"===u&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S="$"===u?l:/[%p]/.test(_)?m:"",T=c[_],M=/[defgprs%]/.test(_);function C(e){var a,s,l,c=k,u=S;if("c"===_)u=T(e)+u,e="";else{var m=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:T(Math.abs(e),b),w&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),m&&0===+e&&"+"!==n&&(m=!1),c=(m?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===_?p[8+i/3]:"")+u+(m&&"("===n?")":""),M)for(a=-1,s=e.length;++a(l=e.charCodeAt(a))||l>57){u=(46===l?d+e.slice(a+1):e.slice(a))+u,e=e.slice(0,a);break}}x&&!h&&(e=o(e,1/0));var C=c.length+e.length+u.length,A=C>1)+c+e+u+A.slice(C);break;default:e=A+c+e+u}return f(e)}return b=void 0===b?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),C.toString=function(){return e+""},C}return{format:y,formatPrefix:function(e,t){var r,i=y(((e=a(e)).type="f",e)),o=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-o),l=p[8+o/3];return function(e){return i(s*e)+l}}}}d=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),f=d.format,d.formatPrefix},25715:(e,t,r)=>{"use strict";r.r(t),r.d(t,{geoAiry:()=>j,geoAiryRaw:()=>L,geoAitoff:()=>z,geoAitoffRaw:()=>D,geoArmadillo:()=>F,geoArmadilloRaw:()=>N,geoAugust:()=>Z,geoAugustRaw:()=>B,geoBaker:()=>W,geoBakerRaw:()=>H,geoBerghaus:()=>Y,geoBerghausRaw:()=>q,geoBertin1953:()=>re,geoBertin1953Raw:()=>te,geoBoggs:()=>ue,geoBoggsRaw:()=>ce,geoBonne:()=>me,geoBonneRaw:()=>pe,geoBottomley:()=>ve,geoBottomleyRaw:()=>ge,geoBromley:()=>xe,geoBromleyRaw:()=>ye,geoChamberlin:()=>Ae,geoChamberlinAfrica:()=>Ce,geoChamberlinRaw:()=>Te,geoCollignon:()=>Ie,geoCollignonRaw:()=>Ee,geoCraig:()=>Pe,geoCraigRaw:()=>Oe,geoCraster:()=>je,geoCrasterRaw:()=>Le,geoCylindricalEqualArea:()=>ze,geoCylindricalEqualAreaRaw:()=>De,geoCylindricalStereographic:()=>Fe,geoCylindricalStereographicRaw:()=>Ne,geoEckert1:()=>Ze,geoEckert1Raw:()=>Be,geoEckert2:()=>Ve,geoEckert2Raw:()=>Ue,geoEckert3:()=>We,geoEckert3Raw:()=>He,geoEckert4:()=>qe,geoEckert4Raw:()=>Ge,geoEckert5:()=>Xe,geoEckert5Raw:()=>Ye,geoEckert6:()=>$e,geoEckert6Raw:()=>Ke,geoEisenlohr:()=>et,geoEisenlohrRaw:()=>Qe,geoFahey:()=>nt,geoFaheyRaw:()=>rt,geoFoucaut:()=>ot,geoFoucautRaw:()=>it,geoFoucautSinusoidal:()=>st,geoFoucautSinusoidalRaw:()=>at,geoGilbert:()=>ft,geoGingery:()=>gt,geoGingeryRaw:()=>ht,geoGinzburg4:()=>xt,geoGinzburg4Raw:()=>yt,geoGinzburg5:()=>wt,geoGinzburg5Raw:()=>bt,geoGinzburg6:()=>kt,geoGinzburg6Raw:()=>_t,geoGinzburg8:()=>Tt,geoGinzburg8Raw:()=>St,geoGinzburg9:()=>Ct,geoGinzburg9Raw:()=>Mt,geoGringorten:()=>It,geoGringortenQuincuncial:()=>oi,geoGringortenRaw:()=>Et,geoGuyou:()=>Lt,geoGuyouRaw:()=>Rt,geoHammer:()=>J,geoHammerRaw:()=>K,geoHammerRetroazimuthal:()=>Nt,geoHammerRetroazimuthalRaw:()=>Dt,geoHealpix:()=>qt,geoHealpixRaw:()=>Vt,geoHill:()=>Xt,geoHillRaw:()=>Yt,geoHomolosine:()=>tr,geoHomolosineRaw:()=>er,geoHufnagel:()=>nr,geoHufnagelRaw:()=>rr,geoHyperelliptical:()=>sr,geoHyperellipticalRaw:()=>ar,geoInterrupt:()=>ur,geoInterruptedBoggs:()=>fr,geoInterruptedHomolosine:()=>pr,geoInterruptedMollweide:()=>gr,geoInterruptedMollweideHemispheres:()=>yr,geoInterruptedQuarticAuthalic:()=>dn,geoInterruptedSinuMollweide:()=>br,geoInterruptedSinusoidal:()=>_r,geoKavrayskiy7:()=>Sr,geoKavrayskiy7Raw:()=>kr,geoLagrange:()=>Mr,geoLagrangeRaw:()=>Tr,geoLarrivee:()=>Er,geoLarriveeRaw:()=>Ar,geoLaskowski:()=>Or,geoLaskowskiRaw:()=>Ir,geoLittrow:()=>Rr,geoLittrowRaw:()=>Pr,geoLoximuthal:()=>jr,geoLoximuthalRaw:()=>Lr,geoMiller:()=>zr,geoMillerRaw:()=>Dr,geoModifiedStereographic:()=>Xr,geoModifiedStereographicAlaska:()=>Hr,geoModifiedStereographicGs48:()=>Wr,geoModifiedStereographicGs50:()=>Gr,geoModifiedStereographicLee:()=>Yr,geoModifiedStereographicMiller:()=>qr,geoModifiedStereographicRaw:()=>Nr,geoMollweide:()=>ae,geoMollweideRaw:()=>oe,geoMtFlatPolarParabolic:()=>Qr,geoMtFlatPolarParabolicRaw:()=>Jr,geoMtFlatPolarQuartic:()=>tn,geoMtFlatPolarQuarticRaw:()=>en,geoMtFlatPolarSinusoidal:()=>nn,geoMtFlatPolarSinusoidalRaw:()=>rn,geoNaturalEarth:()=>on.Z,geoNaturalEarth2:()=>sn,geoNaturalEarth2Raw:()=>an,geoNaturalEarthRaw:()=>on.K,geoNellHammer:()=>cn,geoNellHammerRaw:()=>ln,geoNicolosi:()=>hn,geoNicolosiRaw:()=>fn,geoPatterson:()=>Sn,geoPattersonRaw:()=>kn,geoPeirceQuincuncial:()=>ai,geoPierceQuincuncial:()=>ai,geoPolyconic:()=>Mn,geoPolyconicRaw:()=>Tn,geoPolyhedral:()=>Rn,geoPolyhedralButterfly:()=>Bn,geoPolyhedralCollignon:()=>Vn,geoPolyhedralWaterman:()=>Hn,geoProject:()=>Xn,geoQuantize:()=>si,geoQuincuncial:()=>ii,geoRectangularPolyconic:()=>ci,geoRectangularPolyconicRaw:()=>li,geoRobinson:()=>fi,geoRobinsonRaw:()=>di,geoSatellite:()=>pi,geoSatelliteRaw:()=>hi,geoSinuMollweide:()=>Qt,geoSinuMollweideRaw:()=>Jt,geoSinusoidal:()=>he,geoSinusoidalRaw:()=>fe,geoStitch:()=>Ri,geoTimes:()=>ji,geoTimesRaw:()=>Li,geoTwoPointAzimuthal:()=>Fi,geoTwoPointAzimuthalRaw:()=>zi,geoTwoPointAzimuthalUsa:()=>Ni,geoTwoPointEquidistant:()=>Ui,geoTwoPointEquidistantRaw:()=>Bi,geoTwoPointEquidistantUsa:()=>Zi,geoVanDerGrinten:()=>Hi,geoVanDerGrinten2:()=>Gi,geoVanDerGrinten2Raw:()=>Wi,geoVanDerGrinten3:()=>Yi,geoVanDerGrinten3Raw:()=>qi,geoVanDerGrinten4:()=>Ki,geoVanDerGrinten4Raw:()=>Xi,geoVanDerGrintenRaw:()=>Vi,geoWagner:()=>Ji,geoWagner4:()=>no,geoWagner4Raw:()=>ro,geoWagner6:()=>oo,geoWagner6Raw:()=>io,geoWagner7:()=>Qi,geoWagnerRaw:()=>$i,geoWiechel:()=>so,geoWiechelRaw:()=>ao,geoWinkel3:()=>co,geoWinkel3Raw:()=>lo});var n=r(43792),i=Math.abs,o=Math.atan,a=Math.atan2,s=(Math.ceil,Math.cos),l=Math.exp,c=Math.floor,u=Math.log,d=Math.max,f=Math.min,h=Math.pow,p=Math.round,m=Math.sign||function(e){return e>0?1:e<0?-1:0},g=Math.sin,v=Math.tan,y=1e-6,x=1e-12,b=Math.PI,w=b/2,_=b/4,k=Math.SQRT1_2,S=O(2),T=O(b),M=2*b,C=180/b,A=b/180;function E(e){return e>1?w:e<-1?-w:Math.asin(e)}function I(e){return e>1?0:e<-1?b:Math.acos(e)}function O(e){return e>0?Math.sqrt(e):0}function P(e){return(l(e)-l(-e))/2}function R(e){return(l(e)+l(-e))/2}function L(e){var t=v(e/2),r=2*u(s(e/2))/(t*t);function n(e,t){var n=s(e),i=s(t),o=g(t),a=i*n,l=-((1-a?u((1+a)/2)/(1-a):-.5)+r/(1+a));return[l*i*g(e),l*o]}return n.invert=function(t,n){var o,l=O(t*t+n*n),c=-e/2,d=50;if(!l)return[0,0];do{var f=c/2,h=s(f),p=g(f),m=p/h,v=-u(i(h));c-=o=(2/m*v-r*m-l)/(-v/(p*p)+1-r/(2*h*h))*(h<0?.7:1)}while(i(o)>y&&--d>0);var x=g(c);return[a(t*x,l*s(c)),E(n*x/l)]},n}function j(){var e=w,t=(0,n.r)(L),r=t(e);return r.radius=function(r){return arguments.length?t(e=r*A):e*C},r.scale(179.976).clipAngle(147)}function D(e,t){var r=s(t),n=function(e){return e?e/Math.sin(e):1}(I(r*s(e/=2)));return[2*r*g(e)*n,g(t)*n]}function z(){return(0,n.Z)(D).scale(152.63)}function N(e){var t=g(e),r=s(e),n=e>=0?1:-1,o=v(n*e),l=(1+t-r)/2;function c(e,i){var c=s(i),u=s(e/=2);return[(1+c)*g(e),(n*i>-a(u,o)-.001?0:10*-n)+l+g(i)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,d=0,f=50;do{var h=s(u),p=g(u),m=s(d),v=g(d),x=1+m,b=x*p-e,w=l+v*r-x*t*h-c,_=x*h/2,k=-p*v,S=t*x*p/2,T=r*m+t*h*v,M=k*S-T*_,C=(w*k-b*T)/M/2,A=(b*S-w*_)/M;i(A)>2&&(A/=2),u-=C,d-=A}while((i(C)>y||i(A)>y)&&--f>0);return n*d>-a(s(u),o)-.001?[2*u,d]:null},c}function F(){var e=20*A,t=e>=0?1:-1,r=v(t*e),i=(0,n.r)(N),o=i(e),l=o.stream;return o.parallel=function(n){return arguments.length?(r=v((t=(e=n*A)>=0?1:-1)*e),i(e)):e*C},o.stream=function(n){var i=o.rotate(),c=l(n),u=(o.rotate([0,0]),l(n)),d=o.precision();return o.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var n=-180*t;t*n<180;n+=90*t)u.point(n,90*t);if(e)for(;t*(n-=3*t*d)>=-180;)u.point(n,t*-a(s(n*A/2),r)*C);u.lineEnd(),u.polygonEnd()},c},o.scale(218.695).center([0,28.0974])}function B(e,t){var r=v(t/2),n=O(1-r*r),i=1+n*s(e/=2),o=g(e)*n/i,a=r/i,l=o*o,c=a*a;return[4/3*o*(3+l-3*c),4/3*a*(3+3*l-c)]}function Z(){return(0,n.Z)(B).scale(66.1603)}D.invert=function(e,t){if(!(e*e+4*t*t>b*b+y)){var r=e,n=t,o=25;do{var a,l=g(r),c=g(r/2),u=s(r/2),d=g(n),f=s(n),h=g(2*n),p=d*d,m=f*f,v=c*c,x=1-m*u*u,w=x?I(f*u)*O(a=1/x):a=0,_=2*w*f*c-e,k=w*d-t,S=a*(m*v+w*f*u*p),T=a*(.5*l*h-2*w*d*c),M=.25*a*(h*c-w*d*m*l),C=a*(p*u+w*v*f),A=T*M-C*S;if(!A)break;var E=(k*T-_*C)/A,P=(_*M-k*S)/A;r-=E,n-=P}while((i(E)>y||i(P)>y)&&--o>0);return[r,n]}},B.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r=1+e*e+t*t,n=O((r-O(r*r-4*t*t))/2),o=E(n)/3,l=n?function(e){return u(e+O(e*e-1))}(i(t/n))/3:function(e){return u(e+O(e*e+1))}(i(e))/3,c=s(o),d=R(l),f=d*d-c*c;return[2*m(e)*a(P(l)*c,.25-f),2*m(t)*a(d*g(o),.25+f)]};var U=O(8),V=u(1+S);function H(e,t){var r=i(t);return r<_?[e,u(v(_+t/2))]:[e*s(r)*(2*S-1/g(r)),m(t)*(2*S*(r-_)-u(v(r/2)))]}function W(){return(0,n.Z)(H).scale(112.314)}H.invert=function(e,t){if((n=i(t))x&&--c>0);return[e/(s(a)*(U-1/g(a))),m(t)*a]};var G=r(10136);function q(e){var t=2*b/e;function r(e,r){var n=(0,G.N)(e,r);if(i(e)>w){var o=a(n[1],n[0]),l=O(n[0]*n[0]+n[1]*n[1]),c=t*p((o-w)/t)+w,u=a(g(o-=c),2-s(o));o=c+E(b/l*g(u))-u,n[0]=l*s(o),n[1]=l*g(o)}return n}return r.invert=function(e,r){var n=O(e*e+r*r);if(n>w){var i=a(r,e),l=t*p((i-w)/t)+w,c=i>l?-1:1,u=n*s(l-i),d=1/v(c*I((u-b)/O(b*(b-2*u)+n*n)));i=l+2*o((d+c*O(d*d-3))/3),e=n*s(i),r=n*g(i)}return G.N.invert(e,r)},r}function Y(){var e=5,t=(0,n.r)(q),r=t(e),i=r.stream,o=.01,l=-s(o*A),c=g(o*A);return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),u=i(t),d=(r.rotate([0,0]),i(t));return r.rotate(n),u.sphere=function(){d.polygonStart(),d.lineStart();for(var t=0,r=360/e,n=2*b/e,i=90-180/e,u=w;t0&&i(n)>y);return s<0?NaN:r}function ee(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=x),function(n,o,a,s){var l,c,u;a=void 0===a?0:+a,s=void 0===s?0:+s;for(var d=0;dl)a-=c/=2,s-=u/=2;else{l=m;var g=(a>0?-1:1)*r,v=(s>0?-1:1)*r,y=e(a+g,s),x=e(a,s+v),b=(y[0]-f[0])/g,w=(y[1]-f[1])/g,_=(x[0]-f[0])/v,k=(x[1]-f[1])/v,S=k*b-w*_,T=(i(S)<.5?.5:1)/S;if(a+=c=(p*_-h*k)*T,s+=u=(h*w-p*b)*T,i(c)0&&(i[1]*=1+o/1.5*i[0]*i[0]),i}return t.invert=ee(t),t}function re(){return(0,n.Z)(te()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ne(e,t){var r,n=e*g(t),o=30;do{t-=r=(t+g(t)-n)/(1+s(t))}while(i(r)>y&&--o>0);return t/2}function ie(e,t,r){function n(n,i){return[e*n*s(i=ne(r,i)),t*g(i)]}return n.invert=function(n,i){return i=E(i/t),[n/(e*s(i)),E((2*i+g(2*i))/r)]},n}$.invert=function(e,t){var r=2*E(t/2);return[e*s(r/2)/s(r),r]};var oe=ie(S/w,S,b);function ae(){return(0,n.Z)(oe).scale(169.529)}var se=2.00276,le=1.11072;function ce(e,t){var r=ne(b,t);return[se*e/(1/s(t)+le/s(r)),(t+S*g(r))/se]}function ue(){return(0,n.Z)(ce).scale(160.857)}function de(e){var t=0,r=(0,n.r)(e),i=r(t);return i.parallel=function(e){return arguments.length?r(t=e*A):t*C},i}function fe(e,t){return[e*s(t),t]}function he(){return(0,n.Z)(fe).scale(152.63)}function pe(e){if(!e)return fe;var t=1/v(e);function r(r,n){var i=t+e-n,o=i?r*s(n)/i:i;return[i*g(o),t-i*s(o)]}return r.invert=function(r,n){var i=O(r*r+(n=t-n)*n),o=t+e-i;return[i/s(o)*a(r,n),o]},r}function me(){return de(pe).scale(123.082).center([0,26.1441]).parallel(45)}function ge(e){function t(t,r){var n=w-r,i=n?t*e*g(n)/n:n;return[n*g(i)/e,w-n*s(i)]}return t.invert=function(t,r){var n=t*e,i=w-r,o=O(n*n+i*i),s=a(n,i);return[(o?o/g(o):1)*s/e,w-o]},t}function ve(){var e=.5,t=(0,n.r)(ge),r=t(e);return r.fraction=function(r){return arguments.length?t(e=+r):e},r.scale(158.837)}ce.invert=function(e,t){var r,n,o=se*t,a=t<0?-_:_,l=25;do{n=o-S*g(a),a-=r=(g(2*a)+2*a-b*g(n))/(2*s(2*a)+2+b*s(n)*S*s(a))}while(i(r)>y&&--l>0);return n=o-S*g(a),[e*(1/s(n)+le/s(a))/se,n]},fe.invert=function(e,t){return[e/s(t),t]};var ye=ie(1,4/b,b);function xe(){return(0,n.Z)(ye).scale(152.63)}var be=r(90903),we=r(83706);function _e(e,t,r,n,o,l){var c,u=s(l);if(i(e)>1||i(l)>1)c=I(r*o+t*n*u);else{var d=g(e/2),f=g(l/2);c=2*E(O(d*d+t*n*f*f))}return i(c)>y?[c,a(n*g(l),t*o-r*n*u)]:[0,0]}function ke(e,t,r){return I((e*e+t*t-r*r)/(2*e*t))}function Se(e){return e-2*b*c((e+b)/(2*b))}function Te(e,t,r){for(var n,i=[[e[0],e[1],g(e[1]),s(e[1])],[t[0],t[1],g(t[1]),s(t[1])],[r[0],r[1],g(r[1]),s(r[1])]],o=i[2],a=0;a<3;++a,o=n)n=i[a],o.v=_e(n[1]-o[1],o[3],o[2],n[3],n[2],n[0]-o[0]),o.point=[0,0];var l=ke(i[0].v[0],i[2].v[0],i[1].v[0]),c=ke(i[0].v[0],i[1].v[0],i[2].v[0]),u=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var d=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(e,t){var r,n=g(t),o=s(t),a=new Array(3);for(r=0;r<3;++r){var l=i[r];if(a[r]=_e(t-l[1],l[3],l[2],o,n,e-l[0]),!a[r][0])return l.point;a[r][1]=Se(a[r][1]-l.v[1])}var f=d.slice();for(r=0;r<3;++r){var h=2==r?0:r+1,p=ke(i[r].v[0],a[r][0],a[h][0]);a[r][1]<0&&(p=-p),r?1==r?(p=c-p,f[0]-=a[r][0]*s(p),f[1]-=a[r][0]*g(p)):(p=u-p,f[0]+=a[r][0]*s(p),f[1]+=a[r][0]*g(p)):(f[0]+=a[r][0]*s(p),f[1]-=a[r][0]*g(p))}return f[0]/=3,f[1]/=3,f}}function Me(e){return e[0]*=A,e[1]*=A,e}function Ce(){return Ae([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ae(e,t,r){var i=(0,be.Z)({type:"MultiPoint",coordinates:[e,t,r]}),o=[-i[0],-i[1]],a=(0,we.Z)(o),s=Te(Me(a(e)),Me(a(t)),Me(a(r)));s.invert=ee(s);var l=(0,n.Z)(s).rotate(o),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(a(e)):a.invert(c())},l.clipAngle(90)}function Ee(e,t){var r=O(1-g(t));return[2/T*e*r,T*(1-r)]}function Ie(){return(0,n.Z)(Ee).scale(95.6464).center([0,30])}function Oe(e){var t=v(e);function r(e,r){return[e,(e?e/g(e):1)*(g(r)*s(e)-t*s(r))]}return r.invert=t?function(e,r){e&&(r*=g(e)/e);var n=s(e);return[e,2*a(O(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,E(e?t*v(e)/e:t)]},r}function Pe(){return de(Oe).scale(249.828).clipAngle(90)}Ee.invert=function(e,t){var r=(r=t/T-1)*r;return[r>0?e*O(b/r)/2:0,E(1-r)]};var Re=O(3);function Le(e,t){return[Re*e*(2*s(2*t/3)-1)/T,Re*T*g(t/3)]}function je(){return(0,n.Z)(Le).scale(156.19)}function De(e){var t=s(e);function r(e,r){return[e*t,g(r)/t]}return r.invert=function(e,r){return[e/t,E(r*t)]},r}function ze(){return de(De).parallel(38.58).scale(195.044)}function Ne(e){var t=s(e);function r(e,r){return[e*t,(1+t)*v(r/2)]}return r.invert=function(e,r){return[e/t,2*o(r/(1+t))]},r}function Fe(){return de(Ne).scale(124.75)}function Be(e,t){var r=O(8/(3*b));return[r*e*(1-i(t)/b),r*t]}function Ze(){return(0,n.Z)(Be).scale(165.664)}function Ue(e,t){var r=O(4-3*g(i(t)));return[2/O(6*b)*e*r,m(t)*O(2*b/3)*(2-r)]}function Ve(){return(0,n.Z)(Ue).scale(165.664)}function He(e,t){var r=O(b*(4+b));return[2/r*e*(1+O(1-4*t*t/(b*b))),4/r*t]}function We(){return(0,n.Z)(He).scale(180.739)}function Ge(e,t){var r=(2+w)*g(t);t/=2;for(var n=0,o=1/0;n<10&&i(o)>y;n++){var a=s(t);t-=o=(t+g(t)*(a+2)-r)/(2*a*(1+a))}return[2/O(b*(4+b))*e*(1+s(t)),2*O(b/(4+b))*g(t)]}function qe(){return(0,n.Z)(Ge).scale(180.739)}function Ye(e,t){return[e*(1+s(t))/O(2+b),2*t/O(2+b)]}function Xe(){return(0,n.Z)(Ye).scale(173.044)}function Ke(e,t){for(var r=(1+w)*g(t),n=0,o=1/0;n<10&&i(o)>y;n++)t-=o=(t+g(t)-r)/(1+s(t));return r=O(2+b),[e*(1+s(t))/r,2*t/r]}function $e(){return(0,n.Z)(Ke).scale(173.044)}Le.invert=function(e,t){var r=3*E(t/(Re*T));return[T*e/(Re*(2*s(2*r/3)-1)),r]},Be.invert=function(e,t){var r=O(8/(3*b)),n=t/r;return[e/(r*(1-i(n)/b)),n]},Ue.invert=function(e,t){var r=2-i(t)/O(2*b/3);return[e*O(6*b)/(2*r),m(t)*E((4-r*r)/3)]},He.invert=function(e,t){var r=O(b*(4+b))/2;return[e*r/(1+O(1-t*t*(4+b)/(4*b))),t*r/2]},Ge.invert=function(e,t){var r=t*O((4+b)/b)/2,n=E(r),i=s(n);return[e/(2/O(b*(4+b))*(1+i)),E((n+r*(i+2))/(2+w))]},Ye.invert=function(e,t){var r=O(2+b),n=t*r/2;return[r*e/(1+s(n)),n]},Ke.invert=function(e,t){var r=1+w,n=O(r/2);return[2*e*n/(1+s(t*=n)),E((t+g(t))/r)]};var Je=3+2*S;function Qe(e,t){var r=g(e/=2),n=s(e),i=O(s(t)),a=s(t/=2),l=g(t)/(a+S*n*i),c=O(2/(1+l*l)),d=O((S*a+(n+r)*i)/(S*a+(n-r)*i));return[Je*(c*(d-1/d)-2*u(d)),Je*(c*l*(d+1/d)-2*o(l))]}function et(){return(0,n.Z)(Qe).scale(62.5271)}Qe.invert=function(e,t){if(!(r=B.invert(e/1.2,1.065*t)))return null;var r,n=r[0],a=r[1],l=20;e/=Je,t/=Je;do{var c=n/2,h=a/2,p=g(c),m=s(c),v=g(h),x=s(h),b=s(a),_=O(b),T=v/(x+S*m*_),M=T*T,C=O(2/(1+M)),A=(S*x+(m+p)*_)/(S*x+(m-p)*_),E=O(A),I=E-1/E,P=E+1/E,R=C*I-2*u(E)-e,L=C*T*P-2*o(T)-t,j=v&&k*_*p*M/v,D=(S*m*x+_)/(2*(x+S*m*_)*(x+S*m*_)*_),z=-.5*T*C*C*C,N=z*j,F=z*D,Z=(Z=2*x+S*_*(m-p))*Z*E,U=(S*m*x*_+b)/Z,V=-S*p*v/(_*Z),H=I*N-2*U/E+C*(U+U/A),W=I*F-2*V/E+C*(V+V/A),G=T*P*N-2*j/(1+M)+C*P*j+C*T*(U-U/A),q=T*P*F-2*D/(1+M)+C*P*D+C*T*(V-V/A),Y=W*G-q*H;if(!Y)break;var X=(L*W-R*q)/Y,K=(R*G-L*H)/Y;n-=X,a=d(-w,f(w,a-K))}while((i(X)>y||i(K)>y)&&--l>0);return i(i(a)-w)n){var f=O(d),h=a(u,c),m=r*p(h/r),v=h-m,x=e*s(v),_=(e*g(v)-v*g(x))/(w-x),k=pt(v,_),S=(b-e)/mt(k,x,b);c=f;var T,M=50;do{c-=T=(e+mt(k,x,c)*S-f)/(k(c)*S)}while(i(T)>y&&--M>0);u=v*g(c),cn){var c=O(l),u=a(o,t),d=r*p(u/r),f=u-d;t=c*s(f),o=c*g(f);for(var h=t-w,m=g(t),v=o/m,y=ty||i(h)>y)&&--v>0);return[p,m]},u}var yt=vt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xt(){return(0,n.Z)(yt).scale(149.995)}var bt=vt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function wt(){return(0,n.Z)(bt).scale(153.93)}var _t=vt(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return(0,n.Z)(_t).scale(130.945)}function St(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}function Tt(){return(0,n.Z)(St).scale(131.747)}St.invert=function(e,t){var r,n=e,o=t,a=50;do{var s=o*o;o-=r=(o*(1+s/12)-t)/(1+s/4)}while(i(r)>y&&--a>0);a=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>y&&--a>0);return[n,o]};var Mt=vt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ct(){return(0,n.Z)(Mt).scale(131.087)}function At(e){var t=e(w,0)[0]-e(-w,0)[0];function r(r,n){var i=r>0?-.5:.5,o=e(r+i*b,n);return o[0]-=i*t,o}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,o=e.invert(r+i*t,n),a=o[0]-i*b;return a<-b?a+=2*b:a>b&&(a-=2*b),o[0]=a,o}),r}function Et(e,t){var r=m(e),n=m(t),o=s(t),l=s(e)*o,c=g(e)*o,u=g(n*t);e=i(a(c,u)),t=E(l),i(e-w)>y&&(e%=w);var d=function(e,t){if(t===w)return[0,0];var r,n,o=g(t),a=o*o,l=a*a,c=1+l,u=1+3*l,d=1-l,f=E(1/O(c)),h=d+a*c*f,p=(1-o)/h,m=O(p),v=p*c,x=O(v),_=m*d;if(0===e)return[0,-(_+a*x)];var k,S=s(t),T=1/S,M=2*o*S,C=(-3*a+f*u)*M,A=(-h*S-(1-o)*C)/(h*h),I=a*c*A+p*u*M,P=-T*M,R=-T*I,L=-2*T*(d*(.5*A/m)-2*a*m*M),j=4*e/b;if(e>.222*b||t.175*b){if(r=(_+a*O(v*(1+l)-_*_))/(1+l),e>b/4)return[r,r];var D=r,z=.5*r;r=.5*(z+D),n=50;do{var N=r*(L+P*O(v-r*r))+R*E(r/x)-j;if(!N)break;N<0?z=r:D=r,r=.5*(z+D)}while(i(D-z)>y&&--n>0)}else{r=y,n=25;do{var F=r*r,B=O(v-F),Z=L+P*B,U=r*Z+R*E(r/x)-j;r-=k=B?U/(Z+(R-P*F)/B):0}while(i(k)>y&&--n>0)}return[r,-_-a*O(v-r*r)]}(e>b/4?w-e:e,t);return e>b/4&&(u=d[0],d[0]=-d[1],d[1]=-u),d[0]*=r,d[1]*=-n,d}function It(){return(0,n.Z)(At(Et)).scale(239.75)}function Ot(e,t){var r,n,a,c,u,d;if(t=1-y)return r=(1-t)/4,a=1/(n=R(e)),[(c=((d=l(2*(d=e)))-1)/(d+1))+r*((u=n*P(e))-e)/(n*n),a-r*c*a*(u-e),a+r*c*a*(u+e),2*o(l(e))-w+r*(u-e)/n];var f=[1,0,0,0,0,0,0,0,0],h=[O(t),0,0,0,0,0,0,0,0],p=0;for(n=O(1-t),u=1;i(h[p]/f[p])>y&&p<8;)r=f[p++],h[p]=(r-n)/2,f[p]=(r+n)/2,n=O(r*n),u*=2;a=u*f[p]*e;do{a=(E(c=h[p]*g(n=a)/f[p])+a)/2}while(--p);return[g(a),c=s(a),c/s(a-n),a]}function Pt(e,t){if(!t)return e;if(1===t)return u(v(e/2+_));for(var r=1,n=O(1-t),a=O(t),s=0;i(a)>y;s++){if(e%b){var l=o(n*v(e)/r);l<0&&(l+=b),e+=l+~~(e/b)*b}else e+=e;a=(r+n)/2,n=O(r*n),a=((r=a)-n)/2}return e/(h(2,s)*r)}function Rt(e,t){var r=(S-1)/(S+1),n=O(1-r*r),c=Pt(w,n*n),d=u(v(b/4+i(t)/2)),f=l(-1*d)/O(r),h=function(e,t){var r=e*e,n=t+1,i=1-r-t*t;return[.5*((e>=0?w:-w)-a(i,2*e)),-.25*u(i*i+4*r)+.5*u(n*n+r)]}(f*s(-1*e),f*g(-1*e)),p=function(e,t,r){var n=i(e),a=P(i(t));if(n){var s=1/g(n),l=1/(v(n)*v(n)),c=-(l+r*(a*a*s*s)-1+r),u=(-c+O(c*c-(r-1)*l*4))/2;return[Pt(o(1/O(u)),r)*m(e),Pt(o(O((u/l-1)/r)),1-r)*m(t)]}return[0,Pt(o(a),1-r)*m(t)]}(h[0],h[1],n*n);return[-p[1],(t>=0?1:-1)*(.5*c-p[0])]}function Lt(){return(0,n.Z)(At(Rt)).scale(151.496)}Et.invert=function(e,t){i(e)>1&&(e=2*m(e)-e),i(t)>1&&(t=2*m(t)-t);var r=m(e),n=m(t),o=-r*e,l=-n*t,c=l/o<1,u=function(e,t){var r=0,n=1,o=.5,a=50;for(;;){var l=o*o,c=O(o),u=E(1/O(1+l)),d=1-l+o*(1+l)*u,f=(1-c)/d,h=O(f),p=f*(1+l),m=h*(1-l),g=O(p-e*e),v=t+m+o*g;if(i(n-r)0?r=o:n=o,o=.5*(r+n)}if(!a)return null;var y=E(c),w=s(y),_=1/w,k=2*c*w,S=(-d*w-(-3*o+u*(1+3*l))*k*(1-c))/(d*d),T=.5*S/h,M=(1-l)*T-2*o*h*k;return[b/4*(e*(-2*_*M+-_*k*g)+-_*(o*(1+l)*S+f*(1+3*l)*k)*E(e/O(p))),y]}(c?l:o,c?o:l),d=u[0],f=u[1],h=s(f);return c&&(d=-w-d),[r*(a(g(d)*h,-g(f))+b),n*E(s(d)*h)]},Rt.invert=function(e,t){var r=(S-1)/(S+1),n=O(1-r*r),i=function(e,t,r){var n,i,o;return e?(n=Ot(e,r),t?(o=(i=Ot(t,1-r))[1]*i[1]+r*n[0]*n[0]*i[0]*i[0],[[n[0]*i[2]/o,n[1]*n[2]*i[0]*i[1]/o],[n[1]*i[1]/o,-n[0]*n[2]*i[0]*i[2]/o],[n[2]*i[1]*i[2]/o,-r*n[0]*n[1]*i[0]/o]]):[[n[0],0],[n[1],0],[n[2],0]]):[[0,(i=Ot(t,1-r))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Pt(w,n*n)-t,-e,n*n),s=function(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}(i[0],i[1]);return[a(s[1],s[0])/-1,2*o(l(-.5*u(r*s[0]*s[0]+r*s[1]*s[1])))-w]};var jt=r(12727);function Dt(e){var t=g(e),r=s(e),n=zt(e);function o(e,o){var a=n(e,o);e=a[0],o=a[1];var l=g(o),c=s(o),u=s(e),d=I(t*l+r*c*u),f=g(d),h=i(f)>y?d/f:1;return[h*r*g(e),(i(e)>w?h:-h)*(t*c-r*l*u)]}return n.invert=zt(-e),o.invert=function(e,r){var i=O(e*e+r*r),o=-g(i),l=s(i),c=i*l,u=-r*o,d=i*t,f=O(c*c+u*u-d*d),h=a(c*d+u*f,u*d-c*f),p=(i>w?-1:1)*a(e*o,i*s(h)*l+r*g(h)*o);return n.invert(p,h)},o}function zt(e){var t=g(e),r=s(e);return function(e,n){var i=s(n),o=s(e)*i,l=g(e)*i,c=g(n);return[a(l,o*r-c*t),E(c*r+o*t)]}}function Nt(){var e=0,t=(0,n.r)(Dt),r=t(e),i=r.rotate,o=r.stream,a=(0,jt.Z)();return r.parallel=function(n){if(!arguments.length)return e*C;var i=r.rotate();return t(e=n*A).rotate(i)},r.rotate=function(t){return arguments.length?(i.call(r,[t[0],t[1]-e*C]),a.center([-t[0],-t[1]]),r):((t=i.call(r))[1]+=e*C,t)},r.stream=function(e){return(e=o(e)).sphere=function(){e.polygonStart();var t,r=a.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(e.lineStart();++i=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},r.scale(79.4187).parallel(45).clipAngle(179.999)}var Ft=r(74104),Bt=r(93321),Zt=E(1-1/3)*C,Ut=De(0);function Vt(e){var t=Zt*A,r=Ee(b,t)[0]-Ee(-b,t)[0],n=Ut(0,t)[1],o=Ee(0,t)[1],a=T-o,s=M/e,l=4/M,u=n+a*a*4/M;function h(h,p){var m,g=i(p);if(g>t){var v=f(e-1,d(0,c((h+b)/s)));(m=Ee(h+=b*(e-1)/e-v*s,g))[0]=m[0]*M/r-M*(e-1)/(2*e)+v*M/e,m[1]=n+4*(m[1]-o)*a/M,p<0&&(m[1]=-m[1])}else m=Ut(h,p);return m[0]*=l,m[1]/=u,m}return h.invert=function(t,h){t/=l;var p=i(h*=u);if(p>n){var m=f(e-1,d(0,c((t+b)/s)));t=(t+b*(e-1)/e-m*s)*r/M;var g=Ee.invert(t,.25*(p-n)*M/a+o);return g[0]-=b*(e-1)/e-m*s,h<0&&(g[1]=-g[1]),g}return Ut.invert(t,h)},h}function Ht(e,t){return[e,1&t?90-y:Zt]}function Wt(e,t){return[e,1&t?-90+y:-Zt]}function Gt(e){return[e[0]*(1-y),e[1]]}function qt(){var e=4,t=(0,n.r)(Vt),r=t(e),i=r.stream;return r.lobes=function(r){return arguments.length?t(e=+r):e},r.stream=function(t){var n=r.rotate(),o=i(t),a=(r.rotate([0,0]),i(t));return r.rotate(n),o.sphere=function(){(0,Bt.Z)(function(e){var t=[].concat((0,Ft.w6)(-180,180+e/2,e).map(Ht),(0,Ft.w6)(180,-180-e/2,-e).map(Wt));return{type:"Polygon",coordinates:[180===e?t.map(Gt):t]}}(180/e),a)},o},r.scale(239.75)}function Yt(e){var t,r=1+e,n=E(g(1/r)),o=2*O(b/(t=b+4*n*r)),l=.5*o*(r+O(e*(2+e))),c=e*e,u=r*r;function d(d,f){var h,p,m=1-g(f);if(m&&m<2){var v,y=w-f,_=25;do{var k=g(y),S=s(y),T=n+a(k,r-S),M=1+u-2*r*S;y-=v=(y-c*n-r*k+M*T-.5*m*t)/(2*r*k*T)}while(i(v)>x&&--_>0);h=o*O(M),p=d*T/b}else h=o*(e+m),p=d*n/b;return[h*g(p),l-h*s(p)]}return d.invert=function(e,i){var s=e*e+(i-=l)*i,d=(1+u-s/(o*o))/(2*r),f=I(d),h=g(f),p=n+a(h,r-d);return[E(e/O(s))*b/p,E(1-2*(f-c*n-r*h+(1+u-2*r*d)*p)/t)]},d}function Xt(){var e=1,t=(0,n.r)(Yt),r=t(e);return r.ratio=function(r){return arguments.length?t(e=+r):e},r.scale(167.774).center([0,18.67])}var Kt=.7109889596207567,$t=.0528035274542;function Jt(e,t){return t>-Kt?((e=oe(e,t))[1]+=$t,e):fe(e,t)}function Qt(){return(0,n.Z)(Jt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function er(e,t){return i(t)>Kt?((e=oe(e,t))[1]-=t>0?$t:-$t,e):fe(e,t)}function tr(){return(0,n.Z)(er).scale(152.63)}function rr(e,t,r,n){var i=O(4*b/(2*r+(1+e-t/2)*g(2*r)+(e+t)/2*g(4*r)+t/2*g(6*r))),o=O(n*g(r)*O((1+e*s(2*r)+t*s(4*r))/(1+e+t))),a=r*c(1);function l(r){return O(1+e*s(2*r)+t*s(4*r))}function c(n){var i=n*r;return(2*i+(1+e-t/2)*g(2*i)+(e+t)/2*g(4*i)+t/2*g(6*i))/r}function u(e){return l(e)*g(e)}var d=function(e,t){var n=r*Q(c,a*g(t)/r,t/b);isNaN(n)&&(n=r*m(t));var u=i*l(n);return[u*o*e/b*s(n),u/o*g(n)]};return d.invert=function(e,t){var n=Q(u,t*o/i);return[e*b/(s(n)*i*o*l(n)),E(r*c(n/r)/a)]},0===r&&(i=O(n/b),(d=function(e,t){return[e*i,g(t)/i]}).invert=function(e,t){return[e/i,E(t*i)]}),d}function nr(){var e=1,t=0,r=45*A,i=2,o=(0,n.r)(rr),a=o(e,t,r,i);return a.a=function(n){return arguments.length?o(e=+n,t,r,i):e},a.b=function(n){return arguments.length?o(e,t=+n,r,i):t},a.psiMax=function(n){return arguments.length?o(e,t,r=+n*A,i):r*C},a.ratio=function(n){return arguments.length?o(e,t,r,i=+n):i},a.scale(180.739)}function ir(e,t,r,n,i,o,a,s,l,c,u){if(u.nanEncountered)return NaN;var d,f,h,p,m,g,v,y,x,b;if(f=e(t+.25*(d=r-t)),h=e(r-.25*d),isNaN(f))u.nanEncountered=!0;else{if(!isNaN(h))return b=((g=(p=d*(n+4*f+i)/12)+(m=d*(i+4*h+o)/12))-a)/15,c>l?(u.maxDepthCount++,g+b):Math.abs(b)e?r=n:t=n,n=t+r>>1}while(n>t);var i=c[n+1]-c[n];return i&&(i=(e-c[n+1])/i),(n+1+i)/s}var f=2*d(1)/b*a/r,p=function(e,t){var r=d(i(g(t))),o=n(r)*e;return r/=f,[o,t>=0?r:-r]};return p.invert=function(e,t){var r;return i(t*=f)<1&&(r=m(t)*E(o(i(t))*a)),[e/n(i(t)),r]},p}function sr(){var e=0,t=2.5,r=1.183136,i=(0,n.r)(ar),o=i(e,t,r);return o.alpha=function(n){return arguments.length?i(e=+n,t,r):e},o.k=function(n){return arguments.length?i(e,t=+n,r):t},o.gamma=function(n){return arguments.length?i(e,t,r=+n):r},o.scale(152.63)}function lr(e,t){return i(e[0]-t[0])o[a][2][0];++a);var l=e(r-o[a][1][0],n);return l[0]+=e(o[a][1][0],i*n>i*o[a][0][1]?o[a][0][1]:n)[0],l}r?a.invert=r(a):e.invert&&(a.invert=function(r,n){for(var i=o[+(n<0)],s=t[+(n<0)],l=0,c=i.length;l=0;--s)r=(t=e[1][s])[0][0],n=t[0][1],i=t[1][1],o=t[2][0],a=t[2][1],l.push(cr([[o-y,a-y],[o-y,i+y],[r+y,i+y],[r+y,n-y]],30));return{type:"Polygon",coordinates:[(0,Ft.TS)(l)]}}(r),t=r.map((function(e){return e.map((function(e){return[[e[0][0]*A,e[0][1]*A],[e[1][0]*A,e[1][1]*A],[e[2][0]*A,e[2][1]*A]]}))})),o=t.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],o=e(t[1][0],t[0][1])[1],a=e(t[1][0],t[1][1])[1];return o>a&&(r=o,o=a,a=r),[[n,o],[i,a]]}))})),s):t.map((function(e){return e.map((function(e){return[[e[0][0]*C,e[0][1]*C],[e[1][0]*C,e[1][1]*C],[e[2][0]*C,e[2][1]*C]]}))}))},null!=t&&s.lobes(t),s}Jt.invert=function(e,t){return t>-Kt?oe.invert(e,t-$t):fe.invert(e,t)},er.invert=function(e,t){return i(t)>Kt?oe.invert(e,t+(t>0?$t:-$t)):fe.invert(e,t)};var dr=[[[[-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]]]];function fr(){return ur(ce,dr).scale(160.857)}var hr=[[[[-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]]]];function pr(){return ur(er,hr).scale(152.63)}var mr=[[[[-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]]]];function gr(){return ur(oe,mr).scale(169.529)}var vr=[[[[-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 yr(){return ur(oe,vr).scale(169.529).rotate([20,0])}var xr=[[[[-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]]]];function br(){return ur(Jt,xr,ee).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var wr=[[[[-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 _r(){return ur(fe,wr).scale(152.63).rotate([-20,0])}function kr(e,t){return[3/M*e*O(b*b/3-t*t),t]}function Sr(){return(0,n.Z)(kr).scale(158.837)}function Tr(e){function t(t,r){if(i(i(r)-w)2)return null;var o=(t/=2)*t,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,E((l-1)/(l+1))]},t}function Mr(){var e=.5,t=(0,n.r)(Tr),r=t(e);return r.spacing=function(r){return arguments.length?t(e=+r):e},r.scale(124.75)}kr.invert=function(e,t){return[M/3*e/O(b*b/3-t*t),t]};var Cr=b/S;function Ar(e,t){return[e*(1+O(s(t)))/2,t/(s(t/2)*s(e/6))]}function Er(){return(0,n.Z)(Ar).scale(97.2672)}function Ir(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function Or(){return(0,n.Z)(Ir).scale(139.98)}function Pr(e,t){return[g(e)/s(t),v(t)*s(e)]}function Rr(){return(0,n.Z)(Pr).scale(144.049).clipAngle(89.999)}function Lr(e){var t=s(e),r=v(_+e/2);function n(n,o){var a=o-e,s=i(a)=0;)f=(d=e[u])[0]+l*(i=f)-c*h,h=d[1]+l*h+c*i;return[f=l*(i=f)-c*h,h=l*h+c*i]}return r.invert=function(r,n){var l=20,c=r,u=n;do{for(var d,f=t,h=e[f],p=h[0],m=h[1],v=0,x=0;--f>=0;)v=p+c*(d=v)-u*x,x=m+c*x+u*d,p=(h=e[f])[0]+c*(d=p)-u*m,m=h[1]+c*m+u*d;var b,w,_=(v=p+c*(d=v)-u*x)*v+(x=m+c*x+u*d)*x;c-=b=((p=c*(d=p)-u*m-r)*v+(m=c*m+u*d-n)*x)/_,u-=w=(m*v-p*x)/_}while(i(b)+i(w)>y*y&&--l>0);if(l){var k=O(c*c+u*u),S=2*o(.5*k),T=g(S);return[a(c*T,k*s(S)),k?E(u*T/k):0]}},r}Ar.invert=function(e,t){var r=i(e),n=i(t),o=y,a=w;ny||i(x)>y)&&--o>0);return o&&[r,n]},Pr.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,o=e?k*O((i-O(i*i-4*r))/r):1/O(n);return[E(e*o),m(t)*I(o)]},Dr.invert=function(e,t){return[e,2.5*o(l(.8*t))-.625*b]};var Fr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Br=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Zr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ur=[[.9245,0],[0,0],[.01943,0]],Vr=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hr(){return Xr(Fr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Wr(){return Xr(Br,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Gr(){return Xr(Zr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function qr(){return Xr(Ur,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Yr(){return Xr(Vr,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xr(e,t){var r=(0,n.Z)(Nr(e)).rotate(t).clipAngle(90),i=(0,we.Z)(t),o=r.center;return delete r.rotate,r.center=function(e){return arguments.length?o(i(e)):i.invert(o())},r}var Kr=O(6),$r=O(7);function Jr(e,t){var r=E(7*g(t)/(3*Kr));return[Kr*e*(2*s(2*r/3)-1)/$r,9*g(r/3)/$r]}function Qr(){return(0,n.Z)(Jr).scale(164.859)}function en(e,t){for(var r,n=(1+k)*g(t),o=t,a=0;a<25&&(o-=r=(g(o/2)+g(o)-n)/(.5*s(o/2)+s(o)),!(i(r)x&&--l>0);return[e/(.84719-.13063*(n=s*s)+(a=n*(o=n*n))*a*(.05494*n-.04515-.02326*o+.00331*a)),s]},ln.invert=function(e,t){for(var r=t/2,n=0,o=1/0;n<10&&i(o)>y;++n){var a=s(t/2);t-=o=(t-v(t/2)-r)/(1-.5/(a*a))}return[2*e/(1+s(t)),t]};var un=[[[[-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 dn(){return ur(K(1/0),un).rotate([20,0]).scale(152.63)}function fn(e,t){var r=g(t),n=s(t),o=m(e);if(0===e||i(t)===w)return[0,t];if(0===t)return[e,0];if(i(e)===w)return[e*n,w*r];var a=b/(2*e)-2*e/b,l=2*t/b,c=(1-l*l)/(r-l),u=a*a,d=c*c,f=1+u/d,h=1+d/u,p=(a*r/c-a/2)/f,v=(d*r/u+c/2)/h,y=v*v-(d*r*r/u+c*r-1)/h;return[w*(p+O(p*p+n*n/f)*o),w*(v+O(y<0?0:y)*m(-t*a)*o)]}function hn(){return(0,n.Z)(fn).scale(127.267)}fn.invert=function(e,t){var r=(e/=w)*e,n=r+(t/=w)*t,i=b*b;return[e?(n-1+O((1-n)*(1-n)+4*r))/(2*e)*w:0,Q((function(e){return n*(b*g(e)-2*e)*b+4*e*e*(t-g(e))+2*b*e-i*t}),0)]};var pn=1.0148,mn=.23185,gn=-.14499,vn=.02406,yn=pn,xn=5*mn,bn=7*gn,wn=9*vn,_n=1.790857183;function kn(e,t){var r=t*t;return[e,t*(pn+r*r*(mn+r*(gn+vn*r)))]}function Sn(){return(0,n.Z)(kn).scale(139.319)}function Tn(e,t){if(i(t)_n?t=_n:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var o=n*n;n-=r=(n*(pn+o*o*(mn+o*(gn+vn*o)))-t)/(yn+o*o*(xn+o*(bn+wn*o)))}while(i(r)>y);return[e,n]},Tn.invert=function(e,t){if(i(t)y&&--a>0);return l=v(o),[(i(t)=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(o)return[o,r];o=r}}}(t.face,r.face),i=En(n.map(r.project),n.map(t.project));t.transform=r.transform?In(r.transform,i):i;for(var o=r.edges,a=0,s=o.length;a0?[-t[0],0]:[180-t[0],180])};var t=Fn.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,r){var n=t[e];n&&(n.children||(n.children=[])).push(t[r])})),Rn(t[0],(function(e,r){return t[e<-b/2?r<0?6:4:e<0?r<0?2:0:en^h>n&&r<(f-c)*(n-u)/(h-u)+c&&(i=!i)}return i}(e[0],r))return e.push(t),!0}))||e.push([t])})),ei=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function ii(e){var t=e(w,0)[0]-e(-w,0)[0];function r(r,n){var o=i(r)0?r-b:r+b,n),s=(a[0]-a[1])*k,l=(a[0]+a[1])*k;if(o)return[s,l];var c=t*k,u=s>0^l>0?-1:1;return[u*s-m(l)*c,u*l-m(s)*c]}return e.invert&&(r.invert=function(r,n){var o=(r+n)*k,a=(n-r)*k,s=i(o)<.5*t&&i(a)<.5*t;if(!s){var l=t*k,c=o>0^a>0?-1:1,u=-c*r+(a>0?1:-1)*l,d=-c*n+(o>0?1:-1)*l;o=(-u-d)*k,a=(u-d)*k}var f=e.invert(o,a);return s||(f[0]+=o>0?b:-b),f}),(0,n.Z)(r).rotate([-90,-90,45]).clipAngle(179.999)}function oi(){return ii(Et).scale(176.423)}function ai(){return ii(Rt).scale(111.48)}function si(e,t){if(!(0<=(t=+t)&&t<=20))throw new Error("invalid digits");function r(e){var r=e.length,n=2,i=new Array(r);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);n2||o[0]!=t[0]||o[1]!=t[1])&&(n.push(o),t=o)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function o(e){return e.map(i)}function a(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:n(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:o(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(o)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return a(e)}return e}function li(e){var t=g(e);function r(r,n){var i=t?v(r*t/2)/t:r/2;if(!n)return[2*i,-e];var a=2*o(i*g(n)),l=1/v(n);return[g(a)*l,n+(1-s(a))*l-e]}return r.invert=function(r,n){if(i(n+=e)y&&--u>0);var p=r*(d=v(c)),m=v(i(n)0?w:-w)*(d+a*(p-l)/2+a*a*(p-2*d+l)/2)]}function fi(){return(0,n.Z)(di).scale(152.63)}function hi(e,t){var r=function(e){function t(t,r){var n=s(r),i=(e-1)/(e-n*s(t));return[i*n*g(t),i*g(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=O(n),o=(e-O(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[a(t*o,i*O(1-o*o)),i?E(r*o/i):0]},t}(e);if(!t)return r;var n=s(t),i=g(t);function o(t,o){var a=r(t,o),s=a[1],l=s*i/(e-1)+n;return[a[0]*n/l,s/l]}return o.invert=function(t,o){var a=(e-1)/(e-1-o*i);return r.invert(a*t,a*o*n)},o}function pi(){var e=2,t=0,r=(0,n.r)(hi),i=r(e,t);return i.distance=function(n){return arguments.length?r(e=+n,t):e},i.tilt=function(n){return arguments.length?r(e,t=n*A):t*C},i.scale(432.147).clipAngle(I(1/e)*C-1e-6)}ui.forEach((function(e){e[1]*=1.0144})),di.invert=function(e,t){var r=t/w,n=90*r,o=f(18,i(n/5)),a=d(0,c(o));do{var s=ui[a][1],l=ui[a+1][1],u=ui[f(19,a+2)][1],h=u-s,p=u-2*l+s,m=2*(i(r)-l)/h,g=p/h,v=m*(1-g*m*(1-2*g*m));if(v>=0||1===a){n=(t>=0?5:-5)*(v+o);var y,b=50;do{v=(o=f(18,i(n)/5))-(a=c(o)),s=ui[a][1],l=ui[a+1][1],u=ui[f(19,a+2)][1],n-=(y=(t>=0?w:-w)*(l+v*(u-s)/2+v*v*(u-2*l+s)/2)-t)*C}while(i(y)>x&&--b>0);break}}while(--a>=0);var _=ui[a][0],k=ui[a+1][0],S=ui[f(19,a+2)][0];return[e/(k+v*(S-_)/2+v*v*(S-2*k+_)/2),n*A]};var mi=1e-4,gi=1e4,vi=-180,yi=vi+mi,xi=180,bi=xi-mi,wi=-90,_i=wi+mi,ki=90,Si=ki-mi;function Ti(e){return e.length>0}function Mi(e){return e===wi||e===ki?[0,e]:[vi,(t=e,Math.floor(t*gi)/gi)];var t}function Ci(e){var t=e[0],r=e[1],n=!1;return t<=yi?(t=vi,n=!0):t>=bi&&(t=xi,n=!0),r<=_i?(r=wi,n=!0):r>=Si&&(r=ki,n=!0),n?[t,r]:e}function Ai(e){return e.map(Ci)}function Ei(e,t,r){for(var n=0,i=e.length;n=bi||u<=_i||u>=Si){o[a]=Ci(l);for(var d=a+1;dyi&&h_i&&p=s)break;r.push({index:-1,polygon:t,ring:o=o.slice(d-1)}),o[0]=Mi(o[0][1]),a=-1,s=o.length}}}}function Ii(e){var t,r,n,i,o,a,s=e.length,l={},c={};for(t=0;t0?b-l:l)*C],u=(0,n.Z)(e(s)).rotate(c),d=(0,we.Z)(c),f=u.center;return delete u.rotate,u.center=function(e){return arguments.length?f(d(e)):d.invert(f())},u.clipAngle(90)}function zi(e){var t=s(e);function r(e,r){var n=(0,zn.M)(e,r);return n[0]*=t,n}return r.invert=function(e,r){return zn.M.invert(e/t,r)},r}function Ni(){return Fi([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Fi(e,t){return Di(zi,e,t)}function Bi(e){if(!(e*=2))return G.N;var t=-e/2,r=-t,n=e*e,i=v(r),o=.5/g(r);function l(i,o){var a=I(s(o)*s(i-t)),l=I(s(o)*s(i-r));return[((a*=a)-(l*=l))/(2*e),(o<0?-1:1)*O(4*n*l-(n-a+l)*(n-a+l))/(2*e)]}return l.invert=function(e,n){var l,c,u=n*n,d=s(O(u+(l=e+t)*l)),f=s(O(u+(l=e+r)*l));return[a(c=d-f,l=(d+f)*i),(n<0?-1:1)*I(O(l*l+c*c)*o)]},l}function Zi(){return Ui([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Ui(e,t){return Di(Bi,e,t)}function Vi(e,t){if(i(t)y&&--l>0);return[m(e)*(O(o*o+4)+o)*b/4,w*s]};var eo=4*b+3*O(3),to=2*O(2*b*O(3)/eo),ro=ie(to*O(3)/b,to,eo/6);function no(){return(0,n.Z)(ro).scale(176.84)}function io(e,t){return[e*O(1-3*t*t/(b*b)),t]}function oo(){return(0,n.Z)(io).scale(152.63)}function ao(e,t){var r=s(t),n=s(e)*r,i=1-n,o=s(e=a(g(e)*r,-g(t))),l=g(e);return[l*(r=O(1-n*n))-o*i,-o*r-l*i]}function so(){return(0,n.Z)(ao).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function lo(e,t){var r=D(e,t);return[(r[0]+e/w)/2,(r[1]+t)/2]}function co(){return(0,n.Z)(lo).scale(158.837)}io.invert=function(e,t){return[e/O(1-3*t*t/(b*b)),t]},ao.invert=function(e,t){var r=(e*e+t*t)/-2,n=O(-r*(2+r)),i=t*r+e*n,o=e*r-t*n,s=O(o*o+i*i);return[a(n*i,s*(1+r)),s?-E(n*o/s):0]},lo.invert=function(e,t){var r=e,n=t,o=25;do{var a,l=s(n),c=g(n),u=g(2*n),d=c*c,f=l*l,h=g(r),p=s(r/2),m=g(r/2),v=m*m,x=1-f*p*p,b=x?I(l*p)*O(a=1/x):a=0,_=.5*(2*b*l*m+r/w)-e,k=.5*(b*c+n)-t,S=.5*a*(f*v+b*l*p*d)+.5/w,T=a*(h*u/4-b*c*m),M=.125*a*(u*m-b*c*f*h),C=.5*a*(d*p+b*v*l)+.5,A=T*M-C*S,E=(k*T-_*C)/A,P=(_*M-k*S)/A;r-=E,n-=P}while((i(E)>y||i(P)>y)&&--o>0);return[r,n]}},91272:(e,t,r)=>{"use strict";function n(){return new i}function i(){this.reset()}r.d(t,{Z:()=>n}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){a(o,e,this.t),a(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new i;function a(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}},74629:(e,t,r)=>{"use strict";r.d(t,{L9:()=>f,ZP:()=>x,gL:()=>p});var n,i,o,a,s,l=r(91272),c=r(23400),u=r(80473),d=r(93321),f=(0,l.Z)(),h=(0,l.Z)(),p={point:u.Z,lineStart:u.Z,lineEnd:u.Z,polygonStart:function(){f.reset(),p.lineStart=m,p.lineEnd=g},polygonEnd:function(){var e=+f;h.add(e<0?c.BZ+e:e),this.lineStart=this.lineEnd=this.point=u.Z},sphere:function(){h.add(c.BZ)}};function m(){p.point=v}function g(){y(n,i)}function v(e,t){p.point=y,n=e,i=t,e*=c.uR,t*=c.uR,o=e,a=(0,c.mC)(t=t/2+c.pu),s=(0,c.O$)(t)}function y(e,t){e*=c.uR,t=(t*=c.uR)/2+c.pu;var r=e-o,n=r>=0?1:-1,i=n*r,l=(0,c.mC)(t),u=(0,c.O$)(t),d=s*u,h=a*l+d*(0,c.mC)(i),p=d*n*(0,c.O$)(i);f.add((0,c.fv)(p,h)),o=e,a=l,s=u}function x(e){return h.reset(),(0,d.Z)(e,p),2*h}},32057:(e,t,r)=>{"use strict";r.d(t,{Z:()=>I});var n,i,o,a,s,l,c,u,d,f,h=r(91272),p=r(74629),m=r(68299),g=r(23400),v=r(93321),y=(0,h.Z)(),x={point:b,lineStart:_,lineEnd:k,polygonStart:function(){x.point=S,x.lineStart=T,x.lineEnd=M,y.reset(),p.gL.polygonStart()},polygonEnd:function(){p.gL.polygonEnd(),x.point=b,x.lineStart=_,x.lineEnd=k,p.L9<0?(n=-(o=180),i=-(a=90)):y>g.Ho?a=90:y<-g.Ho&&(i=-90),f[0]=n,f[1]=o},sphere:function(){n=-(o=180),i=-(a=90)}};function b(e,t){d.push(f=[n=e,o=e]),ta&&(a=t)}function w(e,t){var r=(0,m.Og)([e*g.uR,t*g.uR]);if(u){var l=(0,m.T5)(u,r),c=[l[1],-l[0],0],h=(0,m.T5)(c,l);(0,m.iJ)(h),h=(0,m.Y1)(h);var p,v=e-s,y=v>0?1:-1,x=h[0]*g.RW*y,b=(0,g.Wn)(v)>180;b^(y*sa&&(a=p):b^(y*s<(x=(x+360)%360-180)&&xa&&(a=t)),b?eC(n,o)&&(o=e):C(e,o)>C(n,o)&&(n=e):o>=n?(eo&&(o=e)):e>s?C(n,e)>C(n,o)&&(o=e):C(e,o)>C(n,o)&&(n=e)}else d.push(f=[n=e,o=e]);ta&&(a=t),u=r,s=e}function _(){x.point=w}function k(){f[0]=n,f[1]=o,x.point=b,u=null}function S(e,t){if(u){var r=e-s;y.add((0,g.Wn)(r)>180?r+(r>0?360:-360):r)}else l=e,c=t;p.gL.point(e,t),w(e,t)}function T(){p.gL.lineStart()}function M(){S(l,c),p.gL.lineEnd(),(0,g.Wn)(y)>g.Ho&&(n=-(o=180)),f[0]=n,f[1]=o,u=null}function C(e,t){return(t-=e)<0?t+360:t}function A(e,t){return e[0]-t[0]}function E(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tC(s[0],s[1])&&(s[1]=l[1]),C(l[0],s[1])>C(s[0],s[1])&&(s[0]=l[0])):c.push(s=l);for(u=-1/0,t=0,s=c[r=c.length-1];t<=r;s=l,++t)l=c[t],(h=C(s[1],l[0]))>u&&(u=h,n=l[0],o=s[1])}return d=f=null,n===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,i],[o,a]]}},68299:(e,t,r)=>{"use strict";r.d(t,{Og:()=>o,T:()=>c,T5:()=>s,Y1:()=>i,iJ:()=>u,j9:()=>a,s0:()=>l});var n=r(23400);function i(e){return[(0,n.fv)(e[1],e[0]),(0,n.ZR)(e[2])]}function o(e){var t=e[0],r=e[1],i=(0,n.mC)(r);return[i*(0,n.mC)(t),i*(0,n.O$)(t),(0,n.O$)(r)]}function a(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function s(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function l(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function c(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function u(e){var t=(0,n._b)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}},90903:(e,t,r)=>{"use strict";r.d(t,{Z:()=>R});var n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x=r(23400),b=r(80473),w=r(93321),_={sphere:b.Z,point:k,lineStart:T,lineEnd:A,polygonStart:function(){_.lineStart=E,_.lineEnd=I},polygonEnd:function(){_.lineStart=T,_.lineEnd=A}};function k(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t);S(r*(0,x.mC)(e),r*(0,x.O$)(e),(0,x.O$)(t))}function S(e,t,r){++n,o+=(e-o)/n,a+=(t-a)/n,s+=(r-s)/n}function T(){_.point=M}function M(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t);g=r*(0,x.mC)(e),v=r*(0,x.O$)(e),y=(0,x.O$)(t),_.point=C,S(g,v,y)}function C(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t),n=r*(0,x.mC)(e),o=r*(0,x.O$)(e),a=(0,x.O$)(t),s=(0,x.fv)((0,x._b)((s=v*a-y*o)*s+(s=y*n-g*a)*s+(s=g*o-v*n)*s),g*n+v*o+y*a);i+=s,l+=s*(g+(g=n)),c+=s*(v+(v=o)),u+=s*(y+(y=a)),S(g,v,y)}function A(){_.point=k}function E(){_.point=O}function I(){P(p,m),_.point=k}function O(e,t){p=e,m=t,e*=x.uR,t*=x.uR,_.point=P;var r=(0,x.mC)(t);g=r*(0,x.mC)(e),v=r*(0,x.O$)(e),y=(0,x.O$)(t),S(g,v,y)}function P(e,t){e*=x.uR,t*=x.uR;var r=(0,x.mC)(t),n=r*(0,x.mC)(e),o=r*(0,x.O$)(e),a=(0,x.O$)(t),s=v*a-y*o,p=y*n-g*a,m=g*o-v*n,b=(0,x._b)(s*s+p*p+m*m),w=(0,x.ZR)(b),_=b&&-w/b;d+=_*s,f+=_*p,h+=_*m,i+=w,l+=w*(g+(g=n)),c+=w*(v+(v=o)),u+=w*(y+(y=a)),S(g,v,y)}function R(e){n=i=o=a=s=l=c=u=d=f=h=0,(0,w.Z)(e,_);var t=d,r=f,p=h,m=t*t+r*r+p*p;return m{"use strict";r.d(t,{m:()=>s,Z:()=>c});var n=r(68299);function i(e){return function(){return e}}var o=r(23400),a=r(83706);function s(e,t,r,i,a,s){if(r){var c=(0,o.mC)(t),u=(0,o.O$)(t),d=i*r;null==a?(a=t+i*o.BZ,s=t-d/2):(a=l(c,a),s=l(c,s),(i>0?as)&&(a+=i*o.BZ));for(var f,h=a;i>0?h>s:h{"use strict";r.d(t,{Z:()=>o});var n=r(30741),i=r(23400);const o=(0,n.Z)((function(){return!0}),(function(e){var t,r=NaN,n=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,s){var l=a>0?i.pi:-i.pi,c=(0,i.Wn)(a-r);(0,i.Wn)(c-i.pi)0?i.ou:-i.ou),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(l,n),e.point(a,n),t=0):o!==l&&c>=i.pi&&((0,i.Wn)(r-o)i.Ho?(0,i.z4)(((0,i.O$)(t)*(a=(0,i.mC)(n))*(0,i.O$)(r)-(0,i.O$)(n)*(o=(0,i.mC)(t))*(0,i.O$)(e))/(o*a*s)):(t+n)/2}(r,n,a,s),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(l,n),t=0),e.point(r=a,n=s),o=l},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var o;if(null==e)o=r*i.ou,n.point(-i.pi,o),n.point(0,o),n.point(i.pi,o),n.point(i.pi,0),n.point(i.pi,-o),n.point(0,-o),n.point(-i.pi,-o),n.point(-i.pi,0),n.point(-i.pi,o);else if((0,i.Wn)(e[0]-t[0])>i.Ho){var a=e[0]{"use strict";r.d(t,{Z:()=>i});var n=r(80473);function i(){var e,t=[];return{point:function(t,r,n){e.push([t,r,n])},lineStart:function(){t.push(e=[])},lineEnd:n.Z,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}},27950:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(68299),i=r(12727),o=r(23400),a=r(23009),s=r(30741);function l(e){var t=(0,o.mC)(e),r=6*o.uR,l=t>0,c=(0,o.Wn)(t)>o.Ho;function u(e,r){return(0,o.mC)(e)*(0,o.mC)(r)>t}function d(e,r,i){var a=(0,n.Og)(e),s=(0,n.Og)(r),l=[1,0,0],c=(0,n.T5)(a,s),u=(0,n.j9)(c,c),d=c[0],f=u-d*d;if(!f)return!i&&e;var h=t*u/f,p=-t*d/f,m=(0,n.T5)(l,c),g=(0,n.T)(l,h),v=(0,n.T)(c,p);(0,n.s0)(g,v);var y=m,x=(0,n.j9)(g,y),b=(0,n.j9)(y,y),w=x*x-b*((0,n.j9)(g,g)-1);if(!(w<0)){var _=(0,o._b)(w),k=(0,n.T)(y,(-x-_)/b);if((0,n.s0)(k,g),k=(0,n.Y1)(k),!i)return k;var S,T=e[0],M=r[0],C=e[1],A=r[1];M0^k[1]<((0,o.Wn)(k[0]-T)o.pi^(T<=k[0]&&k[0]<=M)){var O=(0,n.T)(y,(-x+_)/b);return(0,n.s0)(O,g),[k,(0,n.Y1)(O)]}}}function f(t,r){var n=l?e:o.pi-e,i=0;return t<-n?i|=1:t>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}return(0,s.Z)(u,(function(e){var t,r,n,i,s;return{lineStart:function(){i=n=!1,s=1},point:function(h,p){var m,g=[h,p],v=u(h,p),y=l?v?0:f(h,p):v?f(h+(h<0?o.pi:-o.pi),p):0;if(!t&&(i=n=v)&&e.lineStart(),v!==n&&(!(m=d(t,g))||(0,a.Z)(t,m)||(0,a.Z)(g,m))&&(g[2]=1),v!==n)s=0,v?(e.lineStart(),m=d(g,t),e.point(m[0],m[1])):(m=d(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(c&&t&&l^v){var x;y&r||!(x=d(g,t,!0))||(s=0,l?(e.lineStart(),e.point(x[0][0],x[0][1]),e.point(x[1][0],x[1][1]),e.lineEnd()):(e.point(x[1][0],x[1][1]),e.lineEnd(),e.lineStart(),e.point(x[0][0],x[0][1],3)))}!v||t&&(0,a.Z)(t,g)||e.point(g[0],g[1]),t=g,n=v,r=y},lineEnd:function(){n&&e.lineEnd(),t=null},clean:function(){return s|(i&&n)<<1}}}),(function(t,n,o,a){(0,i.m)(a,e,r,o,t,n)}),l?[0,-e]:[-o.pi,e-o.pi])}},30741:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(59470),i=r(99222),o=r(23400),a=r(81855),s=r(74104);function l(e,t,r,o){return function(l){var d,f,h,p=t(l),m=(0,n.Z)(),g=t(m),v=!1,y={point:x,lineStart:w,lineEnd:_,polygonStart:function(){y.point=k,y.lineStart=S,y.lineEnd=T,f=[],d=[]},polygonEnd:function(){y.point=x,y.lineStart=w,y.lineEnd=_,f=(0,s.TS)(f);var e=(0,a.Z)(d,o);f.length?(v||(l.polygonStart(),v=!0),(0,i.Z)(f,u,e,r,l)):e&&(v||(l.polygonStart(),v=!0),l.lineStart(),r(null,null,1,l),l.lineEnd()),v&&(l.polygonEnd(),v=!1),f=d=null},sphere:function(){l.polygonStart(),l.lineStart(),r(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(t,r){e(t,r)&&l.point(t,r)}function b(e,t){p.point(e,t)}function w(){y.point=b,p.lineStart()}function _(){y.point=x,p.lineEnd()}function k(e,t){h.push([e,t]),g.point(e,t)}function S(){g.lineStart(),h=[]}function T(){k(h[0][0],h[0][1]),g.lineEnd();var e,t,r,n,i=g.clean(),o=m.result(),a=o.length;if(h.pop(),d.push(h),h=null,a)if(1&i){if((t=(r=o[0]).length-1)>0){for(v||(l.polygonStart(),v=!0),l.lineStart(),e=0;e1&&2&i&&o.push(o.pop().concat(o.shift())),f.push(o.filter(c))}return y}}function c(e){return e.length>1}function u(e,t){return((e=e.x)[0]<0?e[1]-o.ou-o.Ho:o.ou-e[1])-((t=t.x)[0]<0?t[1]-o.ou-o.Ho:o.ou-t[1])}},30511:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(23400),i=r(59470);var o=r(99222),a=r(74104),s=1e9,l=-s;function c(e,t,r,c){function u(n,i){return e<=n&&n<=r&&t<=i&&i<=c}function d(n,i,o,a){var s=0,l=0;if(null==n||(s=f(n,o))!==(l=f(i,o))||p(n,i)<0^o>0)do{a.point(0===s||3===s?e:r,s>1?c:t)}while((s=(s+o+4)%4)!==l);else a.point(i[0],i[1])}function f(i,o){return(0,n.Wn)(i[0]-e)0?0:3:(0,n.Wn)(i[0]-r)0?2:1:(0,n.Wn)(i[1]-t)0?1:0:o>0?3:2}function h(e,t){return p(e.x,t.x)}function p(e,t){var r=f(e,1),n=f(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(n){var f,p,m,g,v,y,x,b,w,_,k,S=n,T=(0,i.Z)(),M={point:C,lineStart:function(){M.point=A,p&&p.push(m=[]);_=!0,w=!1,x=b=NaN},lineEnd:function(){f&&(A(g,v),y&&w&&T.rejoin(),f.push(T.result()));M.point=C,w&&S.lineEnd()},polygonStart:function(){S=T,f=[],p=[],k=!0},polygonEnd:function(){var t=function(){for(var t=0,r=0,n=p.length;rc&&(d-i)*(c-o)>(f-o)*(e-i)&&++t:f<=c&&(d-i)*(c-o)<(f-o)*(e-i)&&--t;return t}(),r=k&&t,i=(f=(0,a.TS)(f)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),d(null,null,1,n),n.lineEnd()),i&&(0,o.Z)(f,h,t,d,n),n.polygonEnd());S=n,f=p=m=null}};function C(e,t){u(e,t)&&S.point(e,t)}function A(n,i){var o=u(n,i);if(p&&m.push([n,i]),_)g=n,v=i,y=o,_=!1,o&&(S.lineStart(),S.point(n,i));else if(o&&w)S.point(n,i);else{var a=[x=Math.max(l,Math.min(s,x)),b=Math.max(l,Math.min(s,b))],d=[n=Math.max(l,Math.min(s,n)),i=Math.max(l,Math.min(s,i))];!function(e,t,r,n,i,o){var a,s=e[0],l=e[1],c=0,u=1,d=t[0]-s,f=t[1]-l;if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=i-s,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a0)){if(a/=f,f<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=o-l,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>c&&(c=a)}else if(f>0){if(a0&&(e[0]=s+c*d,e[1]=l+c*f),u<1&&(t[0]=s+u*d,t[1]=l+u*f),!0}}}}}(a,d,e,t,r,c)?o&&(S.lineStart(),S.point(n,i),k=!1):(w||(S.lineStart(),S.point(a[0],a[1])),S.point(d[0],d[1]),o||S.lineEnd(),k=!1)}x=n,b=i,w=o}return M}}},99222:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(23009),i=r(23400);function o(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function a(e,t,r,a,l){var c,u,d=[],f=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,r,a=e[0],s=e[t];if((0,n.Z)(a,s)){if(!a[2]&&!s[2]){for(l.lineStart(),c=0;c=0;--c)l.point((p=h[c])[0],p[1]);else a(g.x,g.p.x,-1,l);g=g.p}h=(g=g.o).z,v=!v}while(!g.v);l.lineEnd()}}}function s(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n{"use strict";function n(e,t){function r(r,n){return r=e(r,n),t(r[0],r[1])}return e.invert&&t.invert&&(r.invert=function(r,n){return(r=t.invert(r,n))&&e.invert(r[0],r[1])}),r}r.d(t,{Z:()=>n})},26182:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{Z:()=>n})},9497:(e,t,r)=>{"use strict";r.r(t),r.d(t,{geoAlbers:()=>We,geoAlbersUsa:()=>qe,geoArea:()=>n.ZP,geoAzimuthalEqualArea:()=>Ye.Z,geoAzimuthalEqualAreaRaw:()=>Ye.l,geoAzimuthalEquidistant:()=>Xe.Z,geoAzimuthalEquidistantRaw:()=>Xe.N,geoBounds:()=>i.Z,geoCentroid:()=>o.Z,geoCircle:()=>a.Z,geoClipAntimeridian:()=>s.Z,geoClipCircle:()=>l.Z,geoClipExtent:()=>u,geoClipRectangle:()=>c.Z,geoConicConformal:()=>rt,geoConicConformalRaw:()=>tt,geoConicEqualArea:()=>He,geoConicEqualAreaRaw:()=>Ve,geoConicEquidistant:()=>ot,geoConicEquidistantRaw:()=>it,geoContains:()=>D,geoDistance:()=>C,geoEqualEarth:()=>ft,geoEqualEarthRaw:()=>dt,geoEquirectangular:()=>nt.Z,geoEquirectangularRaw:()=>nt.k,geoGnomonic:()=>ht.Z,geoGnomonicRaw:()=>ht.M,geoGraticule:()=>B,geoGraticule10:()=>Z,geoIdentity:()=>mt,geoInterpolate:()=>G.Z,geoLength:()=>S,geoMercator:()=>Je,geoMercatorRaw:()=>$e,geoNaturalEarth1:()=>gt.Z,geoNaturalEarth1Raw:()=>gt.K,geoOrthographic:()=>vt.Z,geoOrthographicRaw:()=>vt.I,geoPath:()=>Be,geoProjection:()=>Ze.Z,geoProjectionMutator:()=>Ze.r,geoRotation:()=>Ke.Z,geoStereographic:()=>bt,geoStereographicRaw:()=>xt,geoStream:()=>y.Z,geoTransform:()=>pt.Z,geoTransverseMercator:()=>_t,geoTransverseMercatorRaw:()=>wt});var n=r(74629),i=r(32057),o=r(90903),a=r(12727),s=r(81592),l=r(27950),c=r(30511);function u(){var e,t,r,n=0,i=0,o=960,a=500;return r={stream:function(r){return e&&t===r?e:e=(0,c.Z)(n,i,o,a)(t=r)},extent:function(s){return arguments.length?(n=+s[0][0],i=+s[0][1],o=+s[1][0],a=+s[1][1],e=t=null,r):[[n,i],[o,a]]}}}var d,f,h,p=r(81855),m=r(91272),g=r(23400),v=r(80473),y=r(93321),x=(0,m.Z)(),b={sphere:v.Z,point:v.Z,lineStart:function(){b.point=_,b.lineEnd=w},lineEnd:v.Z,polygonStart:v.Z,polygonEnd:v.Z};function w(){b.point=b.lineEnd=v.Z}function _(e,t){e*=g.uR,t*=g.uR,d=e,f=(0,g.O$)(t),h=(0,g.mC)(t),b.point=k}function k(e,t){e*=g.uR,t*=g.uR;var r=(0,g.O$)(t),n=(0,g.mC)(t),i=(0,g.Wn)(e-d),o=(0,g.mC)(i),a=n*(0,g.O$)(i),s=h*r-f*n*o,l=f*r+h*n*o;x.add((0,g.fv)((0,g._b)(a*a+s*s),l)),d=e,f=r,h=n}function S(e){return x.reset(),(0,y.Z)(e,b),+x}var T=[null,null],M={type:"LineString",coordinates:T};function C(e,t){return T[0]=e,T[1]=t,S(M)}var A={Feature:function(e,t){return I(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=C(e[o],e[o-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))g.Ho})).map(l)).concat((0,z.w6)((0,g.mD)(o/h)*h,i,h).filter((function(e){return(0,g.Wn)(e%m)>g.Ho})).map(c))}return y.lines=function(){return x().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[u(n).concat(d(a).slice(1),u(r).reverse().slice(1),d(s).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.extentMajor(e).extentMinor(e):y.extentMinor()},y.extentMajor=function(e){return arguments.length?(n=+e[0][0],r=+e[1][0],s=+e[0][1],a=+e[1][1],n>r&&(e=n,n=r,r=e),s>a&&(e=s,s=a,a=e),y.precision(v)):[[n,s],[r,a]]},y.extentMinor=function(r){return arguments.length?(t=+r[0][0],e=+r[1][0],o=+r[0][1],i=+r[1][1],t>e&&(r=t,t=e,e=r),o>i&&(r=o,o=i,i=r),y.precision(v)):[[t,o],[e,i]]},y.step=function(e){return arguments.length?y.stepMajor(e).stepMinor(e):y.stepMinor()},y.stepMajor=function(e){return arguments.length?(p=+e[0],m=+e[1],y):[p,m]},y.stepMinor=function(e){return arguments.length?(f=+e[0],h=+e[1],y):[f,h]},y.precision=function(f){return arguments.length?(v=+f,l=N(o,i,90),c=F(t,e,v),u=N(s,a,90),d=F(n,r,v),y):v},y.extentMajor([[-180,-90+g.Ho],[180,90-g.Ho]]).extentMinor([[-180,-80-g.Ho],[180,80+g.Ho]])}function Z(){return B()()}var U,V,H,W,G=r(42143),q=r(26182),Y=(0,m.Z)(),X=(0,m.Z)(),K={point:v.Z,lineStart:v.Z,lineEnd:v.Z,polygonStart:function(){K.lineStart=$,K.lineEnd=ee},polygonEnd:function(){K.lineStart=K.lineEnd=K.point=v.Z,Y.add((0,g.Wn)(X)),X.reset()},result:function(){var e=Y/2;return Y.reset(),e}};function $(){K.point=J}function J(e,t){K.point=Q,U=H=e,V=W=t}function Q(e,t){X.add(W*e-H*t),H=e,W=t}function ee(){Q(U,V)}const te=K;var re,ne,ie,oe,ae=r(54438),se=0,le=0,ce=0,ue=0,de=0,fe=0,he=0,pe=0,me=0,ge={point:ve,lineStart:ye,lineEnd:we,polygonStart:function(){ge.lineStart=_e,ge.lineEnd=ke},polygonEnd:function(){ge.point=ve,ge.lineStart=ye,ge.lineEnd=we},result:function(){var e=me?[he/me,pe/me]:fe?[ue/fe,de/fe]:ce?[se/ce,le/ce]:[NaN,NaN];return se=le=ce=ue=de=fe=he=pe=me=0,e}};function ve(e,t){se+=e,le+=t,++ce}function ye(){ge.point=xe}function xe(e,t){ge.point=be,ve(ie=e,oe=t)}function be(e,t){var r=e-ie,n=t-oe,i=(0,g._b)(r*r+n*n);ue+=i*(ie+e)/2,de+=i*(oe+t)/2,fe+=i,ve(ie=e,oe=t)}function we(){ge.point=ve}function _e(){ge.point=Se}function ke(){Te(re,ne)}function Se(e,t){ge.point=Te,ve(re=ie=e,ne=oe=t)}function Te(e,t){var r=e-ie,n=t-oe,i=(0,g._b)(r*r+n*n);ue+=i*(ie+e)/2,de+=i*(oe+t)/2,fe+=i,he+=(i=oe*e-ie*t)*(ie+e),pe+=i*(oe+t),me+=3*i,ve(ie=e,oe=t)}const Me=ge;function Ce(e){this._context=e}Ce.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,g.BZ)}},result:v.Z};var Ae,Ee,Ie,Oe,Pe,Re=(0,m.Z)(),Le={point:v.Z,lineStart:function(){Le.point=je},lineEnd:function(){Ae&&De(Ee,Ie),Le.point=v.Z},polygonStart:function(){Ae=!0},polygonEnd:function(){Ae=null},result:function(){var e=+Re;return Re.reset(),e}};function je(e,t){Le.point=De,Ee=Oe=e,Ie=Pe=t}function De(e,t){Oe-=e,Pe-=t,Re.add((0,g._b)(Oe*Oe+Pe*Pe)),Oe=e,Pe=t}const ze=Le;function Ne(){this._string=[]}function Fe(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Be(e,t){var r,n,i=4.5;function o(e){return e&&("function"===typeof i&&n.pointRadius(+i.apply(this,arguments)),(0,y.Z)(e,r(n))),n.result()}return o.area=function(e){return(0,y.Z)(e,r(te)),te.result()},o.measure=function(e){return(0,y.Z)(e,r(ze)),ze.result()},o.bounds=function(e){return(0,y.Z)(e,r(ae.Z)),ae.Z.result()},o.centroid=function(e){return(0,y.Z)(e,r(Me)),Me.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,q.Z):(e=t).stream,o):e},o.context=function(e){return arguments.length?(n=null==e?(t=null,new Ne):new Ce(t=e),"function"!==typeof i&&n.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(n.pointRadius(+e),+e),o):i},o.projection(e).context(t)}Ne.prototype={_radius:4.5,_circle:Fe(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,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(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Fe(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Ze=r(43792);function Ue(e){var t=0,r=g.pi/3,n=(0,Ze.r)(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*g.uR,r=e[1]*g.uR):[t*g.RW,r*g.RW]},i}function Ve(e,t){var r=(0,g.O$)(e),n=(r+(0,g.O$)(t))/2;if((0,g.Wn)(n)=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:a).invert(e)},u.stream=function(r){return e&&t===r?e:e=function(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i0?t<-g.ou+g.Ho&&(t=-g.ou+g.Ho):t>g.ou-g.Ho&&(t=g.ou-g.Ho);var r=i/(0,g.sQ)(et(t),n);return[r*(0,g.O$)(n*e),i-r*(0,g.mC)(n*e)]}return o.invert=function(e,t){var r=i-t,o=(0,g.Xx)(n)*(0,g._b)(e*e+r*r),a=(0,g.fv)(e,(0,g.Wn)(r))*(0,g.Xx)(r);return r*n<0&&(a-=g.pi*(0,g.Xx)(e)*(0,g.Xx)(r)),[a/n,2*(0,g.z4)((0,g.sQ)(i/o,1/n))-g.ou]},o}function rt(){return Ue(tt).scale(109.5).parallels([30,30])}$e.invert=function(e,t){return[e,2*(0,g.z4)((0,g.Qq)(t))-g.ou]};var nt=r(85592);function it(e,t){var r=(0,g.mC)(e),n=e===t?(0,g.O$)(e):(r-(0,g.mC)(t))/(t-e),i=r/n+e;if((0,g.Wn)(n)2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)}xt.invert=(0,yt.O)((function(e){return 2*(0,g.z4)(e)})),wt.invert=function(e,t){return[-t,2*(0,g.z4)((0,g.Qq)(e))-g.ou]}},42143:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(23400);function i(e,t){var r=e[0]*n.uR,i=e[1]*n.uR,o=t[0]*n.uR,a=t[1]*n.uR,s=(0,n.mC)(i),l=(0,n.O$)(i),c=(0,n.mC)(a),u=(0,n.O$)(a),d=s*(0,n.mC)(r),f=s*(0,n.O$)(r),h=c*(0,n.mC)(o),p=c*(0,n.O$)(o),m=2*(0,n.ZR)((0,n._b)((0,n.Jy)(a-i)+s*c*(0,n.Jy)(o-r))),g=(0,n.O$)(m),v=m?function(e){var t=(0,n.O$)(e*=m)/g,r=(0,n.O$)(m-e)/g,i=r*d+t*h,o=r*f+t*p,a=r*l+t*u;return[(0,n.fv)(o,i)*n.RW,(0,n.fv)(a,(0,n._b)(i*i+o*o))*n.RW]}:function(){return[r*n.RW,i*n.RW]};return v.distance=m,v}},23400:(e,t,r)=>{"use strict";r.d(t,{BZ:()=>l,Ho:()=>n,Jy:()=>T,Kh:()=>k,O$:()=>x,OR:()=>_,Qq:()=>g,RW:()=>c,Wn:()=>d,Xx:()=>b,ZR:()=>S,_b:()=>w,aW:()=>i,cM:()=>v,fv:()=>h,mC:()=>p,mD:()=>m,ou:()=>a,pi:()=>o,pu:()=>s,sQ:()=>y,uR:()=>u,z4:()=>f});var n=1e-6,i=1e-12,o=Math.PI,a=o/2,s=o/4,l=2*o,c=180/o,u=o/180,d=Math.abs,f=Math.atan,h=Math.atan2,p=Math.cos,m=Math.ceil,g=Math.exp,v=(Math.floor,Math.log),y=Math.pow,x=Math.sin,b=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,_=Math.tan;function k(e){return e>1?0:e<-1?o:Math.acos(e)}function S(e){return e>1?a:e<-1?-a:Math.asin(e)}function T(e){return(e=x(e/2))*e}},80473:(e,t,r)=>{"use strict";function n(){}r.d(t,{Z:()=>n})},54438:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(80473),i=1/0,o=i,a=-i,s=a;const l={point:function(e,t){ea&&(a=e);ts&&(s=t)},lineStart:n.Z,lineEnd:n.Z,polygonStart:n.Z,polygonEnd:n.Z,result:function(){var e=[[i,o],[a,s]];return a=s=-(o=i=1/0),e}}},23009:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(23400);function i(e,t){return(0,n.Wn)(e[0]-t[0]){"use strict";r.d(t,{Z:()=>l});var n=r(91272),i=r(68299),o=r(23400),a=(0,n.Z)();function s(e){return(0,o.Wn)(e[0])<=o.pi?e[0]:(0,o.Xx)(e[0])*(((0,o.Wn)(e[0])+o.pi)%o.BZ-o.pi)}function l(e,t){var r=s(t),n=t[1],l=(0,o.O$)(n),c=[(0,o.O$)(r),-(0,o.mC)(r),0],u=0,d=0;a.reset(),1===l?n=o.ou+o.Ho:-1===l&&(n=-o.ou-o.Ho);for(var f=0,h=e.length;f=0?1:-1,E=A*C,I=E>o.pi,O=x*T;if(a.add((0,o.fv)(O*A*(0,o.O$)(E),b*M+O*(0,o.mC)(E))),u+=I?C+A*o.BZ:C,I^v>=r^k>=r){var P=(0,i.T5)((0,i.Og)(g),(0,i.Og)(_));(0,i.iJ)(P);var R=(0,i.T5)(c,P);(0,i.iJ)(R);var L=(I^C>=0?-1:1)*(0,o.ZR)(R[2]);(n>L||n===L&&(P[0]||P[1]))&&(d+=I^C>=0?1:-1)}}return(u<-o.Ho||u{"use strict";r.d(t,{O:()=>o,W:()=>i});var n=r(23400);function i(e){return function(t,r){var i=(0,n.mC)(t),o=(0,n.mC)(r),a=e(i*o);return[a*o*(0,n.O$)(t),a*(0,n.O$)(r)]}}function o(e){return function(t,r){var i=(0,n._b)(t*t+r*r),o=e(i),a=(0,n.O$)(o),s=(0,n.mC)(o);return[(0,n.fv)(t*a,i*s),(0,n.ZR)(i&&r*a/i)]}}},55825:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s,l:()=>a});var n=r(23400),i=r(26554),o=r(43792),a=(0,i.W)((function(e){return(0,n._b)(2/(1+e))}));function s(){return(0,o.Z)(a).scale(124.75).clipAngle(179.999)}a.invert=(0,i.O)((function(e){return 2*(0,n.ZR)(e/2)}))},10136:(e,t,r)=>{"use strict";r.d(t,{N:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792),a=(0,i.W)((function(e){return(e=(0,n.Kh)(e))&&e/(0,n.O$)(e)}));function s(){return(0,o.Z)(a).scale(79.4188).clipAngle(179.999)}a.invert=(0,i.O)((function(e){return e}))},85592:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,k:()=>i});var n=r(43792);function i(e,t){return[e,t]}function o(){return(0,n.Z)(i).scale(152.63)}i.invert=i},90759:(e,t,r)=>{"use strict";r.d(t,{V6:()=>l,mF:()=>s,qg:()=>a,rf:()=>c});var n=r(93321),i=r(54438);function o(e,t,r){var o=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=o&&e.clipExtent(null),(0,n.Z)(r,e.stream(i.Z)),t(i.Z.result()),null!=o&&e.clipExtent(o),e}function a(e,t,r){return o(e,(function(r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),a=+t[0][0]+(n-o*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])}),r)}function s(e,t,r){return a(e,[[0,0],t],r)}function l(e,t,r){return o(e,(function(r){var n=+t,i=n/(r[1][0]-r[0][0]),o=(n-i*(r[1][0]+r[0][0]))/2,a=-i*r[0][1];e.scale(150*i).translate([o,a])}),r)}function c(e,t,r){return o(e,(function(r){var n=+t,i=n/(r[1][1]-r[0][1]),o=-i*r[0][0],a=(n-i*(r[1][1]+r[0][1]))/2;e.scale(150*i).translate([o,a])}),r)}},60597:(e,t,r)=>{"use strict";r.d(t,{M:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792);function a(e,t){var r=(0,n.mC)(t),i=(0,n.mC)(e)*r;return[r*(0,n.O$)(e)/i,(0,n.O$)(t)/i]}function s(){return(0,o.Z)(a).scale(144.049).clipAngle(60)}a.invert=(0,i.O)(n.z4)},43792:(e,t,r)=>{"use strict";r.d(t,{Z:()=>x,r:()=>b});var n=r(81592),i=r(27950),o=r(30511),a=r(23446),s=r(26182),l=r(23400),c=r(83706),u=r(70372),d=r(90759),f=r(68299),h=16,p=(0,l.mC)(30*l.uR);function m(e,t){return+t?function(e,t){function r(n,i,o,a,s,c,u,d,f,h,m,g,v,y){var x=u-n,b=d-i,w=x*x+b*b;if(w>4*t&&v--){var _=a+h,k=s+m,S=c+g,T=(0,l._b)(_*_+k*k+S*S),M=(0,l.ZR)(S/=T),C=(0,l.Wn)((0,l.Wn)(S)-1)t||(0,l.Wn)((x*O+b*P)/w-.5)>.3||a*h+s*m+c*g2?e[2]%360*l.uR:0,U()):[E*l.RW,I*l.RW,O*l.RW]},B.angle=function(e){return arguments.length?(P=e%360*l.uR,U()):P*l.RW},B.reflectX=function(e){return arguments.length?(R=e?-1:1,U()):R<0},B.reflectY=function(e){return arguments.length?(L=e?-1:1,U()):L<0},B.precision=function(e){return arguments.length?(x=m(b,F=e*e),V()):(0,l._b)(F)},B.fitExtent=function(e,t){return(0,d.qg)(B,e,t)},B.fitSize=function(e,t){return(0,d.mF)(B,e,t)},B.fitWidth=function(e,t){return(0,d.V6)(B,e,t)},B.fitHeight=function(e,t){return(0,d.rf)(B,e,t)},function(){return t=e.apply(this,arguments),B.invert=t.invert&&Z,U()}}},47772:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,Z:()=>a});var n=r(43792),i=r(23400);function o(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function a(){return(0,n.Z)(o).scale(175.295)}o.invert=function(e,t){var r,n=t,o=25;do{var a=n*n,s=a*a;n-=r=(n*(1.007226+a*(.015085+s*(.028874*a-.044475-.005916*s)))-t)/(1.007226+a*(.045255+s*(.259866*a-.311325-.005916*11*s)))}while((0,i.Wn)(r)>i.Ho&&--o>0);return[e/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]}},72271:(e,t,r)=>{"use strict";r.d(t,{I:()=>a,Z:()=>s});var n=r(23400),i=r(26554),o=r(43792);function a(e,t){return[(0,n.mC)(t)*(0,n.O$)(e),(0,n.O$)(t)]}function s(){return(0,o.Z)(a).scale(249.5).clipAngle(90+n.Ho)}a.invert=(0,i.O)(n.ZR)},83706:(e,t,r)=>{"use strict";r.d(t,{I:()=>a,Z:()=>u});var n=r(23446),i=r(23400);function o(e,t){return[(0,i.Wn)(e)>i.pi?e+Math.round(-e/i.BZ)*i.BZ:e,t]}function a(e,t,r){return(e%=i.BZ)?t||r?(0,n.Z)(l(e),c(t,r)):l(e):t||r?c(t,r):o}function s(e){return function(t,r){return[(t+=e)>i.pi?t-i.BZ:t<-i.pi?t+i.BZ:t,r]}}function l(e){var t=s(e);return t.invert=s(-e),t}function c(e,t){var r=(0,i.mC)(e),n=(0,i.O$)(e),o=(0,i.mC)(t),a=(0,i.O$)(t);function s(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*r+l*n;return[(0,i.fv)(c*o-d*a,l*r-u*n),(0,i.ZR)(d*o+c*a)]}return s.invert=function(e,t){var s=(0,i.mC)(t),l=(0,i.mC)(e)*s,c=(0,i.O$)(e)*s,u=(0,i.O$)(t),d=u*o-c*a;return[(0,i.fv)(c*o+u*a,l*r+d*n),(0,i.ZR)(d*r-l*n)]},s}function u(e){function t(t){return(t=e(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t}return e=a(e[0]*i.uR,e[1]*i.uR,e.length>2?e[2]*i.uR:0),t.invert=function(t){return(t=e.invert(t[0]*i.uR,t[1]*i.uR))[0]*=i.RW,t[1]*=i.RW,t},t}o.invert=o},93321:(e,t,r)=>{"use strict";function n(e,t){e&&o.hasOwnProperty(e.type)&&o[e.type](e,t)}r.d(t,{Z:()=>l});var i={Feature:function(e,t){n(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,o=r.length;++i{"use strict";function n(e){return{stream:i(e)}}function i(e){return function(t){var r=new o;for(var n in e)r[n]=e[n];return r.stream=t,r}}function o(){}r.d(t,{Z:()=>n,l:()=>i}),o.prototype={constructor:o,point:function(e,t){this.stream.point(e,t)},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()}}},23554:(e,t,r)=>{"use strict";function n(e,t){return e.parent===t.parent?1:2}function i(e,t){return e+t.x}function o(e,t){return Math.max(e,t.y)}function a(){var e=n,t=1,r=1,a=!1;function s(n){var s,l=0;n.eachAfter((function(t){var r=t.children;r?(t.x=function(e){return e.reduce(i,0)/e.length}(r),t.y=function(e){return 1+e.reduce(o,0)}(r)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(n),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(n),d=c.x-e(c,u)/2,f=u.x+e(u,c)/2;return n.eachAfter(a?function(e){e.x=(e.x-n.x)*t,e.y=(n.y-e.y)*r}:function(e){e.x=(e.x-d)/(f-d)*t,e.y=(1-(n.y?e.y/n.y:1))*r})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(a=!1,t=+e[0],r=+e[1],s):a?null:[t,r]},s.nodeSize=function(e){return arguments.length?(a=!0,t=+e[0],r=+e[1],s):a?[t,r]:null},s}function s(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function l(e,t){var r,n,i,o,a,s=new f(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=c);r=u.pop();)if(l&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)u.push(n=r.children[o]=new f(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(d)}function c(e){return e.children}function u(e){e.data=e.data.data}function d(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function f(e){this.data=e,this.depth=this.height=0,this.parent=null}r.r(t),r.d(t,{cluster:()=>a,hierarchy:()=>l,pack:()=>P,packEnclose:()=>p,packSiblings:()=>C,partition:()=>N,stratify:()=>H,tree:()=>$,treemap:()=>re,treemapBinary:()=>ne,treemapDice:()=>z,treemapResquarify:()=>oe,treemapSlice:()=>J,treemapSliceDice:()=>ie,treemapSquarify:()=>te}),f.prototype=l.prototype={constructor:f,count:function(){return this.eachAfter(s)},each:function(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;e=r.pop(),t=n.pop();for(;e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return l(this).eachBefore(u)}};var h=Array.prototype.slice;function p(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(h.call(e))).length,o=[];n0&&r*r>n*n+i*i}function y(e,t){for(var r=0;r(a*=a)?(n=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-n*n)),r.x=e.x-n*s-o*l,r.y=e.y-n*l+o*s):(n=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-n*n)),r.x=t.x+n*s-o*l,r.y=t.y+n*l+o*s)):(r.x=t.x+r.r,r.y=t.y)}function k(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function S(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function T(e){this._=e,this.next=null,this.previous=null}function M(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;_(r,t,n=e[2]),t=new T(t),r=new T(r),n=new T(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;s0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=A(t),r):e},r.parentId=function(e){return arguments.length?(t=A(e),r):t},r}function W(e,t){return e.parent===t.parent?1:2}function G(e){var t=e.children;return t?t[0]:e.t}function q(e){var t=e.children;return t?t[t.length-1]:e.t}function Y(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function X(e,t,r){return e.a.parent===t.parent?e.a:r}function K(e,t){this._=e,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=t}function $(){var e=W,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,o,a=new K(e,0),s=[a];t=s.pop();)if(n=t._.children)for(t.children=new Array(o=n.length),i=o-1;i>=0;--i)s.push(r=t.children[i]=new K(n[i],i)),r.parent=t;return(a.parent=new K(null,0)).children=[a],a}(i);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),n)i.eachBefore(s);else{var c=i,u=i,d=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>d.depth&&(d=e)}));var f=c===u?1:e(c,u)/2,h=f-c.x,p=t/(u.x+f+h),m=r/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*m}))}return i}function o(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var o=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,o=t,a=t,s=r,l=o.parent.children[0],c=o.m,u=a.m,d=s.m,f=l.m;s=q(s),o=G(o),s&&o;)l=G(l),(a=q(a)).a=t,(i=s.z+d-o.z-c+e(s._,o._))>0&&(Y(X(s,t,n),t,i),c+=i,u+=i),d+=s.m,c+=o.m,f+=l.m,u+=a.m;s&&!q(a)&&(a.t=s,a.m+=d-u),o&&!G(l)&&(l.t=o,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i}function J(e,t,r,n,i){for(var o,a=e.children,s=-1,l=a.length,c=e.value&&(i-r)/e.value;++sf&&(f=s),g=u*u*m,(h=Math.max(f/g,g/d))>p){u-=s;break}p=h}v.push(a={value:u,dice:l1?t:1)},r}(Q);function re(){var e=te,t=!1,r=1,n=1,i=[0],o=E,a=E,s=E,l=E,c=E;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(d),i=[0],t&&e.eachBefore(D),e}function d(t){var r=i[t.depth],n=t.x0+r,u=t.y0+r,d=t.x1-r,f=t.y1-r;d=r-1){var u=s[t];return u.x0=i,u.y0=o,u.x1=a,void(u.y1=l)}var d=c[t],f=n/2+d,h=t+1,p=r-1;for(;h>>1;c[m]l-o){var y=(i*v+a*g)/n;e(t,h,g,i,o,y,l),e(h,r,v,y,o,a,l)}else{var x=(o*v+l*g)/n;e(t,h,g,i,o,a,x),e(h,r,v,i,x,a,l)}}(0,l,e.value,t,r,n,i)}function ie(e,t,r,n,i){(1&e.depth?J:z)(e,t,r,n,i)}const oe=function e(t){function r(e,r,n,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,s,l,c,u,d=-1,f=a.length,h=e.value;++d1?t:1)},r}(Q)},86978:(e,t,r)=>{"use strict";r.d(t,{h5:()=>y});var n=Math.PI,i=2*n,o=1e-6,a=i-o;function s(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new s}s.prototype=l.prototype={constructor:s,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,i,a){e=+e,t=+t,r=+r,i=+i,a=+a;var s=this._x1,l=this._y1,c=r-e,u=i-t,d=s-e,f=l-t,h=d*d+f*f;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>o)if(Math.abs(f*c-u*d)>o&&a){var p=r-s,m=i-l,g=c*c+u*u,v=p*p+m*m,y=Math.sqrt(g),x=Math.sqrt(h),b=a*Math.tan((n-Math.acos((g+h-v)/(2*y*x)))/2),w=b/x,_=b/y;Math.abs(w-1)>o&&(this._+="L"+(e+w*d)+","+(t+w*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>d*m)+","+(this._x1=e+_*c)+","+(this._y1=t+_*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,r,s,l,c){e=+e,t=+t,c=!!c;var u=(r=+r)*Math.cos(s),d=r*Math.sin(s),f=e+u,h=t+d,p=1^c,m=c?s-l:l-s;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>o||Math.abs(this._y1-h)>o)&&(this._+="L"+f+","+h),r&&(m<0&&(m=m%i+i),m>a?this._+="A"+r+","+r+",0,1,"+p+","+(e-u)+","+(t-d)+"A"+r+","+r+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):m>o&&(this._+="A"+r+","+r+",0,"+ +(m>=n)+","+p+","+(this._x1=e+r*Math.cos(l))+","+(this._y1=t+r*Math.sin(l))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};const c=l;var u=Array.prototype.slice;function d(e){return function(){return e}}function f(e){return e[0]}function h(e){return e[1]}function p(e){return e.source}function m(e){return e.target}function g(e){var t=p,r=m,n=f,i=h,o=null;function a(){var a,s=u.call(arguments),l=t.apply(this,s),d=r.apply(this,s);if(o||(o=a=c()),e(o,+n.apply(this,(s[0]=l,s)),+i.apply(this,s),+n.apply(this,(s[0]=d,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(r=e,a):r},a.x=function(e){return arguments.length?(n="function"===typeof e?e:d(+e),a):n},a.y=function(e){return arguments.length?(i="function"===typeof e?e:d(+e),a):i},a.context=function(e){return arguments.length?(o=null==e?null:e,a):o},a}function v(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function y(){return g(v)}},97390:(e,t,r)=>{"use strict";r.d(t,{i$:()=>p,Dq:()=>f,g0:()=>m});var n=r(68545),i=r(6863),o=r(21388),a=r(60302),s=r(34255),l=r(24124);function c(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function u(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function d(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function f(e){var t=e.dateTime,r=e.date,s=e.time,l=e.periods,f=e.days,h=e.shortDays,p=e.months,m=e.shortMonths,v=_(l),y=k(l),x=_(f),b=k(f),w=_(h),te=k(h),we=_(p),Re=k(p),Le=_(m),je=k(m),De={a:function(e){return h[e.getDay()]},A:function(e){return f[e.getDay()]},b:function(e){return m[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:H,e:H,f:X,g:ae,G:le,H:W,I:G,j:q,L:Y,m:K,M:$,p:function(e){return l[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Oe,s:Pe,S:J,u:Q,U:ee,V:re,w:ne,W:ie,x:null,X:null,y:oe,Y:se,Z:ce,"%":Ie},ze={a:function(e){return h[e.getUTCDay()]},A:function(e){return f[e.getUTCDay()]},b:function(e){return m[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:ue,e:ue,f:me,g:Me,G:Ae,H:de,I:fe,j:he,L:pe,m:ge,M:ve,p:function(e){return l[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Oe,s:Pe,S:ye,u:xe,U:be,V:_e,w:ke,W:Se,x:null,X:null,y:Te,Y:Ce,Z:Ee,"%":Ie},Ne={a:function(e,t,r){var n=w.exec(t.slice(r));return n?(e.w=te[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.m=je[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=we.exec(t.slice(r));return n?(e.m=Re[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Ze(e,t,r,n)},d:L,e:L,f:B,g:I,G:E,H:D,I:D,j:j,L:F,m:R,M:z,p:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.p=y[n[0].toLowerCase()],r+n[0].length):-1},q:P,Q:U,s:V,S:N,u:T,U:M,V:C,w:S,W:A,x:function(e,t,n){return Ze(e,r,t,n)},X:function(e,t,r){return Ze(e,s,t,r)},y:I,Y:E,Z:O,"%":Z};function Fe(e,t){return function(r){var n,i,o,a=[],s=-1,l=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in f||(f.w=1),"Z"in f?(l=(s=u(d(f.y,0,1))).getUTCDay(),s=l>4||0===l?n.l6.ceil(s):(0,n.l6)(s),s=i.Z.offset(s,7*(f.V-1)),f.y=s.getUTCFullYear(),f.m=s.getUTCMonth(),f.d=s.getUTCDate()+(f.w+6)%7):(l=(s=c(d(f.y,0,1))).getDay(),s=l>4||0===l?o.wA.ceil(s):(0,o.wA)(s),s=a.Z.offset(s,7*(f.V-1)),f.y=s.getFullYear(),f.m=s.getMonth(),f.d=s.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),l="Z"in f?u(d(f.y,0,1)).getUTCDay():c(d(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(l+5)%7:f.w+7*f.U-(l+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,u(f)):c(f)}}function Ze(e,t,r,n){for(var i,o,a=0,s=t.length,l=r.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=Ne[i in g?t.charAt(a++):i])||(n=o(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return De.x=Fe(r,De),De.X=Fe(s,De),De.c=Fe(t,De),ze.x=Fe(r,ze),ze.X=Fe(s,ze),ze.c=Fe(t,ze),{format:function(e){var t=Fe(e+="",De);return t.toString=function(){return e},t},parse:function(e){var t=Be(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Fe(e+="",ze);return t.toString=function(){return e},t},utcParse:function(e){var t=Be(e+="",!0);return t.toString=function(){return e},t}}}var h,p,m,g={"-":"",_:" ",0:"0"},v=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o68?1900:2e3),r+n[0].length):-1}function O(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function P(e,t,r){var n=v.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function R(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function L(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function j(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function D(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function z(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N(e,t,r){var n=v.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function F(e,t,r){var n=v.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function B(e,t,r){var n=v.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Z(e,t,r){var n=y.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function U(e,t,r){var n=v.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function V(e,t,r){var n=v.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function H(e,t){return b(e.getDate(),t,2)}function W(e,t){return b(e.getHours(),t,2)}function G(e,t){return b(e.getHours()%12||12,t,2)}function q(e,t){return b(1+a.Z.count((0,s.Z)(e),e),t,3)}function Y(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return Y(e,t)+"000"}function K(e,t){return b(e.getMonth()+1,t,2)}function $(e,t){return b(e.getMinutes(),t,2)}function J(e,t){return b(e.getSeconds(),t,2)}function Q(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(o.OM.count((0,s.Z)(e)-1,e),t,2)}function te(e){var t=e.getDay();return t>=4||0===t?(0,o.bL)(e):o.bL.ceil(e)}function re(e,t){return e=te(e),b(o.bL.count((0,s.Z)(e),e)+(4===(0,s.Z)(e).getDay()),t,2)}function ne(e){return e.getDay()}function ie(e,t){return b(o.wA.count((0,s.Z)(e)-1,e),t,2)}function oe(e,t){return b(e.getFullYear()%100,t,2)}function ae(e,t){return b((e=te(e)).getFullYear()%100,t,2)}function se(e,t){return b(e.getFullYear()%1e4,t,4)}function le(e,t){var r=e.getDay();return b((e=r>=4||0===r?(0,o.bL)(e):o.bL.ceil(e)).getFullYear()%1e4,t,4)}function ce(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function ue(e,t){return b(e.getUTCDate(),t,2)}function de(e,t){return b(e.getUTCHours(),t,2)}function fe(e,t){return b(e.getUTCHours()%12||12,t,2)}function he(e,t){return b(1+i.Z.count((0,l.Z)(e),e),t,3)}function pe(e,t){return b(e.getUTCMilliseconds(),t,3)}function me(e,t){return pe(e,t)+"000"}function ge(e,t){return b(e.getUTCMonth()+1,t,2)}function ve(e,t){return b(e.getUTCMinutes(),t,2)}function ye(e,t){return b(e.getUTCSeconds(),t,2)}function xe(e){var t=e.getUTCDay();return 0===t?7:t}function be(e,t){return b(n.Ox.count((0,l.Z)(e)-1,e),t,2)}function we(e){var t=e.getUTCDay();return t>=4||0===t?(0,n.hB)(e):n.hB.ceil(e)}function _e(e,t){return e=we(e),b(n.hB.count((0,l.Z)(e),e)+(4===(0,l.Z)(e).getUTCDay()),t,2)}function ke(e){return e.getUTCDay()}function Se(e,t){return b(n.l6.count((0,l.Z)(e)-1,e),t,2)}function Te(e,t){return b(e.getUTCFullYear()%100,t,2)}function Me(e,t){return b((e=we(e)).getUTCFullYear()%100,t,2)}function Ce(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Ae(e,t){var r=e.getUTCDay();return b((e=r>=4||0===r?(0,n.hB)(e):n.hB.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ee(){return"+0000"}function Ie(){return"%"}function Oe(e){return+e}function Pe(e){return Math.floor(+e/1e3)}h=f({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"]}),p=h.format,h.parse,m=h.utcFormat,h.utcParse},60302:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a,a:()=>s});var n=r(60211),i=r(93607),o=(0,n.Z)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.UD}),(function(e){return e.getDate()-1}));const a=o;var s=o.range},93607:(e,t,r)=>{"use strict";r.d(t,{UD:()=>a,Y2:()=>o,Ym:()=>n,iM:()=>s,yB:()=>i});var n=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},37747:(e,t,r)=>{"use strict";r.r(t),r.d(t,{timeDay:()=>v.Z,timeDays:()=>v.a,timeFriday:()=>y.mC,timeFridays:()=>y.b$,timeHour:()=>m,timeHours:()=>g,timeInterval:()=>n.Z,timeMillisecond:()=>o,timeMilliseconds:()=>a,timeMinute:()=>f,timeMinutes:()=>h,timeMonday:()=>y.wA,timeMondays:()=>y.bJ,timeMonth:()=>b,timeMonths:()=>w,timeSaturday:()=>y.EY,timeSaturdays:()=>y.Ff,timeSecond:()=>c,timeSeconds:()=>u,timeSunday:()=>y.OM,timeSundays:()=>y.vm,timeThursday:()=>y.bL,timeThursdays:()=>y.$t,timeTuesday:()=>y.sy,timeTuesdays:()=>y.aU,timeWednesday:()=>y.zg,timeWednesdays:()=>y.Ld,timeWeek:()=>y.OM,timeWeeks:()=>y.vm,timeYear:()=>_.Z,timeYears:()=>_.g,utcDay:()=>E.Z,utcDays:()=>E.y,utcFriday:()=>I.QQ,utcFridays:()=>I.fz,utcHour:()=>C,utcHours:()=>A,utcMillisecond:()=>o,utcMilliseconds:()=>a,utcMinute:()=>S,utcMinutes:()=>T,utcMonday:()=>I.l6,utcMondays:()=>I.$3,utcMonth:()=>P,utcMonths:()=>R,utcSaturday:()=>I.g4,utcSaturdays:()=>I.Q_,utcSecond:()=>c,utcSeconds:()=>u,utcSunday:()=>I.Ox,utcSundays:()=>I.SU,utcThursday:()=>I.hB,utcThursdays:()=>I.xj,utcTuesday:()=>I.J1,utcTuesdays:()=>I.DK,utcWednesday:()=>I.b3,utcWednesdays:()=>I.uy,utcWeek:()=>I.Ox,utcWeeks:()=>I.SU,utcYear:()=>L.Z,utcYears:()=>L.D});var n=r(60211),i=(0,n.Z)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,n.Z)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};const o=i;var a=i.range,s=r(93607),l=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*s.Ym)}),(function(e,t){return(t-e)/s.Ym}),(function(e){return e.getUTCSeconds()}));const c=l;var u=l.range,d=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getMinutes()}));const f=d;var h=d.range,p=(0,n.Z)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*s.Ym-e.getMinutes()*s.yB)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getHours()}));const m=p;var g=p.range,v=r(60302),y=r(21388),x=(0,n.Z)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const b=x;var w=x.range,_=r(34255),k=(0,n.Z)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s.yB)}),(function(e,t){return(t-e)/s.yB}),(function(e){return e.getUTCMinutes()}));const S=k;var T=k.range,M=(0,n.Z)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*s.Y2)}),(function(e,t){return(t-e)/s.Y2}),(function(e){return e.getUTCHours()}));const C=M;var A=M.range,E=r(6863),I=r(68545),O=(0,n.Z)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const P=O;var R=O.range,L=r(24124)},60211:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=new Date,i=new Date;function o(e,t,r,a){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},s.round=function(e){var t=s(e),r=s.ceil(e);return e-t0))return a;do{a.push(o=new Date(+r)),t(r,i),e(r)}while(o=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(s.count=function(t,o){return n.setTime(+t),i.setTime(+o),e(n),e(i),Math.floor(r(n,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e===0}:function(t){return s.count(0,t)%e===0}):s:null}),s}},6863:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a,y:()=>s});var n=r(60211),i=r(93607),o=(0,n.Z)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/i.UD}),(function(e){return e.getUTCDate()-1}));const a=o;var s=o.range},68545:(e,t,r)=>{"use strict";r.d(t,{$3:()=>p,DK:()=>m,J1:()=>l,Ox:()=>a,QQ:()=>d,Q_:()=>x,SU:()=>h,b3:()=>c,fz:()=>y,g4:()=>f,hB:()=>u,l6:()=>s,uy:()=>g,xj:()=>v});var n=r(60211),i=r(93607);function o(e){return(0,n.Z)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/i.iM}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),d=o(5),f=o(6),h=a.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=f.range},24124:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,Z:()=>o});var n=r(60211),i=(0,n.Z)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.Z)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};const o=i;var a=i.range},21388:(e,t,r)=>{"use strict";r.d(t,{$t:()=>v,EY:()=>f,Ff:()=>x,Ld:()=>g,OM:()=>a,aU:()=>m,b$:()=>y,bJ:()=>p,bL:()=>u,mC:()=>d,sy:()=>l,vm:()=>h,wA:()=>s,zg:()=>c});var n=r(60211),i=r(93607);function o(e){return(0,n.Z)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*i.yB)/i.iM}))}var a=o(0),s=o(1),l=o(2),c=o(3),u=o(4),d=o(5),f=o(6),h=a.range,p=s.range,m=l.range,g=c.range,v=u.range,y=d.range,x=f.range},34255:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,g:()=>a});var n=r(60211),i=(0,n.Z)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,n.Z)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};const o=i;var a=i.range},5150:(e,t,r)=>{"use strict";var n=r(82926)(),i=r(28476),o=n&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(c){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=r(56103);e.exports=function(e,t,r){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new s("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===n&&d?d.enumerable:!n,value:r,writable:null===i&&d?d.writable:!i});else{if(!u&&(n||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},89959:(e,t,r)=>{"use strict";var n=r(66328),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(5150),l=r(82926)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!==typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;l?s(e,t,r,!0):s(e,t,r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s{"use strict";e.exports=function(){for(var e=0;e{"use strict";e.exports=n;var t=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(e,n){Array.isArray(e)&&(e=e.join(", "));var o,a={},s=16,l=.05;n&&(2===n.length&&"number"===typeof n[0]?o=i(n):Array.isArray(n)?o=n:(n.o?o=i(n.o):n.pairs&&(o=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),o||(o=r),t.font=s+"px "+e;for(var c=0;cs*l){var h=(f-d)/s;a[u]=1e3*h}}return a}function i(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{var n=r(59403),i=r(98358),o={M:"moveTo",C:"bezierCurveTo"};e.exports=function(e,t){e.beginPath(),i(n(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[o[r]].apply(e,n)})),e.closePath()}},98358:e=>{var t=Math.PI,r=s(120);function n(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,i,o){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}function o(e,n,i,s,l,c,u,d,f,h){if(h)k=h[0],S=h[1],w=h[2],_=h[3];else{var p=a(e,n,-l);e=p.x,n=p.y;var m=(e-(d=(p=a(d,f,-l)).x))/2,g=(n-(f=p.y))/2,v=m*m/(i*i)+g*g/(s*s);v>1&&(i*=v=Math.sqrt(v),s*=v);var y=i*i,x=s*s,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var w=b*i*g/s+(e+d)/2,_=b*-s*m/i+(n+f)/2,k=Math.asin(((n-_)/s).toFixed(9)),S=Math.asin(((f-_)/s).toFixed(9));(k=eS&&(k-=2*t),!u&&S>k&&(S-=2*t)}if(Math.abs(S-k)>r){var T=S,M=d,C=f;S=k+r*(u&&S>k?1:-1);var A=o(d=w+i*Math.cos(S),f=_+s*Math.sin(S),i,s,l,0,u,M,C,[S,T,w,_])}var E=Math.tan((S-k)/4),I=4/3*i*E,O=4/3*s*E,P=[2*e-(e+I*Math.sin(k)),2*n-(n-O*Math.cos(k)),d+I*Math.sin(S),f-O*Math.cos(S),d,f];if(h)return P;A&&(P=P.concat(A));for(var R=0;R7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var x=h,b=p;"C"!=t&&"S"!=t||(x+=x-a,b+=b-l),v=["C",x,b,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(d=2*h-d,f=2*p-f):(d=h,f=p),v=i(h,p,d,f,v[1],v[2]);break;case"Q":d=v[1],f=v[2],v=i(h,p,v[1],v[2],v[3],v[4]);break;case"L":v=n(h,p,v[1],v[2]);break;case"H":v=n(h,p,v[1],p);break;case"V":v=n(h,p,h,v[1]);break;case"Z":v=n(h,p,c,u)}t=y,h=v[v.length-2],p=v[v.length-1],v.length>4?(a=v[v.length-4],l=v[v.length-3]):(a=h,l=p),r.push(v)}return r}},2166:e=>{e.exports=function(e){switch(e){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}}},28638:e=>{"use strict";function t(e,r,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o0)return function(e,t){var r,n;for(r=new Array(e),n=0;n{"use strict";function t(e,t,n){n=n||2;var o,a,s,l,d,f,p,m=t&&t.length,g=m?t[0]*n:e.length,v=r(e,0,g,n,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(e,t,n,i){var o,a,s,l=[];for(o=0,a=t.length;o80*n){o=s=e[0],a=l=e[1];for(var x=n;xs&&(s=d),f>l&&(l=f);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,y,n,o,a,p,0),y}function r(e,t,r,n,i){var o,a;if(i===M(e,t,r,n)>0)for(o=t;o=t;o-=n)a=k(o,e[o],e[o+1],a);return a&&v(a,a.next)&&(S(a),a=a.next),a}function n(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function i(e,t,r,c,u,d,h){if(e){!h&&d&&function(e,t,r,n){var i=e;do{0===i.z&&(i.z=f(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1)}(i)}(e,c,u,d);for(var p,m,g=e;e.prev!==e.next;)if(p=e.prev,m=e.next,d?a(e,c,u,d):o(e))t.push(p.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),S(e),e=m.next,g=m.next;else if((e=m)===g){h?1===h?i(e=s(n(e),t,r),t,r,c,u,d,2):2===h&&l(e,t,r,c,u,d):i(n(e),t,r,c,u,d,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(g(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,s=t.y,l=r.y,c=n.y,u=io?i>a?i:a:o>a?o:a,h=s>l?s>c?s:c:l>c?l:c,m=n.next;m!==t;){if(m.x>=u&&m.x<=f&&m.y>=d&&m.y<=h&&p(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,r,n){var i=e.prev,o=e,a=e.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,d=o.y,h=a.y,m=sl?s>c?s:c:l>c?l:c,x=u>d?u>h?u:h:d>h?d:h,b=f(m,v,t,r,n),w=f(y,x,t,r,n),_=e.prevZ,k=e.nextZ;_&&_.z>=b&&k&&k.z<=w;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==i&&_!==a&&p(s,u,l,d,c,h,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,k.x>=m&&k.x<=y&&k.y>=v&&k.y<=x&&k!==i&&k!==a&&p(s,u,l,d,c,h,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;_&&_.z>=b;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==i&&_!==a&&p(s,u,l,d,c,h,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;k&&k.z<=w;){if(k.x>=m&&k.x<=y&&k.y>=v&&k.y<=x&&k!==i&&k!==a&&p(s,u,l,d,c,h,k.x,k.y)&&g(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function s(e,t,r){var i=e;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(t.push(o.i/r|0),t.push(i.i/r|0),t.push(a.i/r|0),S(i),S(i.next),i=e=a),i=i.next}while(i!==e);return n(i)}function l(e,t,r,o,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),i(l,t,r,o,a,s,0),void i(u,t,r,o,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){var r=function(e,t){var r,n=t,i=e.x,o=e.y,a=-1/0;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a&&(a=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&p(or.x||n.x===r.x&&d(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var i=_(r,e);return n(i,i.next),n(r,r.next)}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function h(e){var t=e,r=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(n-s)>=(r-a)*(t-s)&&(r-a)*(o-s)>=(i-a)*(n-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&y(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{r.y>o!==r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||v(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,r,n){var i=b(g(e,t,r)),o=b(g(e,t,n)),a=b(g(r,n,e)),s=b(g(r,n,t));return i!==o&&a!==s||(!(0!==i||!x(e,r,t))||(!(0!==o||!x(e,n,t))||(!(0!==a||!x(r,e,n))||!(0!==s||!x(r,t,n)))))}function x(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function w(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function _(e,t){var r=new T(e.i,e.x,e.y),n=new T(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function k(e,t,r,n){var i=new T(e,t,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 S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function T(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,r,n){for(var i=0,o=t,a=r-n;o0&&(n+=e[i-1].length,r.holes.push(n))}return r}},30544:(e,t,r)=>{var n=r(47978);e.exports=function(e,t){var r,i=[],o=[],a=[],s={},l=[];function c(e){a[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],a[t]&&c(t)}))}function u(e){var t,n,i=!1;for(o.push(e),a[e]=!0,t=0;t=t}))}(t);for(var r,i=n(e).components.filter((function(e){return e.length>1})),o=1/0,a=0;a{"use strict";var n=r(98583);e.exports=function(){return n(this).length=0,this}},21282:(e,t,r)=>{"use strict";e.exports=r(32542)()?Array.from:r(97057)},32542:e=>{"use strict";e.exports=function(){var e,t,r=Array.from;return"function"===typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},97057:(e,t,r)=>{"use strict";var n=r(79598).iterator,i=r(53315),o=r(11436),a=r(97350),s=r(72444),l=r(98583),c=r(52141),u=r(37800),d=Array.isArray,f=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;e.exports=function(e){var t,r,m,g,v,y,x,b,w,_,k=arguments[1],S=arguments[2];if(e=Object(l(e)),c(k)&&s(k),this&&this!==Array&&o(this))t=this;else{if(!k){if(i(e))return 1!==(v=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(d(e)){for(g=new Array(v=e.length),r=0;r=55296&&y<=56319&&(_+=e[++r]),_=k?f.call(k,S,_,m):_,t?(h.value=_,p(g,m,h)):g[m]=_,++m;v=m}if(void 0===v)for(v=a(e.length),t&&(g=new t(v)),r=0;r{"use strict";var t=Object.prototype.toString,r=t.call(function(){return arguments}());e.exports=function(e){return t.call(e)===r}},11436:e=>{"use strict";var t=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"===typeof e&&r(t.call(e))}},52169:e=>{"use strict";e.exports=function(){}},85377:(e,t,r)=>{"use strict";e.exports=r(29408)()?Math.sign:r(30532)},29408:e=>{"use strict";e.exports=function(){var e=Math.sign;return"function"===typeof e&&(1===e(10)&&-1===e(-20))}},30532:e=>{"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},35580:(e,t,r)=>{"use strict";var n=r(85377),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},97350:(e,t,r)=>{"use strict";var n=r(35580),i=Math.max;e.exports=function(e){return i(0,n(e))}},43192:(e,t,r)=>{"use strict";var n=r(72444),i=r(98583),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,c){var u,d=arguments[2],f=arguments[3];return r=Object(i(r)),n(c),u=s(r),f&&u.sort("function"===typeof f?o.call(f,r):void 0),"function"!==typeof e&&(e=u[e]),a.call(e,u,(function(e,n){return l.call(r,e)?a.call(c,d,r[e],e,r,n):t}))}}},30402:(e,t,r)=>{"use strict";e.exports=r(65188)()?Object.assign:r(83612)},65188:e=>{"use strict";e.exports=function(){var e,t=Object.assign;return"function"===typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},83612:(e,t,r)=>{"use strict";var n=r(94785),i=r(98583),o=Math.max;e.exports=function(e,t){var r,a,s,l=o(arguments.length,2);for(e=Object(i(e)),s=function(n){try{e[n]=t[n]}catch(i){r||(r=i)}},a=1;a{"use strict";var n=r(21282),i=r(30402),o=r(98583);e.exports=function(e){var t=Object(o(e)),r=arguments[1],a=Object(arguments[2]);if(t!==e&&!r)return t;var s={};return r?n(r,(function(t){(a.ensure||t in e)&&(s[t]=e[t])})):i(s,e),s}},72663:(e,t,r)=>{"use strict";var n,i=Object.create;r(74456)()||(n=r(76724)),e.exports=function(){var e,t,r;return n?1!==n.level?i:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){t[e]="__proto__"!==e?r:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(e,t),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(t,r){return i(null===t?e:t,r)}):i}()},7697:(e,t,r)=>{"use strict";e.exports=r(43192)("forEach")},87392:(e,t,r)=>{"use strict";var n=r(52141),i={function:!0,object:!0};e.exports=function(e){return n(e)&&i[typeof e]||!1}},52141:(e,t,r)=>{"use strict";var n=r(52169)();e.exports=function(e){return e!==n&&null!==e}},94785:(e,t,r)=>{"use strict";e.exports=r(67945)()?Object.keys:r(34740)},67945:e=>{"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},34740:(e,t,r)=>{"use strict";var n=r(52141),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},74157:(e,t,r)=>{"use strict";var n=r(72444),i=r(7697),o=Function.prototype.call;e.exports=function(e,t){var r={},a=arguments[2];return n(t),i(e,(function(e,n,i,s){r[n]=o.call(t,a,e,n,i,s)})),r}},65843:(e,t,r)=>{"use strict";var n=r(52141),i=Array.prototype.forEach,o=Object.create;e.exports=function(e){var t=o(null);return i.call(arguments,(function(e){n(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t}},26202:(e,t,r)=>{"use strict";e.exports=r(74456)()?Object.setPrototypeOf:r(76724)},74456:e=>{"use strict";var t=Object.create,r=Object.getPrototypeOf,n={};e.exports=function(){var e=Object.setPrototypeOf;return"function"===typeof e&&r(e((arguments[0]||t)(null),n))===n}},76724:(e,t,r)=>{"use strict";var n,i=r(87392),o=r(98583),a=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(e,t){if(o(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,r;return e?(2===e.level?e.set?(r=e.set,t=function(e,t){return r.call(n(e,t),t),e}):t=function(e,t){return n(e,t).__proto__=t,e}:t=function e(t,r){var i;return n(t,r),(i=a.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===r&&(r=e.nullPolyfill),t.__proto__=r,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(e=n.set).call(t,r)}catch(i){}if(Object.getPrototypeOf(t)===r)return{set:e,level:2}}return t.__proto__=r,Object.getPrototypeOf(t)===r?{level:2}:((t={}).__proto__=r,Object.getPrototypeOf(t)===r&&{level:1})}()),r(72663)},72444:e=>{"use strict";e.exports=function(e){if("function"!==typeof e)throw new TypeError(e+" is not a function");return e}},42419:(e,t,r)=>{"use strict";var n=r(87392);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},98583:(e,t,r)=>{"use strict";var n=r(52141);e.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},77009:(e,t,r)=>{"use strict";e.exports=r(45663)()?String.prototype.contains:r(26515)},45663:e=>{"use strict";var t="razdwatrzy";e.exports=function(){return"function"===typeof t.contains&&(!0===t.contains("dwa")&&!1===t.contains("foo"))}},26515:e=>{"use strict";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},37800:e=>{"use strict";var t=Object.prototype.toString,r=t.call("");e.exports=function(e){return"string"===typeof e||e&&"object"===typeof e&&(e instanceof String||t.call(e)===r)||!1}},88959:e=>{"use strict";var t=Object.create(null),r=Math.random;e.exports=function(){var e;do{e=r().toString(36).slice(2)}while(t[e]);return e}},5655:(e,t,r)=>{"use strict";var n,i=r(26202),o=r(77009),a=r(15351),s=r(79598),l=r(27758),c=Object.defineProperty;n=e.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",c(this,"__kind__",a("",t))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(n.prototype,s.toStringTag,a("c","Array Iterator"))},30077:(e,t,r)=>{"use strict";var n=r(53315),i=r(72444),o=r(37800),a=r(17869),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(e,t){var r,u,d,f,h,p,m,g,v=arguments[2];if(s(e)||n(e)?r="array":o(e)?r="string":e=a(e),i(t),d=function(){f=!0},"array"!==r)if("string"!==r)for(u=e.next();!u.done;){if(l.call(t,v,u.value,d),f)return;u=e.next()}else for(p=e.length,h=0;h=55296&&g<=56319&&(m+=e[++h]),l.call(t,v,m,d),!f);++h);else c.call(e,(function(e){return l.call(t,v,e,d),f}))}},17869:(e,t,r)=>{"use strict";var n=r(53315),i=r(37800),o=r(5655),a=r(99576),s=r(33159),l=r(79598).iterator;e.exports=function(e){return"function"===typeof s(e)[l]?e[l]():n(e)?new o(e):i(e)?new a(e):new o(e)}},27758:(e,t,r)=>{"use strict";var n,i=r(99512),o=r(30402),a=r(72444),s=r(98583),l=r(15351),c=r(14578),u=r(79598),d=Object.defineProperty,f=Object.defineProperties;e.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");f(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(a(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,f(n.prototype,o({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,u.iterator,l((function(){return this})))},75613:(e,t,r)=>{"use strict";var n=r(53315),i=r(52141),o=r(37800),a=r(79598).iterator,s=Array.isArray;e.exports=function(e){return!!i(e)&&(!!s(e)||(!!o(e)||(!!n(e)||"function"===typeof e[a])))}},99576:(e,t,r)=>{"use strict";var n,i=r(26202),o=r(15351),a=r(79598),s=r(27758),l=Object.defineProperty;n=e.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",o("",e.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,a.toStringTag,o("c","String Iterator"))},33159:(e,t,r)=>{"use strict";var n=r(75613);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},79598:(e,t,r)=>{"use strict";e.exports=r(55215)()?r(56935).Symbol:r(55879)},55215:(e,t,r)=>{"use strict";var n=r(56935),i={object:!0,symbol:!0};e.exports=function(){var e,t=n.Symbol;if("function"!==typeof t)return!1;e=t("test symbol");try{String(e)}catch(r){return!1}return!!i[typeof t.iterator]&&(!!i[typeof t.toPrimitive]&&!!i[typeof t.toStringTag])}},97602:e=>{"use strict";e.exports=function(e){return!!e&&("symbol"===typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},83126:(e,t,r)=>{"use strict";var n=r(15351),i=Object.create,o=Object.defineProperty,a=Object.prototype,s=i(null);e.exports=function(e){for(var t,r,i=0;s[e+(i||"")];)++i;return s[e+=i||""]=!0,o(a,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},11779:(e,t,r)=>{"use strict";var n=r(15351),i=r(56935).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},33939:(e,t,r)=>{"use strict";var n=r(15351),i=r(14003),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},55879:(e,t,r)=>{"use strict";var n,i,o,a=r(15351),s=r(14003),l=r(56935).Symbol,c=r(83126),u=r(11779),d=r(33939),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"===typeof l)try{String(l()),o=!0}catch(m){}else l=null;i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(e)},e.exports=n=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?l(t):(r=f(i.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},u(n),d(n),h(i.prototype,{constructor:a(n),toString:a("",(function(){return this.__name__}))}),h(n.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,a("",(function(){var e=s(this);return"symbol"===typeof e?e:e.toString()}))),p(n.prototype,n.toStringTag,a("c","Symbol")),p(i.prototype,n.toStringTag,a("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,a("c",n.prototype[n.toPrimitive]))},14003:(e,t,r)=>{"use strict";var n=r(97602);e.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},12492:(e,t,r)=>{"use strict";e.exports=r(36943)()?WeakMap:r(32233)},36943:e=>{"use strict";e.exports=function(){var e,t;if("function"!==typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return"[object WeakMap]"===String(e)&&("function"===typeof e.set&&(e.set({},1)===e&&("function"===typeof e.delete&&("function"===typeof e.has&&"one"===e.get(t)))))}},54817:e=>{"use strict";e.exports="function"===typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},32233:(e,t,r)=>{"use strict";var n,i=r(52141),o=r(26202),a=r(42419),s=r(98583),l=r(88959),c=r(15351),u=r(17869),d=r(30077),f=r(79598).toStringTag,h=r(54817),p=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=n=function(){var e,t=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return e=h&&o&&WeakMap!==n?o(new WeakMap,v(this)):this,i(t)&&(p(t)||(t=u(t))),m(e,"__weakMapData__",c("c","$weakMap$"+l())),t?(d(t,(function(t){s(t),e.set(t[0],t[1])})),e):e},h&&(o&&o(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(e){return!!g.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:c((function(e){if(g.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:c((function(e){return g.call(a(e),this.__weakMapData__)})),set:c((function(e,t){return m(a(e),this.__weakMapData__,c("c",t)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,f,c("c","WeakMap"))},68041:e=>{"use strict";var t,r="object"===typeof Reflect?Reflect:null,n=r&&"function"===typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"===typeof e.on&&m(e,"error",t,r)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,a,c;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=u.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"===typeof l)n(l,this,t);else{var c=l.length,u=p(l,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},20318:e=>{var t=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(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},56935:(e,t,r)=>{"use strict";e.exports=r(37025)()?globalThis:r(20318)},37025:e=>{"use strict";e.exports=function(){return"object"===typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},89806:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!==i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!==i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}},51908:(e,t,r)=>{"use strict";var n=r(20878);e.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0===(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},86749:(e,t,r)=>{var n=r(2166);e.exports=function(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(n(t||"float32"))(c+r));var u=t.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=r;i{"use strict";var n=r(62196),i=[32,126];e.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),o=e.font,a="number"===typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;o&&"string"!==typeof o&&(o=n(o));if(Array.isArray(s)){if(2===s.length&&"number"===typeof s[0]&&"number"===typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),r.width=t[0],r.height=t[1];var d=r.getContext("2d");d.fillStyle="#000",d.fillRect(0,0,r.width,r.height),d.font=o,d.textAlign="center",d.textBaseline="middle",d.fillStyle="#fff";var f=a[0]/2,h=a[1]/2;for(c=0;ct[0]-a[0]/2&&(f=a[0]/2,h+=a[1]);return r}},26249:e=>{"use strict";function t(e,o){o||(o={}),("string"===typeof e||Array.isArray(e))&&(o.family=e);var a=Array.isArray(o.family)?o.family.join(", "):o.family;if(!a)throw Error("`family` must be defined");var s=o.size||o.fontSize||o.em||48,l=o.weight||o.fontWeight||"",c=(e=[o.style||o.fontStyle||"",l,s].join(" ")+"px "+a,o.origin||"top");if(t.cache[a]&&s<=t.cache[a].em)return r(t.cache[a],c);var u=o.canvas||t.canvas,d=u.getContext("2d"),f={upper:void 0!==o.upper?o.upper:"H",lower:void 0!==o.lower?o.lower:"x",descent:void 0!==o.descent?o.descent:"p",ascent:void 0!==o.ascent?o.ascent:"h",tittle:void 0!==o.tittle?o.tittle:"i",overshoot:void 0!==o.overshoot?o.overshoot:"O"},h=Math.ceil(1.5*s);u.height=h,u.width=.5*h,d.font=e;var p="H",m={top:0};d.clearRect(0,0,h,h),d.textBaseline="top",d.fillStyle="black",d.fillText(p,0,0);var g=n(d.getImageData(0,0,h,h));d.clearRect(0,0,h,h),d.textBaseline="bottom",d.fillText(p,0,h);var v=n(d.getImageData(0,0,h,h));m.lineHeight=m.bottom=h-v+g,d.clearRect(0,0,h,h),d.textBaseline="alphabetic",d.fillText(p,0,h);var y=h-n(d.getImageData(0,0,h,h))-1+g;m.baseline=m.alphabetic=y,d.clearRect(0,0,h,h),d.textBaseline="middle",d.fillText(p,0,.5*h);var x=n(d.getImageData(0,0,h,h));m.median=m.middle=h-x-1+g-.5*h,d.clearRect(0,0,h,h),d.textBaseline="hanging",d.fillText(p,0,.5*h);var b=n(d.getImageData(0,0,h,h));m.hanging=h-b-1+g-.5*h,d.clearRect(0,0,h,h),d.textBaseline="ideographic",d.fillText(p,0,h);var w=n(d.getImageData(0,0,h,h));if(m.ideographic=h-w-1+g,f.upper&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.upper,0,0),m.upper=n(d.getImageData(0,0,h,h)),m.capHeight=m.baseline-m.upper),f.lower&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.lower,0,0),m.lower=n(d.getImageData(0,0,h,h)),m.xHeight=m.baseline-m.lower),f.tittle&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.tittle,0,0),m.tittle=n(d.getImageData(0,0,h,h))),f.ascent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.ascent,0,0),m.ascent=n(d.getImageData(0,0,h,h))),f.descent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.descent,0,0),m.descent=i(d.getImageData(0,0,h,h))),f.overshoot){d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(f.overshoot,0,0);var _=i(d.getImageData(0,0,h,h));m.overshoot=_-y}for(var k in m)m[k]/=s;return m.em=s,t.cache[a]=m,r(m,c)}function r(e,t){var r={};for(var n in"string"===typeof t&&(t=e[t]),e)"em"!==n&&(r[n]=e[n]-t);return r}function n(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}e.exports=t,t.canvas=document.createElement("canvas"),t.cache={}},45767:(e,t,r)=>{"use strict";var n=r(8866),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n{"use strict";var n=r(2781);e.exports=Function.prototype.bind||n},91293:e=>{e.exports=function(e,t){if("string"!==typeof e)throw new TypeError("must specify type string");if(t=t||{},"undefined"===typeof document&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"===typeof t.width&&(r.width=t.width);"number"===typeof t.height&&(r.height=t.height);var n,i=t;try{var o=[e];0===e.indexOf("webgl")&&o.push("experimental-"+e);for(var a=0;a{"use strict";var n,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(I){l=null}var c=function(){throw new a},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(t){return c}}}():c,d=r(95520)(),f=r(87593)(),h=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},m="undefined"!==typeof Uint8Array&&h?h(Uint8Array):n,g={"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&d&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&d&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(I){var v=h(h(I));g["%Error.prototype%"]=v}var y=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&h&&(r=h(i.prototype))}return g[t]=r,r},x={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(1199),w=r(26834),_=b.call(Function.call,Array.prototype.concat),k=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),T=b.call(Function.call,String.prototype.slice),M=b.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,E=function(e,t){var r,n=e;if(w(x,n)&&(n="%"+(r=x[n])[0]+"%"),w(g,n)){var o=g[n];if(o===p&&(o=y(n)),"undefined"===typeof o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,C,(function(e,t,r,i){n[n.length]=r?S(i,A,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=E("%"+n+"%",t),s=o.name,c=o.value,u=!1,d=o.alias;d&&(n=d[0],k(r,_([0,1],d)));for(var f=1,h=!0;f=r.length){var y=l(c,p);c=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[p]}else h=w(c,p),c=c[p];h&&!u&&(g[s]=c)}}return c}},22188:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(f*v-h*g)-d*(l*v-c*g)+m*(l*h-c*f),e[1]=-(n*(f*v-h*g)-d*(i*v-o*g)+m*(i*h-o*f)),e[2]=n*(l*v-c*g)-s*(i*v-o*g)+m*(i*c-o*l),e[3]=-(n*(l*h-c*f)-s*(i*h-o*f)+d*(i*c-o*l)),e[4]=-(a*(f*v-h*g)-u*(l*v-c*g)+p*(l*h-c*f)),e[5]=r*(f*v-h*g)-u*(i*v-o*g)+p*(i*h-o*f),e[6]=-(r*(l*v-c*g)-a*(i*v-o*g)+p*(i*c-o*l)),e[7]=r*(l*h-c*f)-a*(i*h-o*f)+u*(i*c-o*l),e[8]=a*(d*v-h*m)-u*(s*v-c*m)+p*(s*h-c*d),e[9]=-(r*(d*v-h*m)-u*(n*v-o*m)+p*(n*h-o*d)),e[10]=r*(s*v-c*m)-a*(n*v-o*m)+p*(n*c-o*s),e[11]=-(r*(s*h-c*d)-a*(n*h-o*d)+u*(n*c-o*s)),e[12]=-(a*(d*g-f*m)-u*(s*g-l*m)+p*(s*f-l*d)),e[13]=r*(d*g-f*m)-u*(n*g-i*m)+p*(n*f-i*d),e[14]=-(r*(s*g-l*m)-a*(n*g-i*m)+p*(n*l-i*s)),e[15]=r*(s*f-l*d)-a*(n*f-i*d)+u*(n*l-i*s),e}},31112:e=>{e.exports=function(e){var t=new Float32Array(16);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}},68696:e=>{e.exports=function(e,t){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}},99902:e=>{e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6817:e=>{e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],m=e[14],g=e[15];return(t*a-r*o)*(d*g-f*m)-(t*s-n*o)*(u*g-f*p)+(t*l-i*o)*(u*m-d*p)+(r*s-n*a)*(c*g-f*h)-(r*l-i*a)*(c*m-d*h)+(n*l-i*s)*(c*p-u*h)}},76778:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r+r,s=n+n,l=i+i,c=r*a,u=n*a,d=n*s,f=i*a,h=i*s,p=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-p,e[1]=u+v,e[2]=f-g,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=h+m,e[7]=0,e[8]=f+g,e[9]=h-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},13315:e=>{e.exports=function(e,t,r){var n,i,o,a=r[0],s=r[1],l=r[2],c=Math.sqrt(a*a+s*s+l*l);if(Math.abs(c)<1e-6)return null;return a*=c=1/c,s*=c,l*=c,n=Math.sin(t),i=Math.cos(t),o=1-i,e[0]=a*a*o+i,e[1]=s*a*o+l*n,e[2]=l*a*o-s*n,e[3]=0,e[4]=a*s*o-l*n,e[5]=s*s*o+i,e[6]=l*s*o+a*n,e[7]=0,e[8]=a*l*o+s*n,e[9]=s*l*o-a*n,e[10]=l*l*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},45722:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=n+n,l=i+i,c=o+o,u=n*s,d=n*l,f=n*c,h=i*l,p=i*c,m=o*c,g=a*s,v=a*l,y=a*c;return e[0]=1-(h+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=f+v,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},30099:e=>{e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},42778:e=>{e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},17607:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},80452:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},53318:e=>{e.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},85317:e=>{e.exports=function(e,t,r,n,i,o,a){var s=1/(r-t),l=1/(i-n),c=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(a+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*c,e[15]=0,e}},26738:e=>{e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},12903:(e,t,r)=>{e.exports={create:r(99902),clone:r(31112),copy:r(68696),identity:r(26738),transpose:r(54636),invert:r(45529),adjoint:r(22188),determinant:r(6817),multiply:r(46632),translate:r(62681),scale:r(53107),rotate:r(9916),rotateX:r(91166),rotateY:r(38313),rotateZ:r(39629),fromRotation:r(13315),fromRotationTranslation:r(45722),fromScaling:r(30099),fromTranslation:r(42778),fromXRotation:r(17607),fromYRotation:r(80452),fromZRotation:r(53318),fromQuat:r(76778),frustum:r(85317),perspective:r(6042),perspectiveFromFieldOfView:r(90701),ortho:r(8130),lookAt:r(50422),str:r(94975)}},45529:e=>{e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,x=r*l-i*a,b=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,S=u*m-d*p,T=u*g-f*p,M=u*v-h*p,C=d*g-f*m,A=d*v-h*m,E=f*v-h*g,I=y*E-x*A+b*C+w*M-_*T+k*S;if(!I)return null;return I=1/I,e[0]=(s*E-l*A+c*C)*I,e[1]=(i*A-n*E-o*C)*I,e[2]=(m*k-g*_+v*w)*I,e[3]=(f*_-d*k-h*w)*I,e[4]=(l*M-a*E-c*T)*I,e[5]=(r*E-i*M+o*T)*I,e[6]=(g*b-p*k-v*x)*I,e[7]=(u*k-f*b+h*x)*I,e[8]=(a*A-s*M+c*S)*I,e[9]=(n*M-r*A-o*S)*I,e[10]=(p*_-m*b+v*y)*I,e[11]=(d*b-u*_-h*y)*I,e[12]=(s*T-a*C-l*S)*I,e[13]=(r*C-n*T+i*S)*I,e[14]=(m*x-p*w-g*y)*I,e[15]=(u*w-d*x+f*y)*I,e}},50422:(e,t,r)=>{var n=r(26738);e.exports=function(e,t,r,i){var o,a,s,l,c,u,d,f,h,p,m=t[0],g=t[1],v=t[2],y=i[0],x=i[1],b=i[2],w=r[0],_=r[1],k=r[2];if(Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-k)<1e-6)return n(e);d=m-w,f=g-_,h=v-k,p=1/Math.sqrt(d*d+f*f+h*h),o=x*(h*=p)-b*(f*=p),a=b*(d*=p)-y*h,s=y*f-x*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0);l=f*s-h*a,c=h*o-d*s,u=d*a-f*o,(p=Math.sqrt(l*l+c*c+u*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0);return e[0]=o,e[1]=l,e[2]=d,e[3]=0,e[4]=a,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=h,e[11]=0,e[12]=-(o*m+a*g+s*v),e[13]=-(l*m+c*g+u*v),e[14]=-(d*m+f*g+h*v),e[15]=1,e}},46632:e=>{e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],w=r[2],_=r[3];return e[0]=x*n+b*s+w*d+_*m,e[1]=x*i+b*l+w*f+_*g,e[2]=x*o+b*c+w*h+_*v,e[3]=x*a+b*u+w*p+_*y,x=r[4],b=r[5],w=r[6],_=r[7],e[4]=x*n+b*s+w*d+_*m,e[5]=x*i+b*l+w*f+_*g,e[6]=x*o+b*c+w*h+_*v,e[7]=x*a+b*u+w*p+_*y,x=r[8],b=r[9],w=r[10],_=r[11],e[8]=x*n+b*s+w*d+_*m,e[9]=x*i+b*l+w*f+_*g,e[10]=x*o+b*c+w*h+_*v,e[11]=x*a+b*u+w*p+_*y,x=r[12],b=r[13],w=r[14],_=r[15],e[12]=x*n+b*s+w*d+_*m,e[13]=x*i+b*l+w*f+_*g,e[14]=x*o+b*c+w*h+_*v,e[15]=x*a+b*u+w*p+_*y,e}},8130:e=>{e.exports=function(e,t,r,n,i,o,a){var s=1/(t-r),l=1/(n-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(a+o)*c,e[15]=1,e}},6042:e=>{e.exports=function(e,t,r,n,i){var o=1/Math.tan(t/2),a=1/(n-i);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*a,e[15]=0,e}},90701:e=>{e.exports=function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),c=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},9916:e=>{e.exports=function(e,t,r,n){var i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A=n[0],E=n[1],I=n[2],O=Math.sqrt(A*A+E*E+I*I);if(Math.abs(O)<1e-6)return null;A*=O=1/O,E*=O,I*=O,i=Math.sin(r),o=Math.cos(r),a=1-o,s=t[0],l=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],m=t[8],g=t[9],v=t[10],y=t[11],x=A*A*a+o,b=E*A*a+I*i,w=I*A*a-E*i,_=A*E*a-I*i,k=E*E*a+o,S=I*E*a+A*i,T=A*I*a+E*i,M=E*I*a-A*i,C=I*I*a+o,e[0]=s*x+d*b+m*w,e[1]=l*x+f*b+g*w,e[2]=c*x+h*b+v*w,e[3]=u*x+p*b+y*w,e[4]=s*_+d*k+m*S,e[5]=l*_+f*k+g*S,e[6]=c*_+h*k+v*S,e[7]=u*_+p*k+y*S,e[8]=s*T+d*M+m*C,e[9]=l*T+f*M+g*C,e[10]=c*T+h*M+v*C,e[11]=u*T+p*M+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},91166:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=o*i+c*n,e[5]=a*i+u*n,e[6]=s*i+d*n,e[7]=l*i+f*n,e[8]=c*i-o*n,e[9]=u*i-a*n,e[10]=d*i-s*n,e[11]=f*i-l*n,e}},38313:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=o*i-c*n,e[1]=a*i-u*n,e[2]=s*i-d*n,e[3]=l*i-f*n,e[8]=o*n+c*i,e[9]=a*n+u*i,e[10]=s*n+d*i,e[11]=l*n+f*i,e}},39629:e=>{e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];t!==e&&(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]);return e[0]=o*i+c*n,e[1]=a*i+u*n,e[2]=s*i+d*n,e[3]=l*i+f*n,e[4]=c*i-o*n,e[5]=u*i-a*n,e[6]=d*i-s*n,e[7]=f*i-l*n,e}},53107:e=>{e.exports=function(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},94975:e=>{e.exports=function(e){return"mat4("+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]+")"}},62681:e=>{e.exports=function(e,t,r){var n,i,o,a,s,l,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+c*g+h*v+t[14],e[15]=a*m+u*g+p*v+t[15]);return e}},54636:e=>{e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},55808:(e,t,r)=>{"use strict";var n=r(77420),i=r(49147),o=r(16136),a=r(93940),s=r(12492),l=r(47367),c=r(99402),u=r(6089),d=r(86840),f=r(23181),h=r(98796),p=r(9126),m=r(2037),g=r(71843),v=r(26249),y=r(86749),x=r(34789).nextPow2,b=new s,w=!1;if(document.body){var _=document.body.appendChild(document.createElement("div"));_.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(w=!0),document.body.removeChild(_)}var k=function(e){!function(e){return"function"===typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=a(e):(e={regl:e},this.gl=e.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||o({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(f(e)?e:{})};k.prototype.createShader=function(){var e=this.regl,t=e({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:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.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:e,draw:t,atlas:{}}},k.prototype.update=function(e){var t=this;if("string"===typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{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(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=d(e.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!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"===typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=k.baseFontSize+"px sans-serif");var r,o=!1,a=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,r){if("string"===typeof e)try{e=n.parse(e)}catch(d){e=n.parse(k.baseFontSize+"px "+e)}else e=n.parse(n.stringify(e));var i=n.stringify({size:k.baseFontSize,family:e.family,stretch:w?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=h(e.size),l=Math.round(s[0]*p(s[1]));if(l!==t.fontSize[r]&&(a=!0,t.fontSize[r]=l),(!t.font[r]||i!=t.font[r].baseString)&&(o=!0,t.font[r]=k.fonts[i],!t.font[r])){var c=e.family.join(", "),u=[e.style];e.style!=e.variant&&u.push(e.variant),e.variant!=e.weight&&u.push(e.weight),w&&e.weight!=e.stretch&&u.push(e.stretch),t.font[r]={baseString:i,family:c,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[i]=t.font[r]}})),(o||a)&&this.font.forEach((function(r,i){var o=n.stringify({size:t.fontSize[i],family:r.family,stretch:w?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(t.fontAtlas[i]=t.shader.atlas[o],!t.fontAtlas[i]){var a=r.metrics;t.shader.atlas[o]=t.fontAtlas[i]={fontString:o,step:2*Math.ceil(t.fontSize[i]*a.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"===typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),f=0;f2){for(var _=!e.position[0].length,S=u.mallocFloat(2*this.count),T=0,M=0;T1?t.align[r]:t.align[0]:t.align;if("number"===typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,i=0;return i+=.5*n.bottom,i+="number"===typeof e?e-n.baseline:-n[e],i*=-1}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!==typeof e.color&&isNaN(e.color)){var H;if("number"===typeof e.color[0]&&e.color.length>this.counts.length){var W=e.color.length;H=u.mallocUint8(W);for(var G=(e.color.subarray||e.color.slice).bind(e.color),q=0;q4||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 $=0;$1?this.counts[$]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[$]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*$,4*$+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[$]:this.opacity,baseline:null!=this.baselineOffset[$]?this.baselineOffset[$]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[$]?this.alignOffset[$]:this.alignOffset[0]:0,atlas:this.fontAtlas[$]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*$,2*$+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},16136:function(e){e.exports=function(){"use strict";var e=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},t=function(e,t){for(var r=Object.keys(t),n=0;n=0&&(0|e)===e||i("invalid parameter type, ("+e+")"+a(t)+". must be a nonnegative integer")}function f(e,t,r){t.indexOf(e)<0&&i("invalid value"+a(r)+". must be one of: "+t)}var h=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function p(e){Object.keys(e).forEach((function(e){h.indexOf(e)<0&&i('invalid regl constructor argument "'+e+'". must be one of '+h)}))}function m(e,t){for(e+="";e.length0&&t.push(new y("unknown",0,e))}})),t}function k(e,t){t.forEach((function(t){var r=e[t.file];if(r){var n=r.index[t.line];if(n)return n.errors.push(t),void(r.hasErrors=!0)}e.unknown.hasErrors=!0,e.unknown.lines[0].errors.push(t)}))}function S(e,t,n,i,a){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var s=e.getShaderInfoLog(t),l=i===e.FRAGMENT_SHADER?"fragment":"vertex";O(n,"string",l+" shader source must be a string",a);var c=w(n,a),u=_(s);k(c,u),Object.keys(c).forEach((function(e){var t=c[e];if(t.hasErrors){var n=[""],i=[""];o("file number "+e+": "+t.name+"\n","color:red;text-decoration:underline;font-weight:bold"),t.lines.forEach((function(e){if(e.errors.length>0){o(m(e.number,4)+"| ","background-color:yellow; font-weight:bold"),o(e.line+r,"color:red; background-color:yellow; font-weight:bold");var t=0;e.errors.forEach((function(n){var i=n.message,a=/^\s*'(.*)'\s*:\s*(.*)$/.exec(i);if(a){var s=a[1];i=a[2],"assign"===s&&(s="="),t=Math.max(e.line.indexOf(s,t),0)}else t=0;o(m("| ",6)),o(m("^^^",t+3)+r,"font-weight:bold"),o(m("| ",6)),o(i+r,"font-weight:bold")})),o(m("| ",6)+r)}else o(m(e.number,4)+"| "),o(e.line+r,"color:red")})),"undefined"===typeof document||window.chrome?console.log(n.join("")):(i[0]=n.join("%c"),console.log.apply(console,i))}function o(e,t){n.push(e),i.push(t||"")}})),o.raise("Error compiling "+l+" shader, "+c[0].name)}}function T(e,t,n,i,a){if(!e.getProgramParameter(t,e.LINK_STATUS)){var s=e.getProgramInfoLog(t),l=w(n,a),c='Error linking program with vertex shader, "'+w(i,a)[0].name+'", and fragment shader "'+l[0].name+'"';"undefined"!==typeof document?console.log("%c"+c+r+"%c"+s,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(c+r+s),o.raise(c)}}function M(e){e._commandRef=x()}function C(e,t,r,n){function i(e){return e?n.id(e):0}function o(e,t){Object.keys(t).forEach((function(t){e[n.id(t)]=!0}))}M(e),e._fragId=i(e.static.frag),e._vertId=i(e.static.vert);var a=e._uniformSet={};o(a,t.static),o(a,t.dynamic);var s=e._attributeSet={};o(s,r.static),o(s,r.dynamic),e._hasCount="count"in e.static||"count"in e.dynamic||"elements"in e.static||"elements"in e.dynamic}function A(e,t){var r=b();i(e+" in command "+(t||x())+("unknown"===r?"":" called from "+r))}function E(e,t,r){e||A(t,r||x())}function I(e,t,r,n){e in t||A("unknown parameter ("+e+")"+a(r)+". possible values: "+Object.keys(t).join(),n||x())}function O(e,t,r,n){c(e,t)||A("invalid parameter type"+a(r)+". expected "+t+", got "+typeof e,n||x())}function P(e){e()}function R(e,t,r){e.texture?f(e.texture._texture.internalformat,t,"unsupported texture format for attachment"):f(e.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")}var L=33071,j=9728,D=9984,z=9985,N=9986,F=9987,B=5121,Z=5122,U=5123,V=5124,H=5125,W=5126,G=32819,q=32820,Y=33635,X=34042,K=36193,$={};function J(e,t){return e===q||e===G||e===Y?2:e===X?4:$[e]*t}function Q(e){return!(e&e-1)&&!!e}function ee(e,t,r){var n,i=t.width,a=t.height,s=t.channels;o(i>0&&i<=r.maxTextureSize&&a>0&&a<=r.maxTextureSize,"invalid texture shape"),e.wrapS===L&&e.wrapT===L||o(Q(i)&&Q(a),"incompatible wrap mode for texture, both width and height must be power of 2"),1===t.mipmask?1!==i&&1!==a&&o(e.minFilter!==D&&e.minFilter!==N&&e.minFilter!==z&&e.minFilter!==F,"min filter requires mipmap"):(o(Q(i)&&Q(a),"texture must be a square power of 2 to support mipmapping"),o(t.mipmask===(i<<1)-1,"missing or incomplete mipmap data")),t.type===W&&(r.extensions.indexOf("oes_texture_float_linear")<0&&o(e.minFilter===j&&e.magFilter===j,"filter not supported, must enable oes_texture_float_linear"),o(!e.genMipmaps,"mipmap generation not supported with float textures"));var l=t.images;for(n=0;n<16;++n)if(l[n]){var c=i>>n,u=a>>n;o(t.mipmask&1<0&&i<=n.maxTextureSize&&a>0&&a<=n.maxTextureSize,"invalid texture shape"),o(i===a,"cube map must be square"),o(t.wrapS===L&&t.wrapT===L,"wrap mode not supported by cube map");for(var l=0;l>d,p=a>>d;o(c.mipmask&1<1&&t===r&&('"'===t||"'"===t))return['"'+le(e.substr(1,e.length-2))+'"'];var n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(n)return ce(e.substr(0,n.index)).concat(ce(n[1])).concat(ce(e.substr(n.index+n[0].length)));var i=e.split(".");if(1===i.length)return['"'+le(e)+'"'];for(var o=[],a=0;a0,"invalid pixel ratio"))):re.raise("invalid arguments to regl"),t&&("canvas"===t.nodeName.toLowerCase()?n=t:r=t),!i){if(!n){re("undefined"!==typeof document,"must manually specify webgl context outside of DOM environments");var h=ye(r||document.body,d,c);if(!h)return null;n=h.canvas,f=h.onDestroy}void 0===a.premultipliedAlpha&&(a.premultipliedAlpha=!0),i=xe(n,a)}return i?{gl:i,canvas:n,container:r,extensions:s,optionalExtensions:l,pixelRatio:c,profile:u,onDone:d,onDestroy:f}:(f(),d("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Te(e,t){var r={};function n(t){re.type(t,"string","extension name must be string");var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch(o){}return!!n}for(var i=0;i65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function De(){var e=Me(8,(function(){return[]}));function t(t){var r=Le(t),n=e[je(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[je(t.byteLength)>>2].push(t)}function n(e,r){var n=null;switch(e){case Ce:n=new Int8Array(t(r),0,r);break;case Ae:n=new Uint8Array(t(r),0,r);break;case Ee:n=new Int16Array(t(2*r),0,r);break;case Ie:n=new Uint16Array(t(2*r),0,r);break;case Oe:n=new Int32Array(t(4*r),0,r);break;case Pe:n=new Uint32Array(t(4*r),0,r);break;case Re:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n}function i(e){r(e.buffer)}return{alloc:t,free:r,allocType:n,freeType:i}}var ze=De();ze.zero=De();var Ne=3408,Fe=3410,Be=3411,Ze=3412,Ue=3413,Ve=3414,He=3415,We=33901,Ge=33902,qe=3379,Ye=3386,Xe=34921,Ke=36347,$e=36348,Je=35661,Qe=35660,et=34930,tt=36349,rt=34076,nt=34024,it=7936,ot=7937,at=7938,st=35724,lt=34047,ct=36063,ut=34852,dt=3553,ft=34067,ht=34069,pt=33984,mt=6408,gt=5126,vt=5121,yt=36160,xt=36053,bt=36064,wt=16384,_t=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(lt));var n=1,i=1;t.webgl_draw_buffers&&(n=e.getParameter(ut),i=e.getParameter(ct));var o=!!t.oes_texture_float;if(o){var a=e.createTexture();e.bindTexture(dt,a),e.texImage2D(dt,0,mt,1,1,0,mt,gt,null);var s=e.createFramebuffer();if(e.bindFramebuffer(yt,s),e.framebufferTexture2D(yt,bt,dt,a,0),e.bindTexture(dt,null),e.checkFramebufferStatus(yt)!==xt)o=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(wt);var l=ze.allocType(gt,4);e.readPixels(0,0,1,1,mt,gt,l),e.getError()?o=!1:(e.deleteFramebuffer(s),e.deleteTexture(a),o=1===l[0]),ze.freeType(l)}}var c=!0;if("undefined"===typeof navigator||!(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))){var u=e.createTexture(),d=ze.allocType(vt,36);e.activeTexture(pt),e.bindTexture(ft,u),e.texImage2D(ht,0,mt,3,3,0,mt,vt,d),ze.freeType(d),e.bindTexture(ft,null),e.deleteTexture(u),c=!e.getError()}return{colorBits:[e.getParameter(Fe),e.getParameter(Be),e.getParameter(Ze),e.getParameter(Ue)],depthBits:e.getParameter(Ve),stencilBits:e.getParameter(He),subpixelBits:e.getParameter(Ne),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:e.getParameter(We),lineWidthDims:e.getParameter(Ge),maxViewportDims:e.getParameter(Ye),maxCombinedTextureUnits:e.getParameter(Je),maxCubeMapSize:e.getParameter(rt),maxRenderbufferSize:e.getParameter(nt),maxTextureUnits:e.getParameter(et),maxTextureSize:e.getParameter(qe),maxAttributes:e.getParameter(Xe),maxVertexUniforms:e.getParameter(Ke),maxVertexTextureUnits:e.getParameter(Qe),maxVaryingVectors:e.getParameter($e),maxFragmentUniforms:e.getParameter(tt),glsl:e.getParameter(st),renderer:e.getParameter(ot),vendor:e.getParameter(it),version:e.getParameter(at),readFloat:o,npotTextureCube:c}};function kt(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)||e(t.data))}var St=function(e){return Object.keys(e).map((function(t){return e[t]}))},Tt={shape:Ot,flatten:It};function Mt(e,t,r){for(var n=0;n0)if(Array.isArray(r[0])){s=Dt(r);for(var c=1,u=1;u0)if("number"===typeof t[0]){var o=ze.allocType(u.dtype,t.length);Vt(o,t),p(o,i),ze.freeType(o)}else if(Array.isArray(t[0])||e(t[0])){n=Dt(t);var a=jt(t,n,u.dtype);p(a,i),ze.freeType(a)}else re.raise("invalid buffer data")}else if(kt(t)){n=t.shape;var s=t.stride,l=0,c=0,f=0,h=0;1===n.length?(l=n[0],c=1,f=s[0],h=0):2===n.length?(l=n[0],c=n[1],f=s[0],h=s[1]):re.raise("invalid shape");var m=Array.isArray(t.data)?u.dtype:Ut(t.data),g=ze.allocType(m,l*c);Ht(g,t.data,l,c,f,h,t.offset),p(g,i),ze.freeType(g)}else re.raise("invalid data for buffer subdata");return d}return a[u.id]=u,l||d(i),d._reglType="buffer",d._buffer=u,d.subdata=m,n.profile&&(d.stats=u.stats),d.destroy=function(){h(u)},d}function m(){St(a).forEach((function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)}))}return n.profile&&(r.getTotalBufferSize=function(){var e=0;return Object.keys(a).forEach((function(t){e+=a[t].stats.size})),e}),{create:p,createStream:c,destroyStream:u,clear:function(){St(a).forEach(h),l.forEach(h)},getBuffer:function(e){return e&&e._buffer instanceof s?e._buffer:null},restore:m,_initBuffer:f}}Zt[5120]=1,Zt[5122]=2,Zt[5124]=4,Zt[5121]=1,Zt[5123]=2,Zt[5125]=4,Zt[5126]=4;var Gt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},qt=0,Yt=1,Xt=4,Kt=5120,$t=5121,Jt=5122,Qt=5123,er=5124,tr=5125,rr=34963,nr=35040,ir=35044;function or(t,r,n,i){var o={},a=0,s={uint8:$t,uint16:Qt};function l(e){this.id=a++,o[this.id]=this,this.buffer=e,this.primType=Xt,this.vertCount=0,this.type=0}r.oes_element_index_uint&&(s.uint32=tr),l.prototype.bind=function(){this.buffer.bind()};var c=[];function u(e){var t=c.pop();return t||(t=new l(n.create(null,rr,!0,!1)._buffer)),f(t,e,nr,-1,-1,0,0),t}function d(e){c.push(e)}function f(i,o,a,s,l,c,u){var d;if(i.buffer.bind(),o){var f=u;u||e(o)&&(!kt(o)||e(o.data))||(f=r.oes_element_index_uint?tr:Qt),n._initBuffer(i.buffer,o,a,f,3)}else t.bufferData(rr,c,a),i.buffer.dtype=d||$t,i.buffer.usage=a,i.buffer.dimension=3,i.buffer.byteLength=c;if(d=u,!u){switch(i.buffer.dtype){case $t:case Kt:d=$t;break;case Qt:case Jt:d=Qt;break;case tr:case er:d=tr;break;default:re.raise("unsupported type for element array")}i.buffer.dtype=d}i.type=d,re(d!==tr||!!r.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var h=l;h<0&&(h=i.buffer.byteLength,d===Qt?h>>=1:d===tr&&(h>>=2)),i.vertCount=h;var p=s;if(s<0){p=Xt;var m=i.buffer.dimension;1===m&&(p=qt),2===m&&(p=Yt),3===m&&(p=Xt)}i.primType=p}function h(e){i.elementsCount--,re(null!==e.buffer,"must not double destroy elements"),delete o[e.id],e.buffer.destroy(),e.buffer=null}function p(t,r){var o=n.create(null,rr,!0),a=new l(o._buffer);function c(t){if(t)if("number"===typeof t)o(t),a.primType=Xt,a.vertCount=0|t,a.type=$t;else{var r=null,n=ir,i=-1,l=-1,u=0,d=0;Array.isArray(t)||e(t)||kt(t)?r=t:(re.type(t,"object","invalid arguments for elements"),"data"in t&&(r=t.data,re(Array.isArray(r)||e(r)||kt(r),"invalid data for element buffer")),"usage"in t&&(re.parameter(t.usage,Lt,"invalid element buffer usage"),n=Lt[t.usage]),"primitive"in t&&(re.parameter(t.primitive,Gt,"invalid element buffer primitive"),i=Gt[t.primitive]),"count"in t&&(re("number"===typeof t.count&&t.count>=0,"invalid vertex count for elements"),l=0|t.count),"type"in t&&(re.parameter(t.type,s,"invalid buffer type"),d=s[t.type]),"length"in t?u=0|t.length:(u=l,d===Qt||d===Jt?u*=2:d!==tr&&d!==er||(u*=4))),f(a,r,n,i,l,u,d)}else o(),a.primType=Xt,a.vertCount=0,a.type=$t;return c}return i.elementsCount++,c(t),c._reglType="elements",c._elements=a,c.subdata=function(e,t){return o.subdata(e,t),c},c.destroy=function(){h(a)},c}return{create:p,createStream:u,destroyStream:d,getElements:function(e){return"function"===typeof e&&e._elements instanceof l?e._elements:null},clear:function(){St(o).forEach(h)}}}var ar=new Float32Array(1),sr=new Uint32Array(ar.buffer),lr=5123;function cr(e){for(var t=ze.allocType(lr,e.length),r=0;r>>31<<15,o=(n<<1>>>24)-127,a=n>>13&1023;if(o<-24)t[r]=i;else if(o<-14){var s=-14-o;t[r]=i+(a+1024>>s)}else t[r]=o>15?i+31744:i+(o+15<<10)+a}return t}function ur(t){return Array.isArray(t)||e(t)}var dr=function(e){return!(e&e-1)&&!!e},fr=34467,hr=3553,pr=34067,mr=34069,gr=6408,vr=6406,yr=6407,xr=6409,br=6410,wr=32854,_r=32855,kr=36194,Sr=32819,Tr=32820,Mr=33635,Cr=34042,Ar=6402,Er=34041,Ir=35904,Or=35906,Pr=36193,Rr=33776,Lr=33777,jr=33778,Dr=33779,zr=35986,Nr=35987,Fr=34798,Br=35840,Zr=35841,Ur=35842,Vr=35843,Hr=36196,Wr=5121,Gr=5123,qr=5125,Yr=5126,Xr=10242,Kr=10243,$r=10497,Jr=33071,Qr=33648,en=10240,tn=10241,rn=9728,nn=9729,on=9984,an=9985,sn=9986,ln=9987,cn=33170,un=4352,dn=4353,fn=4354,hn=34046,pn=3317,mn=37440,gn=37441,vn=37443,yn=37444,xn=33984,bn=[on,sn,an,ln],wn=[0,xr,br,yr,gr],_n={};function kn(e){return"[object "+e+"]"}_n[xr]=_n[vr]=_n[Ar]=1,_n[Er]=_n[br]=2,_n[yr]=_n[Ir]=3,_n[gr]=_n[Or]=4;var Sn=kn("HTMLCanvasElement"),Tn=kn("OffscreenCanvas"),Mn=kn("CanvasRenderingContext2D"),Cn=kn("ImageBitmap"),An=kn("HTMLImageElement"),En=kn("HTMLVideoElement"),In=Object.keys(Pt).concat([Sn,Tn,Mn,Cn,An,En]),On=[];On[Wr]=1,On[Yr]=4,On[Pr]=2,On[Gr]=2,On[qr]=4;var Pn=[];function Rn(e){return Array.isArray(e)&&(0===e.length||"number"===typeof e[0])}function Ln(e){return!!Array.isArray(e)&&!(0===e.length||!ur(e[0]))}function jn(e){return Object.prototype.toString.call(e)}function Dn(e){return jn(e)===Sn}function zn(e){return jn(e)===Tn}function Nn(e){return jn(e)===Mn}function Fn(e){return jn(e)===Cn}function Bn(e){return jn(e)===An}function Zn(e){return jn(e)===En}function Un(e){if(!e)return!1;var t=jn(e);return In.indexOf(t)>=0||Rn(e)||Ln(e)||kt(e)}function Vn(e){return 0|Pt[Object.prototype.toString.call(e)]}function Hn(e,t){var r=t.length;switch(e.type){case Wr:case Gr:case qr:case Yr:var n=ze.allocType(e.type,r);n.set(t),e.data=n;break;case Pr:e.data=cr(t);break;default:re.raise("unsupported texture type, must specify a typed array")}}function Wn(e,t){return ze.allocType(e.type===Pr?Yr:e.type,t)}function Gn(e,t){e.type===Pr?(e.data=cr(t),ze.freeType(t)):e.data=t}function qn(e,t,r,n,i,o){for(var a=e.width,s=e.height,l=e.channels,c=Wn(e,a*s*l),u=0,d=0;d=1;)s+=a*l*l,l/=2;return s}return a*r*n}function Xn(r,n,i,o,a,s,l){var c={"don't care":un,"dont care":un,nice:fn,fast:dn},u={repeat:$r,clamp:Jr,mirror:Qr},d={nearest:rn,linear:nn},f=t({mipmap:ln,"nearest mipmap nearest":on,"linear mipmap nearest":an,"nearest mipmap linear":sn,"linear mipmap linear":ln},d),h={none:0,browser:yn},p={uint8:Wr,rgba4:Sr,rgb565:Mr,"rgb5 a1":Tr},m={alpha:vr,luminance:xr,"luminance alpha":br,rgb:yr,rgba:gr,rgba4:wr,"rgb5 a1":_r,rgb565:kr},g={};n.ext_srgb&&(m.srgb=Ir,m.srgba=Or),n.oes_texture_float&&(p.float32=p.float=Yr),n.oes_texture_half_float&&(p.float16=p["half float"]=Pr),n.webgl_depth_texture&&(t(m,{depth:Ar,"depth stencil":Er}),t(p,{uint16:Gr,uint32:qr,"depth stencil":Cr})),n.webgl_compressed_texture_s3tc&&t(g,{"rgb s3tc dxt1":Rr,"rgba s3tc dxt1":Lr,"rgba s3tc dxt3":jr,"rgba s3tc dxt5":Dr}),n.webgl_compressed_texture_atc&&t(g,{"rgb atc":zr,"rgba atc explicit alpha":Nr,"rgba atc interpolated alpha":Fr}),n.webgl_compressed_texture_pvrtc&&t(g,{"rgb pvrtc 4bppv1":Br,"rgb pvrtc 2bppv1":Zr,"rgba pvrtc 4bppv1":Ur,"rgba pvrtc 2bppv1":Vr}),n.webgl_compressed_texture_etc1&&(g["rgb etc1"]=Hr);var v=Array.prototype.slice.call(r.getParameter(fr));Object.keys(g).forEach((function(e){var t=g[e];v.indexOf(t)>=0&&(m[e]=t)}));var y=Object.keys(m);i.textureFormats=y;var x=[];Object.keys(m).forEach((function(e){var t=m[e];x[t]=e}));var b=[];Object.keys(p).forEach((function(e){var t=p[e];b[t]=e}));var w=[];Object.keys(d).forEach((function(e){var t=d[e];w[t]=e}));var _=[];Object.keys(f).forEach((function(e){var t=f[e];_[t]=e}));var k=[];Object.keys(u).forEach((function(e){var t=u[e];k[t]=e}));var S=y.reduce((function(e,t){var r=m[t];return r===xr||r===vr||r===xr||r===br||r===Ar||r===Er||n.ext_srgb&&(r===Ir||r===Or)?e[r]=r:r===_r||t.indexOf("rgba")>=0?e[r]=gr:e[r]=yr,e}),{});function T(){this.internalformat=gr,this.format=gr,this.type=Wr,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=yn,this.width=0,this.height=0,this.channels=0}function M(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function C(e,t){if("object"===typeof t&&t){if("premultiplyAlpha"in t&&(re.type(t.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(re.type(t.flipY,"boolean","invalid texture flip"),e.flipY=t.flipY),"alignment"in t&&(re.oneOf(t.alignment,[1,2,4,8],"invalid texture unpack alignment"),e.unpackAlignment=t.alignment),"colorSpace"in t&&(re.parameter(t.colorSpace,h,"invalid colorSpace"),e.colorSpace=h[t.colorSpace]),"type"in t){var r=t.type;re(n.oes_texture_float||!("float"===r||"float32"===r),"you must enable the OES_texture_float extension in order to use floating point textures."),re(n.oes_texture_half_float||!("half float"===r||"float16"===r),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),re(n.webgl_depth_texture||!("uint16"===r||"uint32"===r||"depth stencil"===r),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(r,p,"invalid texture type"),e.type=p[r]}var o=e.width,a=e.height,s=e.channels,l=!1;"shape"in t?(re(Array.isArray(t.shape)&&t.shape.length>=2,"shape must be an array"),o=t.shape[0],a=t.shape[1],3===t.shape.length&&(s=t.shape[2],re(s>0&&s<=4,"invalid number of channels"),l=!0),re(o>=0&&o<=i.maxTextureSize,"invalid width"),re(a>=0&&a<=i.maxTextureSize,"invalid height")):("radius"in t&&(o=a=t.radius,re(o>=0&&o<=i.maxTextureSize,"invalid radius")),"width"in t&&(o=t.width,re(o>=0&&o<=i.maxTextureSize,"invalid width")),"height"in t&&(a=t.height,re(a>=0&&a<=i.maxTextureSize,"invalid height")),"channels"in t&&(s=t.channels,re(s>0&&s<=4,"invalid number of channels"),l=!0)),e.width=0|o,e.height=0|a,e.channels=0|s;var c=!1;if("format"in t){var u=t.format;re(n.webgl_depth_texture||!("depth"===u||"depth stencil"===u),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),re.parameter(u,m,"invalid texture format");var d=e.internalformat=m[u];e.format=S[d],u in p&&("type"in t||(e.type=p[u])),u in g&&(e.compressed=!0),c=!0}!l&&c?e.channels=_n[e.format]:l&&!c?e.channels!==wn[e.format]&&(e.format=e.internalformat=wn[e.channels]):c&&l&&re(e.channels===_n[e.format],"number of channels inconsistent with specified format")}}function A(e){r.pixelStorei(mn,e.flipY),r.pixelStorei(gn,e.premultiplyAlpha),r.pixelStorei(vn,e.colorSpace),r.pixelStorei(pn,e.unpackAlignment)}function E(){T.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function I(t,r){var n=null;if(Un(r)?n=r:r&&(re.type(r,"object","invalid pixel data type"),C(t,r),"x"in r&&(t.xOffset=0|r.x),"y"in r&&(t.yOffset=0|r.y),Un(r.data)&&(n=r.data)),re(!t.compressed||n instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),r.copy){re(!n,"can not specify copy and data field for the same texture");var o=a.viewportWidth,s=a.viewportHeight;t.width=t.width||o-t.xOffset,t.height=t.height||s-t.yOffset,t.needsCopy=!0,re(t.xOffset>=0&&t.xOffset=0&&t.yOffset0&&t.width<=o&&t.height>0&&t.height<=s,"copy texture read out of bounds")}else if(n){if(e(n))t.channels=t.channels||4,t.data=n,"type"in r||t.type!==Wr||(t.type=Vn(n));else if(Rn(n))t.channels=t.channels||4,Hn(t,n),t.alignment=1,t.needsFree=!0;else if(kt(n)){var l=n.data;Array.isArray(l)||t.type!==Wr||(t.type=Vn(l));var c,u,d,f,h,p,m=n.shape,g=n.stride;3===m.length?(d=m[2],p=g[2]):(re(2===m.length,"invalid ndarray pixel data, must be 2 or 3D"),d=1,p=1),c=m[0],u=m[1],f=g[0],h=g[1],t.alignment=1,t.width=c,t.height=u,t.channels=d,t.format=t.internalformat=wn[d],t.needsFree=!0,qn(t,l,f,h,p,n.offset)}else if(Dn(n)||zn(n)||Nn(n))Dn(n)||zn(n)?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(Fn(n))t.element=n,t.width=n.width,t.height=n.height,t.channels=4;else if(Bn(n))t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(Zn(n))t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(Ln(n)){var v=t.width||n[0].length,y=t.height||n.length,x=t.channels;x=ur(n[0][0])?x||n[0][0].length:x||1;for(var b=Tt.shape(n),w=1,_=0;_=0,"oes_texture_float extension not enabled"):t.type===Pr&&re(i.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function O(e,t,n){var i=e.element,a=e.data,s=e.internalformat,l=e.format,c=e.type,u=e.width,d=e.height;A(e),i?r.texImage2D(t,n,l,l,c,i):e.compressed?r.compressedTexImage2D(t,n,s,u,d,0,a):e.needsCopy?(o(),r.copyTexImage2D(t,n,l,e.xOffset,e.yOffset,u,d,0)):r.texImage2D(t,n,l,u,d,0,l,c,a||null)}function P(e,t,n,i,a){var s=e.element,l=e.data,c=e.internalformat,u=e.format,d=e.type,f=e.width,h=e.height;A(e),s?r.texSubImage2D(t,a,n,i,u,d,s):e.compressed?r.compressedTexSubImage2D(t,a,n,i,c,f,h,l):e.needsCopy?(o(),r.copyTexSubImage2D(t,a,n,i,e.xOffset,e.yOffset,f,h)):r.texSubImage2D(t,a,n,i,f,h,u,d,l)}var R=[];function L(){return R.pop()||new E}function j(e){e.needsFree&&ze.freeType(e.data),E.call(e),R.push(e)}function D(){T.call(this),this.genMipmaps=!1,this.mipmapHint=un,this.mipmask=0,this.images=Array(16)}function z(e,t,r){var n=e.images[0]=L();e.mipmask=1,n.width=e.width=t,n.height=e.height=r,n.channels=e.channels=4}function N(e,t){var r=null;if(Un(t))M(r=e.images[0]=L(),e),I(r,t),e.mipmask=1;else if(C(e,t),Array.isArray(t.mipmap))for(var n=t.mipmap,i=0;i>=i,r.height>>=i,I(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;re.parameter(n,d),e.magFilter=d[n]}var o=e.wrapS,a=e.wrapT;if("wrap"in t){var s=t.wrap;"string"===typeof s?(re.parameter(s,u),o=a=u[s]):Array.isArray(s)&&(re.parameter(s[0],u),re.parameter(s[1],u),o=u[s[0]],a=u[s[1]])}else{if("wrapS"in t){var l=t.wrapS;re.parameter(l,u),o=u[l]}if("wrapT"in t){var h=t.wrapT;re.parameter(h,u),a=u[h]}}if(e.wrapS=o,e.wrapT=a,"anisotropic"in t){var p=t.anisotropic;re("number"===typeof p&&p>=1&&p<=i.maxAnisotropic,"aniso samples must be between 1 and "),e.anisotropic=t.anisotropic}if("mipmap"in t){var m=!1;switch(typeof t.mipmap){case"string":re.parameter(t.mipmap,c,"invalid mipmap hint"),e.mipmapHint=c[t.mipmap],e.genMipmaps=!0,m=!0;break;case"boolean":m=e.genMipmaps=t.mipmap;break;case"object":re(Array.isArray(t.mipmap),"invalid mipmap type"),e.genMipmaps=!1,m=!0;break;default:re.raise("invalid mipmap type")}m&&!("min"in t)&&(e.minFilter=on)}}function W(e,t){r.texParameteri(t,tn,e.minFilter),r.texParameteri(t,en,e.magFilter),r.texParameteri(t,Xr,e.wrapS),r.texParameteri(t,Kr,e.wrapT),n.ext_texture_filter_anisotropic&&r.texParameteri(t,hn,e.anisotropic),e.genMipmaps&&(r.hint(cn,e.mipmapHint),r.generateMipmap(t))}var G=0,q={},Y=i.maxTextureUnits,X=Array(Y).map((function(){return null}));function K(e){T.call(this),this.mipmask=0,this.internalformat=gr,this.id=G++,this.refCount=1,this.target=e,this.texture=r.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new V,l.profile&&(this.stats={size:0})}function $(e){r.activeTexture(xn),r.bindTexture(e.target,e.texture)}function J(){var e=X[0];e?r.bindTexture(e.target,e.texture):r.bindTexture(hr,null)}function Q(e){var t=e.texture;re(t,"must not double destroy texture");var n=e.unit,i=e.target;n>=0&&(r.activeTexture(xn+n),r.bindTexture(i,null),X[n]=null),r.deleteTexture(t),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete q[e.id],s.textureCount--}function ee(e,t){var n=new K(hr);function o(e,t){var r=n.texInfo;V.call(r);var a=Z();return"number"===typeof e?z(a,0|e,"number"===typeof t?0|t:0|e):e?(re.type(e,"object","invalid arguments to regl.texture"),H(r,e),N(a,e)):z(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),n.mipmask=a.mipmask,M(n,a),re.texture2D(r,a,i),n.internalformat=a.internalformat,o.width=a.width,o.height=a.height,$(n),F(a,hr),W(r,hr),J(),U(a),l.profile&&(n.stats.size=Yn(n.internalformat,n.type,a.width,a.height,r.genMipmaps,!1)),o.format=x[n.internalformat],o.type=b[n.type],o.mag=w[r.magFilter],o.min=_[r.minFilter],o.wrapS=k[r.wrapS],o.wrapT=k[r.wrapT],o}function a(e,t,r,i){re(!!e,"must specify image data");var a=0|t,s=0|r,l=0|i,c=L();return M(c,n),c.width=0,c.height=0,I(c,e),c.width=c.width||(n.width>>l)-a,c.height=c.height||(n.height>>l)-s,re(n.type===c.type&&n.format===c.format&&n.internalformat===c.internalformat,"incompatible format for texture.subimage"),re(a>=0&&s>=0&&a+c.width<=n.width&&s+c.height<=n.height,"texture.subimage write out of bounds"),re(n.mipmask&1<>s;++s){var c=i>>s,u=a>>s;if(!c||!u)break;r.texImage2D(hr,s,n.format,c,u,0,n.format,n.type,null)}return J(),l.profile&&(n.stats.size=Yn(n.internalformat,n.type,i,a,!1,!1)),o}return q[n.id]=n,s.textureCount++,o(e,t),o.subimage=a,o.resize=c,o._reglType="texture2d",o._texture=n,l.profile&&(o.stats=n.stats),o.destroy=function(){n.decRef()},o}function te(e,t,n,o,a,c){var u=new K(pr);q[u.id]=u,s.cubeCount++;var d=new Array(6);function f(e,t,r,n,o,a){var s,c=u.texInfo;for(V.call(c),s=0;s<6;++s)d[s]=Z();if("number"!==typeof e&&e)if("object"===typeof e)if(t)N(d[0],e),N(d[1],t),N(d[2],r),N(d[3],n),N(d[4],o),N(d[5],a);else if(H(c,e),C(u,e),"faces"in e){var h=e.faces;for(re(Array.isArray(h)&&6===h.length,"cube faces must be a length 6 array"),s=0;s<6;++s)re("object"===typeof h[s]&&!!h[s],"invalid input for cube map face"),M(d[s],u),N(d[s],h[s])}else for(s=0;s<6;++s)N(d[s],e);else re.raise("invalid arguments to cube map");else{var p=0|e||1;for(s=0;s<6;++s)z(d[s],p,p)}for(M(u,d[0]),re.optional((function(){i.npotTextureCube||re(dr(u.width)&&dr(u.height),"your browser does not support non power or two texture dimensions")})),c.genMipmaps?u.mipmask=(d[0].width<<1)-1:u.mipmask=d[0].mipmask,re.textureCube(u,c,d,i),u.internalformat=d[0].internalformat,f.width=d[0].width,f.height=d[0].height,$(u),s=0;s<6;++s)F(d[s],mr+s);for(W(c,pr),J(),l.profile&&(u.stats.size=Yn(u.internalformat,u.type,f.width,f.height,c.genMipmaps,!0)),f.format=x[u.internalformat],f.type=b[u.type],f.mag=w[c.magFilter],f.min=_[c.minFilter],f.wrapS=k[c.wrapS],f.wrapT=k[c.wrapT],s=0;s<6;++s)U(d[s]);return f}function h(e,t,r,n,i){re(!!t,"must specify image data"),re("number"===typeof e&&e===(0|e)&&e>=0&&e<6,"invalid face");var o=0|r,a=0|n,s=0|i,l=L();return M(l,u),l.width=0,l.height=0,I(l,t),l.width=l.width||(u.width>>s)-o,l.height=l.height||(u.height>>s)-a,re(u.type===l.type&&u.format===l.format&&u.internalformat===l.internalformat,"incompatible format for texture.subimage"),re(o>=0&&a>=0&&o+l.width<=u.width&&a+l.height<=u.height,"texture.subimage write out of bounds"),re(u.mipmask&1<>i;++i)r.texImage2D(mr+n,i,u.format,t>>i,t>>i,0,u.format,u.type,null);return J(),l.profile&&(u.stats.size=Yn(u.internalformat,u.type,f.width,f.height,!1,!0)),f}}return f(e,t,n,o,a,c),f.subimage=h,f.resize=p,f._reglType="textureCube",f._texture=u,l.profile&&(f.stats=u.stats),f.destroy=function(){u.decRef()},f}function ne(){for(var e=0;e>t,e.height>>t,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)r.texImage2D(mr+n,t,e.internalformat,e.width>>t,e.height>>t,0,e.internalformat,e.type,null);W(e.texInfo,e.target)}))}function oe(){for(var e=0;e0)continue;i.unit=-1}X[n]=e,t=n;break}t>=Y&&re.raise("insufficient number of texture units"),l.profile&&s.maxTextureUnits=2,"invalid renderbuffer shape"),s=0|h[0],l=0|h[1]}else"radius"in f&&(s=l=0|f.radius),"width"in f&&(s=0|f.width),"height"in f&&(l=0|f.height);"format"in f&&(re.parameter(f.format,o,"invalid renderbuffer format"),c=o[f.format])}else"number"===typeof t?(s=0|t,l="number"===typeof n?0|n:s):t?re.raise("invalid arguments to renderbuffer constructor"):s=l=1;if(re(s>0&&l>0&&s<=r.maxRenderbufferSize&&l<=r.maxRenderbufferSize,"invalid renderbuffer size"),s!==u.width||l!==u.height||c!==u.format)return d.width=u.width=s,d.height=u.height=l,u.format=c,e.bindRenderbuffer(Kn,u.renderbuffer),e.renderbufferStorage(Kn,c,s,l),re(0===e.getError(),"invalid render buffer format"),i.profile&&(u.stats.size=li(u.format,u.width,u.height)),d.format=a[u.format],d}function f(t,n){var o=0|t,a=0|n||o;return o===u.width&&a===u.height||(re(o>0&&a>0&&o<=r.maxRenderbufferSize&&a<=r.maxRenderbufferSize,"invalid renderbuffer size"),d.width=u.width=o,d.height=u.height=a,e.bindRenderbuffer(Kn,u.renderbuffer),e.renderbufferStorage(Kn,u.format,o,a),re(0===e.getError(),"invalid render buffer format"),i.profile&&(u.stats.size=li(u.format,u.width,u.height))),d}return l[u.id]=u,n.renderbufferCount++,d(t,s),d.resize=f,d._reglType="renderbuffer",d._renderbuffer=u,i.profile&&(d.stats=u.stats),d.destroy=function(){u.decRef()},d}function f(){St(l).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(Kn,t.renderbuffer),e.renderbufferStorage(Kn,t.format,t.width,t.height)})),e.bindRenderbuffer(Kn,null)}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach((function(t){e+=l[t].stats.size})),e}),{create:d,clear:function(){St(l).forEach(u)},restore:f}},ui=36160,di=36161,fi=3553,hi=34069,pi=36064,mi=36096,gi=36128,vi=33306,yi=36053,xi=36054,bi=36055,wi=36057,_i=36061,ki=36193,Si=5121,Ti=5126,Mi=6407,Ci=6408,Ai=6402,Ei=[Mi,Ci],Ii=[];Ii[Ci]=4,Ii[Mi]=3;var Oi=[];Oi[Si]=1,Oi[Ti]=4,Oi[ki]=2;var Pi=33189,Ri=36168,Li=34041,ji=[32854,32855,36194,35907,34842,34843,34836],Di={};function zi(e,r,n,i,o,a){var s={cur:null,next:null,dirty:!1,setFBO:null},l=["rgba"],c=["rgba4","rgb565","rgb5 a1"];r.ext_srgb&&c.push("srgba"),r.ext_color_buffer_half_float&&c.push("rgba16f","rgb16f"),r.webgl_color_buffer_float&&c.push("rgba32f");var u=["uint8"];function d(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=0,i=0;t?(n=t.width,i=t.height):r&&(n=r.width,i=r.height),this.width=n,this.height=i}function f(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function h(e,t,r){if(e)if(e.texture){var n=e.texture._texture,i=Math.max(1,n.width),o=Math.max(1,n.height);re(i===t&&o===r,"inconsistent width/height for supplied texture"),n.refCount+=1}else{var a=e.renderbuffer._renderbuffer;re(a.width===t&&a.height===r,"inconsistent width/height for renderbuffer"),a.refCount+=1}}function p(t,r){r&&(r.texture?e.framebufferTexture2D(ui,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(ui,t,di,r.renderbuffer._renderbuffer.renderbuffer))}function m(e){var t=fi,r=null,n=null,i=e;"object"===typeof e&&(i=e.data,"target"in e&&(t=0|e.target)),re.type(i,"function","invalid attachment data");var o=i._reglType;return"texture2d"===o?(r=i,re(t===fi)):"textureCube"===o?(r=i,re(t>=hi&&t=2,"invalid shape for framebuffer"),a=O[0],f=O[1]}else"radius"in I&&(a=f=I.radius),"width"in I&&(a=I.width),"height"in I&&(f=I.height);("color"in I||"colors"in I)&&(x=I.color||I.colors,Array.isArray(x)&&re(1===x.length||r.webgl_draw_buffers,"multiple render targets not supported")),x||("colorCount"in I&&(T=0|I.colorCount,re(T>0,"invalid color buffer count")),"colorTexture"in I&&(b=!!I.colorTexture,w="rgba4"),"colorType"in I&&(k=I.colorType,b?(re(r.oes_texture_float||!("float"===k||"float32"===k),"you must enable OES_texture_float in order to use floating point framebuffer objects"),re(r.oes_texture_half_float||!("half float"===k||"float16"===k),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===k||"float16"===k?(re(r.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),w="rgba16f"):"float"!==k&&"float32"!==k||(re(r.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),w="rgba32f"),re.oneOf(k,u,"invalid color type")),"colorFormat"in I&&(w=I.colorFormat,l.indexOf(w)>=0?b=!0:c.indexOf(w)>=0?b=!1:re.optional((function(){b?re.oneOf(I.colorFormat,l,"invalid color format for texture"):re.oneOf(I.colorFormat,c,"invalid color format for renderbuffer")})))),("depthTexture"in I||"depthStencilTexture"in I)&&(E=!(!I.depthTexture&&!I.depthStencilTexture),re(!E||r.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in I&&("boolean"===typeof I.depth?p=I.depth:(M=I.depth,y=!1)),"stencil"in I&&("boolean"===typeof I.stencil?y=I.stencil:(C=I.stencil,p=!1)),"depthStencil"in I&&("boolean"===typeof I.depthStencil?p=y=I.depthStencil:(A=I.depthStencil,p=!1,y=!1))}else a=f=1;var P=null,R=null,L=null,j=null;if(Array.isArray(x))P=x.map(m);else if(x)P=[m(x)];else for(P=new Array(T),i=0;i=0||P[i].renderbuffer&&ji.indexOf(P[i].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+i+" is invalid"),P[i]&&P[i].texture){var z=Ii[P[i].texture._texture.format]*Oi[P[i].texture._texture.type];null===D?D=z:re(D===z,"all color attachments much have the same number of bits per pixel.")}return h(R,a,f),re(!R||R.texture&&R.texture._texture.format===Ai||R.renderbuffer&&R.renderbuffer._renderbuffer.format===Pi,"invalid depth attachment for framebuffer object"),h(L,a,f),re(!L||L.renderbuffer&&L.renderbuffer._renderbuffer.format===Ri,"invalid stencil attachment for framebuffer object"),h(j,a,f),re(!j||j.texture&&j.texture._texture.format===Li||j.renderbuffer&&j.renderbuffer._renderbuffer.format===Li,"invalid depth-stencil attachment for framebuffer object"),_(o),o.width=a,o.height=f,o.colorAttachments=P,o.depthAttachment=R,o.stencilAttachment=L,o.depthStencilAttachment=j,d.color=P.map(v),d.depth=v(R),d.stencil=v(L),d.depthStencil=v(j),d.width=o.width,d.height=o.height,S(o),d}function f(e,t){re(s.next!==o,"can not resize a framebuffer which is currently in use");var r=Math.max(0|e,1),n=Math.max(0|t||r,1);if(r===o.width&&n===o.height)return d;for(var i=o.colorAttachments,a=0;a=2,"invalid shape for framebuffer"),re(y[0]===y[1],"cube framebuffer must be square"),f=y[0]}else"radius"in v&&(f=0|v.radius),"width"in v?(f=0|v.width,"height"in v&&re(v.height===f,"must be square")):"height"in v&&(f=0|v.height);("color"in v||"colors"in v)&&(h=v.color||v.colors,Array.isArray(h)&&re(1===h.length||r.webgl_draw_buffers,"multiple render targets not supported")),h||("colorCount"in v&&(g=0|v.colorCount,re(g>0,"invalid color buffer count")),"colorType"in v&&(re.oneOf(v.colorType,u,"invalid color type"),m=v.colorType),"colorFormat"in v&&(p=v.colorFormat,re.oneOf(v.colorFormat,l,"invalid color format for texture"))),"depth"in v&&(d.depth=v.depth),"stencil"in v&&(d.stencil=v.stencil),"depthStencil"in v&&(d.depthStencil=v.depthStencil)}else f=1;if(h)if(Array.isArray(h))for(c=[],n=0;n0&&(d.depth=o[0].depth,d.stencil=o[0].stencil,d.depthStencil=o[0].depthStencil),o[n]?o[n](d):o[n]=T(d)}return t(a,{width:f,height:f,color:c})}function c(e){var t,r=0|e;if(re(r>0&&r<=n.maxCubeMapSize,"invalid radius for cube fbo"),r===a.width)return a;var i=a.color;for(t=0;t{for(var e=Object.keys(t),r=0;r=0,'invalid option for vao: "'+e[r]+'" valid options are '+Zi)})),re(Array.isArray(i),"attributes must be an array")}re(i.length0,"must specify at least one attribute");var u={},d=n.attributes;d.length=i.length;for(var f=0;f=g.byteLength?h.subdata(g):(h.destroy(),n.buffers[f]=null)),n.buffers[f]||(h=n.buffers[f]=o.create(p,Fi,!1,!0)),m.buffer=o.getBuffer(h),m.size=0|m.buffer.dimension,m.normalized=!1,m.type=m.buffer.dtype,m.offset=0,m.stride=0,m.divisor=0,m.state=1,u[f]=1):o.getBuffer(p)?(m.buffer=o.getBuffer(p),m.size=0|m.buffer.dimension,m.normalized=!1,m.type=m.buffer.dtype,m.offset=0,m.stride=0,m.divisor=0,m.state=1):o.getBuffer(p.buffer)?(m.buffer=o.getBuffer(p.buffer),m.size=0|(+p.size||m.buffer.dimension),m.normalized=!!p.normalized||!1,"type"in p?(re.parameter(p.type,Rt,"invalid buffer type"),m.type=Rt[p.type]):m.type=m.buffer.dtype,m.offset=0|(p.offset||0),m.stride=0|(p.stride||0),m.divisor=0|(p.divisor||0),m.state=1,re(m.size>=1&&m.size<=4,"size must be between 1 and 4"),re(m.offset>=0,"invalid offset"),re(m.stride>=0&&m.stride<=255,"stride must be between 0 and 255"),re(m.divisor>=0,"divisor must be positive"),re(!m.divisor||!!r.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in p?(re(f>0,"first attribute must not be a constant"),m.x=+p.x||0,m.y=+p.y||0,m.z=+p.z||0,m.w=+p.w||0,m.state=2):re(!1,"invalid attribute spec for location "+f)}for(var v=0;v1)for(var v=0;v1&&(x=x.replace("[0]","")),l(g,new s(x,r.id(x),e.getUniformLocation(h,x),u))}var b=e.getProgramParameter(h,qi);i.profile&&(t.stats.attributesCount=b);var w=t.attributes;for(a=0;ae&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return d.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);St(o).forEach(t),o={},St(a).forEach(t),a={},d.forEach((function(t){e.deleteProgram(t.program)})),d.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){re.command(r>=0,"missing vertex shader",s),re.command(i>=0,"missing fragment shader",s);var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new h(i,r);return n.shaderCount++,p(m,s,l),f||(c[r]=m),d.push(m),t(m,{destroy:function(){if(m.refCount--,m.refCount<=0){e.deleteProgram(m.program);var t=d.indexOf(m);d.splice(t,1),n.shaderCount--}c[m.vertId].refCount<=0&&(e.deleteShader(a[m.vertId]),delete a[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(e.deleteShader(o[m.fragId]),delete o[m.fragId],delete u[m.fragId])}})},restore:m,shader:c,frag:-1,vert:-1}}var Xi=6408,Ki=5121,$i=3333,Ji=5126;function Qi(t,r,n,i,o,a,s){function l(l){var c;null===r.next?(re(o.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),c=Ki):(re(null!==r.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),c=r.next.colorAttachments[0].texture._texture.type,re.optional((function(){a.oes_texture_float?(re(c===Ki||c===Ji,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),c===Ji&&re(s.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):re(c===Ki,"Reading from a framebuffer is only allowed for the type 'uint8'")})));var u=0,d=0,f=i.framebufferWidth,h=i.framebufferHeight,p=null;e(l)?p=l:l&&(re.type(l,"object","invalid arguments to regl.read()"),u=0|l.x,d=0|l.y,re(u>=0&&u=0&&d0&&f+u<=i.framebufferWidth,"invalid width for read pixels"),re(h>0&&h+d<=i.framebufferHeight,"invalid height for read pixels"),n();var m=f*h*4;return p||(c===Ki?p=new Uint8Array(m):c===Ji&&(p=p||new Float32Array(m))),re.isTypedArray(p,"data buffer for regl.read() must be a typedarray"),re(p.byteLength>=m,"data buffer for regl.read() too small"),t.pixelStorei($i,4),t.readPixels(u,d,f,h,Xi,c,p),p}function c(e){var t;return r.setFBO({framebuffer:e.framebuffer},(function(){t=l(e)})),t}function u(e){return e&&"framebuffer"in e?c(e):l(e)}return u}function eo(e){return Array.prototype.slice.call(e)}function to(e){return eo(e).join("")}function ro(){var e=0,r=[],n=[];function i(t){for(var i=0;i0&&(r.push(t,"="),r.push.apply(r,eo(arguments)),r.push(";")),t}return t(n,{def:o,toString:function(){return to([i.length>0?"var "+i.join(",")+";":"",to(r)])}})}function a(){var e=o(),r=o(),n=e.toString,i=r.toString;function a(t,n){r(t,n,"=",e.def(t,n),";")}return t((function(){e.apply(e,eo(arguments))}),{def:e.def,entry:e,exit:r,save:a,set:function(t,r,n){a(t,r),e(t,r,"=",n,";")},toString:function(){return n()+i()}})}function s(){var e=to(arguments),r=a(),n=a(),i=r.toString,o=n.toString;return t(r,{then:function(){return r.apply(r,eo(arguments)),this},else:function(){return n.apply(n,eo(arguments)),this},toString:function(){var t=o();return t&&(t="else{"+t+"}"),to(["if(",e,"){",i(),"}",t])}})}var l=o(),c={};function u(e,r){var n=[];function i(){var e="a"+n.length;return n.push(e),e}r=r||0;for(var o=0;o":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},rs={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ns={frag:35632,vert:35633},is={cw:Za,ccw:Ua};function os(t){return Array.isArray(t)||e(t)||kt(t)}function as(e){return e.sort((function(e,t){return e===Zo?-1:t===Zo?1:e=1,n>=2,t)}if(r===fo){var i=e.data;return new ss(i.thisDep,i.contextDep,i.propDep,t)}if(r===ho)return new ss(!1,!1,!1,t);if(r===po){for(var o=!1,a=!1,s=!1,l=0;l=1&&(a=!0),u>=2&&(s=!0)}else c.type===fo&&(o=o||c.data.thisDep,a=a||c.data.contextDep,s=s||c.data.propDep)}return new ss(o,a,s,t)}return new ss(r===uo,r===co,r===lo,t)}var ds=new ss(!1,!1,!1,(function(){}));function fs(e,r,n,i,o,a,s,l,c,u,d,f,h,p,m){var g=u.Record,v={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(v.min=Va,v.max=Ha);var y=n.angle_instanced_arrays,x=n.webgl_draw_buffers,b=n.oes_vertex_array_object,w={dirty:!0,profile:m.profile},_={},k=[],S={},T={};function M(e){return e.replace(".","_")}function C(e,t,r){var n=M(e);k.push(e),_[n]=w[n]=!!r,S[n]=t}function A(e,t,r){var n=M(e);k.push(e),Array.isArray(r)?(w[n]=r.slice(),_[n]=r.slice()):w[n]=_[n]=r,T[n]=t}C(mo,pa),C(go,ha),A(vo,"blendColor",[0,0,0,0]),A(yo,"blendEquationSeparate",[Xa,Xa]),A(xo,"blendFuncSeparate",[Ya,qa,Ya,qa]),C(bo,ga,!0),A(wo,"depthFunc",Ka),A(_o,"depthRange",[0,1]),A(ko,"depthMask",!0),A(So,So,[!0,!0,!0,!0]),C(To,fa),A(Mo,"cullFace",Ba),A(Co,Co,Ua),A(Ao,Ao,1),C(Eo,ya),A(Io,"polygonOffset",[0,0]),C(Oo,xa),C(Po,ba),A(Ro,"sampleCoverage",[1,!1]),C(Lo,ma),A(jo,"stencilMask",-1),A(Do,"stencilFunc",[Wa,0,-1]),A(zo,"stencilOpSeparate",[Fa,Ga,Ga,Ga]),A(No,"stencilOpSeparate",[Ba,Ga,Ga,Ga]),C(Fo,va),A(Bo,"scissor",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]),A(Zo,Zo,[0,0,e.drawingBufferWidth,e.drawingBufferHeight]);var E={gl:e,context:h,strings:r,next:_,current:w,draw:f,elements:a,buffer:o,shader:d,attributes:u.state,vao:u,uniforms:c,framebuffer:l,extensions:n,timer:p,isBufferArgs:os},I={primTypes:Gt,compareFuncs:ts,blendFuncs:Qa,blendEquations:v,stencilOps:rs,glTypes:Rt,orientationType:is};re.optional((function(){E.isArrayLike=ur})),x&&(I.backBuffer=[Ba],I.drawBuffer=Me(i.maxDrawbuffers,(function(e){return 0===e?[0]:Me(e,(function(e){return Ja+e}))})));var O=0;function P(){var e=ro(),t=e.link,n=e.global;e.id=O++,e.batchId="0";var i=t(E),o=e.shared={props:"a0"};Object.keys(E).forEach((function(e){o[e]=n.def(i,".",e)})),re.optional((function(){e.CHECK=t(re),e.commandStr=re.guessCommand(),e.command=t(e.commandStr),e.assert=function(e,r,n){e("if(!(",r,"))",this.CHECK,".commandRaise(",t(n),",",this.command,");")},I.invalidBlendCombinations=es}));var a=e.next={},s=e.current={};Object.keys(T).forEach((function(e){Array.isArray(w[e])&&(a[e]=n.def(o.next,".",e),s[e]=n.def(o.current,".",e))}));var l=e.constants={};Object.keys(I).forEach((function(e){l[e]=n.def(JSON.stringify(I[e]))})),e.invoke=function(r,n){switch(n.type){case so:var i=["this",o.context,o.props,e.batchId];return r.def(t(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case lo:return r.def(o.props,n.data);case co:return r.def(o.context,n.data);case uo:return r.def("this",n.data);case fo:return n.data.append(e,r),n.data.ref;case ho:return n.data.toString();case po:return n.data.map((function(t){return e.invoke(r,t)}))}},e.attribCache={};var c={};return e.scopeAttrib=function(e){var n=r.id(e);if(n in c)return c[n];var i=u.scope[n];return i||(i=u.scope[n]=new g),c[n]=t(i)},e}function R(e){var t,r=e.static,n=e.dynamic;if(Uo in r){var i=!!r[Uo];(t=cs((function(e,t){return i}))).enable=i}else if(Uo in n){var o=n[Uo];t=us(o,(function(e,t){return e.invoke(t,o)}))}return t}function L(e,t){var r=e.static,n=e.dynamic;if(Vo in r){var i=r[Vo];return i?(i=l.getFramebuffer(i),re.command(i,"invalid framebuffer object"),cs((function(e,t){var r=e.link(i),n=e.shared;t.set(n.framebuffer,".next",r);var o=n.context;return t.set(o,"."+ea,r+".width"),t.set(o,"."+ta,r+".height"),r}))):cs((function(e,t){var r=e.shared;t.set(r.framebuffer,".next","null");var n=r.context;return t.set(n,"."+ea,n+"."+oa),t.set(n,"."+ta,n+"."+aa),"null"}))}if(Vo in n){var o=n[Vo];return us(o,(function(e,t){var r=e.invoke(t,o),n=e.shared,i=n.framebuffer,a=t.def(i,".getFramebuffer(",r,")");re.optional((function(){e.assert(t,"!"+r+"||"+a,"invalid framebuffer object")})),t.set(i,".next",a);var s=n.context;return t.set(s,"."+ea,a+"?"+a+".width:"+s+"."+oa),t.set(s,"."+ta,a+"?"+a+".height:"+s+"."+aa),a}))}return null}function j(e,t,r){var n=e.static,i=e.dynamic;function o(e){if(e in n){var o=n[e];re.commandType(o,"object","invalid "+e,r.commandStr);var a,s,l=!0,c=0|o.x,u=0|o.y;return"width"in o?(a=0|o.width,re.command(a>=0,"invalid "+e,r.commandStr)):l=!1,"height"in o?(s=0|o.height,re.command(s>=0,"invalid "+e,r.commandStr)):l=!1,new ss(!l&&t&&t.thisDep,!l&&t&&t.contextDep,!l&&t&&t.propDep,(function(e,t){var r=e.shared.context,n=a;"width"in o||(n=t.def(r,".",ea,"-",c));var i=s;return"height"in o||(i=t.def(r,".",ta,"-",u)),[c,u,n,i]}))}if(e in i){var d=i[e],f=us(d,(function(t,r){var n=t.invoke(r,d);re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)}));var i=t.shared.context,o=r.def(n,".x|0"),a=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",ea,"-",o,")"),l=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",ta,"-",a,")");return re.optional((function(){t.assert(r,s+">=0&&"+l+">=0","invalid "+e)})),[o,a,s,l]}));return t&&(f.thisDep=f.thisDep||t.thisDep,f.contextDep=f.contextDep||t.contextDep,f.propDep=f.propDep||t.propDep),f}return t?new ss(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".",ea),t.def(r,".",ta)]})):null}var a=o(Zo);if(a){var s=a;a=new ss(a.thisDep,a.contextDep,a.propDep,(function(e,t){var r=s.append(e,t),n=e.shared.context;return t.set(n,"."+ra,r[2]),t.set(n,"."+na,r[3]),r}))}return{viewport:a,scissor_box:o(Bo)}}function D(e,t){var r=e.static;if("string"===typeof r[Wo]&&"string"===typeof r[Ho]){if(Object.keys(t.dynamic).length>0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"===typeof n[i[0]]){for(var o=[],a=0;a=0,"invalid "+e,t.commandStr),cs((function(e,t){return a&&(e.OFFSET=s),s}))}if(e in n){var u=n[e];return us(u,(function(t,r){var n=t.invoke(r,u);return a&&(t.OFFSET=n,re.optional((function(){t.assert(r,n+">=0","invalid "+e)}))),n}))}if(a){if(c)return cs((function(e,t){return e.OFFSET=0,0}));if(o)return new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.offset:0")}))}else if(o)return new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.instances:-1")}));return null}var m=p(Xo,!0);function g(){if(Yo in r){var e=0|r[Yo];return i.count=e,re.command("number"===typeof e&&e>=0,"invalid vertex count",t.commandStr),cs((function(){return e}))}if(Yo in n){var a=n[Yo];return us(a,(function(e,t){var r=e.invoke(t,a);return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">=0&&"+r+"===("+r+"|0)","invalid vertex count")})),r}))}if(c){if(ls(f)){if(f)return m?new ss(m.thisDep,m.contextDep,m.propDep,(function(e,t){var r=t.def(e.ELEMENTS,".vertCount-",e.OFFSET);return re.optional((function(){e.assert(t,r+">=0","invalid vertex offset/element buffer too small")})),r})):cs((function(e,t){return t.def(e.ELEMENTS,".vertCount")}));var s=cs((function(){return-1}));return re.optional((function(){s.MISSING=!0})),s}var u=new ss(f.thisDep||m.thisDep,f.contextDep||m.contextDep,f.propDep||m.propDep,(function(e,t){var r=e.ELEMENTS;return e.OFFSET?t.def(r,"?",r,".vertCount-",e.OFFSET,":-1"):t.def(r,"?",r,".vertCount:-1")}));return re.optional((function(){u.DYNAMIC=!0})),u}if(o){var d=new ss(l.thisDep,l.contextDep,l.propDep,(function(e,t){return t.def(e.shared.vao,".currentVAO?",e.shared.vao,".currentVAO.count:-1")}));return d}return null}var v=h(),y=g(),x=p(Ko,!1);return{elements:f,primitive:v,count:y,instances:x,offset:m,vao:l,vaoActive:o,elementsActive:c,static:i}}function F(e,t){var r=e.static,n=e.dynamic,o={};return k.forEach((function(e){var a=M(e);function s(t,i){if(e in r){var s=t(r[e]);o[a]=cs((function(){return s}))}else if(e in n){var l=n[e];o[a]=us(l,(function(e,t){return i(e,t,e.invoke(t,l))}))}}switch(e){case To:case go:case mo:case Lo:case bo:case Fo:case Eo:case Oo:case Po:case ko:return s((function(r){return re.commandType(r,"boolean",e,t.commandStr),r}),(function(t,r,n){return re.optional((function(){t.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+e,t.commandStr)})),n}));case wo:return s((function(r){return re.commandParameter(r,ts,"invalid "+e,t.commandStr),ts[r]}),(function(t,r,n){var i=t.constants.compareFuncs;return re.optional((function(){t.assert(r,n+" in "+i,"invalid "+e+", must be one of "+Object.keys(ts))})),r.def(i,"[",n,"]")}));case _o:return s((function(e){return re.command(ur(e)&&2===e.length&&"number"===typeof e[0]&&"number"===typeof e[1]&&e[0]<=e[1],"depth range is 2d array",t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")})),[t.def("+",r,"[0]"),t.def("+",r,"[1]")]}));case xo:return s((function(e){re.commandType(e,"object","blend.func",t.commandStr);var r="srcRGB"in e?e.srcRGB:e.src,n="srcAlpha"in e?e.srcAlpha:e.src,i="dstRGB"in e?e.dstRGB:e.dst,o="dstAlpha"in e?e.dstAlpha:e.dst;return re.commandParameter(r,Qa,a+".srcRGB",t.commandStr),re.commandParameter(n,Qa,a+".srcAlpha",t.commandStr),re.commandParameter(i,Qa,a+".dstRGB",t.commandStr),re.commandParameter(o,Qa,a+".dstAlpha",t.commandStr),re.command(-1===es.indexOf(r+", "+i),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",t.commandStr),[Qa[r],Qa[i],Qa[n],Qa[o]]}),(function(t,r,n){var i=t.constants.blendFuncs;function o(o,a){var s=r.def('"',o,a,'" in ',n,"?",n,".",o,a,":",n,".",o);return re.optional((function(){t.assert(r,s+" in "+i,"invalid "+e+"."+o+a+", must be one of "+Object.keys(Qa))})),s}re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")}));var a=o("src","RGB"),s=o("dst","RGB");re.optional((function(){var e=t.constants.invalidBlendCombinations;t.assert(r,e+".indexOf("+a+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")}));var l=r.def(i,"[",a,"]"),c=r.def(i,"[",o("src","Alpha"),"]");return[l,r.def(i,"[",s,"]"),c,r.def(i,"[",o("dst","Alpha"),"]")]}));case yo:return s((function(r){return"string"===typeof r?(re.commandParameter(r,v,"invalid "+e,t.commandStr),[v[r],v[r]]):"object"===typeof r?(re.commandParameter(r.rgb,v,e+".rgb",t.commandStr),re.commandParameter(r.alpha,v,e+".alpha",t.commandStr),[v[r.rgb],v[r.alpha]]):void re.commandRaise("invalid blend.equation",t.commandStr)}),(function(t,r,n){var i=t.constants.blendEquations,o=r.def(),a=r.def(),s=t.cond("typeof ",n,'==="string"');return re.optional((function(){function r(e,r,n){t.assert(e,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(v))}r(s.then,e,n),t.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+e),r(s.else,e+".rgb",n+".rgb"),r(s.else,e+".alpha",n+".alpha")})),s.then(o,"=",a,"=",i,"[",n,"];"),s.else(o,"=",i,"[",n,".rgb];",a,"=",i,"[",n,".alpha];"),r(s),[o,a]}));case vo:return s((function(e){return re.command(ur(e)&&4===e.length,"blend.color must be a 4d array",t.commandStr),Me(4,(function(t){return+e[t]}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")})),Me(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case jo:return s((function(e){return re.commandType(e,"number",a,t.commandStr),0|e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"',"invalid stencil.mask")})),t.def(r,"|0")}));case Do:return s((function(r){re.commandType(r,"object",a,t.commandStr);var n=r.cmp||"keep",i=r.ref||0,o="mask"in r?r.mask:-1;return re.commandParameter(n,ts,e+".cmp",t.commandStr),re.commandType(i,"number",e+".ref",t.commandStr),re.commandType(o,"number",e+".mask",t.commandStr),[ts[n],i,o]}),(function(e,t,r){var n=e.constants.compareFuncs;return re.optional((function(){function i(){e.assert(t,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")})),[t.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",Ga),t.def(r,".ref|0"),t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case zo:case No:return s((function(r){re.commandType(r,"object",a,t.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",o=r.zpass||"keep";return re.commandParameter(n,rs,e+".fail",t.commandStr),re.commandParameter(i,rs,e+".zfail",t.commandStr),re.commandParameter(o,rs,e+".zpass",t.commandStr),[e===No?Ba:Fa,rs[n],rs[i],rs[o]]}),(function(t,r,n){var i=t.constants.stencilOps;function o(o){return re.optional((function(){t.assert(r,'!("'+o+'" in '+n+")||("+n+"."+o+" in "+i+")","invalid "+e+"."+o+", must be one of "+Object.keys(rs))})),r.def('"',o,'" in ',n,"?",i,"[",n,".",o,"]:",Ga)}return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[e===No?Ba:Fa,o("fail"),o("zfail"),o("zpass")]}));case Io:return s((function(e){re.commandType(e,"object",a,t.commandStr);var r=0|e.factor,n=0|e.units;return re.commandType(r,"number",a+".factor",t.commandStr),re.commandType(n,"number",a+".units",t.commandStr),[r,n]}),(function(t,r,n){return re.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[r.def(n,".factor|0"),r.def(n,".units|0")]}));case Mo:return s((function(e){var r=0;return"front"===e?r=Fa:"back"===e&&(r=Ba),re.command(!!r,a,t.commandStr),r}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="front"||'+r+'==="back"',"invalid cull.face")})),t.def(r,'==="front"?',Fa,":",Ba)}));case Ao:return s((function(e){return re.command("number"===typeof e&&e>=i.lineWidthDims[0]&&e<=i.lineWidthDims[1],"invalid line width, must be a positive number between "+i.lineWidthDims[0]+" and "+i.lineWidthDims[1],t.commandStr),e}),(function(e,t,r){return re.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">="+i.lineWidthDims[0]+"&&"+r+"<="+i.lineWidthDims[1],"invalid line width")})),r}));case Co:return s((function(e){return re.commandParameter(e,is,a,t.commandStr),is[e]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")})),t.def(r+'==="cw"?'+Za+":"+Ua)}));case So:return s((function(e){return re.command(ur(e)&&4===e.length,"color.mask must be length 4 array",t.commandStr),e.map((function(e){return!!e}))}),(function(e,t,r){return re.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")})),Me(4,(function(e){return"!!"+r+"["+e+"]"}))}));case Ro:return s((function(e){re.command("object"===typeof e&&e,a,t.commandStr);var r="value"in e?e.value:1,n=!!e.invert;return re.command("number"===typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",t.commandStr),[r,n]}),(function(e,t,r){return re.optional((function(){e.assert(t,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")})),[t.def('"value" in ',r,"?+",r,".value:1"),t.def("!!",r,".invert")]}))}})),o}function B(e,t){var r=e.static,n=e.dynamic,i={};return Object.keys(r).forEach((function(e){var n,o=r[e];if("number"===typeof o||"boolean"===typeof o)n=cs((function(){return o}));else if("function"===typeof o){var a=o._reglType;"texture2d"===a||"textureCube"===a?n=cs((function(e){return e.link(o)})):"framebuffer"===a||"framebufferCube"===a?(re.command(o.color.length>0,'missing color attachment for framebuffer sent to uniform "'+e+'"',t.commandStr),n=cs((function(e){return e.link(o.color[0])}))):re.commandRaise('invalid data for uniform "'+e+'"',t.commandStr)}else ur(o)?n=cs((function(t){return t.global.def("[",Me(o.length,(function(r){return re.command("number"===typeof o[r]||"boolean"===typeof o[r],"invalid uniform "+e,t.commandStr),o[r]})),"]")})):re.commandRaise('invalid or missing data for uniform "'+e+'"',t.commandStr);n.value=o,i[e]=n})),Object.keys(n).forEach((function(e){var t=n[e];i[e]=us(t,(function(e,r){return e.invoke(r,t)}))})),i}function Z(e,t){var n=e.static,i=e.dynamic,a={};return Object.keys(n).forEach((function(e){var i=n[e],s=r.id(e),l=new g;if(os(i))l.state=oo,l.buffer=o.getBuffer(o.create(i,la,!1,!0)),l.type=0;else{var c=o.getBuffer(i);if(c)l.state=oo,l.buffer=c,l.type=0;else if(re.command("object"===typeof i&&i,"invalid data for attribute "+e,t.commandStr),"constant"in i){var u=i.constant;l.buffer="null",l.state=ao,"number"===typeof u?l.x=u:(re.command(ur(u)&&u.length>0&&u.length<=4,"invalid constant for attribute "+e,t.commandStr),no.forEach((function(e,t){t=0,'invalid offset for attribute "'+e+'"',t.commandStr);var f=0|i.stride;re.command(f>=0&&f<256,'invalid stride for attribute "'+e+'", must be integer betweeen [0, 255]',t.commandStr);var h=0|i.size;re.command(!("size"in i)||h>0&&h<=4,'invalid size for attribute "'+e+'", must be 1,2,3,4',t.commandStr);var p=!!i.normalized,m=0;"type"in i&&(re.commandParameter(i.type,Rt,"invalid type for attribute "+e,t.commandStr),m=Rt[i.type]);var v=0|i.divisor;re.optional((function(){"divisor"in i&&(re.command(0===v||y,'cannot specify divisor for attribute "'+e+'", instancing not supported',t.commandStr),re.command(v>=0,'invalid divisor for attribute "'+e+'"',t.commandStr));var r=t.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(i).forEach((function(t){re.command(n.indexOf(t)>=0,'unknown parameter "'+t+'" for attribute pointer "'+e+'" (valid parameters are '+n+")",r)}))})),l.buffer=c,l.state=oo,l.size=h,l.normalized=p,l.type=m||c.dtype,l.offset=d,l.stride=f,l.divisor=v}}a[e]=cs((function(e,t){var r=e.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(l).forEach((function(e){n[e]=l[e]})),l.buffer&&(n.buffer=e.link(l.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n}))})),Object.keys(i).forEach((function(e){var t=i[e];function r(r,n){var i=r.invoke(n,t),o=r.shared,a=r.constants,s=o.isBufferArgs,l=o.buffer;re.optional((function(){r.assert(n,i+"&&(typeof "+i+'==="object"||typeof '+i+'==="function")&&('+s+"("+i+")||"+l+".getBuffer("+i+")||"+l+".getBuffer("+i+".buffer)||"+s+"("+i+'.buffer)||("constant" in '+i+"&&(typeof "+i+'.constant==="number"||'+o.isArrayLike+"("+i+".constant))))",'invalid dynamic attribute "'+e+'"')}));var c={isStream:n.def(!1)},u=new g;u.state=oo,Object.keys(u).forEach((function(e){c[e]=n.def(""+u[e])}));var d=c.buffer,f=c.type;function h(e){n(c[e],"=",i,".",e,"|0;")}return n("if(",s,"(",i,")){",c.isStream,"=true;",d,"=",l,".createStream(",la,",",i,");",f,"=",d,".dtype;","}else{",d,"=",l,".getBuffer(",i,");","if(",d,"){",f,"=",d,".dtype;",'}else if("constant" in ',i,"){",c.state,"=",ao,";","if(typeof "+i+'.constant === "number"){',c[no[0]],"=",i,".constant;",no.slice(1).map((function(e){return c[e]})).join("="),"=0;","}else{",no.map((function(e,t){return c[e]+"="+i+".constant.length>"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",d,"=",l,".createStream(",la,",",i,".buffer);","}else{",d,"=",l,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",a.glTypes,"[",i,".type]:",d,".dtype;",c.normalized,"=!!",i,".normalized;"),h("size"),h("offset"),h("stride"),h("divisor"),n("}}"),n.exit("if(",c.isStream,"){",l,".destroyStream(",d,");","}"),c}a[e]=us(t,r)})),a}function U(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=cs((function(e,t){return"number"===typeof r||"boolean"===typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=us(t,(function(e,r){return e.invoke(r,t)}))})),n}function V(e,t,r,i,o){var a=e.static,s=e.dynamic;re.optional((function(){var e=[Vo,Ho,Wo,Go,qo,Xo,Yo,Ko,Uo,$o].concat(k);function t(t){Object.keys(t).forEach((function(t){re.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',o.commandStr)}))}t(a),t(s)}));var l=D(e,t),c=L(e,o),d=j(e,c,o),f=N(e,o),h=F(e,o),p=z(e,o,l);function m(e){var t=d[e];t&&(h[e]=t)}m(Zo),m(M(Bo));var g=Object.keys(h).length>0,v={framebuffer:c,draw:f,shader:p,state:h,dirty:g,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(v.profile=R(e,o),v.uniforms=B(r,o),v.drawVAO=v.scopeVAO=f.vao,!v.drawVAO&&p.program&&!l&&n.angle_instanced_arrays&&f.static.elements){var y=!0,x=p.program.attributes.map((function(e){var r=t.static[e];return y=y&&!!r,r}));if(y&&x.length>0){var b=u.getVAO(u.createVAO({attributes:x,elements:f.static.elements}));v.drawVAO=new ss(null,null,null,(function(e,t){return e.link(b)})),v.useVAO=!0}}return l?v.useVAO=!0:v.attributes=Z(t,o),v.context=U(i,o),v}function H(e,t,r){var n=e.shared.context,i=e.scope();Object.keys(r).forEach((function(o){t.save(n,"."+o);var a=r[o].append(e,t);Array.isArray(a)?i(n,".",o,"=[",a.join(),"];"):i(n,".",o,"=",a,";")})),t(i)}function W(e,t,r,n){var i,o=e.shared,a=o.gl,s=o.framebuffer;x&&(i=t.def(o.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,d=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),n||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",a,".bindFramebuffer(",$a,",",l,".framebuffer);"),x&&t(i,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",a,".bindFramebuffer(",$a,",null);"),x&&t(i,".drawBuffersWEBGL(",d,");"),t("}",s,".cur=",l,";"),n||t("}")}function G(e,t,r){var n=e.shared,i=n.gl,o=e.current,a=e.next,s=n.current,l=n.next,c=e.cond(s,".dirty");k.forEach((function(t){var n,u,d=M(t);if(!(d in r.state))if(d in a){n=a[d],u=o[d];var f=Me(w[d].length,(function(e){return c.def(n,"[",e,"]")}));c(e.cond(f.map((function(e,t){return e+"!=="+u+"["+t+"]"})).join("||")).then(i,".",T[d],"(",f,");",f.map((function(e,t){return u+"["+t+"]="+e})).join(";"),";"))}else{n=c.def(l,".",d);var h=e.cond(n,"!==",s,".",d);c(h),d in S?h(e.cond(n).then(i,".enable(",S[d],");").else(i,".disable(",S[d],");"),s,".",d,"=",n,";"):h(i,".",T[d],"(",n,");",s,".",d,"=",n,";")}})),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function q(e,t,r,n){var i=e.shared,o=e.current,a=i.current,s=i.gl;as(Object.keys(r)).forEach((function(i){var l=r[i];if(!n||n(l)){var c=l.append(e,t);if(S[i]){var u=S[i];ls(l)?t(s,c?".enable(":".disable(",u,");"):t(e.cond(c).then(s,".enable(",u,");").else(s,".disable(",u,");")),t(a,".",i,"=",c,";")}else if(ur(c)){var d=o[i];t(s,".",T[i],"(",c,");",c.map((function(e,t){return d+"["+t+"]="+e})).join(";"),";")}else t(s,".",T[i],"(",c,");",a,".",i,"=",c,";")}}))}function Y(e,t){y&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function X(e,t,r,n,i){var o,a,s,l=e.shared,c=e.stats,u=l.current,d=l.timer,f=r.profile;function h(){return"undefined"===typeof performance?"Date.now()":"performance.now()"}function m(e){e(o=t.def(),"=",h(),";"),"string"===typeof i?e(c,".count+=",i,";"):e(c,".count++;"),p&&(n?e(a=t.def(),"=",d,".getNumPendingQueries();"):e(d,".beginQuery(",c,");"))}function g(e){e(c,".cpuTime+=",h(),"-",o,";"),p&&(n?e(d,".pushScopeStats(",a,",",d,".getNumPendingQueries(),",c,");"):e(d,".endQuery();"))}function v(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(ls(f))return void(f.enable?(m(t),g(t.exit),v("true")):v("false"));v(s=f.append(e,t))}else s=t.def(u,".profile");var y=e.block();m(y),t("if(",s,"){",y,"}");var x=e.block();g(x),t.exit("if(",s,"){",x,"}")}function K(e,t,r,n,i){var o=e.shared;function a(e){switch(e){case _a:case Ma:case Ia:return 2;case ka:case Ca:case Oa:return 3;case Sa:case Aa:case Pa:return 4;default:return 1}}function s(r,n,i){var a=o.gl,s=t.def(r,".location"),l=t.def(o.attributes,"[",s,"]"),c=i.state,u=i.buffer,d=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function h(){t("if(!",l,".buffer){",a,".enableVertexAttribArray(",s,");}");var r,o=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",o,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",a,".bindBuffer(",la,",",u,".buffer);",a,".vertexAttribPointer(",[s,r,o,i.normalized,i.stride,i.offset],");",l,".type=",o,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),y){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",a,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",no.map((function(e,t){return l+"."+e+"!=="+d[t]})).join("||"),"){",a,".vertexAttrib4f(",s,",",d,");",no.map((function(e,t){return l+"."+e+"="+d[t]+";"})).join(""),"}")}c===oo?h():c===ao?p():(t("if(",c,"===",oo,"){"),h(),t("}else{"),p(),t("}"))}n.forEach((function(n){var o,l=n.name,c=r.attributes[l];if(c){if(!i(c))return;o=c.append(e,t)}else{if(!i(ds))return;var u=e.scopeAttrib(l);re.optional((function(){e.assert(t,u+".state","missing attribute "+l)})),o={},Object.keys(new g).forEach((function(e){o[e]=t.def(u,".",e)}))}s(e.link(n),a(n.info.type),o)}))}function $(e,t,n,i,o,a){for(var s,l=e.shared,c=l.gl,u={},d=0;d1){if(!g)continue;var v=h.replace("[0]","");if(u[v])continue;u[v]=1}var y,x=e.link(f)+".location";if(g){if(!o(g))continue;if(ls(g)){var b=g.value;if(re.command(null!==b&&"undefined"!==typeof b,'missing uniform "'+h+'"',e.commandStr),p===Da||p===za){re.command("function"===typeof b&&(p===Da&&("texture2d"===b._reglType||"framebuffer"===b._reglType)||p===za&&("textureCube"===b._reglType||"framebufferCube"===b._reglType)),"invalid texture for uniform "+h,e.commandStr);var w=e.link(b._texture||b.color[0]._texture);t(c,".uniform1i(",x,",",w+".bind());"),t.exit(w,".unbind();")}else if(p===Ra||p===La||p===ja){re.optional((function(){re.command(ur(b),"invalid matrix for uniform "+h,e.commandStr),re.command(p===Ra&&4===b.length||p===La&&9===b.length||p===ja&&16===b.length,"invalid length for matrix uniform "+h,e.commandStr)}));var _=e.global.def("new Float32Array(["+Array.prototype.slice.call(b)+"])"),k=2;p===La?k=3:p===ja&&(k=4),t(c,".uniformMatrix",k,"fv(",x,",false,",_,");")}else{switch(p){case wa:1===m?re.commandType(b,"number","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1f";break;case _a:re.command(ur(b)&&b.length&&b.length%2===0&&b.length<=2*m,"uniform "+h,e.commandStr),s="2f";break;case ka:re.command(ur(b)&&b.length&&b.length%3===0&&b.length<=3*m,"uniform "+h,e.commandStr),s="3f";break;case Sa:re.command(ur(b)&&b.length&&b.length%4===0&&b.length<=4*m,"uniform "+h,e.commandStr),s="4f";break;case Ea:1===m?re.commandType(b,"boolean","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1i";break;case Ta:1===m?re.commandType(b,"number","uniform "+h,e.commandStr):re.command(ur(b)&&b.length===m,"uniform "+h,e.commandStr),s="1i";break;case Ia:case Ma:re.command(ur(b)&&b.length&&b.length%2===0&&b.length<=2*m,"uniform "+h,e.commandStr),s="2i";break;case Oa:case Ca:re.command(ur(b)&&b.length&&b.length%3===0&&b.length<=3*m,"uniform "+h,e.commandStr),s="3i";break;case Pa:case Aa:re.command(ur(b)&&b.length&&b.length%4===0&&b.length<=4*m,"uniform "+h,e.commandStr),s="4i"}m>1?(s+="v",b=e.global.def("["+Array.prototype.slice.call(b)+"]")):b=ur(b)?Array.prototype.slice.call(b):b,t(c,".uniform",s,"(",x,",",b,");")}continue}y=g.append(e,t)}else{if(!o(ds))continue;y=t.def(l.uniforms,"[",r.id(h),"]")}p===Da?(re(!Array.isArray(y),"must specify a scalar prop for textures"),t("if(",y,"&&",y,'._reglType==="framebuffer"){',y,"=",y,".color[0];","}")):p===za&&(re(!Array.isArray(y),"must specify a scalar prop for cube maps"),t("if(",y,"&&",y,'._reglType==="framebufferCube"){',y,"=",y,".color[0];","}")),re.optional((function(){function r(r,n){e.assert(t,r,'bad data or missing for uniform "'+h+'". '+n)}function n(e,t){1===t&&re(!Array.isArray(y),"must not specify an array type for uniform"),r("Array.isArray("+y+") && typeof "+y+'[0]===" '+e+'" || typeof '+y+'==="'+e+'"',"invalid type, expected "+e)}function i(t,n,i){Array.isArray(y)?re(y.length&&y.length%t===0&&y.length<=t*i,"must have length of "+(1===i?"":"n * ")+t):r(l.isArrayLike+"("+y+")&&"+y+".length && "+y+".length % "+t+" === 0 && "+y+".length<="+t*i,"invalid vector, should have length of "+(1===i?"":"n * ")+t,e.commandStr)}function o(t){re(!Array.isArray(y),"must not specify a value type"),r("typeof "+y+'==="function"&&'+y+'._reglType==="texture'+(t===ua?"2d":"Cube")+'"',"invalid texture type",e.commandStr)}switch(p){case Ta:n("number",m);break;case Ma:i(2,"number",m);break;case Ca:i(3,"number",m);break;case Aa:i(4,"number",m);break;case wa:n("number",m);break;case _a:i(2,"number",m);break;case ka:i(3,"number",m);break;case Sa:i(4,"number",m);break;case Ea:n("boolean",m);break;case Ia:i(2,"boolean",m);break;case Oa:i(3,"boolean",m);break;case Pa:i(4,"boolean",m);break;case Ra:i(4,"number",m);break;case La:i(9,"number",m);break;case ja:i(16,"number",m);break;case Da:o(ua);break;case za:o(da)}}));var S=1;switch(p){case Da:case za:var T=t.def(y,"._texture");t(c,".uniform1i(",x,",",T,".bind());"),t.exit(T,".unbind();");continue;case Ta:case Ea:s="1i";break;case Ma:case Ia:s="2i",S=2;break;case Ca:case Oa:s="3i",S=3;break;case Aa:case Pa:s="4i",S=4;break;case wa:s="1f";break;case _a:s="2f",S=2;break;case ka:s="3f",S=3;break;case Sa:s="4f",S=4;break;case Ra:s="Matrix2fv";break;case La:s="Matrix3fv";break;case ja:s="Matrix4fv"}if(-1===s.indexOf("Matrix")&&m>1&&(s+="v",S=1),"M"===s.charAt(0)){t(c,".uniform",s,"(",x,",");var M=Math.pow(p-Ra+2,2),C=e.global.def("new Float32Array(",M,")");Array.isArray(y)?t("false,(",Me(M,(function(e){return C+"["+e+"]="+y[e]})),",",C,")"):t("false,(Array.isArray(",y,")||",y," instanceof Float32Array)?",y,":(",Me(M,(function(e){return C+"["+e+"]="+y+"["+e+"]"})),",",C,")"),t(");")}else if(S>1){for(var A=[],E=[],I=0;I=0","missing vertex count")}))):(i=l.def(a,".",Yo),re.optional((function(){e.assert(l,i+">=0","missing vertex count")}))),i}var u=l();function d(i){var o=s[i];return o?o.contextDep&&n.contextDynamic||o.propDep?o.append(e,r):o.append(e,t):t.def(a,".",i)}var f,h,p=d(qo),m=d(Xo),g=c();if("number"===typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");y&&(f=d(Ko),h=e.instancing);var v=u+".type",x=s.elements&&ls(s.elements)&&!s.vaoActive;function w(){function e(){r(h,".drawElementsInstancedANGLE(",[p,g,v,m+"<<(("+v+"-"+io+")>>1)",f],");")}function t(){r(h,".drawArraysInstancedANGLE(",[p,m,g,f],");")}u&&"null"!==u?x?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}function _(){function e(){r(o+".drawElements("+[p,g,v,m+"<<(("+v+"-"+io+")>>1)"]+");")}function t(){r(o+".drawArrays("+[p,m,g]+");")}u&&"null"!==u?x?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}y&&("number"!==typeof f||f>=0)?"string"===typeof f?(r("if(",f,">0){"),w(),r("}else if(",f,"<0){"),_(),r("}")):w():_()}function Q(e,t,r,n,i){var o=P(),a=o.proc("body",i);return re.optional((function(){o.commandStr=t.commandStr,o.command=o.link(t.commandStr)})),y&&(o.instancing=a.def(o.shared.extensions,".angle_instanced_arrays")),e(o,a,r,n),o.compile().body}function ee(e,t,r,n){Y(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),K(e,t,r,n.attributes,(function(){return!0}))),$(e,t,r,n.uniforms,(function(){return!0}),!1),J(e,t,t,r)}function te(e,t){var r=e.proc("draw",1);Y(e,r),H(e,r,t.context),W(e,r,t.framebuffer),G(e,r,t),q(e,r,t.state),X(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)ee(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),o=r.def(n,".id"),a=r.def(i,"[",o,"]");r(e.cond(a).then(a,".call(this,a0);").else(a,"=",i,"[",o,"]=",e.link((function(r){return Q(ee,e,t,r,1)})),"(",n,");",a,".call(this,a0);"))}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function ne(e,t,r,n){function i(){return!0}e.batchId="a1",Y(e,t),K(e,t,r,n.attributes,i),$(e,t,r,n.uniforms,i,!1),J(e,t,t,r)}function ie(e,t,r,n){Y(e,t);var i=r.contextDep,o=t.def(),a="a0",s="a1",l=t.def();e.shared.props=l,e.batchId=o;var c=e.scope(),u=e.scope();function d(e){return e.contextDep&&i||e.propDep}function f(e){return!d(e)}if(t(c.entry,"for(",o,"=0;",o,"<",s,";++",o,"){",l,"=",a,"[",o,"];",u,"}",c.exit),r.needsContext&&H(e,u,r.context),r.needsFramebuffer&&W(e,u,r.framebuffer),q(e,u,r.state,d),r.profile&&d(r.profile)&&X(e,u,r,!1,!0),n)r.useVAO?r.drawVAO?d(r.drawVAO)?u(e.shared.vao,".setVAO(",r.drawVAO.append(e,u),");"):c(e.shared.vao,".setVAO(",r.drawVAO.append(e,c),");"):c(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(c(e.shared.vao,".setVAO(null);"),K(e,c,r,n.attributes,f),K(e,u,r,n.attributes,d)),$(e,c,r,n.uniforms,f,!1),$(e,u,r,n.uniforms,d,!0),J(e,c,u,r);else{var h=e.global.def("{}"),p=r.shader.progVar.append(e,u),m=u.def(p,".id"),g=u.def(h,"[",m,"]");u(e.shared.gl,".useProgram(",p,".program);","if(!",g,"){",g,"=",h,"[",m,"]=",e.link((function(t){return Q(ne,e,r,t,2)})),"(",p,");}",g,".call(this,a0[",o,"],",o,");")}}function oe(e,t){var r=e.proc("batch",2);e.batchId="0",Y(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(H(e,r,t.context),i=!1);var o=t.framebuffer,a=!1;function s(e){return e.contextDep&&n||e.propDep}o?(o.propDep?n=a=!0:o.contextDep&&n&&(a=!0),a||W(e,r,o)):W(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),G(e,r,t),q(e,r,t.state,(function(e){return!s(e)})),t.profile&&s(t.profile)||X(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=a;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)ie(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)ie(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),d=r.def(c,".id"),f=r.def(u,"[",d,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",d,"]=",e.link((function(r){return Q(ie,e,t,r,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}function ae(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,o=i.current;function a(r){var o=t.shader[r];o&&n.set(i.shader,"."+r,o.append(e,n))}H(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),as(Object.keys(t.state)).forEach((function(r){var o=t.state[r].append(e,n);ur(o)?o.forEach((function(t,i){n.set(e.next[r],"["+i+"]",t)})):n.set(i.next,"."+r,o)})),X(e,n,t,!0,!0),[Go,Xo,Yo,Ko,qo].forEach((function(r){var o=t.draw[r];o&&n.set(i.draw,"."+r,""+o.append(e,n))})),Object.keys(t.uniforms).forEach((function(o){var a=t.uniforms[o].append(e,n);Array.isArray(a)&&(a="["+a.join()+"]"),n.set(i.uniforms,"["+r.id(o)+"]",a)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),o=e.scopeAttrib(r);Object.keys(new g).forEach((function(e){n.set(o,"."+e,i[e])}))})),t.scopeVAO&&n.set(i.vao,".targetVAO",t.scopeVAO.append(e,n)),a(Ho),a(Wo),Object.keys(t.state).length>0&&(n(o,".dirty=true;"),n.exit(o,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}function se(e){if("object"===typeof e&&!ur(e)){for(var t=Object.keys(e),r=0;r=0;--e){var t=I[e];t&&t(p,null,0)}n.flush(),u&&u.update()}function D(){!L&&I.length>0&&(L=me.next(j))}function z(){L&&(me.cancel(j),L=null)}function N(e){e.preventDefault(),o=!0,z(),O.forEach((function(e){e()}))}function F(e){n.getError(),o=!1,a.restore(),_.restore(),y.restore(),k.restore(),S.restore(),T.restore(),b.restore(),u&&u.restore(),M.procs.refresh(),D(),P.forEach((function(e){e()}))}function B(){I.length=0,z(),E&&(E.removeEventListener(_s,N),E.removeEventListener(ks,F)),_.clear(),T.clear(),S.clear(),b.clear(),k.clear(),x.clear(),y.clear(),u&&u.clear(),R.forEach((function(e){e()}))}function Z(e){function r(e){var r=t({},e);function n(e){if(e in r){var t=r[e];delete r[e],Object.keys(t).forEach((function(n){r[e+"."+n]=t[n]}))}}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),n("blend"),n("depth"),n("cull"),n("stencil"),n("polygonOffset"),n("scissor"),n("sample"),"vao"in e&&(r.vao=e.vao),r}function n(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var o=e[i];if(pe.isDynamic(o))n[i]=pe.unbox(o,i);else{if(t&&Array.isArray(o))for(var a=0;a0)return f.call(this,m(0|e),0|e)}else{if(!Array.isArray(e))return d.call(this,e);if(e.length)return f.call(this,e,e.length)}}return t(g,{stats:c,destroy:function(){u.destroy()}})}E&&(E.addEventListener(_s,N,!1),E.addEventListener(ks,F,!1));var U=T.setFBO=Z({framebuffer:pe.define.call(null,Ss,"framebuffer")});function V(e,t){var r=0;M.procs.poll();var i=t.color;i&&(n.clearColor(+i[0]||0,+i[1]||0,+i[2]||0,+i[3]||0),r|=ys),"depth"in t&&(n.clearDepth(+t.depth),r|=xs),"stencil"in t&&(n.clearStencil(0|t.stencil),r|=bs),re(!!r,"called regl.clear with no buffer specified"),n.clear(r)}function H(e){if(re("object"===typeof e&&e,"regl.clear() takes an object as input"),"framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var r=0;r<6;++r)U(t({framebuffer:e.framebuffer.faces[r]},e),V);else U(e,V);else V(null,e)}function W(e){function t(){var t=Cs(I,e);function r(){var e=Cs(I,r);I[e]=I[I.length-1],I.length-=1,I.length<=0&&z()}re(t>=0,"cannot cancel a frame twice"),I[t]=r}return re.type(e,"function","regl.frame() callback must be a function"),I.push(e),D(),{cancel:t}}function G(){var e=A.viewport,t=A.scissor_box;e[0]=e[1]=t[0]=t[1]=0,p.viewportWidth=p.framebufferWidth=p.drawingBufferWidth=e[2]=t[2]=n.drawingBufferWidth,p.viewportHeight=p.framebufferHeight=p.drawingBufferHeight=e[3]=t[3]=n.drawingBufferHeight}function q(){p.tick+=1,p.time=X(),G(),M.procs.poll()}function Y(){k.refresh(),G(),M.procs.refresh(),u&&u.update()}function X(){return(ge()-d)/1e3}function K(e,t){var r;switch(re.type(t,"function","listener callback must be a function"),e){case"frame":return W(t);case"lost":r=O;break;case"restore":r=P;break;case"destroy":r=R;break;default:re.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(t),{cancel:function(){for(var e=0;e=0},read:C,destroy:B,_gl:n,_refresh:Y,poll:function(){q(),u&&u.update()},now:X,stats:l});return r.onDone(null,$),$}return As}()},93940:(e,t,r)=>{"use strict";var n=r(49147);function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*r.g.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*r.g.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function o(e){return"function"===typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}e.exports=function(e){var t;if(e?"string"===typeof e&&(e={container:e}):e={},o(e)?e={container:e}:e="string"===typeof(t=e).nodeName&&"function"===typeof t.appendChild&&"function"===typeof t.getBoundingClientRect?{container:e}:function(e){return"function"===typeof e.drawArrays||"function"===typeof e.drawElements}(e)?{gl:e}:n(e,{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),e.pixelRatio||(e.pixelRatio=r.g.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"===typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}o(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(r){try{e.gl=e.canvas.getContext(r,e.attrs)}catch(t){}return e.gl})),e.gl}},26234:e=>{e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";var n=r(28476)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(i){n=null}e.exports=n},62206:(e,t,r)=>{"use strict";var n,i=r(88730);n="function"===typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,e.exports=n},32954:(e,t,r)=>{"use strict";var n=r(88730);e.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}()},82926:(e,t,r)=>{"use strict";var n=r(28476)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},87593:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},95520:(e,t,r)=>{"use strict";var n="undefined"!==typeof Symbol&&Symbol,i=r(80541);e.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},80541:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},48857:(e,t,r)=>{"use strict";var n=r(80541);e.exports=function(){return n()&&!!Symbol.toStringTag}},26834:(e,t,r)=>{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(1199);e.exports=o.call(n,i)},67861:(e,t,r)=>{"use strict";var n=r(89456),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,n){if("string"!==typeof r){if(p){var i=h(r);i&&i!==p&&e(t,i,n)}var a=u(r);d&&(a=a.concat(d(r)));for(var s=l(t),m=l(r),g=0;g{"use strict";var r="function"===typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,p=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=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 w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case d:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function _(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return _(e)||w(e)===u},t.isConcurrentMode=_,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===h||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},89456:(e,t,r)=>{"use strict";e.exports=r(20229)},60545:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},80273:e=>{"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},95021:(e,t,r)=>{"use strict";var n=r(48857)(),i=r(44680)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},a=function(e){return!!o(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},88730:e=>{e.exports=!0},8866:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof i&&"function"===typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(h){h!==r&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=n.call(e);return o.test(t)}catch(r){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(t){return!1}},l=Object.prototype.toString,c="function"===typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),d=function(){return!1};if("object"===typeof document){var f=document.all;l.call(f)===l.call(document.all)&&(d=function(e){if((u||!e)&&("undefined"===typeof e||"object"===typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(r){}return!1})}e.exports=i?function(e){if(d(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;try{i(e,null,t)}catch(n){if(n!==r)return!1}return!a(e)&&s(e)}:function(e){if(d(e))return!0;if(!e)return!1;if("function"!==typeof e&&"object"!==typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},7469:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(48857)(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!==typeof e)return!1;if(a.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!l)return!1;if("undefined"===typeof n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}},94411:e=>{"use strict";e.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},98374:e=>{"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;const t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});let i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;let o=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},11546:e=>{"use strict";e.exports=function(e){return e!==e}},5738:(e,t,r)=>{"use strict";var n=r(59962),i=r(89959),o=r(11546),a=r(39221),s=r(65434),l=n(a(),Number);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},39221:(e,t,r)=>{"use strict";var n=r(11546);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},65434:(e,t,r)=>{"use strict";var n=r(89959),i=r(39221);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},57710:e=>{"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},23181:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r;return"[object Object]"===t.call(e)&&(null===(r=Object.getPrototypeOf(e))||r===Object.getPrototypeOf({}))}},20878:e=>{"use strict";e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},93863:e=>{"use strict";e.exports=function(e){return"string"===typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},72105:(e,t,r)=>{"use strict";var n=r(91520);e.exports=function(e){return!!n(e)}},66212:e=>{e.exports=function(e,t,r){return e*(1-r)+t*r}},81725:(e,t,r)=>{var n=r(70781)(r(7289),"DataView");e.exports=n},69748:(e,t,r)=>{var n=r(56545),i=r(69843),o=r(86266),a=r(17364),s=r(74156);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(20329),i=r(39666),o=r(2523),a=r(45105),s=r(73316);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(70781)(r(7289),"Map");e.exports=n},13109:(e,t,r)=>{var n=r(79e3),i=r(37240),o=r(63414),a=r(17140),s=r(85429);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(70781)(r(7289),"Promise");e.exports=n},4199:(e,t,r)=>{var n=r(70781)(r(7289),"Set");e.exports=n},44526:(e,t,r)=>{var n=r(13109),i=r(85845),o=r(35544);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(95745),i=r(23653),o=r(43359),a=r(92571),s=r(31698),l=r(85883);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},68624:(e,t,r)=>{var n=r(7289).Symbol;e.exports=n},6759:(e,t,r)=>{var n=r(7289).Uint8Array;e.exports=n},13289:(e,t,r)=>{var n=r(70781)(r(7289),"WeakMap");e.exports=n},44235:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r{var n=r(94499),i=r(52794),o=r(95585),a=r(70667),s=r(30674),l=r(53153),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),d=!r&&!u&&a(e),f=!r&&!u&&!d&&l(e),h=r||u||d||f,p=h?n(e.length,String):[],m=p.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||p.push(g);return p}},95434:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r(46351),i=r(83666),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];o.call(e,t)&&i(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},69194:(e,t,r)=>{var n=r(83666);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},93035:(e,t,r)=>{var n=r(67538),i=r(56385);e.exports=function(e,t){return e&&n(t,i(t),e)}},56045:(e,t,r)=>{var n=r(67538),i=r(67086);e.exports=function(e,t){return e&&n(t,i(t),e)}},46351:(e,t,r)=>{var n=r(31438);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},46476:(e,t,r)=>{var n=r(17016),i=r(44235),o=r(87347),a=r(93035),s=r(56045),l=r(28087),c=r(52594),u=r(42497),d=r(14742),f=r(87253),h=r(15508),p=r(68466),m=r(47633),g=r(57355),v=r(16484),y=r(95585),x=r(70667),b=r(15874),w=r(91845),_=r(41859),k=r(56385),S=r(67086),T="[object Arguments]",M="[object Function]",C="[object Object]",A={};A[T]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[C]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[M]=A["[object WeakMap]"]=!1,e.exports=function e(t,r,E,I,O,P){var R,L=1&r,j=2&r,D=4&r;if(E&&(R=O?E(t,I,O,P):E(t)),void 0!==R)return R;if(!w(t))return t;var z=y(t);if(z){if(R=m(t),!L)return c(t,R)}else{var N=p(t),F=N==M||"[object GeneratorFunction]"==N;if(x(t))return l(t,L);if(N==C||N==T||F&&!O){if(R=j||F?{}:v(t),!L)return j?d(t,s(R,t)):u(t,a(R,t))}else{if(!A[N])return O?t:{};R=g(t,N,L)}}P||(P=new n);var B=P.get(t);if(B)return B;P.set(t,R),_(t)?t.forEach((function(n){R.add(e(n,r,E,n,t,P))})):b(t)&&t.forEach((function(n,i){R.set(i,e(n,r,E,i,t,P))}));var Z=z?void 0:(D?j?h:f:j?S:k)(t);return i(Z||t,(function(n,i){Z&&(n=t[i=n]),o(R,i,e(n,r,E,i,t,P))})),R}},98303:(e,t,r)=>{var n=r(91845),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},2785:(e,t,r)=>{var n=r(35705),i=r(36428)(n);e.exports=i},15461:(e,t,r)=>{var n=r(62550)();e.exports=n},35705:(e,t,r)=>{var n=r(15461),i=r(56385);e.exports=function(e,t){return e&&n(e,t,i)}},30207:(e,t,r)=>{var n=r(14534),i=r(60925);e.exports=function(e,t){for(var r=0,o=(t=n(t,e)).length;null!=e&&r{var n=r(45349),i=r(95585);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},18665:(e,t,r)=>{var n=r(68624),i=r(23596),o=r(78186),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},21966:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},51276:(e,t,r)=>{var n=r(18665),i=r(89752);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},7081:(e,t,r)=>{var n=r(89110),i=r(89752);e.exports=function e(t,r,o,a,s){return t===r||(null==t||null==r||!i(t)&&!i(r)?t!==t&&r!==r:n(t,r,o,a,e,s))}},89110:(e,t,r)=>{var n=r(17016),i=r(47983),o=r(89820),a=r(6353),s=r(68466),l=r(95585),c=r(70667),u=r(53153),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,g,v){var y=l(e),x=l(t),b=y?f:s(e),w=x?f:s(t),_=(b=b==d?h:b)==h,k=(w=w==d?h:w)==h,S=b==w;if(S&&c(e)){if(!c(t))return!1;y=!0,_=!1}if(S&&!_)return v||(v=new n),y||u(e)?i(e,t,r,m,g,v):o(e,t,b,r,m,g,v);if(!(1&r)){var T=_&&p.call(e,"__wrapped__"),M=k&&p.call(t,"__wrapped__");if(T||M){var C=T?e.value():e,A=M?t.value():t;return v||(v=new n),g(C,A,r,m,v)}}return!!S&&(v||(v=new n),a(e,t,r,m,g,v))}},37094:(e,t,r)=>{var n=r(68466),i=r(89752);e.exports=function(e){return i(e)&&"[object Map]"==n(e)}},19280:(e,t,r)=>{var n=r(17016),i=r(7081);e.exports=function(e,t,r,o){var a=r.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a{var n=r(50375),i=r(65401),o=r(91845),a=r(92043),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,f=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},18711:(e,t,r)=>{var n=r(68466),i=r(89752);e.exports=function(e){return i(e)&&"[object Set]"==n(e)}},77499:(e,t,r)=>{var n=r(18665),i=r(44276),o=r(89752),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},81186:(e,t,r)=>{var n=r(85662),i=r(98768),o=r(19908),a=r(95585),s=r(34445);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?a(e)?i(e[0],e[1]):n(e):s(e)}},23409:(e,t,r)=>{var n=r(28992),i=r(8723),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},89130:(e,t,r)=>{var n=r(91845),i=r(28992),o=r(3481),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},71839:(e,t,r)=>{var n=r(2785),i=r(2114);e.exports=function(e,t){var r=-1,o=i(e)?Array(e.length):[];return n(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}},85662:(e,t,r)=>{var n=r(19280),i=r(95113),o=r(22093);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},98768:(e,t,r)=>{var n=r(7081),i=r(69706),o=r(89775),a=r(98939),s=r(99253),l=r(22093),c=r(60925);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(r){var a=i(r,e);return void 0===a&&a===t?o(r,e):n(t,a,3)}}},61125:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},80171:(e,t,r)=>{var n=r(30207);e.exports=function(e){return function(t){return n(t,e)}}},94499:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(68624),i=r(95434),o=r(95585),a=r(72060),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},36902:e=>{e.exports=function(e){return function(t){return e(t)}}},88905:e=>{e.exports=function(e,t){return e.has(t)}},97169:(e,t,r)=>{var n=r(19908);e.exports=function(e){return"function"==typeof e?e:n}},14534:(e,t,r)=>{var n=r(95585),i=r(98939),o=r(3002),a=r(11822);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},72604:(e,t,r)=>{var n=r(6759);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},28087:(e,t,r)=>{e=r.nmd(e);var n=r(7289),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},81893:(e,t,r)=>{var n=r(72604);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},73360:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},47981:(e,t,r)=>{var n=r(68624),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},55888:(e,t,r)=>{var n=r(72604);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},52594:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var n=r(87347),i=r(46351);e.exports=function(e,t,r,o){var a=!r;r||(r={});for(var s=-1,l=t.length;++s{var n=r(67538),i=r(66504);e.exports=function(e,t){return n(e,i(e),t)}},14742:(e,t,r)=>{var n=r(67538),i=r(42757);e.exports=function(e,t){return n(e,i(e),t)}},47683:(e,t,r)=>{var n=r(7289)["__core-js_shared__"];e.exports=n},36428:(e,t,r)=>{var n=r(2114);e.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var o=r.length,a=t?o:-1,s=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===r(o[l],l,o))break}return t}}},31438:(e,t,r)=>{var n=r(70781),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},47983:(e,t,r)=>{var n=r(44526),i=r(29330),o=r(88905);e.exports=function(e,t,r,a,s,l){var c=1&r,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,m=!0,g=2&r?new n:void 0;for(l.set(e,t),l.set(t,e);++p{var n=r(68624),i=r(6759),o=r(83666),a=r(47983),s=r(258),l=r(73671),c=n?n.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&n;if(h||(h=l),e.size!=t.size&&!p)return!1;var m=f.get(e);if(m)return m==t;n|=2,f.set(e,t);var g=a(h(e),h(t),n,c,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6353:(e,t,r)=>{var n=r(87253),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,a,s){var l=1&r,c=n(e),u=c.length;if(u!=n(t).length&&!l)return!1;for(var d=u;d--;){var f=c[d];if(!(l?f in t:i.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},87253:(e,t,r)=>{var n=r(92606),i=r(66504),o=r(56385);e.exports=function(e){return n(e,o,i)}},15508:(e,t,r)=>{var n=r(92606),i=r(42757),o=r(67086);e.exports=function(e){return n(e,o,i)}},16911:(e,t,r)=>{var n=r(81591);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},95113:(e,t,r)=>{var n=r(99253),i=r(56385);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var o=t[r],a=e[o];t[r]=[o,a,n(a)]}return t}},70781:(e,t,r)=>{var n=r(33186),i=r(80760);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},96116:(e,t,r)=>{var n=r(9698)(Object.getPrototypeOf,Object);e.exports=n},23596:(e,t,r)=>{var n=r(68624),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(l){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},66504:(e,t,r)=>{var n=r(74951),i=r(72554),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},42757:(e,t,r)=>{var n=r(45349),i=r(96116),o=r(66504),a=r(72554),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:a;e.exports=s},68466:(e,t,r)=>{var n=r(81725),i=r(18579),o=r(59946),a=r(4199),s=r(13289),l=r(18665),c=r(92043),u="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",m=c(n),g=c(i),v=c(o),y=c(a),x=c(s),b=l;(n&&b(new n(new ArrayBuffer(1)))!=p||i&&b(new i)!=u||o&&b(o.resolve())!=d||a&&b(new a)!=f||s&&b(new s)!=h)&&(b=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return p;case g:return u;case v:return d;case y:return f;case x:return h}return t}),e.exports=b},80760:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},81898:(e,t,r)=>{var n=r(14534),i=r(52794),o=r(95585),a=r(30674),s=r(44276),l=r(60925);e.exports=function(e,t,r){for(var c=-1,u=(t=n(t,e)).length,d=!1;++c{var n=r(11353);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},69843:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},86266:(e,t,r)=>{var n=r(11353),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},17364:(e,t,r)=>{var n=r(11353),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},74156:(e,t,r)=>{var n=r(11353);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},47633:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},57355:(e,t,r)=>{var n=r(72604),i=r(81893),o=r(73360),a=r(47981),s=r(55888);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return a(e)}}},16484:(e,t,r)=>{var n=r(98303),i=r(96116),o=r(28992);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},30674:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(95585),i=r(72060),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},81591:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},65401:(e,t,r)=>{var n=r(47683),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},28992:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},99253:(e,t,r)=>{var n=r(91845);e.exports=function(e){return e===e&&!n(e)}},20329:e=>{e.exports=function(){this.__data__=[],this.size=0}},39666:(e,t,r)=>{var n=r(69194),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},2523:(e,t,r)=>{var n=r(69194);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},45105:(e,t,r)=>{var n=r(69194);e.exports=function(e){return n(this.__data__,e)>-1}},73316:(e,t,r)=>{var n=r(69194);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},79e3:(e,t,r)=>{var n=r(69748),i=r(95745),o=r(18579);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},37240:(e,t,r)=>{var n=r(16911);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},63414:(e,t,r)=>{var n=r(16911);e.exports=function(e){return n(this,e).get(e)}},17140:(e,t,r)=>{var n=r(16911);e.exports=function(e){return n(this,e).has(e)}},85429:(e,t,r)=>{var n=r(16911);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},258:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},22093:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},83679:(e,t,r)=>{var n=r(92736);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},11353:(e,t,r)=>{var n=r(70781)(Object,"create");e.exports=n},8723:(e,t,r)=>{var n=r(9698)(Object.keys,Object);e.exports=n},3481:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},47785:(e,t,r)=>{e=r.nmd(e);var n=r(32692),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&n.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=s},78186:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9698:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},7289:(e,t,r)=>{var n=r(32692),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},85845:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},35544:e=>{e.exports=function(e){return this.__data__.has(e)}},73671:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},23653:(e,t,r)=>{var n=r(95745);e.exports=function(){this.__data__=new n,this.size=0}},43359:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},92571:e=>{e.exports=function(e){return this.__data__.get(e)}},31698:e=>{e.exports=function(e){return this.__data__.has(e)}},85883:(e,t,r)=>{var n=r(95745),i=r(18579),o=r(13109);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},3002:(e,t,r)=>{var n=r(83679),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=a},60925:(e,t,r)=>{var n=r(72060);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},92043:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(r){}try{return e+""}catch(r){}}return""}},38504:(e,t,r)=>{var n=r(46476);e.exports=function(e){return n(e,5)}},83666:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},57827:(e,t,r)=>{var n=r(35705),i=r(97169);e.exports=function(e,t){return e&&n(e,i(t))}},69706:(e,t,r)=>{var n=r(30207);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},89775:(e,t,r)=>{var n=r(21966),i=r(81898);e.exports=function(e,t){return null!=e&&i(e,t,n)}},19908:e=>{e.exports=function(e){return e}},52794:(e,t,r)=>{var n=r(51276),i=r(89752),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},95585:e=>{var t=Array.isArray;e.exports=t},2114:(e,t,r)=>{var n=r(50375),i=r(44276);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},70667:(e,t,r)=>{e=r.nmd(e);var n=r(7289),i=r(95535),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},50375:(e,t,r)=>{var n=r(18665),i=r(91845);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},44276:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},15874:(e,t,r)=>{var n=r(37094),i=r(36902),o=r(47785),a=o&&o.isMap,s=a?i(a):n;e.exports=s},91845:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},89752:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},40634:(e,t,r)=>{var n=r(18665),i=r(96116),o=r(89752),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=n(e))return!1;var t=i(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&l.call(r)==u}},41859:(e,t,r)=>{var n=r(18711),i=r(36902),o=r(47785),a=o&&o.isSet,s=a?i(a):n;e.exports=s},65406:(e,t,r)=>{var n=r(18665),i=r(95585),o=r(89752);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==n(e)}},72060:(e,t,r)=>{var n=r(18665),i=r(89752);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},53153:(e,t,r)=>{var n=r(77499),i=r(36902),o=r(47785),a=o&&o.isTypedArray,s=a?i(a):n;e.exports=s},56385:(e,t,r)=>{var n=r(83200),i=r(23409),o=r(2114);e.exports=function(e){return o(e)?n(e):i(e)}},67086:(e,t,r)=>{var n=r(83200),i=r(89130),o=r(2114);e.exports=function(e){return o(e)?n(e,!0):i(e)}},93428:(e,t,r)=>{var n=r(95434),i=r(81186),o=r(71839),a=r(95585);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},92736:(e,t,r)=>{var n=r(13109);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},34445:(e,t,r)=>{var n=r(61125),i=r(80171),o=r(98939),a=r(60925);e.exports=function(e){return o(e)?n(a(e)):i(e)}},72554:e=>{e.exports=function(){return[]}},95535:e=>{e.exports=function(){return!1}},11822:(e,t,r)=>{var n=r(21612);e.exports=function(e){return null==e?"":n(e)}},74055:function(e){e.exports=function(){"use strict";var e,t,r;function n(n,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),(r=i(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else t=i;else e=i}return n(["exports"],(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r="1.10.1",n=i;function i(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}i.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},i.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},i.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},i.prototype.solveCurveX=function(e,t){var r,n,i,o,a;for("undefined"===typeof t&&(t=1e-6),i=e,a=0;a<8;a++){if(o=this.sampleCurveX(i)-e,Math.abs(o)(n=1))return n;for(;ro?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var o=a;function a(e,t){this.x=e,this.y=t}function s(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function c(e,t,r,i){var o=new n(e,t,r,i);return function(e){return o.solve(e)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),o=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(e){return e instanceof a?e:Array.isArray(e)?new a(e[0],e[1]):e};var u=c(.25,.1,.25,1);function d(e,t,r){return Math.min(r,Math.max(t,e))}function f(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function h(e,t,r){if(!e.length)return r(null,[]);var n=e.length,i=new Array(e.length),o=null;e.forEach((function(e,a){t(e,(function(e,t){e&&(o=e),i[a]=t,0===--n&&r(o,i)}))}))}function p(e){var t=[];for(var r in e)t.push(e[r]);return t}function m(e,t){var r=[];for(var n in e)n in t||r.push(n);return r}function g(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}return e()}function w(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function _(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function k(e,t){return-1!==e.indexOf(t,e.length-t.length)}function S(e,t,r){var n={};for(var i in e)n[i]=t.call(r||this,e[i],i,e);return n}function T(e,t,r){var n={};for(var i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function M(e){return Array.isArray(e)?e.map(M):"object"===typeof e&&e?S(e,M):e}function C(e,t){for(var r=0;r=0)return!0;return!1}var A={};function E(e){A[e]||("undefined"!==typeof console&&console.warn(e),A[e]=!0)}function I(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function O(e){for(var t=0,r=0,n=e.length,i=n-1,o=void 0,a=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(function(e,t,n,i){var o=n||i;return r[t]=!o||o.toLowerCase(),""})),r["max-age"]){var n=parseInt(r["max-age"],10);isNaN(n)?delete r["max-age"]:r["max-age"]=n}return r}var j=null;function D(e){if(null==j){var t=e.navigator?e.navigator.userAgent:null;j=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return j}function z(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(r){return!1}}function N(e){return self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}function F(e){return decodeURIComponent(self.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var B,Z,U,V,H=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),W=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,G=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,q={now:H,frame:function(e){var t=W(e);return{cancel:function(){return G(t)}}},getImageData:function(e,t){void 0===t&&(t=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=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return B||(B=self.document.createElement("a")),B.href=e,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==Z&&(Z=self.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches)}},Y={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},X={supported:!1,testSupport:J},K=!1,$=!1;function J(e){!K&&V&&($?Q(e):U=e)}function Q(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,V),e.isContextLost())return;X.supported=!0}catch(r){}e.deleteTexture(t),K=!0}self.document&&((V=self.document.createElement("img")).onload=function(){U&&Q(U),U=null,$=!0},V.onerror=function(){K=!0,U=null},V.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ee="01";function te(){for(var e="1",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r="",n=0;n<10;n++)r+=t[Math.floor(62*Math.random())];var i=432e5;return{token:[e,ee,r].join(""),tokenExpiresAt:Date.now()+i}}var re=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function ne(e){return 0===e.indexOf("mapbox:")}re.prototype._createSkuToken=function(){var e=te();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},re.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},re.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},re.prototype.normalizeStyleURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeGlyphsURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeSourceURL=function(e,t){if(!ne(e))return e;var r=ce(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},re.prototype.normalizeSpriteURL=function(e,t,r,n){var i=ce(e);return ne(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+t+r,ue(i))},re.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!ne(e))return e;var r=ce(e),n=/(\.(png|jpg)\d*)(?=$)/,i=/^.+\/v4\//,o=q.devicePixelRatio>=2||512===t?"@2x":"",a=X.supported?".webp":"$1";r.path=r.path.replace(n,""+o+a),r.path=r.path.replace(i,"/"),r.path="/v4"+r.path;var s=this._customAccessToken||se(r.params)||Y.ACCESS_TOKEN;return Y.REQUIRE_ACCESS_TOKEN&&s&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,s)},re.prototype.canonicalizeTileURL=function(e,t){var r="/v4/",n=/\.[\w]+$/,i=ce(e);if(!i.path.match(/(^\/v4\/)/)||!i.path.match(n))return e;var o="mapbox://tiles/";o+=i.path.replace(r,"");var a=i.params;return t&&(a=a.filter((function(e){return!e.match(/^access_token=/)}))),a.length&&(o+="?"+a.join("&")),o},re.prototype.canonicalizeTileset=function(e,t){for(var r=!!t&&ne(t),n=[],i=0,o=e.tiles||[];i=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(n){E("Unable to write to LocalStorage")}},he.prototype.processRequests=function(e){},he.prototype.postEvent=function(e,t,n,i){var o=this;if(Y.EVENTS_URL){var a=ce(Y.EVENTS_URL);a.params.push("access_token="+(i||Y.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:ee,userId:this.anonId},l=t?g(s,t):s,c={url:ue(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=Ye(c,(function(e){o.pendingRequest=null,n(e),o.saveEventData(),o.processRequests(i)}))}},he.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var pe,me,ge=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(Y.EVENTS_URL&&n||Y.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return ne(e)||oe(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=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(),w(this.anonId)||(this.anonId=b()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(he),ve=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){Y.EVENTS_URL&&Y.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return ne(e)||oe(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=fe(Y.ACCESS_TOKEN),n=r?r.u:Y.ACCESS_TOKEN,i=n!==this.eventData.tokenU;w(this.anonId)||(this.anonId=b(),i=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||a.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=o,t.eventData.tokenU=n)}),e)}},t}(he),ye=new ve,xe=ye.postTurnstileEvent.bind(ye),be=new ge,we=be.postMapLoadEvent.bind(be),_e="mapbox-tiles",ke=500,Se=50,Te=42e4;function Me(){self.caches&&!pe&&(pe=self.caches.open(_e))}function Ce(e,t){if(void 0===me)try{new Response(new ReadableStream),me=!0}catch(r){me=!1}me?t(e.body):e.blob().then(t)}function Ae(e,t,r){if(Me(),pe){var n={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var i=L(t.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()-rDate.now()&&!r["no-cache"]}var Pe,Re=1/0;function Le(e){++Re>Se&&(e.getActor().send("enforceCacheSizeLimit",ke),Re=0)}function je(e){Me(),pe&&pe.then((function(t){t.keys().then((function(r){for(var n=0;n=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(i){return t(i)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new Be(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}var We=function(e,t){if(!Ue(e.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Ve(e,t);if(R()&&self.worker&&self.worker.actor){var r=!0;return self.worker.actor.send("getResource",e,t,void 0,r)}}return He(e,t)},Ge=function(e,t){return We(g(e,{type:"json"}),t)},qe=function(e,t){return We(g(e,{type:"arrayBuffer"}),t)},Ye=function(e,t){return We(g(e,{method:"POST"}),t)};function Xe(e){var t=self.document.createElement("a");return t.href=e,t.protocol===self.document.location.protocol&&t.host===self.document.location.host}var Ke,$e,Je="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Qe(e,t,r,n){var i=new self.Image,o=self.URL;i.onload=function(){t(null,i),o.revokeObjectURL(i.src)},i.onerror=function(){return t(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 a=new self.Blob([new Uint8Array(e)],{type:"image/png"});i.cacheControl=r,i.expires=n,i.src=e.byteLength?o.createObjectURL(a):Je}function et(e,t){var r=new self.Blob([new Uint8Array(e)],{type:"image/png"});self.createImageBitmap(r).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of "+e.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}Ke=[],$e=0;var tt=function(e,t){if(X.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),$e>=Y.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ke.push(r),r}$e++;var n=!1,i=function(){if(!n)for(n=!0,$e--;Ke.length&&$e0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},st.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var lt={$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"}}},ct=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!==t&&void 0!==t&&t.__line__&&(this.line=t.__line__)};function ut(e){var t=e.key,r=e.value;return r?[new ct(t,r,"constants have been deprecated as of v8")]:[]}function dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Et=[gt,vt,yt,xt,bt,Tt,wt,Ct(_t),Mt];function It(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!It(e.itemType,t.itemType))&&("number"!==typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Et;r255?255:e}function i(e){return e<0?0:e>1?1:e}function o(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function a(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),d=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==d.length)return null;f=a(d.pop());case"rgb":return 3!==d.length?null:[o(d[0]),o(d[1]),o(d[2]),f];case"hsla":if(4!==d.length)return null;f=a(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,p=a(d[1]),m=a(d[2]),g=m<=.5?m*(p+1):m+p-m*p,v=2*m-g;return[n(255*s(v,g,h+1/3)),n(255*s(v,g,h)),n(255*s(v,g,h-1/3)),f];default:return null}}return null}try{t.parseCSSColor=l}catch(c){}})),Lt=Rt.parseCSSColor,jt=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};jt.parse=function(e){if(e){if(e instanceof jt)return e;if("string"===typeof e){var t=Lt(e);if(t)return new jt(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},jt.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+i+")"},jt.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*r/i,255*n/i,i]},jt.black=new jt(0,0,0,1),jt.white=new jt(1,1,1,1),jt.transparent=new jt(0,0,0,0),jt.red=new jt(1,0,0,1);var Dt=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Dt.prototype.compare=function(e,t){return this.collator.compare(e,t)},Dt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var zt=function(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i},Nt=function(e){this.sections=e};Nt.fromString=function(e){return new Nt([new zt(e,null,null,null,null)])},Nt.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},Nt.factory=function(e){return e instanceof Nt?e:Nt.fromString(e)},Nt.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},Nt.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t=0&&e<=255&&"number"===typeof t&&t>=0&&t<=255&&"number"===typeof r&&r>=0&&r<=255?"undefined"===typeof n||"number"===typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Zt(e){if(null===e)return!0;if("string"===typeof e)return!0;if("boolean"===typeof e)return!0;if("number"===typeof e)return!0;if(e instanceof jt)return!0;if(e instanceof Dt)return!0;if(e instanceof Nt)return!0;if(e instanceof Ft)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!==typeof s||!(s in Gt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=Gt[s],n++}else o=_t;if(e.length>3){if(null!==e[2]&&("number"!==typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}r=Ct(o,a)}else r=Gt[i];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var Yt=function(e){this.type=Tt,this.sections=e};Yt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"===typeof r)return t.error("First argument must be an image or text section.");for(var n=[],i=!1,o=1;o<=e.length-1;++o){var a=e[o];if(i&&"object"===typeof a&&!Array.isArray(a)){i=!1;var s=null;if(a["font-scale"]&&!(s=t.parse(a["font-scale"],1,vt)))return null;var l=null;if(a["text-font"]&&!(l=t.parse(a["text-font"],1,Ct(yt))))return null;var c=null;if(a["text-color"]&&!(c=t.parse(a["text-color"],1,bt)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var d=t.parse(e[o],1,_t);if(!d)return null;var f=d.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:d,scale:null,font:null,textColor:null})}}return new Yt(n)},Yt.prototype.evaluate=function(e){var t=function(t){var r=t.content.evaluate(e);return Ut(r)===Mt?new zt("",r,null,null,null):new zt(Vt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)};return new Nt(this.sections.map(t))},Yt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},Xt.prototype.eachChild=function(e){e(this.input)},Xt.prototype.outputDefined=function(){return!1},Xt.prototype.serialize=function(){return["image",this.input.serialize()]};var Kt={"to-boolean":xt,"to-color":bt,"to-number":vt,"to-string":yt},$t=function(e,t){this.type=e,this.args=t};$t.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=Kt[r],i=[],o=1;o4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Bt(t[0],t[1],t[2],t[3])))return new jt(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Wt(r||"Could not parse color from value '"+("string"===typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s=t[2])&&!(e[1]<=t[1])&&!(e[3]>=t[3])}function lr(e,t){var r=or(e[0]),n=ar(e[1]),i=Math.pow(2,t.z);return[Math.round(r*i*nr),Math.round(n*i*nr)]}function cr(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],o=e[0]-r[0],a=e[1]-r[1];return n*a-o*i===0&&n*o<=0&&i*a<=0}function ur(e,t,r){return t[1]>e[1]!==r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function dr(e,t){for(var r=!1,n=0,i=t.length;n0&&d<0||u<0&&d>0}function mr(e,t,r,n){var i=[t[0]-e[0],t[1]-e[1]];return 0!==hr([n[0]-r[0],n[1]-r[1]],i)&&!(!pr(e,t,r,n)||!pr(r,n,e,t))}function gr(e,t,r){for(var n=0,i=r;nr[2]){var i=.5*n,o=e[0]-r[0]>i?-n:r[0]-e[0]>i?n:0;0===o&&(o=e[0]-r[2]>i?-n:r[2]-e[0]>i?n:0),e[0]+=o}ir(t,e)}function _r(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function kr(e,t,r,n){for(var i=Math.pow(2,n.z)*nr,o=[n.x*nr,n.y*nr],a=[],s=0,l=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Ir(e,t)&&(r=!1)})),r}Cr.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(Zt(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;nt))throw new Wt("Input is not a number.");a=s-1}return 0}Pr.prototype.parse=function(e,t,r,n,i){return void 0===i&&(i={}),t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)},Pr.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new qt(t,[e]):"coerce"===r?new $t(t,[e]):e}if(null!==e&&"string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[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 o=i.parse(e,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,t.typeAnnotation||"coerce");else o=r(o,a,t.typeAnnotation||"assert")}if(!(o instanceof Ht)&&"resolvedImage"!==o.type.kind&&Rr(o)){var l=new Qt;try{o=new Ht(o.type,o.evaluate(l))}catch(c){return this.error(c.message),null}}return o}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof e?this.error("'undefined' value invalid. Use null instead."):"object"===typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},Pr.prototype.concat=function(e,t,r){var n="number"===typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new Pr(this.registry,n,t||null,i,this.errors)},Pr.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new pt(n,e))},Pr.prototype.checkSubtype=function(e,t){var r=It(e,t);return r&&this.error(r),r};var jr=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,i=r;n=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([a,u])}return new jr(i,r,n)},jr.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[Lr(t,n)].evaluate(e)},jr.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var Fr=Object.freeze({__proto__:null,number:Dr,color:zr,array:Nr}),Br=.95047,Zr=1,Ur=1.08883,Vr=4/29,Hr=6/29,Wr=3*Hr*Hr,Gr=Hr*Hr*Hr,qr=Math.PI/180,Yr=180/Math.PI;function Xr(e){return e>Gr?Math.pow(e,1/3):e/Wr+Vr}function Kr(e){return e>Hr?e*e*e:Wr*(e-Vr)}function $r(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Jr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Qr(e){var t=Jr(e.r),r=Jr(e.g),n=Jr(e.b),i=Xr((.4124564*t+.3575761*r+.1804375*n)/Br),o=Xr((.2126729*t+.7151522*r+.072175*n)/Zr);return{l:116*o-16,a:500*(i-o),b:200*(o-Xr((.0193339*t+.119192*r+.9503041*n)/Ur)),alpha:e.a}}function en(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=Zr*Kr(t),r=Br*Kr(r),n=Ur*Kr(n),new jt($r(3.2404542*r-1.5371385*t-.4985314*n),$r(-.969266*r+1.8760108*t+.041556*n),$r(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function tn(e,t,r){return{l:Dr(e.l,t.l,r),a:Dr(e.a,t.a,r),b:Dr(e.b,t.b,r),alpha:Dr(e.alpha,t.alpha,r)}}function rn(e){var t=Qr(e),r=t.l,n=t.a,i=t.b,o=Math.atan2(i,n)*Yr;return{h:o<0?o+360:o,c:Math.sqrt(n*n+i*i),l:r,alpha:e.a}}function nn(e){var t=e.h*qr,r=e.c;return en({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})}function on(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}function an(e,t,r){return{h:on(e.h,t.h,r),c:Dr(e.c,t.c,r),l:Dr(e.l,t.l,r),alpha:Dr(e.alpha,t.alpha,r)}}var sn={forward:Qr,reverse:en,interpolate:tn},ln={forward:rn,reverse:nn,interpolate:an},cn=Object.freeze({__proto__:null,lab:sn,hcl:ln}),un=function(e,t,r,n,i){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var o=0,a=i;o1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,vt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=bt:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var m=t.parse(f,p,c);if(!m)return null;c=c||m.type,l.push([d,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"===typeof c.N?new un(c,r,n,i,l):t.error("Type "+At(c)+" is not interpolatable.")},un.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);var o=Lr(t,n),a=t[o],s=t[o+1],l=un.interpolationFactor(this.interpolation,n,a,s),c=r[o].evaluate(e),u=r[o+1].evaluate(e);return"interpolate"===this.operator?Fr[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?ln.reverse(ln.interpolate(ln.forward(c),ln.forward(u),l)):sn.reverse(sn.interpolate(sn.forward(c),sn.forward(u),l))},un.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new Wt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new Wt("Array index must be an integer, but found "+t+" instead.");return r[t]},pn.prototype.eachChild=function(e){e(this.index),e(this.input)},pn.prototype.outputDefined=function(){return!1},pn.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var mn=function(e,t){this.type=xt,this.needle=e,this.haystack=t};mn.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,_t);return r&&n?Ot(r.type,[xt,yt,vt,gt,_t])?new mn(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+At(r.type)+" instead"):null},mn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Pt(t,["boolean","string","number","null"]))throw new Wt("Expected first argument to be of type boolean, string, number or null, but found "+At(Ut(t))+" instead.");if(!Pt(r,["string","array"]))throw new Wt("Expected second argument to be of type array or string, but found "+At(Ut(r))+" instead.");return r.indexOf(t)>=0},mn.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},mn.prototype.outputDefined=function(){return!0},mn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var gn=function(e,t,r){this.type=vt,this.needle=e,this.haystack=t,this.fromIndex=r};gn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,_t);if(!r||!n)return null;if(!Ot(r.type,[xt,yt,vt,gt,_t]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+At(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new gn(r,n,i):null}return new gn(r,n)},gn.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!Pt(t,["boolean","string","number","null"]))throw new Wt("Expected first argument to be of type boolean, string, number or null, but found "+At(Ut(t))+" instead.");if(!Pt(r,["string","array"]))throw new Wt("Expected second argument to be of type array or string, but found "+At(Ut(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},gn.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},gn.prototype.outputDefined=function(){return!1},gn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var vn=function(e,t,r,n,i,o){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=o};vn.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!==1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var i={},o=[],a=2;aNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,Ut(f)))return null}else r=Ut(f);if("undefined"!==typeof i[String(f)])return c.error("Branch labels must be unique.");i[String(f)]=o.length}var h=t.parse(l,a,n);if(!h)return null;n=n||h.type,o.push(h)}var p=t.parse(e[1],1,_t);if(!p)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==p.type.kind&&t.concat(1).checkSubtype(r,p.type)?null:new vn(r,n,p,i,o,m):null},vn.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(Ut(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},vn.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},vn.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},vn.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},i=0,o=Object.keys(this.cases).sort();ir}function Tn(e,t,r){return t<=r}function Mn(e,t,r){return t>=r}function Cn(e,t,r,n){return 0===n.compare(t,r)}function An(e,t,r,n){return!Cn(e,t,r,n)}function En(e,t,r,n){return n.compare(t,r)<0}function In(e,t,r,n){return n.compare(t,r)>0}function On(e,t,r,n){return n.compare(t,r)<=0}function Pn(e,t,r,n){return n.compare(t,r)>=0}function Rn(e,t,r){var n="=="!==e&&"!="!==e;return function(){function i(e,t,r){this.type=xt,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return i.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],o=t.parse(e[1],1,_t);if(!o)return null;if(!bn(r,o.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+At(o.type)+"'.");var a=t.parse(e[2],2,_t);if(!a)return null;if(!bn(r,a.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+At(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot compare types '"+At(o.type)+"' and '"+At(a.type)+"'.");n&&("value"===o.type.kind&&"value"!==a.type.kind?o=new qt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new qt(o.type,[a])));var s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,St)))return null}return new i(o,a,s)},i.prototype.evaluate=function(i){var o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=Ut(o),l=Ut(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Wt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var c=Ut(o),u=Ut(a);if("string"!==c.kind||"string"!==u.kind)return t(i,o,a)}return this.collator?r(i,o,a,this.collator.evaluate(i)):t(i,o,a)},i.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},i}()}xn.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,_t),n=t.parse(e[2],2,vt);if(!r||!n)return null;if(!Ot(r.type,[Ct(_t),yt,_t]))return t.error("Expected first argument to be of type array or string, but found "+At(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,vt);return i?new xn(r.type,r,n,i):null}return new xn(r.type,r,n)},xn.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!Pt(t,["string","array"]))throw new Wt("Expected first argument to be of type array or string, but found "+At(Ut(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},xn.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},xn.prototype.outputDefined=function(){return!1},xn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ln=Rn("==",wn,Cn),jn=Rn("!=",_n,An),Dn=Rn("<",kn,En),zn=Rn(">",Sn,In),Nn=Rn("<=",Tn,On),Fn=Rn(">=",Mn,Pn),Bn=function(e,t,r,n,i){this.type=yt,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Bn.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,vt);if(!r)return null;var n=e[2];if("object"!==typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=t.parse(n.locale,1,yt)))return null;var o=null;if(n.currency&&!(o=t.parse(n.currency,1,yt)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=t.parse(n["min-fraction-digits"],1,vt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,vt))?null:new Bn(r,i,o,a,s)},Bn.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},Bn.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},Bn.prototype.outputDefined=function(){return!1},Bn.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Zn=function(e){this.type=vt,this.input=e};Zn.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+At(r.type)+" instead."):new Zn(r):null},Zn.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"===typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Wt("Expected value to be of type string or array, but found "+At(Ut(t))+" instead.")},Zn.prototype.eachChild=function(e){e(this.input)},Zn.prototype.outputDefined=function(){return!1},Zn.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Un={"==":Ln,"!=":jn,">":zn,"<":Dn,">=":Fn,"<=":Nn,array:qt,at:pn,boolean:qt,case:yn,coalesce:fn,collator:rr,format:Yt,image:Xt,in:mn,"index-of":gn,interpolate:un,"interpolate-hcl":un,"interpolate-lab":un,length:Zn,let:hn,literal:Ht,match:vn,number:qt,"number-format":Bn,object:qt,slice:xn,step:jr,string:qt,"to-boolean":$t,"to-color":$t,"to-number":$t,"to-string":$t,var:Or,within:Cr};function Vn(e,t){var r=t[0],n=t[1],i=t[2],o=t[3];r=r.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);var a=o?o.evaluate(e):1,s=Bt(r,n,i,a);if(s)throw new Wt(s);return new jt(r/255*a,n/255*a,i/255*a,a)}function Hn(e,t){return e in t}function Wn(e,t){var r=t[e];return"undefined"===typeof r?null:r}function Gn(e,t,r,n){for(;r<=n;){var i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}function qn(e){return{type:e}}function Yn(e){return{result:"success",value:e}}function Xn(e){return{result:"error",value:e}}function Kn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function $n(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Jn(e){return!!e.expression&&e.expression.interpolated}function Qn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function ei(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}function ti(e){return e}function ri(e,t){var r,n,i,o="color"===t.type,a=e.stops&&"object"===typeof e.stops[0][0],s=a||void 0!==e.property,l=a||!s,c=e.type||(Jn(t)?"exponential":"interval");if(o&&((e=dt({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],jt.parse(e[1])]}))),e.default?e.default=jt.parse(e.default):e.default=jt.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!cn[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)r=ai;else if("interval"===c)r=oi;else if("categorical"===c){r=ii,n=Object.create(null);for(var u=0,d=e.stops;u=e.stops[n-1][0])return e.stops[n-1][1];var i=Lr(e.stops.map((function(e){return e[0]})),r);return e.stops[i][1]}function ai(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==Qn(r))return ni(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];var o=Lr(e.stops.map((function(e){return e[0]})),r),a=li(r,n,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],c=Fr[t.type]||ti;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=cn[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),a))}}return"function"===typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return c(r,n,a)}}:c(s,l,a)}function si(e,t,r){return"color"===t.type?r=jt.parse(r):"formatted"===t.type?r=Nt.fromString(r.toString()):"resolvedImage"===t.type?r=Ft.fromString(r.toString()):Qn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),ni(r,e.default,t.default)}function li(e,t,r,n){var i=n-r,o=e-r;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}er.register(Un,{error:[kt,[yt],function(e,t){var r=t[0];throw new Wt(r.evaluate(e))}],typeof:[yt,[_t],function(e,t){return At(Ut(t[0].evaluate(e)))}],"to-rgba":[Ct(vt,4),[bt],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[bt,[vt,vt,vt],Vn],rgba:[bt,[vt,vt,vt,vt],Vn],has:{type:xt,overloads:[[[yt],function(e,t){return Hn(t[0].evaluate(e),e.properties())}],[[yt,wt],function(e,t){var r=t[0],n=t[1];return Hn(r.evaluate(e),n.evaluate(e))}]]},get:{type:_t,overloads:[[[yt],function(e,t){return Wn(t[0].evaluate(e),e.properties())}],[[yt,wt],function(e,t){var r=t[0],n=t[1];return Wn(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[_t,[yt],function(e,t){return Wn(t[0].evaluate(e),e.featureState||{})}],properties:[wt,[],function(e){return e.properties()}],"geometry-type":[yt,[],function(e){return e.geometryType()}],id:[_t,[],function(e){return e.id()}],zoom:[vt,[],function(e){return e.globals.zoom}],"heatmap-density":[vt,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[vt,[],function(e){return e.globals.lineProgress||0}],accumulated:[_t,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[vt,qn(vt),function(e,t){for(var r=0,n=0,i=t;n":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i>o}],"filter-id->":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>i}],"filter-<=":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i<=o}],"filter-id-<=":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n<=i}],"filter->=":[xt,[yt,_t],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],o=n.value;return typeof i===typeof o&&i>=o}],"filter-id->=":[xt,[_t],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n===typeof i&&n>=i}],"filter-has":[xt,[_t],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[xt,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[xt,[Ct(yt)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[xt,[Ct(_t)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[xt,[yt,Ct(_t)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[xt,[yt,Ct(_t)],function(e,t){var r=t[0],n=t[1];return Gn(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:xt,overloads:[[[xt,xt],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[qn(xt),function(e,t){for(var r=0,n=t;r0&&"string"===typeof e[0]&&e[0]in Un}function di(e,t){var r=new Pr(Un,[],t?yi(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Yn(new ci(n,t)):Xn(r.errors)}ci.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},ci.prototype.evaluate=function(e,t,r,n,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null===a||void 0===a||"number"===typeof a&&a!==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new Wt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!==typeof console&&console.warn(s.message)),this._defaultValue}};var fi=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Er(t.expression)};fi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,o)},fi.prototype.evaluate=function(e,t,r,n,i,o){return this._styleExpression.evaluate(e,t,r,n,i,o)};var hi=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Er(t.expression),this.interpolationType=n};function pi(e,t){if("error"===(e=di(e,t)).result)return e;var r=e.value.expression,n=Ar(r);if(!n&&!Kn(t))return Xn([new pt("","data expressions not supported")]);var i=Ir(r,["zoom"]);if(!i&&!$n(t))return Xn([new pt("","zoom expressions not supported")]);var o=vi(r);if(!o&&!i)return Xn([new pt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof pt)return Xn([o]);if(o instanceof un&&!Jn(t))return Xn([new pt("",'"interpolate" expressions cannot be used with this property')]);if(!o)return Yn(new fi(n?"constant":"source",e.value));var a=o instanceof un?o.interpolation:void 0;return Yn(new hi(n?"camera":"composite",e.value,o.labels,a))}hi.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,o)},hi.prototype.evaluate=function(e,t,r,n,i,o){return this._styleExpression.evaluate(e,t,r,n,i,o)},hi.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?un.interpolationFactor(this.interpolationType,e,t,r):0};var mi=function(e,t){this._parameters=e,this._specification=t,dt(this,ri(this._parameters,this._specification))};function gi(e,t){if(ei(e))return new mi(e,t);if(ui(e)){var r=pi(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"===typeof e&&"color"===t.type&&(n=jt.parse(e)),{kind:"constant",evaluate:function(){return n}}}function vi(e){var t=null;if(e instanceof hn)t=vi(e.result);else if(e instanceof fn)for(var r=0,n=e.args;rn.maximum?[new ct(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function ki(e){var t,r,n,i=e.valueSpec,o=ft(e.value.type),a={},s="categorical"!==o&&void 0===e.value.property,l=!s,c="array"===Qn(e.value.stops)&&"array"===Qn(e.value.stops[0])&&"object"===Qn(e.value.stops[0][0]),u=bi({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:d,default:p}});return"identity"===o&&s&&u.push(new ct(e.key,e.value,'missing required property "property"')),"identity"===o||e.value.stops||u.push(new ct(e.key,e.value,'missing required property "stops"')),"exponential"===o&&e.valueSpec.expression&&!Jn(e.valueSpec)&&u.push(new ct(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Kn(e.valueSpec)?u.push(new ct(e.key,e.value,"property functions not supported")):s&&!$n(e.valueSpec)&&u.push(new ct(e.key,e.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==e.value.property||u.push(new ct(e.key,e.value,'"property" property is required')),u;function d(e){if("identity"===o)return[new ct(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(wi({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:f})),"array"===Qn(r)&&0===r.length&&t.push(new ct(e.key,r,"array must have at least one stop")),t}function f(e){var t=[],o=e.value,s=e.key;if("array"!==Qn(o))return[new ct(s,o,"array expected, "+Qn(o)+" found")];if(2!==o.length)return[new ct(s,o,"array length 2 expected, length "+o.length+" found")];if(c){if("object"!==Qn(o[0]))return[new ct(s,o,"object expected, "+Qn(o[0])+" found")];if(void 0===o[0].zoom)return[new ct(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new ct(s,o,"object stop key must have value")];if(n&&n>ft(o[0].zoom))return[new ct(s,o[0].zoom,"stop zoom values must appear in ascending order")];ft(o[0].zoom)!==n&&(n=ft(o[0].zoom),r=void 0,a={}),t=t.concat(bi({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:_i,value:h}}))}else t=t.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},o));return ui(ht(o[1]))?t.concat([new ct(s+"[1]",o[1],"expressions are not allowed in function stops.")]):t.concat(Qi({key:s+"[1]",value:o[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function h(e,n){var s=Qn(e.value),l=ft(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new ct(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new ct(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var u="number expected, "+s+" found";return Kn(i)&&void 0===o&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ct(e.key,c,u)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!==typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function Pi(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Li(e[1],e[2],t):"any"===t?ji(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Ri)):"none"===t?["all"].concat(e.slice(1).map(Ri).map(Ni)):"in"===t?Di(e[1],e.slice(2)):"!in"===t?Ni(Di(e[1],e.slice(2))):"has"===t?zi(e[1]):"!has"===t?Ni(zi(e[1])):"within"!==t||e}function Li(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function ji(e){return["any"].concat(e.map(Ri))}function Di(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!==typeof t[0]}))?["filter-in-large",e,["literal",t.sort(Oi)]]:["filter-in-small",e,["literal",t]]}}function zi(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Ni(e){return["!",e]}function Fi(e){return Ai(ht(e.value))?Si(dt({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Bi(e)}function Bi(e){var t=e.value,r=e.key;if("array"!==Qn(t))return[new ct(r,t,"array expected, "+Qn(t)+" found")];var n,i=e.styleSpec,o=[];if(t.length<1)return[new ct(r,t,"filter array must have at least 1 element")];switch(o=o.concat(Ci({key:r+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),ft(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===ft(t[1])&&o.push(new ct(r,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&o.push(new ct(r,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(n=Qn(t[1]))&&o.push(new ct(r+"[1]",t[1],"string expected, "+n+" found"));for(var a=2;a=u[h+0]&&n>=u[h+1])?(a[f]=!0,o.push(c[f])):a[f]=!1}}},fo.prototype._forEachCell=function(e,t,r,n,i,o,a,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),d=this._convertToCellCoord(n),f=l;f<=u;f++)for(var h=c;h<=d;h++){var p=this.d*h+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(h),this._convertFromCellCoord(f+1),this._convertFromCellCoord(h+1)))&&i.call(this,e,t,r,n,p,o,a,s))return}},fo.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},fo.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},fo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=uo+this.cells.length+1+1,r=0,n=0;n=0)){var d=e[u];c[u]=mo[l].shallow.indexOf(u)>=0?d:bo(d,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function wo(e){if(null===e||void 0===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||yo(e)||xo(e)||ArrayBuffer.isView(e)||e instanceof ho)return e;if(Array.isArray(e))return e.map(wo);if("object"===typeof e){var t=e.$name||"Object",r=mo[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),i=0,o=Object.keys(e);i=0?s:wo(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var _o=function(){this.first=!0};_o.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function So(e){for(var t=0,r=e;t=65097&&e<=65103)||!!ko["CJK Compatibility Ideographs"](e)||!!ko["CJK Compatibility"](e)||!!ko["CJK Radicals Supplement"](e)||!!ko["CJK Strokes"](e)||!(!ko["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||!!ko["CJK Unified Ideographs Extension A"](e)||!!ko["CJK Unified Ideographs"](e)||!!ko["Enclosed CJK Letters and Months"](e)||!!ko["Hangul Compatibility Jamo"](e)||!!ko["Hangul Jamo Extended-A"](e)||!!ko["Hangul Jamo Extended-B"](e)||!!ko["Hangul Jamo"](e)||!!ko["Hangul Syllables"](e)||!!ko.Hiragana(e)||!!ko["Ideographic Description Characters"](e)||!!ko.Kanbun(e)||!!ko["Kangxi Radicals"](e)||!!ko["Katakana Phonetic Extensions"](e)||!(!ko.Katakana(e)||12540===e)||!(!ko["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!ko["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||!!ko["Unified Canadian Aboriginal Syllabics"](e)||!!ko["Unified Canadian Aboriginal Syllabics Extended"](e)||!!ko["Vertical Forms"](e)||!!ko["Yijing Hexagram Symbols"](e)||!!ko["Yi Syllables"](e)||!!ko["Yi Radicals"](e))}function Eo(e){return!(!ko["Latin-1 Supplement"](e)||167!==e&&169!==e&&174!==e&&177!==e&&188!==e&&189!==e&&190!==e&&215!==e&&247!==e)||!(!ko["General Punctuation"](e)||8214!==e&&8224!==e&&8225!==e&&8240!==e&&8241!==e&&8251!==e&&8252!==e&&8258!==e&&8263!==e&&8264!==e&&8265!==e&&8273!==e)||!!ko["Letterlike Symbols"](e)||!!ko["Number Forms"](e)||!(!ko["Miscellaneous Technical"](e)||!(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215))||!(!ko["Control Pictures"](e)||9251===e)||!!ko["Optical Character Recognition"](e)||!!ko["Enclosed Alphanumerics"](e)||!!ko["Geometric Shapes"](e)||!(!ko["Miscellaneous Symbols"](e)||e>=9754&&e<=9759)||!(!ko["Miscellaneous Symbols and Arrows"](e)||!(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243))||!!ko["CJK Symbols and Punctuation"](e)||!!ko.Katakana(e)||!!ko["Private Use Area"](e)||!!ko["CJK Compatibility Forms"](e)||!!ko["Small Form Variants"](e)||!!ko["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e}function Io(e){return!(Ao(e)||Eo(e))}function Oo(e){return ko.Arabic(e)||ko["Arabic Supplement"](e)||ko["Arabic Extended-A"](e)||ko["Arabic Presentation Forms-A"](e)||ko["Arabic Presentation Forms-B"](e)}function Po(e){return e>=1424&&e<=2303||ko["Arabic Presentation Forms-A"](e)||ko["Arabic Presentation Forms-B"](e)}function Ro(e,t){return!(!t&&Po(e))&&!(e>=2304&&e<=3583||e>=3840&&e<=4255||ko.Khmer(e))}function Lo(e){for(var t=0,r=e;t-1&&(No=Do.error),zo&&zo(e)};function Zo(){Uo.fire(new ot("pluginStateChange",{pluginStatus:No,pluginURL:Fo}))}var Uo=new st,Vo=function(){return No},Ho=function(e){return e({pluginStatus:No,pluginURL:Fo}),Uo.on("pluginStateChange",e),e},Wo=function(e,t,r){if(void 0===r&&(r=!1),No===Do.deferred||No===Do.loading||No===Do.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Fo=q.resolveURL(e),No=Do.deferred,zo=t,Zo(),r||Go()},Go=function(){if(No!==Do.deferred||!Fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");No=Do.loading,Zo(),Fo&&qe({url:Fo},(function(e){e?Bo(e):(No=Do.loaded,Zo())}))},qo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return No===Do.loaded||null!=qo.applyArabicShaping},isLoading:function(){return No===Do.loading},setState:function(e){No=e.pluginStatus,Fo=e.pluginURL},isParsed:function(){return null!=qo.applyArabicShaping&&null!=qo.processBidirectionalText&&null!=qo.processStyledBidirectionalText},getPluginURL:function(){return Fo}},Yo=function(){qo.isLoading()||qo.isLoaded()||"deferred"!==Vo()||Go()},Xo=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new _o,this.transition={})};Xo.prototype.isSupportedScript=function(e){return jo(e,qo.isLoaded())},Xo.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Xo.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Ko=function(e,t){this.property=e,this.value=t,this.expression=gi(void 0===t?e.specification.default:t,e.specification)};Ko.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ko.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var $o=function(e){this.property=e,this.value=new Ko(e,void 0)};$o.prototype.transitioned=function(e,t){return new Qo(this.property,this.value,t,g({},e.transition,this.transition),e.now)},$o.prototype.untransitioned=function(){return new Qo(this.property,this.value,null,{},0)};var Jo=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Jo.prototype.getValue=function(e){return M(this._values[e].value.value)},Jo.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new $o(this._values[e].property)),this._values[e].value=new Ko(this._values[e].property,null===t?void 0:M(t))},Jo.prototype.getTransition=function(e){return M(this._values[e].transition)},Jo.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new $o(this._values[e].property)),this._values[e].transition=M(t)||void 0},Jo.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(nn.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(oa),sa=function(e){this.specification=e};sa.prototype.possiblyEvaluate=function(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Xo(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Xo(Math.floor(t.zoom),t)),e.expression.evaluate(new Xo(Math.floor(t.zoom+1),t)),t)}},sa.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},sa.prototype.interpolate=function(e){return e};var la=function(e){this.specification=e};la.prototype.possiblyEvaluate=function(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)},la.prototype.interpolate=function(){return!1};var ca=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Ko(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new $o(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};go("DataDrivenProperty",oa),go("DataConstantProperty",ia),go("CrossFadedDataDrivenProperty",aa),go("CrossFadedProperty",sa),go("ColorRampProperty",la);var ua="-transition",da=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new ta(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Jo(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new na(r.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".layout."+e;if(this._validate(so,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return k(e,ua)?this._transitionablePaint.getTransition(e.slice(0,-ua.length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!==t&&void 0!==t){var n="layers."+this.id+".paint."+e;if(this._validate(ao,n,e,t,r))return!1}if(k(e,ua))return this._transitionablePaint.setTransition(e.slice(0,-ua.length),t||void 0),!1;var i=this._transitionablePaint._values[e],o="cross-faded-data-driven"===i.property.specification["property-type"],a=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||a||o||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),T(e,(function(e,t){return void 0!==e&&!("layout"===t&&!Object.keys(e).length)&&!("paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&lo(this,e.call(io,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:lt,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof ra&&Kn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(st),fa={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ha=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},pa=128,ma=5,ga=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function va(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var i=ya(e.type),o=r=xa(r,Math.max(t,i)),a=e.components||1;return n=Math.max(n,i),r+=i*a,{name:e.name,type:e.type,components:a,offset:o}})),size:xa(r,Math.max(n,t)),alignment:t}}function ya(e){return fa[e].BYTES_PER_ELEMENT}function xa(e,t){return Math.ceil(e/t)*t}ga.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},ga.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},ga.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ga.prototype.clear=function(){this.length=0},ga.prototype.resize=function(e){this.reserve(e),this.length=e},ga.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*ma),pa),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},ga.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(ga);ba.prototype.bytesPerElement=4,go("StructArrayLayout2i4",ba);var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=4*e;return this.int16[o+0]=t,this.int16[o+1]=r,this.int16[o+2]=n,this.int16[o+3]=i,e},t}(ga);wa.prototype.bytesPerElement=8,go("StructArrayLayout4i8",wa);var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(ga);_a.prototype.bytesPerElement=12,go("StructArrayLayout2i4i12",_a);var ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e},t}(ga);ka.prototype.bytesPerElement=8,go("StructArrayLayout2i4ub8",ka);var Sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,o,a,s,l,c)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u){var d=9*e,f=18*e;return this.uint16[d+0]=t,this.uint16[d+1]=r,this.uint16[d+2]=n,this.uint16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint8[f+16]=c,this.uint8[f+17]=u,e},t}(ga);Sa.prototype.bytesPerElement=18,go("StructArrayLayout8ui2ub18",Sa);var Ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d){var f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,o,a,s,l,c,u,d)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f){var h=12*e;return this.int16[h+0]=t,this.int16[h+1]=r,this.int16[h+2]=n,this.int16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.int16[h+8]=c,this.int16[h+9]=u,this.int16[h+10]=d,this.int16[h+11]=f,e},t}(ga);Ta.prototype.bytesPerElement=24,go("StructArrayLayout4i4ui4i24",Ta);var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e},t}(ga);Ma.prototype.bytesPerElement=12,go("StructArrayLayout3f12",Ma);var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(ga);Ca.prototype.bytesPerElement=4,go("StructArrayLayout1ul4",Ca);var Aa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,o,a,s,l)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c){var u=10*e,d=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=o,this.int16[u+5]=a,this.uint32[d+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(ga);Aa.prototype.bytesPerElement=20,go("StructArrayLayout6i1ul2ui20",Aa);var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,o){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i,o)},t.prototype.emplace=function(e,t,r,n,i,o,a){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e},t}(ga);Ea.prototype.bytesPerElement=12,go("StructArrayLayout2i2i2i12",Ea);var Ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i)},t.prototype.emplace=function(e,t,r,n,i,o){var a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.int16[s+6]=i,this.int16[s+7]=o,e},t}(ga);Ia.prototype.bytesPerElement=16,go("StructArrayLayout2f1f2i16",Ia);var Oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=r,this.float32[a+1]=n,this.float32[a+2]=i,e},t}(ga);Oa.prototype.bytesPerElement=12,go("StructArrayLayout2ub2f12",Oa);var Pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e},t}(ga);Pa.prototype.bytesPerElement=6,go("StructArrayLayout3ui6",Pa);var Ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g){var v=this.length;return this.resize(v+1),this.emplace(v,e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v){var y=24*e,x=12*e,b=48*e;return this.int16[y+0]=t,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=o,this.uint32[x+3]=a,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=d,this.float32[x+8]=f,this.uint8[b+36]=h,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[y+22]=v,e},t}(ga);Ra.prototype.bytesPerElement=48,go("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ra);var La=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.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)},t.prototype.emplaceBack=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C){var A=this.length;return this.resize(A+1),this.emplace(A,e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C)},t.prototype.emplace=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A){var E=34*e,I=17*e;return this.int16[E+0]=t,this.int16[E+1]=r,this.int16[E+2]=n,this.int16[E+3]=i,this.int16[E+4]=o,this.int16[E+5]=a,this.int16[E+6]=s,this.int16[E+7]=l,this.uint16[E+8]=c,this.uint16[E+9]=u,this.uint16[E+10]=d,this.uint16[E+11]=f,this.uint16[E+12]=h,this.uint16[E+13]=p,this.uint16[E+14]=m,this.uint16[E+15]=g,this.uint16[E+16]=v,this.uint16[E+17]=y,this.uint16[E+18]=x,this.uint16[E+19]=b,this.uint16[E+20]=w,this.uint16[E+21]=_,this.uint16[E+22]=k,this.uint32[I+12]=S,this.float32[I+13]=T,this.float32[I+14]=M,this.float32[I+15]=C,this.float32[I+16]=A,e},t}(ga);La.prototype.bytesPerElement=68,go("StructArrayLayout8i15ui1ul4f68",La);var ja=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(ga);ja.prototype.bytesPerElement=4,go("StructArrayLayout1f4",ja);var Da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e},t}(ga);Da.prototype.bytesPerElement=6,go("StructArrayLayout3i6",Da);var za=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=2*e,o=4*e;return this.uint32[i+0]=t,this.uint16[o+2]=r,this.uint16[o+3]=n,e},t}(ga);za.prototype.bytesPerElement=8,go("StructArrayLayout1ul2ui8",za);var Na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(ga);Na.prototype.bytesPerElement=4,go("StructArrayLayout2ui4",Na);var Fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(ga);Fa.prototype.bytesPerElement=2,go("StructArrayLayout1ui2",Fa);var Ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(ga);Ba.prototype.bytesPerElement=8,go("StructArrayLayout2f8",Ba);var Za=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var o=4*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.float32[o+3]=i,e},t}(ga);Za.prototype.bytesPerElement=16,go("StructArrayLayout4f16",Za);var Ua=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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 o(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(ha);Ua.prototype.size=20;var Va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ua(this,e)},t}(Aa);go("CollisionBoxArray",Va);var Ha=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(ha);Ha.prototype.size=48;var Wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ha(this,e)},t}(Ra);go("PlacedSymbolArray",Wa);var Ga=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(e){this._structArray.uint32[this._pos4+12]=e},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(t.prototype,r),t}(ha);Ga.prototype.size=68;var qa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ga(this,e)},t}(La);go("SymbolInstanceArray",qa);var Ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(ja);go("GlyphOffsetArray",Ya);var Xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(Da);go("SymbolLineVertexArray",Xa);var Ka=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;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(t.prototype,r),t}(ha);Ka.prototype.size=8;var $a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ka(this,e)},t}(za);go("FeatureIndexArray",$a);var Ja=va([{name:"a_pos",components:2,type:"Int16"}],4).members,Qa=function(e){void 0===e&&(e=[]),this.segments=e};function es(e,t){return 256*(e=d(Math.floor(e),0,255))+(t=d(Math.floor(t),0,255))}Qa.prototype.prepareSegment=function(e,t,r,n){var i=this.segments[this.segments.length-1];return e>Qa.MAX_VERTEX_ARRAY_LENGTH&&E("Max vertices per segment is "+Qa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Qa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Qa.prototype.get=function(){return this.segments},Qa.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.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}e.exports=t})),ns=t((function(e){function t(e,t){for(var r,n=e.length,i=t^n,o=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<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,++o;switch(n){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}e.exports=t})),is=rs,os=rs,as=ns;is.murmur3=os,is.murmur2=as;var ss=function(){this.ids=[],this.positions=[],this.indexed=!1};ss.prototype.add=function(e,t,r,n){this.ids.push(cs(e)),this.positions.push(t,r,n)},ss.prototype.getPositions=function(e){for(var t=cs(e),r=0,n=this.ids.length-1;r>1;this.ids[i]>=t?n=i:r=i+1}for(var o=[];this.ids[r]===t;){var a=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];o.push({index:a,start:s,end:l}),r++}return o},ss.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return us(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}},ss.deserialize=function(e){var t=new ss;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var ls=Math.pow(2,53)-1;function cs(e){var t=+e;return!isNaN(t)&&t<=ls?t:is(String(e))}function us(e,t,r,n){for(;r>1],o=r-1,a=n+1;;){do{o++}while(e[o]i);if(o>=a)break;ds(e,o,a),ds(t,3*o,3*a),ds(t,3*o+1,3*a+1),ds(t,3*o+2,3*a+2)}a-rLs.max||a.yLs.max)&&(E("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=d(a.x,Ls.min,Ls.max),a.y=d(a.y,Ls.min,Ls.max))}return r}function Ds(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}var zs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ba,this.indexArray=new Pa,this.segments=new Qa,this.programConfigurations=new As(Ja,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function Ns(e,t){for(var r=0;r=3)for(var o=0;o1){if(Vs(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function qs(e,t){for(var r,n,i,o=!1,a=0;at.y!==i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(o=!o);return o}function Ys(e,t){for(var r=!1,n=0,i=e.length-1;nt.y!==a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function Xs(e,t,r,n,i){for(var a=0,s=e;a=l.x&&i>=l.y)return!0}var c=[new o(t,r),new o(t,i),new o(n,i),new o(n,r)];if(e.length>2)for(var u=0,d=c;ui.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var o=I(e,t,r[0]);return o!==I(e,t,r[1])||o!==I(e,t,r[2])||o!==I(e,t,r[3])}function $s(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Js(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Qs(e,t,r,n,i){if(!t[0]&&!t[1])return e;var a=o.convert(t)._mult(i);"viewport"===r&&a._rotate(-n);for(var s=[],l=0;l=Ps||u<0||u>=Ps)){var d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),f=d.vertexLength;Ds(this.layoutVertexArray,c,u,-1,-1),Ds(this.layoutVertexArray,c,u,1,-1),Ds(this.layoutVertexArray,c,u,1,1),Ds(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),d.vertexLength+=4,d.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)},go("CircleBucket",zs,{omit:["layers"]});var el=new ca({"circle-sort-key":new oa(lt.layout_circle["circle-sort-key"])}),tl={paint:new ca({"circle-radius":new oa(lt.paint_circle["circle-radius"]),"circle-color":new oa(lt.paint_circle["circle-color"]),"circle-blur":new oa(lt.paint_circle["circle-blur"]),"circle-opacity":new oa(lt.paint_circle["circle-opacity"]),"circle-translate":new ia(lt.paint_circle["circle-translate"]),"circle-translate-anchor":new ia(lt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ia(lt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ia(lt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new oa(lt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new oa(lt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new oa(lt.paint_circle["circle-stroke-opacity"])}),layout:el},rl="undefined"!==typeof Float32Array?Float32Array:Array;function nl(){var e=new rl(4);return rl!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function il(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+o*s,e[1]=i*l+a*s,e[2]=n*-s+o*l,e[3]=i*-s+a*l,e}function ol(){var e=new rl(9);return rl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function al(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function sl(){var e=new rl(16);return rl!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function ll(e){var t=new rl(16);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}function cl(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ul(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*a,x=r*l-i*a,b=r*c-o*a,w=n*l-i*s,_=n*c-o*s,k=i*c-o*l,S=u*m-d*p,T=u*g-f*p,M=u*v-h*p,C=d*g-f*m,A=d*v-h*m,E=f*v-h*g,I=y*E-x*A+b*C+w*M-_*T+k*S;return I?(I=1/I,e[0]=(s*E-l*A+c*C)*I,e[1]=(i*A-n*E-o*C)*I,e[2]=(m*k-g*_+v*w)*I,e[3]=(f*_-d*k-h*w)*I,e[4]=(l*M-a*E-c*T)*I,e[5]=(r*E-i*M+o*T)*I,e[6]=(g*b-p*k-v*x)*I,e[7]=(u*k-f*b+h*x)*I,e[8]=(a*A-s*M+c*S)*I,e[9]=(n*M-r*A-o*S)*I,e[10]=(p*_-m*b+v*y)*I,e[11]=(d*b-u*_-h*y)*I,e[12]=(s*T-a*C-l*S)*I,e[13]=(r*C-n*T+i*S)*I,e[14]=(m*x-p*w-g*y)*I,e[15]=(u*w-d*x+f*y)*I,e):null}function dl(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],v=t[14],y=t[15],x=r[0],b=r[1],w=r[2],_=r[3];return e[0]=x*n+b*s+w*d+_*m,e[1]=x*i+b*l+w*f+_*g,e[2]=x*o+b*c+w*h+_*v,e[3]=x*a+b*u+w*p+_*y,x=r[4],b=r[5],w=r[6],_=r[7],e[4]=x*n+b*s+w*d+_*m,e[5]=x*i+b*l+w*f+_*g,e[6]=x*o+b*c+w*h+_*v,e[7]=x*a+b*u+w*p+_*y,x=r[8],b=r[9],w=r[10],_=r[11],e[8]=x*n+b*s+w*d+_*m,e[9]=x*i+b*l+w*f+_*g,e[10]=x*o+b*c+w*h+_*v,e[11]=x*a+b*u+w*p+_*y,x=r[12],b=r[13],w=r[14],_=r[15],e[12]=x*n+b*s+w*d+_*m,e[13]=x*i+b*l+w*f+_*g,e[14]=x*o+b*c+w*h+_*v,e[15]=x*a+b*u+w*p+_*y,e}function fl(e,t,r){var n,i,o,a,s,l,c,u,d,f,h,p,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+c*g+h*v+t[14],e[15]=a*m+u*g+p*v+t[15]),e}function hl(e,t,r){var n=r[0],i=r[1],o=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function pl(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[4],a=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+c*n,e[5]=a*i+u*n,e[6]=s*i+d*n,e[7]=l*i+f*n,e[8]=c*i-o*n,e[9]=u*i-a*n,e[10]=d*i-s*n,e[11]=f*i-l*n,e}function ml(e,t,r){var n=Math.sin(r),i=Math.cos(r),o=t[0],a=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],f=t[7];return t!==e&&(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[0]=o*i+c*n,e[1]=a*i+u*n,e[2]=s*i+d*n,e[3]=l*i+f*n,e[4]=c*i-o*n,e[5]=u*i-a*n,e[6]=d*i-s*n,e[7]=f*i-l*n,e}function gl(e,t,r,n,i){var o,a=1/Math.tan(t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(n-i),e[10]=(i+n)*o,e[14]=2*i*n*o):(e[10]=-1,e[14]=-2*n),e}function vl(e,t,r,n,i,o,a){var s=1/(t-r),l=1/(n-i),c=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(a+o)*c,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var yl=dl;function xl(){var e=new rl(3);return rl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function bl(e){var t=new rl(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function wl(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function _l(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function kl(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function Sl(e,t){var r=t[0],n=t[1],i=t[2],o=r*r+n*n+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function Tl(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ml(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2];return e[0]=i*l-o*s,e[1]=o*a-n*l,e[2]=n*s-i*a,e}function Cl(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}var Al=_l;function El(){var e=new rl(4);return rl!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function Il(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function Ol(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Pl(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,e}function Rl(){var e=new rl(2);return rl!=Float32Array&&(e[0]=0,e[1]=0),e}function Ll(e){var t=e[0],r=e[1];return t*t+r*r}xl(),El();var jl=Ll,Dl=(Rl(),function(e){function t(t){e.call(this,t,tl)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new zs(e)},t.prototype.queryRadius=function(e){var t=e;return $s("circle-radius",this,t)+$s("circle-stroke-width",this,t)+Js(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,a,s){for(var l=Qs(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u="map"===this.paint.get("circle-pitch-alignment"),d=u?l:Nl(l,s),f=u?c*a:c,h=0,p=n;he.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=e.data,s=t.data,l=0;l80*r){n=o=e[0],i=a=e[1];for(var p=r;po&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-n,a-i))?1/c:0}return rc(f,h,r,n,i,c),h}function ec(e,t,r,n,i){var o,a;if(i===Ic(e,t,r,n)>0)for(o=t;o=t;o-=n)a=Cc(o,e[o],e[o+1],a);return a&&xc(a,a.next)&&(Ac(a),a=a.next),a}function tc(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!xc(n,n.next)&&0!==yc(n.prev,n,n.next))n=n.next;else{if(Ac(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function rc(e,t,r,n,i,o,a){if(e){!a&&o&&fc(e,n,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?ic(e,n,i,o):nc(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),Ac(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?rc(e=oc(tc(e),t,r),t,r,n,i,o,2):2===a&&ac(e,t,r,n,i,o):rc(tc(e),t,r,n,i,o,1);break}}}function nc(e){var t=e.prev,r=e,n=e.next;if(yc(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(gc(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&yc(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ic(e,t,r,n){var i=e.prev,o=e,a=e.next;if(yc(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=pc(s,l,t,r,n),f=pc(c,u,t,r,n),h=e.prevZ,p=e.nextZ;h&&h.z>=d&&p&&p.z<=f;){if(h!==e.prev&&h!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&yc(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&yc(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&gc(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&yc(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function oc(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!xc(i,o)&&bc(i,n,n.next,o)&&Sc(i,o)&&Sc(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),Ac(n),Ac(n.next),n=e=o),n=n.next}while(n!==e);return tc(n)}function ac(e,t,r,n,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&vc(a,s)){var l=Mc(a,s);return a=tc(a,a.next),l=tc(l,l.next),rc(a,t,r,n,i,o),void rc(l,t,r,n,i,o)}s=s.next}a=a.next}while(a!==e)}function sc(e,t,r,n){var i,o,a,s=[];for(i=0,o=t.length;i=n.next.y&&n.next.y!==n.y){var s=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>a){if(a=s,s===i){if(o===n.y)return n;if(o===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&gc(or.x||n.x===r.x&&dc(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}function dc(e,t){return yc(e.prev,e,t.prev)<0&&yc(t.next,e,e.next)<0}function fc(e,t,r,n){var i=e;do{null===i.z&&(i.z=pc(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,hc(i)}function hc(e){var t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1);return e}function pc(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function mc(e){var t=e,r=e;do{(t.x=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function vc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!kc(e,t)&&(Sc(e,t)&&Sc(t,e)&&Tc(e,t)&&(yc(e.prev,e,t.prev)||yc(e,t.prev,t))||xc(e,t)&&yc(e.prev,e,e.next)>0&&yc(t.prev,t,t.next)>0)}function yc(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function xc(e,t){return e.x===t.x&&e.y===t.y}function bc(e,t,r,n){var i=_c(yc(e,t,r)),o=_c(yc(e,t,n)),a=_c(yc(r,n,e)),s=_c(yc(r,n,t));return i!==o&&a!==s||!(0!==i||!wc(e,r,t))||!(0!==o||!wc(e,n,t))||!(0!==a||!wc(r,e,n))||!(0!==s||!wc(r,t,n))}function wc(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _c(e){return e>0?1:e<0?-1:0}function kc(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&bc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Sc(e,t){return yc(e.prev,e,e.next)<0?yc(e,t,e.next)>=0&&yc(e,e.prev,t)>=0:yc(e,t,e.prev)<0||yc(e,e.next,t)<0}function Tc(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{r.y>o!==r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}function Mc(e,t){var r=new Ec(e.i,e.x,e.y),n=new Ec(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Cc(e,t,r,n){var i=new Ec(e,t,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 Ac(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Ec(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ic(e,t,r,n){for(var i=0,o=t,a=r-n;or;){if(n-r>600){var o=n-r+1,a=t-r+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Pc(e,t,Math.max(r,Math.floor(t-a*l/o+c)),Math.min(n,Math.floor(t+(o-a)*l/o+c)),i)}var u=e[t],d=r,f=n;for(Rc(e,r,t),i(e[n],u)>0&&Rc(e,r,n);d0;)f--}0===i(e[r],u)?Rc(e,r,f):Rc(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function Rc(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Lc(e,t){return et?1:0}function jc(e,t){var r=e.length;if(r<=1)return[e];for(var n,i,o=[],a=0;a1)for(var l=0;l0&&(n+=e[i-1].length,r.holes.push(n))}return r},$l.default=Jl;var Fc=500,Bc=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ba,this.indexArray=new Pa,this.indexArray2=new Na,this.programConfigurations=new As(Kl,e.layers,e.zoom),this.segments=new Qa,this.segments2=new Qa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Bc.prototype.populate=function(e,t,r){this.hasPattern=zc("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],o=0,a=e;o>3}if(i--,1===n||2===n)a+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new o(a,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Gc.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(o+=e.readSVarint())c&&(c=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,c]},Gc.prototype.toGeoJSON=function(e,t,r){var n,i,o=this.extent*Math.pow(2,r),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Gc.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}function tu(e,t){this.layers=e.readFields(ru,{},t)}function ru(e,t,r){if(3===e){var n=new $c(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}Jc.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Wc(this._pbf,t,this.extent,this._keys,this._values)};var nu={VectorTile:tu,VectorTileFeature:Wc,VectorTileLayer:$c},iu=nu.VectorTileFeature.types,ou=500,au=Math.pow(2,13);function su(e,t,r,n,i,o,a,s){e.emplaceBack(t,r,2*Math.floor(n*au)+a,i*au*2,o*au*2,Math.round(s))}var lu=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new _a,this.indexArray=new Pa,this.programConfigurations=new As(Hc,e.layers,e.zoom),this.segments=new Qa,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function cu(e,t){return e.x===t.x&&(e.x<0||e.x>Ps)||e.y===t.y&&(e.y<0||e.y>Ps)}function uu(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>Ps}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>Ps}))}lu.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=zc("fill-extrusion",this.layers,t);for(var n=0,i=e;n=1){var y=p[g-1];if(!cu(v,y)){d.vertexLength+4>Qa.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);m+b>32768&&(m=0),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m),m+=b,su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),su(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m);var w=d.vertexLength;this.indexArray.emplaceBack(w,w+2,w+1),this.indexArray.emplaceBack(w+1,w+2,w+3),d.vertexLength+=4,d.primitiveLength+=2}}}}if(d.vertexLength+l>Qa.MAX_VERTEX_ARRAY_LENGTH&&(d=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===iu[e.type]){for(var _=[],k=[],S=d.vertexLength,T=0,M=s;T=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c0;if(k&&v>c){var T=u.dist(h);if(T>2*d){var M=u.sub(u.sub(h)._mult(d/T)._round());this.updateDistance(h,M),this.addCurrentVertex(M,m,0,0,f),h=M}}var C=h&&p,A=C?r:s?"butt":n;if(C&&"round"===A&&(wi&&(A="bevel"),"bevel"===A&&(w>2&&(A="flipbevel"),w100)y=g.mult(-1);else{var E=w*m.add(g).mag()/m.sub(g).mag();y._perp()._mult(E*(S?-1:1))}this.addCurrentVertex(u,y,0,0,f),this.addCurrentVertex(u,y.mult(-1),0,0,f)}else if("bevel"===A||"fakeround"===A){var I=-Math.sqrt(w*w-1),O=S?I:0,P=S?0:I;if(h&&this.addCurrentVertex(u,m,O,P,f),"fakeround"===A)for(var R=Math.round(180*_/Math.PI/ku),L=1;L2*d){var B=u.add(p.sub(u)._mult(d/F)._round());this.updateDistance(u,B),this.addCurrentVertex(B,g,0,0,f),u=B}}}}},Cu.prototype.addCurrentVertex=function(e,t,r,n,i,o){void 0===o&&(o=!1);var a=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,c=-t.y-t.x*n;this.addHalfVertex(e,a,s,o,!1,r,i),this.addHalfVertex(e,l,c,o,!0,-n,i),this.distance>Mu/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,i,o))},Cu.prototype.addHalfVertex=function(e,t,r,n,i,o,a){var s=e.x,l=e.y,c=this.scaledDistance*Tu;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(bu*t)+128,Math.round(bu*r)+128,1+(0===o?0:o<0?-1:1)|(63&c)<<2,c>>6);var u=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),a.primitiveLength++),i?this.e2=u:this.e1=u},Cu.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Mu-1):this.distance},Cu.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},go("LineBucket",Cu,{omit:["layers","patternFeatures"]});var Au=new ca({"line-cap":new ia(lt.layout_line["line-cap"]),"line-join":new oa(lt.layout_line["line-join"]),"line-miter-limit":new ia(lt.layout_line["line-miter-limit"]),"line-round-limit":new ia(lt.layout_line["line-round-limit"]),"line-sort-key":new oa(lt.layout_line["line-sort-key"])}),Eu={paint:new ca({"line-opacity":new oa(lt.paint_line["line-opacity"]),"line-color":new oa(lt.paint_line["line-color"]),"line-translate":new ia(lt.paint_line["line-translate"]),"line-translate-anchor":new ia(lt.paint_line["line-translate-anchor"]),"line-width":new oa(lt.paint_line["line-width"]),"line-gap-width":new oa(lt.paint_line["line-gap-width"]),"line-offset":new oa(lt.paint_line["line-offset"]),"line-blur":new oa(lt.paint_line["line-blur"]),"line-dasharray":new sa(lt.paint_line["line-dasharray"]),"line-pattern":new aa(lt.paint_line["line-pattern"]),"line-gradient":new la(lt.paint_line["line-gradient"])}),layout:Au},Iu=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new Xo(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,i){return r=g({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,i)},t}(oa),Ou=new Iu(Eu.paint.properties["line-width"].specification);Ou.useIntegerZoom=!0;var Pu=function(e){function t(t){e.call(this,t,Eu)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Gl(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t,r){e.prototype.recalculate.call(this,t,r),this.paint._values["line-floorwidth"]=Ou.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Cu(e)},t.prototype.queryRadius=function(e){var t=e,r=Ru($s("line-width",this,t),$s("line-gap-width",this,t)),n=$s("line-offset",this,t);return r/2+Math.abs(n)+Js(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,a){var s=Qs(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),l=a/2*Ru(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),c=this.paint.get("line-offset").evaluate(t,r);return c&&(n=Lu(n,c*a)),Zs(s,n,l)},t.prototype.isTileClipped=function(){return!0},t}(da);function Ru(e,t){return t>0?t+2*e:e}function Lu(e,t){for(var r=[],n=new o(0,0),i=0;i":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Hu(e){for(var t="",r=0;r>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},write:function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},qu=Yu;function Yu(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Yu.Varint=0,Yu.Fixed64=1,Yu.Bytes=2,Yu.Fixed32=5;var Xu=4294967296,Ku=1/Xu,$u=12,Ju="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function Qu(e,t,r){var n,i,o=r.buf;if(n=(112&(i=o[r.pos++]))>>4,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<3,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<10,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<17,i<128)return td(e,n,t);if(n|=(127&(i=o[r.pos++]))<<24,i<128)return td(e,n,t);if(n|=(1&(i=o[r.pos++]))<<31,i<128)return td(e,n,t);throw new Error("Expected varint not more than 10 bytes")}function ed(e){return e.type===Yu.Bytes?e.readVarint()+e.pos:e.pos+1}function td(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function rd(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),nd(r,n,t),id(n,t)}function nd(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}function id(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function od(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function ad(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function vd(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function yd(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128===(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}function xd(e,t,r){return Ju.decode(e.subarray(t,r))}function bd(e,t,r){for(var n,i,o=0;o55295&&n<57344){if(!i){n>56319||o+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}Yu.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=7&n,e(i,t,this),this.pos===o&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=md(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=vd(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=md(this.buf,this.pos)+md(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readSFixed64:function(){var e=md(this.buf,this.pos)+vd(this.buf,this.pos+4)*Xu;return this.pos+=8,e},readFloat:function(){var e=Gu.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Gu.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:Qu(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=$u&&Ju?xd(this.buf,t,e):yd(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Yu.Bytes)return e.push(this.readVarint(t));var r=ed(this);for(e=e||[];this.pos127;);else if(t===Yu.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Yu.Fixed32)this.pos+=4;else{if(t!==Yu.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?rd(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=bd(this.buf,e,this.pos);var r=this.pos-t;r>=128&&od(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Gu.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Gu.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&od(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Yu.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,ad,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,sd,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,ud,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,ld,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,cd,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,dd,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,fd,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,hd,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,pd,t)},writeBytesField:function(e,t){this.writeTag(e,Yu.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Yu.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Yu.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Yu.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Yu.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Yu.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var wd=3;function _d(e,t,r){1===e&&r.readMessage(kd,t)}function kd(e,t,r){if(3===e){var n=r.readMessage(Sd,{}),i=n.id,o=n.bitmap,a=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;t.push({id:i,bitmap:new Vl({width:a+2*wd,height:s+2*wd},o),metrics:{width:a,height:s,left:l,top:c,advance:u}})}}function Sd(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function Td(e){return new qu(e).readFields(_d,[])}var Md=wd;function Cd(e){for(var t=0,r=0,n=0,i=e;n=0;f--){var h=a[f];if(!(d.w>h.w||d.h>h.h)){if(d.x=h.x,d.y=h.y,l=Math.max(l,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===h.w&&d.h===h.h){var p=a.pop();f=0&&n>=e&&Zd[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},Nd.prototype.substring=function(e,t){var r=new Nd;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},Nd.prototype.toString=function(){return this.text},Nd.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},Nd.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(zd.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,n=0;n=Dd?null:++this.imageSectionID:(this.imageSectionID=jd,this.imageSectionID)};var Zd={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ud={};function Vd(e,t,r,n,i,o){if(t.imageName){var a=n[t.imageName];return a?a.displaySize[0]*t.scale*Wu/o+i:0}var s=r[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function Hd(e,t,r,n,i,o){for(var a=0,s=0;s=0,u=0,d=0;d0&&N>T&&(T=N)}else{var F=r[C.fontStack],B=F&&F[E];if(B&&B.rect)P=B.rect,O=B.metrics;else{var Z=t[C.fontStack],U=Z&&Z[E];if(!U)continue;O=U.metrics}I=(w-C.scale)*Wu}j?(e.verticalizable=!0,S.push({glyph:E,imageName:R,x:f,y:h+I,vertical:j,scale:C.scale,fontStack:C.fontStack,sectionIndex:A,metrics:O,rect:P}),f+=L*C.scale+c):(S.push({glyph:E,imageName:R,x:f,y:h+I,vertical:j,scale:C.scale,fontStack:C.fontStack,sectionIndex:A,metrics:O,rect:P}),f+=O.advance*C.scale+c)}if(0!==S.length){var V=f-c;p=Math.max(V,p),Jd(S,0,S.length-1,g,T)}f=0;var H=o*w+T;k.lineOffset=Math.max(T,_),h+=H,m=Math.max(H,m),++v}else h+=o,++v}var W=h-Rd,G=Kd(a),q=G.horizontalAlign,Y=G.verticalAlign;Qd(e.positionedLines,g,q,Y,p,m,o,W,i.length),e.top+=-Y*W,e.bottom=e.top+W,e.left+=-q*p,e.right=e.left+p}function Jd(e,t,r,n,i){if(n||i)for(var o=e[r],a=o.metrics.advance*o.scale,s=(e[r].x+a)*n,l=t;l<=r;l++)e[l].x-=s,e[l].y+=i}function Qd(e,t,r,n,i,o,a,s,l){var c=(t-r)*i,u=0;u=o!==a?-s*n-Rd:(-n*l+.5)*a;for(var d=0,f=e;d-r/2;){if(--a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;a++,s+=d.dist(f)}return!0}function uf(e){for(var t=0,r=0;rc){var p=(c-l)/h,m=Dr(d.x,f.x,p),g=Dr(d.y,f.y,p),v=new rf(m,g,f.angleTo(d),u);return v._round(),!a||cf(e,v,s,a,t)?v:void 0}l+=h}}function pf(e,t,r,n,i,o,a,s,l){var c=df(n,o,a),u=ff(n,i),d=u*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&b=0&&w=0&&f+c<=u){var _=new rf(b,w,y,p);_._round(),n&&!cf(e,_,o,n,i)||h.push(_)}}d+=v}return s||h.length||a||(h=mf(e,d/2,r,n,i,o,a,!0,l)),h}function gf(e,t,r,n,i){for(var a=[],s=0;s=n&&f.x>=n||(d.x>=n?d=new o(n,d.y+(f.y-d.y)*((n-d.x)/(f.x-d.x)))._round():f.x>=n&&(f=new o(n,d.y+(f.y-d.y)*((n-d.x)/(f.x-d.x)))._round()),d.y>=i&&f.y>=i||(d.y>=i?d=new o(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round():f.y>=i&&(f=new o(d.x+(f.x-d.x)*((i-d.y)/(f.y-d.y)),i)._round()),c&&d.equals(c[c.length-1])||(c=[d],a.push(c)),c.push(f)))))}return a}var vf=Ad;function yf(e,t,r,n){var i=[],a=e.image,s=a.pixelRatio,l=a.paddedRect.w-2*vf,c=a.paddedRect.h-2*vf,u=e.right-e.left,d=e.bottom-e.top,f=a.stretchX||[[0,l]],h=a.stretchY||[[0,c]],p=function(e,t){return e+t[1]-t[0]},m=f.reduce(p,0),g=h.reduce(p,0),v=l-m,y=c-g,x=0,b=m,w=0,_=g,k=0,S=v,T=0,M=y;if(a.content&&n){var C=a.content;x=xf(f,0,C[0]),w=xf(h,0,C[1]),b=xf(f,C[0],C[2]),_=xf(h,C[1],C[3]),k=C[0]-x,T=C[1]-w,S=C[2]-C[0]-b,M=C[3]-C[1]-_}var A=function(n,i,l,c){var f=wf(n.stretch-x,b,u,e.left),h=_f(n.fixed-k,S,n.stretch,m),p=wf(i.stretch-w,_,d,e.top),v=_f(i.fixed-T,M,i.stretch,g),y=wf(l.stretch-x,b,u,e.left),C=_f(l.fixed-k,S,l.stretch,m),A=wf(c.stretch-w,_,d,e.top),E=_f(c.fixed-T,M,c.stretch,g),I=new o(f,p),O=new o(y,p),P=new o(y,A),R=new o(f,A),L=new o(h/s,v/s),j=new o(C/s,E/s),D=t*Math.PI/180;if(D){var z=Math.sin(D),N=Math.cos(D),F=[N,-z,z,N];I._matMult(F),O._matMult(F),R._matMult(F),P._matMult(F)}var B=n.stretch+n.fixed,Z=l.stretch+l.fixed,U=i.stretch+i.fixed,V=c.stretch+c.fixed;return{tl:I,tr:O,bl:R,br:P,tex:{x:a.paddedRect.x+vf+B,y:a.paddedRect.y+vf+U,w:Z-B,h:V-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:j,minFontScaleX:S/s/u,minFontScaleY:M/s/d,isSDF:r}};if(n&&(a.stretchX||a.stretchY))for(var E=bf(f,v,m),I=bf(h,y,g),O=0;O0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var m=a.top*s-l,g=a.bottom*s+l,v=a.left*s-l,y=a.right*s+l,x=a.collisionPadding;if(x&&(v-=x[0]*s,m-=x[1]*s,y+=x[2]*s,g+=x[3]*s),u){var b=new o(v,m),w=new o(y,m),_=new o(v,g),k=new o(y,g),S=u*Math.PI/180;b._rotate(S),w._rotate(S),_._rotate(S),k._rotate(S),v=Math.min(b.x,w.x,_.x,k.x),y=Math.max(b.x,w.x,_.x,k.x),m=Math.min(b.y,w.y,_.y,k.y),g=Math.max(b.y,w.y,_.y,k.y)}e.emplaceBack(t.x,t.y,v,m,y,g,r,n,i)}this.boxEndIndex=e.length},Tf=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=Mf),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Mf(e,t){return et?1:0}function Cf(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,a=-1/0,s=-1/0,l=e[0],c=0;ca)&&(a=u.x),(!c||u.y>s)&&(s=u.y)}var d=a-n,f=s-i,h=Math.min(d,f),p=h/2,m=new Tf([],Af);if(0===h)return new o(n,i);for(var g=n;gy.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<=t||(p=b.h/2,m.push(new Ef(b.p.x-p,b.p.y-p,p,e)),m.push(new Ef(b.p.x+p,b.p.y-p,p,e)),m.push(new Ef(b.p.x-p,b.p.y+p,p,e)),m.push(new Ef(b.p.x+p,b.p.y+p,p,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+y.d)),y.p}function Af(e,t){return t.max-e.max}function Ef(e,t,r,n){this.p=new o(e,t),this.h=r,this.d=If(this.p,n),this.max=this.d+this.h*Math.SQRT2}function If(e,t){for(var r=!1,n=1/0,i=0;ie.y!==u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,Gs(e,c,u))}return(r?1:-1)*Math.sqrt(n)}function Of(e){for(var t=0,r=0,n=0,i=e[0],o=0,a=i.length,s=a-1;o0&&(this.data[0]=t,this._down(0)),e}},Tf.prototype.peek=function(){return this.data[0]},Tf.prototype._up=function(e){for(var t=this,r=t.data,n=t.compare,i=r[e];e>0;){var o=e-1>>1,a=r[o];if(n(i,a)>=0)break;r[e]=a,e=o}r[e]=i},Tf.prototype._down=function(e){for(var t=this,r=t.data,n=t.compare,i=this.length>>1,o=r[e];e=0)break;r[e]=s,e=a}r[e]=o};var Pf=7,Rf=Number.POSITIVE_INFINITY;function Lf(e,t){function r(e,t){var r=0,n=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=i-Pf;break;case"bottom-right":case"bottom-left":n=-i+Pf;break;case"bottom":n=-t+Pf;break;case"top":n=t-Pf}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}function n(e,t,r){var n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-Pf;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+Pf}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}return t[1]!==Rf?n(e,t[0],t[1]):r(e,t[0])}function jf(e,t,r,n,i,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=Ps/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var d=e.textSizeData,f=d.minZoom,h=d.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new Xo(f),a),c["text-size"].possiblyEvaluate(new Xo(h),a)]}if("composite"===e.iconSizeData.kind){var p=e.iconSizeData,m=p.minZoom,g=p.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new Xo(m),a),c["icon-size"].possiblyEvaluate(new Xo(g),a)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new Xo(e.zoom+1),a),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new Xo(e.zoom+1),a),u.textMaxSize=c["text-size"].possiblyEvaluate(new Xo(18));for(var v=l.get("text-line-height")*Wu,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),w=function(){var o=k[_],s=l.get("text-font").evaluate(o,{},a).join(","),c=b.evaluate(o,{},a),d=u.layoutTextSize.evaluate(o,{},a),f=u.layoutIconSize.evaluate(o,{},a),h={horizontal:{},vertical:void 0},p=o.text,m=[0,0];if(p){var g=p.toString(),w=l.get("text-letter-spacing").evaluate(o,{},a)*Wu,S=To(g)?w:0,T=l.get("text-anchor").evaluate(o,{},a),M=l.get("text-variable-anchor");if(!M){var C=l.get("text-radial-offset").evaluate(o,{},a);m=C?Lf(T,[C*Wu,Rf]):l.get("text-offset").evaluate(o,{},a).map((function(e){return e*Wu}))}var A=y?"center":l.get("text-justify").evaluate(o,{},a),I=l.get("symbol-placement"),O="point"===I?l.get("text-max-width").evaluate(o,{},a)*Wu:0,P=function(){e.allowVerticalPlacement&&So(g)&&(h.vertical=Bd(p,t,r,i,s,O,v,T,"left",S,m,Pd.vertical,!0,I,d,c))};if(!y&&M){for(var R="auto"===A?M.map((function(e){return Df(e)})):[A],L=!1,j=0;j=Ps||d.y<0||d.y>=Ps||Uf(e,d,s,r,n,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,_,T,l,b,k,M,p,t,o,c,u,a)};if("line"===C)for(var O=0,P=gf(t.geometry,0,0,Ps,Ps);O1){var B=hf(F,S,r.vertical||m,n,g,x);B&&I(F,B)}}else if("Polygon"===t.type)for(var Z=0,U=jc(t.geometry,0);ZFf&&E(e.layerIds[0]+': Value for "text-size" is >= '+Nf+'. Reduce your "text-size".'):"composite"===g.kind&&((v=[nf*h.compositeTextSizes[0].evaluate(a,{},p),nf*h.compositeTextSizes[1].evaluate(a,{},p)])[0]>Ff||v[1]>Ff)&&E(e.layerIds[0]+': Value for "text-size" is >= '+Nf+'. Reduce your "text-size".'),e.addSymbols(e.text,m,v,s,o,a,c,t,l.lineStartIndex,l.lineLength,f,p);for(var y=0,x=u;yFf&&E(e.layerIds[0]+': Value for "icon-size" is >= '+Nf+'. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[nf*w.compositeIconSizes[0].evaluate(b,{},k),nf*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>Ff||X[1]>Ff)&&E(e.layerIds[0]+': Value for "icon-size" is >= '+Nf+'. Reduce your "icon-size".'),e.addSymbols(e.icon,G,X,x,y,b,!1,t,O.lineStartIndex,O.lineLength,-1,k),D=e.icon.placedSymbolArray.length-1,q&&(R=4*q.length,e.addSymbols(e.icon,q,X,x,y,b,Pd.vertical,t,O.lineStartIndex,O.lineLength,-1,k),z=e.icon.placedSymbolArray.length-1)}for(var K in n.horizontal){var $=n.horizontal[K];if(!M){F=is($.text);var J=s.layout.get("text-rotate").evaluate(b,{},k);M=new Sf(l,t,c,u,d,$,f,h,p,J)}var Q=1===$.positionedLines.length;if(L+=Bf(e,t,$,o,s,p,b,m,O,n.vertical?Pd.horizontal:Pd.horizontalOnly,Q?Object.keys(n.horizontal):[K],N,D,w,k),Q)break}n.vertical&&(j+=Bf(e,t,n.vertical,o,s,p,b,m,O,Pd.vertical,["vertical"],N,z,w,k));var ee=M?M.boxStartIndex:e.collisionBoxArray.length,te=M?M.boxEndIndex:e.collisionBoxArray.length,re=A?A.boxStartIndex:e.collisionBoxArray.length,ne=A?A.boxEndIndex:e.collisionBoxArray.length,ie=C?C.boxStartIndex:e.collisionBoxArray.length,oe=C?C.boxEndIndex:e.collisionBoxArray.length,ae=I?I.boxStartIndex:e.collisionBoxArray.length,se=I?I.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(M,le),le=ce(A,le),le=ce(C,le);var ue=(le=ce(I,le))>-1?1:0;ue&&(le*=S/Wu),e.glyphOffsetArray.length>=$f.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,b.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,N.right>=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical||-1,D,z,F,ee,te,re,ne,ie,oe,ae,se,c,L,j,P,R,ue,0,f,B,Z,le)}function Vf(e,t,r,n){var i=e.compareText;if(t in i){for(var o=i[t],a=o.length-1;a>=0;a--)if(n.dist(o[a])0)&&("constant"!==o.value.kind||o.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var d=t.iconDependencies,f=t.glyphDependencies,h=t.availableImages,p=new Xo(this.zoom),m=0,g=e;m=0;for(var R=0,L=S.sections;R=0;s--)o[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},$f.prototype.hasIconData=function(){return this.icon.segments.get().length>0},$f.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},$f.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},$f.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},$f.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedSymbol(t.text,e)})),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},go("SymbolBucket",$f,{omit:["layers","collisionBoxArray","features","compareText"]}),$f.MAX_GLYPHS=65535,$f.addDynamicAttributes=qf;var Qf=new ca({"symbol-placement":new ia(lt.layout_symbol["symbol-placement"]),"symbol-spacing":new ia(lt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ia(lt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oa(lt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ia(lt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ia(lt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ia(lt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ia(lt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ia(lt.layout_symbol["icon-rotation-alignment"]),"icon-size":new oa(lt.layout_symbol["icon-size"]),"icon-text-fit":new ia(lt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ia(lt.layout_symbol["icon-text-fit-padding"]),"icon-image":new oa(lt.layout_symbol["icon-image"]),"icon-rotate":new oa(lt.layout_symbol["icon-rotate"]),"icon-padding":new ia(lt.layout_symbol["icon-padding"]),"icon-keep-upright":new ia(lt.layout_symbol["icon-keep-upright"]),"icon-offset":new oa(lt.layout_symbol["icon-offset"]),"icon-anchor":new oa(lt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ia(lt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ia(lt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ia(lt.layout_symbol["text-rotation-alignment"]),"text-field":new oa(lt.layout_symbol["text-field"]),"text-font":new oa(lt.layout_symbol["text-font"]),"text-size":new oa(lt.layout_symbol["text-size"]),"text-max-width":new oa(lt.layout_symbol["text-max-width"]),"text-line-height":new ia(lt.layout_symbol["text-line-height"]),"text-letter-spacing":new oa(lt.layout_symbol["text-letter-spacing"]),"text-justify":new oa(lt.layout_symbol["text-justify"]),"text-radial-offset":new oa(lt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ia(lt.layout_symbol["text-variable-anchor"]),"text-anchor":new oa(lt.layout_symbol["text-anchor"]),"text-max-angle":new ia(lt.layout_symbol["text-max-angle"]),"text-writing-mode":new ia(lt.layout_symbol["text-writing-mode"]),"text-rotate":new oa(lt.layout_symbol["text-rotate"]),"text-padding":new ia(lt.layout_symbol["text-padding"]),"text-keep-upright":new ia(lt.layout_symbol["text-keep-upright"]),"text-transform":new oa(lt.layout_symbol["text-transform"]),"text-offset":new oa(lt.layout_symbol["text-offset"]),"text-allow-overlap":new ia(lt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ia(lt.layout_symbol["text-ignore-placement"]),"text-optional":new ia(lt.layout_symbol["text-optional"])}),eh={paint:new ca({"icon-opacity":new oa(lt.paint_symbol["icon-opacity"]),"icon-color":new oa(lt.paint_symbol["icon-color"]),"icon-halo-color":new oa(lt.paint_symbol["icon-halo-color"]),"icon-halo-width":new oa(lt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oa(lt.paint_symbol["icon-halo-blur"]),"icon-translate":new ia(lt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ia(lt.paint_symbol["icon-translate-anchor"]),"text-opacity":new oa(lt.paint_symbol["text-opacity"]),"text-color":new oa(lt.paint_symbol["text-color"],{runtimeType:bt,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new oa(lt.paint_symbol["text-halo-color"]),"text-halo-width":new oa(lt.paint_symbol["text-halo-width"]),"text-halo-blur":new oa(lt.paint_symbol["text-halo-blur"]),"text-translate":new ia(lt.paint_symbol["text-translate"]),"text-translate-anchor":new ia(lt.paint_symbol["text-translate-anchor"])}),layout:Qf},th=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:gt,this.defaultValue=e};th.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},th.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},th.prototype.outputDefined=function(){return!1},th.prototype.serialize=function(){return null},go("FormatSectionOverride",th,{omit:["defaultValue"]});var rh=function(e){function t(t){e.call(this,t,eh)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,r){if(e.prototype.recalculate.call(this,t,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=[],o=0,a=n;o",targetMapId:n,sourceMapId:o.mapId})}}},yh.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else R()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},yh.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},yh.prototype.processTask=function(e,t){var r=this;if(""===t.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(wo(t.error)):n(null,wo(t.data)))}else{var i=!1,o=D(this.globalScope)?void 0:[],a=t.hasCallback?function(t,n){i=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"",sourceMapId:r.mapId,error:t?bo(t):null,data:bo(n,o)},o)}:function(e){i=!0},s=null,l=wo(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,a);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,a)}else a(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},yh.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var wh=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};wh.prototype.setNorthEast=function(e){return this._ne=e instanceof kh?new kh(e.lng,e.lat):kh.convert(e),this},wh.prototype.setSouthWest=function(e){return this._sw=e instanceof kh?new kh(e.lng,e.lat):kh.convert(e),this},wh.prototype.extend=function(e){var t,r,n=this._sw,i=this._ne;if(e instanceof kh)t=e,r=e;else{if(!(e instanceof wh)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var o=e;return this.extend(wh.convert(o))}var a=e;return this.extend(kh.convert(a))}return this}if(t=e._sw,r=e._ne,!t||!r)return this}return n||i?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new kh(t.lng,t.lat),this._ne=new kh(r.lng,r.lat)),this},wh.prototype.getCenter=function(){return new kh((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},wh.prototype.getSouthWest=function(){return this._sw},wh.prototype.getNorthEast=function(){return this._ne},wh.prototype.getNorthWest=function(){return new kh(this.getWest(),this.getNorth())},wh.prototype.getSouthEast=function(){return new kh(this.getEast(),this.getSouth())},wh.prototype.getWest=function(){return this._sw.lng},wh.prototype.getSouth=function(){return this._sw.lat},wh.prototype.getEast=function(){return this._ne.lng},wh.prototype.getNorth=function(){return this._ne.lat},wh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},wh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},wh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},wh.prototype.contains=function(e){var t=kh.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,o=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(o=this._sw.lng>=r&&r>=this._ne.lng),i&&o},wh.convert=function(e){return!e||e instanceof wh?e:new wh(e)};var _h=6371008.8,kh=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};kh.prototype.wrap=function(){return new kh(f(this.lng,-180,180),this.lat)},kh.prototype.toArray=function(){return[this.lng,this.lat]},kh.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},kh.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return _h*Math.acos(Math.min(i,1))},kh.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new wh(new kh(this.lng-r,this.lat-t),new kh(this.lng+r,this.lat+t))},kh.convert=function(e){if(e instanceof kh)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new kh(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===typeof e&&null!==e)return new kh(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Sh=2*Math.PI*_h;function Th(e){return Sh*Math.cos(e*Math.PI/180)}function Mh(e){return(180+e)/360}function Ch(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Ah(e,t){return e/Th(t)}function Eh(e){return 360*e-180}function Ih(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function Oh(e,t){return e*Th(Ih(t))}function Ph(e){return 1/Math.cos(e*Math.PI/180)}var Rh=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Rh.fromLngLat=function(e,t){void 0===t&&(t=0);var r=kh.convert(e);return new Rh(Mh(r.lng),Ch(r.lat),Ah(t,r.lat))},Rh.prototype.toLngLat=function(){return new kh(Eh(this.x),Ih(this.y))},Rh.prototype.toAltitude=function(){return Oh(this.z,this.y)},Rh.prototype.meterInMercatorCoordinateUnits=function(){return 1/Sh*Ph(Ih(this.y))};var Lh=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=zh(0,e,e,t,r)};Lh.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Lh.prototype.url=function(e,t){var r=xh(this.x,this.y,this.z),n=Nh(this.z,this.x,this.y);return e[(this.x+this.y)%e.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"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",n).replace("{bbox-epsg-3857}",r)},Lh.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new o((e.x*t-this.x)*Ps,(e.y*t-this.y)*Ps)},Lh.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var jh=function(e,t){this.wrap=e,this.canonical=t,this.key=zh(e,t.z,t.z,t.x,t.y)},Dh=function(e,t,r,n,i){this.overscaledZ=e,this.wrap=t,this.canonical=new Lh(r,+n,+i),this.key=zh(t,e,r,n,i)};function zh(e,t,r,n,i){(e*=2)<0&&(e=-1*e-1);var o=1<0;o--)i+=(t&(n=1<this.canonical.z?new Dh(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Dh(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Dh.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?zh(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):zh(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Dh.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Dh.prototype.children=function(e){if(this.overscaledZ>=e)return[new Dh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Dh(t,this.wrap,t,r,n),new Dh(t,this.wrap,t,r+1,n),new Dh(t,this.wrap,t,r,n+1),new Dh(t,this.wrap,t,r+1,n+1)]},Dh.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Fh.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Fh.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Fh.prototype.getPixels=function(){return new Hl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Fh.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,i=t*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-t*this.dim,l=-r*this.dim,c=o;c=0&&u[3]>=0&&s.insert(a,u[0],u[1],u[2],u[3])}},Wh.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new nu.VectorTile(new qu(this.rawTileData)).layers,this.sourceLayerCoder=new Zh(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Wh.prototype.query=function(e,t,r,n){var i=this;this.loadVTLayers();for(var o=e.params||{},a=Ps/e.tileSize/e.scale,s=Ii(o.filter),l=e.queryGeometry,c=e.queryPadding*a,u=qh(l),d=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=qh(e.cameraQueryGeometry),h=0,p=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(t,r,n,i){return Xs(e.cameraQueryGeometry,t-c,r-c,n+c,i+c)}));hn)i=!1;else if(t)if(this.expirationTime=A.maxzoom||"none"!==A.visibility&&(l(C,this.zoom,n),(m[A.id]=A.createBucket({index:u.bucketLayerIDs.length,layers:C,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(w,g,this.tileID.canonical),u.bucketLayerIDs.push(C.map((function(e){return e.id}))))}}}var E=e.mapObject(g.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(E).length?i.send("getGlyphs",{uid:this.uid,stacks:E},(function(e,t){d||(d=e,f=t,P.call(s))})):f={};var I=Object.keys(g.iconDependencies);I.length?i.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){d||(d=e,h=t,P.call(s))})):h={};var O=Object.keys(g.patternDependencies);function P(){if(d)return o(d);if(f&&h&&p){var t=new a(f),r=new e.ImageAtlas(h,p);for(var i in m){var s=m[i];s instanceof e.SymbolBucket?(l(s.layers,this.zoom,n),e.performSymbolLayout(s,f,t.positions,h,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(l(s.layers,this.zoom,n),s.addFeatures(g,this.tileID.canonical,r.patternPositions))}this.status="done",o(null,{buckets:e.values(m).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?f:null,iconMap:this.returnDependencies?h:null,glyphPositions:this.returnDependencies?t.positions:null})}}O.length?i.send("getImages",{icons:O,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){d||(d=e,p=t,P.call(s))})):p={},P.call(this)};var u=function(e,t,r,n){this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=n||c,this.loading={},this.loaded={}};u.prototype.loadTile=function(t,r){var n=this,i=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),a=this.loading[i]=new s(t);a.abort=this.loadVectorData(t,(function(t,s){if(delete n.loading[i],t||!s)return a.status="done",n.loaded[i]=a,r(t);var l=s.rawData,c={};s.expires&&(c.expires=s.expires),s.cacheControl&&(c.cacheControl=s.cacheControl);var u={};if(o){var d=o.finish();d&&(u.resourceTiming=JSON.parse(JSON.stringify(d)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=a}))},u.prototype.reloadTile=function(e,t){var r=this,n=this.loaded,i=e.uid,o=this;if(n&&n[i]){var a=n[i];a.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,n){var i=a.reloadCallback;i&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,i)),t(e,n)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},u.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},u.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var d=e.window.ImageBitmap,f=function(){this.loaded={}};f.prototype.loadTile=function(t,r){var n=t.uid,i=t.encoding,o=t.rawImageData,a=d&&o instanceof d?this.getImageData(o):o,s=new e.DEMData(n,a,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},f.prototype.getImageData=function(t){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:r.width,height:r.height},r.data)},f.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h=p;function p(e,t){var r,n=e&&e.type;if("FeatureCollection"===n)for(r=0;r=0!==!!t&&e.reverse()}var v=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,y=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};y.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r>31}function D(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,o=0,a=r.length,s=0;s>1;F(e,t,a,n,i,o%2),N(e,t,r,n,a-1,o+1),N(e,t,r,a+1,i,o+1)}}function F(e,t,r,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,s=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);F(e,t,r,Math.max(n,Math.floor(r-s*c/a+u)),Math.min(i,Math.floor(r+(a-s)*c/a+u)),o)}var d=t[2*r+o],f=n,h=i;for(B(e,t,n,r),t[2*i+o]>d&&B(e,t,n,i);fd;)h--}t[2*n+o]===d?B(e,t,n,h):B(e,t,++h,i),h<=r&&(n=h+1),r<=h&&(i=h-1)}}function B(e,t,r,n){Z(e,r,n),Z(t,2*r,2*n),Z(t,2*r+1,2*n+1)}function Z(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function U(e,t,r,n,i,o,a){for(var s,l,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),f=c.pop(),h=c.pop();if(f-h<=a)for(var p=h;p<=f;p++)s=t[2*p],l=t[2*p+1],s>=r&&s<=i&&l>=n&&l<=o&&u.push(e[p]);else{var m=Math.floor((h+f)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=i&&l>=n&&l<=o&&u.push(e[m]);var g=(d+1)%2;(0===d?r<=s:n<=l)&&(c.push(h),c.push(m-1),c.push(g)),(0===d?i>=s:o>=l)&&(c.push(m+1),c.push(f),c.push(g))}}return u}function V(e,t,r,n,i,o){for(var a=[0,e.length-1,0],s=[],l=i*i;a.length;){var c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o)for(var f=d;f<=u;f++)H(t[2*f],t[2*f+1],r,n)<=l&&s.push(e[f]);else{var h=Math.floor((d+u)/2),p=t[2*h],m=t[2*h+1];H(p,m,r,n)<=l&&s.push(e[h]);var g=(c+1)%2;(0===c?r-i<=p:n-i<=m)&&(a.push(d),a.push(h-1),a.push(g)),(0===c?r+i>=p:n+i>=m)&&(a.push(h+1),a.push(u),a.push(g))}}return s}function H(e,t,r,n){var i=e-r,o=t-n;return i*i+o*o}S.fromVectorTileJs=T,S.fromGeojsonVt=M,S.GeoJSONWrapper=C;var W=function(e){return e[0]},G=function(e){return e[1]},q=function(e,t,r,n,i){void 0===t&&(t=W),void 0===r&&(r=G),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=e;for(var o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length),l=0;l=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return ie(ie({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function ee(e){return e/360+.5}function te(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function re(e){return 360*(e-.5)}function ne(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ie(e,t){for(var r in t)e[r]=t[r];return e}function oe(e){return e.x}function ae(e){return e.y}function se(e,t,r,n){for(var i,o=n,a=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],d=e[r+1],f=t+3;fo)i=f,o=h;else if(h===o){var p=Math.abs(f-a);pn&&(i-t>3&&se(e,t,i,n),e[i+2]=o,r-i>3&&se(e,i,r,n))}function le(e,t,r,n,i,o){var a=i-r,s=o-n;if(0!==a||0!==s){var l=((e-r)*a+(t-n)*s)/(a*a+s*s);l>1?(r=i,n=o):l>0&&(r+=a*l,n+=s*l)}return(a=e-r)*a+(s=t-n)*s}function ce(e,t,r,n){var i={id:"undefined"===typeof e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return ue(i),i}function ue(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)de(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(a+=n?(i*c-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-o,2))),i=l,o=c}var u=t.length-3;t[2]=1,se(t,0,u,r),t[u+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function ge(e,t,r,n){for(var i=0;i1?1:r}function xe(e,t,r,n,i,o,a,s){if(n/=t,o>=(r/=t)&&a=n)return null;for(var l=[],c=0;c=r&&p=n)){var m=[];if("Point"===f||"MultiPoint"===f)be(d,m,r,n,i);else if("LineString"===f)we(d,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)ke(d,m,r,n,i,!1);else if("Polygon"===f)ke(d,m,r,n,i,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&a<=n&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function we(e,t,r,n,i,o,a){for(var s,l,c=_e(e),u=0===i?Te:Me,d=e.start,f=0;fr&&(l=u(c,h,p,g,v,r),a&&(c.start=d+s*l)):y>n?x=r&&(l=u(c,h,p,g,v,r),b=!0),x>n&&y<=n&&(l=u(c,h,p,g,v,n),b=!0),!o&&b&&(a&&(c.end=d+s*l),t.push(c),c=_e(e)),a&&(d+=s)}var w=e.length-3;h=e[w],p=e[w+1],m=e[w+2],(y=0===i?h:p)>=r&&y<=n&&Se(c,h,p,m),w=c.length-3,o&&w>=3&&(c[w]!==c[0]||c[w+1]!==c[1])&&Se(c,c[0],c[1],c[2]),c.length&&t.push(c)}function _e(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function ke(e,t,r,n,i,o){for(var a=0;aa.maxX&&(a.maxX=u),d>a.maxY&&(a.maxY=d)}return a}function Re(e,t,r,n){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&t.size<(i?a:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;i&&je(s,o),e.push(s)}}function je(e,t){for(var r=0,n=0,i=e.length,o=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=fe(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=Ce(n,t)).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 Ne(e,t,r){return 32*((1<=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new q(s,oe,ae,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},X.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var a=this.getClusters([r,n,180,o],t),s=this.getClusters([-180,n,i,o],t);return a.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,d=l.range(ee(r),te(o),ee(i),te(n));u1?this._map(c,!0):null,g=(l<<5)+(t+1)+this.points.length,v=0,y=d;v>5},X.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},X.prototype._map=function(e,t){if(e.numPoints)return t?ie({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?ie({},n):n},ze.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ze.prototype.splitTile=function(e,t,r,n,i,o,a){for(var s=[e,t,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var u=1<1&&console.time("creation"),f=this.tiles[d]=Pe(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<1&&console.time("clipping");var m,g,v,y,x,b,w=.5*l.buffer/l.extent,_=.5-w,k=.5+w,S=1+w;m=g=v=y=null,x=xe(e,u,r-w,r+k,0,f.minX,f.maxX,l),b=xe(e,u,r+_,r+S,0,f.minX,f.maxX,l),e=null,x&&(m=xe(x,u,n-w,n+k,1,f.minY,f.maxY,l),g=xe(x,u,n+_,n+S,1,f.minY,f.maxY,l),x=null),b&&(v=xe(b,u,n-w,n+k,1,f.minY,f.maxY,l),y=xe(b,u,n+_,n+S,1,f.minY,f.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(v||[],t+1,2*r+1,2*n),s.push(y||[],t+1,2*r+1,2*n+1)}}},ze.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,o=n.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,d=r;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[Ne(c,u,d)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",c,u,d),o>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?Ie(this.tiles[s],i):null):null};var Ze=function(t){function r(e,r,n,i){t.call(this,e,r,n,Be),i&&(this.loadGeoJSON=i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=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 e.RequestPerformance(n.request);this.loadGeoJSON(n,(function(e,o){if(e||!o)return r(e);if("object"!==typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{t._geoJSONIndex=n.cluster?new X(Ue(n)).load(o.features):De(o,n.geojsonVtOptions)}catch(e){return r(e)}t.loaded={};var a={};if(i){var s=i.finish();s&&(a.resourceTiming={},a.resourceTiming[n.source]=JSON.parse(JSON.stringify(s)))}r(null,a)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(e,r){var n=this.loaded,i=e.uid;return n&&n[i]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},r.prototype.loadGeoJSON=function(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!==typeof t.data)return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(t.data))}catch(n){return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},r.prototype.getClusterExpansionZoom=function(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterChildren=function(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(r){t(r)}},r.prototype.getClusterLeaves=function(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(r){t(r)}},r}(u);function Ue(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var i={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,a||(a=e,i=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,a||(a=e,o=t,u())}));function u(){if(a)n(a);else if(i&&o){var t=e.browser.getImageData(o),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,d=l.x,f=l.y,h=l.sdf,p=l.pixelRatio,m=l.stretchX,g=l.stretchY,v=l.content,y=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,y,{x:d,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:p,sdf:h,stretchX:m,stretchY:g,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}function f(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}r.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",u,!0)}),0)},r.mousePos=function(t,r){var n=t.getBoundingClientRect();return new e.Point(r.clientX-n.left-t.clientLeft,r.clientY-n.top-t.clientTop)},r.touchPos=function(t,r){for(var n=t.getBoundingClientRect(),i=[],o=0;o=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var h=1,p=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function b(e,t,r,n,i,o,a){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])t(null,{stack:r,id:i,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],_.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t){for(var r in t)n._doesCharSupportLocalGlyph(+r)||(o.glyphs[+r]=t[+r]);o.ranges[s]=!0}for(var i=0,a=l;i1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),f=Math.min(u,d),h=void 0,p=i/r*(n+1);if(l.isDash){var m=n-Math.abs(p);h=Math.sqrt(f*f+m*m)}else h=n-Math.sqrt(f*f+p*p);this.data[a+c]=Math.max(0,Math.min(255,h+128))}},C.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}var i=e[0],o=e[e.length-1];i.isDash===o.isDash&&(i.left=o.left-this.width,o.right=i.right+this.width);for(var a=this.width*this.nextRow,s=0,l=e[s],c=0;c1&&(l=e[++s]);var u=Math.abs(c-l.left),d=Math.abs(c-l.right),f=Math.min(u,d),h=l.isDash?f:-f;this.data[a+c]=Math.max(0,Math.min(255,h+128))}},C.prototype.addDash=function(t,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a=n.minX&&t.x=n.minY&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,o,r.z,i,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),i=this._data;"string"===typeof i?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(e,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),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var o={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,o,(function(e,o){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(o,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.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 e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),j=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),D=function(t){function r(e,r,n,i){t.call(this),this.id=e,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 t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,o){n._loaded=!0,i?n.fire(new e.ErrorEvent(i)):o&&(n.image=o,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=z(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map((function(e){return r.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,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(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(e.Evented);function z(t){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0,s=t;ar.end(0)?this.fire(new e.ErrorEvent(new e.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=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,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 t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.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 e.Texture(t,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}(D),F=function(t){function r(r,n,i,o){t.call(this,r,n,i,o),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!==typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!==typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"===typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.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 e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.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(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,j.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[i];"loaded"!==o.state&&(o.state="loaded",o.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 e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},$.prototype.has=function(e){return e.wrapped().key in this.data},$.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},$.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},$.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},$.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},$.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),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},$.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},$.prototype.filter=function(e){var t=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var i in this._tiles){var o=this._tiles[i];if(!(n[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>t+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[a.key]=a;break}}}},r.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(var n=e.overscaledZ-1;n>=t;n--){var i=e.scaledTo(n),o=this._getLoadedTile(i);if(o)return o}},r.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=5,n=Math.floor(t*r),i="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var i in this._tiles){var o=this._tiles[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),n[o.tileID.key]=o}for(var a in this._tiles=n,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.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(e){return n._source.hasTile(e)})))):i=[];var o=t.coveringZoomLevel(this._source),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,o);if(Je(this._source.type)){for(var c={},u={},d=0,f=Object.keys(l);dthis._source.maxzoom){var g=p.children(this._source.maxzoom)[0],v=this.getTile(g);if(v&&v.hasData()){n[g.key]=g;continue}}else{var y=p.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=m.wasRequested(),b=p.overscaledZ-1;b>=o;--b){var w=p.scaledTo(b);if(i[w.key])break;if(i[w.key]=!0,!(m=this.getTile(w))&&x&&(m=this._addTile(w)),m&&(n[w.key]=w,x=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],r=void 0,n=this._tiles[e].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var o=0,a=t;o0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var i=this,o=[],a=this.transform;if(!a)return o;for(var s=n?a.getCameraQueryGeometry(t):t,l=t.map((function(e){return a.pointCoordinate(e)})),c=s.map((function(e){return a.pointCoordinate(e)})),u=this.getIds(),d=1/0,f=1/0,h=-1/0,p=-1/0,m=0,g=c;m=0&&v[1].y+g>=0){var y=l.map((function(e){return s.getTilePoint(e)})),x=c.map((function(e){return s.getTilePoint(e)}));o.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:m})}}},x=0;x=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r.prototype.setDependencies=function(e,t,r){var n=this._tiles[e];n&&n.setDependencies(t,r)},r.prototype.reloadTilesForDependencies=function(e,t){for(var r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(e,t)}))},r}(e.Evented);function $e(e,t){var r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Je(e){return"raster"===e||"image"===e||"video"===e}function Qe(){return new e.window.Worker(us.workerUrl)}Ke.maxOverzooming=10,Ke.maxUnderzooming=3;var et="mapboxgl_preloaded_worker_pool",tt=function(){this.active={}};tt.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))};var _t=function(e,t,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var o=0;o=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function At(t,r,n,i,o,a,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,n.transform.zoom),d=[256/n.width*2+1,256/n.height*2+1],f=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var h=t.lineVertexArray,p=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,v=0;vMath.abs(n.x-r.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function Ot(t,r,n,i,o,a,s,l,c,u,d,f,h,p){var m,g=r/24,v=t.lineOffsetX*g,y=t.lineOffsetY*g;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,b=t.lineStartIndex,w=t.lineStartIndex+t.lineLength,_=Et(g,l,v,y,n,d,f,t,c,a,h);if(!_)return{notEnoughRoom:!0};var k=Tt(_.first.point,s).point,S=Tt(_.last.point,s).point;if(i&&!n){var T=It(t.writingMode,k,S,p);if(T)return T}m=[_.first];for(var M=t.glyphStartIndex+1;M0?I.point:Pt(f,E,C,1,o),P=It(t.writingMode,C,O,p);if(P)return P}var R=Rt(g*l.getoffsetX(t.glyphStartIndex),v,y,n,d,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,a,h);if(!R)return{notEnoughRoom:!0};m=[R]}for(var L=0,j=m;L0?1:-1,m=0;i&&(p*=-1,m=Math.PI),p<0&&(m+=Math.PI);for(var g=p>0?l+s:l+s+1,v=o,y=o,x=0,b=0,w=Math.abs(h),_=[];x+b<=w;){if((g+=p)=c)return null;if(y=v,_.push(v),void 0===(v=f[g])){var k=new e.Point(u.getx(g),u.gety(g)),S=Tt(k,d);if(S.signedDistanceFromCamera>0)v=f[g]=S.point;else{var T=g-p;v=Pt(0===x?a:new e.Point(u.getx(T),u.gety(T)),k,y,w-x+1,d)}}x+=b,b=y.dist(v)}var M=(w-x)/b,C=v.sub(y),A=C.mult(M)._add(y);A._add(C._unit()._perp()._mult(n*p));var E=m+Math.atan2(v.y-y.y,v.x-y.x);return _.push(A),{point:A,angle:E,path:_}}_t.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},_t.prototype.insert=function(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},_t.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},_t.prototype._insertBoxCell=function(e,t,r,n,i,o){this.boxCells[i].push(o)},_t.prototype._insertCircleCell=function(e,t,r,n,i,o){this.circleCells[i].push(o)},_t.prototype._query=function(e,t,r,n,i,o){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var a=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:a},_t.prototype._queryCircle=function(e,t,r,n,i){var o=e-r,a=e+r,s=t-r,l=t+r;if(a<0||o>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,c,u,i),n?c.length>0:c},_t.prototype.query=function(e,t,r,n,i){return this._query(e,t,r,n,!1,i)},_t.prototype.hitTest=function(e,t,r,n,i){return this._query(e,t,r,n,!0,i)},_t.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},_t.prototype._queryCell=function(e,t,r,n,i,o,a,s){var l=a.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,d=0,f=c;d=u[p+0]&&n>=u[p+1]&&(!s||s(this.boxKeys[h]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[h],x1:u[p],y1:u[p+1],x2:u[p+2],y2:u[p+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,v=0,y=m;va*a+s*s},_t.prototype._circleAndRectCollide=function(e,t,r,n,i,o,a){var s=(o-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var c=(a-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var d=l-s,f=u-c;return d*d+f*f<=r*r};var Lt=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function jt(e,t){for(var r=0;r=1;P--)O.push(E.path[P]);for(var R=1;R0){for(var z=O[0].clone(),N=O[0].clone(),F=1;F=M.x&&N.x<=C.x&&z.y>=M.y&&N.y<=C.y?[O]:N.xC.x||N.yC.y?[]:e.clipLine([O],M.x,M.y,C.x,C.y)}for(var B=0,Z=D;B=this.screenRightBoundary||nthis.screenBottomBoundary},Nt.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(m=this.prevPlacement.variableOffsets[d.crossTileID].anchor),this.variableOffsets[d.crossTileID]={textOffset:g,width:r,height:n,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(f,e,d,h),f.allowVerticalPlacement&&(this.markUsedOrientation(f,h,d),this.placedOrientations[d.crossTileID]=h),{shift:v,placedGlyphBoxes:y}):void 0},Yt.prototype.placeLayerBucketPart=function(t,r,n){var i=this,o=t.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,c=o.textLabelPlaneMatrix,u=o.labelToScreenMatrix,d=o.textPixelRatio,f=o.holdingForFade,h=o.collisionBoxArray,p=o.partiallyEvaluatedTextSize,m=o.collisionGroup,g=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),w="map"===s.get("text-pitch-alignment"),_="none"!==s.get("icon-text-fit"),k="viewport-y"===s.get("symbol-z-order"),S=y&&(x||!a.hasIconData()||v),T=x&&(y||!a.hasTextData()||g);!a.collisionArrays&&h&&a.deserializeCollisionBoxes(h);var M=function(t,o){if(!r[t.crossTileID])if(f)i.placements[t.crossTileID]=new Ut(!1,!1,!1);else{var h=!1,k=!1,M=!0,C=null,A={box:null,offscreen:null},E={box:null,offscreen:null},I=null,O=null,P=null,R=0,L=0,j=0;o.textFeatureIndex?R=o.textFeatureIndex:t.useRuntimeCollisionCircles&&(R=t.featureIndex),o.verticalTextFeatureIndex&&(L=o.verticalTextFeatureIndex);var D=o.textBox;if(D){var z=function(r){var n=e.WritingMode.horizontal;if(a.allowVerticalPlacement&&!r&&i.prevPlacement){var o=i.prevPlacement.placedOrientations[t.crossTileID];o&&(i.placedOrientations[t.crossTileID]=o,n=o,i.markUsedOrientation(a,n,t))}return n},N=function(r,n){if(a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var i=0,s=a.writingModes;i0&&(F=F.filter((function(e){return e!==B.anchor}))).unshift(B.anchor)}var Z=function(e,r,n){for(var o=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=_&&!x?r:null,f={box:[],offscreen:!1},p=y?2*F.length:F.length,g=0;g=F.length,S=i.attemptAnchorPlacement(v,e,o,s,c,b,w,d,l,m,k,t,a,n,u);if(S&&(f=S.placedGlyphBoxes)&&f.box&&f.box.length){h=!0,C=S.shift;break}}return f};N((function(){return Z(D,o.iconBox,e.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox,n=A&&A.box&&A.box.length;return a.allowVerticalPlacement&&!n&&t.numVerticalGlyphVertices>0&&r?Z(r,o.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),A&&(h=A.box,M=A.offscreen);var U=z(A&&A.box);if(!h&&i.prevPlacement){var V=i.prevPlacement.variableOffsets[t.crossTileID];V&&(i.variableOffsets[t.crossTileID]=V,i.markUsedJustification(a,V.anchor,t,U))}}else{var H=function(e,r){var n=i.collisionIndex.placeCollisionBox(e,y,d,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(a,r,t),i.placedOrientations[t.crossTileID]=r),n};N((function(){return H(D,e.WritingMode.horizontal)}),(function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&r?H(r,e.WritingMode.vertical):{box:null,offscreen:null}})),z(A&&A.box&&A.box.length)}}if(h=(I=A)&&I.box&&I.box.length>0,M=I&&I.offscreen,t.useRuntimeCollisionCircles){var W=a.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),G=e.evaluateSizeForFeature(a.textSizeData,p,W),q=s.get("text-padding"),Y=t.collisionCircleDiameter;O=i.collisionIndex.placeCollisionCircles(y,W,a.lineVertexArray,a.glyphOffsetArray,G,l,c,u,n,w,m.predicate,Y,q),h=y||O.circles.length>0&&!O.collisionDetected,M=M&&O.offscreen}if(o.iconFeatureIndex&&(j=o.iconFeatureIndex),o.iconBox){var X=function(e){var t=_&&C?qt(e,C.x,C.y,b,w,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,d,l,m.predicate)};k=E&&E.box&&E.box.length&&o.verticalIconBox?(P=X(o.verticalIconBox)).box.length>0:(P=X(o.iconBox)).box.length>0,M=M&&P.offscreen}var K=g||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,$=v||0===t.numIconVertices;if(K||$?$?K||(k=k&&h):h=k&&h:k=h=k&&h,h&&I&&I.box&&(E&&E.box&&L?i.collisionIndex.insertCollisionBox(I.box,s.get("text-ignore-placement"),a.bucketInstanceId,L,m.ID):i.collisionIndex.insertCollisionBox(I.box,s.get("text-ignore-placement"),a.bucketInstanceId,R,m.ID)),k&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),a.bucketInstanceId,j,m.ID),O&&(h&&i.collisionIndex.insertCollisionCircles(O.circles,s.get("text-ignore-placement"),a.bucketInstanceId,R,m.ID),n)){var J=a.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new Vt);for(var ee=0;ee=0;--A){var E=C[A];M(a.symbolInstances.get(E),a.collisionArrays[E])}else for(var I=t.symbolInstanceStart;I=0&&(t.text.placedSymbolArray.get(c).crossTileID=o>=0&&c!==o?0:n.crossTileID)}},Yt.prototype.markUsedOrientation=function(t,r,n){for(var i=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,o=r===e.WritingMode.vertical?r:0,a=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];a0||l>0,x=o.numIconVertices>0,b=i.placedOrientations[o.crossTileID],w=b===e.WritingMode.vertical,_=b===e.WritingMode.horizontal||b===e.WritingMode.horizontalOnly;if(y){var k=nr(v.text),S=w?ir:k;p(t.text,s,S);var T=_?ir:k;p(t.text,l,T);var M=v.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||w?1:0)})),o.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=M||_?1:0);var C=i.variableOffsets[o.crossTileID];C&&i.markUsedJustification(t,C.anchor,o,b);var A=i.placedOrientations[o.crossTileID];A&&(i.markUsedJustification(t,"left",o,A),i.markUsedOrientation(t,A,o))}if(x){var E=nr(v.icon),I=!(f&&o.verticalPlacedIconSymbolIndex&&w);if(o.placedIconSymbolIndex>=0){var O=I?E:ir;p(t.icon,o.numIconVertices,O),t.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(o.verticalPlacedIconSymbolIndex>=0){var P=I?ir:E;p(t.icon,o.numVerticalIconVertices,P),t.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var R=t.collisionArrays[n];if(R){var L=new e.Point(0,0);if(R.textBox||R.verticalTextBox){var j=!0;if(c){var D=i.variableOffsets[m];D?(L=Gt(D.anchor,D.width,D.height,D.textOffset,D.textBoxScale),u&&L._rotate(d?i.transform.angle:-i.transform.angle)):j=!1}R.textBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!j||w,L.x,L.y),R.verticalTextBox&&Xt(t.textCollisionBox.collisionVertexArray,v.text.placed,!j||_,L.x,L.y)}var z=Boolean(!_&&R.verticalIconBox);R.iconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,z,f?L.x:0,f?L.y:0),R.verticalIconBox&&Xt(t.iconCollisionBox.collisionVertexArray,v.icon.placed,!z,f?L.x:0,f?L.y:0)}}},g=0;ge},Yt.prototype.setStale=function(){this.stale=!0};var Kt=Math.pow(2,25),$t=Math.pow(2,24),Jt=Math.pow(2,17),Qt=Math.pow(2,16),er=Math.pow(2,9),tr=Math.pow(2,8),rr=Math.pow(2,1);function nr(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Kt+t*$t+r*Jt+t*Qt+r*er+t*tr+r*rr+t}var ir=0,or=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};or.prototype.continuePlacement=function(e,t,r,n,i){for(var o=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[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 or(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ar.prototype.commit=function(e){return this.placement.commit(e),this.placement};var sr=512/e.EXTENT/2,lr=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=a[e.scaledTo(Number(o)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])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(e.validateStyle.source,"sources."+t,r,null,n)){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[t]=new Ke(t,r,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:o.serialize(),sourceId:t}})),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var o;if("custom"===t.type){if(fr(this,e.validateCustomStyleLayer(t)))return;o=e.createStyleLayer(t)}else{if("object"===typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},n))return;o=e.createStyleLayer(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[o.id]=o.serialize()}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.hasLayer=function(e){return e in this._layers},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,r))return null===r||void 0===r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=e.clone$1(r),this._updateLayer(i)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getLayoutProperty(r),n)||(o.setLayoutProperty(r,n,i),this._updateLayer(o)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var o=this.getLayer(t);o?e.deepEqual(o.getPaintProperty(r),n)||(o.setPaintProperty(r,n,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=t.sourceLayer,o=this.sourceCaches[n];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,r)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=this.sourceCaches[n];if(void 0!==i){var o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?r&&"string"!==typeof t.id&&"number"!==typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(a,t.id,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.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:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},i=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){n[a]=o;for(var s=0,l=e;s=0;p--){var m=this._order[p];if(r(m))for(var g=i.length-1;g>=0;g--){var v=i[g].feature;if(n[v.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Or="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;}",Pr="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;}",Rr="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);}",Lr="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);}",jr="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);}",Dr="#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}",zr="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);}",Nr="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}",Fr="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;}",Br="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}",Zr="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;}",Ur="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}",Vr="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);}",Hr="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",Wr="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;}",Gr="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}",qr="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;}",Yr="#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}",Xr="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;}",Kr="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}",$r="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;}",Jr="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}",Qr="\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);}",en="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}",tn="\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);}",rn="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}",nn="\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;}",on="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}",an="\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);}",sn="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}",ln="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;}",cn="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}",un="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));}",dn="#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}",fn="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);}",hn="#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}",pn="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);}",mn=Zn("#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;}"),gn=Zn(yr,xr),vn=Zn(br,wr),yn=Zn(_r,kr),xn=Zn(Sr,Tr),bn=Zn(Mr,Cr),wn=Zn(Ar,Er),_n=Zn(Ir,Or),kn=Zn(Pr,Rr),Sn=Zn(Lr,jr),Tn=Zn(Dr,zr),Mn=Zn(Nr,Fr),Cn=Zn(Br,Zr),An=Zn(Ur,Vr),En=Zn(Hr,Wr),In=Zn(Gr,qr),On=Zn(Yr,Xr),Pn=Zn(Kr,$r),Rn=Zn(Jr,Qr),Ln=Zn(en,tn),jn=Zn(rn,nn),Dn=Zn(on,an),zn=Zn(sn,ln),Nn=Zn(cn,un),Fn=Zn(dn,fn),Bn=Zn(hn,pn);function Zn(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(r,(function(e,t,r,i,o){return n[o]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,i,o){var a="float"===i?"vec2":"vec4",s=o.match(/color/)?"color":a;return n[o]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+i+" "+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+i+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = a_"+o+";\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+i+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+i+" "+o+" = u_"+o+";\n#endif\n"}))}}var Un=Object.freeze({__proto__:null,prelude:mn,background:gn,backgroundPattern:vn,circle:yn,clippingMask:xn,heatmap:bn,heatmapTexture:wn,collisionBox:_n,collisionCircle:kn,debug:Sn,fill:Tn,fillOutline:Mn,fillOutlinePattern:Cn,fillPattern:An,fillExtrusion:En,fillExtrusionPattern:In,hillshadePrepare:On,hillshade:Pn,line:Rn,lineGradient:Ln,linePattern:jn,lineSDF:Dn,raster:zn,symbolIcon:Nn,symbolSDF:Fn,symbolTextAndIcon:Bn}),Vn=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Vn.prototype.bind=function(e,t,r,n,i,o,a,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}function Gn(e,t,r,n){var i=r.imageManager.getPattern(e.from.toString()),o=r.imageManager.getPattern(e.to.toString()),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,d=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Ft(n,1,r.transform.tileZoom),u_pixel_coord_upper:[d>>16,f>>16],u_pixel_coord_lower:[65535&d,65535&f]}}Hn.prototype.draw=function(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m){var g,v=e.gl;if(!this.failedToCreate){for(var y in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(o),this.fixedUniforms)this.fixedUniforms[y].set(a[y]);h&&h.setUniforms(e,this.binderUniforms,d,{zoom:f});for(var x=(g={},g[v.LINES]=2,g[v.TRIANGLES]=3,g[v.LINE_STRIP]=1,g)[t],b=0,w=u.get();b0?1/(1-e):1+e}function yi(e){return e>0?1-1/(1.001-e):-e}var xi,bi=function(e,t,r,n,i,o,a,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},wi=function(t,r,n,i,o,a,s,l,c,u,d){var f=o.transform;return e.extend(bi(t,r,n,i,o,a,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},_i=function(t,r,n,i,o,a,s,l,c,u){return e.extend(wi(t,r,n,i,o,a,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},ki=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Si=function(t,r,n,i,o,a){return e.extend(Gn(i,a,n,o),{u_matrix:t,u_opacity:r})},Ti={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},collisionCircle:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,r.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,r.u_viewport_size)}},debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_overlay:new e.Uniform1i(t,r.u_overlay),u_overlay_scale:new e.Uniform1f(t,r.u_overlay_scale)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_maxzoom:new e.Uniform1f(t,r.u_maxzoom),u_unpack:new e.Uniform4f(t,r.u_unpack)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},symbolTextAndIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texsize_icon:new e.Uniform2f(t,r.u_texsize_icon),u_texture:new e.Uniform1i(t,r.u_texture),u_texture_icon:new e.Uniform1i(t,r.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function Mi(t,r,n,i,o,a,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),d=[],f=0,h=0,p=0;p0){var w=e.create(),_=y;e.mul(w,v.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(w,w,v.placementViewportMatrix),d.push({circleArray:b,circleOffset:h,transform:_,invTransform:w}),h=f+=b.length/4}x&&u.draw(l,c.LINES,Ne.disabled,Ze.disabled,t.colorModeForRenderPass(),Ye.disabled,ei(y,t.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&d.length){var k=t.useProgram("collisionCircle"),S=new e.StructArrayLayout2f1f2i16;S.resize(4*f),S._trim();for(var T=0,M=0,C=d;M=0&&(m[v.associatedIconIndex]={shiftedAnchor:C,angle:A})}else jt(v.numGlyphs,h)}if(d){p.clear();for(var I=t.icon.placedSymbolArray,O=0;O0){var s=e.browser.now(),l=(s-t.timeAdded)/a,c=r?(s-r.timeAdded)/a:-1,u=n.getSource(),d=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),h=f&&t.refreshedUponExpiration?1:e.clamp(f?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function $i(e,t,r){var n=r.paint.get("background-color"),i=r.paint.get("background-opacity");if(0!==i){var o=e.context,a=o.gl,s=e.transform,l=s.tileSize,c=r.paint.get("background-pattern");if(!e.isPatternMissing(c)){var u=!c&&1===n.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===u){var d=Ze.disabled,f=e.depthModeForSublayer(0,"opaque"===u?Ne.ReadWrite:Ne.ReadOnly),h=e.colorModeForRenderPass(),p=e.useProgram(c?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});c&&(o.activeTexture.set(a.TEXTURE0),e.imageManager.bind(e.context));for(var g=r.getCrossfadeParameters(),v=0,y=m;v "+n.overscaledZ),uo(t,v+" "+p+"kb"),s.draw(i,o.TRIANGLES,l,c,We.alphaBlended,Ye.disabled,ri(a,e.Color.transparent,g),d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}function uo(e,t){e.initDebugOverlayCanvas();var r=e.debugOverlayCanvas,n=e.context.gl,i=e.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(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}function fo(e,t,r){var n=e.context,i=r.implementation;if("offscreen"===e.renderPass){var o=i.prerender;o&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),o.call(i,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Ze.disabled);var a="3d"===i.renderingMode?new Ne(e.context.gl.LEQUAL,Ne.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Ne.ReadOnly);n.setDepthMode(a),i.render(n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}var ho={symbol:Ei,circle:Di,heatmap:zi,line:Zi,fill:Ui,"fill-extrusion":Hi,hillshade:Gi,raster:Xi,background:$i,debug:lo,custom:fo},po=function(e,t){this.context=new Xe(e),this.transform=t,this._tileTextures={},this.setup(),this.numSublayers=Ke.maxUnderzooming+Ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new dr,this.gpuTimers={}};po.prototype.resize=function(t,r){if(this.width=t*e.browser.devicePixelRatio,this.height=r*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n256&&this.clearStencil(),r.setColorMode(We.disabled),r.setDepthMode(Ne.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=t;o256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ze({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},po.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ze({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},po.prototype.stencilConfigForOverlap=function(e){var t,r=this.context.gl,n=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=n[n.length-1].overscaledZ,o=n[0].overscaledZ-i+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s=0;this.currentLayer--){var _=this.style._layers[i[this.currentLayer]],k=o[_.source],S=u[_.source];this._renderTileClippingMasks(_,S),this.renderLayer(this,k,_,S)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},po.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r},po.prototype.useProgram=function(e,t){this.cache=this.cache||{};var r=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Hn(this.context,Un[e],t,Ti[e],this._showOverdrawInspector)),this.cache[r]},po.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()},po.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},po.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},po.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var mo=function(e,t){this.points=e,this.planes=t};mo.fromInvProjectionMatrix=function(t,r,n){var i=[[-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]],o=Math.pow(2,n),a=i.map((function(r){return e.transformMat4([],r,t)})).map((function(t){return e.scale$1([],t,1/t[3]/r*o)})),s=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var r=e.sub([],a[t[0]],a[t[1]]),n=e.sub([],a[t[2]],a[t[1]]),i=e.normalize([],e.cross([],r,n)),o=-e.dot(i,a[t[1]]);return i.concat(o)}));return new mo(a,s)};var go=function(t,r){this.min=t,this.max=r,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};go.prototype.quadrant=function(t){for(var r=[t%2===0,t<2],n=e.clone$2(this.min),i=e.clone$2(this.max),o=0;o=0;if(0===a)return 0;a!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,d=0;dthis.max[l]-this.min[l])return 0}return 1};var vo=function(e,t,r,n){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(e)||e<0||isNaN(t)||t<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=e,this.bottom=t,this.left=r,this.right=n};vo.prototype.interpolate=function(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this},vo.prototype.getCenter=function(t,r){var n=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,i)},vo.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},vo.prototype.clone=function(){return new vo(this.top,this.bottom,this.left,this.right)},vo.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var yo=function(t,r,n,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=void 0===n||null===n?0:n,this._maxPitch=void 0===i||null===i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vo,this._posMatrixCache={},this._alignedPosMatrixCache={}},xo={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}};function bo(e,t){var r=!1,n=null,i=function(){n=null,r&&(e(),n=setTimeout(i,t),r=!1)};return function(){return r=!0,n||i(),n}}yo.prototype.clone=function(){var e=new yo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},xo.minZoom.get=function(){return this._minZoom},xo.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},xo.maxZoom.get=function(){return this._maxZoom},xo.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},xo.minPitch.get=function(){return this._minPitch},xo.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},xo.maxPitch.get=function(){return this._maxPitch},xo.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},xo.renderWorldCopies.get=function(){return this._renderWorldCopies},xo.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},xo.worldSize.get=function(){return this.tileSize*this.scale},xo.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},xo.size.get=function(){return new e.Point(this.width,this.height)},xo.bearing.get=function(){return-this.angle/Math.PI*180},xo.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},xo.pitch.get=function(){return this._pitch/Math.PI*180},xo.pitch.set=function(t){var r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},xo.fov.get=function(){return this._fov/Math.PI*180},xo.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},xo.zoom.get=function(){return this._zoom},xo.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},xo.center.get=function(){return this._center},xo.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},xo.padding.get=function(){return this._edgeInsets.toJSON()},xo.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},xo.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},yo.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},yo.prototype.interpolatePadding=function(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()},yo.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},yo.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),o=this.pointCoordinate(new e.Point(this.width,this.height)),a=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,o.x,a.x)),l=Math.floor(Math.max(n.x,i.x,o.x,a.x)),c=1,u=s-c;u<=l+c;u++)0!==u&&r.push(new e.UnwrappedTileID(u,t));return r},yo.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=[o*i.x,o*i.y,0],s=mo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=3,u=function(e){return{aabb:new go([e*o,0,0],[(e+1)*o,o,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},d=[],f=[],h=r,p=t.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var m=1;m<=3;m++)d.push(u(-m)),d.push(u(m));for(d.push(u(0));d.length>0;){var g=d.pop(),v=g.x,y=g.y,x=g.fullyVisible;if(!x){var b=g.aabb.intersects(s);if(0===b)continue;x=2===b}var w=g.aabb.distanceX(a),_=g.aabb.distanceY(a),k=Math.max(Math.abs(w),Math.abs(_)),S=c+(1<S&&g.zoom>=l)f.push({tileID:new e.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,v,y),distanceSq:e.sqrLen([a[0]-.5-v,a[1]-.5-y])});else for(var T=0;T<4;T++){var M=(v<<1)+T%2,C=(y<<1)+(T>>1);d.push({aabb:g.aabb.quadrant(T),zoom:g.zoom+1,x:M,y:C,wrap:g.wrap,fullyVisible:x})}}return f.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},yo.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},xo.unmodified.get=function(){return this._unmodified},yo.prototype.zoomScale=function(e){return Math.pow(2,e)},yo.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},yo.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},yo.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},xo.point.get=function(){return this.project(this.center)},yo.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.MercatorCoordinate(o.x-(n.x-i.x),o.y-(n.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},yo.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},yo.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},yo.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},yo.prototype.coordinateLocation=function(e){return e.toLngLat()},yo.prototype.pointCoordinate=function(t){var r=0,n=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.transformMat4(n,n,this.pixelMatrixInverse),e.transformMat4(i,i,this.pixelMatrixInverse);var o=n[3],a=i[3],s=n[0]/o,l=i[0]/a,c=n[1]/o,u=i[1]/a,d=n[2]/o,f=i[2]/a,h=d===f?0:(r-d)/(f-d);return new e.MercatorCoordinate(e.number(s,l,h)/this.worldSize,e.number(c,u,h)/this.worldSize)},yo.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},yo.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},yo.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},yo.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},yo.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*a,o.y*a,0]),e.scale(l,l,[a/e.EXTENT,a/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},yo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},yo.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,i,o=-90,a=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var d=this.latRange;o=e.mercatorYfromLat(d[1])*this.worldSize,t=(a=e.mercatorYfromLat(d[0])*this.worldSize)-oa&&(i=a-g)}if(this.lngRange){var v=h.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new e.Point(void 0!==n?n:h.x,void 0!==i?i:h.y))),this._unmodified=u,this._constraining=!1}},yo.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),o=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-i,.01,Math.PI-.01)),a=this.point,s=a.x,l=a.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*o+this.cameraToCenterDistance),u=this.height/50,d=new Float64Array(16);e.perspective(d,this._fov,this.width/this.height,u,c),d[8]=2*-r.x/this.width,d[9]=2*r.y/this.height,e.scale(d,d,[1,-1,1]),e.translate(d,d,[0,0,-this.cameraToCenterDistance]),e.rotateX(d,d,this._pitch),e.rotateZ(d,d,this.angle),e.translate(d,d,[-s,-l,0]),this.mercatorMatrix=e.scale([],d,[this.worldSize,this.worldSize,this.worldSize]),e.scale(d,d,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=d,this.invProjMatrix=e.invert([],this.projMatrix);var f=this.width%2/2,h=this.height%2/2,p=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+p*f+m*h,v=l-Math.round(l)+p*h+m*f,y=new Float64Array(d);if(e.translate(y,y,[g>.5?g-1:g,v>.5?v-1:v,0]),this.alignedProjMatrix=y,d=e.create(),e.scale(d,d,[this.width/2,-this.height/2,1]),e.translate(d,d,[1,-1,0]),this.labelPlaneMatrix=d,d=e.create(),e.scale(d,d,[1,-1,1]),e.translate(d,d,[-1,-1,0]),e.scale(d,d,[2/this.width,2/this.height,1]),this.glCoordMatrix=d,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(d=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=d,this._posMatrixCache={},this._alignedPosMatrixCache={}}},yo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},yo.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},yo.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,i=r.y,o=r.x,a=r.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},wo.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(r){}};var _o={linearity:.3,easing:e.bezier(0,0,.3,1)},ko=e.extend({deceleration:2500,maxSpeed:1400},_o),So=e.extend({deceleration:20,maxSpeed:1400},_o),To=e.extend({deceleration:1e3,maxSpeed:360},_o),Mo=e.extend({deceleration:1e3,maxSpeed:90},_o),Co=function(e){this._map=e,this.clear()};function Ao(e,t){(!e.duration||e.duration0&&r-t[0].time>n;)t.shift()},Co.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.dblclick=function(e){return this._firePreventable(new Io(e.type,this._map,e))},Ro.prototype.mouseover=function(e){this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.mouseout=function(e){this._map.fire(new Io(e.type,this._map,e))},Ro.prototype.touchstart=function(e){return this._firePreventable(new Oo(e.type,this._map,e))},Ro.prototype.touchmove=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype.touchend=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype.touchcancel=function(e){this._map.fire(new Oo(e.type,this._map,e))},Ro.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Ro.prototype.isEnabled=function(){return!0},Ro.prototype.isActive=function(){return!1},Ro.prototype.enable=function(){},Ro.prototype.disable=function(){};var Lo=function(e){this._map=e};Lo.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Lo.prototype.mousemove=function(e){this._map.fire(new Io(e.type,this._map,e))},Lo.prototype.mousedown=function(){this._delayContextMenu=!0},Lo.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Io("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Lo.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new Io(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},Lo.prototype.isEnabled=function(){return!0},Lo.prototype.isActive=function(){return!1},Lo.prototype.enable=function(){},Lo.prototype.disable=function(){};var jo=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Do(e,t){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=zo(t),this.touches=Do(r,t)))},Zo.prototype.touchmove=function(e,t,r){if(!this.aborted&&this.centroid){var n=Do(r,t);for(var i in this.touches){var o=this.touches[i],a=n[i];(!a||a.dist(o)>Bo)&&(this.aborted=!0)}}},Zo.prototype.touchend=function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>Fo)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Uo=function(e){this.singleTap=new Zo(e),this.numTaps=e.numTaps,this.reset()};Uo.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Uo.prototype.touchstart=function(e,t,r){this.singleTap.touchstart(e,t,r)},Uo.prototype.touchmove=function(e,t,r){this.singleTap.touchmove(e,t,r)},Uo.prototype.touchend=function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime0&&(this._active=!0);var i=Do(n,r),o=new e.Point(0,0),a=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(o._add(c),a._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(e.x)}var aa=100,sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,oa(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,r){var n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,r){if(void 0!==this._valid)return this._valid;var n=2,i=e.mag()>=n,o=t.mag()>=n;if(i||o){if(!i||!o)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove0===t.y>0;return oa(e)&&oa(t)&&a}},t}($o),la={panStep:100,bearingStep:15,pitchStep:10},ca=function(){var e=la;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep};function ua(e){return e*(2-e)}ca.prototype.reset=function(){this._active=!1},ca.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,o=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),o=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),o=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:r?Math.round(l)+r*(e.shiftKey?2:1):l,bearing:s.getBearing()+n*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-o*t._panStep,-a*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},ca.prototype.enable=function(){this._enabled=!0},ca.prototype.disable=function(){this._enabled=!1,this.reset()},ca.prototype.isEnabled=function(){return this._enabled},ca.prototype.isActive=function(){return this._active};var da=4.000244140625,fa=.01,ha=1/450,pa=2,ma=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=fa,this._wheelZoomRate=ha,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ma.prototype.setZoomRate=function(e){this._defaultZoomRate=e},ma.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},ma.prototype.isEnabled=function(){return!!this._enabled},ma.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},ma.prototype.isZooming=function(){return!!this._zooming},ma.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},ma.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ma.prototype.wheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%da===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,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}},ma.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},ma.prototype._start=function(t){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,t);this._around=e.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())}},ma.prototype.renderFrame=function(){return this._onScrollFrame()},ma.prototype._onScrollFrame=function(){var t=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)>da?this._wheelZoomRate:this._defaultZoomRate,i=pa/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var o="number"===typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"===typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var d=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),f=c(d);a=e.number(l,s,f),d<1?this._frameId||(this._frameId=!0):u=!0}else a=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:a-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ma.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,i=(e.browser.now()-n.start)/n.duration,o=n.easing(i+.01)-n.easing(i),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=e.bezier(a,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r},ma.prototype.reset=function(){this._active=!1};var ga=function(e,t){this._clickZoom=e,this._tapZoom=t};ga.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ga.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ga.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ga.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var va=function(){this.reset()};va.prototype.reset=function(){this._active=!1},va.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}},va.prototype.enable=function(){this._enabled=!0},va.prototype.disable=function(){this._enabled=!1,this.reset()},va.prototype.isEnabled=function(){return this._enabled},va.prototype.isActive=function(){return this._active};var ya=function(){this._tap=new Uo({numTouches:1,numTaps:1}),this.reset()};ya.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ya.prototype.touchstart=function(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>No&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))},ya.prototype.touchmove=function(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)},ya.prototype.touchend=function(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)},ya.prototype.touchcancel=function(){this.reset()},ya.prototype.enable=function(){this._enabled=!0},ya.prototype.disable=function(){this._enabled=!1,this.reset()},ya.prototype.isEnabled=function(){return this._enabled},ya.prototype.isActive=function(){return this._active};var xa=function(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r};xa.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xa.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xa.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xa.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ba=function(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r};ba.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ba.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ba.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ba.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var wa=function(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};wa.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},wa.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},wa.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},wa.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},wa.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},wa.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var _a=function(e){return e.zoom||e.drag||e.pitch||e.rotate},ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function Sa(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var Ta=function(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Co(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.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],[e.window.document,"mousemove",{capture:!0}],[e.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],[e.window,"blur",void 0]];for(var o=0,a=this._listeners;oo?Math.min(2,w):Math.max(.5,w),_=Math.pow(g,1-t),k=i.unproject(x.add(b.mult(t*_)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?k.wrap():k,p)}n._fireMoveEvents(r)}),(function(e){n._afterEase(r,e)}),t),this},r.prototype._prepareEase=function(t,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),o&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},r.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,o.minZoom,o.maxZoom):a,d="bearing"in t?this._normalizeBearing(t.bearing,s):s,f="pitch"in t?+t.pitch:l,h="padding"in t?t.padding:o.padding,p=o.zoomScale(u-a),m=e.Point.convert(t.offset),g=o.centerPoint.add(m),v=o.pointLocation(g),y=e.LngLat.convert(t.center||v);this._normalizeCenter(y);var x=o.project(v),b=o.project(y).sub(x),w=t.curve,_=Math.max(o.width,o.height),k=_/p,S=b.mag();if("minZoom"in t){var T=e.clamp(Math.min(t.minZoom,a,u),o.minZoom,o.maxZoom),M=_/o.zoomScale(T-a);w=Math.sqrt(M/S*2)}var C=w*w;function A(e){var t=(k*k-_*_+(e?-1:1)*C*C*S*S)/(2*(e?k:_)*C*S);return Math.log(Math.sqrt(t*t+1)-t)}function E(e){return(Math.exp(e)-Math.exp(-e))/2}function I(e){return(Math.exp(e)+Math.exp(-e))/2}function O(e){return E(e)/I(e)}var P=A(0),R=function(e){return I(P)/I(P+w*e)},L=function(e){return _*((I(P)*O(P+w*e)-E(P))/C)/S},j=(A(1)-P)/w;if(Math.abs(S)<1e-6||!isFinite(j)){if(Math.abs(_-k)<1e-6)return this.easeTo(t,r);var D=k<_?-1:1;j=Math.abs(Math.log(k/_))/w,L=function(){return 0},R=function(e){return Math.exp(D*w*e)}}if("duration"in t)t.duration=+t.duration;else{var z="screenSpeed"in t?+t.screenSpeed/w:+t.speed;t.duration=1e3*j/z}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==d,this._pitching=f!==l,this._padding=!o.isPaddingEqual(h),this._prepareEase(r,!1),this._ease((function(t){var i=t*j,p=1/R(i);o.zoom=1===t?u:a+o.scaleZoom(p),n._rotating&&(o.bearing=e.number(s,d,t)),n._pitching&&(o.pitch=e.number(l,f,t)),n._padding&&(o.interpolatePadding(c,h,t),g=o.centerPoint.add(m));var v=1===t?y:o.unproject(x.add(b.mult(L(i))).mult(p));o.setLocationAtPoint(o.renderWorldCopies?v.wrap():v,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(e,t){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,t)}if(!e){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),Ca=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ca.prototype.getDefaultPosition=function(){return"bottom-right"},Ca.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&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===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ca.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},Ca.prototype._updateEditLink=function(){var t=this._editLink;t||(t=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||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ca.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Aa=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Aa.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Aa.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Aa.prototype.getDefaultPosition=function(){return"bottom-left"},Aa.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Aa.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Aa.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Ea=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ea.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Ea.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitchza)throw new Error("maxPitch must be less than or equal to "+za);var i=new yo(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Ea,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Ia,t.locale),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"===typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Pa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.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)})),"undefined"!==typeof e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Ta(this,t);var o="string"===typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new wo(o).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Ca({customAttribution:t.customAttribution})),this.addControl(new Aa,t.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(t){r._update("style"===t.dataType),r.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){r.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var o={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(t,r){if(void 0===r&&t.getDefaultPosition&&(r=t.getDefaultPosition()),void 0===r&&(r="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},i.prototype.resize=function(t){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 o=!this._moving;return o&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),o&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=null===e||void 0===e?La:e)>=La&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=null===e||void 0===e?Da:e)=Da&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()za)throw new Error("maxPitch must be less than or equal to "+za);if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),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(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},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(e,t,r){var n,i=this;if("mouseenter"===e||"mouseover"===e){var o=!1,a=function(n){var a=i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[];a.length?o||(o=!0,r.call(i,new Io(e,i,n.originalEvent,{features:a}))):o=!1};return{layer:t,listener:r,delegates:{mousemove:a,mouseout:function(){o=!1}}}}if("mouseleave"===e||"mouseout"===e){var s=!1,l=function(n){(i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?s=!0:s&&(s=!1,r.call(i,new Io(e,i,n.originalEvent)))},c=function(t){s&&(s=!1,r.call(i,new Io(e,i,t.originalEvent)))};return{layer:t,listener:r,delegates:{mousemove:l,mouseout:c}}}var u=function(e){var n=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(i,e),delete e.features)};return{layer:t,listener:r,delegates:(n={},n[e]=u,n)}},i.prototype.on=function(e,t,r){if(void 0===r)return n.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},i.prototype.once=function(e,t,r){if(void 0===r)return n.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var o in i.delegates)this.once(o,i.delegates[o]);return this},i.prototype.off=function(e,t,r){var i=this;if(void 0===r)return n.prototype.off.call(this,e,t);var o=function(n){for(var o=n[e],a=0;a180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Va.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),r.disableDrag()},Va.prototype.move=function(e,t){var r=this.map,n=this.mouseRotate.mousemoveWindow(e,t);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Va.prototype.off=function(){var e=this.element;r.removeEventListener(e,"mousedown",this.mousedown),r.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(e,"touchmove",this.touchmove),r.removeEventListener(e,"touchend",this.touchend),r.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Va.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Va.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),r.mousePos(this.element,t)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Va.prototype.mousemove=function(e){this.move(e,r.mousePos(this.element,e))},Va.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Va.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Va.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Va.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)t.getEast()||r.latitudet.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(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),o=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),o,{geolocateSource:!0})},n.prototype._updateMarker=function(t){if(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),r=this._map.unproject([1,e]),n=t.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(t){if(this._map){if(this.options.trackUserLocation)if(1===t.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===t.code&&Ja)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;if(this._container.addEventListener("contextmenu",(function(e){return e.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===t){e.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 o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}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 Ya(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ya({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(t){var r=t.originalEvent&&"resize"===t.originalEvent.type;t.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 e.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":$a--,Ja=!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 e.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 e.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 t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++$a>1?(t={maximumAge:6e5,timeout:0},Ja=!0):(t=this.options.positionOptions,Ja=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.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}(e.Evented),es={maxWidth:100,unit:"metric"},ts=function(t){this.options=e.extend({},es,t),e.bindAll(["_onMove","setUnit"],this)};function rs(e,t,r){var n=r&&r.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([n,i]),s=o.distanceTo(a);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?ns(t,n,l/5280,e._getUIString("ScaleControl.Miles")):ns(t,n,l,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?ns(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?ns(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):ns(t,n,s,e._getUIString("ScaleControl.Meters"))}function ns(e,t,r,n){var i=os(r),o=i/r;e.style.width=t*o+"px",e.innerHTML=i+" "+n}function is(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}function os(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),r=e/t;return t*(r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:is(r))}ts.prototype.getDefaultPosition=function(){return"bottom-left"},ts.prototype._onMove=function(){rs(this._map,this._container,this.options)},ts.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ts.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ts.prototype.setUnit=function(e){this.options.unit=e,rs(this._map,this._container,this.options)};var as=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};as.prototype.onAdd=function(t){return this._map=t,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",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},as.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},as.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},as.prototype._setupUI=function(){var t=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},as.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},as.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},as.prototype._isFullscreen=function(){return this._fullscreen},as.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.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())},as.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.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 ss={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ls=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(ss),r),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,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 e.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 e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),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(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;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(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},n.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},n.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},n.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},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="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(e){this._update(e.point)},n.prototype._onMouseMove=function(e){this._update(e.point)},n.prototype._onDrag=function(e){this._update(e.point)},n.prototype._update=function(e){var t=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(e){return t._container.classList.add(e)})),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=Ha(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=cs(this.options.offset);if(!o){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+a.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var u=i.add(a[o]).round();r.setTransform(this._container,Wa[o]+" translate("+u.x+"px,"+u.y+"px)"),Ga(this._container,o,"popup")}},n.prototype._onClose=function(){this.remove()},n}(e.Evented);function cs(t){if(t){if("number"===typeof t){var r=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-t),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var n=e.Point.convert(t);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:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return cs(new e.Point(0,0))}var us={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Fa,NavigationControl:Ua,GeolocateControl:Qa,AttributionControl:Ca,ScaleControl:ts,FullscreenControl:as,Popup:ls,Marker:Ya,Style:gr,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:ot,clearPrewarmedResources:at,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return tt.workerCount},set workerCount(e){tt.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return us})),r}()},39489:e=>{"use strict";e.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},70816:function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,r;function n(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var r,n=[],i=e.length;for(r=0;r>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},F={};function B(e,t,r,n){var i=n;"string"===typeof n&&(i=function(){return this[n]()}),e&&(F[e]=i),t&&(F[t[0]]=function(){return j(i.apply(this,arguments),t[1],t[2])}),r&&(F[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function Z(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function U(e){var t,r,n=e.match(D);for(t=0,r=n.length;t=0&&z.test(e);)e=e.replace(z,n),z.lastIndex=0,r-=1;return e}var W={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(D).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var q="Invalid date";function Y(){return this._invalidDate}var X="%d",K=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,r,n){var i=this._relativeTime[r];return E(i)?i(e,t,r,n):i.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return E(r)?r(t):r.replace(/%s/i,t)}var te={};function re(e,t){var r=e.toLowerCase();te[r]=te[r+"s"]=te[t]=e}function ne(e){return"string"===typeof e?te[e]||te[e.toLowerCase()]:void 0}function ie(e){var t,r,n={};for(r in e)s(e,r)&&(t=ne(r))&&(n[t]=e[r]);return n}var oe={};function ae(e,t){oe[e]=t}function se(e){var t,r=[];for(t in e)s(e,t)&&r.push({unit:t,priority:oe[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}function le(e){return e%4===0&&e%100!==0||e%400===0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=ce(t)),r}function de(e,t){return function(r){return null!=r?(he(this,e,r),n.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function he(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(r=ue(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Qe(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function pe(e){return E(this[e=ne(e)])?this[e]():this}function me(e,t){if("object"===typeof e){var r,n=se(e=ie(e)),i=n.length;for(r=0;r68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function yt(e,t,r,n,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}function xt(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+xt(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,i){var o,a,s=1+7*(t-1)+(7+r-n)%7+bt(e,n,i);return s<=0?a=mt(o=e-1)+s:s>mt(e)?(o=e+1,a=s-mt(e)):(o=e,a=s),{year:o,dayOfYear:a}}function _t(e,t,r){var n,i,o=bt(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?n=a+kt(i=e.year()-1,t,r):a>kt(e.year(),t,r)?(n=a-kt(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function kt(e,t,r){var n=bt(e,t,r),i=bt(e+1,t,r);return(mt(e)-n+i)/7}function St(e){return _t(e,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),re("week","w"),re("isoWeek","W"),ae("week",5),ae("isoWeek",5),Le("w",_e),Le("ww",_e,ye),Le("W",_e),Le("WW",_e,ye),Be(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=ue(e)}));var Tt={dow:0,doy:6};function Mt(){return this._week.dow}function Ct(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Et(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!==typeof e?e:isNaN(e)?"number"===typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}B("d",0,"do","day"),B("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),B("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),B("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),re("day","d"),re("weekday","e"),re("isoWeekday","E"),ae("day",11),ae("weekday",11),ae("isoWeekday",11),Le("d",_e),Le("e",_e),Le("E",_e),Le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Le("dddd",(function(e,t){return t.weekdaysRegex(e)})),Be(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:g(r).invalidWeekday=e})),Be(["d","e","E"],(function(e,t,r,n){t[n]=ue(e)}));var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Dt=Re,zt=Re,Nt=Re;function Ft(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(r,this._week.dow):e?r[e.day()]:r}function Bt(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Zt(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null}function Vt(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Ut.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Dt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=ze(this.weekdaysMin(r,"")),i=ze(this.weekdaysShort(r,"")),o=ze(this.weekdays(r,"")),a.push(n),s.push(i),l.push(o),c.push(n),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(){return this.hours()||24}function Qt(e,t){B(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,$t),B("k",["kk",2],0,Jt),B("hmm",0,0,(function(){return""+$t.apply(this)+j(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+$t.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),re("hour","h"),ae("hour",13),Le("a",er),Le("A",er),Le("H",_e),Le("h",_e),Le("k",_e),Le("HH",_e,ye),Le("hh",_e,ye),Le("kk",_e,ye),Le("hmm",ke),Le("hmmss",Se),Le("Hmm",ke),Le("Hmmss",Se),Fe(["H","HH"],Ge),Fe(["k","kk"],(function(e,t,r){var n=ue(e);t[Ge]=24===n?0:n})),Fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Fe(["h","hh"],(function(e,t,r){t[Ge]=ue(e),g(r).bigHour=!0})),Fe("hmm",(function(e,t,r){var n=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n)),g(r).bigHour=!0})),Fe("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n,2)),t[Ye]=ue(e.substr(i)),g(r).bigHour=!0})),Fe("Hmm",(function(e,t,r){var n=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n))})),Fe("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[Ge]=ue(e.substr(0,n)),t[qe]=ue(e.substr(n,2)),t[Ye]=ue(e.substr(i))}));var rr=/[ap]\.?m?\.?/i,nr=de("Hours",!0);function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var or,ar={calendar:R,longDateFormat:W,invalidDate:q,ordinal:X,dayOfMonthOrdinalParse:K,relativeTime:J,months:et,monthsShort:tt,week:Tt,weekdays:Rt,weekdaysMin:jt,weekdaysShort:Lt,meridiemParse:rr},sr={},lr={};function cr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r0;){if(n=hr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&cr(i,r)>=t-1)break;t--}o++}return or}function fr(e){return null!=e.match("^[^/\\\\]*$")}function hr(t){var r=null;if(void 0===sr[t]&&e&&e.exports&&fr(t))try{r=or._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),pr(r)}catch(n){sr[t]=null}return sr[t]}function pr(e,t){var r;return e&&((r=c(t)?vr(e):mr(e,t))?or=r:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),or._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=sr[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=sr[e]._config;else if(null!=t.parentLocale)if(null!=sr[t.parentLocale])n=sr[t.parentLocale]._config;else{if(null==(r=hr(t.parentLocale)))return lr[t.parentLocale]||(lr[t.parentLocale]=[]),lr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return sr[e]=new P(O(n,t)),lr[e]&&lr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),sr[e]}return delete sr[e],null}function gr(e,t){if(null!=t){var r,n,i=ar;null!=sr[e]&&null!=sr[e].parentLocale?sr[e].set(O(sr[e]._config,t)):(null!=(n=hr(e))&&(i=n._config),t=O(i,t),null==n&&(t.abbr=e),(r=new P(t)).parentLocale=sr[e],sr[e]=r),pr(e)}else null!=sr[e]&&(null!=sr[e].parentLocale?(sr[e]=sr[e].parentLocale,e===pr()&&pr(e)):null!=sr[e]&&delete sr[e]);return sr[e]}function vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return or;if(!o(e)){if(t=hr(e))return t;e=[e]}return dr(e)}function yr(){return M(sr)}function xr(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[He]<0||r[He]>11?He:r[We]<1||r[We]>Qe(r[Ve],r[He])?We:r[Ge]<0||r[Ge]>24||24===r[Ge]&&(0!==r[qe]||0!==r[Ye]||0!==r[Xe])?Ge:r[qe]<0||r[qe]>59?qe:r[Ye]<0||r[Ye]>59?Ye:r[Xe]<0||r[Xe]>999?Xe:-1,g(e)._overflowDayOfYear&&(tWe)&&(t=We),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=$e),g(e).overflow=t),e}var br=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_r=/Z|[+-]\d\d(?::?\d\d)?/,kr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Sr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tr=/^\/?Date\((-?\d+)/i,Mr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Cr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ar(e){var t,r,n,i,o,a,s=e._i,l=br.exec(s)||wr.exec(s),c=kr.length,u=Sr.length;if(l){for(g(e).iso=!0,t=0,r=c;tmt(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),r=xt(o,0,e._dayOfYear),e._a[He]=r.getUTCMonth(),e._a[We]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[qe]&&0===e._a[Ye]&&0===e._a[Xe]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?xt:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Fr(e){var t,r,n,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,r=Dr(t.GG,e._a[Ve],_t(Yr(),1,4).year),n=Dr(t.W,1),((i=Dr(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=_t(Yr(),o,a),r=Dr(t.gg,e._a[Ve],c.year),n=Dr(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),n<1||n>kt(r,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=wt(r,n,i,o,a),e._a[Ve]=s.year,e._dayOfYear=s.dayOfYear)}function Br(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;var t,r,i,o,a,s,l,c=""+e._i,u=c.length,d=0;for(l=(i=H(e._f,e._locale).match(D)||[]).length,t=0;t0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(r)+r.length),d+=r.length),F[o]?(r?g(e).empty=!1:g(e).unusedTokens.push(o),Ze(o,r,e)):e._strict&&!r&&g(e).unusedTokens.push(o);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ge]<=12&&!0===g(e).bigHour&&e._a[Ge]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ge]=Zr(e._locale,e._a[Ge],e._meridiem),null!==(s=g(e).era)&&(e._a[Ve]=e._locale.erasConvertYear(s,e._a[Ve])),Nr(e),xr(e)}else Lr(e);else Ar(e)}function Zr(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Ur(e){var t,r,n,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:y()}));function $r(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yr();for(r=t[0],n=1;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _n(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Wr(t))._a?(e=t._isUTC?p(t._a):Yr(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function kn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function Tn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Mn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Cn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function An(e,t){var r,n,i,o=e,a=null;return sn(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Mn.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:ue(a[We])*r,h:ue(a[Ge])*r,m:ue(a[qe])*r,s:ue(a[Ye])*r,ms:ue(ln(1e3*a[Xe]))*r}):(a=Cn.exec(e))?(r="-"===a[1]?-1:1,o={y:En(a[2],r),M:En(a[3],r),w:En(a[4],r),d:En(a[5],r),h:En(a[6],r),m:En(a[7],r),s:En(a[8],r)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=On(Yr(o.from),Yr(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),n=new an(o),sn(e)&&s(e,"_locale")&&(n._locale=e._locale),sn(e)&&s(e,"_isValid")&&(n._isValid=e._isValid),n}function En(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function In(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=hn(t,e),e.isBefore(t)?r=In(e,t):((r=In(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Pn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),Rn(this,An(r,n),e),this}}function Rn(e,t,r,i){var o=t._milliseconds,a=ln(t._days),s=ln(t._months);e.isValid()&&(i=null==i||i,s&&ct(e,fe(e,"Month")+s*r),a&&he(e,"Date",fe(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}An.fn=an.prototype,An.invalid=on;var Ln=Pn(1,"add"),jn=Pn(-1,"subtract");function Dn(e){return"string"===typeof e||e instanceof String}function zn(e){return k(e)||d(e)||Dn(e)||u(e)||Fn(e)||Nn(e)||null===e||void 0===e}function Nn(e){var t,r,n=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;tr.valueOf():r.valueOf()9999?V(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(r,"Z")):V(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function ti(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yr(e).isValid())?An({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yr(),e)}function ii(e,t){return this.isValid()&&(k(e)&&e.isValid()||Yr(e).isValid())?An({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Yr(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,di=60*ui,fi=3506328*di;function hi(e,t){return(e%t+t)%t}function pi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-fi:new Date(e,t,r).valueOf()}function mi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-fi:Date.UTC(e,t,r)}function gi(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hi(t+(this._isUTC?0:this.utcOffset()*ui),di);break;case"minute":t=this._d.valueOf(),t-=hi(t,ui);break;case"second":t=this._d.valueOf(),t-=hi(t,ci)}return this._d.setTime(t),n.updateOffset(this,!0),this}function vi(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-hi(t+(this._isUTC?0:this.utcOffset()*ui),di)-1;break;case"minute":t=this._d.valueOf(),t+=ui-hi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-hi(t,ci)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function xi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ki(){return this.isValid()?this.toISOString():null}function Si(){return v(this)}function Ti(){return h({},g(this))}function Mi(){return g(this).overflow}function Ci(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var r,i,o,a=this._eras||vr("en")._eras;for(r=0,i=a.length;r=0)return l[n]}function Ii(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e(o=kt(e,n,i))&&(t=o),$i.call(this,e,t,r,n,i))}function $i(e,t,r,n,i){var o=wt(e,t,r,n,i),a=xt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ji(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),Le("N",Ni),Le("NN",Ni),Le("NNN",Ni),Le("NNNN",Fi),Le("NNNNN",Bi),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?g(r).era=i:g(r).invalidEra=e})),Le("y",Ae),Le("yy",Ae),Le("yyy",Ae),Le("yyyy",Ae),Le("yo",Zi),Fe(["y","yy","yyy","yyyy"],Ve),Fe(["yo"],(function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ve]=r._locale.eraYearOrdinalParse(e,i):t[Ve]=parseInt(e,10)})),B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vi("gggg","weekYear"),Vi("ggggg","weekYear"),Vi("GGGG","isoWeekYear"),Vi("GGGGG","isoWeekYear"),re("weekYear","gg"),re("isoWeekYear","GG"),ae("weekYear",1),ae("isoWeekYear",1),Le("G",Ee),Le("g",Ee),Le("GG",_e,ye),Le("gg",_e,ye),Le("GGGG",Me,be),Le("gggg",Me,be),Le("GGGGG",Ce,we),Le("ggggg",Ce,we),Be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=ue(e)})),Be(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),B("Q",0,"Qo","quarter"),re("quarter","Q"),ae("quarter",7),Le("Q",ve),Fe("Q",(function(e,t){t[He]=3*(ue(e)-1)})),B("D",["DD",2],"Do","date"),re("date","D"),ae("date",9),Le("D",_e),Le("DD",_e,ye),Le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],We),Fe("Do",(function(e,t){t[We]=ue(e.match(_e)[0])}));var Qi=de("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),re("dayOfYear","DDD"),ae("dayOfYear",4),Le("DDD",Te),Le("DDDD",xe),Fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=ue(e)})),B("m",["mm",2],0,"minute"),re("minute","m"),ae("minute",14),Le("m",_e),Le("mm",_e,ye),Fe(["m","mm"],qe);var to=de("Minutes",!1);B("s",["ss",2],0,"second"),re("second","s"),ae("second",15),Le("s",_e),Le("ss",_e,ye),Fe(["s","ss"],Ye);var ro,no,io=de("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),re("millisecond","ms"),ae("millisecond",16),Le("S",Te,ve),Le("SS",Te,ye),Le("SSS",Te,xe),ro="SSSS";ro.length<=9;ro+="S")Le(ro,Ae);function oo(e,t){t[Xe]=ue(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Fe(ro,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}no=de("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var lo=_.prototype;function co(e){return Yr(1e3*e)}function uo(){return Yr.apply(null,arguments).parseZone()}function fo(e){return e}lo.add=Ln,lo.calendar=Un,lo.clone=Vn,lo.diff=Kn,lo.endOf=vi,lo.format=ti,lo.from=ri,lo.fromNow=ni,lo.to=ii,lo.toNow=oi,lo.get=pe,lo.invalidAt=Mi,lo.isAfter=Hn,lo.isBefore=Wn,lo.isBetween=Gn,lo.isSame=qn,lo.isSameOrAfter=Yn,lo.isSameOrBefore=Xn,lo.isValid=Si,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Kr,lo.min=Xr,lo.parsingFlags=Ti,lo.set=me,lo.startOf=gi,lo.subtract=jn,lo.toArray=wi,lo.toObject=_i,lo.toDate=bi,lo.toISOString=Qn,lo.inspect=ei,"undefined"!==typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=ki,lo.toString=Jn,lo.unix=xi,lo.valueOf=yi,lo.creationData=Ci,lo.eraName=Oi,lo.eraNarrow=Pi,lo.eraAbbr=Ri,lo.eraYear=Li,lo.year=gt,lo.isLeapYear=vt,lo.weekYear=Hi,lo.isoWeekYear=Wi,lo.quarter=lo.quarters=Ji,lo.month=ut,lo.daysInMonth=dt,lo.week=lo.weeks=At,lo.isoWeek=lo.isoWeeks=Et,lo.weeksInYear=Yi,lo.weeksInWeekYear=Xi,lo.isoWeeksInYear=Gi,lo.isoWeeksInISOWeekYear=qi,lo.date=Qi,lo.day=lo.days=Ht,lo.weekday=Wt,lo.isoWeekday=Gt,lo.dayOfYear=eo,lo.hour=lo.hours=nr,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=no,lo.utcOffset=mn,lo.utc=vn,lo.local=yn,lo.parseZone=xn,lo.hasAlignedHourOffset=bn,lo.isDST=wn,lo.isLocal=kn,lo.isUtcOffset=Sn,lo.isUtc=Tn,lo.isUTC=Tn,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=T("dates accessor is deprecated. Use date instead.",Qi),lo.months=T("months accessor is deprecated. Use month instead",ut),lo.years=T("years accessor is deprecated. Use year instead",gt),lo.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),lo.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_n);var ho=P.prototype;function po(e,t,r,n){var i=vr(),o=p().set(n,t);return i[r](o,e)}function mo(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=po(e,n,r,"month");return i}function go(e,t,r,n){"boolean"===typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var i,o=vr(),a=e?o._week.dow:0,s=[];if(null!=r)return po(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,n,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function xo(e,t,r){return go(e,t,r,"weekdays")}function bo(e,t,r){return go(e,t,r,"weekdaysShort")}function wo(e,t,r){return go(e,t,r,"weekdaysMin")}ho.calendar=L,ho.longDateFormat=G,ho.invalidDate=Y,ho.ordinal=$,ho.preparse=fo,ho.postformat=fo,ho.relativeTime=Q,ho.pastFuture=ee,ho.set=I,ho.eras=Ai,ho.erasParse=Ei,ho.erasConvertYear=Ii,ho.erasAbbrRegex=Di,ho.erasNameRegex=ji,ho.erasNarrowRegex=zi,ho.months=ot,ho.monthsShort=at,ho.monthsParse=lt,ho.monthsRegex=ht,ho.monthsShortRegex=ft,ho.week=St,ho.firstDayOfYear=Ct,ho.firstDayOfWeek=Mt,ho.weekdays=Ft,ho.weekdaysMin=Zt,ho.weekdaysShort=Bt,ho.weekdaysParse=Vt,ho.weekdaysRegex=qt,ho.weekdaysShortRegex=Yt,ho.weekdaysMinRegex=Xt,ho.isPM=tr,ho.meridiem=ir,pr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=T("moment.lang is deprecated. Use moment.locale instead.",pr),n.langData=T("moment.langData is deprecated. Use moment.localeData instead.",vr);var _o=Math.abs;function ko(){var e=this._data;return this._milliseconds=_o(this._milliseconds),this._days=_o(this._days),this._months=_o(this._months),e.milliseconds=_o(e.milliseconds),e.seconds=_o(e.seconds),e.minutes=_o(e.minutes),e.hours=_o(e.hours),e.months=_o(e.months),e.years=_o(e.years),this}function So(e,t,r,n){var i=An(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function To(e,t){return So(this,e,t,1)}function Mo(e,t){return So(this,e,t,-1)}function Co(e){return e<0?Math.floor(e):Math.ceil(e)}function Ao(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Co(Io(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=ce(o/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,r=ce(t/60),l.hours=r%24,a+=ce(r/24),s+=i=ce(Eo(a)),a-=Co(Io(i)),n=ce(s/12),s%=12,l.days=a,l.months=s,l.years=n,this}function Eo(e){return 4800*e/146097}function Io(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Eo(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Io(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Po(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function Ro(e){return function(){return this.as(e)}}var Lo=Ro("ms"),jo=Ro("s"),Do=Ro("m"),zo=Ro("h"),No=Ro("d"),Fo=Ro("w"),Bo=Ro("M"),Zo=Ro("Q"),Uo=Ro("y");function Vo(){return An(this)}function Ho(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Wo(e){return function(){return this.isValid()?this._data[e]:NaN}}var Go=Wo("milliseconds"),qo=Wo("seconds"),Yo=Wo("minutes"),Xo=Wo("hours"),Ko=Wo("days"),$o=Wo("months"),Jo=Wo("years");function Qo(){return ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=An(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),d=ea(i.as("y")),f=o<=r.ss&&["s",o]||o0,f[4]=n,ra.apply(null,f)}function ia(e){return void 0===e?ea:"function"===typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=ta;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=na(this,!i,o,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,r=ce(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=la(this._months)!==la(d)?"-":"",a=la(this._days)!==la(d)?"-":"",s=la(this._milliseconds)!==la(d)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var ua=an.prototype;return ua.isValid=nn,ua.abs=ko,ua.add=To,ua.subtract=Mo,ua.as=Oo,ua.asMilliseconds=Lo,ua.asSeconds=jo,ua.asMinutes=Do,ua.asHours=zo,ua.asDays=No,ua.asWeeks=Fo,ua.asMonths=Bo,ua.asQuarters=Zo,ua.asYears=Uo,ua.valueOf=Po,ua._bubble=Ao,ua.clone=Vo,ua.get=Ho,ua.milliseconds=Go,ua.seconds=qo,ua.minutes=Yo,ua.hours=Xo,ua.days=Ko,ua.weeks=Qo,ua.months=$o,ua.years=Jo,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=ai,ua.localeData=li,ua.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=si,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Le("x",Ee),Le("X",Pe),Fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,r){r._d=new Date(ue(e))})),n.version="2.29.4",i(Yr),n.fn=lo,n.min=Jr,n.max=Qr,n.now=en,n.utc=p,n.unix=co,n.months=vo,n.isDate=d,n.locale=pr,n.invalid=y,n.duration=An,n.isMoment=k,n.weekdays=xo,n.parseZone=uo,n.localeData=vr,n.isDuration=sn,n.monthsShort=yo,n.weekdaysMin=wo,n.defineLocale=mr,n.updateLocale=gr,n.locales=yr,n.weekdaysShort=bo,n.normalizeUnits=ne,n.relativeTimeRounding=ia,n.relativeTimeThreshold=oa,n.calendarFormat=Zn,n.prototype=lo,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()},53420:(e,t,r)=>{"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==o||l(s))&&(r=0|e,i=c||0,o=u||0,t&&t(r,i,o,a))}function u(e){c(0,e)}function d(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function f(e){l(e)&&t&&t(r,i,o,a)}function h(e){0===n.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():function(){if(!s)return;s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f))}()},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(48942)},49175:e=>{var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i=e.clientX||0,o=e.clientY||0,a=(s=r,s===window||s===document||s===document.body?t:s.getBoundingClientRect());var s;return n[0]=i-a.left,n[1]=o-a.top,n}},48942:(e,t)=>{"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<{"use strict";var n=r(9126);e.exports=function(e,t,r){"function"===typeof e&&(r=!!t,t=e,e=window);var i=n("ex",e),o=function(e){r&&e.preventDefault();var n=e.deltaX||0,o=e.deltaY||0,a=e.deltaZ||0,s=1;switch(e.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(o*=s,a*=s,(n*=s)||o||a)return t(n,o,a,e)};return e.addEventListener("wheel",o),o}},4142:function(e,t,r){var n;!function(i,o,a){o[i]=o[i]||a(),e.exports?e.exports=o[i]:void 0===(n=function(){return o[i]}.call(t,r,t,e))||(e.exports=n)}("Promise","undefined"!=typeof r.g?r.g:this,(function(){"use strict";var e,t,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(g){e=function(e,t,r){return e[t]=r,e}}function o(e,n){r.add(e,n),t||(t=i(r.drain))}function a(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&o(s,r))}catch(g){u.call(new f(r),g)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&o(s,t))}function d(e,t,r,n){for(var i=0;i{"use strict";e.exports=function(e){for(var t,r=[],a=0,s=0,l=0,c=0,u=null,d=null,f=0,h=0,p=0,m=e.length;p4?(a=g[g.length-4],s=g[g.length-3]):(a=f,s=h),r.push(g)}return r};var n=r(95036);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function o(e,t,r,n,i,o){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,o/3+2/3*n,i,o]}},71843:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{var n="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"===typeof i.get?i.get:null,a=n&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,x=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,k=Array.prototype.concat,S=Array.prototype.join,T=Array.prototype.slice,M=Math.floor,C="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,E="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,R=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var n=e<0?-M(-e):M(e);if(n!==e){var i=String(n),o=y.call(t,i.length+1);return x.call(i,r,"$&_")+"."+x.call(x.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(t,r,"$&_")}var j=r(24654),D=j.custom,z=U(D)?D:null;function N(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return x.call(String(e),/"/g,""")}function B(e){return"[object Array]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function Z(e){return"[object RegExp]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(I)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,i,s){var l=n||{};if(H(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(l,"maxStringLength")&&("number"===typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!H(l,"customInspect")||l.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(l,"numericSeparator")&&"boolean"!==typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=l.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,l);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var _=String(t);return b?L(t,_):_}if("bigint"===typeof t){var M=String(t)+"n";return b?L(t,M):M}var A="undefined"===typeof l.depth?5:l.depth;if("undefined"===typeof i&&(i=0),i>=A&&A>0&&"object"===typeof t)return B(t)?"[Array]":"[Object]";var D=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;r=S.call(Array(e.indent+1)," ")}return{base:r,prev:S.call(Array(t+1),r)}}(l,i);if("undefined"===typeof s)s=[];else if(G(s,t)>=0)return"[Circular]";function V(t,r,n){if(r&&(s=T.call(s)).push(r),n){var o={depth:l.depth};return H(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,i+1,s)}return e(t,l,i+1,s)}if("function"===typeof t&&!Z(t)){var Y=function(e){if(e.name)return e.name;var t=v.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=Q(t,V);return"[Function"+(Y?": "+Y:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(U(t)){var te=I?x.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t);return"object"!==typeof t||I?te:X(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var re="<"+w.call(String(t.nodeName)),ne=t.attributes||[],ie=0;ie"}if(B(t)){if(0===t.length)return"[]";var oe=Q(t,V);return D&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+J(oe,D)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var ae=Q(t,V);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ae,", ")+" }":"{ ["+String(t)+"] "+S.call(k.call("[cause]: "+V(t.cause),ae),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&j)return j(t,{depth:A-i});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(re){return!0}return e instanceof Map}catch(t){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,r){se.push(V(r,t,!0)+" => "+V(e,t))})),$("Map",o.call(t),se,D)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(r){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(V(e,t))})),$("Set",c.call(t),le,D)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(re){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return K("WeakMap");if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(re){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return K("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return K("WeakRef");if(function(e){return"[object Number]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(V(Number(t)));if(function(e){if(!e||"object"!==typeof e||!C)return!1;try{return C.call(e),!0}catch(t){}return!1}(t))return X(V(C.call(t)));if(function(e){return"[object Boolean]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(p.call(t));if(function(e){return"[object String]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return X(V(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!Z(t)){var ce=Q(t,V),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!ue&&O&&Object(t)===t&&O in t?y.call(W(t),8,-1):de?"Object":"",he=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+S.call(k.call([],fe||[],de||[]),": ")+"] ":"");return 0===ce.length?he+"{}":D?he+"{"+J(ce,D)+"}":he+"{ "+S.call(ce,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function W(e){return m.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(y.call(e,0,t.maxStringLength),t)+n}return N(x.call(x.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",t)}function Y(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function X(e){return"Object("+e+")"}function K(e){return e+" { ? }"}function $(e,t,r,n){return e+" ("+t+") {"+(n?J(r,n):S.call(r,", "))+"}"}function J(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+S.call(e,","+r)+"\n"+t.prev}function Q(e,t){var r=B(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";var t=function(e){return e!==e};e.exports=function(e,r){return 0===e&&0===r?1/e===1/r:e===r||!(!t(e)||!t(r))}},28199:(e,t,r)=>{"use strict";var n=r(89959),i=r(59962),o=r(64091),a=r(24584),s=r(98229),l=i(a(),Object);n(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},24584:(e,t,r)=>{"use strict";var n=r(64091);e.exports=function(){return"function"===typeof Object.is?Object.is:n}},98229:(e,t,r)=>{"use strict";var n=r(24584),i=r(89959);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},2782:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(82950),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{d(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(e){var t=null!==e&&"object"===typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),f=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g{"use strict";var n=Array.prototype.slice,i=r(82950),o=Object.keys,a=o?function(e){return o(e)}:r(2782),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},82950:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},8047:(e,t,r)=>{"use strict";var n=r(66328),i=r(80541)(),o=r(44680),a=Object,s=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=i?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var o=1;o{"use strict";var n=r(8047);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";function t(e,t){if("string"!==typeof e)return[e];var r=[e];"string"===typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",o=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function o(t,o,a){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach((function(e,n){for(var i,a=0;e!=i;)if(i=e,e=e.replace(t,o),a++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var a=new RegExp("\\"+i+"([0-9]+)\\"+i);return o?r:function e(t,r,n){for(var i,o=[],s=0;i=a.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");o.push(t.slice(0,i.index)),o.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return o.push(t),o}(r[0],r)}function r(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var o=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;i!=r;){if(a++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(o,s)}return i}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,n){return Array.isArray(e)?r(e,n):t(e,n)}n.parse=t,n.stringify=r,e.exports=n},86840:(e,t,r)=>{"use strict";var n=r(49147);e.exports=function(e){var t;arguments.length>1&&(e=arguments);"string"===typeof e?e=e.split(/\s/).map(parseFloat):"number"===typeof e&&(e=[e]);e.length&&"number"===typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=n(e,{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:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height);return t}},76170:e=>{e.exports=function(e){var i=[];return e.replace(r,(function(e,r,o){var a=r.toLowerCase();for(o=function(e){var t=e.match(n);return t?t.map(Number):[]}(o),"m"==a&&o.length>2&&(i.push([r].concat(o.splice(0,2))),a="l",r="m"==r?"l":"L");;){if(o.length==t[a])return o.unshift(r),i.push(o);if(o.length{e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3460:function(e){(function(){var t,r,n,i,o,a;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},r=process.hrtime,i=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),o=i-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},49147:e=>{"use strict";e.exports=function(e,t,n){var i,o,a={};if("string"===typeof t&&(t=r(t)),Array.isArray(t)){var s={};for(o=0;o{"use strict";var n=r(53787),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 o in i){var a=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(a,i[o])}},96669:(e,t,r)=>{"use strict";e.exports=r(6377)},10152:(e,t,r)=>{"use strict";e.exports=r(83538)},77298:(e,t,r)=>{"use strict";e.exports=r(36522)},72527:(e,t,r)=>{"use strict";e.exports=r(85799)},48674:(e,t,r)=>{"use strict";e.exports=r(70375)},74396:(e,t,r)=>{"use strict";e.exports=r(92829)},711:(e,t,r)=>{"use strict";e.exports=r(82315)},14381:(e,t,r)=>{"use strict";e.exports=r(177)},19373:(e,t,r)=>{"use strict";e.exports=r(4950)},60686:(e,t,r)=>{"use strict";e.exports=r(64906)},66453:(e,t,r)=>{"use strict";e.exports=r(15675)},94142:(e,t,r)=>{"use strict";e.exports=r(29969)},73138:(e,t,r)=>{"use strict";e.exports=r(332)},67217:(e,t,r)=>{"use strict";e.exports=r(46717)},26972:(e,t,r)=>{"use strict";e.exports=r(6695)},84325:(e,t,r)=>{"use strict";e.exports=r(17923)},89440:(e,t,r)=>{"use strict";e.exports=r(17266)},1047:(e,t,r)=>{"use strict";e.exports=r(62235)},93292:(e,t,r)=>{"use strict";e.exports=r(99808)},93662:(e,t,r)=>{"use strict";e.exports=r(20131)},91011:(e,t,r)=>{"use strict";e.exports=r(78799)},91973:(e,t,r)=>{"use strict";e.exports=r(82298)},91237:(e,t,r)=>{"use strict";e.exports=r(34395)},4578:(e,t,r)=>{"use strict";e.exports=r(28507)},15131:(e,t,r)=>{"use strict";e.exports=r(57569)},9435:(e,t,r)=>{"use strict";var n=r(73138);n.register([r(10152),r(72527),r(93292),r(91011),r(91973),r(91237),r(66453),r(48001),r(8422),r(84325),r(52315),r(15131),r(80406),r(78967),r(42189),r(4578),r(89440),r(54197),r(8893),r(49587),r(13820),r(71463),r(60686),r(50357),r(76670),r(14381),r(54717),r(62847),r(2434),r(93662),r(57613),r(46620),r(73718),r(19373),r(67217),r(87928),r(32269),r(41904),r(711),r(12353),r(94142),r(12224),r(74396),r(22201),r(19574),r(77298),r(80661),r(96669),r(26972),r(1047),r(89879),r(48674)]),e.exports=n},32269:(e,t,r)=>{"use strict";e.exports=r(70004)},49587:(e,t,r)=>{"use strict";e.exports=r(39204)},71463:(e,t,r)=>{"use strict";e.exports=r(11829)},12224:(e,t,r)=>{"use strict";e.exports=r(69196)},46620:(e,t,r)=>{"use strict";e.exports=r(46451)},57613:(e,t,r)=>{"use strict";e.exports=r(98735)},80406:(e,t,r)=>{"use strict";e.exports=r(39966)},2434:(e,t,r)=>{"use strict";e.exports=r(26248)},87928:(e,t,r)=>{"use strict";e.exports=r(67751)},54197:(e,t,r)=>{"use strict";e.exports=r(81284)},12353:(e,t,r)=>{"use strict";e.exports=r(31871)},76670:(e,t,r)=>{"use strict";e.exports=r(56100)},54717:(e,t,r)=>{"use strict";e.exports=r(60290)},73718:(e,t,r)=>{"use strict";e.exports=r(52959)},22201:(e,t,r)=>{"use strict";e.exports=r(91775)},19574:(e,t,r)=>{"use strict";e.exports=r(33982)},80661:(e,t,r)=>{"use strict";e.exports=r(62363)},48001:(e,t,r)=>{"use strict";e.exports=r(35104)},89879:(e,t,r)=>{"use strict";e.exports=r(61881)},62847:(e,t,r)=>{"use strict";e.exports=r(5666)},50357:(e,t,r)=>{"use strict";e.exports=r(53624)},78967:(e,t,r)=>{"use strict";e.exports=r(14347)},8893:(e,t,r)=>{"use strict";e.exports=r(44201)},41904:(e,t,r)=>{"use strict";e.exports=r(86032)},42189:(e,t,r)=>{"use strict";e.exports=r(34065)},8422:(e,t,r)=>{"use strict";e.exports=r(93537)},13820:(e,t,r)=>{"use strict";e.exports=r(10001)},52315:(e,t,r)=>{"use strict";e.exports=r(83696)},43721:(e,t,r)=>{"use strict";var n=r(71304),i=r(88060),o=r(2166);e.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(o(t))(4),a="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!==typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,a&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(a?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=i(Math.floor(255*e[0]),0,255),r[1]=i(Math.floor(255*e[1]),0,255),r[2]=i(Math.floor(255*e[2]),0,255),r[3]=null==e[3]?255:i(Math.floor(255*e[3]),0,255)),r)}},88531:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},71304:(e,t,r)=>{"use strict";var n=r(88531);e.exports=function(e){var t;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var r=n(e);if(!r.space)return[];var i=[0,0,0],o="h"===r.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(r.values[0],i[0]),o[0]),t[1]=Math.min(Math.max(r.values[1],i[1]),o[1]),t[2]=Math.min(Math.max(r.values[2],i[2]),o[2]),"h"===r.space[0]&&(t=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return o=255*l,[o,o,o];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*o;return i}(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}},11199:(e,t,r)=>{"use strict";var n=r(22605),i=r(94060),o=r(88060);e.exports=function(e){var t,r=n(e);return r.space?((t=Array(3))[0]=o(r.values[0],0,255),t[1]=o(r.values[1],0,255),t[2]=o(r.values[2],0,255),"h"===r.space[0]&&(t=i.rgb(t)),t.push(o(r.alpha,0,1)),t):[]}},22605:(e,t,r)=>{"use strict";var n=r(81238);e.exports=function(e){var t,r,o=[],a=1;if("string"===typeof e)if(e=e.toLowerCase(),n[e])o=n[e].slice(),r="rgb";else if("transparent"===e)a=0,r="rgb",o=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);a=1,(u=s.length)<=4?(o=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(a=parseInt(s[3]+s[3],16)/255)):(o=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(a=parseInt(s[6]+s[7],16)/255)),o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0),r="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;r=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;o=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==i[e])return i[e]}return parseFloat(e)})),l===s&&o.push(1),a=c||void 0===o[u]?1:o[u],o=o.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(o=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),r=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(o=[e[0],e[1],e[2]],r="rgb",a=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(r="rgb",o=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(r="hsl",o=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),a=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(a/=100)):(r="rgb",o=[e>>>16,(65280&e)>>>8,255&e]);return{space:r,values:o,alpha:a}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},94060:(e,t,r)=>{"use strict";var n=r(64146);e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0?n++:n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c]=255*o;return i}},n.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),l=s-a;return s===a?t=0:n===s?t=(i-o)/l:i===s?t=2+(o-n)/l:o===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s===a?0:r<=.5?l/(s+a):l/(2-s-a)),100*r]}},64146:e=>{"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},45600:e=>{"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}]},63858:(e,t,r)=>{"use strict";var n=r(45600),i=r(92948),o=r(99727),a=r(99862).templatedArray,s=r(71896);function l(e){return["In order for absolute positioning of the arrow to work, *a"+e+"ref* must be exactly the same as *"+e+"ref*, otherwise *a"+e+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+e+"ref* can be set to *pixel*,","in which case the *a"+e+"* value is specified in pixels","relative to *"+e+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function c(e,t,r){return["Sets the",e,"component of the arrow tail about the arrow head.","If `a"+e+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",t,"("+t,"to",r+").","If `a"+e+"ref` is not `pixel` and is exactly the same as `"+e+"ref`,","this is an absolute value on that axis,","like `"+e+"`, specified in the same coordinates as `"+e+"ref`."].join(" ")}e.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (
), bold (), italics (),","hyperlinks (
). Tags , , "," are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use
to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more
HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[c("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[c("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("x","left","right"),l("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",s.axisRefDescription("y","bottom","top"),l("y")].join(" ")},xref:{valType:"enumerated",values:["paper",o.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",s.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",o.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",s.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:i({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}})},60275:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(48293).draw;function a(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=i.getFromId(e,t.xref),n=i.getFromId(e,t.yref),o=i.getRefType(t.xref),a=i.getRefType(t.yref);t._extremes={},"range"===o&&s(t,r),"range"===a&&s(t,n)}))}function s(e,t){var r,n=t._id,o=n.charAt(0),a=e[o],s=e["a"+o],l=e[o+"ref"],c=e["a"+o+"ref"],u=e["_"+o+"padplus"],d=e["_"+o+"padminus"],f={x:1,y:-1}[o]*e[o+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+f,m=h-f,g=3*e.startarrowsize*e.arrowwidth||0,v=g+f,y=g-f;if(c===l){var x=i.findExtremes(t,[t.r2c(a)],{ppadplus:p,ppadminus:m}),b=i.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(u,p,v),ppadminus:Math.max(d,m,y)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([o,a],e)}},94132:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(99862).arrayEditor;function a(e,t){var r,n,i,o,a,l,c,u=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),d={},f=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r{"use strict";var n=r(53787),i=r(66235);e.exports=function(e,t,r,o){o("opacity");var a=o("bgcolor"),s=o("bordercolor"),l=i.opacity(s);o("borderpad");var c=o("borderwidth"),u=o("showarrow");if(o("text",u?" ":r._dfltTitle.annotation),o("textangle"),n.coerceFont(o,"font",r.font),o("width"),o("align"),o("height")&&o("valign"),u){var d,f,h=o("arrowside");-1!==h.indexOf("end")&&(d=o("arrowhead"),f=o("arrowsize")),-1!==h.indexOf("start")&&(o("startarrowhead",d),o("startarrowsize",f)),o("arrowcolor",l?t.bordercolor:i.defaultLine),o("arrowwidth",2*(l&&c||1)),o("standoff"),o("startstandoff")}var p=o("hovertext"),m=r.hoverlabel||{};if(p){var g=o("hoverlabel.bgcolor",m.bgcolor||(i.opacity(a)?i.rgb(a):i.defaultLine)),v=o("hoverlabel.bordercolor",m.bordercolor||i.contrast(g));n.coerceFont(o,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||v})}o("captureevents",!!p)}},70028:(e,t,r)=>{"use strict";var n=r(51908),i=r(3324);e.exports=function(e,t,r,o){t=t||{};var a="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.annotations,d=t._id.charAt(0),f=0;f{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(6228),s=r(63858);function l(e,t,r){function o(r,i){return n.coerce(e,t,s,r,i)}var l=o("visible"),c=o("clicktoshow");if(l||c){a(e,t,r,o);for(var u=t.showarrow,d=["x","y"],f=[-10,-30],h={_fullLayout:r},p=0;p<2;p++){var m=d[p],g=i.coerceRef(e,t,h,m,"","paper");if("paper"!==g)i.getFromId(h,g)._annIndices.push(t._index);if(i.coercePosition(t,h,o,g,m,.5),u){var v="a"+m,y=i.coerceRef(e,t,h,v,"pixel",["pixel","paper"]);"pixel"!==y&&y!==g&&(y=t[v]="pixel");var x="pixel"===y?f[p]:.4;i.coercePosition(t,h,o,y,v,x)}o(m+"anchor"),o(m+"shift")}if(n.noneOrAll(e,t,["x","y"]),u&&n.noneOrAll(e,t,["ax","ay"]),c){var b=o("xclick"),w=o("yclick");t._xclick=void 0===b?t.x:i.cleanPosition(b,h,t.xref),t._yclick=void 0===w?t.y:i.cleanPosition(w,h,t.yref)}}}e.exports=function(e,t){o(e,t,{name:"annotations",handleItemDefaults:l})}},48293:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=a.strTranslate,l=r(28605),c=r(66235),u=r(50973),d=r(76719),f=r(98224),h=r(19602),p=r(63e3),m=r(99862).arrayEditor,g=r(23449);function v(e,t){var r=e._fullLayout.annotations[t]||{},n=l.getFromId(e,r.xref),i=l.getFromId(e,r.yref);n&&n.setScale(),i&&i.setScale(),x(e,r,t,!1,n,i)}function y(e,t,r,n,i){var o=i[r],a=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(a),u=s?n.h:n.w;return e?c?o+(s?-t:t)/e._length:e.p2r(e.r2p(o)+t):o+(s?-t:t)/u}function x(e,t,r,o,v,x){var b,w,_=e._fullLayout,k=e._fullLayout._size,S=e._context.edits;o?(b="annotation-"+o,w=o+".annotations"):(b="annotation",w="annotations");var T=m(e.layout,w,t),M=T.modifyBase,C=T.modifyItem,A=T.getUpdateObj;_._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var E="clip"+_._uid+"_ann"+r;if(t._input&&!1!==t.visible){var I={x:{},y:{}},O=+t.textangle||0,P=_._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",t.opacity),R=P.append("g").classed("annotation-text-g",!0),L=S[t.showarrow?"annotationTail":"annotationPosition"],j=t.captureevents||S.annotationText||L,D=R.append("g").style("pointer-events",j?"all":null).call(h,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",G(n.event))}));t.hovertext&&D.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,i=this.getBoundingClientRect(),o=e.getBoundingClientRect();d.loneHover({x0:i.left-o.left,x1:i.right-o.left,y:(i.top+i.bottom)/2-o.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:e})})).on("mouseout",(function(){d.loneUnhover(_._hoverlayer.node())}));var z=t.borderwidth,N=t.borderpad,F=z+N,B=D.append("rect").attr("class","bg").style("stroke-width",z+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),Z=t.width||t.height,U=_._topclips.selectAll("#"+E).data(Z?[0]:[]);U.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),U.exit().remove();var V=t.font,H=_._meta?a.templateString(t.text,_._meta):t.text,W=D.append("text").classed("annotation-text",!0).text(H);S.annotationText?W.call(f.makeEditable,{delegate:D,gd:e}).call(q).on("edit",(function(r){t.text=r,this.call(q),C("text",r),v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),i.call("_guiRelayout",e,A())})):W.call(q)}else n.selectAll("#"+E).remove();function G(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return o&&(n.subplotId=o),n}function q(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),f.convertToTspans(r,e,Y),r}function Y(){var r=W.selectAll("a");1===r.size()&&r.text()===W.text()&&D.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=D.select(".annotation-text-math-group"),d=!n.empty(),m=u.bBox((d?n:W).node()),b=m.width,w=m.height,T=t.width||b,j=t.height||w,N=Math.round(T+2*F),V=Math.round(j+2*F);function H(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var q=!1,Y=["x","y"],X=0;X1)&&(ne===re?((he=ie.r2fraction(t["a"+te]))<0||he>1)&&(q=!0):q=!0),K=ie._offset+ie.r2p(t[te]),Q=.5}else{var pe="domain"===fe;"x"===te?(J=t[te],K=pe?ie._offset+ie._length*J:K=k.l+k.w*J):(J=1-t[te],K=pe?ie._offset+ie._length*J:K=k.t+k.h*J),Q=t.showarrow?.5:J}if(t.showarrow){de.head=K;var me=t["a"+te];if(ee=ae*H(.5,t.xanchor)-se*H(.5,t.yanchor),ne===re){var ge=l.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),de.tail=ie._offset+ie._length*me):"paper"===ge?"y"===te?(me=1-me,de.tail=k.t+k.h*me):de.tail=k.l+k.w*me:de.tail=ie._offset+ie.r2p(me),$=ee}else de.tail=K+me,$=ee+me;de.text=de.tail+ee;var ve=_["x"===te?"width":"height"];if("paper"===re&&(de.head=a.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else $=ee=le*H(Q,ce),de.text=K+ee;de.text+=ue,ee+=ue,$+=ue,t["_"+te+"padplus"]=le/2+$,t["_"+te+"padminus"]=le/2-$,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(q)D.remove();else{var be=0,we=0;if("left"!==t.align&&(be=(T-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(we=(j-w)*("middle"===t.valign?.5:1)),d)n.select("svg").attr({x:F+be-1,y:F+we}).call(u.setClipUrl,Z?E:null,e);else{var _e=F+we-m.top,ke=F+be-m.left;W.call(f.positionText,ke,_e).call(u.setClipUrl,Z?E:null,e)}U.select("rect").call(u.setRect,F,F,T,j),B.call(u.setRect,z/2,z/2,N-z,V-z),D.call(u.setTranslate,Math.round(I.x.text-N/2),Math.round(I.y.text-V/2)),R.attr({transform:"rotate("+O+","+I.x.text+","+I.y.text+")"});var Se,Te=function(r,n){P.selectAll(".annotation-arrow-g").remove();var l=I.x.head,d=I.y.head,f=I.x.tail+r,h=I.y.tail+n,m=I.x.text+r,b=I.y.text+n,w=a.rotationXYMatrix(O,m,b),_=a.apply2DTransform(w),T=a.apply2DTransform2(w),E=+B.attr("width"),L=+B.attr("height"),j=m-.5*E,z=j+E,N=b-.5*L,F=N+L,Z=[[j,N,j,F],[j,F,z,F],[z,F,z,N],[z,N,j,N]].map(T);if(!Z.reduce((function(e,t){return e^!!a.segmentsIntersect(l,d,l+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){Z.forEach((function(e){var t=a.segmentsIntersect(f,h,l,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,h=t.y)}));var U=t.arrowwidth,V=t.arrowcolor,H=t.arrowside,W=P.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),G=W.append("path").attr("d","M"+f+","+h+"L"+l+","+d).style("stroke-width",U+"px").call(c.stroke,c.rgb(V));if(g(G,H,t),S.annotationPosition&&G.node().parentNode&&!o){var q=l,Y=d;if(t.standoff){var X=Math.sqrt(Math.pow(l-f,2)+Math.pow(d-h,2));q+=t.standoff*(f-l)/X,Y+=t.standoff*(h-d)/X}var K,$,J=W.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-q)+","+(h-Y),transform:s(q,Y)}).style("stroke-width",U+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=u.getTranslate(D);K=e.x,$=e.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=_(K,$),i=n[0]+e,o=n[1]+r;D.call(u.setTranslate,i,o),C("x",y(v,e,"x",k,t)),C("y",y(x,r,"y",k,t)),t.axref===t.xref&&C("ax",y(v,e,"ax",k,t)),t.ayref===t.yref&&C("ay",y(x,r,"ay",k,t)),W.attr("transform",s(e,r)),R.attr({transform:"rotate("+O+","+i+","+o+")"})},doneFn:function(){i.call("_guiRelayout",e,A());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&Te(0,0),L)p.init({element:D.node(),gd:e,prepFn:function(){Se=R.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?C("ax",y(v,e,"ax",k,t)):C("ax",t.ax+e),t.ayref===t.yref?C("ay",y(x,r,"ay",k.w,t)):C("ay",t.ay+r),Te(e,r);else{if(o)return;var i,a;if(v)i=y(v,e,"x",k,t);else{var l=t._xsize/k.w,c=t.x+(t._xshift-t.xshift)/k.w-l/2;i=p.align(c+e/k.w,l,0,1,t.xanchor)}if(x)a=y(x,r,"y",k,t);else{var u=t._ysize/k.h,d=t.y-(t._yshift+t.yshift)/k.h-u/2;a=p.align(d-r/k.h,u,0,1,t.yanchor)}C("x",i),C("y",a),v&&x||(n=p.getCursor(v?.5:i,x?.5:a,t.xanchor,t.yanchor))}R.attr({transform:s(e,r)+Se}),h(D,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){h(D),i.call("_guiRelayout",e,A());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(45600),a=r(53787),s=a.strScale,l=a.strRotate,c=a.strTranslate;e.exports=function(e,t,r){var a,u,d,f,h=e.node(),p=o[r.arrowhead||0],m=o[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),y=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=p.backoff*g+r.standoff,w=m.backoff*v+r.startstandoff;if("line"===h.nodeName){a={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var _=a.x-u.x,k=a.y-u.y;if(f=(d=Math.atan2(k,_))+Math.PI,b&&w&&b+w>Math.sqrt(_*_+k*k))return void L();if(b){if(b*b>_*_+k*k)return void L();var S=b*Math.cos(d),T=b*Math.sin(d);u.x+=S,u.y+=T,e.attr({x2:u.x,y2:u.y})}if(w){if(w*w>_*_+k*k)return void L();var M=w*Math.cos(d),C=w*Math.sin(d);a.x-=M,a.y-=C,e.attr({x1:a.x,y1:a.y})}}else if("path"===h.nodeName){var A=h.getTotalLength(),E="";if(A{"use strict";var n=r(48293),i=r(94132);e.exports={moduleType:"component",name:"annotations",layoutAttributes:r(63858),supplyLayoutDefaults:r(39480),includeBasePlot:r(49861)("annotations"),calcAutorange:r(60275),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(70028)}},41541:(e,t,r)=>{"use strict";var n=r(63858),i=r(18693).overrideAll,o=r(99862).templatedArray;e.exports=i(o("annotation",{visible:n.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},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")},26631:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605);function o(e,t){var r=t.fullSceneLayout.domain,o=t.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,a),i.setConvert(e._xa),e._xa._offset=o.l+r.x[0]*o.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*o.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,a),i.setConvert(e._ya),e._ya._offset=o.t+(1-r.y[1])*o.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*o.h*(r.y[1]-r.y[0])}}e.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(6228),s=r(41541);function l(e,t,r,o){function l(r,i){return n.coerce(e,t,s,r,i)}function c(e){var n=e+"axis",o={_fullLayout:{}};return o._fullLayout[n]=r[n],i.coercePosition(t,o,l,e,e,.5)}l("visible")&&(a(e,t,o.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(e,t,["ax","ay"])))}e.exports=function(e,t,r){o(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},3920:(e,t,r)=>{"use strict";var n=r(48293).drawRaw,i=r(40564),o=["x","y","z"];e.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,a=t.annotations,s=0;s1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*r[0],t.yaxis.r2l(l.y)*r[1],t.zaxis.r2l(l.z)*r[2]]),n(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},29162:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(41541)}}},layoutAttributes:r(41541),handleDefaults:r(59786),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var o=r.attrRegex,a=Object.keys(e),s=0;s{"use strict";e.exports=r(53114),r(74121),r(7611),r(87646),r(60563),r(78605),r(13752),r(52986),r(42616),r(57850),r(81509),r(13339),r(72612),r(27993),r(33505),r(78982)},70375:(e,t,r)=>{"use strict";var n=r(32242),i=r(53787),o=r(24956),a=o.EPOCHJD,s=o.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,r,n){var o={};return o[r]=l,i.coerce(e,t,o,r,n)},u="##",d={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:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};var f={};function h(e){var t=f[e];return t||(t=f[e]=n.instance(e))}function p(e){return i.extendFlat({},l,{description:e})}function m(e){return"Sets the calendar system to use with `"+e+"` date data."}var g={xcalendar:p(m("x"))},v=i.extendFlat({},g,{ycalendar:p(m("y"))}),y=i.extendFlat({},v,{zcalendar:p(m("z"))}),x=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));e.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:g,candlestick:g},layout:{calendar:p(["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:p(["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:p(["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:c,handleTraceDefaults:function(e,t,r,n){for(var i=0;i{"use strict";t.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.defaultLine="#444",t.lightLine="#eee",t.background="#fff",t.borderLine="#BEC8D9",t.lightFraction=1e3/11},66235:(e,t,r)=>{"use strict";var n=r(25378),i=r(51908),o=r(50146).isTypedArray,a=e.exports={},s=r(18022);a.defaults=s.defaults;var l=a.defaultLine=s.defaultLine;a.lightLine=s.lightLine;var c=a.background=s.background;function u(e){if(i(e)||"string"!==typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),o="a"===t.charAt(3)&&4===n.length;if(!o&&3!==n.length)return e;for(var a=0;a=0))return e;if(3===a)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return o?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},a.rgb=function(e){return a.tinyRGB(n(e))},a.opacity=function(e){return e?n(e).getAlpha():0},a.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},a.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var i=n(t||c).toRgb(),o=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},a={r:o.r*(1-r.a)+r.r*r.a,g:o.g*(1-r.a)+r.g*r.a,b:o.b*(1-r.a)+r.b*r.a};return n(a).toRgbString()},a.contrast=function(e,t,r){var i=n(e);return 1!==i.getAlpha()&&(i=n(a.combine(e,c))),(i.isDark()?t?i.lighten(t):c:r?i.darken(r):l).toString()},a.stroke=function(e,t){var r=n(t);e.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(e,t){var r=n(t);e.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(e){if(e&&"object"===typeof e){var t,r,n,i,s=Object.keys(e);for(t=0;t{"use strict";var n=r(45446),i=r(92948),o=r(10191).extendFlat,a=r(18693).overrideAll;e.exports=a({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:o({},n.ticks,{dflt:""}),ticklabeloverflow:o({},n.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({description:"Sets the color bar's tick label font"}),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",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:i({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:i({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root")},34529:e=>{"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"}}},68528:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(96592),a=r(64698),s=r(46139),l=r(33095),c=r(9354);e.exports=function(e,t,r){var u=i.newContainer(t,"colorbar"),d=e.colorbar||{};function f(e,t){return n.coerce(d,u,c,e,t)}var h=r.margin||{t:0,b:0,l:0,r:0},p=r.width-h.l-h.r,m=r.height-h.t-h.b,g="v"===f("orientation"),v=f("thicknessmode");f("thickness","fraction"===v?30/(g?p:m):30);var y=f("lenmode");f("len","fraction"===y?1:g?m:p);var x,b,w,_="paper"===f("yref"),k="paper"===f("xref"),S="left";g?(w="middle",S=k?"left":"right",x=k?1.02:1,b=.5):(w=_?"bottom":"top",S="center",x=.5,b=_?1.02:1),n.coerce(d,u,{x:{valType:"number",min:k?-2:0,max:k?3:1,dflt:x}},"x"),n.coerce(d,u,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:b}},"y"),f("xanchor",S),f("xpad"),f("yanchor",w),f("ypad"),n.noneOrAll(d,u,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var T=n.coerce(d,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",-1!==T.indexOf("inside")?"hide past domain":"hide past div"),o(d,u,f,"linear");var M=r.font,C={outerTicks:!1,font:M};-1!==T.indexOf("inside")&&(C.bgColor="black"),l(d,u,f,"linear",C),s(d,u,f,"linear",C),a(d,u,f,"linear",C),f("title.text",r._dfltTitle.colorbar);var A=u.showticklabels?u.tickfont:M,E=n.extendFlat({},A,{color:M.color,size:n.bigFont(A.size)});n.coerceFont(f,"title.font",E),f("title.side",g?"top":"right")}},51130:(e,t,r)=>{"use strict";var n=r(8996),i=r(25378),o=r(44115),a=r(44049),s=r(28605),l=r(63e3),c=r(53787),u=c.strTranslate,d=r(10191).extendFlat,f=r(19602),h=r(50973),p=r(66235),m=r(34906),g=r(98224),v=r(25584).flipScale,y=r(90471),x=r(75486),b=r(45446),w=r(81653),_=w.LINE_SPACING,k=w.FROM_TL,S=w.FROM_BR,T=r(34529).cn;e.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(e){var t,r,n,i,o=e._fullLayout,a=e.calcdata,s=[];function l(e){return d(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"===typeof i.calc?i.calc(e,n,t):(t._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,t._zrange=[r[i.min],r[i.max]])}for(var u=0;u0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=he*c.roundUp(fe/he,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(le.tick0=0)}le.dtick=ue}le.domain=a?[ae+P/N.h,ae+Q-P/N.h]:[ae+O/N.w,ae+Q-O/N.w],le.setScale(),e.attr("transform",u(Math.round(N.l),Math.round(N.t)));var pe,me=e.select("."+T.cbtitleunshift).attr("transform",u(-Math.round(N.l),-Math.round(N.t))),ge=le.ticklabelposition,ve=le.title.font.size,ye=e.select("."+T.cbaxis),xe=0,be=0;function we(n,i){var o={propContainer:le,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:z._dfltTitle.colorbar,containerGroup:e.select("."+T.cbtitle)},a="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+a+",."+a+"-math-group").remove(),m.draw(r,n,d(o,i||{}))}function _e(){var e,t;(a&&ce||!a&&!ce)&&("top"===U&&(e=O+N.l+ee*R,t=P+N.t+te*(1-ae-Q)+3+.75*ve),"bottom"===U&&(e=O+N.l+ee*R,t=P+N.t+te*(1-ae)-3-.25*ve),"right"===U&&(t=P+N.t+te*L+3+.75*ve,e=O+N.l+ee*ae),we(le._id+"title",{attributes:{x:e,y:t,"text-anchor":a?"start":"middle"}}))}function ke(){if(a&&!ce||!a&&ce){var e,i,o=le.position||0,s=le._offset+le._length/2;if("right"===U)i=s,e=N.l+ee*o+10+ve*(le.showticklabels?1:.5);else if(e=s,"bottom"===U&&(i=N.t+te*o+10+(-1===ge.indexOf("inside")?le.tickfont.size:0)+("intside"!==le.ticks&&t.ticklen||0)),"top"===U){var l=Z.text.split("
").length;i=N.t+te*o+10-K-_*ve*l}we((a?"h":"v")+le._id+"title",{avoid:{selection:n.select(r).selectAll("g."+le._id+"tick"),side:U,offsetTop:a?0:N.t,offsetLeft:a?N.l:0,maxShift:a?z.width:z.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function Se(){if(!a&&!ce||a&&ce){var o,l=e.select("."+T.cbtitle),d=l.select("text"),f=[-M/2,M/2],p=l.select(".h"+le._id+"title-math-group").node(),m=15.6;if(d.node()&&(m=parseInt(d.node().style.fontSize,10)*_),p?(o=h.bBox(p),be=o.width,(xe=o.height)>m&&(f[1]-=(xe-m)/2)):d.node()&&!d.classed(T.jsPlaceholder)&&(o=h.bBox(d.node()),be=o.width,xe=o.height),a){if(xe){if(xe+=5,"top"===U)le.domain[1]-=xe/N.h,f[1]*=-1;else{le.domain[0]+=xe/N.h;var v=g.lineCount(d);f[1]+=(1-v)*m}l.attr("transform",u(f[0],f[1])),le.setScale()}}else be&&("right"===U&&(le.domain[0]+=(be+ve/2)/N.w),l.attr("transform",u(f[0],f[1])),le.setScale())}e.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",a?u(0,Math.round(N.h*(1-le.domain[1]))):u(Math.round(N.w*le.domain[0]),0)),ye.attr("transform",a?u(0,Math.round(-N.t)):u(Math.round(-N.l),0));var y=e.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Y);y.enter().append("rect").classed(T.cbfill,!0).attr("style",""),y.exit().remove();var x=V.map(le.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,o){var s=[0===o?V[0]:(Y[o]+Y[o-1])/2,o===Y.length-1?V[1]:(Y[o]+Y[o+1])/2].map(le.c2p).map(Math.round);a&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(a?"x":"y",re).attr(a?"y":"x",n.min(s)).attr(a?"width":"height",Math.max(K,2)).attr(a?"height":"width",Math.max(n.max(s)-n.min(s),2));if(t._fillgradient)h.gradient(l,r,t._id,a?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=W(e).replace("e-","");l.attr("fill",i(u).toHexString())}}));var b=e.select("."+T.cblines).selectAll("path."+T.cbline).data(B.color&&B.width?X:[]);b.enter().append("path").classed(T.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(le.c2p(e))+B.width/2%1;n.select(this).attr("d","M"+(a?t+","+r:r+","+t)+(a?"h":"v")+K).call(h.lineGroupStyle,B.width,H(e),B.dash)})),ye.selectAll("g."+le._id+"tick,path").remove();var w=re+K+(M||0)/2-("outside"===t.ticks?1:0),k=s.calcTicks(le),S=s.getTickSigns(le)[2];return s.drawTicks(r,le,{vals:"inside"===le.ticks?s.clipEnds(le,k):k,layer:ye,path:s.makeTickPath(le,w,S),transFn:s.makeTransTickFn(le)}),s.drawLabels(r,le,{vals:k,layer:ye,transFn:s.makeTransTickLabelFn(le),labelFns:s.makeLabelFns(le,w)})}function Te(){var n,s=K+M/2;-1===ge.indexOf("inside")&&(n=h.bBox(ye.node()),s+=a?n.width:n.height),pe=me.select("text");var c=0,d=a&&"top"===U,m=!a&&"right"===U,g=0;if(pe.node()&&!pe.classed(T.jsPlaceholder)){var y,x=me.select(".h"+le._id+"title-math-group").node();x&&(a&&ce||!a&&!ce)?(c=(n=h.bBox(x)).width,y=n.height):(c=(n=h.bBox(me.node())).right-N.l-(a?re:se),y=n.bottom-N.t-(a?se:re),a||"top"!==U||(s+=n.height,g=n.height)),m&&(pe.attr("transform",u(c/2+ve/2,0)),c*=2),s=Math.max(s,a?c:y)}var b=2*(a?O:P)+s+C+M/2,_=0;!a&&Z.text&&"bottom"===I&&L<=0&&(b+=_=b/2,g+=_),z._hColorbarMoveTitle=_,z._hColorbarMoveCBTitle=g;var F=C+M,B=(a?re:se)-F/2-(a?O:0),V=(a?se:re)-(a?J:P+g-_);e.select("."+T.cbbg).attr("x",B).attr("y",V).attr(a?"width":"height",Math.max(b-_,2)).attr(a?"height":"width",Math.max(J+F,2)).call(p.fill,A).call(p.stroke,t.bordercolor).style("stroke-width",C);var H=m?Math.max(c-10,0):0;e.selectAll("."+T.cboutline).attr("x",(a?re:se+O)+H).attr("y",(a?se+P-J:re)+(d?xe:0)).attr(a?"width":"height",Math.max(K,2)).attr(a?"height":"width",Math.max(J-(a?2*P+xe:2*O+H),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var W=a?ne*b:0,G=a?0:(1-ie)*b-g;if(W=D?N.l-W:-W,G=j?N.t-G:-G,e.attr("transform",u(W,G)),!a&&(C||i(A).getAlpha()&&!i.equals(z.paper_bgcolor,A))){var q=ye.selectAll("text"),Y=q[0].length,X=e.select("."+T.cbbg).node(),$=h.bBox(X),Q=h.getTranslate(e),ee=2;q.each((function(e,t){var r=0,n=Y-1;if(t===r||t===n){var i,o=h.bBox(this),a=h.getTranslate(this);if(t===n){var s=o.right+a.x;(i=$.right+Q.x+se-C-ee+R-s)>0&&(i=0)}else if(t===r){var l=o.left+a.x;(i=$.left+Q.x+se+C+ee-l)<0&&(i=0)}i&&(Y<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var te={},oe=k[E],ae=S[E],ue=k[I],de=S[I],fe=b-K;a?("pixels"===f?(te.y=L,te.t=J*ue,te.b=J*de):(te.t=te.b=0,te.yt=L+l*ue,te.yb=L-l*de),"pixels"===w?(te.x=R,te.l=b*oe,te.r=b*ae):(te.l=fe*oe,te.r=fe*ae,te.xl=R-v*oe,te.xr=R+v*ae)):("pixels"===f?(te.x=R,te.l=J*oe,te.r=J*ae):(te.l=te.r=0,te.xl=R+l*oe,te.xr=R-l*ae),"pixels"===w?(te.y=1-L,te.t=b*ue,te.b=b*de):(te.t=fe*ue,te.b=fe*de,te.yt=L-v*ue,te.yb=L+v*de));var he=t.y<.5?"b":"t",be=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var we={r:z.width-B-W,l:B+te.r,b:z.height-V-G,t:V+te.b};D&&j?o.autoMargin(r,t._id,te):D?r._fullLayout._reservedMargin[t._id][he]=we[he]:j||a?r._fullLayout._reservedMargin[t._id][be]=we[be]:r._fullLayout._reservedMargin[t._id][he]=we[he]}return c.syncOrAsync([o.previousPromises,_e,Se,ke,o.previousPromises,Te],r)}(r,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,i,o,s="v"===t.orientation,c=r._fullLayout,d=c._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),f(e)},moveFn:function(r,a){e.attr("transform",n+u(r,a)),i=l.align((s?t._uFrac:t._vFrac)+r/d.w,s?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=l.align((s?t._vFrac:1-t._uFrac)-a/d.h,s?t._lenFrac:t._thickFrac,0,1,t.yanchor);var c=l.getCursor(i,o,t.xanchor,t.yanchor);f(e,c)},doneFn:function(){if(f(e),void 0!==i&&void 0!==o){var n={};n[t._propPrefix+"x"]=i,n[t._propPrefix+"y"]=o,void 0!==t._traceIndex?a.call("_guiRestyle",r,n,t._traceIndex):a.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){o.autoMargin(e,t._id)})).remove(),t.order()}}},52650:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e){return n.isPlainObject(e.colorbar)}},27632:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(9354),supplyDefaults:r(68528),draw:r(51130).draw,hasColorbar:r(52650)}},8753:(e,t,r)=>{"use strict";var n=r(9354),i=r(64563).counter,o=r(99238),a=r(88401).scales,s=o(a);function l(e){return"`"+e+"`"}e.exports=function(e,t){e=e||"";var r,o,c=(t=t||{}).cLetter||"c",u="onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),d="noScale"in t?t.noScale:"marker.line"===e,f="showScaleDflt"in t?t.showScaleDflt:"z"===c,h="string"===typeof t.colorscaleDflt?a[t.colorscaleDflt]:null,p=t.editTypeOverride||"",m=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,o=t.colorAttr):o="in "+l(m+(r={z:"z",c:"color"}[c]));var g=u?" Has an effect only if "+o+" is set to a numerical array.":"",v=c+"auto",y=c+"min",x=c+"max",b=c+"mid",w=l(m+v),_=l(m+y),k=l(m+x),S=_+" and "+k,T={};T[y]=T[x]=void 0;var M={};M[v]=!1;var C={};return"color"===r&&(C.color={valType:"color",arrayOk:!0,editType:p||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",S,"if set."].join(" ")},t.anim&&(C.color.anim=!0)),C[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+o+") or the bounds set in",S+g,"Defaults to `false` when",S,"are set by the user."].join(" ")},C[y]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the lower bound of the color domain."+g,"Value should have the same units as",o,"and if set,",k,"must be set as well."].join(" ")},C[x]={valType:"number",dflt:null,editType:p||"plot",impliedEdits:M,description:["Sets the upper bound of the color domain."+g,"Value should have the same units as",o,"and if set,",_,"must be set as well."].join(" ")},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:T,description:["Sets the mid-point of the color domain by scaling",_,"and/or",k,"to be equidistant to this point."+g,"Value should have the same units as",o+".","Has no effect when",w,"is `false`."].join(" ")},C.colorscale={valType:"colorscale",editType:"calc",dflt:h,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+g,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",S+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+s+"."].join(" ")},C.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",l(m+"colorscale")+"."+g,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},C.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+g,"If true,",_,"will correspond to the last color","in the array and",k,"will correspond to the first color."].join(" ")},d||(C.showscale={valType:"boolean",dflt:f,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+g].join(" ")},C.colorbar=n),t.noColorAxis||(C.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),C}},1631:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(25584).extractOpts;e.exports=function(e,t,r){var a,s=e._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(t,c).get():t,d=o(u),f=!1!==d.auto,h=d.min,p=d.max,m=d.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===h?h=g():f&&(h=u._colorAx&&n(h)?Math.min(h,g()):g()),void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),f&&void 0!==m&&(p-m>m-h?h=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,d._sync("colorscale",a))}},20525:(e,t,r)=>{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(25584).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function a(e,i){var a=i.container?n.nestedProperty(e,i.container).get():e;if(a)if(a.coloraxis)a._colorAx=t[a.coloraxis];else{var s=o(a),l=s.auto;(l||void 0===s.min)&&r(a,i.min),(l||void 0===s.max)&&r(a,i.max),s.autocolorscale&&r(a,"colorscale")}}for(var s=0;s{"use strict";var n=r(51908),i=r(53787),o=r(52650),a=r(68528),s=r(88401).isValid,l=r(44049).traceIs;function c(e,t){var r=t.slice(0,t.length-1);return t?i.nestedProperty(e,r).get()||{}:e}e.exports=function e(t,r,u,d,f){var h=f.prefix,p=f.cLetter,m="_module"in r,g=c(t,h),v=c(r,h),y=c(r._template||{},h)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,d,f)};if(m){var b=u._colorAxes||{},w=d(h+"coloraxis");if(w){var _=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",k=b[w];return void(k?(k[2].push(x),k[0]!==_&&(k[0]=!1,i.warn(["Ignoring coloraxis:",w,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[w]=[_,r,[x]])}}var S=g[p+"min"],T=g[p+"max"],M=n(S)&&n(T)&&S{"use strict";var n=r(8996),i=r(25378),o=r(51908),a=r(53787),s=r(66235),l=r(88401).isValid;var c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function d(e){var t,r,n,i=e._colorAx,o=i||e,a={};for(r=0;r=0;n--,i++){var o=e[n];r[i]=[1-o[0],o[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,a=e.range,l=a.length,c=new Array(l),u=0;u{"use strict";var n=r(88401),i=r(25584);e.exports={moduleType:"component",name:"colorscale",attributes:r(8753),layoutAttributes:r(49962),supplyLayoutDefaults:r(22955),handleDefaults:r(5876),crossTraceDefaults:r(20525),calc:r(1631),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}},49962:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(8753),o=r(88401).scales,a="Note that `autocolorscale` must be true for this attribute to work.";e.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:o.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",a].join(" ")},sequentialminus:{valType:"colorscale",dflt:o.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",a].join(" ")},diverging:{valType:"colorscale",dflt:o.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",a].join(" ")}},coloraxis:n({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},22955:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(49962),a=r(5876);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,o,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=t._colorAxes;function u(e,t){return n.coerce(s,l,o.coloraxis,e,t)}for(var d in c){var f=c[d];if(f[0])s=e[d]||{},(l=i.newContainer(t,d,"coloraxis"))._name=d,a(s,l,t,u,{prefix:"",cLetter:"c"});else{for(var h=0;h{"use strict";var n=r(25378),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)"]]},o=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!==+e[0][0]||1!==+e[e.length-1][0])return!1;for(var r=0;r{"use strict";e.exports=function(e,t,r,n,i){var o=(e-r)/(n-r),a=o+t/(n-r),s=(o+a)/2;return"left"===i||"bottom"===i?o:"center"===i||"middle"===i?s:"right"===i||"top"===i?a:o<2/3-s?o:a>4/3-s?a:s}},48753:(e,t,r)=>{"use strict";var n=r(53787),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,o){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===o?0:"middle"===o?1:"top"===o?2:n.constrain(Math.floor(3*t),0,2),i[t][e]}},57873:(e,t)=>{"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},63e3:(e,t,r)=>{"use strict";var n=r(49175),i=r(62206),o=r(32954),a=r(53787).removeElement,s=r(99727),l=e.exports={};l.align=r(24788),l.getCursor=r(48753);var c=r(8603);function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(e){var t,r,n,c,f,h,p,m,g=e.gd,v=1,y=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=w,o?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=w,x.addEventListener("touchstart",w,{passive:!1})):x.ontouchstart=w;var b=e.clampFn||function(e,t,r){return Math.abs(e)y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,h),!m){var r;try{r=new MouseEvent("click",t)}catch(o){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},8603:(e,t,r)=>{"use strict";var n=r(24521),i=r(57429),o=r(90489).getGraphDiv,a=r(82133),s=e.exports={};s.wrapped=function(e,t,r){(e=o(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,i=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}},93701:(e,t)=>{"use strict";t.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")},t.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")}},50973:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(51908),s=r(25378),l=r(44049),c=r(66235),u=r(10948),d=i.strTranslate,f=r(98224),h=r(83580),p=r(81653).LINE_SPACING,m=r(26880).DESELECTDIM,g=r(26775),v=r(94244),y=r(87267).appendArrayPointValue,x=e.exports={};function b(e,t,r){var n=t.fillpattern,i=n&&x.getPatternAttr(n.shape,0,"");if(i){var o=x.getPatternAttr(n.bgcolor,0,null),a=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),u=x.getPatternAttr(n.solidity,0,.3),d=t.uid;x.pattern(e,"point",r,d,i,l,u,void 0,n.fillmode,o,a,s)}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.font=function(e,t,r,n){i.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(c.fill,n)},x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,i){e.call(x.setPosition,t,r).call(x.setSize,n,i)},x.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),o=n.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform",d(i,o)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var i=n.select(this);x.translatePoint(e,i,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,i,o){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,o)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each((function(t){var o=t[0].trace,a=o.xcalendar,s=o.ycalendar,c=l.traceIs(o,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,i,a,s)}))}))}},x.crispRound=function(e,t,r){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var o=(((e||[])[0]||{}).trace||{}).line||{},a=r||o.width||0,s=i||o.dash||"";c.stroke(t,n||o.color),x.dashLine(t,s,a)},x.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each((function(e){var o=(((e||[])[0]||{}).trace||{}).line||{},a=t||o.width||0,s=i||o.dash||"";n.select(this).call(c.stroke,r||o.color).call(x.dashLine,s,a)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());b(e,((r.data()[0]||[])[0]||{}).trace||{},t)},x.fillGroupStyle=function(e,t){e.style("stroke-width",0).each((function(e){var r=n.select(this);e[0].trace&&b(r,e[0].trace,t)}))};var w=r(49447);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(w).forEach((function(e){var t=w[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function k(e,t,r,n){var i=e%100;return x.symbolFuncs[i](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(a(e))e=+e;else if("string"===typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=_||e>=400?0:Math.floor(Math.max(e,0))};var S={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},M=o("~f"),C={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:S},horizontalreversed:{node:"linearGradient",attrs:S,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};x.gradient=function(e,t,r,o,a,l){for(var u=a.length,d=C[o],f=new Array(u),h=0;h=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),n.ms2mrc){var u;u="various"===e.ms||"various"===s.size?3:n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var d=x.symbolNumber(e.mx||s.symbol)||0;e.om=d%200>=100;var f=re(e,r),h=W(e,r);t.attr("d",k(d,u,f,h))}var p,m,g,v=!1;if(e.so)g=l.outlierwidth,m=l.outliercolor,p=s.outliercolor;else{var y=(l||{}).width;g=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=n.lineScale(e.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=c.defaultLine,v=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=s.gradient,w=e.mgt;w?v=!0:w=b&&b.type,i.isArrayOrTypedArray(w)&&(w=w[0],C[w]||(w=0));var _=s.pattern,S=_&&x.getPatternAttr(_.shape,e.i,"");if(w&&"none"!==w){var T=e.mgc;T?v=!0:T=b.color;var M=r.uid;v&&(M+="-"+e.i),x.gradient(t,o,M,w,[[0,T],[1,p]],"fill")}else if(S){var A=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,A=!0);var I=x.getPatternAttr(E,e.i,a&&a.color||null),O=x.getPatternAttr(_.bgcolor,e.i,null),P=_.fgopacity,R=x.getPatternAttr(_.size,e.i,8),L=x.getPatternAttr(_.solidity,e.i,.3);A=A||e.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.fgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity);var j=r.uid;A&&(j+="-"+e.i),x.pattern(t,"point",o,j,S,R,L,e.mcc,_.fillmode,O,I,P)}else i.isArrayOrTypedArray(p)?c.fill(t,p[e.i]):c.fill(t,p);g&&c.stroke(t,m)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),l.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?v(e):function(){return(r.size||6)/2}),e.selectedpoints&&i.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},o=e.marker||{},a=r.marker||{},s=n.marker||{},c=o.opacity,u=a.opacity,d=s.opacity,f=void 0!==u,h=void 0!==d;(i.isArrayOrTypedArray(c)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?o.opacity:e.mo;return e.selected?f?u:t:h?d:m*t});var p=o.color,g=a.color,v=s.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:v||t});var y=o.size,x=a.size,b=s.size,w=void 0!==x,_=void 0!==b;return l.traceIs(e,"symbols")&&(w||_)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?w?x/2:t:_?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},o=r.textfont||{},a=n.textfont||{},s=i.color,l=o.color,u=a.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:u||(l?t:c.addOpacity(t,m))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),i=t.marker||{},o=[];r.selectedOpacityFn&&o.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&o.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&o.push((function(e,n){var o=n.mx||i.symbol||0,a=r.selectedSizeFn(n);e.attr("d",k(x.symbolNumber(o),a,re(n,t),W(n,t))),n.mrc2=a})),o.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}x.textPointStyle=function(e,t,r){if(e.size()){var o;if(t.selectedpoints){var a=x.makeSelectedTextStyleFns(t);o=a.selectedTextColorFn}var s=t.texttemplate,l=r._fullLayout;e.each((function(e){var a=n.select(this),c=s?i.extractOption(e,t,"txt","texttemplate"):i.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,d=u?u(e,t,l):{},h={};y(h,t,e.i);var p=t._meta||{};c=i.texttemplateString(c,d,l._d3locale,h,e,p)}var m=e.tp||t.textposition,g=I(e,t),v=o?o(e):e.tc||t.textfont.color;a.call(x.font,e.tf||t.textfont.family,g,v).text(c).call(f.convertToTspans,r).call(E,m,g,e.mrc)}else a.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var i=n.select(this),o=r.selectedTextColorFn(e),a=e.tp||t.textposition,s=I(e,t);c.fill(i,o);var u=l.traceIs(t,"bar-like");E(i,a,s,e.mrc2||e.mrc,u)}))}};var O,P;function R(e,t,r){return r&&(e=F(e)),t?j(e[1]):L(e[0])}function L(e){var t=n.round(e,2);return O=t,t}function j(e){var t=n.round(e,2);return P=t,t}function D(e,t,r,n){var i=e[0]-t[0],o=e[1]-t[1],a=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,d=(c*c*o-l*l*s)*n,f=3*c*(l+c),h=3*l*(l+c);return[[L(t[0]+(f&&u/f)),j(t[1]+(f&&d/f))],[L(t[0]-(h&&u/h)),j(t[1]-(h&&d/h))]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=c||_>=d&&_<=c)&&(k<=f&&k>=u||k>=f&&k<=u)&&(e=[_,k])}return e}x.steps=function(e){var t=z[e]||N;return function(e){for(var r="M"+L(e[0][0])+","+j(e[0][1]),n=e.length,i=1;i=1e4&&(x.savedBBoxes={},B=0),r&&(x.savedBBoxes[r]=g),B++,i.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",U(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||0,r=r||0,o=o.replace(/(\btranslate\(.*?\);?)/,"").trim(),o=(o+=d(t,r)).trim(),e[i]("transform",o),o},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||1,r=r||1,o=o.replace(/(\bscale\(.*?\);?)/,"").trim(),o=(o+="scale("+t+","+r+")").trim(),e[i]("transform",o),o};var V=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(V,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var H=/translate\([^)]*\)\s*$/;function W(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,i=n.select(this),o=i.select("text");if(o.node()){var a=parseFloat(o.attr("x")||0),s=parseFloat(o.attr("y")||0),l=(i.attr("transform")||"").match(H);e=1===t&&1===r?[]:[d(a,s),"scale("+t+","+r+")",d(-a,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},x.getMarkerStandoff=W;var G,q,Y,X,K,$,J=Math.atan2,Q=Math.cos,ee=Math.sin;function te(e,t){var r=t[0],n=t[1];return[r*Q(e)-n*ee(e),r*ee(e)+n*Q(e)]}function re(e,t){var r,n,i=e.ma;void 0===i&&(i=t.marker.angle||0);var o=t.marker.angleref;if("previous"===o||"north"===o){if(t._geo){var s=t._geo.project(e.lonlat);r=s[0],n=s[1]}else{var l=t._xA,c=t._yA;if(!l||!c)return 90;r=l.c2p(e.x),n=c.c2p(e.y)}if(t._geo){var u,d=e.lonlat[0],f=e.lonlat[1],h=t._geo.project([d,f+1e-5]),p=t._geo.project([d+1e-5,f]),m=J(p[1]-n,p[0]-r),g=J(h[1]-n,h[0]-r);if("north"===o)u=i/180*Math.PI;else if("previous"===o){var v=d/180*Math.PI,y=f/180*Math.PI,x=G/180*Math.PI,b=q/180*Math.PI,w=x-v,_=Q(b)*ee(w),k=ee(b)*Q(y)-Q(b)*ee(y)*Q(w);u=-J(_,k)-Math.PI,G=d,q=f}var S=te(m,[Q(u),0]),T=te(g,[ee(u),0]);i=J(S[1]+T[1],S[0]+T[0])/Math.PI*180,"previous"!==o||$===t.uid&&e.i===K+1||(i=null)}if("previous"===o&&!t._geo)if($===t.uid&&e.i===K+1&&a(r)&&a(n)){var M=r-Y,C=n-X,A=t.line&&t.line.shape||"",E=A.slice(A.length-1);"h"===E&&(C=0),"v"===E&&(M=0),i+=J(C,M)/Math.PI*180+90}else i=null}return Y=r,X=n,K=e.i,$=t.uid,i}x.getMarkerAngle=re},49447:(e,t,r)=>{"use strict";var n,i,o,a,s=r(76170),l=r(8996).round,c="M0,0Z",u=Math.sqrt(2),d=Math.sqrt(3),f=Math.PI,h=Math.cos,p=Math.sin;function m(e){return null===e}function g(e,t,r){if((!e||e%360===0)&&!t)return r;if(o===e&&a===t&&n===r)return i;function l(e,r){var n=h(e),i=p(e),o=r[0],a=r[1]+(t||0);return[o*n-a*i,o*i+a*n]}o=e,a=t,n=r;for(var c=e/180*f,u=0,d=0,m=s(r),g="",v=0;v{"use strict";e.exports={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},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",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}}},72304:(e,t,r)=>{"use strict";var n=r(51908),i=r(44049),o=r(28605),a=r(53787),s=r(38943);function l(e,t,r,i){var l=t["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),d=0;d{"use strict";function t(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}e.exports=function(e){var r=e.type,n=e.symmetric;if("data"===r){var i=e.array||[];if(n)return function(e,t){var r=+i[t];return[r,r]};var o=e.arrayminus||[];return function(e,t){var r=+i[t],n=+o[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var a=t(r,e.value),s=t(r,e.valueminus);return n||void 0===e.valueminus?function(e){var t=a(e);return[t,t]}:function(e){return[s(e),a(e)]}}},70449:(e,t,r)=>{"use strict";var n=r(51908),i=r(44049),o=r(53787),a=r(99862),s=r(48672);e.exports=function(e,t,r,l){var c="error_"+l.axis,u=a.newContainer(t,c),d=e[c]||{};function f(e,t){return o.coerce(d,u,s,e,t)}if(!1!==f("visible",void 0!==d.array||void 0!==d.value||"sqrt"===d.type)){var h=f("type","array"in d?"data":"percent"),p=!0;"sqrt"!==h&&(p=f("symmetric",!(("data"===h?"arrayminus":"valueminus")in d))),"data"===h?(f("array"),f("traceref"),p||(f("arrayminus"),f("tracerefminus"))):"percent"!==h&&"constant"!==h||(f("value"),p||f("valueminus"));var m="copy_"+l.inherit+"style";if(l.inherit)(t["error_"+l.inherit]||{}).visible&&f(m,!(d.color||n(d.thickness)||n(d.width)));l.inherit&&u[m]||(f("color",r),f("thickness"),f("width",i.traceIs(t,"gl3d")?0:4))}}},71664:(e,t,r)=>{"use strict";var n=r(53787),i=r(18693).overrideAll,o=r(48672),a={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var s={error_x:n.extendFlat({},o),error_y:n.extendFlat({},o),error_z:n.extendFlat({},o)};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:a,bar:a,histogram:a,scatter3d:i(s,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:r(70449),calc:r(72304),makeComputeError:r(38943),plot:r(93305),style:r(72209),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys));(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}},93305:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(50973),a=r(26775);e.exports=function(e,t,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,d=e._context.staticPlot;t.each((function(t){var f,h=t[0].trace,p=h.error_x||{},m=h.error_y||{};h.ids&&(f=function(e){return e.id});var g=a.hasMarkers(h)&&h.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var v=n.select(this).selectAll("g.errorbar").data(t,f);if(v.exit().remove(),t.length){p.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var y=v.enter().append("g").classed("errorbar",!0);u&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(v,r.layerClipId,e),v.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0)));void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),i(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0)));return n}(e,l,c);if(!g||e.vis){var o,a=t.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=m.width;o="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(o+="m-"+f+",0h"+2*f),!a.size()?a=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):u&&(a=a.transition().duration(s.duration).ease(s.easing)),a.attr("d",o)}else a.remove();var h=t.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(p.copy_ystyle?m:p).width;o="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(o+="m0,-"+v+"v"+2*v),!h.size()?h=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr("d",o)}else h.remove()}}))}}))}},72209:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},o=t.error_x||{},a=n.select(this);a.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),o.copy_ystyle&&(o=r),a.selectAll("path.xerror").style("stroke-width",o.thickness+"px").call(i.stroke,o.color)}))}},54289:(e,t,r)=>{"use strict";var n=r(92948),i=r(18971).hoverlabel,o=r(10191).extendFlat;e.exports={hoverlabel:{bgcolor:o({},i.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:o({},i.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:n({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:o({},i.align,{arrayOk:!0}),namelength:o({},i.namelength,{arrayOk:!0}),editType:"none"}}},35310:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049);function o(e,t,r,i){i=i||n.identity,Array.isArray(e)&&(t[0][r]=i(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function a(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var s=0;s{"use strict";var n=r(44049),i=r(6535).hover;e.exports=function(e,t,r){var o=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function a(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&i(e,t,r,!0),e._hoverdata&&t&&t.target&&(o&&o.then?o.then(a):a(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},82133:e=>{"use strict";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},44173:(e,t,r)=>{"use strict";var n=r(53787),i=r(54289),o=r(70439);e.exports=function(e,t,r,a){var s=n.extendFlat({},a.hoverlabel);t.hovertemplate&&(s.namelength=-1),o(e,t,(function(r,o){return n.coerce(e,t,i,r,o)}),s)}},87267:(e,t,r)=>{"use strict";var n=r(53787);t.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},t.isTraceInSubplots=function(e,r){if("splom"===e.type){for(var n=e.xaxes||[],i=e.yaxes||[],o=0;o=0&&r.index{"use strict";var n=r(8996),i=r(51908),o=r(25378),a=r(53787),s=a.strTranslate,l=a.strRotate,c=r(24521),u=r(98224),d=r(45834),f=r(50973),h=r(66235),p=r(63e3),m=r(28605),g=r(44049),v=r(87267),y=r(82133),x=r(24397),b=r(36834),w=y.YANGLE,_=Math.PI*w/180,k=1/Math.sin(_),S=Math.cos(_),T=Math.sin(_),M=y.HOVERARROWSIZE,C=y.HOVERTEXTPAD,A={box:!0,ohlc:!0,violin:!0,candlestick:!0},E={scatter:!0,scattergl:!0,splom:!0};function I(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}t.hover=function(e,t,r,o){e=a.getGraphDiv(e);var s=t.target;a.throttle(e._fullLayout._uid+y.HOVERID,y.HOVERMINTIME,(function(){!function(e,t,r,o,s){r||(r="xy");var l=Array.isArray(r)?r:[r],u=e._fullLayout,f=u._plots||[],m=f[r],y=u._has("cartesian");if(m){var x=m.overlays.map((function(e){return e.id}));l=l.concat(x)}for(var b=l.length,w=new Array(b),_=new Array(b),S=!1,T=0;Tw[0]._length||le<0||le>_[0]._length)return p.unhoverRaw(e,t)}if(t.pointerX=se+w[0]._offset,t.pointerY=le+_[0]._offset,H="xval"in t?v.flat(l,t.xval):v.p2c(w,se),W="yval"in t?v.flat(l,t.yval):v.p2c(_,le),!i(H[0])||!i(W[0]))return a.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var de=1/0;function fe(e,r){for(q=0;qre&&(ne.splice(0,re),de=ne[0].distance),y&&0!==V&&0===ne.length){te.distance=V,te.index=!1;var d=X._module.hoverPoints(te,Q,ee,"closest",{hoverLayer:u._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=V}))),d&&d.length){var f,p=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var m=p[0];i(m.x0)&&i(m.y0)&&(f=pe(m),(!oe.vLinePoint||oe.vLinePoint.spikeDistance>f.spikeDistance)&&(oe.vLinePoint=f))}var g=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(f=pe(x),(!oe.hLinePoint||oe.hLinePoint.spikeDistance>f.spikeDistance)&&(oe.hLinePoint=f))}}}}}function he(e,t,r){for(var n,i=null,o=1/0,a=0;a0&&Math.abs(e.distance)Te-1;Me--)Ie(ne[Me]);ne=Ce,ye()}var Oe=e._hoverdata,Pe=[],Re=Z(e),Le=U(e);for(G=0;G1||ne.length>1)||"closest"===R&&ae&&ne.length>1,qe=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),Ye=P(ne,{gd:e,hovermode:R,rotateLabels:Ge,bgColor:qe,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance}),Xe=Ye.hoverLabels;v.isUnifiedHover(R)||(!function(e,t,r,n){var i,o,a,s,l,c,u,d=t?"xa":"ya",f=t?"ya":"xa",h=0,p=1,m=e.size(),g=new Array(m),v=0,y=n.minX,x=n.maxX,b=n.minY,w=n.maxY,_=function(e){return e*r._invScaleX},S=function(e){return e*r._invScaleY};function T(e){var t=e[0],r=e[e.length-1];if(o=t.pmin-t.pos-t.dp+t.size,a=r.pos+r.dp+r.size-t.pmax,o>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=o;i=!1}if(!(a<.01)){if(o<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=a;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=a;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}e.each((function(e){var n=e[d],i=e[f],o="x"===n._id.charAt(0),a=n.range;0===v&&a&&a[0]>a[1]!==o&&(p=-1);var s=0,l=o?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=L(e,t),m=e.anchor,T="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(o?S(h.y-e.by/2):_(e.bx/2+e.tx2width/2)))+(o?S(e.by):_(e.bx));else if(o)u=(c=e.crossPos+S(M+h.y)-S(e.by/2-M))+S(e.by);else{var C=_(T*M+h.x),A=C+_(T*e.bx);c=e.crossPos+Math.min(C,A),u=e.crossPos+Math.max(C,A)}o?void 0!==b&&void 0!==w&&Math.min(u,w)-Math.max(c,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(u,x)-Math.max(c,y)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[v++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(o?k:1)/2,pmin:s,pmax:l}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));for(;!i&&h<=m;){for(h++,i=!0,s=0;s.01&&E.pmin===I.pmin&&E.pmax===I.pmax){for(l=A.length-1;l>=0;l--)A[l].dp+=o;for(C.push.apply(C,A),g.splice(s+1,1),u=0,l=C.length-1;l>=0;l--)u+=C[l].dp;for(a=u/C.length,l=C.length-1;l>=0;l--)C[l].dp-=a;i=!1}else s++}g.forEach(T)}for(s=g.length-1;s>=0;s--){var O=g[s];for(l=O.length-1;l>=0;l--){var P=O[l],R=P.datum;R.offset=P.dp,R.del=P.del}}}(Xe,Ge,u,Ye.commonLabelBoundingBox),j(Xe,Ge,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Ke=g.getComponentMethod("annotations","hasClickToShow")(e,Pe);d(n.select(s),Ke?"pointer":"")}if(!s||o||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],o=e._hoverdata[n];if(i.curveNumber!==o.curveNumber||String(i.pointNumber)!==String(o.pointNumber)||String(i.pointNumbers)!==String(o.pointNumbers))return!0}return!1}(e,0,Oe))return;Oe&&e.emit("plotly_unhover",{event:t,points:Oe});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:w,yaxes:_,xvals:H,yvals:W})}(e,t,r,o,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var i=t.gd,o=Z(i),a=U(i),s=P(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),d=Math.max(r,n),f=Math.min(s,l),p=Math.max(s,l),m=e.trace;if(g.traceIs(m,"gl3d")){var v=i._fullLayout[m.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,d+=y,f+=x,p+=x}c.bbox={x0:u+a,x1:d+a,y0:f+o,y1:p+o},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:false,bgColor:t.bgColor||h.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,l=0,c=0;return s.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function P(e,t){var r=t.gd,i=r._fullLayout,o=t.hovermode,c=t.rotateLabels,d=t.bgColor,p=t.container,m=t.outerContainer,_=t.commonLabelOpts||{};if(0===e.length)return[[]];var k=t.fontFamily||y.HOVERFONT,S=t.fontSize||y.HOVERFONTSIZE,T=e[0],A=T.xa,E=T.ya,O=o.charAt(0),P=O+"Label",L=T[P];if(void 0===L&&"multicategory"===A.type)for(var j=0;ji.width-b?(g=i.width-b,t.attr("d","M"+(b-M)+",0L"+b+","+x+M+"v"+x+(2*C+y.height)+"H-"+b+"V"+x+M+"H"+(b-2*M)+"Z")):t.attr("d","M0,0L"+M+","+x+M+"H"+b+"v"+x+(2*C+y.height)+"H-"+b+"V"+x+M+"H-"+M+"Z"),q.minX=g-b,q.maxX=g+b,"top"===A.side?(q.minY=v-(2*C+y.height),q.maxY=v-C):(q.minY=v+C,q.maxY=v+(2*C+y.height))}else{var w,I,O;"right"===E.side?(w="start",I=1,O="",g=A._offset+A._length):(w="end",I=-1,O="-",g=A._offset),v=E._offset+(T.y0+T.y1)/2,l.attr("text-anchor",w),t.attr("d","M0,0L"+O+M+","+M+"V"+(C+y.height/2)+"h"+O+(2*C+y.width)+"V-"+(C+y.height/2)+"H"+O+M+"V-"+M+"Z"),q.minY=v-(C+y.height/2),q.maxY=v+(C+y.height/2),"right"===E.side?(q.minX=g+M,q.maxX=g+M+(2*C+y.width)):(q.minX=g-M-(2*C+y.width),q.maxX=g-M);var P,R=y.height/2,j=z-y.top-R,D="clip"+i._uid+"commonlabel"+E._id;if(g=0?le:ce+fe=0?ce:be+fe=0?ae:se+he=0?se:we+he=0,"top"!==e.idealAlign&&W||!G?W?(P+=D/2,e.anchor="start"):e.anchor="middle":(P-=D/2,e.anchor="end"),e.crossPos=P;else{if(e.pos=P,W=O+j/2+q<=N,G=O-j/2-q>=0,"left"!==e.idealAlign&&W||!G)if(W)O+=j/2,e.anchor="start";else{e.anchor="middle";var Y=q/2,X=O+Y-N,K=O-Y;X>0&&(O-=X),K<0&&(O+=-K)}else O-=j/2,e.anchor="end";e.crossPos=O}_.attr("text-anchor",e.anchor),A&&T.attr("text-anchor",e.anchor),t.attr("transform",s(O,P)+(c?l(w):""))})),{hoverLabels:_e,commonLabelBoundingBox:q}}function R(e,t,r,n,i,o){var s="",l="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=a.templateString(e.name,e.trace._meta)),s=F(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(l+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(l+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(l+=(l?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===i?l=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(l=e.yLabel):l=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(l+=(l?"
":"")+e.text),void 0!==e.extraText&&(l+=(l?"
":"")+e.extraText),o&&""===l&&!e.hovertemplate&&(""===s&&o.remove(),l=s);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[c+"Label"]!==i&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),l=(l=a.hovertemplateString(d,f,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(O,(function(t,r){return s=F(r,e.nameLength),""}))}return[l,s]}function L(e,t){var r=0,n=e.offset;return t&&(n*=-T,r=e.offset*S),{x:r,y:n}}function j(e,t,r,i){var o=function(e){return e*r},a=function(e){return e*i};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var i=r.select("text.nums"),s=e.anchor,l="end"===s?-1:1,c=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(M+C),n=r+t*(e.txwidth+C);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+C),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),d=L(e,t),h=d.x,p=d.y,m="middle"===s;r.select("path").attr("d",m?"M-"+o(e.bx/2+e.tx2width/2)+","+a(p-e.by/2)+"h"+o(e.bx)+"v"+a(e.by)+"h-"+o(e.bx)+"Z":"M0,0L"+o(l*M+h)+","+a(M+p)+"v"+a(e.by/2-M)+"h"+o(l*e.bx)+"v-"+a(e.by)+"H"+o(l*M+h)+"V"+a(p-M)+"Z");var g=h+c.textShiftX,v=p+e.ty0-e.by/2+C,y=e.textAlign||"auto";"auto"!==y&&("left"===y&&"start"!==s?(i.attr("text-anchor","start"),g=m?-e.bx/2-e.tx2width/2+C:-e.bx-C):"right"===y&&"end"!==s&&(i.attr("text-anchor","end"),g=m?e.bx/2-e.tx2width/2-C:e.bx+C)),i.call(u.positionText,o(g),a(v)),e.tx2width&&(r.select("text.name").call(u.positionText,o(c.text2ShiftX+c.alignShift*C+h),a(p+e.ty0-e.by/2+C)),r.select("rect").call(f.setRect,o(c.text2ShiftX+(c.alignShift-1)*e.tx2width/2+h),a(p-e.by/2-1),o(e.tx2width),a(e.by+2)))}))}function D(e,t){var r=e.index,n=e.trace||{},o=e.cd[0],s=e.cd[r]||{};function l(e){return e||i(e)&&0===e}var c=Array.isArray(r)?function(e,t){var i=a.castOption(o,r,e);return l(i)?i:a.extractOption({},n,"",t)}:function(e,t){return a.extractOption(s,n,e,t)};function u(t,r,n){var i=c(r,n);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=a.constrain(e.x0,0,e.xa._length),e.x1=a.constrain(e.x1,0,e.xa._length),e.y0=a.constrain(e.y0,0,e.ya._length),e.y1=a.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:m.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:m.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!("log"===e.xa.type&&e.xerr<=0)){var d=m.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+m.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var f=m.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+m.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function z(e,t,r){var n,i,a=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),d||u){var p=h.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=n._offset+y.x,v=i._offset+y.y);var x,b,w=o.readability(y.color,p)<1.5?h.contrast(p):y.color,_=i.spikemode,k=i.spikethickness,S=i.spikecolor||w,T=m.getPxPosition(e,i);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(x=T,b=g),-1!==_.indexOf("across")){var M=i._counterDomainMin,C=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),C=Math.max(C,i.position)),x=l.l+M*l.w,b=l.l+C*l.w}a.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":k,stroke:S,"stroke-dasharray":f.dashStyle(i.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":k+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?k:-k),cy:v,r:k,fill:S}).classed("spikeline",!0)}if(d){var A,E,I=t.vLinePoint;n=I&&I.xa,i=I&&I.ya,"cursor"===n.spikesnap?(A=c.pointerX,E=c.pointerY):(A=n._offset+I.x,E=i._offset+I.y);var O,P,R=o.readability(I.color,p)<1.5?h.contrast(p):I.color,L=n.spikemode,j=n.spikethickness,D=n.spikecolor||R,z=m.getPxPosition(e,n);if(-1!==L.indexOf("toaxis")||-1!==L.indexOf("across")){if(-1!==L.indexOf("toaxis")&&(O=z,P=E),-1!==L.indexOf("across")){var N=n._counterDomainMin,F=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),F=Math.max(F,n.position)),O=l.t+(1-F)*l.h,P=l.t+(1-N)*l.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:O,y2:P,"stroke-width":j,stroke:D,"stroke-dasharray":f.dashStyle(n.spikedash,j)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:O,y2:P,"stroke-width":j+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==L.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:A,cy:z-("top"!==n.side?j:-j),r:j,fill:D}).classed("spikeline",!0)}}}function N(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function F(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function B(e,t,r){var n=t[e+"a"],i=t[e+"Val"],o=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var a=t.trace[e+"periodalignment"];if(a){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===a?i+=u:"middle"===a&&(i+=u/2)}i=n.d2c(i)}return o&&o.t&&o.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=o.t.dPos)),i}function Z(e){return e.offsetTop+e.clientTop}function U(e){return e.offsetLeft+e.clientLeft}function V(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,o=n.top,s=i+n.width,l=o+n.height,c=a.apply3DTransform(r._invTransform)(i,o),u=a.apply3DTransform(r._invTransform)(s,l),d=c[0],f=c[1],h=u[0],p=u[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}},70439:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87267).isUnifiedHover;e.exports=function(e,t,r,a){a=a||{};var s=t.legend;function l(e){a.font[e]||(a.font[e]=s?t.legend.font[e]:t.font[e])}t&&o(t.hovermode)&&(a.font||(a.font={}),l("size"),l("family"),l("color"),s?(a.bgcolor||(a.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),a.bordercolor||(a.bordercolor=t.legend.bordercolor)):a.bgcolor||(a.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",a.bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},74064:(e,t,r)=>{"use strict";var n=r(53787),i=r(18971);e.exports=function(e,t){function r(r,o){return void 0!==t[r]?t[r]:n.coerce(e,t,i,r,o)}return r("clickmode"),r("hovermode")}},76719:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(63e3),a=r(87267),s=r(18971),l=r(6535);e.exports={moduleType:"component",name:"fx",constants:r(82133),schema:{layout:s},attributes:r(54289),layoutAttributes:s,supplyLayoutGlobalDefaults:r(88832),supplyDefaults:r(44173),supplyLayoutDefaults:r(10814),calc:r(35310),getDistanceFunction:a.getDistanceFunction,getClosest:a.getClosest,inbox:a.inbox,quadrature:a.quadrature,appendArrayPointValue:a.appendArrayPointValue,castHoverOption:function(e,t,r){return i.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return i.castOption(e,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:o.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=i.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(34579)}},18971:(e,t,r)=>{"use strict";var n=r(82133),i=r(92948),o=i({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});o.family.dflt=n.HOVERFONT,o.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:o,grouptitlefont:i({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}}},10814:(e,t,r)=>{"use strict";var n=r(53787),i=r(18971),o=r(74064),a=r(70439);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}o(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=t._has("mapbox"),l=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(t.dragmode="pan"),a(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},88832:(e,t,r)=>{"use strict";var n=r(53787),i=r(70439),o=r(18971);e.exports=function(e,t){i(e,t,(function(r,i){return n.coerce(e,t,o,r,i)}))}},97481:(e,t,r)=>{"use strict";var n=r(53787),i=r(64563).counter,o=r(29707).Y,a=r(99727).idRegex,s=r(99862),l={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[a.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(e,t,r,n,i,o){var a=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-a),d=u*(1-a),f=0;f1){if(!f&&!h&&!p)"independent"===S("pattern")&&(f=!0);g._hasSubplotGrid=f;var x,b,w="top to bottom"===S("roworder"),_=f?.2:.1,k=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",S,_,x,y),y:u("y",S,k,b,v,w)}}else delete t.grid}function S(e,t){return n.coerce(r,g,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,i,o,a,s,l,u,f=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(p){var x=f.subplots||[];l=r.subplots=new Array(m);var b=1;for(n=0;n{"use strict";var n=r(99727),i=r(99862).templatedArray,o=r(71896);e.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",o.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",o.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"})},51380:(e,t,r)=>{"use strict";var n=r(51908),i=r(3324);e.exports=function(e,t,r,o){t=t||{};var a="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(a||s)for(var l,c,u=e._fullLayout.images,d=t._id.charAt(0),f=0;f{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(94389);function s(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var d=c[u],f=i.coerceRef(e,t,l,d,"paper",void 0);if("paper"!==f)i.getFromId(l,f)._imgIndices.push(t._index);i.coercePosition(t,l,o,f,d,0)}return t}e.exports=function(e,t){o(e,t,{name:"images",handleItemDefaults:s})}},8129:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(28605),a=r(24279),s=r(83580);e.exports=function(e){var t,r,l=e._fullLayout,c=[],u={},d=[];for(r=0;r{"use strict";e.exports={moduleType:"component",name:"images",layoutAttributes:r(94389),supplyLayoutDefaults:r(73150),includeBasePlot:r(49861)("images"),draw:r(8129),convertCoords:r(51380)}},4903:(e,t,r)=>{"use strict";var n=r(92948),i=r(18022);e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:n({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:n({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:n({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"}},29558:e=>{"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}},24397:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(99862),a=r(27231),s=r(4903),l=r(79443),c=r(63798);function u(e,t,r,u){var d=t[e]||{},f=o.newContainer(r,e);function h(e,t){return i.coerce(d,f,s,e,t)}var p=i.coerceFont(h,"font",r.font);if(h("bgcolor",r.paper_bgcolor),h("bordercolor"),h("visible")){for(var m,g=function(e,t){var r=m._input,n=m;return i.coerce(r,n,a,e,t)},v=r.font||{},y=i.coerceFont(h,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1*v.size)})),x=0,b=!1,w="normal",_=(r.shapes||[]).filter((function(e){return e.showlegend})),k=u.concat(_).filter((function(t){return e===(t.legend||"legend")})),S=0;S("legend"===e?1:0));if(!1===M&&(r[e]=void 0),(!1!==M||d.uirevision)&&(h("uirevision",r.uirevision),!1!==M)){h("borderwidth");var C,A,E,I="h"===h("orientation"),O="paper"===h("yref"),P="paper"===h("xref"),R="left";if(I?(C=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?O?(A=1.1,E="bottom"):(A=1,E="top"):O?(A=-.1,E="top"):(A=0,E="bottom")):(A=1,E="auto",P?C=1.02:(C=1,R="right")),i.coerce(d,f,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:C}},"x"),i.coerce(d,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:A}},"y"),h("traceorder",w),c.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",R),h("yanchor",E),h("valign"),i.noneOrAll(d,f,["x","y"]),h("title.text")){h("title.side",I?"left":"top");var L=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(h,"title.font",L)}}}}e.exports=function(e,t,r){var n,o=r.slice(),a=t.shapes;if(a)for(n=0;n{"use strict";var n=r(8996),i=r(53787),o=r(44115),a=r(44049),s=r(24521),l=r(63e3),c=r(50973),u=r(66235),d=r(98224),f=r(97854),h=r(29558),p=r(81653),m=p.LINE_SPACING,g=p.FROM_TL,v=p.FROM_BR,y=r(49736),x=r(26040),b=r(63798),w=1,_=/^legend[0-9]*$/;function k(e,t){var r,s,f=t||{},p=e._fullLayout,_=P(f),k=f._inHover;if(k?(s=f.layer,r="hover"):(s=p._infolayer,r=_),s){var C;if(r+=p._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),k){if(!f.entries)return;C=y(f.entries,f)}else{for(var R=(e.calcdata||[]).slice(),L=p.shapes,j=0;j1)}var N=p.hiddenlabels||[];if(!k&&(!p.showlegend||!C.length))return s.selectAll("."+_).remove(),p._topdefs.select("#"+r).remove(),o.autoMargin(e,_);var F=i.ensureSingle(s,"g",_,(function(e){k||e.attr("pointer-events","all")})),B=i.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),Z=i.ensureSingle(F,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));Z.call(u.stroke,f.bordercolor).call(u.fill,f.bgcolor).style("stroke-width",f.borderwidth+"px");var U,V=i.ensureSingle(F,"g","scrollbox"),H=f.title;f._titleWidth=0,f._titleHeight=0,H.text?((U=i.ensureSingle(V,"text",_+"titletext")).attr("text-anchor","start").call(c.font,H.font).text(H.text),E(U,V,e,f,w)):V.selectAll("."+_+"titletext").remove();var W=i.ensureSingle(F,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),G=V.selectAll("g.groups").data(C);G.enter().append("g").attr("class","groups"),G.exit().remove();var q=G.selectAll("g.traces").data(i.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(e){var t=e[0].trace;return a.traceIs(t,"pie-like")?-1!==N.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(M,e,f)})).call(x,e,f).each((function(){k||n.select(this).call(A,e,_)})),i.syncOrAsync([o.previousPromises,function(){return function(e,t,r,i){var o=e._fullLayout,a=P(i);i||(i=o[a]);var s=o._size,l=b.isVertical(i),u=b.isGrouped(i),d="fraction"===i.entrywidthmode,f=i.borderwidth,p=2*f,m=h.itemGap,g=i.itemwidth+2*m,v=2*(f+m),y=O(i),x=i.y<0||0===i.y&&"top"===y,w=i.y>1||1===i.y&&"bottom"===y,_=i.tracegroupgap,k={};i._maxHeight=Math.max(x||w?o.height/2:s.h,30);var T=0;i._width=0,i._height=0;var M=function(e){var t=0,r=0,n=e.title.side;n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight));return[t,r]}(i);if(l)r.each((function(e){var t=e[0].height;c.setTranslate(this,f+M[0],f+M[1]+i._height+t/2+m),i._height+=t,i._width=Math.max(i._width,e[0].width)})),T=g+i._width,i._width+=m+g+p,i._height+=v,u&&(t.each((function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var C=I(i),A=i.x<0||0===i.x&&"right"===C,E=i.x>1||1===i.x&&"left"===C,R=w||x,L=o.width/2;i._maxWidth=Math.max(A?R&&"left"===C?s.l+s.w:L:E?R&&"right"===C?s.r+s.w:L:s.w,2*g);var j=0,D=0;r.each((function(e){var t=S(e,i,g);j=Math.max(j,t),D+=t})),T=null;var z=0;if(u){var N=0,F=0,B=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=S(r,i,g),o=r[0].height;c.setTranslate(this,M[0],M[1]+f+m+o/2+t),t+=o,e=Math.max(e,n),k[r[0].trace.legendgroup]=e}));var r=e+m;F>0&&r+f+F>i._maxWidth?(z=Math.max(z,F),F=0,B+=N+_,N=t):N=Math.max(N,t),c.setTranslate(this,F,B),F+=r})),i._width=Math.max(z,F)+f,i._height=B+N+v}else{var Z=r.size(),U=D+p+(Z-1)*m=i._maxWidth&&(z=Math.max(z,G),H=0,W+=V,i._height+=V,V=0),c.setTranslate(this,M[0]+f+H,M[1]+f+W+t/2+m),G=H+r+m,H+=n,V=Math.max(V,t)})),U?(i._width=H+p,i._height=V+v):(i._width=Math.max(z,G)+p,i._height+=V+v)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(f+h.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(f+h.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var q=e._context.edits,Y=q.legendText||q.legendPosition;r.each((function(e){var t=n.select(this).select("."+a+"toggle"),r=e[0].height,o=e[0].trace.legendgroup,s=S(e,i,g);u&&""!==o&&(s=k[o]);var f=Y?g:T||s;l||d||(f+=m/2),c.setRect(t,0,-r/2,f,r)}))}(e,G,q,f)},function(){var t,u,y,x,b=p._size,w=f.borderwidth,S="paper"===f.xref,M="paper"===f.yref;if(H.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,i=0,o=e.node(),a=c.bBox(o).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*h.titlePad-a):"top right"===t.title.side&&(i=t._width-2*r-2*h.titlePad-a),d.positionText(e,r+h.titlePad+i,r+n)}}(U,f,w),!k){var C,A;C=S?b.l+b.w*f.x-g[I(f)]*f._width:p.width*f.x-g[I(f)]*f._width,A=M?b.t+b.h*(1-f.y)-g[O(f)]*f._effHeight:p.height*(1-f.y)-g[O(f)]*f._effHeight;var E=function(e,t,r,n){var i=e._fullLayout,a=i[t],s=I(a),l=O(a),c="paper"===a.xref,u="paper"===a.yref;e._fullLayout._reservedMargin[t]={};var d=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(c&&u)return o.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*g[s],r:a._width*v[s],b:a._effHeight*v[l],t:a._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][d]=h[d]:u||"v"===a.orientation?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][d]=h[d]}(e,_,C,A);if(E)return;if(p.margin.autoexpand){var P=C,R=A;C=S?i.constrain(C,0,p.width-f._width):P,A=M?i.constrain(A,0,p.height-f._effHeight):R,C!==P&&i.log("Constrain "+_+".x to make legend fit inside graph"),A!==R&&i.log("Constrain "+_+".y to make legend fit inside graph")}c.setTranslate(F,C,A)}if(W.on(".drag",null),F.on("wheel",null),k||f._height<=f._maxHeight||e._context.staticPlot){var L=f._effHeight;k&&(L=f._height),Z.attr({width:f._width-w,height:L-w,x:w/2,y:w/2}),c.setTranslate(V,0,0),B.select("rect").attr({width:f._width-2*w,height:L-2*w,x:w,y:w}),c.setClipUrl(V,r,e),c.setRect(W,0,0,0,0),delete f._scrollY}else{var j,D,z,N=Math.max(h.scrollBarMinHeight,f._effHeight*f._effHeight/f._height),G=f._effHeight-N-2*h.scrollBarMargin,q=f._height-f._effHeight,Y=G/q,X=Math.min(f._scrollY||0,q);Z.attr({width:f._width-2*w+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-w,x:w/2,y:w/2}),B.select("rect").attr({width:f._width-2*w+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-2*w,x:w,y:w+X}),c.setClipUrl(V,r,e),J(X,N,Y),F.on("wheel",(function(){J(X=i.constrain(f._scrollY+n.event.deltaY/G*q,0,q),N,Y),0!==X&&X!==q&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;j="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,z=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(D="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/Y+e;return i.constrain(n,0,q)}(z,j,D),J(X,N,Y))}));W.call(K);var $=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(j=e.changedTouches[0].clientY,z=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(D=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/Y+e;return i.constrain(n,0,q)}(z,j,D),J(X,N,Y))}));V.call($)}function J(t,r,n){f._scrollY=e._fullLayout[_]._scrollY=t,c.setTranslate(V,0,-t),c.setRect(W,f._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),B.select("rect").attr("y",w+t)}e._context.edits.legendPosition&&(F.classed("cursor-move",!0),l.init({element:F.node(),gd:e,prepFn:function(){var e=c.getTranslate(F);y=e.x,x=e.y},moveFn:function(e,r){var n=y+e,i=x+r;c.setTranslate(F,n,i),t=l.align(n,f._width,b.l,b.l+b.w,f.xanchor),u=l.align(i+f._height,-f._height,b.t+b.h,b.t,f.yanchor)},doneFn:function(){if(void 0!==t&&void 0!==u){var r={};r[_+".x"]=t,r[_+".y"]=u,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=s.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&T(e,F,n,t,r)}}))}],e)}}function S(e,t,r){var n=e[0],i=n.width,o=t.entrywidthmode,a=n.trace.legendwidth||t.entrywidth;return"fraction"===o?t._maxWidth*a:r+(a||i)}function T(e,t,r,n,i){var o=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};o._group&&(l.group=o._group),a.traceIs(o,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(e,"plotly_legendclick",l);if(1===n){if(!1===c)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&f(r,e,n)}),e._context.doubleClickDelay)}else if(2===n){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&!1!==c&&f(r,e,n)}}function M(e,t,r){var n,o,s=P(r),l=e.data()[0][0],u=l.trace,f=a.traceIs(u,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,o=l.groupTitle.font):(o=r.font,r.entries?n=l.text:(n=f?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var g=i.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(c.font,o).text(p?C(n,m):n);var v=r.itemwidth+2*h.itemGap;d.positionText(g,v,0),p?g.call(d.makeEditable,{gd:t,text:n}).call(E,e,t,r).on("edit",(function(n){this.text(C(n,m)).call(E,e,t,r);var o=l.trace._fullInput||{},s={};if(a.hasTransform(o,"groupby")){var c=a.getTransformIndices(o,"groupby"),d=c[c.length-1],f=i.keyedContainer(o,"transforms["+d+"].styles","target","value.name");f.set(l.trace._group,n),s=f.constructUpdate()}else s.name=n;return o._isShape?a.call("_guiRelayout",t,"shapes["+u.index+"].name",s.name):a.call("_guiRestyle",t,s,u.index)})):E(g,e,t,r)}function C(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function A(e,t,r){var o,a=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(o=(new Date).getTime())-t._legendMouseDownTimea&&(s=Math.max(s-1,1)),T(t,i,e,s,n.event)}})))}function E(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void e.remove();var o=e.select("g[class*=math-group]"),a=o.node(),s=P(r);r||(r=t._fullLayout[s]);var l,u=r.borderwidth;l=n===w?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var f,p,g=l.size*m;if(a){var v=c.bBox(a);f=v.height,p=v.width,n===w?c.setTranslate(o,u,u+.75*f):c.setTranslate(o,0,.25*f)}else{var y="."+s+(n===w?"title":"")+"text",x=e.select(y),b=d.lineCount(x),_=x.node();if(f=g*b,p=_?c.bBox(_).width:0,n===w)"left"===r.title.side&&(p+=2*h.itemGap),d.positionText(x,u+h.titlePad,u+g);else{var k=2*h.itemGap+r.itemwidth;i.groupTitle&&(k=h.itemGap,p-=r.itemwidth),d.positionText(x,k,-g*((b-1)/2-.3))}}n===w?(r._titleWidth=p,r._titleHeight=f):(i.lineHeight=g,i.height=Math.max(f,16)+3,i.width=p)}(t,r,n,i)}))}function I(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function O(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}function P(e){return e._id||"legend"}e.exports=function(e,t){if(t)k(e,t);else{var r=e._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===i.indexOf(t)&&e.remove()}));for(var o=0;o{"use strict";var n=r(44049),i=r(63798);e.exports=function(e,t,r){var o,a,s=t._inHover,l=i.isGrouped(t),c=i.isReversed(t),u={},d=[],f=!1,h={},p=0,m=0;function g(e,n,o){if(!1!==t.visible&&(!r||e===t._id))if(""!==n&&i.isGrouped(t))-1===d.indexOf(n)?(d.push(n),f=!0,u[n]=[o]):u[n].push(o);else{var a="~~i"+p;d.push(a),u[a]=[o],p++}}for(o=0;oC&&(M=C)}S[o][0]._groupMinRank=M,S[o][0]._preGroupSort=o}var A=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(S.forEach((function(e,t){e[0]._preGroupSort=t})),S.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),o=0;o{"use strict";var n=r(44049),i=r(53787),o=i.pushUnique,a=!0;e.exports=function(e,t,r){var s=t._fullLayout;if(!t._dragged&&!t._editing){var l,c=s.legend.itemclick,u=s.legend.itemdoubleclick,d=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&a&&t.data&&t._context.showTips?(i.notifier(i._(t,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?l=c:2===r&&(l=u),l){var f="togglegroup"===d,h=s.hiddenlabels?s.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var m=t._fullData,g=(s.shapes||[]).filter((function(e){return e.showlegend})),v=m.concat(g),y=p.trace;y._isShape&&(y=y._fullInput);var x,b,w,_,k,S=y.legendgroup,T={},M=[],C=[],A=[],E=(s.shapes||[]).map((function(e){return e._input})),I=!1,O=y.legend,P=y._fullInput;if(!(P&&P._isShape)&&n.traceIs(y,"pie-like")){var R=p.label,L=h.indexOf(R);if("toggle"===l)-1===L?h.push(R):h.splice(L,1);else if("toggleothers"===l){var j=-1!==L,D=[];for(x=0;x{"use strict";t.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},t.isVertical=function(e){return"h"!==e.orientation},t.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},19323:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"legend",layoutAttributes:r(4903),supplyLayoutDefaults:r(24397),draw:r(36834),style:r(26040)}},26040:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=o.strTranslate,s=r(50973),l=r(66235),c=r(25584).extractOpts,u=r(26775),d=r(68872),f=r(22084).castOption,h=r(29558);function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function m(e){var t=e[0].trace,r=t.contours,n=u.hasLines(t),i=u.hasMarkers(t),o=t.visible&&t.fill&&"none"!==t.fill,a=!1,s=!1;if(r){var l=r.coloring;"lines"===l?a=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?o="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:o,showGradientLine:a,showGradientFill:s,anyLine:n||a,anyFill:o||s}}function g(e,t,r){return e&&o.isArrayOrTypedArray(e)?t:e>r?r:e}e.exports=function(e,t,r){var v=t._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,w=a(b,0),_=function(e,t,r,n){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return y?n:Math.min(i,r)};function k(e,o,a){var u=e[0].trace,d=u.marker||{},f=d.line||{},h=a?u.visible&&u.type===a:i.traceIs(u,"bar"),p=n.select(o).select("g.legendpoints").selectAll("path.legend"+a).data(h?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),p.exit().remove(),p.each((function(e){var i=n.select(this),o=e[0],a=_(o.mlw,d.line,5,2);i.style("stroke-width",a+"px");var h=o.mcc;if(!r._inHover&&"mc"in o){var p=c(d),m=p.mid;void 0===m&&(m=(p.max+p.min)/2),h=s.tryColorscale(d,"")(m)}var v=h||o.mc||d.color,y=d.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),w=s.getPatternAttr(y.fgcolor,0,null),k=y.fgopacity,S=g(y.size,8,10),T=g(y.solidity,.5,1),M="legend-"+u.uid;i.call(s.pattern,"legend",t,M,x,S,T,h,y.fillmode,b,w,k)}else i.call(l.fill,v);a&&l.stroke(i,o.mlc||f.color)}))}function S(e,r,a){var s=e[0],l=s.trace,c=a?l.visible&&l.type===a:i.traceIs(l,a),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+a).data(c?[e]:[]);if(u.enter().append("path").classed("legend"+a,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),u.exit().remove(),u.size()){var h=l.marker||{},p=_(f(h.line.width,s.pts),h.line,5,2),m="pieLike",g=o.minExtend(l,{marker:{line:{width:p}}},m),v=o.minExtend(s,{trace:g},m);d(u,v,g,t)}}e.each((function(e){var t=n.select(this),i=o.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var s=r.valign,l=e[0].lineHeight,c=e[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",a(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var d=i.selectAll("g.legendsymbols").data([e]);d.enter().append("g").classed("legendsymbols",!0),d.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,i=e[0].trace,a=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":a=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":a=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":a=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":a=[["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":a=[["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":a=[["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":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":a=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(a);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",w).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,a){var u,d=n.select(this),f=c(i),h=f.colorscale,m=f.reversescale;if(h){if(!r){var g=h.length;u=0===a?h[m?g-1:0][1]:1===a?h[m?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=o.isArrayOrTypedArray(v)?v[a]||v[0]:v}d.attr("d",e[0]),u?d.call(l.fill,u):d.call((function(e){if(e.size()){var n="legendfill-"+i.uid;s.gradient(e,t,n,p(m,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,k(e,this,"waterfall")}var o=[];t.visible&&r&&(o=e[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 a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(o);a.enter().append("path").classed("legendwaterfall",!0).attr("transform",w).style("stroke-miterlimit",1),a.exit().remove(),a.each((function(e){var r=n.select(this),i=t[e[0]].marker,o=_(void 0,i.line,5,2);r.attr("d",e[1]).style("stroke-width",o+"px").call(l.fill,i.color),o&&r.call(l.stroke,i.line.color)}))})).each((function(e){k(e,this,"funnel")})).each((function(e){k(e,this)})).each((function(e){var r=e[0].trace,a=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[e]:[]);a.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",w),a.exit().remove(),a.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=_(void 0,r.line,5,2);e.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(e,r.line.color)}else{var c=o.minExtend(r,{marker:{size:y?12:o.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});a.call(s.pointStyle,c,t)}}))})).each((function(e){S(e,this,"funnelarea")})).each((function(e){S(e,this,"pie")})).each((function(e){var r,i,a=m(e),l=a.showFill,d=a.showLine,f=a.showGradientLine,h=a.showGradientFill,g=a.anyFill,v=a.anyLine,y=e[0],b=y.trace,w=c(b),k=w.colorscale,S=w.reversescale,T=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",M=n.select(this),C=M.select(".legendfill").selectAll("path").data(l||h?[e]:[]);if(C.enter().append("path").classed("js-fill",!0),C.exit().remove(),C.attr("d",T+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(l)s.fillGroupStyle(e,t);else{var r="legendfill-"+b.uid;s.gradient(e,t,r,p(S),k,"fill")}})),d||f){var A=_(void 0,b.line,10,5);i=o.minExtend(b,{line:{width:A}}),r=[o.minExtend(y,{trace:i})]}var E=M.select(".legendlines").selectAll("path").data(d||f?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.attr("d",T+(f?"l"+x+",0.0001":"h"+x)).call(d?s.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;s.lineGroupStyle(e),s.gradient(e,t,r,p(S),k,"stroke")}})})).each((function(e){var r,i,a=m(e),l=a.anyFill,c=a.anyLine,d=a.showLine,f=a.showMarker,h=e[0],p=h.trace,g=!f&&!c&&!l&&u.hasText(p);function v(e,t,r,n){var i=o.nestedProperty(p,e).get(),a=o.isArrayOrTypedArray(i)&&t?t(i):i;if(y&&a&&void 0!==n&&(a=n),r){if(ar[1])return r[1]}return a}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||g||d){var b={},_={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",o.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",o.mean,[0,5],2),_.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=v("marker.size",o.mean,[2,16],12);b.ms=k,_.marker.size=k}d&&(_.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),r=[o.minExtend(h,b)],(i=o.minExtend(p,_)).selectedpoints=null,i.texttemplate=null}var S=n.select(this).select("g.legendpoints"),T=S.selectAll("path.scatterpts").data(f?r:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",w),T.exit().remove(),T.call(s.pointStyle,i,t),f&&(r[0].mrc=3);var M=S.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",w),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var i=n.select(this),o=t[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("stroke-width",a+"px").call(l.fill,o.fillcolor),a&&l.stroke(i,o.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",w).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var i=n.select(this),o=t[r?"increasing":"decreasing"],a=_(void 0,o.line,5,2);i.style("fill","none").call(s.dashLine,o.line.dash,a),a&&l.stroke(i,o.line.color)}))}))}},75331:(e,t,r)=>{"use strict";var n=r(1230);e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+n.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+n.foreButtons.join("*, *")+"*."].join(" ")}}},93640:(e,t,r)=>{"use strict";var n=r(44049),i=r(44115),o=r(24279),a=r(16322),s=r(75629).eraseActiveShape,l=r(53787),c=l._,u=e.exports={};function d(e,t){var r,i,a=t.currentTarget,s=a.getAttribute("data-attr"),l=a.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=o.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===s){var h,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(i=0;i{"use strict";var n=r(93640),i=Object.keys(n),o=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(o),s=[];i.forEach((function(e){!function(e){if(-1===a.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===s.indexOf(t)&&s.push(t),-1===s.indexOf(r)&&s.push(r)}}(n[e])})),s.sort(),e.exports={DRAW_MODES:o,backButtons:a,foreButtons:s}},27709:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(75331);e.exports=function(e,t){var r=e.modebar||{},s=o.newContainer(t,"modebar");function l(e,t){return n.coerce(r,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}},54514:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"modebar",layoutAttributes:r(75331),supplyLayoutDefaults:r(27709),manage:r(55371)}},55371:(e,t,r)=>{"use strict";var n=r(24279),i=r(26775),o=r(44049),a=r(87267).isUnifiedHover,s=r(78651),l=r(93640),c=r(1230).DRAW_MODES,u=r(53787).extendDeep;e.exports=function(e){var t=e._fullLayout,r=e._context,d=t._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 f,h=r.modeBarButtons;f=Array.isArray(h)&&h.length?function(e){for(var t=u([],e),r=0;r1?(P=["toggleHover"],R=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],R=["resetGeo"]):g?(P=["hoverClosest3d"],R=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],R=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:y?P=["hoverClosestPie"]:T?(P=["hoverClosestCartesian","hoverCompareCartesian"],R=["resetViewSankey"]):P=["toggleHover"];m&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(16322),s=r(75703).version,l=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(e,t){this.graphInfo=e;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",t=t.reverse());var a=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";o.deleteRelatedStyleRule(i),o.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+a.bgcolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+a.color),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+a.activecolor),o.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+a.activecolor);var l=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var d=this.getLogo();r.watermark&&(d.className=d.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var i=t.createButton(e);t.buttonElements.push(i),r.appendChild(i)})),t.element.appendChild(r)}))},u.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},u.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;void 0===i?i=e.name:"function"===typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"===typeof o&&(o=o(this.graphInfo)),r.setAttribute("data-val",o)),"function"!==typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var s=e.icon;return"function"===typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||a.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},u.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var o=document.createElementNS(n,"path");o.setAttribute("d",e.path),e.transform?o.setAttribute("transform",e.transform):void 0!==e.ascent&&o.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(o)}e.svg&&(t=l.parseFromString(e.svg,"application/xml").childNodes[0]);return t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},u.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var i=e.getAttribute("data-val")||!0,a=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=n.select(e);if(s)a===r&&l.classed("active",!l.classed("active"));else{var c=null===a?a:o.nestedProperty(t,a).get();l.classed("active",c===i)}}))},u.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var n=r(92948),i=r(18022),o=(0,r(99862).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")});e.exports={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:o,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:n({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"}},67364:e=>{"use strict";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},46039:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(80254),s=r(79837),l=r(67364);function c(e,t,r,i){var o=i.calendar;function a(r,i){return n.coerce(e,t,s.buttons,r,i)}if(a("visible")){var l=a("step");"all"!==l&&(!o||"gregorian"===o||"month"!==l&&"year"!==l?a("stepmode"):t.stepmode="backward",a("count")),a("label")}}e.exports=function(e,t,r,u,d){var f=e.rangeselector||{},h=o.newContainer(t,"rangeselector");function p(e,t){return n.coerce(f,h,s,e,t)}if(p("visible",a(f,h,{name:"buttons",handleItemDefaults:c,calendar:d}).length>0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),i=0,o=0;o{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(66235),s=r(50973),l=r(53787),c=l.strTranslate,u=r(98224),d=r(24279),f=r(81653),h=f.LINE_SPACING,p=f.FROM_TL,m=f.FROM_BR,g=r(67364),v=r(37473);function y(e){return e._id}function x(e,t,r){var n=l.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(a.stroke,t.bordercolor).call(a.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){l.ensureSingle(e,"text","selector-text",(function(e){e.attr("text-anchor","middle")})).call(s.font,t.font).text(function(e,t){if(e.label)return t?l.templateString(e.label,t):e.label;return"all"===e.step?"all":e.count+e.step.charAt(0)}(r,n._fullLayout._meta)).call((function(e){u.convertToTspans(e,n)}))}e.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=d.list(e,"x",!0),r=[],n=0;n{"use strict";var n=r(37747),i=r(53787).titleCase;e.exports=function(e,t){var r=e._name,o={};if("all"===t.step)o[r+".autorange"]=!0;else{var a=function(e,t){var r,o=e.range,a=new Date(e.r2l(o[1])),s=t.step,l=n["utc"+i(s)],c=t.count;switch(t.stepmode){case"backward":r=e.l2r(+l.offset(a,-c));break;case"todate":var u=l.offset(a,-c);r=e.l2r(+l.ceil(u))}var d=o[1];return[r,d]}(e,t);o[r+".range[0]"]=a[0],o[r+".range[1]"]=a[1]}return o}},6834:(e,t,r)=>{"use strict";e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(79837)}}},layoutAttributes:r(79837),handleDefaults:r(46039),draw:r(15332)}},9482:(e,t,r)=>{"use strict";var n=r(18022);e.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"}},81028:(e,t,r)=>{"use strict";var n=r(24279).list,i=r(10351).getAutoRange,o=r(6140);e.exports=function(e){for(var t=n(e,"x",!0),r=0;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}},17485:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862),o=r(24279),a=r(9482),s=r(6022);e.exports=function(e,t,r){var l=e[r],c=t[r];if(l.rangeslider||t._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,d,f=l.rangeslider,h=i.newContainer(c,"rangeslider");if(w("visible")){w("bgcolor",t.plot_bgcolor),w("bordercolor"),w("borderwidth"),w("thickness"),w("autorange",!c.isValidRange(f.range)),w("range");var p=t._subplots;if(p)for(var m=p.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===o.name2id(r)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),g=n.simpleMap(m,o.id2name),v=0;v{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=a.strTranslate,l=r(50973),c=r(66235),u=r(34906),d=r(48206),f=r(24279),h=r(63e3),p=r(19602),m=r(6140);function g(e,t,r,n){var i=a.ensureSingle(e,"rect",m.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),o=n.borderwidth%2===0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,d=l.crispRound(t,n.borderwidth);i.attr({width:n._width+o,height:n._height+o,transform:s(u,u),"stroke-width":d}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function v(e,t,r,n){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function y(e,t,r,i){var s,c=t.calcdata,u=e.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,a.identity);u.enter().append("g").attr("class",(function(e){return m.rangePlotClassName+" "+e})).call(l.setClipUrl,i._clipId,t),u.order(),u.exit().remove(),u.each((function(e,a){var l=n.select(this),u=0===a,h=f.getFromId(t,e,"y"),p=h._name,m=i[p],g={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:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),o.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[p];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:l,xaxis:v,yaxis:y,isRangePlot:!0};u?s=x:(x.mainplot="xy",x.mainplotinfo=s),d.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=z[r+1];else if(e=n.pmax)t=z[r+1];else if(er._length||v+b<0)return;u=g+b,h=v+b;break;case l:if(x="col-resize",g+b>r._length)return;u=g+b,h=v;break;case c:if(x="col-resize",v+b<0)return;u=g,h=v+b;break;default:x="ew-resize",u=m,h=m+b}if(h{"use strict";var n=r(24279),i=r(98224),o=r(6140),a=r(81653).LINE_SPACING,s=o.name;function l(e){var t=e&&e[s];return t&&t.visible}t.isVisible=l,t.makeData=function(e){var t=n.list({_fullLayout:e},"x",!0),r=e.margin,i=[];if(!e._has("gl2d"))for(var o=0;o{"use strict";var n=r(53787),i=r(9482),o=r(6022),a=r(91490);e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:o})}}},layoutAttributes:r(9482),handleDefaults:r(17485),calcAutorange:r(81028),draw:r(25390),isVisible:a.isVisible,makeData:a.makeData,autoMarginOpts:a.autoMarginOpts}},6022:e=>{"use strict";e.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"}},88680:(e,t,r)=>{"use strict";var n=r(63858),i=r(37471).line,o=r(93701).P,a=r(10191).extendFlat,s=r(18693).overrideAll,l=r(99862).templatedArray,c=r(71896);e.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:a({},n.xref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),yref:a({},n.yref,{description:["Sets the selection's x coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},o,{dflt:"dot"})}}),"arraydraw","from-root")},79901:e=>{"use strict";e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},53879:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(88680),s=r(21471);function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}var l=o("path"),c="path"!==o("type",l?"path":"rect");c&&delete t.path,o("opacity"),o("line.color"),o("line.width"),o("line.dash");for(var u=["x","y"],d=0;d<2;d++){var f,h,p,m=u[d],g={_fullLayout:r},v=i.coerceRef(e,t,g,m);if((f=i.getFromId(g,v))._selectionIndices.push(t._index),p=s.rangeToShapePosition(f),h=s.shapePositionToRange(f),c){var y=m+"0",x=m+"1",b=e[y],w=e[x];e[y]=h(e[y],!0),e[x]=h(e[x],!0),i.coercePosition(t,g,o,v,y),i.coercePosition(t,g,o,v,x);var _=t[y],k=t[x];void 0!==_&&void 0!==k&&(t[y]=p(_),t[x]=p(k),e[y]=b,e[x]=w)}}c&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}e.exports=function(e,t){o(e,t,{name:"selections",handleItemDefaults:l});for(var r=t.selections,n=0;n{"use strict";var n=r(16541).readPaths,i=r(79971),o=r(94512).clearOutlineControllers,a=r(66235),s=r(50973),l=r(99862).arrayEditor,c=r(21471),u=c.getPathString;function d(e){var t=e._fullLayout;for(var r in o(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;S--){var T=r.append("path").attr(g).style("opacity",S?.1:v).call(a.stroke,x).call(a.fill,y).call(s.dashLine,S?"solid":w,S?4+b:b);if(p(T,e,o),_){var M=l(e.layout,"selections",o);T.style({cursor:"move"});var C={element:T.node(),plotinfo:h,gd:e,editHelpers:M,isActiveSelection:!0},A=n(c,e);i(A,T,C)}else T.style("pointer-events",S?"all":"none");k[S]=T}var E=k[0];k[1].node().addEventListener("click",(function(){return function(e,t){if(!f(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex)return void m(e);e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=m,d(e)}}(e,E)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;s.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function m(e){f(e)&&(e._fullLayout._activeSelectionIndex>=0&&(o(e),delete e._fullLayout._activeSelectionIndex,d(e)))}e.exports={draw:d,drawOne:h,activateLastSelection:function(e){if(!f(e))return;var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=m,d(e)}}},32438:(e,t,r)=>{"use strict";var n=r(93701).P,i=r(10191).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}}},81372:e=>{"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},58171:(e,t,r)=>{"use strict";var n=r(57873).selectMode,i=r(94512).clearOutline,o=r(16541),a=o.readPaths,s=o.writePaths,l=o.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var o=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,h=d.yaxis,p=t.isActiveSelection,m=t.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==p){var v=c._fullLayout._activeSelectionIndex;if(v{"use strict";var n=r(53787).strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}e.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return i(e,r[t])}},getTransform:function(e){return n(e.xaxis._offset,e.yaxis._offset)}}},26002:(e,t,r)=>{"use strict";var n=r(8045),i=r(72953);e.exports={moduleType:"component",name:"selections",layoutAttributes:r(88680),supplyLayoutDefaults:r(53879),supplyDrawNewSelectionDefaults:r(81372),includeBasePlot:r(49861)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},72953:(e,t,r)=>{"use strict";var n=r(82070),i=r(84672),o=r(44049),a=r(50973).dashStyle,s=r(66235),l=r(76719),c=r(87267).makeEventData,u=r(57873),d=u.freeMode,f=u.rectMode,h=u.drawMode,p=u.openMode,m=u.selectMode,g=r(21471),v=r(59781),y=r(79971),x=r(94512).clearOutline,b=r(16541),w=b.handleEllipse,_=b.readPaths,k=r(47513).newShapes,S=r(58171),T=r(8045).activateLastSelection,M=r(53787),C=M.sorterAsc,A=r(71962),E=r(57429),I=r(24279).getFromId,O=r(24513),P=r(93415).redrawReglTraces,R=r(79901),L=R.MINSELECT,j=A.filter,D=A.tester,z=r(10977),N=z.p2r,F=z.axValue,B=z.getTransform;function Z(e){return void 0!==e.subplot}function U(e,t,r,n,i,o,a){var s,l,c,u,d,f,h,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){G(e,t,o);var w=function(e,t){var r,n,i=e[0],o=-1,a=[];for(n=0;n0?function(e,t){var r,n,i,o=[];for(i=0;i0&&o.push(r);if(1===o.length&&o[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(s)&&(f=$(w))){for(a&&a.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(e){return e._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout._zoomlayer,s=h(r),l=m(r);if(s||l){var c,u,d=a.selectAll(".select-outline-"+n.id);if(d&&i._fullLayout._outlining)s&&(c=k(d,e)),c&&o.call("_guiRelayout",i,{shapes:c}),l&&!Z(e)&&(u=S(d,e)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",i,{selections:u}).then((function(){t&&T(i)}))),i._fullLayout._outlining=!1}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Y(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,o,a,s=[],l=t.map(Y),c=r.map(Y);for(a=0;a0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function J(e,t,r){var n,i;for(n=0;n-1&&t;if(!o&&t){var te=ae(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([I(e,ne,"x"),I(e,he,"y")])(Q,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,Q),f._reselect=!1}if(!o&&f._deselect){var me=f._deselect;(function(e,t,r){for(var n=0;n=0)S._fullLayout._deactivateShape(S);else if(!x){var r=T.clickmode;E.done(Me).then((function(){if(E.clear(Me),2===e){for(be.remove(),$=0;$-1&&U(t,S,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&de(S,void 0);l.click(S,t,O.id)})).catch(M.error)}},n.doneFn=function(){Se.remove(),E.done(Me).then((function(){E.clear(Me),!C&&K&&n.selectionDefs&&(K.subtract=xe,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(C||x)&&q(n,C),n.doneFnCompleted&&n.doneFnCompleted(Ce),b&&de(S,oe)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:q,selectOnClick:U}},13216:(e,t,r)=>{"use strict";var n=r(63858),i=r(92948),o=r(37471).line,a=r(93701).P,s=r(10191).extendFlat,l=r(99862).templatedArray,c=r(71896),u=r(27231),d=r(32191).R,f=r(3830);e.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:s({},u.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:s({},n.xref,{description:["Sets the shape's x coordinate axis.",c.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:s({},n.yref,{description:["Sets the shape's y coordinate axis.",c.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:s({},o.color,{editType:"arraydraw"}),width:s({},o.width,{editType:"calc+arraydraw"}),dash:s({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:d({},{keys:Object.keys(f)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"})},28859:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(59781),a=r(21471);function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,i,s,l){var c=e/2,u=l;if("pixel"===t){var d=s?a.extractPathCoords(s,l?o.paramIsY:o.paramIsX):[r,i],f=n.aggNums(Math.max,null,d),h=n.aggNums(Math.min,null,d),p=h<0?Math.abs(h)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?p:m,ppadminus:u?m:p}}return{ppad:c}}function u(e,t,r,n,i){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(r)];if(n){var l,c,u,d,f=1/0,h=-1/0,p=n.match(o.segmentRE);for("date"===e.type&&(s=a.decodeDate(s)),l=0;lh&&(h=d)));return h>=f?[f,h]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var a=0;a{"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}}},49410:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(80254),a=r(13216),s=r(21471);function l(e,t,r){function o(r,i){return n.coerce(e,t,a,r,i)}if(t._isShape=!0,o("visible")){o("showlegend")&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),n.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var l=o("path"),c=o("type",l?"path":"rect"),u="path"!==c;u&&delete t.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule"),o("line.width")&&(o("line.color"),o("line.dash"));for(var d=o("xsizemode"),f=o("ysizemode"),h=["x","y"],p=0;p<2;p++){var m,g,v,y=h[p],x=y+"anchor",b="x"===y?d:f,w={_fullLayout:r},_=i.coerceRef(e,t,w,y,void 0,"paper");if("range"===i.getRefType(_)?((m=i.getFromId(w,_))._shapeIndices.push(t._index),v=s.rangeToShapePosition(m),g=s.shapePositionToRange(m)):g=v=n.identity,u){var k=y+"0",S=y+"1",T=e[k],M=e[S];e[k]=g(e[k],!0),e[S]=g(e[S],!0),"pixel"===b?(o(k,0),o(S,10)):(i.coercePosition(t,w,o,_,k,.25),i.coercePosition(t,w,o,_,S,.75)),t[k]=v(t[k]),t[S]=v(t[S]),e[k]=T,e[S]=M}if("pixel"===b){var C=e[x];e[x]=g(e[x],!0),i.coercePosition(t,w,o,_,x,.25),t[x]=v(t[x]),e[x]=C}}u&&n.noneOrAll(e,t,["x0","x1","y0","y1"]);var A,E,I="line"===c;if(u&&(A=o("label.texttemplate")),A||(E=o("label.text")),E||A){o("label.textangle");var O=o("label.textposition",I?"middle":"middle center");o("label.xanchor"),o("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(I,O)),o("label.padding"),n.coerceFont(o,"label.font",r.font)}}}e.exports=function(e,t){o(e,t,{name:"shapes",handleItemDefaults:l})}},47845:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(98224),a=r(50973),s=r(16541).readPaths,l=r(21471),c=l.getPathString,u=r(3830),d=r(81653).FROM_TL;e.exports=function(e,t,r,f){if(f.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var h;if(r.label.texttemplate){var p={};if("path"!==r.type){var m=i.getFromId(e,r.xref),g=i.getFromId(e,r.yref);for(var v in u){var y=u[v](r,m,g);void 0!==y&&(p[v]=y)}}h=n.texttemplateStringForShapes(r.label.texttemplate,{},e._fullLayout._d3locale,p)}else h=r.label.text;var x,b,w,_,k={"data-index":t},S=r.label.font,T=f.append("g").attr(k).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(h);if(r.path){var M=c(e,r),C=s(M,e);x=1/0,w=1/0,b=-1/0,_=-1/0;for(var A=0;A=e?t-n:n-t;return-180/Math.PI*Math.atan2(i,o)}(x,w,b,_):0),T.call((function(t){return t.call(a.font,S).attr({}),o.convertToTspans(t,e),t}));var Z=function(e,t,r,n,i,o,a){var s,l,c,u,f=i.label.textposition,h=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*o,v=Math.sin(g),y=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===m){"start"===f?(s=e,l=t):"end"===f?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r{"use strict";var n=r(53787).strTranslate,i=r(63e3),o=r(57873),a=o.drawMode,s=o.selectMode,l=r(44049),c=r(66235),u=r(72694),d=u.i000,f=u.i090,h=u.i180,p=u.i270,m=r(94512).clearOutlineControllers,g=r(16541),v=g.pointsOnRectangle,y=g.pointsOnEllipse,x=g.writePaths,b=r(47513).newShapes,w=r(47513).createShapeObj,_=r(58171),k=r(47845);function S(e,t){var r,n,i,o=e[t][1],a=e[t][2],s=e.length;return n=e[r=(t+1)%s][1],i=e[r][2],n===o&&i===a&&(n=e[r=(t+2)%s][1],i=e[r][2]),[r,n,i]}e.exports=function e(t,r,o,u){u||(u=0);var g=o.gd;function T(){e(t,r,o,u++),(y(t[0])||o.hasText)&&M({redrawing:!0})}function M(e){var t={};void 0!==o.isActiveShape&&(o.isActiveShape=!1,t=b(r,o)),void 0!==o.isActiveSelection&&(o.isActiveSelection=!1,t=_(r,o),g._fullLayout._reselect=!0),Object.keys(t).length&&l.call((e||{}).redrawing?"relayout":"_guiRelayout",g,t)}var C,A,E,I,O,P=g._fullLayout._zoomlayer,R=o.dragmode,L=a(R),j=s(R);((L||j)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",x(t)),u||!o.isActiveShape&&!o.isActiveSelection)||(O=function(e,t){for(var r=0;r1&&(2!==e.length||"Z"!==e[1][0])&&(0===I&&(e[0][0]="M"),t[E]=e,T(),M())}}()}}function U(e,r){!function(e,r){if(t.length)for(var n=0;n{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(28605),s=r(16541).readPaths,l=r(79971),c=r(47845),u=r(94512).clearOutlineControllers,d=r(66235),f=r(50973),h=r(99862).arrayEditor,p=r(63e3),m=r(19602),g=r(59781),v=r(21471),y=v.getPathString;function x(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove(),t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iD&&o>z&&!r.shiftKey?p.getCursor(a/i,1-s/o):"move";m(t,l),j=l.split("-")[0]}}function ne(n){b(e)||(N&&(_=Y(r.xanchor)),F&&(T=X(r.yanchor)),"path"===r.type?L=r.path:(d=N?r.x0:Y(r.x0),h=F?r.y0:X(r.y0),x=N?r.x1:Y(r.x1),w=F?r.y1:X(r.y1)),dw?(M=h,I="y0",C=w,O="y1"):(M=w,I="y1",C=h,O="y0"),re(n),le(l,r),ue(t,r,e),Q.moveFn="move"===j?ae:se,Q.altKey=n.altKey)}function ie(){b(e)||(m(t),ce(l),k(t,e,r),i.call("_guiRelayout",e,u.getUpdateObj()))}function oe(){b(e)||ce(l)}function ae(n,i){if("path"===r.type){var o=function(e){return e},a=o,u=o;N?U("xanchor",r.xanchor=K(_+n)):(a=function(e){return K(Y(e)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),F?U("yanchor",r.yanchor=$(T+i)):(u=function(e){return $(X(e)+i)},G&&"date"===G.type&&(u=v.encodeDate(u))),U("path",r.path=S(L,a,u))}else N?U("xanchor",r.xanchor=K(_+n)):(U("x0",r.x0=K(d+n)),U("x1",r.x1=K(x+n))),F?U("yanchor",r.yanchor=$(T+i)):(U("y0",r.y0=$(h+i)),U("y1",r.y1=$(w+i)));t.attr("d",y(e,r)),le(l,r),c(e,s,r,V)}function se(n,i){if(Z){var o=function(e){return e},a=o,u=o;N?U("xanchor",r.xanchor=K(_+n)):(a=function(e){return K(Y(e)+n)},H&&"date"===H.type&&(a=v.encodeDate(a))),F?U("yanchor",r.yanchor=$(T+i)):(u=function(e){return $(X(e)+i)},G&&"date"===G.type&&(u=v.encodeDate(u))),U("path",r.path=S(L,a,u))}else if(B){if("resize-over-start-point"===j){var f=d+n,p=F?h-i:h+i;U("x0",r.x0=N?f:K(f)),U("y0",r.y0=F?p:$(p))}else if("resize-over-end-point"===j){var m=x+n,g=F?w-i:w+i;U("x1",r.x1=N?m:K(m)),U("y1",r.y1=F?g:$(g))}}else{var b=function(e){return-1!==j.indexOf(e)},k=b("n"),W=b("s"),q=b("w"),J=b("e"),Q=k?M+i:M,ee=W?C+i:C,te=q?A+n:A,re=J?E+n:E;F&&(k&&(Q=M-i),W&&(ee=C-i)),(!F&&ee-Q>z||F&&Q-ee>z)&&(U(I,r[I]=F?Q:$(Q)),U(O,r[O]=F?ee:$(ee))),re-te>D&&(U(P,r[P]=N?te:K(te)),U(R,r[R]=N?re:K(re)))}t.attr("d",y(e,r)),le(l,r),c(e,s,r,V)}function le(e,t){function r(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]),i=1;n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":i}).classed("visual-cue",!0);var a=Y(N?t.xanchor:o.midRange(r?[t.x0,t.x1]:v.extractPathCoords(t.path,g.paramIsX))),s=X(F?t.yanchor:o.midRange(r?[t.y0,t.y1]:v.extractPathCoords(t.path,g.paramIsY)));if(a=v.roundPositionForSharpStrokeRendering(a,i),s=v.roundPositionForSharpStrokeRendering(s,i),N&&F){var l="M"+(a-1-i)+","+(s-1-i)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(N){var c="M"+(a-1-i)+","+(s-9-i)+"v18 h2 v-18 Z";n.attr("d",c)}else{var u="M"+(a-9-i)+","+(s-1-i)+"h18 v2 h-18 Z";n.attr("d",u)}}(N||F)&&r()}function ce(e){e.selectAll(".visual-cue").remove()}function ue(e,t,r){var n=t.xref,i=t.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),f.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}p.init(Q),J.node().onmousemove=re}(e,z,u,t,r,j):!0===u.editable&&z.style("pointer-events",R||d.opacity(E)*A<=.5?"stroke":"all");z.node().addEventListener("click",(function(){return function(e,t){if(!w(e))return;var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex)return void T(e);e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=T,x(e)}}(e,z)}))}}function k(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");f.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function S(e,t,r){return e.replace(g.segmentRE,(function(e){var n=0,i=e.charAt(0),o=g.paramIsX[i],a=g.paramIsY[i],s=g.numParams[i];return i+e.substr(1).replace(g.paramRE,(function(e){return n>=s||(o[n]?e=t(e):a[n]&&(e=r(e)),n++),e}))}))}function T(e){w(e)&&(e._fullLayout._activeShapeIndex>=0&&(u(e),delete e._fullLayout._activeShapeIndex,x(e)))}e.exports={draw:x,drawOne:_,eraseActiveShape:function(e){if(!w(e))return;u(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var n=r(18693).overrideAll,i=r(27231),o=r(92948),a=r(93701).P,s=r(10191).extendFlat,l=r(32191).R,c=r(3830);e.exports=n({newshape:{visible:s({},i.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:s({},i.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:s({},i.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:o({description:["Sets this legend group's title font."].join(" ")})},legendrank:s({},i.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:s({},i.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:s({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:s({},i.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:o({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root")},72694:e=>{"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)}},66503:(e,t,r)=>{"use strict";var n=r(66235),i=r(53787);e.exports=function(e,t,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var o=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(o)),r("newshape.line.dash")}var a="drawline"===e.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",a?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(a,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},16541:(e,t,r)=>{"use strict";var n=r(76170),i=r(72694),o=i.CIRCLE_SIDES,a=i.SQRT2,s=r(10977),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],d=[0,3,4,1,2];function f(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}t.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var n=r(57873),i=n.drawMode,o=n.openMode,a=r(72694),s=a.i000,l=a.i090,c=a.i180,u=a.i270,d=a.cos45,f=a.sin45,h=r(10977),p=h.p2r,m=h.r2p,g=r(94512).clearOutline,v=r(16541),y=v.readPaths,x=v.writePaths,b=v.ellipseOver,w=v.fixDatesForPaths;function _(e,t,r){var n,i=e[0][0],a=t.gd,h=i.getAttribute("d"),g=a._fullLayout.newshape,v=t.plotinfo,_=t.isActiveShape,k=v.xaxis,S=v.yaxis,T=!!v.domain||!v.xaxis,M=!!v.domain||!v.yaxis,C=o(r),A=y(h,a,v,_),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:T?"paper":k._id,yref:M?"paper":S._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(C||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===A.length&&(n=A[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var I=n[s][1],O=n[l][1],P=n[c][1],R=n[u][1],L=n[s][2],j=n[l][2],D=n[c][2],z=n[u][2],N=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),F=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);N&&(I=m(v.xaxis,I),O=m(v.xaxis,O),P=m(v.xaxis,P),R=m(v.xaxis,R)),F&&(L=m(v.yaxis,L),j=m(v.yaxis,j),D=m(v.yaxis,D),z=m(v.yaxis,z));var B=(O+R)/2,Z=(L+D)/2,U=b({x0:B,y0:Z,x1:B+(R-O+P-I)/2*d,y1:Z+(z-j+D-L)/2*f});N&&(U.x0=p(v.xaxis,U.x0),U.x1=p(v.xaxis,U.x1)),F&&(U.y0=p(v.yaxis,U.y0),U.y1=p(v.yaxis,U.y1)),E.x0=U.x0,E.y0=U.y0,E.x1=U.x1,E.y1=U.y1}else E.type="path",k&&S&&w(A,k,S),E.path=x(A),n=null;return E}e.exports={newShapes:function(e,t){if(e.length&&e[0][0]){var r=t.gd,n=t.isActiveShape,o=t.dragmode,a=(r.layout||{}).shapes||[];if(!i(o)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s{"use strict";e.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}},21471:(e,t,r)=>{"use strict";var n=r(59781),i=r(53787),o=r(28605);t.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},t.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},t.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},t.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},t.extractPathCoords=function(e,t,r){var o=[];return e.match(n.segmentRE).forEach((function(e){var a=t[e.charAt(0)].drawn;if(void 0!==a){var s=e.substr(1).match(n.paramRE);if(s&&!(s.lengthh&&(e="X"),e}));return o>h&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+e)),u+p}))}(r,s,c);if("pixel"===r.xsizemode){var b=s(r.xanchor);u=b+r.x0,d=b+r.x1}else u=s(r.x0),d=s(r.x1);if("pixel"===r.ysizemode){var w=c(r.yanchor);f=w-r.y0,h=w-r.y1}else f=c(r.y0),h=c(r.y1);if("line"===p)return"M"+u+","+f+"L"+d+","+h;if("rect"===p)return"M"+u+","+f+"H"+d+"V"+h+"H"+u+"Z";var _=(u+d)/2,k=(f+h)/2,S=Math.abs(_-u),T=Math.abs(k-f),M="A"+S+","+T,C=_+S+","+k;return"M"+C+M+" 0 1,1 "+(_+","+(k-T))+M+" 0 0,1 "+C+"Z"}},30407:(e,t,r)=>{"use strict";var n=r(75629);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(13216),supplyLayoutDefaults:r(49410),supplyDrawNewShapeDefaults:r(66503),includeBasePlot:r(49861)("shapes"),calcAutorange:r(28859),draw:n.draw,drawOne:n.drawOne}},3830:e=>{"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function i(e,r,n){return t(e.y1,n)-t(e.y0,n)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:i(e,0,r)/n(e,t)},dx:n,dy:i,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(i(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(i(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,i){return r((t(e.y1,i)+t(e.y0,i))/2,i)}}},68241:(e,t,r)=>{"use strict";var n=r(92948),i=r(84958),o=r(10191).extendDeepAll,a=r(18693).overrideAll,s=r(83672),l=r(99862).templatedArray,c=r(91127),u=l("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});e.exports=a(l("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:o(i({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:n({description:"Sets the font of the current value label text."})},font:n({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:c.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:c.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:c.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:c.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root")},91127:e=>{"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}},21898:(e,t,r)=>{"use strict";var n=r(53787),i=r(80254),o=r(68241),a=r(91127).name,s=o.steps;function l(e,t,r){function a(r,i){return n.coerce(e,t,o,r,i)}for(var s=i(e,t,{name:"steps",handleItemDefaults:c}),l=0,u=0;u{"use strict";var n=r(8996),i=r(44115),o=r(66235),a=r(50973),s=r(53787),l=s.strTranslate,c=r(98224),u=r(99862).arrayEditor,d=r(91127),f=r(81653),h=f.LINE_SPACING,p=f.FROM_TL,m=f.FROM_BR;function g(e){return d.autoMarginIdRoot+e._index}function v(e){return e._index}function y(e,t){var r=a.tester.selectAll("g."+d.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(d.labelGroupClass,!0);var o=0,l=0;r.each((function(e){var r=w(n.select(this),{step:e},t).node();if(r){var i=a.bBox(r);l=Math.max(l,i.height),o=Math.max(o,i.width)}})),r.remove();var u=t._dims={};u.inputAreaWidth=Math.max(d.railWidth,d.gripHeight);var f=e._fullLayout._size;u.lx=f.l+f.w*t.x,u.ly=f.t+f.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(f.w*t.len):u.outerLength=t.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-t.pad.l-t.pad.r);var h=(u.inputAreaLength-2*d.stepInset)/(t._stepCount-1),v=o+d.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(v/h)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var y=a.tester.append("g");r.each((function(e){var r=x(y,t,e.label),n=r.node()&&a.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+t.currentvalue.offset,y.remove()}u.height=u.currentValueTotalHeight+d.tickOffset+t.ticklen+d.labelOffset+u.labelHeight+t.pad.t+t.pad.b;var b="left";s.isRightAnchor(t)&&(u.lx-=u.outerLength,b="right"),s.isCenterAnchor(t)&&(u.lx-=u.outerLength/2,b="center");var _="top";s.isBottomAnchor(t)&&(u.ly-=u.height,_="bottom"),s.isMiddleAnchor(t)&&(u.ly-=u.height/2,_="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var k={y:t.y,b:u.height*m[_],t:u.height*p[_]};"fraction"===t.lenmode?(k.l=0,k.xl=t.x-t.len*p[b],k.r=0,k.xr=t.x+t.len*m[b]):(k.x=t.x,k.l=u.outerLength*p[b],k.r=u.outerLength*m[b]),i.autoMargin(e,g(t),k)}function x(e,t,r){if(t.currentvalue.visible){var n,i,o=t._dims;switch(t.currentvalue.xanchor){case"right":n=o.inputAreaLength-d.currentValueInset-o.currentValueMaxWidth,i="left";break;case"center":n=.5*o.inputAreaLength,i="middle";break;default:n=d.currentValueInset,i="left"}var l=s.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":i,"data-notex":1})})),u=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"===typeof r)u+=r;else{var f=t.steps[t.active].label,p=t._gd._fullLayout._meta;p&&(f=s.templateString(f,p)),u+=f}t.currentvalue.suffix&&(u+=t.currentvalue.suffix),l.call(a.font,t.currentvalue.font).text(u).call(c.convertToTspans,t._gd);var m=c.lineCount(l),g=(o.currentValueMaxLines+1-m)*t.currentvalue.font.size*h;return c.positionText(l,n,g),l}}function b(e,t,r){s.ensureSingle(e,"rect",d.gripRectClass,(function(n){n.call(T,t,e,r).style("pointer-events","all")})).attr({width:d.gripWidth,height:d.gripHeight,rx:d.gripRadius,ry:d.gripRadius}).call(o.stroke,r.bordercolor).call(o.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function w(e,t,r){var n=s.ensureSingle(e,"text",d.labelClass,(function(e){e.attr({"text-anchor":"middle","data-notex":1})})),i=t.step.label,o=r._gd._fullLayout._meta;return o&&(i=s.templateString(i,o)),n.call(a.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function _(e,t){var r=s.ensureSingle(e,"g",d.labelsClass),i=t._dims,o=r.selectAll("g."+d.labelGroupClass).data(i.labelSteps);o.enter().append("g").classed(d.labelGroupClass,!0),o.exit().remove(),o.each((function(e){var r=n.select(this);r.call(w,e,t),a.setTranslate(r,A(t,e.fraction),d.tickOffset+t.ticklen+t.font.size*h+d.labelOffset+i.currentValueTotalHeight)}))}function k(e,t,r,n,i){var o=Math.round(n*(r._stepCount-1)),a=r._visibleSteps[o]._index;a!==r.active&&S(e,t,r,a,!0,i)}function S(e,t,r,n,o,a){var s=r.active;r.active=n,u(e.layout,d.name,r).applyUpdate("active",n);var l=r.steps[r.active];t.call(C,r,a),t.call(x,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:o,previousActive:s}),l&&l.method&&o&&(t._nextMethod?(t._nextMethod.step=l,t._nextMethod.doCallback=o,t._nextMethod.doTransition=a):(t._nextMethod={step:l,doCallback:o,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame((function(){var r=t._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function T(e,t,r){if(!t._context.staticPlot){var i=r.node(),a=n.select(t);e.on("mousedown",l),e.on("touchstart",l)}function s(){return r.data()[0]}function l(){var e=s();t.emit("plotly_sliderstart",{slider:e});var l=r.select("."+d.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(o.fill,e.activebgcolor);var c=E(e,n.mouse(i)[0]);function u(){var e=s(),o=E(e,n.mouse(i)[0]);k(t,r,e,o,!1)}function f(){var e=s();e._dragging=!1,l.call(o.fill,e.bgcolor),a.on("mouseup",null),a.on("mousemove",null),a.on("touchend",null),a.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}k(t,r,e,c,!0),e._dragging=!0,a.on("mousemove",u),a.on("touchmove",u),a.on("mouseup",f),a.on("touchend",f)}}function M(e,t){var r=e.selectAll("rect."+d.tickRectClass).data(t._visibleSteps),i=t._dims;r.enter().append("rect").classed(d.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(e,r){var s=r%i.labelStride===0,l=n.select(this);l.attr({height:s?t.ticklen:t.minorticklen}).call(o.fill,t.tickcolor),a.setTranslate(l,A(t,r/(t._stepCount-1))-.5*t.tickwidth,(s?d.tickOffset:d.minorTickOffset)+i.currentValueTotalHeight)}))}function C(e,t,r){for(var n=e.select("rect."+d.gripRectClass),i=0,o=0;o0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",l(a-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function A(e,t){var r=e._dims;return r.inputAreaStart+d.stepInset+(r.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*d.stepInset-2*r.inputAreaStart)))}function I(e,t,r){var n=r._dims,i=s.ensureSingle(e,"rect",d.railTouchRectClass,(function(n){n.call(T,t,e,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,d.tickOffset+r.ticklen+n.labelHeight)}).call(o.fill,r.bgcolor).attr("opacity",0),a.setTranslate(i,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*d.railInset,i=s.ensureSingle(e,"rect",d.railRectClass);i.attr({width:n,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,t.bordercolor).call(o.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(i,d.railInset,.5*(r.inputAreaWidth-d.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,o=function(e,t){for(var r=e[d.name],n=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,g(t))}if(s.enter().append("g").classed(d.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+d.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+d.groupClassName).data(o,v);c.enter().append("g").classed(d.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u{"use strict";var n=r(91127);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(68241),supplyLayoutDefaults:r(21898),draw:r(66982)}},34906:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(44115),a=r(44049),s=r(53787),l=s.strTranslate,c=r(50973),u=r(66235),d=r(98224),f=r(26880),h=r(81653).OPPOSITE_SIDE,p=/ [XY][0-9]* /;e.exports={draw:function(e,t,r){var m,g=r.propContainer,v=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},w=r.attributes,_=r.transform,k=r.containerGroup,S=e._fullLayout,T=1,M=!1,C=g.title,A=(C&&C.text?C.text:"").trim(),E=C&&C.font?C.font:{},I=E.family,O=E.size,P=E.color;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var R=e._context.edits[m];""===A?T=0:A.replace(p," % ")===y.replace(p," % ")&&(T=.2,M=!0,R||(A="")),r._meta?A=s.templateString(A,r._meta):S._meta&&(A=s.templateString(A,S._meta));var L,j=A||R;k||(k=s.ensureSingle(S._infolayer,"g","g-"+t),L=S._hColorbarMoveTitle);var D=k.selectAll("text").data(j?[0]:[]);if(D.enter().append("text"),D.text(A).attr("class",t),D.exit().remove(),!j)return k;function z(e){s.syncOrAsync([N,F],e)}function N(t){var r;return!_&&L&&(_={}),_?(r="",_.rotate&&(r+="rotate("+[_.rotate,w.x,w.y]+")"),(_.offset||L)&&(r+=l(0,(_.offset||0)-(L||0)))):r=null,t.attr("transform",r),t.style({"font-family":I,"font-size":n.round(O,2)+"px",fill:u.rgb(P),opacity:T*u.opacity(P),"font-weight":o.fontWeight}).attr(w).call(d.convertToTspans,e),o.previousPromises(e)}function F(t){var r=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&A){r.attr("transform",null);var o=h[b.side],a="left"===b.side||"top"===b.side?-1:1,u=i(b.pad)?b.pad:2,d=c.bBox(r.node()),f={t:0,b:0,l:0,r:0},p=e._fullLayout._reservedMargin;for(var m in p)for(var v in p[m]){var y=p[m][v];f[v]=Math.max(f[v],y)}var x={left:f.l,top:f.t,right:S.width-f.r,bottom:S.height-f.b},w=b.maxShift||a*(x[b.side]-d[b.side]),_=0;if(w<0)_=w;else{var k=b.offsetLeft||0,T=b.offsetTop||0;d.left-=k,d.right-=k,d.top-=T,d.bottom-=T,b.selection.each((function(){var e=c.bBox(this);s.bBoxIntersect(d,e,u)&&(_=Math.max(_,a*(e[b.side]-d[o])+u))})),_=Math.min(w,_),g._titleScoot=Math.abs(_)}if(_>0||w<0){var M={left:[-_,0],right:[_,0],top:[0,-_],bottom:[0,_]}[b.side];r.attr("transform",l(M[0],M[1]))}}}return D.call(z),R&&(A?D.on(".opacity",null):(T=0,M=!0,D.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),D.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?a.call("_guiRestyle",e,v,t,x):a.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(z)})).on("input",(function(e){this.text(e||" ").call(d.positionText,w.x,w.y)}))),D.classed("js-placeholder",M),k}}},33508:(e,t,r)=>{"use strict";var n=r(92948),i=r(18022),o=r(10191).extendFlat,a=r(18693).overrideAll,s=r(84958),l=r(99862).templatedArray,c=l("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}});e.exports=a(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:o(s({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:n({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:i.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root")},49770:e=>{"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},61103:(e,t,r)=>{"use strict";var n=r(53787),i=r(80254),o=r(33508),a=r(49770).name,s=o.buttons;function l(e,t,r){function a(r,i){return n.coerce(e,t,o,r,i)}a("visible",i(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),n.noneOrAll(e,t,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),n.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function c(e,t){function r(r,i){return n.coerce(e,t,s,r,i)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:l})}},86868:(e,t,r)=>{"use strict";var n=r(8996),i=r(44115),o=r(66235),a=r(50973),s=r(53787),l=r(98224),c=r(99862).arrayEditor,u=r(81653).LINE_SPACING,d=r(49770),f=r(12271);function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,i,o,a,s){t.active=a,c(e.layout,d.name,t).applyUpdate("active",a),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(i.attr(d.menuIndexAttrName,"-1"),g(e,n,i,o,t),s||v(e,n,i,o,t))}function g(e,t,r,n,i){var o=s.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||d.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};o.call(y,i,u,e).call(M,i,f,h),s.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(a.font,i.font).text(d.arrowSymbol[i.direction])})).attr({x:l.headerWidth-d.arrowOffsetX+i.pad.l,y:l.headerHeight/2+d.textOffsetY+i.pad.t}),o.on("click",(function(){r.call(C,String(p(r,i)?-1:i._index)),v(e,t,r,n,i)})),o.on("mouseover",(function(){o.call(_)})),o.on("mouseout",(function(){o.call(k,i)})),a.setTranslate(t,l.lx,l.ly)}function v(e,t,r,o,a){r||(r=t).attr("pointer-events","all");var l=function(e){return-1===+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==a.type?[]:a.buttons,c="dropdown"===a.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===a.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,v=a._dims,x=-1!==["up","down"].indexOf(a.direction);"dropdown"===a.type&&(x?g=v.headerHeight+d.gapButtonHeader:p=v.headerWidth+d.gapButtonHeader),"dropdown"===a.type&&"up"===a.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===a.type&&"left"===a.direction&&(p=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+p+a.pad.l,y:v.ly+g+a.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},S={l:b.x+a.borderwidth,t:b.y+a.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,a,s,e).call(M,a,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&a.active===l?(m(e,a,0,t,r,o,-1),i.executeAPICommand(e,s.method,s.args2)):(m(e,a,0,t,r,o,l),i.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:a,button:s,active:a.active}))})),c.on("mouseover",(function(){c.call(_)})),c.on("mouseout",(function(){c.call(k,a),u.call(w,a)}))})),u.call(w,a),x?(S.w=Math.max(v.openWidth,v.headerWidth),S.h=b.y-S.t):(S.w=b.x-S.l,S.h=Math.max(v.openHeight,v.headerHeight)),S.direction=a.direction,o&&(u.size()?function(e,t,r,n,i,o){var a,s,l,c=i.direction,u="up"===c||"down"===c,f=i._dims,h=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(a.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),a.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(o)})).remove(),0!==r.length){var l=a.selectAll("g."+d.headerGroupClassName).data(r,h);l.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=s.ensureSingle(a,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u{"use strict";var n=r(49770);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(33508),supplyLayoutDefaults:r(61103),draw:r(86868)}},12271:(e,t,r)=>{"use strict";e.exports=s;var n=r(8996),i=r(66235),o=r(50973),a=r(53787);function s(e,t,r){this.gd=e,this.container=t,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(e,t,r){var a=this.gd._fullLayout,l=a.width,c=a.height;this.position=e;var u,d,f,h,p=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,x="down"===y,b="left"===y,w="up"===y,_=m,k=v;x||b||"right"===y||w||(this.position.direction="down",x=!0),x||w?(d=(u=p)+_,x?(f=g,k=(h=Math.min(f+k,c))-f):k=(h=g+k)-(f=Math.max(h-k,0))):(h=(f=g)+k,b?_=(d=p+_)-(u=Math.max(d-_,0)):(u=p,_=(d=Math.min(u+_,l))-u)),this._box={l:u,t:f,w:_,h:k};var S=m>_,T=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,C=p,A=g+v;A+M>c&&(A=c-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(S?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),S?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:C,y:A,width:T,height:M}),this._hbarXMin=C+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var I=v>k,O=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,R=p+m,L=g;R+O>l&&(R=l-O);var j=this.container.selectAll("rect.scrollbar-vertical").data(I?[0]:[]);j.exit().on(".drag",null).remove(),j.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),I?(this.vbar=j.attr({rx:s.barRadius,ry:s.barRadius,x:R,y:L,width:O,height:P}),this._vbarYMin=L+P/2,this._vbarTranslateMax=k-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,z=u-.5,N=I?d+O+.5:d+.5,F=f-.5,B=S?h+M+.5:h+.5,Z=a._topdefs.selectAll("#"+D).data(S||I?[0]:[]);if(Z.exit().remove(),Z.enter().append("clipPath").attr("id",D).append("rect"),S||I?(this._clipRect=Z.select("rect").attr({x:Math.floor(z),y:Math.floor(F),width:Math.ceil(N)-Math.floor(z),height:Math.ceil(B)-Math.floor(F)}),this.container.call(o.setClipUrl,D,this.gd),this.bg.attr({x:p,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),S||I){var U=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(U);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));S&&this.hbar.on(".drag",null).call(V),I&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,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(o.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,i=r+this._hbarTranslateMax;e=(a.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(n.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(o.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var i=e/r;this.hbar.call(o.setTranslate,e+i*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(o.setTranslate,e,t+s*this._vbarTranslateMax)}}},81653:e=>{"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"}}},71896:e=>{"use strict";e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"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",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},59933:e=>{"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},41287:e=>{"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"}},81494:e=>{"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},72301:e=>{"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]}},79291:e=>{"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},26880:e=>{"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},24956:e=>{"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:"\u2212"}},70059:(e,t)=>{"use strict";t.CSS_DECLARATIONS=[["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"]],t.STYLE=t.CSS_DECLARATIONS.map((function(e){return e.join(": ")+"; "})).join("")},83580:(e,t)=>{"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},332:(e,t,r)=>{"use strict";t.version=r(75703).version,r(4142),r(95064);for(var n=r(44049),i=t.register=n.register,o=r(41744),a=Object.keys(o),s=0;s{"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:["",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},68382:(e,t)=>{"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},66523:(e,t,r)=>{"use strict";var n=r(16791),i=n.mod,o=n.modHalf,a=Math.PI,s=2*a;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function c(e,t){return o(t-e,s)}function u(e,t){if(l(t))return!0;var r,n;t[0](n=i(n,s))&&(n+=s);var o=i(e,s),a=o+s;return o>=r&&o<=n||a>=r&&a<=n}function d(e,t,r,n,i,o,c){i=i||0,o=o||0;var u,d,f,h,p,m=l([r,n]);function g(e,t){return[e*Math.cos(t)+i,o-e*Math.sin(t)]}m?(u=0,d=a,f=s):r=i&&e<=o);var i,o},pathArc:function(e,t,r,n,i){return d(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return d(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,o){return d(e,t,r,n,i,o,1)}}},50146:(e,t)=>{"use strict";var r=Array.isArray,n=ArrayBuffer,i=DataView;function o(e){return n.isView(e)&&!(e instanceof i)}function a(e){return r(e)||o(e)}function s(e,t,r){if(a(e)){if(a(e[0])){for(var n=r,i=0;i{"use strict";var n=r(51908),i=r(24956).BADNUM,o=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;e.exports=function(e){return"string"===typeof e&&(e=e.replace(o,"")),n(e)?Number(e):i}},24513:e=>{"use strict";e.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},98067:e=>{"use strict";e.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},56264:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(27231),a=r(88401),s=r(66235),l=r(26880).DESELECTDIM,c=r(22506),u=r(64563).counter,d=r(16791).modHalf,f=r(50146).isArrayOrTypedArray;function h(e,r){var n=t.valObjectMeta[r.valType];if(r.arrayOk&&f(e))return!0;if(n.validateFunction)return n.validateFunction(e,r);var i={},o=i,a={set:function(e){o=e}};return n.coerceFunction(e,a,i,r),o!==i}t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){f(e)?t.set(e):void 0!==r&&t.set(r)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni.max?t.set(r):t.set(+e)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(e,t,r,i){e%1||!n(e)||void 0!==i.min&&ei.max?t.set(r):t.set(+e)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(e,t,r,n){if("string"!==typeof e){var i="number"===typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){i(e).isValid()?t.set(e):t.set(r)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return i(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(a.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(e,t,r){t.set(a.get(e,r))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(e,t,r,n){var i=n.regex||u(r);"string"===typeof e&&i.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"===typeof e&&!!u(r).test(e)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"===typeof e){for(var i=e.split("+"),o=0;o{"use strict";var n,i,o=r(97390).i$,a=r(51908),s=r(95169),l=r(16791).mod,c=r(24956),u=c.BADNUM,d=c.ONEDAY,f=c.ONEHOUR,h=c.ONEMIN,p=c.ONESEC,m=c.EPOCHJD,g=r(44049),v=r(97390).g0,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 w(e){return e&&g.componentsRegistry.calendars&&"string"===typeof e&&"gregorian"!==e}function _(e,t){return String(e+Math.pow(10,t)).substr(1)}t.dateTick0=function(e,r){var n=function(e,t){return w(e)?t?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:g.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!r);if(r<2)return n;var i=t.dateTime2ms(n,e);return i+=d*(r-1),t.ms2DateTime(i,0,e)},t.dfltRange=function(e){return w(e)?g.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},t.isJSDate=function(e){return"object"===typeof e&&null!==e&&"function"===typeof e.getTime},t.dateTime2ms=function(e,r){if(t.isJSDate(e)){var o=e.getTimezoneOffset()*h,a=(e.getUTCMinutes()-e.getMinutes())*h+(e.getUTCSeconds()-e.getSeconds())*p+(e.getUTCMilliseconds()-e.getMilliseconds());if(a){var s=3*h;o=o-s/2+l(a-o+s/2,s)}return(e=Number(e)-o)>=n&&e<=i?e:u}if("string"!==typeof e&&"number"!==typeof e)return u;e=String(e);var c=w(r),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),r="");var _=c&&"chinese"===r.substr(0,7),k=e.match(_?x:y);if(!k)return u;var S=k[1],T=k[3]||"1",M=Number(k[5]||1),C=Number(k[7]||0),A=Number(k[9]||0),E=Number(k[11]||0);if(c){if(2===S.length)return u;var I;S=Number(S);try{var O=g.getComponentMethod("calendars","getCal")(r);if(_){var P="i"===T.charAt(T.length-1);T=parseInt(T,10),I=O.newDate(S,O.toMonthIndex(S,T,P),M)}else I=O.newDate(S,Number(T),M)}catch(L){return u}return I?(I.toJD()-m)*d+C*f+A*h+E*p:u}S=2===S.length?(Number(S)+2e3-b)%100+b:Number(S),T-=1;var R=new Date(Date.UTC(2e3,T,M,C,A));return R.setUTCFullYear(S),R.getUTCMonth()!==T||R.getUTCDate()!==M?u:R.getTime()+E*p},n=t.MIN_MS=t.dateTime2ms("-9999"),i=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==u};var k=90*d,S=3*f,T=5*h;function M(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+_(t,2)+":"+_(r,2),(n||i)&&(e+=":"+_(n,2),i))){for(var o=4;i%10===0;)o-=1,i/=10;e+="."+_(i,o)}return e}t.ms2DateTime=function(e,t,r){if("number"!==typeof e||!(e>=n&&e<=i))return u;t||(t=0);var o,a,s,c,y,x,b=Math.floor(10*l(e+.05,1)),_=Math.round(e-b/10);if(w(r)){var C=Math.floor(_/d)+m,A=Math.floor(l(e,d));try{o=g.getComponentMethod("calendars","getCal")(r).fromJD(C).formatDate("yyyy-mm-dd")}catch(E){o=v("G%Y-%m-%d")(new Date(_))}if("-"===o.charAt(0))for(;o.length<11;)o="-0"+o.substr(1);else for(;o.length<10;)o="0"+o;a=t=n+d&&e<=i-d))return u;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return M(o("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===u)return r;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(w(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return s.error("unrecognized date",e),r;return e};var C=/%\d?f/g,A=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function I(e,t,r,n){e=e.replace(C,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(A,(function(){return E[r("%q")(i)]})),w(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(o){return"Invalid"}return r(e)(i)}var O=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,i,o){if(i=w(i)&&i,!t)if("y"===r)t=o.year;else if("m"===r)t=o.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,d),n=_(Math.floor(r/f),2)+":"+_(l(Math.floor(r/h),60),2);if("M"!==t){a(t)||(t=0);var i=(100+Math.min(l(e/p,60),O[t])).toFixed(t).substr(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(e,r)+"\n"+I(o.dayMonthYear,e,n,i);t=o.dayMonth+"\n"+o.year}return I(t,e,n,i)};var P=3*d;t.incrementMonth=function(e,t,r){r=w(r)&&r;var n=l(e,d);if(e=Math.round(e-n),r)try{var i=Math.round(e/d)+m,o=g.getComponentMethod("calendars","getCal")(r),a=o.fromJD(i);return t%12?o.add(a,t,"m"):o.add(a,t/12,"y"),(a.toJD()-m)*d+n}catch(u){s.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},t.findExactDates=function(e,t){for(var r,n,i=0,o=0,s=0,l=0,c=w(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";var n=r(8996),i=r(95169),o=r(37812),a=r(12903);function s(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function l(e,t,r){var n="plotly.js-style-"+e,o=document.getElementById(n);o||((o=document.createElement("style")).setAttribute("id",n),o.appendChild(document.createTextNode("")),document.head.appendChild(o));var a=o.sheet;a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):i.warn("addStyleRule failed")}function c(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function u(e){for(var t=[];d(e);)t.push(e),e=e.parentNode;return t}function d(e){return e&&(e instanceof Element||e instanceof HTMLElement)}e.exports={getGraphDiv:function(e){var t;if("string"===typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null===e||void 0===e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(e,t){l("global",e,t)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&s(r)},getFullTransformMatrix:function(e){var t=u(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=c(e);if(t){var n=o.convertCssMatrix(t);r=a.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},24521:(e,t,r)=>{"use strict";var n=r(68041).EventEmitter,i={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){"undefined"!==typeof jQuery&&jQuery(e).trigger(n,i),t.emit(n,i),r.emit(n,i)},e},triggerHandler:function(e,t,r){var n,i;"undefined"!==typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var o=e._ev;if(!o)return n;var a,s=o._events[t];if(!s)return n;function l(e){return e.listener?(o.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(o,[r]))):e.apply(o,[r])}for(s=Array.isArray(s)?s:[s],a=0;a{"use strict";var n=r(47623),i=Array.isArray;function o(e,t,r,a){var s,l,c,u,d,f,h,p=e[0],m=e.length;if(2===m&&i(p)&&i(e[1])&&0===p.length){if(h=function(e,t){var r,n;for(r=0;r{"use strict";e.exports=function(e){for(var t={},r=[],n=0,i=0;i{"use strict";function t(e){return!0===e.visible}function r(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}e.exports=function(e){for(var n,i=(n=e,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:t),o=[],a=0;a{"use strict";var n=r(8996),i=r(87918),o=r(94609),a=r(20866),s=r(38441),l=r(63569),c=r(95169),u=r(47623),d=r(22506),f=r(71962),h=Object.keys(i),p={"ISO-3":l,"USA-states":l,"country names":function(e){for(var t=0;t0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var o=f.tester(r);o.pts.pop(),l.push(o)}:function(e){l.push(f.tester(e))},o.type){case"MultiPolygon":for(r=0;ri&&(i=c,t=l)}else t=r;return a.default(t).geometry.coordinates}(u),n.fIn=e,n.fOut=u,s.push(u)}else c.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 f=r.features;for(n=0;n100?(clearInterval(o),n("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var a=0;a{"use strict";var n=r(24956).BADNUM;t.calcTraceToLineCoords=function(e){for(var t=e[0].trace.connectgaps,r=[],i=[],o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},t.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},t.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var n,i,o,a=r(16791).mod;function s(e,t,r,n,i,o,a,s){var l=r-e,c=i-e,u=a-i,d=n-t,f=o-t,h=s-o,p=l*h-u*d;if(0===p)return null;var m=(c*h-u*f)/p,g=(c*d-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+d*m}}function l(e,t,r,n,i){var o=n*e+i*t;if(o<0)return n*n+i*i;if(o>r){var a=n-e,s=i-t;return a*a+s*s}var l=n*t-i*e;return l*l/r}t.segmentsIntersect=s,t.segmentDistance=function(e,t,r,n,i,o,a,c){if(s(e,t,r,n,i,o,a,c))return 0;var u=r-e,d=n-t,f=a-i,h=c-o,p=u*u+d*d,m=f*f+h*h,g=Math.min(l(u,d,p,i-e,o-t),l(u,d,p,a-e,c-t),l(f,h,m,e-i,t-o),l(f,h,m,r-i,n-o));return Math.sqrt(g)},t.getTextLocation=function(e,t,r,s){if(e===i&&s===o||(n={},i=e,o=s),n[r])return n[r];var l=e.getPointAtLength(a(r-s/2,t)),c=e.getPointAtLength(a(r+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),d=e.getPointAtLength(a(r,t)),f={x:(4*d.x+l.x+c.x)/6,y:(4*d.y+l.y+c.y)/6,theta:u};return n[r]=f,f},t.clearLocationCache=function(){i=null},t.getVisibleSegment=function(e,t,r){var n,i,o=t.left,a=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(i=r);var c=r.xa?r.x-a:0,d=r.yl?r.y-l:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+r)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+r))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var i,o,a,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,d=0,f=0,h=s;d0?h=i:f=i,d++}return o}},95049:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(43721),a=r(10948),s=r(18022).defaultLine,l=r(50146).isArrayOrTypedArray,c=o(s),u=1;function d(e,t){var r=e;return r[3]*=t,r}function f(e){if(n(e))return c;var t=o(e);return t.length?t:c}function h(e){return n(e)?e:u}e.exports={formatColor:function(e,t,r){var n,i,s,p,m,g=e.color,v=l(g),y=l(t),x=a.extractOpts(e),b=[];if(n=void 0!==x.colorscale?a.makeColorScaleFuncFromTrace(e):f,i=v?function(e,t){return void 0===e[t]?c:o(n(e[t]))}:f,s=y?function(e,t){return void 0===e[t]?u:h(e[t])}:h,v||y)for(var w=0;w{"use strict";var n=r(63569);function i(e){return[e]}e.exports={keyFun:function(e){return e.key},repeat:i,descend:n,wrap:i,unwrap:function(e){return e[0]}}},63569:e=>{"use strict";e.exports=function(e){return e}},85733:e=>{"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var o=String(t).length;if(i>=String(e).length+o){var a=parseFloat(n).toPrecision(12);-1===a.indexOf("e+")&&(n=+a)}}return n}},53787:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).g0,o=r(95601).WU,a=r(51908),s=r(24956),l=s.FP_SAFE,c=-l,u=s.BADNUM,d=e.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=o(d.adjustFormat(e))}catch(r){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=r(22506),d.keyedContainer=r(37326),d.relativeAttr=r(68864),d.isPlainObject=r(47623),d.toLogRange=r(3324),d.relinkPrivateKeys=r(60077);var h=r(50146);d.isTypedArray=h.isTypedArray,d.isArrayOrTypedArray=h.isArrayOrTypedArray,d.isArray1D=h.isArray1D,d.ensureArray=h.ensureArray,d.concat=h.concat,d.maxRowLength=h.maxRowLength,d.minRowLength=h.minRowLength;var p=r(16791);d.mod=p.mod,d.modHalf=p.modHalf;var m=r(56264);d.valObjectMeta=m.valObjectMeta,d.coerce=m.coerce,d.coerce2=m.coerce2,d.coerceFont=m.coerceFont,d.coercePattern=m.coercePattern,d.coerceHoverinfo=m.coerceHoverinfo,d.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,d.validate=m.validate;var g=r(56255);d.dateTime2ms=g.dateTime2ms,d.isDateTime=g.isDateTime,d.ms2DateTime=g.ms2DateTime,d.ms2DateTimeLocal=g.ms2DateTimeLocal,d.cleanDate=g.cleanDate,d.isJSDate=g.isJSDate,d.formatDate=g.formatDate,d.incrementMonth=g.incrementMonth,d.dateTick0=g.dateTick0,d.dfltRange=g.dfltRange,d.findExactDates=g.findExactDates,d.MIN_MS=g.MIN_MS,d.MAX_MS=g.MAX_MS;var v=r(56141);d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=r(99238);var y=r(1809);d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=r(37812);d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(66523);d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var w=r(68382);d.isLeftAnchor=w.isLeftAnchor,d.isCenterAnchor=w.isCenterAnchor,d.isRightAnchor=w.isRightAnchor,d.isTopAnchor=w.isTopAnchor,d.isMiddleAnchor=w.isMiddleAnchor,d.isBottomAnchor=w.isBottomAnchor;var _=r(8224);d.segmentsIntersect=_.segmentsIntersect,d.segmentDistance=_.segmentDistance,d.getTextLocation=_.getTextLocation,d.clearLocationCache=_.clearLocationCache,d.getVisibleSegment=_.getVisibleSegment,d.findPointOnPath=_.findPointOnPath;var k=r(10191);d.extendFlat=k.extendFlat,d.extendDeep=k.extendDeep,d.extendDeepAll=k.extendDeepAll,d.extendDeepNoArrays=k.extendDeepNoArrays;var S=r(95169);d.log=S.log,d.warn=S.warn,d.error=S.error;var T=r(64563);d.counterRegex=T.counter;var M=r(57429);d.throttle=M.throttle,d.throttleDone=M.done,d.clearThrottle=M.clear;var C=r(90489);function A(e){var t={};for(var r in e)for(var n=e[r],i=0;il||e=t)&&(a(e)&&e>=0&&e%1===0)},d.noop=r(17295),d.identity=r(63569),d.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,i){for(var o=e.length,a=new Array(o),s=0;s=Math.pow(2,r)?i>10?(d.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,o,a=e.length,s=2*a,l=2*t-1,c=new Array(l),u=new Array(a);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=a&&(i=s-1-i),o+=e[i]*c[n];u[r]=o}return u},d.syncOrAsync=function(e,t,r){var n;function i(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,r){if(e){var n,i,o=!1,a=!0;for(n=0;n0?t:0}))},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var i=0;i1?i+a[1]:"";if(o&&(a.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+o+"$2");return s+l},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var j=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,n){var i;return j.test(n)?i=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,i=r[n]()),d.isValidTextValue(i)?i:""}))};var D={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return Z.apply(D,arguments)};var z={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return Z.apply(z,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;var F={max:10,count:0,name:"texttemplate",parseMultDiv:!0};d.texttemplateStringForShapes=function(){return Z.apply(F,arguments)};var B=/^[:|\|]/;function Z(e,t,r){var n=this,o=arguments;t||(t={});var a={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,f="xother_"===s||"yother_"===s,h="xother"===s||"yother"===s||c||f||u,p=s;(c||u)&&(p=p.substring(1)),(f||u)&&(p=p.substring(0,p.length-1));var m,g,v,y=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(N);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(m=t[p]))return""}else for(v=3;v=48&&a<=57,c=s>=48&&s<=57;if(l&&(n=10*n+a-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(a!==s)return a-s}}return i-n};var U=2e9;d.seedPseudoRandom=function(){U=2e9},d.pseudoRandom=function(){var e=U;return U=(69069*U+1)%4294967296,Math.abs(U-e)<429496729?d.pseudoRandom():U/4294967296},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(i))return n(i);var o=d.extractOption(e,t,"tx","text");return d.isValidTextValue(o)?n(o):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,d.strTranslate(i-c*(r+a),o-c*(n+s))+d.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var V=d.getFirefoxVersion(),H=null!==V&&V<86;d.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},47623:e=>{"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},37326:(e,t,r)=>{"use strict";var n=r(22506),i=/^\w*$/;e.exports=function(e,t,r,o){var a,s,l;r=r||"name",o=o||"value";var c={};t&&t.length?(l=n(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(a=0;a2)return c[t]=2|c[t],f.set(e,null);if(d){for(a=t;a{"use strict";var n=r(44049);e.exports=function(e,t){for(var r=e._context.locale,i=0;i<2;i++){for(var o=e._context.locales,a=0;a<2;a++){var s=(o[r]||{}).dictionary;if(s){var l=s[t];if(l)return l}o=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return t}},95169:(e,t,r)=>{"use strict";var n=r(5734).dfltConfig,i=r(98102),o=e.exports={};o.log=function(){var e;if(n.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},o.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},o.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},41499:(e,t,r)=>{"use strict";var n=r(8996);e.exports=function(e,t,r){var i=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var o=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][o]=n.select(this)})),i}},37812:(e,t,r)=>{"use strict";var n=r(12903);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";e.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},22506:(e,t,r)=>{"use strict";var n=r(51908),i=r(50146).isArrayOrTypedArray;function o(e,t){return function(){var r,n,a,s,l,c=e;for(s=0;s{"use strict";e.exports=function(){}},98102:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=[];e.exports=function(e,t){if(-1===o.indexOf(e)){o.push(e);var r=1e3;i(t)?r=t:"long"===t&&(r=3e3);var a=n.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0),a.selectAll(".notifier-note").data(o).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var o=i.append("p"),a=e.split(//g),l=0;l{"use strict";var n=r(19602),i="data-savedcursor";e.exports=function(e,t){var r=e.attr(i);if(t){if(!r){for(var o=(e.attr("class")||"").split(" "),a=0;a{"use strict";var n=r(37812).dot,i=r(24956).BADNUM,o=e.exports={};o.tester=function(e){var t,r=e.slice(),n=r[0][0],o=n,a=r[0][1],s=a;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),t=1;to||c===i||cs)&&(!t||!l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||lo||c===i||cs)return!1;var u,d,f,h,p,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(d,g)||c>Math.max(f,v)))if(cu||Math.abs(n(a,f))>i)return!0;return!1},o.filter=function(e,t){var r=[e[0]],n=0,i=0;function a(a){e.push(a);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&a(e.pop());return{addPt:a,raw:e,filtered:r}}},56162:(e,t,r)=>{"use strict";var n=r(51708),i=r(55902);e.exports=function(e,t,o){var a=e._fullLayout,s=!0;return a._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(o);else if(!n.pick||a._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:t||[],cachedCode:o||{}})}catch(l){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:n.key})}),!1)}})),s||n({container:a._glcontainer.node()}),s}},22375:(e,t,r)=>{"use strict";var n=r(51908),i=r(98374);e.exports=function(e){var t;if("string"!==typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;"undefined"!==typeof navigator&&(e=navigator.userAgent);e&&e.headers&&"string"===typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]);return e}()))return!0;var r=i({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var o=t.split(" "),a=1;a-1;s--){var l=o[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},80809:e=>{"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n{"use strict";var n=r(53787),i=r(5734).dfltConfig;var o={add:function(e,t,r,n,o){var a,s;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},s=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(s,e.undoQueue.queue.length-s,a),e.undoQueue.index+=1):a=e.undoQueue.queue[s-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(n),a.redo.args.push(o)),e.undoQueue.queue.length>i.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r{"use strict";t.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),o=!1===n?"":"^";return"xy"===e?new RegExp(o+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(o+e+"([2-9]|[1-9][0-9]+)?"+i)}},68864:e=>{"use strict";var t=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;e.exports=function(e,n){for(;n;){var i=e.match(t);if(i)e=i[1];else{if(!e.match(r))throw new Error("bad relativeAttr call:"+[e,n]);e=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return e&&"["!==n.charAt(0)?e+"."+n:e+n}},60077:(e,t,r)=>{"use strict";var n=r(50146).isArrayOrTypedArray,i=r(47623);e.exports=function e(t,r){for(var o in r){var a=r[o],s=t[o];if(s!==a)if("_"===o.charAt(0)||"function"===typeof a){if(o in t)continue;t[o]=a}else if(n(a)&&n(s)&&i(a[0])){if("customdata"===o||"ids"===o)continue;for(var l=Math.min(a.length,s.length),c=0;c{"use strict";var n=r(51908),i=r(95169),o=r(63569),a=r(24956).BADNUM,s=1e-9;function l(e,t){return et}function d(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-s)-1:Math.floor((e-t.start)/t.size+s);var o,a,f=0,h=t.length,p=0,m=h>1?(t[h-1]-t[0])/(h-1):1;for(a=m>=0?r?l:c:r?d:u,e+=m*s*(r?-1:1)*(m>=0?1:-1);f90&&i.log("Long binary search..."),f-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===a;r--);for(var i,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],d=u-i;void 0===i?(l.push(u),i=u):d>s&&(o=Math.min(o,d),l.push(u),i=u)}return{vals:l,minDiff:o}},t.roundUp=function(e,t,r){for(var n,i=0,o=t.length-1,a=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||o;for(var r,n=1/0,i=0;i{"use strict";e.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},51708:(e,t,r)=>{"use strict";var n=r(66235),i=function(){};e.exports=function(e){for(var t in e)"function"===typeof e[t]&&(e[t]=i);e.destroy=function(){e.container.parentNode.removeChild(e.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 o=document.createElement("p");return o.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",o.style.position="relative",o.style.top="50%",o.style.left="50%",o.style.height="30%",o.style.width="50%",o.style.margin="-15% 0 0 -25%",r.appendChild(o),e.container.appendChild(r),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1}},99238:e=>{"use strict";e.exports=function(e){return Object.keys(e).sort()}},1809:(e,t,r)=>{"use strict";var n=r(51908),i=r(50146).isArrayOrTypedArray;t.aggNums=function(e,r,o,a){var s,l;if((!a||a>o.length)&&(a=o.length),n(r)||(r=!1),i(o[0])){for(l=new Array(a),s=0;se.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},55115:(e,t,r)=>{"use strict";var n=r(43721);e.exports=function(e){return e?n(e):[0,0,0,1]}},75368:(e,t,r)=>{"use strict";var n=r(70059),i=r(50973),o=r(53787),a=null;e.exports=function(){if(null!==a)return a;a=!1;var e=o.isIE()||o.isSafari()||o.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"===typeof r)a=t.some((function(e){return r.apply(null,e)}));else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;a=t.some((function(e){var t=e[1];return l===t||l===t.toLowerCase()})),s.remove()}}return a}},98224:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.strTranslate,a=r(83580),s=r(81653).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,g){var C=e.text(),A=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!==typeof MathJax&&C.match(l),O=n.select(e.node().parentNode);if(!O.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":C,"data-math":"N"}),A?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),a={fontSize:r};!function(e,t,r){var o,a,s,l,f=parseInt((MathJax.version||"").split(".")[0]);if(2!==f&&3!==f)return void i.warn("No MathJax version:",MathJax.version);var h=function(){return a=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:d},displayAlign:"left"})},p=function(){a=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=d},m=function(){if("SVG"!==(o=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},g=function(){"svg"!==(o=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},v=function(){var r="math-output-"+i.randstr({},64),o=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===f?MathJax.Hub.Typeset(o):MathJax.typeset([o])},y=function(){var t=l.select(2===f?".MathJax_SVG":".MathJax"),o=!t.empty()&&l.select("svg").node();if(o){var a,s=o.getBoundingClientRect();a=2===f?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,a,s)}else i.log("There was an error in the tex syntax.",e),r();l.remove()},x=function(){if("SVG"!==o)return MathJax.Hub.setRenderer(o)},b=function(){"svg"!==o&&(MathJax.config.startup.output=o)},w=function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(a)},_=function(){MathJax.config=a};2===f?MathJax.Hub.Queue(h,m,v,y,x,w):3===f&&(p(),g(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){v(),y(),b(),_()})))}(A[2],a,(function(n,i,a){O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return R(),void t();var l=O.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":C,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=a.width,u=a.height;s.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=s.select("g");f.attr({fill:d,stroke:d});var h=f.node().getBoundingClientRect(),p=h.width,m=h.height;(p>c||m>u)&&(s.style("overflow","hidden"),p=(h=s.node().getBoundingClientRect()).width,m=h.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,v,y]+")"+o(-p/2,x-m/2)});else if("l"===P[0])y=x-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-m/2}s.attr({x:v,y:y}),g&&g.call(e,l),t(l)}))}))):R(),e}function R(){O.empty()||(P=e.attr("class")+"-math",O.select("svg."+P).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(v," ");var r,o=!1,l=[],c=-1;function u(){c++;var t=document.createElementNS(a.svg,"tspan");n.select(t).attr({class:"line",dy:c*s+"em"}),e.appendChild(t),r=t;var i=l;if(l=[{node:t}],i.length>1)for(var o=1;o doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",t)}var A=b.test(t);A?u():(r=e,l=[{node:e}]);for(var O=t.split(y),P=0;P|>|>)/g;var d=[["$","$"],["\\(","\\)"]];var f={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"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},m="\u200b",g=["http:","https:","mailto:","",void 0,":"],v=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,S=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(y),o=[],a="",s=0,l=0;l3?o.push(c.substr(0,h-3)+"..."):o.push(c.substr(0,h));break}a=""}}return o.join("")};var C={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(e){return e.replace(A,(function(e,t){return("#"===t.charAt(0)?function(e){if(e>1114111)return;var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):C[t])||e}))}function I(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,o=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(o)?t:""}function O(e,t,r){var n,o,a,s=r.horizontalAlign,l=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return o="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},a="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=a()-u.left,t=o()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=E,t.sanitizeHTML=function(e){e=e.replace(v," ");for(var t=document.createElement("p"),r=t,i=[],o=e.split(y),a=0;a{"use strict";var r={};function n(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}t.throttle=function(e,t,i){var o=r[e],a=Date.now();if(!o){for(var s in r)r[s].tso.ts+t?l():o.timer=setTimeout((function(){l(),o.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var i in r)t.clear(i)}},3324:(e,t,r)=>{"use strict";var n=r(51908);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},58268:(e,t,r)=>{"use strict";var n=e.exports={},i=r(14338).locationmodeToLayer,o=r(40506).zL;n.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(e,t){return e+t+".json"},n.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],n=t.objects[r];return o(t,n).features}},55008:e=>{"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"}}},26349:e=>{"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"}}},61099:(e,t,r)=>{"use strict";var n=r(44049);e.exports=function(e){for(var t,r,i=n.layoutArrayContainers,o=n.layoutArrayRegexes,a=e.split("[")[0],s=0;s{"use strict";var n=r(10191).extendFlat,i=r(47623),o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},a={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},s=o.flags.slice().concat(["fullReplot"]),l=a.flags.slice().concat("layoutReplot");function c(e){for(var t={},r=0;r{"use strict";var n=r(51908),i=r(76778),o=r(44049),a=r(53787),s=r(44115),l=r(24279),c=r(66235),u=l.cleanId,d=l.getFromTrace,f=o.traceIs;function h(e,t){var r=e[t],n=t.charAt(0);r&&"paper"!==r&&(e[t]=u(r,n,!0))}function p(e){function t(t,r){var n=e[t],i=e.title&&e.title[r];n&&!i&&(e.title||(e.title={}),e.title[r]=e[t],delete e[t])}e&&("string"!==typeof e.title&&"number"!==typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function m(e){if(!a.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"===typeof t||"number"===typeof t)&&String(t)}function g(e,t,r,n){if(r&&!n)return e;if(n&&!r)return t;if(!e.trim())return t;if(!t.trim())return e;var i,o=Math.min(e.length,t.length);for(i=0;i0&&a.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var o=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,d=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(r=0;r3?(R.x=1.02,R.xanchor="left"):R.x<-2&&(R.x=-.02,R.xanchor="right"),R.y>3?(R.y=1.02,R.yanchor="bottom"):R.y<-2&&(R.y=-.02,R.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n{"use strict";var n=r(37921);t._doPlot=n._doPlot,t.newPlot=n.newPlot,t.restyle=n.restyle,t.relayout=n.relayout,t.redraw=n.redraw,t.update=n.update,t._guiRestyle=n._guiRestyle,t._guiRelayout=n._guiRelayout,t._guiUpdate=n._guiUpdate,t._storeDirectGUIEdit=n._storeDirectGUIEdit,t.react=n.react,t.extendTraces=n.extendTraces,t.prependTraces=n.prependTraces,t.addTraces=n.addTraces,t.deleteTraces=n.deleteTraces,t.moveTraces=n.moveTraces,t.purge=n.purge,t.addFrames=n.addFrames,t.deleteFrames=n.deleteFrames,t.animate=n.animate,t.setPlotConfig=n.setPlotConfig;var i=r(90489).getGraphDiv,o=r(75629).eraseActiveShape;t.deleteActiveShape=function(e){return o(i(e))},t.toImage=r(50683),t.validate=r(89953),t.downloadImage=r(51320);var a=r(1173);t.makeTemplate=a.makeTemplate,t.validateTemplate=a.validateTemplate},39379:(e,t,r)=>{"use strict";var n=r(47623),i=r(17295),o=r(95169),a=r(56141).sorterAsc,s=r(44049);t.containerArrayMatch=r(61099);var l=t.isAddVal=function(e){return"add"===e||n(e)},c=t.isRemoveVal=function(e){return null===e||"remove"===e};t.applyContainerArrayChanges=function(e,t,r,n,u){var d=t.astr,f=s.getComponentMethod(d,"supplyLayoutDefaults"),h=s.getComponentMethod(d,"draw"),p=s.getComponentMethod(d,"drawOne"),m=n.replot||n.recalc||f===i||h===i,g=e.layout,v=e._fullLayout;if(r[""]){Object.keys(r).length>1&&o.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return o.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(f(g,v),h(e),!0)}var x,b,w,_,k,S,T,M,C=Object.keys(r).map(Number).sort(a),A=t.get(),E=A||[],I=u(v,d).get(),O=[],P=-1,R=E.length;for(x=0;xE.length-(T?0:1))o.warn("index out of range",d,w);else if(void 0!==S)k.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",d,w),c(S)?O.push(w):T?("add"===S&&(S={}),E.splice(w,0,S),I&&I.splice(w,0,{})):o.warn("Unrecognized full object edit value",d,w,S),-1===P&&(P=w);else for(b=0;b=0;x--)E.splice(O[x],1),I&&I.splice(O[x],1);if(E.length?A||t.set(E):t.set(null),m)return!1;if(f(g,v),p!==i){var L;if(-1===P)L=C;else{for(R=Math.max(E.length,R),L=[],x=0;x=P);x++)L.push(w);for(x=P;x{"use strict";var n=r(8996),i=r(51908),o=r(62206),a=r(53787),s=a.nestedProperty,l=r(24521),c=r(36305),u=r(44049),d=r(94043),f=r(44115),h=r(28605),p=r(59092),m=r(45446),g=r(50973),v=r(66235),y=r(62924).initInteractions,x=r(83580),b=r(26002).clearOutline,w=r(5734).dfltConfig,_=r(39379),k=r(85902),S=r(93415),T=r(18693),M=r(99727).AX_NAME_PATTERN,C=0;function A(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){a.error(r)}}function I(e,t){E(e,v.combine(t,"white"))}function O(e,t){if(!e._context){e._context=a.extendDeep({},w);var r=n.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=e._context;if(t){for(s=Object.keys(t),i=0;i=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function L(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),R(e,t,"currentIndices"),"undefined"===typeof r||Array.isArray(r)||(r=[r]),"undefined"!==typeof r&&R(e,r,"newIndices"),"undefined"!==typeof r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function j(e,t,r,n,o){!function(e,t,r,n){var i=a.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!a.isPlainObject(t))throw new Error("update must be a key:value object");if("undefined"===typeof r)throw new Error("indices must be an integer or array of integers");for(var o in R(e,r,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(i&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==t[o].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")}}(e,t,r,n);for(var l=function(e,t,r,n){var o,l,c,u,d,f=a.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var m=0;m-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(t,r){e[r]=e[t],delete e[t]}}function V(e,t,r){e=a.getGraphDiv(e),k.clearPromiseQueue(e);var n={};if("string"===typeof t)n[t]=r;else{if(!a.isPlainObject(t))return a.warn("Relayout fail.",t,r),Promise.reject();n=a.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var i=X(e,n),o=i.flags;o.calc&&(e.calcdata=void 0);var s=[f.previousPromises];o.layoutReplot?s.push(S.layoutReplot):Object.keys(n).length&&(H(e,o,i)||f.supplyDefaults(e),o.legend&&s.push(S.doLegend),o.layoutstyle&&s.push(S.layoutStyles),o.axrange&&W(s,i.rangesAltered),o.ticks&&s.push(S.doTicksRelayout),o.modebar&&s.push(S.doModeBar),o.camera&&s.push(S.doCamera),o.colorbars&&s.push(S.doColorBars),s.push(A)),s.push(f.rehover,f.redrag,f.reselect),c.add(e,V,[e,i.undoit],V,[e,i.redoit]);var l=a.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",i.eventData),e}))}function H(e,t,r){var n,i,o=e._fullLayout;if(!t.axrange)return!1;for(var s in t)if("axrange"!==s&&t[s])return!1;var l=function(e,t){return a.coerce(n,i,m,e,t)},c={};for(var u in r.rangesAltered){var d=h.id2name(u);if(n=e.layout[d],i=o[d],p(n,i,l,c),i._matchGroup)for(var f in i._matchGroup)if(f!==u){var g=o[h.id2name(f)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function W(e,t){var r=t?function(e){var r=[];for(var n in t){var i=h.getFromId(e,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,S.doAutoRangeAndConstraints,r,S.drawData,S.finalDraw)}var G=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,Y=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,i,o=e.layout,l=e._fullLayout,c=l._guiEditing,f=F(l._preGUI,c),p=Object.keys(t),m=h.list(e),g=a.extendDeepAll({},t),v={};for(U(t),p=Object.keys(t),n=0;n0&&"string"!==typeof R.parts[j];)j--;var D=R.parts[j],z=R.parts[j-1]+"."+D,B=R.parts.slice(0,j).join("."),Z=s(e.layout,B).get(),V=s(l,B).get(),H=R.get();if(void 0!==L){S[P]=L,C[P]="reverse"===D?L:N(H);var W=d.getLayoutValObject(l,R.parts);if(W&&W.impliedEdits&&null!==L)for(var X in W.impliedEdits)A(a.relativeAttr(P,X),W.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(L){A("autosize",null);var $="height"===P?"width":"height";A($,l[$])}else l[P]=e._initialAutoSize[P];else if("autosize"===P)A("width",L?null:l.width),A("height",L?null:l.height);else if(z.match(G))O(z),s(l,B+"._inputRange").set(null);else if(z.match(q)){O(z),s(l,B+"._inputRange").set(null);var J=s(l,B).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else z.match(Y)&&s(l,B+"._inputDomain").set(null);if("type"===D){E=Z;var Q="linear"===V.type&&"log"===L,ee="log"===V.type&&"linear"===L;if(Q||ee){if(E&&E.range)if(V.autorange)Q&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var te=E.range[0],re=E.range[1];Q?(te<=0&&re<=0&&A(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),A(B+".range[0]",Math.log(te)/Math.LN10),A(B+".range[1]",Math.log(re)/Math.LN10)):(A(B+".range[0]",Math.pow(10,te)),A(B+".range[1]",Math.pow(10,re)))}else A(B+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[R.parts[0]]&&"radialaxis"===R.parts[1]&&delete l[R.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,V,L,A),u.getComponentMethod("images","convertCoords")(e,V,L,A)}else A(B+".autorange",!0),A(B+".range",null);s(l,B+"._inputRange").set(null)}else if(D.match(M)){var ne=s(l,P).get(),ie=(L||{}).type;ie&&"-"!==ie||(ie="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ie,A),u.getComponentMethod("images","convertCoords")(e,ne,ie,A)}var oe=_.containerArrayMatch(P);if(oe){r=oe.array,n=oe.index;var ae=oe.property,se=W||{editType:"calc"};""!==n&&""===ae&&(_.isAddVal(L)?C[P]=null:_.isRemoveVal(L)?C[P]=(s(o,r).get()||[])[n]:a.warn("unrecognized full object value",t)),T.update(w,se),v[r]||(v[r]={});var le=v[r][n];le||(le=v[r][n]={}),le[ae]=L,delete t[P]}else"reverse"===D?(Z.range?Z.range.reverse():(A(B+".autorange",!0),Z.range=[1,0]),V.autorange?w.calc=!0:w.plot=!0):("dragmode"===P&&(!1===L&&!1!==H||!1!==L&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===L||"select"===L)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?w.plot=!0:W?T.update(w,W):w.calc=!0,R.set(L))}}for(r in v){_.applyContainerArrayChanges(e,f(o,r),v[r],w,f)||(w.plot=!0)}for(var ce in I){var ue=(E=h.getFromId(e,ce))&&E._constraintGroup;if(ue)for(var de in w.calc=!0,ue)I[de]||(h.getFromId(e,de)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(w.plot=!0);var fe=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=i.length?i[0]:i[e]:i}function l(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,u){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,f.transition(e,t.frame.data,t.frame.layout,k.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var p,m,g=0;function v(e){return Array.isArray(i)?g>=i.length?e.transitionOpts=i[g]:e.transitionOpts=i[0]:e.transitionOpts=i,g++,e}var y=[],x=void 0===t||null===t,b=Array.isArray(t);if(!x&&!b&&a.isPlainObject(t))y.push({type:"object",data:v(a.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&SS)&&T.push(m);y=T}}y.length>0?function(t){if(0!==t.length){for(var i=0;i=0;n--)if(a.isPlainObject(t[n])){var m=t[n].name,g=(u[m]||p[m]||{}).name,v=t[n].name,y=u[g]||p[g];g&&v&&"number"===typeof v&&y&&C<5&&(C++,a.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===C&&a.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.")),p[m]={name:m},h.push({frame:f.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"===typeof(i=h[n].frame).name&&a.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+e._transitionData._counter++];);if(u[i.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=f.modifyFrames,u=f.modifyFrames,d=[e,s],h=[e,o];return c&&c.add(e,l,d,u,h),f.modifyFrames(e,o)},t.addTraces=function e(r,n,i){r=a.getGraphDiv(r);var o,s,l=[],u=t.deleteTraces,d=e,f=[r,l],h=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r{"use strict";var t={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},r={};!function e(t,r){for(var n in t){var i=t[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),e(i,r[n]))}}(t,r),e.exports={configAttributes:t,dfltConfig:r}},94043:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(27231),a=r(79443),s=r(1563),l=r(83672),c=r(5734).configAttributes,u=r(18693),d=i.extendDeepAll,f=i.isPlainObject,h=i.isArrayOrTypedArray,p=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",v="_isLinkedToArray",y="_deprecated",x=[g,v,"_arrayAttrRegexps",y];function b(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(w(t[r]))r++;else if(r=o.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var a=t[r];if(!w(a))return!1;e=o[i][a]}else e=o[i]}else e=o}}return e}function w(e){return e===Math.round(e)&&e>=0}function _(){var e,t,r={};for(e in d(r,a),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[t[2]],s=3}else{var u=e._module;if(u||(u=(n.modules[e.type||o.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[a])){var d=u.basePlotModule;d&&d.attributes&&(i=d.attributes[a])}i||(i=o[a])}return b(i,t,s)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,i,o,s,l=e._basePlotModules;if(l){var c;for(r=0;r{"use strict";var n=r(53787),i=r(27231),o="templateitemname",a={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};function s(e){return e&&"string"===typeof e}function l(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}a[o]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")},t.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=a.name,t[o]=a[o],t},t.traceTemplater=function(e){var t,r,o={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(o[t]=0);return{newTrace:function(a){var s={type:t=n.coerce(a,{},i,"type"),_template:null};if(t in o){r=e[t];var l=o[t]%r.length;o[t]++,s._template=r[l]}return s}}},t.newContainer=function(e,t,r){var i=e._template,o=i&&(i[t]||r&&i[r]);return n.isPlainObject(o)||(o=null),e[t]={_template:o}},t.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[l(t)],a=n&&n[t];Array.isArray(a)&&a.length||(a=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[o]=e[o];if(!s(n))return t._template=i,t;for(var l=0;l=i&&(r._input||{})._templateitemname;s&&(a=i);var l,c=t+"["+a+"]";function u(){l={},s&&(l[c]={},l[c][o]=s)}function d(e,t){s?n.nestedProperty(l[c],e).set(t):l[c+"."+e]=t}function f(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:d,getUpdateObj:f,applyUpdate:function(t,r){t&&d(t,r);var i=f();for(var o in i)n.nestedProperty(e,o).set(i[o])}}}},93415:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(44115),a=r(53787),s=r(98224),l=r(24513),c=r(66235),u=r(50973),d=r(34906),f=r(54514),h=r(28605),p=r(81653),m=r(14511),g=m.enforce,v=m.clean,y=r(10351).doAutoRange,x="start",b="middle",w="end";function _(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&(o[0]t[0]))return!0}return!1}function k(e){var r,i,s,l,d,m,g=e._fullLayout,v=g._size,y=v.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),f.manage(e),!g._has("cartesian"))return o.previousPromises(e);function b(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:v.l+v.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",a=e._fullLayout.margin[o],s=0;"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var o=0;"middle"===r&&(o+=i/2);"t"===e?("top"===r&&(o+=i),o+=n-t*n):("bottom"===r&&(o+=i),o+=t*n);return o}(o,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b);if(s>a)return s;return 0}(e,t,m);if(g>0){!function(e,t,r,n){var i="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(e,t,r,n,i){var o="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=a.isTopAnchor(t)?n:n-i,l="b"===r?o-s:s;return!(a.isTopAnchor(t)&&"t"===r||a.isBottomAnchor(t)&&"b"===r)&&l{"use strict";var n=r(53787),i=n.isPlainObject,o=r(94043),a=r(44115),s=r(27231),l=r(99862),c=r(5734).dfltConfig;function u(e,t){e=n.extendDeep({},e);var r,o,a=Object.keys(e).sort();function s(t,r,n){if(i(r)&&i(t))u(t,r);else if(Array.isArray(r)&&Array.isArray(t)){var a=l.arrayTemplater({_template:e},n);for(o=0;ok?u.push({code:"unused",traceType:y,templateCount:_,dataCount:k}):k>_&&u.push({code:"reused",traceType:y,templateCount:_,dataCount:k})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var o=t[n],a=m(t,n,r);i(o)?(Array.isArray(t)&&!1===o._template&&o.templateitemname&&u.push({code:"missing",path:a,templateitemname:o.templateitemname}),e(o,a)):Array.isArray(o)&&g(o)&&e(o,a)}}({data:h,layout:f},""),u.length)return u.map(v)}},50683:(e,t,r)=>{"use strict";var n=r(51908),i=r(37921),o=r(44115),a=r(53787),s=r(82231),l=r(99367),c=r(74978),u=r(75703).version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};e.exports=function(e,t){var r,f,h,p;function m(e){return!(e in t)||a.validate(t[e],d[e])}if(t=t||{},a.isPlainObject(e)?(r=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=a.getGraphDiv(e),r=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(d.format.values,", "," or ")+".");var g={};function v(e,r){return a.coerce(t,g,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),w=v("scale"),_=v("setBackground"),k=v("imageDataOnly"),S=document.createElement("div");S.style.position="absolute",S.style.left="-5000px",document.body.appendChild(S);var T=a.extendFlat({},f);x?T.width=x:null===t.width&&n(p.width)&&(T.width=p.width),b?T.height=b:null===t.height&&n(p.height)&&(T.height=p.height);var M=a.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),C=s.getRedrawFunc(S);function A(){return new Promise((function(e){setTimeout(e,s.getDelay(S._fullLayout))}))}function E(){return new Promise((function(e,t){var r=l(S,y,w),n=S._fullLayout.width,d=S._fullLayout.height;function f(){i.purge(S),document.body.removeChild(S)}if("full-json"===y){var h=o.graphJson(S,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),f(),e(k?h:s.encodeJSON(h))}if(f(),"svg"===y)return e(k?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),c({format:y,width:n,height:d,scale:w,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){i.newPlot(S,r,T,M).then(C).then(A).then(E).then((function(t){e(function(e){return k?e.replace(s.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},89953:(e,t,r)=>{"use strict";var n=r(53787),i=r(44115),o=r(94043),a=r(5734).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,i,o,a){a=a||[];for(var d=Object.keys(e),f=0;fx.length&&i.push(h("unused",o,v.concat(x.length)));var T,M,C,A,E,I=x.length,O=Array.isArray(S);if(O&&(I=Math.min(I,S.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(h("unused",o,v.concat(M,x[M].length)));var P=x[M].length;for(T=0;T<(O?Math.min(P,S[M].length):P);T++)C=O?S[M][T]:S,A=y[M][T],E=x[M][T],n.validate(A,C)?E!==A&&E!==+A&&i.push(h("dynamic",o,v.concat(M,T),A,E)):i.push(h("value",o,v.concat(M,T),A))}else i.push(h("array",o,v.concat(M),y[M]));else for(M=0;M1&&f.push(h("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=r.length,v=0;v{"use strict";e.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},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",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}}},80254:(e,t,r)=>{"use strict";var n=r(53787),i=r(99862);e.exports=function(e,t,r){var o,a,s=r.name,l=r.inclusionAttr||"visible",c=t[s],u=n.isArrayOrTypedArray(e[s])?e[s]:[],d=t[s]=[],f=i.arrayTemplater(t,s,l);for(o=0;o{"use strict";var n=r(92948),i=r(54289);e.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:n({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}}},64594:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=i.dateTime2ms,a=i.incrementMonth,s=r(24956).ONEAVGMONTH;e.exports=function(e,t,r,i){if("date"!==t.type)return{vals:i};var l=e[r+"periodalignment"];if(!l)return{vals:i};var c,u=e[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:i}}else if("string"===typeof u&&"M"===u.charAt(0)){var d=+u.substring(1);if(!(d>0&&Math.round(d)===d))return{vals:i};c=d}for(var f=t.calendar,h="start"===l,p="end"===l,m=e[r+"period0"],g=o(m,f)||0,v=[],y=[],x=[],b=i.length,w=0;wT;)S=a(S,-c,f);for(;S<=T;)S=a(S,c,f);k=a(S,-c,f)}else{for(S=g+(_=Math.round((T-g)/u))*u;S>T;)S-=u;for(;S<=T;)S+=u;k=S-u}v[w]=h?k:p?S:(k+S)/2,y[w]=k,x[w]=S}return{vals:v,starts:y,ends:x}}},68861:e=>{"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}},10351:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(24956).FP_SAFE,s=r(44049),l=r(50973),c=r(24279),u=c.getFromId,d=c.isLinked;function f(e,t){var r,n,i=[],a=e._fullLayout,s=p(a,t,0),l=p(a,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return o.simpleMap(t.range,t.r2l);var f=u[0].val,m=d[0].val;for(r=1;r0&&((T=I-s(b)-l(w))>O?M/T>P&&(_=b,k=w,P=M/T):M/I>P&&(_={val:b.val,nopad:1},k={val:w.val,nopad:1},P=M/I));if(f===m){var R=f-1,L=f+1;if(A)if(0===f)i=[0,1];else{var j=(f>0?d:u).reduce((function(e,t){return Math.max(e,l(t))}),0),D=f/(1-Math.min(.5,j/I));i=f>0?[0,D]:[D,0]}else i=E?[Math.max(0,R),Math.max(1,L)]:[R,L]}else A?(_.val>=0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):E&&(_.val-P*s(_)<0&&(_={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),P=(k.val-_.val-h(t,b.val,w.val))/(I-s(_)-l(k)),i=[_.val-P*s(_),k.val+P*l(k)];return i=S(i,t),t.limitRange&&t.limitRange(),y&&i.reverse(),o.simpleMap(i,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),o=0;o0?r.ppadplus:r.ppadminus)||r.ppad||0),C=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=T(r.vpadplus||r.vpad),E=T(r.vpadminus||r.vpad);if(!k){if(f=1/0,h=-1/0,_)for(n=0;n0&&(f=o),o>h&&o-a&&(f=o),o>h&&o=P;n--)O(n);return{min:p,max:m,opts:r}},concatExtremes:g};var m=3;function g(e,t,r){var n,i,o,a=t._id,s=e._fullData,l=e._fullLayout,c=[],d=[];function f(e,t){for(n=0;n=r&&(c.extrapad||!a)){s=!1;break}i(t,c.val)&&c.pad<=r&&(a||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=o&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&a})}}function b(e){return i(e)&&Math.abs(e)=t}function k(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function S(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(void 0!==i){var a=t.d2l(r),s=t.d2l(n);o.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l=c&&(a=c,r=c),s<=c&&(s=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&k(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&k(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&k(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&k(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},23795:e=>{"use strict";e.exports=function(e,t,r){var n,i;if(r){var o="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[o?1:0],i=r[o?0:1]}var a=e("autorangeoptions.minallowed",null===i?n:void 0),s=e("autorangeoptions.maxallowed",null===n?i:void 0);void 0===a&&e("autorangeoptions.clipmin"),void 0===s&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},28605:(e,t,r)=>{"use strict";var n=r(8996),i=r(51908),o=r(44115),a=r(44049),s=r(53787),l=s.strTranslate,c=r(98224),u=r(34906),d=r(66235),f=r(50973),h=r(45446),p=r(60047),m=r(24956),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,w=m.ONEMINQUARTER,_=m.ONEMAXMONTH,k=m.ONEAVGMONTH,S=m.ONEMINMONTH,T=m.ONEWEEK,M=m.ONEDAY,C=M/2,A=m.ONEHOUR,E=m.ONEMIN,I=m.ONESEC,O=m.MINUS_SIGN,P=m.BADNUM,R={K:"zeroline"},L={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},D={K:"tick",L:"path"},z={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"]},F=r(81653),B=F.MID_SHIFT,Z=F.CAP_SHIFT,U=F.LINE_SPACING,V=F.OPPOSITE_SIDE,H=e.exports={};H.setConvert=r(4738);var W=r(36562),G=r(24279),q=G.idSort,Y=G.isLinked;H.id2name=G.id2name,H.name2id=G.name2id,H.cleanId=G.cleanId,H.list=G.list,H.listIds=G.listIds,H.getFromId=G.getFromId,H.getFromTrace=G.getFromTrace;var X=r(10351);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var K=1e-4;function $(e){var t=(e[1]-e[0])*K;return[e[0]-t,e[1]+t]}H.coerceRef=function(e,t,r,n,i,o){var a=n.charAt(n.length-1),l=r._fullLayout._subplots[a+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"===typeof o?o:o[0])),o||(o=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(o?"string"===typeof o?[o]:o:[]),dflt:i},s.coerce(e,t,u,c)},H.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},H.coercePosition=function(e,t,r,n,i,o){var a,l;if("range"!==H.getRefType(n))a=s.ensureNumber,l=r(i,o);else{var c=H.getFromId(t,n);l=r(i,o=c.fraction2r(o)),a=c.cleanPos}e[i]=a(l)},H.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(t,r).cleanPos)(e)},H.redrawComponents=function(e,t){t=t||H.listIds(e);var r=e._fullLayout;function n(n,i,o,s){for(var l=a.getComponentMethod(n,i),c={},u=0;ur&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},H.saveRangeInitial=function(e,t){for(var r=H.list(e,"",!0),n=!1,i=0;i.3*f||u(n)||u(o))){var h=r.dtick/2;e+=e+ha){var l=Number(r.substr(1));o.exactYears>a&&l%12===0?e=H.tickIncrement(e,"M6","reverse")+1.5*M:o.exactMonths>a?e=H.tickIncrement(e,"M1","reverse")+15.5*M:e-=C;var c=H.tickIncrement(e,r);if(c<=n)return c}return e}(y,e,v,c,o)),g=y,0;g<=u;)g=H.tickIncrement(g,v,!1,o);return{start:t.c2r(y,0,o),end:t.c2r(g,0,o),size:v,_dataSpan:u-c}},H.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,o=t.dtick&&i(t._tmin);if(o){var a=H.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*a+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(n,t.l2r),e._isMinor=!0,H.prepTicks(e,r),o){var c=i(t.dtick),u=i(e.dtick),d=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?te(d,f)?d===2*T&&f===2*M&&(e.dtick=T):d===2*T&&f===3*M?e.dtick=T:d!==T||(t._input.minor||{}).nticks?re(d/f,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=M:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":te(d,f)?d>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(d,f)||(e.dtick=re(d/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},H.prepTicks=function(e,t){var r=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,o=e.nticks;o||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?s.bigFont(e.tickfont.size||12):15,o=e._length/n):(n="y"===e._id.charAt(0)?40:80,o=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(o*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(o*=100),e._roughDTick=Math.abs(r[1]-r[0])/o,H.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),o=H.getTickFormat(e);if(o){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(o)||(/%[HI]/.test(o)?(t=A,a&&!n&&e.dtick=(R?0:1);L--){var j=!L;L?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var D=L?e:s.extendFlat({},e,e.minor);if(j?H.prepMinorTicks(D,e,t):H.prepTicks(D,t),"array"!==D.tickmode)if("sync"!==D.tickmode){var z=$(u),N=z[0],F=z[1],B=i(D.dtick),Z="log"===o&&!(B||"L"===D.dtick.charAt(0)),U=H.tickFirst(D,t);if(L){if(e._tmin=U,U=F:q<=F;q=H.tickIncrement(q,Y,d,a)){if(L&&V++,D.rangebreaks&&!d){if(q=h)break}if(I.length>p||q===G)break;G=q;var X={value:q};L?(Z&&q!==(0|q)&&(X.simpleLabel=!0),l>1&&V%l&&(X.skipLabel=!0),I.push(X)):(X.minor=!0,O.push(X))}}else I=[],m=oe(e);else L?(I=[],m=ae(e)):(O=[],E=ae(e))}if(R&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var K=I.map((function(e){return e.value})),J=[],Q=0;Q0?(o=n-1,a=n):(o=n,a=n);var s,l=e[o].value,c=e[a].value,u=Math.abs(c-l),d=r||u,f=0;d>=y?f=u>=y&&u<=g?u:v:r===b&&d>=w?f=u>=w&&u<=x?u:b:d>=S?f=u>=S&&u<=_?u:k:r===T&&d>=T?f=T:d>=M?f=M:r===C&&d>=C?f=C:r===A&&d>=A&&(f=A),f>=u&&(f=u,s=!0);var h=i+f;if(t.rangebreaks&&f>0){for(var p=0,m=0;m<84;m++){var E=(m+.5)/84;t.maskBreaks(i*(1-E)+E*h)!==P&&p++}(f*=p/84)||(e[n].drop=!0),s&&u>T&&(f=u)}(f>0||0===n)&&(e[n].periodX=i+f/2)}}(I,e,e._definedDelta),e.rangebreaks){var ie="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=I.length-1;r>-1;r--)if(I[r].drop)I.splice(r,1);else{I[r].value=je(I[r].value,e);var ce=e.c2p(I[r].value);(ie?le>ce-se:leh||deh&&(ue.periodX=h),de10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=M&&o<=10||t>=15*M)e._tickround="d";else if(t>=E&&o<=16||t>=A)e._tickround="M";else if(t>=I&&o<=19||t>=E)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(o,a)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(ye(e.exponentformat)&&!xe(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function ge(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}H.autoTicks=function(e,t,r){var n;function o(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var a=2*t;if(a>v)t/=v,n=o(10),e.dtick="M"+12*pe(t,n,se);else if(a>k)t/=k,e.dtick="M"+pe(t,1,le);else if(a>M){if(e.dtick=pe(t,M,e._hasDayOfWeekBreaks?[1,2,7,14]:ue),!r){var l=H.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else a>A?e.dtick=pe(t,A,le):a>E?e.dtick=pe(t,E,ce):a>I?e.dtick=pe(t,I,ce):(n=o(10),e.dtick=pe(t,n,se))}else if("log"===e.type){e.tick0=0;var u=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var d=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/d,n=o(10),e.dtick="L"+pe(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Le(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=o(10),e.dtick=pe(t,n,se));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},H.tickIncrement=function(e,t,r,o){var a=r?-1:1;if(i(t))return s.increment(e,a*t);var l=t.charAt(0),c=a*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,o);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?fe:de,d=e+.01*a,f=s.roundUp(s.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},H.tickFirst=function(e,t){var r=e.r2l||Number,o=s.simpleMap(e.range,r,void 0,void 0,t),a=o[1] ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,a,r,c):"log"===u?function(e,t,r,n,o){var a=e.dtick,l=t.x,c=e.tickformat,u="string"===typeof a&&a.charAt(0);"never"===o&&(o="");n&&"L"!==u&&(a="L3",u="L");if(c||"L"===u)t.text=be(Math.pow(10,l),e,o,n);else if(i(a)||"D"===u&&s.mod(l+.01,1)<.1){var d=Math.round(l),f=Math.abs(d),h=e.exponentformat;"power"===h||ye(h)&&xe(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":O)+f+"",t.fontSize*=1.25):("e"===h||"E"===h)&&f>2?t.text="1"+h+(d>0?"+":O)+f:(t.text=be(Math.pow(10,l),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(a);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,a,0,c,m):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r="");t.text=String(r)}(e,a):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],o=void 0===i[1]?"":String(i[1]),a=void 0===i[0]?"":String(i[0]);r?t.text=a+" - "+o:(t.text=o,t.text2=a)}(e,a,r):Le(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,i,n);else{var o=t.x/180;if(0===o)t.text="0";else{var a=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function r(e,n){return t(n,0)?e:r(n,e%n)}function n(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}var i=n(e),o=e*i,a=Math.abs(r(o,i));return[Math.round(o/a),Math.round(i/a)]}(o);if(a[1]>=100)t.text=be(s.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===a[1]?1===a[0]?t.text="\u03c0":t.text=a[0]+"\u03c0":t.text=["",a[0],"","\u2044","",a[1],"","\u03c0"].join(""),l&&(t.text=O+t.text)}}}}(e,a,r,c,m):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide");t.text=be(t.x,e,i,n)}(e,a,0,c,m),n||(e.tickprefix&&!p(e.showtickprefix)&&(a.text=e.tickprefix+a.text),e.ticksuffix&&!p(e.showticksuffix)&&(a.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(a.text)){var g=e.labelalias[a.text];"string"===typeof g&&(a.text=g)}if("boundaries"===e.tickson||e.showdividers){var v=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};a.xbnd=[v(a.x-.5),v(a.x+e.dtick-.5)]}return a},H.hoverLabelText=function(e,t,r){r&&(e=s.extendFlat({},e,{hoverformat:r}));var n=Array.isArray(t)?t[0]:t,i=Array.isArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(e,n,r)+" - "+H.hoverLabelText(e,i,r);var o="log"===e.type&&n<=0,a=H.tickText(e,e.c2l(o?-n:n),"hover").text;return o?0===n?"0":O+a:a};var ve=["f","p","n","\u03bc","m","","k","M","G","T"];function ye(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var o=e<0,a=t._tickround,l=r||t.exponentformat||"B",c=t._tickexponent,u=H.getTickFormat(t),d=t.separatethousands;if(n){var f={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};me(f),a=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var h,p=Math.pow(10,-a)/2;if("none"===l&&(c=0),(e=Math.abs(e))"+h+"
":"B"===l&&9===c?e+="B":ye(l)&&(e+=ve[c/3+5]));return o?O+e:e}function we(e,t){if(e){var r=Object.keys(N).reduce((function(e,r){return-1!==t.indexOf(r)&&N[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function _e(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=n(e))}function s(e,t){var r=null===t[0],n=null===t[1],i=o(e,t[0])>=0,a=o(e,t[1])<=0;return(r||i)&&(n||a)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var a={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var n=H.getFromId(e,t);r||(r={}),r.axShifts=a,r.overlayingShiftedAx=o;var i=H.drawOne(e,n,r);return n._shiftPusher&&Ne(n,n._fullDepth||0,a,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(e,t,r){var n,i,l,c=(r=r||{}).axShifts||{},h=r.overlayingShiftedAx||[];t.setScale();var p=e._fullLayout,m=t._id,g=m.charAt(0),v=H.counterLetter(m),y=p._plots[t._mainSubplot];if(y){if(t._shiftPusher=t.autoshift||-1!==h.indexOf(t._id)||-1!==h.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var x=t.linewidth/2||0;"inside"===t.ticks&&(x+=t.ticklen),Ne(t,x,c,!0),Ne(t,t.shift||0,c,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,c));var b=y[g+"axislayer"],w=t._mainLinePosition,_=w+=t._shift,k=t._mainMirrorPosition,S=t._vals=H.calcTicks(t),T=[t.mirror,_,k].join("_");for(n=0;n0?r.bottom-u:0,d))));var f=0,h=0;if(t._shiftPusher&&(f=Math.max(d,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==p._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(h+=Te(t))),t._fullDepth=Math.max(f,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var m=[0,1],y="number"===typeof t._shift?t._shift:0;if("x"===g){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,d),m.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,d),n[l]=t._depth-y):(t._depth=Math.max(r.height>0?r.right-u:0,d),n[l]=t._depth+y,m.reverse()),r.height>0){var w=r.bottom-(t._offset+t._length);w>0&&(n.yb=0,n.b=w);var _=t._offset-r.top;_>0&&(n.yt=1,n.t=_)}n[v]="free"===t.anchor?t.position:t._anchorAxis.domain[m[0]],t.title.text!==p._dfltTitle[g]&&(n[l]+=Te(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[c]+=d),!0===t.mirror||"ticks"===t.mirror?i[v]=t._anchorAxis.domain[m[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[v]=[t._counterDomainMin,t._counterDomainMax][m[1]]))}le&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(we(n,t.automargin),we(i,t.automargin)),o.autoMargin(e,Ae(t),n),o.autoMargin(e,Ee(t),i),o.autoMargin(e,Ie(t),s)})),s.syncOrAsync(ae)}}function ce(e){var r=m+(e||"tick");return M[r]||(M[r]=function(e,t){var r,n,i,o;e._selections[t].size()?(r=1/0,n=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Ce(this),t=f.bBox(e.node().parentNode);r=Math.min(r,t.top),n=Math.max(n,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}))):(r=0,n=0,i=0,o=0);return{top:r,bottom:n,left:i,right:o,height:n-r,width:o-i}}(t,r)),M[r]}},H.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,o=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===r)&&(o=o.map((function(e){return-e}))),e.side&&o.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),o},H.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},H.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),i=r("left"),o=r("right"),a=r("bottom"),s=r("inside"),l=a||i||n||o;if(!l&&!s)return[0,0];var c=e.side,u=l?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;(a||n)&&(u+=f*Z,d+=(e.linewidth||0)/2);(i||o)&&(u+=(e.linewidth||0)/2,d+=3);s&&"top"===c&&(d-=f*(1-Z));(i||n)&&(u=-u);"bottom"!==c&&"right"!==c||(d=-d);return[l?u:0,s?d:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return l(r+e._offset+e.l2p(ke(t)),n)}:function(t){return l(n,r+e._offset+e.l2p(ke(t)))}},H.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var o=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,a=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+s*r)+"v"+o*r:"M"+(t+s*r)+",0h"+o*r},H.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",o=function(e){return-1!==n.indexOf(e)},a=o("top"),l=o("left"),c=o("right"),u=o("bottom")||l||a||c,d=o("inside"),f="inside"===n&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,m=f?e.ticklen:0;if(d?m*=-1:u&&(m=0),f&&(h+=m,r)){var g=s.deg2rad(r);h=m*Math.cos(g)+1,p=m*Math.sin(g)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size);var v,y,x,b,w,_={labelStandoff:h+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},k=0,S=e.side,T=e._id.charAt(0),M=e.tickangle;if("x"===T)b=(w=!d&&"bottom"===S||d&&"top"===S)?1:-1,d&&(b*=-1),v=p*b,y=t+h*b,x=w?1:-.2,90===Math.abs(M)&&(d?x+=B:x=-90===M&&"bottom"===S?Z:90===M&&"top"===S?B:.5,k=B/2*(M/90)),_.xFn=function(e){return e.dx+v+k*e.fontSize},_.yFn=function(e){return e.dy+y+e.fontSize*x},_.anchorFn=function(e,t){if(u){if(l)return"end";if(c)return"start"}return i(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},_.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===T){if(b=(w=!d&&"left"===S||d&&"right"===S)?1:-1,d&&(b*=-1),v=h,y=p*b,x=0,d||90!==Math.abs(M)||(x=-90===M&&"left"===S||90===M&&"right"===S?Z:.5),d){var C=i(M)?+M:0;if(0!==C){var A=s.deg2rad(C);k=Math.abs(Math.sin(A))*Z*b,x=0}}_.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+k*e.fontSize},_.yFn=function(e){return e.dy+y+e.fontSize*B},_.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":w?"end":"start"},_.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return _},H.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",o=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),a=r.layer.selectAll("path."+i).data(o,Se);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return d.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return f.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),ze(t,[D]),a.attr("transform",r.transFn)},H.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var i=t._id+"grid",o=t.minor&&t.minor.showgrid,a=o?r.vals.filter((function(e){return e.minor})):[],s=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,u=0;u=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+i).data(v?s:a,Se);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(e){return d.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return f.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof r.path&&x.attr("d",r.path)}}ze(t,[L,j])}},H.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=H.shouldShowZeroLine(e,t,r.counterAxis),o=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);o.exit().remove(),o.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return q(e.id,t.id)}))})),o.attr("transform",r.transFn).attr("d",r.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",f.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),ze(t,[R])},H.drawLabels=function(e,t,r){r=r||{};var o=e._fullLayout,a=t._id,u=a.charAt(0),d=r.cls||a+"tick",h=r.vals.filter((function(e){return e.text})),p=r.labelFns,m=r.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],v=r.layer.selectAll("g."+d).data(t.showticklabels?h:[],Se),y=[];function x(e,o){e.each((function(e){var a=n.select(this),s=a.select(".text-math-group"),u=p.anchorFn(e,o),d=r.transFn.call(a.node(),e)+(i(o)&&0!==+o?" rotate("+o+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),h=c.lineCount(a),m=U*e.fontSize,g=p.heightFn(e,i(o)?+o:0,(h-1)*m);if(g&&(d+=l(0,g)),s.empty()){var v=a.select("text");v.attr({transform:d,"text-anchor":u}),v.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=f.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",d+l(y,0))}}))}v.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),i=e._promises.length;r.call(c.positionText,p.xFn(t),p.yFn(t)).call(f.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[i]?y.push(e._promises.pop().then((function(){x(r,m)}))):x(r,m)})),ze(t,[z]),v.exit().remove(),r.repositionOnUpdate&&v.each((function(e){n.select(this).select("text").call(c.positionText,p.xFn(e),p.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),a="x"===t._id.charAt(0),l=0,c=a?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),h=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var y in v.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var o=f.bBox(r.node()),s=0;a?(o.right>h||o.lefth||o.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},x(v,g+1?g:m);var b=null;t._selections&&(t._selections[d]=v);var w=[function(){return y.length&&Promise.all(y)}];t.automargin&&o._redrawFromAutoMarginCount&&90===g?(b=90,w.push((function(){x(v,g)}))):w.push((function(){if(x(v,m),h.length&&"x"===u&&!i(m)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,o=[];if(v.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),i=Ce(this),a=f.bBox(i.node());o.push({top:0,bottom:10,height:10,left:r-a.width/2,right:r+a.width/2+2,width:a.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var a=h.length,l=Math.abs((h[a-1].x-h[0].x)*t._m)/(a-1),c=t.ticklabelposition||"",d=function(e){return-1!==c.indexOf(e)},p=d("top"),g=d("left"),y=d("right"),w=d("bottom")||g||p||y?(t.tickwidth||0)+6:0,_=l<2.5*n||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e0?T*=1+T/(P-=T):T=0,"y"!==t._id.charAt(0)&&(T=-T),E[C]=k.p2d(k.d2p(k.range[C])+M*T),"min"===k.autorange||"max reversed"===k.autorange?(E[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):"max"!==k.autorange&&"min reversed"!==k.autorange||(E[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),o._insideTickLabelsUpdaterange[k._name+".range"]=E}var N=s.syncOrAsync(w);return N&&N.then&&e._promises.push(N),N},H.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),o=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===o||"left"===o?r._offset:"bottom"===o||"right"===o?r._offset+r._length:void 0},H.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(Me(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(!i)return;var o=e._fullLayout,a=t._id.charAt(0),s=H.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM,a=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(e,t){return t?n(e):"number"===typeof e}function d(e){return Math.max(1,(e-1)/1e3)}e.exports=function(e,t,r){var i=e,f=r.noMultiCategory;if(a(i)&&!i.length)return"-";if(!f&&function(e){return a(e[0])&&a(e[1])}(i))return"multicategory";if(f&&Array.isArray(i[0])){for(var h=[],p=0;p2*a}(i,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=d(r),i=0,a=0,s={},u=0;u2*i}(i,g)?"category":function(e,t){for(var r=e.length,n=0;n{"use strict";var n=r(51908),i=r(44049),o=r(53787),a=r(99862),s=r(80254),l=r(45446),c=r(96592),u=r(64698),d=r(46139),f=r(33095),h=r(29550),p=r(50923),m=r(59092),g=r(4738),v=r(99727).WEEKDAY_PATTERN,y=r(99727).HOUR_PATTERN;function x(e,t,r){function i(r,n){return o.coerce(e,t,l.rangebreaks,r,n)}if(i("enabled")){var a=i("bounds");if(a&&a.length>=2){var s,c,u="";if(2===a.length)for(s=0;s<2;s++)if(c=w(a[s])){u=v;break}var d=i("pattern",u);if(d===v)for(s=0;s<2;s++)(c=w(a[s]))&&(t.bounds[s]=a[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=a[s],d){case v:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=a[s]=c;break;case y:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=a[s]=c}if(!1===r.autorange){var f=r.range;if(f[0]f[1])return void(t.enabled=!1)}else if(a[0]>f[0]&&a[1]{"use strict";var n=r(41287),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(e,t){return a(e,t)+[" And for dates see: "+o+".","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(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?a:s)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:a,descriptionWithDates:s}},24279:(e,t,r)=>{"use strict";var n=r(44049),i=r(99727);function o(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return o(t,e._axisMatchGroups)||o(t,e._axisConstraintGroups)}},29550:e=>{"use strict";e.exports=function(e,t,r,n){if("category"===t.type){var i,o=e.categoryarray,a=Array.isArray(o)&&o.length>0;a&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),a||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var r,n,i,o=t.dataAttr||e._id.charAt(0),a={};if(t.axData)r=t.axData;else for(r=[],n=0;n{"use strict";var n=r(51908),i=r(53787),o=r(24956),a=o.ONEDAY,s=o.ONEWEEK;t.dtick=function(e,t){var r="log"===t,i="date"===t,o="category"===t,s=i?a:1;if(!e)return s;if(n(e))return(e=Number(e))<=0?s:o?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if("string"!==typeof e||!i&&!r)return s;var l=e.charAt(0),c=e.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:e},t.tick0=function(e,t,r,o){return"date"===t?i.cleanDate(e,i.dateTick0(r,o%s===0?1:0)):"D1"!==o&&"D2"!==o?n(e)?Number(e):0:void 0}},99727:(e,t,r)=>{"use strict";var n=r(64563).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"}}},14511:(e,t,r)=>{"use strict";var n=r(53787),i=r(10351),o=r(24279).id2name,a=r(45446),s=r(11706),l=r(4738),c=r(24956).ALMOST_EQUAL,u=r(81653).FROM_BL;function d(e,t,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,d=t._id,m=d.charAt(0),g=((s._splomAxes||{})[m]||{})[d]||{},v=t._id,y="x"===v.charAt(0);function x(r,i){return n.coerce(e,t,a,r,i)}t._matchGroup=null,t._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(e,t,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,w,_=t.type,k=[];for(b=0;bn?i.substr(n):o.substr(r))+a:i+o+e*t:a}function g(e,t){for(var r=t._size,n=r.h/r.w,i={},o=Object.keys(e),a=0;ac*x)||k)for(r=0;rR&&zO&&(O=z);f/=(O-I)/(2*P),I=l.l2r(I),O=l.l2r(O),l.range=l._input.range=C{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(25378),s=r(32954),l=r(44049),c=i.strTranslate,u=r(98224),d=r(66235),f=r(50973),h=r(76719),p=r(28605),m=r(19602),g=r(63e3),v=r(57873),y=v.selectingOrDrawing,x=v.freeMode,b=r(81653).FROM_TL,w=r(24513),_=r(93415).redrawReglTraces,k=r(44115),S=r(24279).getFromId,T=r(26002).prepSelect,M=r(26002).clearOutline,C=r(26002).selectOnClick,A=r(11706),E=r(99727),I=E.MINDRAG,O=E.MINZOOM,P=!0;function R(e,t,r,n){var o=i.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return o.call(m,n),o.node()}function L(e,t,r,i,o,a,s){var l=R(e,"rect",t,r);return n.select(l).call(f.setRect,i,o,a,s),l}function j(e,t){for(var r=0;r=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function F(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function B(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function Z(e,t,r,n,i,o){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),U(e,t,i,o)}function U(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),P=!1)}function W(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,O)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function G(e,t,r,n,o){for(var a,s,l,c,u=!1,d={},f={},h=(o||{}).xaHash,p=(o||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==e||ve||He(),ge)a.indexOf("select")>-1&&C(r,i,K,$,t.id,Oe),a.indexOf("event")>-1&&h.click(i,r,t.id);else if(1===e&&ve){var s=m?R:P,c="s"===m||"w"===v?0:1,d=s._name+".range["+c+"]",f=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,o("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,o("."+String(r)+"g")(n))}(s,c),p="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(p="right")):"e"===v&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,d,t)}))}}}function Le(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+we)),i=Math.max(0,Math.min(te,pe*r+_e)),o=Math.abs(n-we),a=Math.abs(i-_e);function s(){Ce="",ke.r=ke.l,ke.t=ke.b,Ee.attr("d","M0,0Z")}if(ke.l=Math.min(we,n),ke.r=Math.max(we,n),ke.t=Math.min(_e,i),ke.b=Math.max(_e,i),re.isSubplotConstrained)o>O||a>O?(Ce="xy",o/ee>a/te?(a=o*te/ee,_e>i?ke.t=_e-a:ke.b=_e+a):(o=a*ee/te,we>n?ke.l=we-o:ke.r=we+o),Ee.attr("d",W(ke))):s();else if(ne.isSubplotConstrained)if(o>O||a>O){Ce="xy";var l=Math.min(ke.l/ee,(te-ke.b)/te),c=Math.max(ke.r/ee,(te-ke.t)/te);ke.l=l*ee,ke.r=c*ee,ke.b=(1-l)*te,ke.t=(1-c)*te,Ee.attr("d",W(ke))}else s();else!oe||a0){var u;if(ne.isSubplotConstrained||!ie&&1===oe.length){for(u=0;u1&&(void 0!==o.maxallowed&&se===(o.range[0]1&&(void 0!==a.maxallowed&&le===(a.range[0]{"use strict";var n=r(8996),i=r(76719),o=r(63e3),a=r(19602),s=r(34189).makeDragBox,l=r(99727).DRAGGERSIZE;t.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(e,t){if((r._plots[e].mainplot&&!0)===(r._plots[t].mainplot&&!0)){var n=e.split("y"),i=t.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[e].mainplot?1:-1})).forEach((function(t){var n=r._plots[t],a=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(e,n,a._offset,c._offset,a._length,c._length,"ns","ew");u.onmousemove=function(r){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===t&&e._fullLayout._plots[t]&&i.hover(e,r,t)},i.hover(e,r,t),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=t},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,o.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,n,a._offset-l,c._offset-l,l,l,"n","w"),s(e,n,a._offset+a._length,c._offset-l,l,l,"n","e"),s(e,n,a._offset-l,c._offset+c._length,l,l,"s","w"),s(e,n,a._offset+a._length,c._offset+c._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(t===a._mainSubplot){var d=a._mainLinePosition;"top"===a.side&&(d-=l),s(e,n,a._offset+.1*a._length,d,.8*a._length,l,"","ew"),s(e,n,a._offset,d,.1*a._length,l,"","w"),s(e,n,a._offset+.9*a._length,d,.1*a._length,l,"","e")}if(t===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=l),s(e,n,f,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(e,n,f,c._offset+.9*c._length,l,.1*c._length,"s",""),s(e,n,f,c._offset,l,.1*c._length,"n","")}}}));var a=r._hoverlayer.node();a.onmousemove=function(t){t.target=e._fullLayout._lasthover,i.hover(e,t,r._hoversubplot)},a.onclick=function(t){t.target=e._fullLayout._lasthover,i.click(e,t)},a.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},t.updateFx(e)}},t.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";a(t._draggers,r)}},49861:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(24279);e.exports=function(e){return function(t,r){var a=t[e];if(Array.isArray(a))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,u=c.xaxis,d=c.yaxis,f=c.cartesian,h=r._has("cartesian")||r._has("gl2d"),p=0;p{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(44115),s=r(50973),l=r(38213).a0,c=r(24279),u=r(99727),d=r(83580),f=o.ensureSingle;function h(e,t,r){return o.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function p(e,t,r,o,a){for(var c,d,f,h=u.traceLayerClasses,p=e._fullLayout,m=p._modules,g=[],v=[],y=0;y{"use strict";var n=r(92948),i=r(18022),o=r(93701).P,a=r(10191).extendFlat,s=r(99862).templatedArray,l=r(89849).descriptionWithDates,c=r(24956).ONEDAY,u=r(99727),d=u.HOUR_PATTERN,f=u.WEEKDAY_PATTERN,h={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},p=a({},h,{values:h.values.slice().concat(["sync"]),description:[h.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function m(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},y={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function b(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return e||(t.dflt=5),t}function w(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return e||(t.dflt=1),t}var _={valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the tick color."},k={valType:"color",dflt:i.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function S(e){var t={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return e||(t.dflt=1),t}var T=a({},o,{editType:"ticks"}),M={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")};e.exports={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},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,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[f,d,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+f+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+d+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+f+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+d+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:c,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:p,nticks:m(),tick0:g,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:y,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},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",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:b(),tickwidth:w(),tickcolor:_,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use \u22121 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:a({},o,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:n({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:M,gridcolor:k,gridwidth:S(),griddash:T,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:h,nticks:m("minor"),tick0:g,dtick:v,tickvals:y,ticks:x,ticklen:b("minor"),tickwidth:w("minor"),tickcolor:_,gridcolor:k,gridwidth:S("minor"),griddash:T,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},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",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},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",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:n({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},47101:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87267).isUnifiedHover,a=r(74064),s=r(99862),l=r(79443),c=r(45446),u=r(80035),d=r(90471),f=r(14511),h=r(75486),p=r(24279),m=p.id2name,g=p.name2id,v=r(99727).AX_ID_PATTERN,y=r(44049),x=y.traceIs,b=y.getComponentMethod;function w(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}e.exports=function(e,t,r){var y,_,k=t.autotypenumbers,S={},T={},M={},C={},A={},E={},I={},O={},P={},R={};for(y=0;y{"use strict";var n=r(25378).mix,i=r(18022),o=r(53787);e.exports=function(e,t,r,a){var s=(a=a||{}).dfltColor;function l(r,n){return o.coerce2(e,t,a.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",a.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=l("gridcolor",n(s,a.bgColor,a.blend||i.lightFraction).toRgbString()),f=l("gridwidth"),h=l("griddash");if(r("showgrid",a.showGrid||!!d||!!f||!!h)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),a.hasMinor){var p=l("minor.gridcolor",n(t.gridcolor,a.bgColor,67).toRgbString()),m=l("minor.gridwidth",t.gridwidth||1),g=l("minor.griddash",t.griddash||"solid");r("minor.showgrid",!!p||!!m||!!g)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!a.noZeroLine){var v=l("zerolinecolor",s),y=l("zerolinewidth");r("zeroline",a.showGrid||!!v||!!y)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},75486:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787);e.exports=function(e,t,r,o){var a,s,l,c,u,d,f=o.counterAxes||[],h=o.overlayableAxes||[],p=o.letter,m=o.grid,g=o.overlayingDomain;m&&(s=m._domains[p][m._axisMap[t._id]],a=m._anchors[t._id],s&&(l=m[p+"side"].split(" ")[0],c=m.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],a=a||(n(e.position)?"free":f[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,u=0,d=!1;var v=i.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(f),dflt:a}},"anchor"),y=i.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");if("free"===v){if("y"===p)r("autoshift")&&(c="left"===y?g[0]:g[1],d=!t.automargin||t.automargin,u="left"===y?-3:3),r("shift",u);r("position",c)}r("automargin",d);var x=!1;if(h.length&&(x=i.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!x){var b=r("domain",s);b[0]>b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},33095:(e,t,r)=>{"use strict";var n=r(16824);e.exports=function(e,t,r,i,o){o||(o={});var a=o.tickSuffixDflt,s=n(e);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",a)&&r("showticksuffix",s)}},59092:(e,t,r)=>{"use strict";var n=r(23795);e.exports=function(e,t,r,i){var o=t._template||{},a=t.type||o.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||(i.noInsiderange||"log"===a||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(t.insiderange=!1,s=void 0),s&&(l=r("range",s))));var c,u=t.getAutorangeDflt(l,i),d=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==d&&!0!==d)&&(null===l[0]||"min"!==d&&"max reversed"!==d)&&(null===l[1]||"max"!==d&&"min reversed"!==d)||(l=void 0,delete t.range,t.autorange=!0,c=!0),c||(d=r("autorange",u=t.getAutorangeDflt(l,i))),d&&(n(r,d,l),"linear"!==a&&"-"!==a||r("rangemode")),t.cleanRange()}},11706:(e,t,r)=>{"use strict";var n=r(81653).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],o=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(o+(i[0]-o)*t),e.l2r(o+(i[1]-o)*t)],e.setScale()}},4738:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).g0,o=r(53787),a=o.numberFormat,s=r(51908),l=o.cleanNumber,c=o.ms2DateTime,u=o.dateTime2ms,d=o.ensureNumber,f=o.isArrayOrTypedArray,h=r(24956),p=h.FP_SAFE,m=h.BADNUM,g=h.LOG_CLIP,v=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,w=h.ONESEC,_=r(24279),k=r(99727),S=k.HOUR_PATTERN,T=k.WEEKDAY_PATTERN;function M(e){return Math.pow(10,e)}function C(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function A(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function E(t,r,n,i){if((i||{}).msUTC&&s(t))return+t;var a=u(t,n||e.calendar);if(a===m){if(!s(t))return m;t=+t;var l=Math.floor(10*o.mod(t+.05,1)),c=Math.round(t-l/10);a=u(new Date(c))+l/10}return a}function I(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function P(t){if(C(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"===typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return m}function R(t){if(e._categoriesMap)return e._categoriesMap[t]}function L(e){var t=R(e);return void 0!==t?t:s(e)?+e:void 0}function j(e){return s(e)?+e:R(e)}function D(e,t,r){return n.round(r+t*e,2)}function z(e,t,r){return(e-r)/t}var N=function(t){return s(t)?D(t,e._m,e._b):m},F=function(t){return z(t,e._m,e._b)};if(e.rangebreaks){var B="y"===h;N=function(t){if(!s(t))return m;var r=e._rangebreaks.length;if(!r)return D(t,e._m,e._b);var n=B;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,o=i*t,a=0,l=0;lu)){a=o<(c+u)/2?l:l+1;break}a=l+1}var d=e._B[a]||0;return isFinite(d)?D(t,e._m2,d):0},F=function(t){var r=e._rangebreaks.length;if(!r)return z(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return z(t,e._m2,e._B[n])}}e.c2l="log"===e.type?A:d,e.l2c="log"===e.type?M:d,e.l2p=N,e.p2l=F,e.c2p="log"===e.type?function(e,t){return N(A(e,t))}:N,e.p2c="log"===e.type?function(e){return M(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=F,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return A(l(e),t)},e.r2d=e.r2c=function(e){return M(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=d,e.c2r=A,e.l2d=M,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return M(F(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=F,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=o.identity,e.d2c=e.r2c=e.d2l=e.r2l=E,e.c2d=e.c2r=e.l2d=e.l2r=I,e.d2p=e.r2p=function(t,r,n){return e.l2p(E(t,0,n))},e.p2d=e.p2r=function(e,t,r){return I(F(e),t,r)},e.cleanPos=function(t){return o.cleanDate(t,m,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var r=j(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=j,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=L,e.r2c=function(t){var r=L(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=R,e.l2r=e.c2r=d,e.r2l=L,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(n){var i,a,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var c in l)if(c!==r){var u=t[_.id2name(c)];s=s.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(i=0;il[1]&&(i[s?0:1]=n)}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,a=o.nestedProperty(e,t).get();if(i=(i="date"===e.type?o.dfltRange(e.calendar):"y"===h?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),a&&2===a.length){var l=null===a[0],c=null===a[1];for("date"!==e.type||e.autorange||(a[0]=o.cleanDate(a[0],m,e.calendar),a[1]=o.cleanDate(a[1],m,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!o.isDateTime(a[n],e.calendar)){e[t]=i;break}if(e.r2l(a[0])===e.r2l(a[1])){var u=o.constrain(e.r2l(a[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);a[0]=e.l2r(u-1e3),a[1]=e.l2r(u+1e3);break}}else{if(!s(a[n])){if(l||c||!s(a[1-n])){e[t]=i;break}a[n]=a[1-n]*(n?10:.1)}if(a[n]<-p?a[n]=-p:a[n]>p&&(a[n]=p),a[0]===a[1]){var d=Math.max(1,Math.abs(1e-6*a[0]));a[0]-=d,a[1]+=d}}}else o.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=_.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var o=r&&e._r?"_r":"range",a=e.calendar;e.cleanRange(o);var s,l,c=e.r2l(e[o][0],a),u=e.r2l(e[o][1],a),d="y"===h;if((d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;su&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&t=s.min&&(es.max&&(s.max=n),i=!1)}i&&c.push({min:e,max:n})}};for(n=0;n{"use strict";e.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}},46139:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235).contrast,o=r(45446),a=r(16824),s=r(80254);function l(e,t){function r(r,i){return n.coerce(e,t,o.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}e.exports=function(e,t,r,c,u){u||(u={});var d=r("labelalias");n.isPlainObject(d)||delete t.labelalias;var f=a(e);if(r("showticklabels")){var h=u.font||{},p=t.color,m=-1!==(t.ticklabelposition||"").indexOf("inside")?i(u.bgColor):p&&p!==o.color.dflt?p:h.color;if(n.coerceFont(r,"tickfont",{family:h.family,size:h.size,color:m}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),u.noAng||r("tickangle"),"category"!==c){var g=r("tickformat");s(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),t.tickformatstops.length||delete t.tickformatstops,u.noExp||g||"date"===c||(r("showexponent",f),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},64698:(e,t,r)=>{"use strict";var n=r(53787),i=r(45446);e.exports=function(e,t,r,o){var a=o.isMinor,s=a?e.minor||{}:e,l=a?t.minor:t,c=a?i.minor:i,u=a?"minor.":"",d=n.coerce2(s,l,c,"ticklen",a?.6*(t.ticklen||5):void 0),f=n.coerce2(s,l,c,"tickwidth",a?t.tickwidth||1:void 0),h=n.coerce2(s,l,c,"tickcolor",(a?t.tickcolor:void 0)||l.color);r(u+"ticks",!a&&o.outerTicks||d||f||h?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},96592:(e,t,r)=>{"use strict";var n=r(60047),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o,a){a||(a={});var s=a.isMinor,l=s?e.minor||{}:e,c=s?t.minor:t,u=s?"minor.":"";function d(e){var t=l[e];return void 0!==t?t:(c._template||{})[e]}var f=d("tick0"),h=d("dtick"),p=d("tickvals"),m=r(u+"tickmode",i(p)?"array":h?"linear":"auto");if("auto"===m||"sync"===m)r(u+"nticks");else if("linear"===m){var g=c.dtick=n.dtick(h,o);c.tick0=n.tick0(f,o,t.calendar,g)}else if("multicategory"!==o){void 0===r(u+"tickvals")?c.tickmode="auto":s||r("ticktext")}}},76117:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=r(50973),s=r(28605);e.exports=function(e,t,r,l){var c=e._fullLayout;if(0!==t.length){var u,d,f,h;l&&(u=l());var p=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},n=0;nr.duration?(!function(){for(var r={},n=0;n rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=o.simpleMap(t.xr0,i.r2l),m=o.simpleMap(t.xr1,i.r2l),g=p[1]-p[0],v=m[1]-m[0];h[0]=(p[0]*(1-r)+r*m[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(p[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=c;if(f){var y=o.simpleMap(t.yr0,l.r2l),x=o.simpleMap(t.yr1,l.r2l),b=y[1]-y[0],w=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*w/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 h[1]=0,h[3]=u;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var _=d?c/h[2]:1,k=f?u/h[3]:1,S=d?h[0]:0,T=f?h[1]:0,M=d?h[0]/h[2]*c:0,C=f?h[1]/h[3]*u:0,A=i._offset-M,E=l._offset-C;n.clipRect.call(a.setTranslate,S,T).call(a.setScale,1/_,1/k),n.plot.call(a.setTranslate,A,E).call(a.setScale,_,k),a.setPointGroupScale(n.zoomScalePts,1/_,1/k),a.setTextPointsScale(n.zoomScaleTxt,1/_,1/k)}s.redrawComponents(e)}},80035:(e,t,r)=>{"use strict";var n=r(44049).traceIs,i=r(36562);function o(e){return{v:"x",h:"y"}[e.orientation||"v"]}function a(e,t){var r=o(e),i=n(e,"box-violin"),a=n(e._fullInput||{},"candlestick");return i&&!a&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var r,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(e,t,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(!c)return;if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=l+"calendar",d=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0);if(f.autotypenumbers=e.autotypenumbers,a(c,l)){var h=o(c),p=[];for(r=0;r{"use strict";var n=r(44049),i=r(53787);function o(e,t,r){var n,o,a,s=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return o=i.nestedProperty(n,t.prop).get(),(a=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&a[t.prop]!==o&&(s=!0),a[t.prop]=o,{changed:s,value:o}}function a(e,t){var r=[],n=t[0],o={};if("string"===typeof n)o[n]=t[1];else{if(!i.isPlainObject(n))return r;o=n}return l(o,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function s(e,t){var r,n,o,a,s=[];if(n=t[0],o=t[1],r=t[2],a={},"string"===typeof n)a[n]=o;else{if(!i.isPlainObject(n))return s;a=n,void 0===r&&(r=o)}return void 0===r&&(r=null),l(a,(function(t,n,i){var o,a;if(Array.isArray(i)){a=i.slice();var l=Math.min(a.length,e.data.length);r&&(l=Math.min(l,r.length)),o=[];for(var c=0;c0?".":"")+o;i.isPlainObject(a)?l(a,t,s,n+1):t(s,o,a)}}))}t.manageCommandObserver=function(e,r,n,a){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){o(e,c,s.cache),s.check=function(){if(l){var t=o(e,c,s.cache);return t.changed&&a&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(a({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d{"use strict";var n=r(10191).extendFlat;t.Y=function(e,t){t=t||{};var r={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",o=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",s={x:n({},r,{description:["Sets the horizontal domain of this ",i,o,"(in plot fraction).",a].join("")}),y:n({},r,{description:["Sets the vertical domain of this ",i,o,"(in plot fraction).",a].join("")}),editType:e.editType};return e.noGridCell||(s.row={valType:"integer",min:0,dflt:0,editType:e.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",i,o,".",a].join("")},s.column={valType:"integer",min:0,dflt:0,editType:e.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",i,o,".",a].join("")}),s},t.c=function(e,t,r,n){var i=n&&n.x||[0,1],o=n&&n.y||[0,1],a=t.grid;if(a){var s=r("domain.column");void 0!==s&&(s{"use strict";e.exports=function(e){var t=e.editType,r=e.colorEditType;void 0===r&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t,description:""+(e.description||"")};return e.autoSize&&(n.size.dflt="auto"),e.autoColor&&(n.color.dflt="auto"),e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},1563:e=>{"use strict";e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}}},14338:(e,t)=>{"use strict";t.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","equal earth":"equalEarth",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"},t.axesNames=["lonaxis","lataxis"],t.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},t.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},t.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]}},t.clipPad=.001,t.precision=.1,t.landColor="#F0DC82",t.waterColor="#3399FF",t.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},t.sphereSVG={type:"Sphere"},t.fillLayers={ocean:1,land:1,lakes:1},t.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},t.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],t.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],t.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},71341:(e,t,r)=>{"use strict";var n=r(8996),i=r(9497),o=i.geoPath,a=i.geoDistance,s=r(25715),l=r(44049),c=r(53787),u=c.strTranslate,d=r(66235),f=r(50973),h=r(76719),p=r(44115),m=r(28605),g=r(10351).getAutoRange,v=r(63e3),y=r(26002).prepSelect,x=r(26002).clearOutline,b=r(26002).selectOnClick,w=r(56008),_=r(14338),k=r(426),S=r(58268),T=r(40506).zL;function M(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.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 C=M.prototype;function A(e,t){var r=_.clipPad,n=e[0]+r,i=e[1]-r,o=t[0]+r,a=t[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,o],[n,a],[n+s,a],[n+2*s,a],[n+3*s,a],[i,a],[i,o],[i-s,o],[i-2*s,o],[i-3*s,o],[n,o]]]}}e.exports=function(e){return new M(e)},C.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var o=t[this.id],a=[],s=!1;for(var l in _.layerNameToAdjective)if("frame"!==l&&o["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&a._module.calcGeoJSON(o,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,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()},C.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],l=t._size,u=n.domain,d=n.projection,f=n.lonaxis,h=n.lataxis,p=f._ax,m=h._ax,v=this.projection=function(e){var t=e.projection,r=t.type,n=_.projNames[r];n="geo"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?_.lonaxisSpan[r]/2:null,d=["center","rotate","parallels","clipExtent"],f=function(e){return e?l:[]},h=0;hu*Math.PI/180}return!1},l.getPath=function(){return o().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(_.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance);u&&l.clipAngle(u-_.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=d.rotation||{},w=f.range||[],k=h.range||[];if(n.fitbounds){p._length=y[1][0]-y[0][0],m._length=y[1][1]-y[0][1],p.range=g(r,p),m.range=g(r,m);var S=(p.range[0]+p.range[1])/2,T=(m.range[0]+m.range[1])/2;if(n._isScoped)x={lon:S,lat:T};else if(n._isClipped){x={lon:S,lat:T},b={lon:S,lat:T,roll:b.roll};var M=d.type,C=_.lonaxisSpan[M]/2||180,E=_.lataxisSpan[M]/2||90;w=[S-C,S+C],k=[T-E,T+E]}else x={lon:S,lat:T},b={lon:S,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(d.parallels);var I=A(w,k);v.fitExtent(y,I);var O=this.bounds=v.getBounds(I),P=this.fitScale=v.scale(),R=v.translate();if(n.fitbounds){var L=v.getBounds(A(p.range,m.range)),j=Math.min((O[1][0]-O[0][0])/(L[1][0]-L[0][0]),(O[1][1]-O[0][1])/(L[1][1]-L[0][1]));isFinite(j)?v.scale(j*P):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(d.scale*P);var D=this.midPt=[(O[0][0]+O[1][0])/2,(O[0][1]+O[1][1])/2];if(v.translate([R[0]+(D[0]-R[0]),R[1]+(D[1]-R[1])]).clipExtent(O),n._isAlbersUsa){var z=v([x.lon,x.lat]),N=v.translate();v.translate([N[0]-(z[0]-N[0]),N[1]-(z[1]-N[1])])}},C.updateBaseLayers=function(e,t){var r=this,i=r.topojson,o=r.layers,a=r.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(_.lineLayers[e])}function c(e){return Boolean(_.fillLayers[e])}var u=(this.hasChoropleth?_.layersForChoropleth:_.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),h=r.framework.selectAll(".layer").data(u,String);h.exit().each((function(e){delete o[e],delete a[e],n.select(this).remove()})),h.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=o[e]=n.select(this);"bg"===e?r.bgRect=t.append("rect").style("pointer-events","all"):s(e)?a[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?a[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(a[e]=t.append("path").style("stroke","none"))})),h.order(),h.each((function(r){var n=a[r],o=_.layerNameToAdjective[r];"frame"===r?n.datum(_.sphereSVG):l(r)||c(r)?n.datum(T(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,o,a=1e-6,s=2.5,l=t[e],c=_.scopeDefaults[t.scope];"lonaxis"===e?(n=c.lonaxisRange,i=c.lataxisRange,o=function(e,t){return[e,t]}):"lataxis"===e&&(n=c.lataxisRange,i=c.lonaxisRange,o=function(e,t){return[t,e]});var u={type:"linear",range:[n[0],n[1]-a],tick0:l.tick0,dtick:l.dtick};m.setConvert(u,r);var d=m.calcTicks(u);t.isScoped||"lonaxis"!==e||d.pop();for(var f=d.length,h=new Array(f),p=0;p-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,u),s.indexOf("event")>-1&&h.click(i,n.event))}))}function d(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},C.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(f.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m.setConvert(e.mockAxis,r)},C.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,t)},C.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},C._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?u(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}},33857:(e,t,r)=>{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(71341),a="geo",s=i(a),l={};l[a]={valType:"subplotid",dflt:a,editType:"calc",description:["Sets a reference between this trace's geospatial coordinates and","a geographic map.","If *geo* (the default value), the geospatial coordinates refer to","`layout.geo`.","If *geo2*, the geospatial coordinates refer to `layout.geo2`,","and so on."].join(" ")},e.exports={attr:a,name:a,idRoot:a,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(41346),supplyLayoutDefaults:r(85559),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[a],s=0;s{"use strict";var n=r(18022),i=r(29707).Y,o=r(93701).P,a=r(14338),s=r(18693).overrideAll,l=r(99238),c={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["Sets the range of this axis (in degrees),","sets the map's clipped coordinates."].join(" ")},showgrid:{valType:"boolean",dflt:!1,description:"Sets whether or not graticule are shown on the map."},tick0:{valType:"number",dflt:0,description:["Sets the graticule's starting tick longitude/latitude."].join(" ")},dtick:{valType:"number",description:["Sets the graticule's longitude/latitude tick step."].join(" ")},gridcolor:{valType:"color",dflt:n.lightLine,description:["Sets the graticule's stroke color."].join(" ")},gridwidth:{valType:"number",min:0,dflt:1,description:["Sets the graticule's stroke width (in px)."].join(" ")},griddash:o};(e.exports=s({domain:i({name:"geo"},{description:["Note that geo subplots are constrained by domain.","In general, when `projection.scale` is set to 1.","a map will fit either its x or y domain, but not both."].join(" ")}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot",description:["Determines if this subplot's view settings are auto-computed to fit trace data.","On scoped maps, setting `fitbounds` leads to `center.lon` and `center.lat` getting auto-filled.","On maps with a non-clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","and `projection.rotation.lon` getting auto-filled.","On maps with a clipped projection, setting `fitbounds` leads to `center.lon`, `center.lat`,","`projection.rotation.lon`, `projection.rotation.lat`, `lonaxis.range` and `lonaxis.range`","getting auto-filled.","If *locations*, only the trace's visible locations are considered in the `fitbounds` computations.","If *geojson*, the entire trace input `geojson` (if provided) is considered in the `fitbounds` computations,","Defaults to *false*."].join(" ")},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0,description:["Sets the resolution of the base layers.","The values have units of km/mm","e.g. 110 corresponds to a scale ratio of 1:110,000,000."].join(" ")},scope:{valType:"enumerated",values:l(a.scopeDefaults),dflt:"world",description:"Set the scope of the map."},projection:{type:{valType:"enumerated",values:l(a.projNames),description:"Sets the projection type."},rotation:{lon:{valType:"number",description:["Rotates the map along parallels","(in degrees East).","Defaults to the center of the `lonaxis.range` values."].join(" ")},lat:{valType:"number",description:["Rotates the map along meridians","(in degrees North)."].join(" ")},roll:{valType:"number",description:["Roll the map (in degrees)","For example, a roll of *180* makes the map appear upside down."].join(" ")}},tilt:{valType:"number",dflt:0,description:["For satellite projection type only.","Sets the tilt angle of perspective projection."].join(" ")},distance:{valType:"number",min:1.001,dflt:2,description:["For satellite projection type only.","Sets the distance from the center of the sphere to the point of view","as a proportion of the sphere\u2019s radius."].join(" ")},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}],description:["For conic projection types only.","Sets the parallels (tangent, secant)","where the cone intersects the sphere."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Zooms in or out on the map view.","A scale of *1* corresponds to the largest zoom level","that fits the map's lon and lat ranges. "].join(" ")}},center:{lon:{valType:"number",description:["Sets the longitude of the map's center.","By default, the map's longitude center lies at the middle of the longitude range","for scoped projection and above `projection.rotation.lon` otherwise."].join(" ")},lat:{valType:"number",description:["Sets the latitude of the map's center.","For all projection types, the map's latitude center lies","at the middle of the latitude range by default."].join(" ")}},visible:{valType:"boolean",dflt:!0,description:"Sets the default visibility of the base layers."},showcoastlines:{valType:"boolean",description:"Sets whether or not the coastlines are drawn."},coastlinecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the coastline color."},coastlinewidth:{valType:"number",min:0,dflt:1,description:"Sets the coastline stroke width (in px)."},showland:{valType:"boolean",dflt:!1,description:"Sets whether or not land masses are filled in color."},landcolor:{valType:"color",dflt:a.landColor,description:"Sets the land mass color."},showocean:{valType:"boolean",dflt:!1,description:"Sets whether or not oceans are filled in color."},oceancolor:{valType:"color",dflt:a.waterColor,description:"Sets the ocean color"},showlakes:{valType:"boolean",dflt:!1,description:"Sets whether or not lakes are drawn."},lakecolor:{valType:"color",dflt:a.waterColor,description:"Sets the color of the lakes."},showrivers:{valType:"boolean",dflt:!1,description:"Sets whether or not rivers are drawn."},rivercolor:{valType:"color",dflt:a.waterColor,description:"Sets color of the rivers."},riverwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the rivers."},showcountries:{valType:"boolean",description:"Sets whether or not country boundaries are drawn."},countrycolor:{valType:"color",dflt:n.defaultLine,description:"Sets line color of the country boundaries."},countrywidth:{valType:"number",min:0,dflt:1,description:"Sets line width (in px) of the country boundaries."},showsubunits:{valType:"boolean",description:["Sets whether or not boundaries of subunits within countries","(e.g. states, provinces) are drawn."].join(" ")},subunitcolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the subunits boundaries."},subunitwidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the subunits boundaries."},showframe:{valType:"boolean",description:"Sets whether or not a frame is drawn around the map."},framecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color the frame."},framewidth:{valType:"number",min:0,dflt:1,description:"Sets the stroke width (in px) of the frame."},bgcolor:{valType:"color",dflt:n.background,description:"Set the background color of the map"},lonaxis:c,lataxis:c},"plot","from-root")).uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view","(projection and center). Defaults to `layout.uirevision`."].join(" ")}},85559:(e,t,r)=>{"use strict";var n=r(53787),i=r(38020),o=r(38213).NG,a=r(14338),s=r(41346),l=a.axesNames;function c(e,t,r,i){var s=o(i.fullData,"geo",i.id).map((function(e){return e._expandedIndex})),c=r("resolution"),u=r("scope"),d=a.scopeDefaults[u],f=r("projection.type",d.projType),h=t._isAlbersUsa="albers usa"===f;h&&(u=t.scope="usa");var p=t._isScoped="world"!==u,m=t._isSatellite="satellite"===f,g=t._isConic=-1!==f.indexOf("conic")||"albers"===f,v=t._isClipped=!!a.lonaxisSpan[f];if(!1===e.visible){var y=n.extendDeep({},t._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),t._template=y}for(var x=r("visible"),b=0;b0&&O<0&&(O+=360);var P,R,L,j=(I+O)/2;if(!h){var D=p?d.projRotate:[j,0,0];P=r("projection.rotation.lon",D[0]),r("projection.rotation.lat",D[1]),r("projection.rotation.roll",D[2]),r("showcoastlines",!p&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}(h?(R=-96.6,L=38.7):(R=p?j:P,L=(E[0]+E[1])/2),r("center.lon",R),r("center.lat",L),m&&(r("projection.tilt"),r("projection.distance")),g)&&r("projection.parallels",d.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",p&&"usa"!==u&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),p||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete t.projection.scale,p?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}e.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},56008:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(44049),a=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function d(e,t,r){var n=e.id,a=e.graphDiv,s=a.layout,l=s[n],c=a._fullLayout,u=c[n],d={},f={};function h(e,t){d[n+"."+e]=i.nestedProperty(l,e).get(),o.call("_storeDirectGUIEdit",s,c._preGUI,d);var r=i.nestedProperty(u,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),f[n+"."+e]=t)}r(h),h("projection.scale",t.scale()/e.fitScale),h("fitbounds",!1),a.emit("plotly_relayout",f)}function f(e,t){var r=u(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render(!0);var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),d(e,t,i)})),r}function h(e,t){var r,i,o,a,s,f,h,p,m,g=u(0,t),v=2;function y(e){return t.invert(e)}function x(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=t.rotate(),o=t.translate(),a=i,s=y(r)})).on("zoom",(function(){if(f=n.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>v||Math.abs(n[1]-e[1])>v}(r))return g.scale(t.scale()),void g.translate(t.translate());t.scale(n.event.scale),t.translate([o[0],n.event.translate[1]]),s?y(f)&&(p=y(f),h=[a[0]+(p[0]-s[0]),i[1],i[2]],t.rotate(h),a=h):s=y(r=f),m=!0,e.render(!0);var l=t.rotate(),c=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),m&&d(e,t,x)})),g}function p(e,t){var r,i={r:t.rotate(),k:t.scale()},o=u(0,t),f=function(e){var t=0,r=arguments.length,i=[];for(;++tp?(o=(d>0?90:-90)-h,i=0):(o=Math.asin(d/p)*s-h,i=Math.sqrt(p*p-d*d));var m=180-o-2*h,v=(Math.atan2(f,u)-Math.atan2(c,i))*s,x=(Math.atan2(f,u)-Math.atan2(c,-i))*s,b=g(r[0],r[1],o,v),w=g(r[0],r[1],m,x);return b<=w?[o,v,r[2]]:[m,x,r[2]]}(l,r,d);isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])||(h=d),t.rotate(h),d=h}}else r=m(t,c=e);f.of(this,arguments)({type:"zoom"})})),e=f.of(this,arguments),h++||e({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(c),p.call(o,"zoom",null),r=f.of(this,arguments),--h||r({type:"zoomend"}),d(e,t,v)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(o,f,"on")}function m(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*a,r=e[1]*a,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function g(e,t,r,n){var i=v(r-e),o=v(n-t);return Math.sqrt(i*i+o*o)}function v(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*a,i=e.slice(),o=0===t?1:0,s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function x(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var n=r(44049),i=r(99727).SUBPLOT_PATTERN;t.AU=function(e,t,r){var i=n.subplotsRegistry[t];if(!i)return[];for(var o=i.attr,a=[],s=0;s{"use strict";var n=r(53420),i=r(90409),o=r(49175),a=r(99727),s=r(32954);function l(e,t){this.element=e,this.plot=t,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(e){var t=e.mouseContainer,r=e.glplot,c=new l(t,r);function u(){e.xaxis.autorange=!1,e.yaxis.autorange=!1}function d(t,n,i){var o,s,l=e.calcDataBox(),d=r.viewBox,f=c.lastPos[0],h=c.lastPos[1],p=a.MINDRAG*r.pixelRatio,m=a.MINZOOM*r.pixelRatio;function g(t,r,n){var i=Math.min(r,n),o=Math.max(r,n);i!==o?(l[t]=i,l[t+2]=o,c.dataBox=l,e.setRanges(l)):(e.selectBox.selectBox=[0,0,1,1],e.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=d[3]-d[1]-i,e.fullLayout.dragmode){case"zoom":if(t){var v=n/(d[2]-d[0])*(l[2]-l[0])+l[0],y=i/(d[3]-d[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(o)*w*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(w))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/w*(o>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(w)))}}else c.boxEnabled?(o=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],o||s?(o&&(g(0,c.boxStart[0],c.boxEnd[0]),e.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,t?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n){"use strict";var n=r(28605),i=r(55115);function o(e){this.scene=e,this.gl=e.gl,this.pixelRatio=e.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 a=o.prototype,s=["xaxis","yaxis"];a.merge=function(e){var t,r,n,o,a,l,c,u,d,f,h;for(this.titleEnable=!1,this.backgroundColor=i(e.plot_bgcolor),f=0;f<2;++f){var p=(t=s[f]).charAt(0);for(n=(r=e[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[p]?"":r.title.text,h=0;h<=2;h+=2)this.labelEnable[f+h]=!1,this.labels[f+h]=n,this.labelColor[f+h]=i(r.title.font.color),this.labelFont[f+h]=r.title.font.family,this.labelSize[f+h]=r.title.font.size,this.labelPad[f+h]=this.getLabelPad(t,r),this.tickEnable[f+h]=!1,this.tickColor[f+h]=i((r.tickfont||{}).color),this.tickAngle[f+h]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[f+h]=this.getTickPad(r),this.tickMarkLength[f+h]=0,this.tickMarkWidth[f+h]=r.tickwidth||0,this.tickMarkColor[f+h]=i(r.tickcolor),this.borderLineEnable[f+h]=!1,this.borderLineColor[f+h]=i(r.linecolor),this.borderLineWidth[f+h]=r.linewidth||0;c=this.hasSharedAxis(r),a=this.hasAxisInDfltPos(t,r)&&!c,l=this.hasAxisInAltrPos(t,r)&&!c,o=r.mirror||!1,u=c?-1!==String(o).indexOf("all"):!!o,d=c?"allticks"===o:-1!==String(o).indexOf("ticks"),a?this.labelEnable[f]=!0:l&&(this.labelEnable[f+2]=!0),a?this.tickEnable[f]=r.showticklabels:l&&(this.tickEnable[f+2]=r.showticklabels),(a||u)&&(this.borderLineEnable[f]=r.showline),(l||u)&&(this.borderLineEnable[f+2]=r.showline),(a||d)&&(this.tickMarkLength[f]=this.getTickMarkLength(r)),(l||d)&&(this.tickMarkLength[f+2]=this.getTickMarkLength(r)),this.gridLineEnable[f]=r.showgrid,this.gridLineColor[f]=i(r.gridcolor),this.gridLineWidth[f]=r.gridwidth,this.zeroLineEnable[f]=r.zeroline,this.zeroLineColor[f]=i(r.zerolinecolor),this.zeroLineWidth[f]=r.zerolinewidth}},a.hasSharedAxis=function(e){var t=this.scene,r=t.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,e).indexOf(t.id)},a.hasAxisInDfltPos=function(e,t){var r=t.side;return"xaxis"===e?"bottom"===r:"yaxis"===e?"left"===r:void 0},a.hasAxisInAltrPos=function(e,t){var r=t.side;return"xaxis"===e?"top"===r:"yaxis"===e?"right"===r:void 0},a.getLabelPad=function(e,t){var r=1.5,n=t.title.font.size,i=t.showticklabels;return"xaxis"===e?"top"===t.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:"yaxis"===e?"right"===t.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},a.getTickPad=function(e){return"outside"===e.ticks?10+e.ticklen:15},a.getTickMarkLength=function(e){if(!e.ticks)return 0;var t=e.ticklen;return"inside"===e.ticks?-t:t},e.exports=function(e){return new o(e)}},27952:(e,t,r)=>{"use strict";var n=r(18693).overrideAll,i=r(18345),o=r(79443),a=r(83580),s=r(99727),l=r(48206),c=r(18971),u=r(38213).NG;t.name="gl2d",t.attr=["xaxis","yaxis"],t.idRoot=["x","y"],t.idRegex=s.idRegex,t.attrRegex=s.attrRegex,t.attributes=r(68861),t.supplyLayoutDefaults=function(e,t,r){t._has("cartesian")||l.supplyLayoutDefaults(e,t,r)},t.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),t.baseLayoutAttrOverrides=n({plot_bgcolor:o.plot_bgcolor,hoverlabel:c.hoverlabel},"plot","nested"),t.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots.gl2d,o=0;o{"use strict";var n,i,o=r(44049),a=r(28605),s=r(76719),l=r(13084).gl_plot2d,c=r(13084).gl_spikes2d,u=r(13084).gl_select_box,d=r(6514),f=r(18394),h=r(63352),p=r(51708),m=r(14511),g=m.enforce,v=m.clean,y=r(10351).doAutoRange,x=r(57873),b=x.drawMode,w=x.selectMode,_=["xaxis","yaxis"],k=r(99727).SUBPLOT_PATTERN;function S(e,t){this.container=e.container,this.graphDiv=e.graphDiv,this.pixelRatio=e.plotGlPixelRatio||window.devicePixelRatio,this.id=e.id,this.staticPlot=!!e.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(t),this.makeFramework(),this.stopped||(this.glplotOptions=f(this),this.glplotOptions.merge(t),this.glplot=l(this.glplotOptions),this.camera=h(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(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=S;var T=S.prototype;T.makeFramework=function(){if(this.staticPlot){if(!i&&(n=document.createElement("canvas"),!(i=d({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 e=this.container.querySelector(".gl-canvas-focus"),t=d({canvas:e,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!t)return p(this),void(this.stopped=!0);this.canvas=e,this.gl=t}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 o=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");o.style.position="absolute",o.style.top=o.style.left="0px",o.style.width=o.style.height="100%",o.style["z-index"]=20,o.style["pointer-events"]="none";var a=this.mouseContainer=document.createElement("div");a.style.position="absolute",a.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(o),s.appendChild(a);var l=this;a.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),a.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},T.toImage=function(e){e||(e="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var t=this.glplot.gl,r=t.drawingBufferWidth,i=t.drawingBufferHeight;t.clearColor(1,1,1,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),t.bindFramebuffer(t.FRAMEBUFFER,null);var o=new Uint8Array(r*i*4);t.readPixels(0,0,r,i,t.RGBA,t.UNSIGNED_BYTE,o);for(var a=0,s=i-1;a{"use strict";var n=r(18693).overrideAll,i=r(18971),o=r(47133),a=r(38213).NG,s=r(53787),l=r(83580),c="gl3d",u="scene";t.name=c,t.attr=u,t.idRoot=u,t.idRegex=t.attrRegex=s.counterRegex("scene"),t.attributes=r(53050),t.layoutAttributes=r(50082),t.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),t.supplyLayoutDefaults=r(82046),t.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots[c],i=0;i{"use strict";e.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's 3D coordinate system and","a 3D scene.","If *scene* (the default value), the (x,y,z) coordinates refer to","`layout.scene`.","If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`,","and so on."].join(" ")}}},49246:(e,t,r)=>{"use strict";var n=r(66235),i=r(45446),o=r(10191).extendFlat,a=r(18693).overrideAll;e.exports=a({visible:i.visible,showspikes:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes starting from","data points to this axis' wall are shown on hover."].join(" ")},spikesides:{valType:"boolean",dflt:!0,description:["Sets whether or not spikes extending from the","projection data points to this axis' wall boundaries","are shown on hover."].join(" ")},spikethickness:{valType:"number",min:0,dflt:2,description:"Sets the thickness (in px) of the spikes."},spikecolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the spikes."},showbackground:{valType:"boolean",dflt:!1,description:["Sets whether or not this axis' wall","has a background color."].join(" ")},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)",description:"Sets the background color of this axis' wall."},showaxeslabels:{valType:"boolean",dflt:!0,description:"Sets whether or not this axis is labeled"},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.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,labelalias:i.labelalias,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:o({},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")},59958:(e,t,r)=>{"use strict";var n=r(25378).mix,i=r(53787),o=r(99862),a=r(49246),s=r(80035),l=r(90471),c=["xaxis","yaxis","zaxis"];e.exports=function(e,t,r){var u,d;function f(e,t){return i.coerce(u,d,a,e,t)}for(var h=0;h{"use strict";var n=r(55115),i=r(53787),o=["xaxis","yaxis","zaxis"];function a(){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()}a.prototype.merge=function(e,t){for(var r=this,a=0;a<3;++a){var s=t[o[a]];s.visible?(r.labels[a]=e._meta?i.templateString(s.title.text,e._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[a]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[a]=s.title.font.family),s.title.font.size&&(r.labelSize[a]=s.title.font.size)),"showline"in s&&(r.lineEnable[a]=s.showline),"linecolor"in s&&(r.lineColor[a]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[a]=s.linewidth),"showgrid"in s&&(r.gridEnable[a]=s.showgrid),"gridcolor"in s&&(r.gridColor[a]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[a]=s.gridwidth),"log"===s.type?r.zeroEnable[a]=!1:"zeroline"in s&&(r.zeroEnable[a]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[a]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[a]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[a]=!0:r.lineTickEnable[a]=!1,"ticklen"in s&&(r.lineTickLength[a]=r._defaultLineTickLength[a]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[a]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[a]=s.tickwidth),"tickangle"in s&&(r.tickAngle[a]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[a]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[a]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[a]=s.tickfont.family),s.tickfont.size&&(r.tickSize[a]=s.tickfont.size)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[a]=!0,r.lineMirror[a]=!0):!0===s.mirror?(r.lineTickMirror[a]=!1,r.lineMirror[a]=!0):(r.lineTickMirror[a]=!1,r.lineMirror[a]=!1):r.lineMirror[a]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[a]=!0,r.backgroundColor[a]=n(s.backgroundcolor)):r.backgroundEnable[a]=!1):(r.tickEnable[a]=!1,r.labelEnable[a]=!1,r.lineEnable[a]=!1,r.lineTickEnable[a]=!1,r.gridEnable[a]=!1,r.zeroEnable[a]=!1,r.backgroundEnable[a]=!1)}},e.exports=function(e,t){var r=new a;return r.merge(e,t),r}},82046:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(44049),a=r(38020),s=r(59958),l=r(50082),c=r(38213).NG,u="gl3d";function d(e,t,r,n){for(var a=r("bgcolor"),l=i.combine(a,n.paper_bgcolor),d=["up","center","eye"],f=0;f.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(e,t,r){var i=t._basePlotModules.length>1;a(e,t,r,{type:u,attributes:l,handleDefaults:d,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!i)return n.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},50082:(e,t,r)=>{"use strict";var n=r(49246),i=r(29707).Y,o=r(10191).extendFlat,a=r(53787).counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(s(0,0,1),{description:["Sets the (x,y,z) components of the 'up' camera vector.","This vector determines the up direction of this scene","with respect to the page.","The default is *{x: 0, y: 0, z: 1}* which means that","the z axis points up."].join(" ")}),center:o(s(0,0,0),{description:["Sets the (x,y,z) components of the 'center' camera vector","This vector determines the translation (x,y,z) space","about the center of this scene.","By default, there is no such translation."].join(" ")}),eye:o(s(1.25,1.25,1.25),{description:["Sets the (x,y,z) components of the 'eye' camera vector.","This vector determines the view point about the origin","of this scene."].join(" ")}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc",description:["Sets the projection type. The projection type could be","either *perspective* or *orthographic*. The default is","*perspective*."].join(" ")},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},description:["If *cube*, this scene's axes are drawn as a cube,","regardless of the axes' ranges.","If *data*, this scene's axes are drawn","in proportion with the axes' ranges.","If *manual*, this scene's axes are drawn","in proportion with the input of *aspectratio*","(the default behavior if *aspectratio* is provided).","If *auto*, this scene's axes are drawn","using the results of *data* except when one axis","is more than four times the size of the two others,","where in that case the results of *cube* are used."].join(" ")},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"},description:["Sets this scene's axis aspectratio."].join(" ")},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot",description:["Determines the mode of drag interactions for this scene."].join(" ")},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions for this scene."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in camera attributes.","Defaults to `layout.uirevision`."].join(" ")},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera",description:"Obsolete. Use `camera` instead."}}}},13370:(e,t,r)=>{"use strict";var n=r(55115),i=["xaxis","yaxis","zaxis"];function o(){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]}o.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[i[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},e.exports=function(e){var t=new o;return t.merge(e),t}},14965:(e,t,r)=>{"use strict";e.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[o[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/e.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/e.dataScale[c],u.range[1]=r[c].hi/e.dataScale[c],u._m=1/(e.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var h=n.calcTicks(u,{msUTC:!0}),p=0;p/g," "));l[c]=h,u.tickmode=d}}t.ticks=l;for(c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),o=0;o{"use strict";function t(e,t){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=e[4*r+n]*t[r];return i}e.exports=function(e,r){return t(e.projection,t(e.view,t(e.model,[r[0],r[1],r[2],1])))}},47133:(e,t,r)=>{"use strict";var n,i,o=r(13084).gl_plot3d,a=o.createCamera,s=o.createScene,l=r(6514),c=r(32954),u=r(44049),d=r(53787),f=d.preserveDrawingBuffer(),h=r(28605),p=r(76719),m=r(55115),g=r(51708),v=r(40564),y=r(28977),x=r(13370),b=r(14965),w=r(10351).applyAutorangeOptions,_=!1;function k(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.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=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(t,t[this.id]),this.spikeOptions=x(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var S=k.prototype;S.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:f,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.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");t.gl=i,t.canvas=n}return t};var T=!0;S.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=s(t)}catch(n){if(e.staticMode||!T||f)r=!1;else{d.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{f=t.glOptions.preserveDrawingBuffer=!0,e.glplot=s(t)}catch(n){f=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return T=!1,r},S.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r="orthographic"===t.projection.type;e.camera=a(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},S.initializeGLPlot=function(){var e=this;if(e.initializeGLCamera(),!e.tryCreatePlot())return g(e);e.traces={},e.make4thDimension();var t=e.graphDiv,r=t.layout,n=function(){var t={};return e.isCameraChanged(r)&&(t[e.id+".camera"]=e.getCamera()),e.isAspectChanged(r)&&(t[e.id+".aspectratio"]=e.glplot.getAspectratio(),"manual"!==r[e.id].aspectmode&&(e.fullSceneLayout.aspectmode=r[e.id].aspectmode=t[e.id+".aspectmode"]="manual")),t},i=function(e){if(!1!==e.fullSceneLayout.dragmode){var t=n();e.saveLayout(r),e.graphDiv.emit("plotly_relayout",t)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",(function(){i(e)})),e.glplot.canvas.addEventListener("touchstart",(function(){_=!0})),e.glplot.canvas.addEventListener("wheel",(function(r){if(t._context._scrollZoom.gl3d){if(e.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,o=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*o.x,y:n*o.y,z:n*o.z})}i(e)}}),!!c&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},S.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var o=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY,s=i.width*o,l=i.height*a;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),u=null,f=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(S.valueLabel=h.hoverLabelText(t._mockAxis,t._mockAxis.d2l(f.traceCoordinate[3]),e.valuehoverformat),A.push("value: "+S.valueLabel),f.textLabel&&A.push(f.textLabel),x=A.join("
")):x=f.textLabel;var E={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:k};p.appendArrayPointValue(E,w,k),e._module.eventData&&(E=w._module.eventData(E,f,w,{},k));var I={points:[E]};if(t.fullSceneLayout.hovermode){var O=[];p.loneHover({trace:w,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:S.xLabel,yLabel:S.yLabel,zLabel:S.zLabel,text:x,name:u.name,color:p.castHoverOption(w,k,"bgcolor")||u.color,borderColor:p.castHoverOption(w,k,"bordercolor"),fontFamily:p.castHoverOption(w,k,"font.family"),fontSize:p.castHoverOption(w,k,"font.size"),fontColor:p.castHoverOption(w,k,"font.color"),nameLength:p.castHoverOption(w,k,"namelength"),textAlign:p.castHoverOption(w,k,"align"),hovertemplate:d.castOption(w,k,"hovertemplate"),hovertemplateLabels:d.extendFlat({},E,S),eventData:[E]},{container:n,gd:r,inOut_bbox:O}),E.bbox=O[0]}f.distance<5&&(f.buttons||_)?r.emit("plotly_click",I):r.emit("plotly_hover",I),this.oldEventData=I}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},S.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):d.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var M=["xaxis","yaxis","zaxis"];function C(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var o=M[i],a=o.charAt(0),s=n[o],l=t[a],c=t[a+"calendar"],u=t["_"+a+"length"];if(d.isArrayOrTypedArray(l))for(var f,h=0;h<(u||l.length);h++)if(d.isArrayOrTypedArray(l[h]))for(var p=0;pv[1][a])v[0][a]=-1,v[1][a]=1;else{var P=v[1][a]-v[0][a];v[0][a]-=P/32,v[1][a]+=P/32}if(b=[v[0][a],v[1][a]],b=w(b,l),v[0][a]=b[0],v[1][a]=b[1],l.isReversed()){var R=v[0][a];v[0][a]=v[1][a],v[1][a]=R}}else b=l.range,v[0][a]=l.r2l(b[0]),v[1][a]=l.r2l(b[1]);v[0][a]===v[1][a]&&(v[0][a]-=1,v[1][a]+=1),y[a]=v[1][a]-v[0][a],l.range=[v[0][a],v[1][a]],l.limitRange(),n.glplot.setBounds(a,{min:l.range[0]*h[a],max:l.range[1]*h[a]})}var L=u.aspectmode;if("cube"===L)g=[1,1,1];else if("manual"===L){var j=u.aspectratio;g=[j.x,j.y,j.z]}else{if("auto"!==L&&"data"!==L)throw new Error("scene.js aspectRatio was not one of the enumerated types");var D=[1,1,1];for(a=0;a<3;++a){var z=x[c=(l=u[M[a]]).type];D[a]=Math.pow(z.acc,1/z.count)/h[a]}g="data"===L||Math.max.apply(null,D)/Math.min.apply(null,D)<=4?D:[1,1,1]}u.aspectratio.x=d.aspectratio.x=g[0],u.aspectratio.y=d.aspectratio.y=g[1],u.aspectratio.z=d.aspectratio.z=g[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var N=u.domain||null,F=t._size||null;if(N&&F){var B=n.container.style;B.position="absolute",B.left=F.l+N.x[0]*F.w+"px",B.top=F.t+(1-N.y[1])*F.h+"px",B.width=F.w*(N.x[1]-N.x[0])+"px",B.height=F.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}},S.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},S.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},S.setViewport=function(e){var t,r=this,n=e.camera;r.camera.lookAt.apply(this,[[(t=n).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),r.glplot.setAspectratio(e.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},S.isCameraChanged=function(e){var t=this.getCamera(),r=d.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var i=["up","center","eye"],o=["x","y","z"];return t[i[r]]&&e[i[r]][o[n]]===t[i[r]][o[n]]}var i=!1;if(void 0===r)i=!0;else{for(var o=0;o<3;o++)for(var a=0;a<3;a++)if(!n(t,r,o,a)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},S.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=d.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},S.saveLayout=function(e){var t,r,n,i,o,a,s=this,l=s.fullLayout,c=s.isCameraChanged(e),f=s.isAspectChanged(e),h=c||f;if(h){var p={};if(c&&(t=s.getCamera(),n=(r=d.nestedProperty(e,s.id+".camera")).get(),p[s.id+".camera"]=n),f&&(i=s.glplot.getAspectratio(),a=(o=d.nestedProperty(e,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=a),u.call("_storeDirectGUIEdit",e,l._preGUI,p),c)r.set(t),d.nestedProperty(l,s.id+".camera").set(t);if(f)o.set(i),d.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw()}return h},S.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,o=i._fullLayout,a=r.fullSceneLayout.camera,s=a.up.x,l=a.up.y,c=a.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var f=r.id+".camera.up",h={x:0,y:0,z:1},p={};p[f]=h;var m=i.layout;u.call("_storeDirectGUIEdit",m,o._preGUI,p),a.up=h,d.nestedProperty(m,f).set(h)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},S.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(n),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,o=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*o*4);r.readPixels(0,0,i,o,r.RGBA,r.UNSIGNED_BYTE,a),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/a,l=0;l<3;++l)e[o+l]=Math.min(s*e[o+l],255)}}(a,i,o);var s=document.createElement("canvas");s.width=i,s.height=o;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,o);switch(u.data.set(a),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(n),l},S.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[M[e]];h.setConvert(t,this.fullLayout),t.setScale=d.noop}},S.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},h.setConvert(e._mockAxis,t)},e.exports=k},51577:e=>{"use strict";e.exports=function(e,t,r,n){n=n||e.length;for(var i=new Array(n),o=0;o{"use strict";var n=r(92948),i=r(83672),o=r(18022),a=r(99977),s=r(32438),l=r(84958),c=r(10191).extendFlat,u=n({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=o.defaultLine,e.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:c(l({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn\u2019t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn\u2019t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:o.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:o.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:o.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:a.newshape,activeshape:a.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:c({},i.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:n({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}}},93845:(e,t,r)=>{"use strict";var n=r(99238),i="1.10.1",o='\xa9 OpenStreetMap contributors',a=['\xa9 Carto',o].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},c=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:c,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@"+i+"."].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:",c.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\')'}}},31387:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){var r=e.split(" "),i=r[0],o=r[1],a=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+a/100,l=1.5+a/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(o){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},7428:(e,t,r)=>{"use strict";var n=r(74055),i=r(53787),o=i.strTranslate,a=i.strScale,s=r(38213).AU,l=r(83580),c=r(8996),u=r(50973),d=r(98224),f=r(14005),h="mapbox",p=t.constants=r(93845);function m(e){return"string"===typeof e&&(-1!==p.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://")||0===e.indexOf("stamen"))}t.name=h,t.attr="subplot",t.idRoot=h,t.idRegex=t.attrRegex=i.counterRegex(h),t.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc",description:["Sets a reference between this trace's data coordinates and","a mapbox subplot.","If *mapbox* (the default value), the data refer to `layout.mapbox`.","If *mapbox2*, the data refer to `layout.mapbox2`, and so on."].join(" ")}},t.layoutAttributes=r(85675),t.supplyLayoutDefaults=r(68690),t.plot=function(e){var t=e._fullLayout,r=e.calcdata,o=t._subplots[h];if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var a=function(e,t){var r=e._fullLayout,n=e._context;if(""===n.mapboxAccessToken)return"";for(var o=[],a=[],s=!1,l=!1,c=0;c1&&i.warn(p.multipleTokensErrorMsg),o[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);n.accessToken=a;for(var l=0;l_/2){var k=y.split("|").join("
");b.text(k).attr("data-unformatted",k).call(d.convertToTspans,e),w=u.bBox(b.node())}b.attr("transform",o(-3,8-w.height)),x.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var S=1;w.width+6>_&&(S=_/(w.width+6));var T=[n.l+n.w*f.x[1],n.t+n.h*(1-f.y[0])];x.attr("transform",o(T[0],T[1])+a(S))}},t.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[h],n=0;n{"use strict";var n=r(53787),i=r(98224).sanitizeHTML,o=r(31387),a=r(93845);function s(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function c(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r0}function u(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,a=o(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:r}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=c(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,c(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,o={type:r};"geojson"===r?t="data":"vector"===r?t="string"===typeof n?"url":"tiles":"raster"===r?(t="tiles",o.tileSize=256):"image"===r&&(t="url",o.coordinates=e.coordinates);o[t]=n,e.sourceattribution&&(o.attribution=i(e.sourceattribution));return o}(e);t.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r{"use strict";var n=r(53787),i=r(66235).defaultLine,o=r(29707).Y,a=r(92948),s=r(37471).textposition,l=r(18693).overrideAll,c=r(99862).templatedArray,u=r(93845),d=a({description:["Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size).","Has an effect only when `type` is set to *symbol*."].join(" ")});d.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(e.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:o({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0,description:["Sets the mapbox access token to be used for this mapbox map.","Alternatively, the mapbox access token can be set in the","configuration options under `mapboxAccessToken`.","Note that accessToken are only required when `style`","(e.g with values :",u.styleValuesMapbox.join(", "),")","and/or a layout layer references the Mapbox server."].join(" ")},style:{valType:"any",values:u.styleValuesMapbox.concat(u.styleValuesNonMapbox),dflt:u.styleValueDflt,description:["Defines the map layers that are rendered by default below the trace layers defined in `data`,","which are themselves by default rendered below the layers defined in `layout.mapbox.layers`.","","These layers can be defined either explicitly as a Mapbox Style object which can contain multiple","layer definitions that load data from any public or private Tile Map Service (TMS or XYZ) or Web Map Service (WMS)","or implicitly by using one of the built-in style objects which use WMSes which do not require any","access tokens, or by using a default Mapbox style or custom Mapbox style URL, both of","which require a Mapbox access token","","Note that Mapbox access token can be set in the `accesstoken` attribute","or in the `mapboxAccessToken` config option.","","Mapbox Style objects are of the form described in the Mapbox GL JS documentation available at","https://docs.mapbox.com/mapbox-gl-js/style-spec","","The built-in plotly.js styles objects are:",u.styleValuesNonMapbox.join(", "),"","The built-in Mapbox styles are:",u.styleValuesMapbox.join(", "),"","Mapbox style URLs are of the form: mapbox://mapbox.mapbox--"].join(" ")},center:{lon:{valType:"number",dflt:0,description:"Sets the longitude of the center of the map (in degrees East)."},lat:{valType:"number",dflt:0,description:"Sets the latitude of the center of the map (in degrees North)."}},zoom:{valType:"number",dflt:1,description:"Sets the zoom level of the map (mapbox.zoom)."},bearing:{valType:"number",dflt:0,description:"Sets the bearing angle of the map in degrees counter-clockwise from North (mapbox.bearing)."},pitch:{valType:"number",dflt:0,description:["Sets the pitch angle of the map","(in degrees, where *0* means perpendicular to the surface of the map) (mapbox.pitch)."].join(" ")},bounds:{west:{valType:"number",description:["Sets the minimum longitude of the map (in degrees East)","if `east`, `south` and `north` are declared."].join(" ")},east:{valType:"number",description:["Sets the maximum longitude of the map (in degrees East)","if `west`, `south` and `north` are declared."].join(" ")},south:{valType:"number",description:["Sets the minimum latitude of the map (in degrees North)","if `east`, `west` and `north` are declared."].join(" ")},north:{valType:"number",description:["Sets the maximum latitude of the map (in degrees North)","if `east`, `west` and `south` are declared."].join(" ")}},layers:c("layer",{visible:{valType:"boolean",dflt:!0,description:["Determines whether this layer is displayed"].join(" ")},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson",description:["Sets the source type for this layer,","that is the type of the layer data."].join(" ")},source:{valType:"any",description:["Sets the source data for this layer (mapbox.layer.source).","When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON","or a GeoJSON object.","When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or","an array of tile URLs.","When `sourcetype` is set to *image*, `source` can be a URL to an image."].join(" ")},sourcelayer:{valType:"string",dflt:"",description:["Specifies the layer to use from a vector tile source (mapbox.layer.source-layer).","Required for *vector* source type that supports multiple layers."].join(" ")},sourceattribution:{valType:"string",description:["Sets the attribution for this source."].join(" ")},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle",description:["Sets the layer type,","that is the how the layer data set in `source` will be rendered","With `sourcetype` set to *geojson*, the following values are allowed:","*circle*, *line*, *fill* and *symbol*.","but note that *line* and *fill* are not compatible with Point","GeoJSON geometries.","With `sourcetype` set to *vector*, the following values are allowed:"," *circle*, *line*, *fill* and *symbol*.","With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed."].join(" ")},coordinates:{valType:"any",description:["Sets the coordinates array contains [longitude, latitude] pairs","for the image corners listed in clockwise order:","top left, top right, bottom right, bottom left.","Only has an effect for *image* `sourcetype`."].join(" ")},below:{valType:"string",description:["Determines if the layer will be inserted","before the layer with the specified ID.","If omitted or set to '',","the layer will be inserted above every existing layer."].join(" ")},color:{valType:"color",dflt:i,description:["Sets the primary layer color.","If `type` is *circle*, color corresponds to the circle color (mapbox.layer.paint.circle-color)","If `type` is *line*, color corresponds to the line color (mapbox.layer.paint.line-color)","If `type` is *fill*, color corresponds to the fill color (mapbox.layer.paint.fill-color)","If `type` is *symbol*, color corresponds to the icon color (mapbox.layer.paint.icon-color)"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:["Sets the opacity of the layer.","If `type` is *circle*, opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity)","If `type` is *line*, opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity)","If `type` is *fill*, opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity)","If `type` is *symbol*, opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity)"].join(" ")},minzoom:{valType:"number",min:0,max:24,dflt:0,description:["Sets the minimum zoom level (mapbox.layer.minzoom).","At zoom levels less than the minzoom, the layer will be hidden."].join(" ")},maxzoom:{valType:"number",min:0,max:24,dflt:24,description:["Sets the maximum zoom level (mapbox.layer.maxzoom).","At zoom levels equal to or greater than the maxzoom, the layer will be hidden."].join(" ")},circle:{radius:{valType:"number",dflt:15,description:["Sets the circle radius (mapbox.layer.paint.circle-radius).","Has an effect only when `type` is set to *circle*."].join(" ")}},line:{width:{valType:"number",dflt:2,description:["Sets the line width (mapbox.layer.paint.line-width).","Has an effect only when `type` is set to *line*."].join(" ")},dash:{valType:"data_array",description:["Sets the length of dashes and gaps (mapbox.layer.paint.line-dasharray).","Has an effect only when `type` is set to *line*."].join(" ")}},fill:{outlinecolor:{valType:"color",dflt:i,description:["Sets the fill outline color (mapbox.layer.paint.fill-outline-color).","Has an effect only when `type` is set to *fill*."].join(" ")}},symbol:{icon:{valType:"string",dflt:"marker",description:["Sets the symbol icon image (mapbox.layer.layout.icon-image).","Full list: https://www.mapbox.com/maki-icons/"].join(" ")},iconsize:{valType:"number",dflt:10,description:["Sets the symbol icon size (mapbox.layer.layout.icon-size).","Has an effect only when `type` is set to *symbol*."].join(" ")},text:{valType:"string",dflt:"",description:["Sets the symbol text (mapbox.layer.layout.text-field)."].join(" ")},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point",description:["Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement).","If `placement` is *point*, the label is placed where the geometry is located","If `placement` is *line*, the label is placed along the line of the geometry","If `placement` is *line-center*, the label is placed on the center of the geometry"].join(" ")},textfont:d,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in the view:","`center`, `zoom`, `bearing`, `pitch`. Defaults to `layout.uirevision`."].join(" ")}},68690:(e,t,r)=>{"use strict";var n=r(53787),i=r(38020),o=r(80254),a=r(85675);function s(e,t,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"),a=r("bounds.east"),s=r("bounds.south"),c=r("bounds.north");void 0!==i&&void 0!==a&&void 0!==s&&void 0!==c||delete t.bounds,o(e,t,{name:"layers",handleItemDefaults:l}),t._input=e}function l(e,t){function r(r,i){return n.coerce(e,t,a.layers,r,i)}if(r("visible")){var i,o=r("sourcetype"),s="raster"===o||"image"===o;r("source"),r("sourceattribution"),"vector"===o&&r("sourcelayer"),"image"===o&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=t.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(e,t,r){i(e,t,r,{type:"mapbox",attributes:a,handleDefaults:s,partition:"y",accessToken:t._mapboxAccessToken})}},14005:(e,t,r)=>{"use strict";var n=r(74055),i=r(53787),o=r(426),a=r(44049),s=r(28605),l=r(63e3),c=r(76719),u=r(57873),d=u.drawMode,f=u.selectMode,h=r(26002).prepSelect,p=r(26002).clearOutline,m=r(26002).clearSelectionsCache,g=r(26002).selectOnClick,v=r(93845),y=r(12239);function x(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._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(e,t,r){var n,i=this,o=t[i.id];i.map&&o.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(e,t,r,n)})):new Promise((function(r,n){i.createMap(e,t,r,n)})),r.push(n)},b.createMap=function(e,t,r,i){var a=this,s=t[a.id],l=a.styleObj=_(s.style,t);a.accessToken=s.accesstoken;var c=s.bounds,u=c?[[c.west,c.south],[c.east,c.north]]:null,d=a.map=new n.Map({container:a.div,style:l.style,center:S(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:u,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));d._canvas.style.left="0px",d._canvas.style.top="0px",a.rejectOnError(i),a.isStatic||a.initFx(e,t);var f=[];f.push(new Promise((function(e){d.once("load",e)}))),f=f.concat(o.fetchTraceGeoData(e)),Promise.all(f).then((function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)})).catch(i)},b.updateMap=function(e,t,r,n){var i=this,a=i.map,s=t[this.id];i.rejectOnError(n);var l=[],c=_(s.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(c)&&(i.styleObj=c,a.setStyle(c.style),i.traceHash={},l.push(new Promise((function(e){a.once("styledata",e)})))),l=l.concat(o.fetchTraceGeoData(e)),Promise.all(l).then((function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)})).catch(n)},b.fillBelowLookup=function(e,t){var r,n,i=t[this.id].layers,o=this.belowLookup={},a=!1;for(r=0;r1)for(r=0;r-1&&g(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&c.click(n,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var o,a=e.dragmode;o=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),f(a)||d(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){h(e,r,n,t.dragOptions,a)},l.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t{"use strict";e.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:t,description:"The amount of padding (in px) on the left side of the component."},editType:t}}},44115:(e,t,r)=>{"use strict";var n=r(8996),i=r(97390).Dq,o=r(95601).FF,a=r(51908),s=r(44049),l=r(94043),c=r(99862),u=r(53787),d=r(66235),f=r(24956).BADNUM,h=r(24279),p=r(94512).clearOutline,m=r(61070),g=r(83672),v=r(1563),y=r(38213).a0,x=u.relinkPrivateKeys,b=u._,w=e.exports={};u.extendFlat(w,s),w.attributes=r(27231),w.attributes.type.values=w.allTypes,w.fontAttrs=r(92948),w.layoutAttributes=r(79443),w.fontWeight="normal";var _=w.transformsRegistry,k=r(10357);w.executeAPICommand=k.executeAPICommand,w.computeAPICommandBindings=k.computeAPICommandBindings,w.manageCommandObserver=k.manageCommandObserver,w.hasSimpleAPICommandBindings=k.hasSimpleAPICommandBindings,w.redrawText=function(e){return e=u.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(s.getComponentMethod("annotations","draw")(e),s.getComponentMethod("legend","draw")(e),s.getComponentMethod("colorbar","draw")(e),t(w.previousPromises(e)))}),300)}))},w.resize=function(e){var t;e=u.getGraphDiv(e);var r=new Promise((function(r,n){e&&!u.isHidden(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||u.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,s.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))}))}}),100)}));return t&&t(r),r},w.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},w.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=u.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var e=n.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),o={y:t._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=t.width-20?(o["text-anchor"]="start",o.x=5):(o["text-anchor"]="end",o.x=t._paper.attr("width")-7),r.attr(o);var a=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));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})}}(e,a),s.text(a.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function M(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function o(e){for(var r=!0,o=0;o1&&L.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),a=0;a15&&L.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(f,l,d,n),w.cleanPlot(f,l,d,n);var F=!(!n._has||!n._has("gl2d")),B=!(!l._has||!l._has("gl2d")),Z=!(!n._has||!n._has("cartesian"))||F,U=!(!l._has||!l._has("cartesian"))||B;Z&&!U?n._bgLayer.remove():U&&!Z&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&p({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var f=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-i)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,o,a,l=s.componentsRegistry,c=t._basePlotModules,d=s.subplotsRegistry.cartesian;for(i in l)(a=l[i]).includeBasePlot&&a.includeBasePlot(e,t);for(var f in c.length||c.push(d),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(o=0;o1&&(r.l/=v,r.r/=v)}if(h){var y=(r.t+r.b)/h;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,k=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:k,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),O(t);var i=t._size,o=t.margin,l={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),d=o.l,f=o.r,p=o.t,m=o.b,g=t._pushmargin,v=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==o.autoexpand){for(var b in g)v[b]||delete g[b];var _=e._fullLayout._reservedMargin;for(var k in _)for(var S in _[k]){var T=_[k][S];l[S]=Math.max(l[S],T)}for(var M in g.base={l:{val:0,size:d},r:{val:1,size:f},t:{val:1,size:p},b:{val:0,size:m}},l){var C=0;for(var A in g)"base"!==A&&a(g[A][M].size)&&(C=g[A][M].size>C?g[A][M].size:C);var E=Math.max(0,o[M]-C);l[M]=Math.max(0,l[M]-E)}for(var I in g){var P=g[I].l||{},R=g[I].b||{},L=P.val,j=P.size,D=R.val,z=R.size,N=r-l.r-l.l,F=n-l.t-l.b;for(var B in g){if(a(j)&&g[B].r){var Z=g[B].r.val,U=g[B].r.size;if(Z>L){var V=(j*Z+(U-N)*L)/(Z-L),H=(U*(1-L)+(j-N)*(1-Z))/(Z-L);V+H>d+f&&(d=V,f=H)}}if(a(z)&&g[B].t){var W=g[B].t.val,G=g[B].t.size;if(W>D){var q=(z*W+(G-F)*D)/(W-D),Y=(G*(1-D)+(z-F)*(1-W))/(W-D);q+Y>m+p&&(m=q,p=Y)}}}}}var X=u.constrain(r-o.l-o.r,2,y),K=u.constrain(n-o.t-o.b,2,x),$=Math.max(0,r-X),J=Math.max(0,n-K);if($){var Q=(d+f)/$;Q>1&&(d/=Q,f/=Q)}if(J){var ee=(m+p)/J;ee>1&&(m/=ee,p/=ee)}if(i.l=Math.round(d)+l.l,i.r=Math.round(f)+l.r,i.t=Math.round(p)+l.t,i.b=Math.round(m)+l.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(c,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=h.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(v).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var o=0,a=0;function l(){return o++,function(){a++,n||a!==o||function(t){if(!e._transitionData)return;(function(e){if(e)for(;e.length;)e.shift()})(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)}(i)}}r.runFn(l),setTimeout(l())}))}],o=u.syncOrAsync(i,e);return o&&o.then||(o=Promise.resolve()),o.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,o){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var a=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(o){if(-1===["_","["].indexOf(o.charAt(0)))if("function"!==typeof e[o]){if("keepdata"===r){if("src"===o.substr(o.length-3))return}else if("keepstream"===r){if("string"===typeof(n=e[o+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"===typeof(n=e[o+"src"])&&n.indexOf(":")>0)return;i[o]=c(e[o],t)}else t&&(i[o]="_function")})),i}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var d={data:(a||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=c(s),i)){var f=s._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(d.frames=c(l)),o&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,i,o=e._transitionData._frames,a=e._transitionData._frameHash;for(r=0;r=0;o--)if(s[o].enabled){r._indexToPoints=s[o]._indexToPoints;break}n&&n.calc&&(a=n.calc(e,r))}Array.isArray(a)&&a[0]||(a=[{x:f,y:f}]),a[0].t||(a[0].t={}),a[0].trace=r,p[t]=a}}for(j(a,c,d),i=0;i{"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}},73355:(e,t,r)=>{"use strict";var n=r(53787),i=r(71962).tester,o=n.findIndexOfMin,a=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(e,t,r,n){var i,o,a=n[0],s=n[1],l=d(Math.sin(t)-Math.sin(e)),c=d(Math.cos(t)-Math.cos(e)),u=Math.tan(r),f=d(1/u),h=l/c,p=s-h*a;return f?l&&c?o=u*(i=p/(u-h)):c?(i=s*f,o=s):(i=a,o=a*u):l&&c?(i=0,o=p):c?(i=0,o=s):i=o=NaN,[i,o]}function u(e,t,r,i){return n.isFullCircle([t,r])?function(e,t){var r,n=t.length,i=new Array(n+1);for(r=0;r1e-10?e:0}function f(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),o=0;o0?r:1/0})),i=n.mod(r+1,t.length);return[t[r],t[i]]},findIntersectionXY:c,findXYatLength:function(e,t,r,n){var i=-t*r,o=t*t+1,a=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(a*a-4*o*s),c=(-a+l)/(2*o),u=(-a-l)/(2*o);return[[c,t*c+i+n],[u,t*u+i+n]]},clampTiny:d,pathPolygon:function(e,t,r,n,i,o){return"M"+f(u(e,t,r,n),i,o).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,o,a){var s,l;e{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(38076),a=r(30028),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc",description:["Sets a reference between this trace's data coordinates and","a polar subplot.","If *polar* (the default value), the data refer to `layout.polar`.","If *polar2*, the data refer to `layout.polar2`, and so on."].join(" ")},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:r(53770),supplyLayoutDefaults:r(67681),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[l],a=0;a{"use strict";var n=r(18022),i=r(45446),o=r(29707).Y,a=r(53787).extendFlat,s=r(18693).overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),c=s({tickmode:i.minor.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,labelalias:i.labelalias,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"),u={visible:a({},i.visible,{dflt:!0}),type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},autorange:a({},i.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc",description:["If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","If *normal*, the range is computed in relation to the extrema","of the input data (same behavior as for cartesian axes)."].join(" ")},minallowed:a({},i.minallowed,{editType:"plot"}),maxallowed:a({},i.maxallowed,{editType:"plot"}),range:a({},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",description:["Sets the angle (in degrees) from which the radial axis is drawn.","Note that by default, radial axis line on the theta=0 line","corresponds to a line pointing right (like what mathematicians prefer).","Defaults to the first `polar.sector` angle."].join(" ")},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot",description:["Determines on which side of radial axis line","the tick and tick labels appear."].join(" ")},title:{text:a({},i.title.text,{editType:"plot",dflt:""}),font:a({},i.title.font,{editType:"plot"}),editType:"plot"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, `angle`, and `title` if in `editable: true` configuration.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};a(u,l,c);var d={visible:a({},i.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the angular axis type.","If *linear*, set `thetaunit` to determine the unit in which axis value are shown.","If *category, use `period` to set the number of integer coordinates around polar axis."].join(" ")},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc",description:["Sets the format unit of the formatted *theta* values.","Has an effect only when `angularaxis.type` is *linear*."].join(" ")},period:{valType:"number",editType:"calc",min:0,description:["Set the angular period.","Has an effect only when `angularaxis.type` is *category*."].join(" ")},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc",description:["Sets the direction corresponding to positive angles."].join(" ")},rotation:{valType:"angle",editType:"calc",description:["Sets that start position (in degrees) of the angular axis","By default, polar subplots with `direction` set to *counterclockwise*","get a `rotation` of *0*","which corresponds to due East (like what mathematicians prefer).","In turn, polar with `direction` set to *clockwise* get a rotation of *90*","which corresponds to due North (like on a compass),"].join(" ")},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `rotation`.","Defaults to `polar.uirevision`."].join(" ")},editType:"calc"};a(d,l,c),e.exports={domain:o({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot",description:["Sets angular span of this polar subplot with two angles (in degrees).","Sector are assumed to be spanned in the counterclockwise direction","with *0* corresponding to rightmost limit of the polar subplot."].join(" ")},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the fraction of the radius to cut out of the polar subplot."].join(" ")},bgcolor:{valType:"color",editType:"plot",dflt:n.background,description:"Set the background color of the subplot"},radialaxis:u,angularaxis:d,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot",description:["Determines if the radial axis grid lines and angular axis line are drawn","as *circular* sectors or as *linear* (polygon) sectors.","Has an effect only when the angular axis has `type` *category*.","Note that `radialaxis.angle` is snapped to the angle of the closest","vertex when `gridshape` is *circular*","(so that radial axis scale is the same as the data scale)."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis attributes,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc"}},67681:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(38020),s=r(38213).NG,l=r(96592),c=r(64698),u=r(46139),d=r(33095),f=r(29550),h=r(50923),p=r(23795),m=r(36562),g=r(53770),v=r(87296),y=r(30028),x=y.axisNames;function b(e,t,r,a){var m=r("bgcolor");a.bgColor=i.combine(m,a.paper_bgcolor);var b=r("sector");r("hole");var _,k=s(a.fullData,y.name,a.id),S=a.layoutOut;function T(e,t){return r(_+"."+e,t)}for(var M=0;M{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(53787),s=a.strRotate,l=a.strTranslate,c=r(66235),u=r(50973),d=r(44115),f=r(28605),h=r(4738),p=r(87296),m=r(10351).doAutoRange,g=r(34189),v=r(63e3),y=r(76719),x=r(34906),b=r(26002).prepSelect,w=r(26002).selectOnClick,_=r(26002).clearOutline,k=r(19602),S=r(24513),T=r(93415).redrawReglTraces,M=r(81653).MID_SHIFT,C=r(30028),A=r(73355),E=r(68297),I=E.smith,O=E.reactanceArc,P=E.resistanceArc,R=E.smithTransform,L=a._,j=a.mod,D=a.deg2rad,z=a.rad2deg;function N(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;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",t),this.getHole=function(e){return this.isSmith?0:e.hole},this.getSector=function(e){return this.isSmith?[0,360]:e.sector},this.getRadial=function(e){return this.isSmith?e.realaxis:e.radialaxis},this.getAngular=function(e){return this.isSmith?e.imaginaryaxis:e.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var F=N.prototype;function B(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function Z(e,t){return t[a.findIndexOfMin(t,(function(t){return a.angleDist(e,t)}))]}function U(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}e.exports=function(e,t,r){return new N(e,t,r)},F.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,o=0;o=90||l>90&&c>=450?1:d<=0&&h<=0?0:Math.max(d,h);t=l<=180&&c>=180||l>180&&c>=540?-1:u>=0&&f>=0?0:Math.min(u,f);r=l<=270&&c>=270||l>270&&c>=630?-1:d>=0&&h>=0?0:Math.min(d,h);n=c>=360?1:u<=0&&f<=0?0:Math.max(u,f);return[t,r,n,i]}(p),w=b[2]-b[0],_=b[3]-b[1],k=h/f,S=Math.abs(_/w);k>S?(m=f,x=(h-(g=f*S))/i.h/2,v=[s[0],s[1]],y=[d[0]+x,d[1]-x]):(g=h,x=(f-(m=h/S))/i.w/2,v=[s[0]+x,s[1]-x],y=[d[0],d[1]]),r.xLength2=m,r.yLength2=g,r.xDomain2=v,r.yDomain2=y;var T,M=r.xOffset2=i.l+i.w*v[0],C=r.yOffset2=i.t+i.h*(1-y[1]),A=r.radius=m/w,E=r.innerRadius=r.getHole(t)*A,I=r.cx=M-A*b[0],O=r.cy=C+A*b[3],P=r.cxx=I-M,R=r.cyy=O-C,L=o.side;"counterclockwise"===L?(T=L,L="top"):"clockwise"===L&&(T=L,L="bottom"),r.radialAxis=r.mockAxis(e,t,o,{_id:"x",side:L,_trueSide:T,domain:[E/i.w,A/i.w]}),r.angularAxis=r.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:v}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:y});var z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",z).attr("transform",l(P,R)),n.frontplot.attr("transform",l(M,C)).call(u.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",z).attr("transform",l(I,O)).call(c.fill,t.bgcolor)},F.mockAxis=function(e,t,r,n){var i=a.extendFlat({},r,n);return p(i,t,e),i},F.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,o=r._id,s=a.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[o],i=n.radialAxis._rl,a=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},F.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,o=r.getRadial(t);m(n,i);var a=i.range;o.range=a.slice(),o._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")]},F.updateRadialAxis=function(e,t){var r=this,n=r.gd,i=r.layers,o=r.radius,u=r.innerRadius,d=r.cx,h=r.cy,p=r.getRadial(t),m=j(r.getSector(t)[0],360),g=r.radialAxis,v=u90&&m<=270&&(g.tickangle=180);var x=y?function(e){var t=R(r,I([e.x,0]));return l(t[0]-d,t[1]-h)}:function(e){return l(g.l2p(e.x)+u,0)},b=y?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+u)},w=B(p);if(r.radialTickLayout!==w&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=w),v){g.setScale();var _=0,k=y?(g.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return f.tickText(g,e,!0,!1)})):f.calcTicks(g),S=y?k:f.clipEnds(g,k),T=f.getTickSigns(g)[2];y&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(T=-T),"top"===g.ticks&&"top"===g.side&&(_=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(_=g.ticklen)),f.drawTicks(n,g,{vals:k,layer:i["radial-axis"],path:f.makeTickPath(g,0,T),transFn:x,crisp:!1}),f.drawGrid(n,g,{vals:S,layer:i["radial-grid"],path:b,transFn:a.noop,crisp:!1}),f.drawLabels(n,g,{vals:k,layer:i["radial-axis"],transFn:x,labelFns:f.makeLabelFns(g,_)})}var M=r.radialAxisAngle=r.vangles?z(Z(D(p.angle),r.vangles)):p.angle,C=l(d,h),A=C+s(-M);U(i["radial-axis"],v&&(p.showticklabels||p.ticks),{transform:A}),U(i["radial-grid"],v&&p.showgrid,{transform:y?"":C}),U(i["radial-line"].select("line"),v&&p.showline,{x1:y?-o:u,y1:0,x2:o,y2:0,transform:A}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},F.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,o=n.radius,a=n.cx,s=n.cy,l=n.getRadial(t),c=n.id+"title",d=0;if(l.title){var f=u.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,p=l.side;d="top"===p?h:"counterclockwise"===p?-(f+.4*h):f+.8*h}var m=void 0!==r?r:n.radialAxisAngle,g=D(m),v=Math.cos(g),y=Math.sin(g),b=a+o/2*v+d*y,w=s-o/2*y+d*v;n.layers["radial-axis-title"]=x.draw(i,c,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:L(i,"Click to enter radial axis title"),attributes:{x:b,y:w,"text-anchor":"middle"},transform:{rotate:-m}})}},F.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,o=r.radius,u=r.innerRadius,d=r.cx,h=r.cy,p=r.getAngular(t),m=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",p.rotation),m.setGeometry(),m.setScale());var v=g?function(e){var t=R(r,I([0,e.x]));return Math.atan2(t[0]-d,t[1]-h)-Math.PI/2}:function(e){return m.t2g(e.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=z(m.tick0),m.dtick=z(m.dtick));var y=function(e){return l(d+o*Math.cos(e),h-o*Math.sin(e))},x=g?function(e){var t=R(r,I([0,e.x]));return l(t[0],t[1])}:function(e){return y(v(e))},b=g?function(e){var t=R(r,I([0,e.x])),n=Math.atan2(t[0]-d,t[1]-h)-Math.PI/2;return l(t[0],t[1])+s(-z(n))}:function(e){var t=v(e);return y(t)+s(-z(t))},w=g?function(e){return O(r,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),n=Math.sin(t);return"M"+[d+u*r,h-u*n]+"L"+[d+o*r,h-o*n]},_=f.makeLabelFns(m,0).labelStandoff,k={xFn:function(e){var t=v(e);return Math.cos(t)*_},yFn:function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(_+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=v(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=v(e);return-.5*(1+Math.sin(n))*r}},S=B(p);r.angularTickLayout!==S&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),r.angularTickLayout=S);var T,C=g?[1/0].concat(m.tickvals||[]).map((function(e){return f.tickText(m,e,!0,!1)})):f.calcTicks(m);if(g&&(C[0].text="\u221e",C[0].fontSize*=1.75),"linear"===t.gridshape?(T=C.map(v),a.angleDelta(T[0],T[1])<0&&(T=T.slice().reverse())):T=null,r.vangles=T,"category"===m.type&&(C=C.filter((function(e){return a.isAngleInsideSector(v(e),r.sectorInRad)}))),m.visible){var A="inside"===m.ticks?-1:1,E=(m.linewidth||1)/2;f.drawTicks(n,m,{vals:C,layer:i["angular-axis"],path:"M"+A*E+",0h"+A*m.ticklen,transFn:b,crisp:!1}),f.drawGrid(n,m,{vals:C,layer:i["angular-grid"],path:w,transFn:a.noop,crisp:!1}),f.drawLabels(n,m,{vals:C,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:k})}U(i["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:l(d,h)}).attr("stroke-width",p.linewidth).call(c.stroke,p.linecolor)},F.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},F.updateHoverAndMainDrag=function(e){var t,r,s=this,c=s.isSmith,u=s.gd,d=s.layers,f=e._zoomlayer,h=C.MINZOOM,p=C.OFFEDGE,m=s.radius,x=s.innerRadius,k=s.cx,S=s.cy,T=s.cxx,M=s.cyy,E=s.sectorInRad,I=s.vangles,O=s.radialAxis,P=A.clampTiny,R=A.findXYatLength,L=A.findEnclosingVertexAngles,j=C.cornerHalfWidth,D=C.cornerLen/2,z=g.makeDragger(d,"path","maindrag",!1===e.dragmode?"none":"crosshair");n.select(z).attr("d",s.pathSubplot()).attr("transform",l(k,S)),z.onmousemove=function(e){y.hover(u,e,s.id),u._fullLayout._lasthover=z,u._fullLayout._hoversubplot=s.id},z.onmouseout=function(e){u._dragging||v.unhover(u,e)};var N,F,B,Z,U,V,H,W,G,q={element:z,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function Y(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Y(e-T,t-M)}function K(e,t){return Math.atan2(M-t,e-T)}function $(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return s.pathSector(2*j);var r=D/e,n=t-r,i=t+r,o=Math.max(0,Math.min(e,m)),a=o-j,l=o+j;return"M"+$(a,n)+"A"+[a,a]+" 0,0,0 "+$(a,i)+"L"+$(l,i)+"A"+[l,l]+" 0,0,1 "+$(l,n)+"Z"}function Q(e,t,r){if(0===e)return s.pathSector(2*j);var n,i,o=$(e,t),a=$(e,r),l=P((o[0]+a[0])/2),c=P((o[1]+a[1])/2);if(l&&c){var u=c/l,d=-1/u,f=R(j,u,l,c);n=R(D,d,f[0][0],f[0][1]),i=R(D,d,f[1][0],f[1][1])}else{var h,p;c?(h=D,p=j):(h=j,p=D),n=[[l-h,c-p],[l+h,c-p]],i=[[l-h,c+p],[l+h,c+p]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,m),x),eh?(e-1&&1===e&&w(t,u,[s.xaxis],[s.yaxis],s.id,q),r.indexOf("event")>-1&&y.click(u,t,s.id)}q.prepFn=function(e,n,o){var l=u._fullLayout.dragmode,d=z.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var h=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var p=a.apply3DTransform(h)(n-d.left,o-d.top);if(N=p[0],F=p[1],I){var v=A.findPolygonOffset(m,E[0],E[1],I);N+=T+v[0],F+=M+v[1]}switch(l){case"zoom":q.clickFn=se,c||(q.moveFn=I?ie:re,q.doneFn=oe,function(){B=null,Z=null,U=s.pathSubplot(),V=!1;var e=u._fullLayout[s.id];H=i(e.bgcolor).getLuminance(),(W=g.makeZoombox(f,H,k,S,U)).attr("fill-rule","evenodd"),G=g.makeCorners(f,k,S),_(u)}());break;case"select":case"lasso":b(e,n,o,q,l)}},v.init(q)},F.updateRadialDrag=function(e,t,r){var i=this,c=i.gd,u=i.layers,d=i.radius,f=i.innerRadius,h=i.cx,p=i.cy,m=i.radialAxis,y=C.radialDragBoxSize,x=y/2;if(m.visible){var b,w,k,M=D(i.radialAxisAngle),A=m._rl,E=A[0],I=A[1],O=A[r],P=.75*(A[1]-A[0])/(1-i.getHole(t))/d;r?(b=h+(d+x)*Math.cos(M),w=p-(d+x)*Math.sin(M),k="radialdrag"):(b=h+(f-x)*Math.cos(M),w=p-(f-x)*Math.sin(M),k="radialdrag-inner");var R,L,j,N=g.makeRectDragger(u,k,"crosshair",-x,-x,y,y),F={element:N,gd:c};!1===e.dragmode&&(F.dragmode=!1),U(n.select(N),m.visible&&f0===(r?j>E:j{"use strict";var n=r(53787),i=r(4738),o=n.deg2rad,a=n.rad2deg;e.exports=function(e,t,r){switch(i(e,r),e._id){case"x":case"radialaxis":!function(e,t){var r=t._subplot;e.setGeometry=function(){var t=e._rl[0],n=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(n-t),a=i/o,s=t>n?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+a},e.g2c=function(r){return e.l2c(r+t-a)},e.g2p=function(e){return e*o},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?o(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?a(e):e}(e,t))}}e.makeCalcdata=function(t,i){var o,a,s=t[i],l=t._length,c=function(r){return e.d2c(r,t.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(o=new Array(l),a=0;a{"use strict";e.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},68297:e=>{"use strict";function t(e){return e<0?-1:e>0?1:0}function r(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function n(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function i(e,t){return t*e.radius}e.exports={smith:r,reactanceArc:function(e,t,o,a){var s=n(e,r([o,t])),l=s[0],c=s[1],u=n(e,r([a,t])),d=u[0],f=u[1];if(0===t)return["M"+l+","+c,"L"+d+","+f].join(" ");var h=i(e,1/Math.abs(t));return["M"+l+","+c,"A"+h+","+h+" 0 0,"+(t<0?1:0)+" "+d+","+f].join(" ")},resistanceArc:function(e,o,a,s){var l=i(e,1/(o+1)),c=n(e,r([o,a])),u=c[0],d=c[1],f=n(e,r([o,s])),h=f[0],p=f[1];if(t(a)!==t(s)){var m=n(e,r([o,0]));return["M"+u+","+d,"A"+l+","+l+" 0 0,"+(0{"use strict";var n=r(38213).AU,i=r(53787).counterRegex,o=r(38076),a=r(50420),s=a.attr,l=a.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc",description:["Sets a reference between this trace's data coordinates and","a smith subplot.","If *smith* (the default value), the data refer to `layout.smith`.","If *smith2*, the data refer to `layout.smith2`, and so on."].join(" ")},e.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:r(40240),supplyLayoutDefaults:r(47627),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[l],a=0;a{"use strict";var n=r(18022),i=r(45446),o=r(29707).Y,a=r(53787).extendFlat,s=r(18693).overrideAll,l=s({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),c=s({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,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"),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot",description:"Sets the values at which ticks on this axis appear."},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *top* (*bottom*), this axis' are drawn above (below)","the axis line."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of real axis line","the tick and tick labels appear."].join(" ")},editType:"calc"},l,c),d=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot",description:["Sets the values at which ticks on this axis appear.","Defaults to `realaxis.tickvals` plus the same as negatives and zero."].join(" ")},ticks:i.ticks,editType:"calc"},l,c);e.exports={domain:o({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:n.background,description:"Set the background color of the subplot"},realaxis:u,imaginaryaxis:d,editType:"calc"}},47627:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(99862),a=r(38020),s=r(38213).NG,l=r(33095),c=r(46139),u=r(50923),d=r(4738),f=r(40240),h=r(50420),p=h.axisNames,m=function(e,t){var r={};return function(n){var i=t?t(n):n;if(i in r)return r[i];var o=e(n);return r[i]=o,o}}((function(e){return e.slice().reverse().map((function(e){return-e})).concat([0]).concat(e)}),String);function g(e,t,r,a){var g=r("bgcolor");a.bgColor=i.combine(g,a.paper_bgcolor);var v,y=s(a.fullData,h.name,a.id),x=a.layoutOut;function b(e,t){return r(v+"."+e,t)}for(var w=0;w{"use strict";var n=r(53787),i=r(99862),o=r(29707).c;e.exports=function(e,t,r,a){var s,l,c=a.type,u=a.attributes,d=a.handleDefaults,f=a.partition||"x",h=t._subplots[c],p=h.length,m=p&&h[0].replace(/\d+$/,"");function g(e,t){return n.coerce(s,l,u,e,t)}for(var v=0;v{"use strict";var n=r(41287),i=n.FORMAT_LINK,o=n.DATE_FORMAT_LINK;function a(e){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e&&e.supportOther?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),'Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',o,"for details on the date formatting syntax."].join(" ")}function s(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],i=0;i` is displayed in the secondary box, for example "{fullData.name}".',"To hide the secondary box completely, use an empty tag ``."].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.si=function(e,t){e=e||{};var r=s(t=t||{}),n={valType:"string",dflt:"",editType:e.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",a(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return!1!==e.arrayOk&&(n.arrayOk=!0),n},t.R=function(e,t){t=t||{};var r=(e=e||{}).newshape?"new ":"",n=s(t);return{valType:"string",dflt:"",editType:e.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",["Variables are inserted using %{variable},",'for example "x0: %{x0}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See',i,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See',o,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" "),n].join(" ")}}},70184:(e,t,r)=>{"use strict";var n=r(55241),i=r(38213).AU,o=r(53787).counterRegex,a="ternary";t.name=a;var s=t.attr="subplot";t.idRoot=a,t.idRegex=t.attrRegex=o(a),(t.attributes={})[s]={valType:"subplotid",dflt:"ternary",editType:"calc",description:["Sets a reference between this trace's data coordinates and","a ternary subplot.","If *ternary* (the default value), the data refer to `layout.ternary`.","If *ternary2*, the data refer to `layout.ternary2`, and so on."].join(" ")},t.layoutAttributes=r(20143),t.supplyLayoutDefaults=r(78631),t.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,o=t._subplots[a],s=0;s{"use strict";var n=r(18022),i=r(29707).Y,o=r(45446),a=r(18693).overrideAll,s=r(10191).extendFlat,l={title:{text:o.title.text,font:o.title.font},color:o.color,tickmode:o.minor.tickmode,nticks:s({},o.nticks,{dflt:6,min:1}),tick0:o.tick0,dtick:o.dtick,tickvals:o.tickvals,ticktext:o.ticktext,ticks:o.ticks,ticklen:o.ticklen,tickwidth:o.tickwidth,tickcolor:o.tickcolor,ticklabelstep:o.ticklabelstep,showticklabels:o.showticklabels,labelalias:o.labelalias,showtickprefix:o.showtickprefix,tickprefix:o.tickprefix,showticksuffix:o.showticksuffix,ticksuffix:o.ticksuffix,showexponent:o.showexponent,exponentformat:o.exponentformat,minexponent:o.minexponent,separatethousands:o.separatethousands,tickfont:o.tickfont,tickangle:o.tickangle,tickformat:o.tickformat,tickformatstops:o.tickformatstops,hoverformat:o.hoverformat,showline:s({},o.showline,{dflt:!0}),linecolor:o.linecolor,linewidth:o.linewidth,showgrid:s({},o.showgrid,{dflt:!0}),gridcolor:o.gridcolor,gridwidth:o.gridwidth,griddash:o.griddash,layer:o.layer,min:{valType:"number",dflt:0,min:0,description:["The minimum value visible on this axis.","The maximum is determined by the sum minus the minimum","values of the other two axes. The full view corresponds to","all the minima set to zero."].join(" ")},_deprecated:{title:o._deprecated.title,titlefont:o._deprecated.titlefont}},c=e.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:n.background,description:"Set the background color of the subplot"},sum:{valType:"number",dflt:1,min:0,description:["The number each triplet should sum to,","and the maximum range of each axis"].join(" ")},aaxis:l,baxis:l,caxis:l},"plot","from-root");c.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min` and `title`,","if not overridden in the individual axes.","Defaults to `layout.uirevision`."].join(" ")},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `min`,","and `title` if in `editable: true` configuration.","Defaults to `ternary.uirevision`."].join(" ")}},78631:(e,t,r)=>{"use strict";var n=r(66235),i=r(99862),o=r(53787),a=r(38020),s=r(46139),l=r(33095),c=r(64698),u=r(96592),d=r(50923),f=r(20143),h=["aaxis","baxis","caxis"];function p(e,t,r,o){var a,s,l,c=r("bgcolor"),u=r("sum");o.bgColor=n.combine(c,o.paper_bgcolor);for(var d=0;d=u&&(f.min=0,p.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function m(e,t,r,n){var i=f[t._name];function a(r,n){return o.coerce(e,t,i,r,n)}a("uirevision",n.uirevision),t.type="linear";var h=a("color"),p=h!==i.color.dflt?h:r.font.color,m=t._name.charAt(0).toUpperCase(),g="Component "+m,v=a("title.text",g);t._hovertitle=v===g?v:m,o.coerceFont(a,"title.font",{family:r.font.family,size:o.bigFont(r.font.size),color:p}),a("min"),u(e,t,a,"linear"),l(e,t,a,"linear"),s(e,t,a,"linear"),c(e,t,a,{outerTicks:!0}),a("showticklabels")&&(o.coerceFont(a,"tickfont",{family:r.font.family,size:r.font.size,color:p}),a("tickangle"),a("tickformat")),d(e,t,a,{dfltColor:h,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}e.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:f,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}},55241:(e,t,r)=>{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(53787),s=a.strTranslate,l=a._,c=r(66235),u=r(50973),d=r(4738),f=r(10191).extendFlat,h=r(44115),p=r(28605),m=r(63e3),g=r(76719),v=r(57873),y=v.freeMode,x=v.rectMode,b=r(34906),w=r(26002).prepSelect,_=r(26002).selectOnClick,k=r(26002).clearOutline,S=r(26002).clearSelectionsCache,T=r(99727);function M(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=M;var C=M.prototype;C.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},C.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var o=0;oA*b?i=(o=b)*A:o=(i=x)/A,a=v*i/x,l=y*o/b,r=t.l+t.w*m-i/2,n=t.t+t.h*(1-g)-o/2,h.x0=r,h.y0=n,h.w=i,h.h=o,h.sum=w,h.xaxis={type:"linear",range:[_+2*S-w,w-_-2*k],domain:[m-a/2,m+a/2],_id:"x"},d(h.xaxis,h.graphDiv._fullLayout),h.xaxis.setScale(),h.xaxis.isPtWithinRange=function(e){return e.a>=h.aaxis.range[0]&&e.a<=h.aaxis.range[1]&&e.b>=h.baxis.range[1]&&e.b<=h.baxis.range[0]&&e.c>=h.caxis.range[1]&&e.c<=h.caxis.range[0]},h.yaxis={type:"linear",range:[_,w-k-S],domain:[g-l/2,g+l/2],_id:"y"},d(h.yaxis,h.graphDiv._fullLayout),h.yaxis.setScale(),h.yaxis.isPtWithinRange=function(){return!0};var T=h.yaxis.domain[0],M=h.aaxis=f({},e.aaxis,{range:[_,w-k-S],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+l*A],anchor:"free",position:0,_id:"y",_length:i});d(M,h.graphDiv._fullLayout),M.setScale();var C=h.baxis=f({},e.baxis,{range:[w-_-S,k],side:"bottom",domain:h.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});d(C,h.graphDiv._fullLayout),C.setScale();var E=h.caxis=f({},e.caxis,{range:[w-_-k,S],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+l*A],anchor:"free",position:0,_id:"y",_length:i});d(E,h.graphDiv._fullLayout),E.setScale();var I="M"+r+","+(n+o)+"h"+i+"l-"+i/2+",-"+o+"Z";h.clipDef.select("path").attr("d",I),h.layers.plotbg.select("path").attr("d",I);var O="M0,"+o+"h"+i+"l-"+i/2+",-"+o+"Z";h.clipDefRelative.select("path").attr("d",O);var P=s(r,n);h.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),h.clipDefRelative.select("path").attr("transform",null);var R=s(r-C._offset,n+o);h.layers.baxis.attr("transform",R),h.layers.bgrid.attr("transform",R);var L=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);h.layers.aaxis.attr("transform",L),h.layers.agrid.attr("transform",L);var j=s(r+i/2,n)+"rotate(-30)"+s(0,-E._offset);h.layers.caxis.attr("transform",j),h.layers.cgrid.attr("transform",j),h.drawAxes(!0),h.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+o)+"l"+i/2+",-"+o:"M0,0").call(c.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),h.layers.bline.select("path").attr("d",C.showline?"M"+r+","+(n+o)+"h"+i:"M0,0").call(c.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),h.layers.cline.select("path").attr("d",E.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+o:"M0,0").call(c.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),h.graphDiv._context.staticPlot||h.initInteractions(),u.setClipUrl(h.layers.frontplot,h._hasClipOnAxisFalse?null:h.clipId,h.graphDiv)},C.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(7)+"title",i=t.layers,o=t.aaxis,a=t.baxis,s=t.caxis;if(t.drawAx(o),t.drawAx(a),t.drawAx(s),e){var c=Math.max(o.showticklabels?o.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),u=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:o,propName:t.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-o.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:a,propName:t.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*a.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*s.title.font.size+u,"text-anchor":"middle"}})}},C.drawAx=function(e){var t,r=this,n=r.graphDiv,i=e._name,o=i.charAt(0),s=e._id,l=r.layers[i],c=o+"tickLayout",u=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);r[c]!==u&&(l.selectAll("."+s+"tick").remove(),r[c]=u),e.setScale();var d=p.calcTicks(e),f=p.clipEnds(e,d),h=p.makeTransTickFn(e),m=p.getTickSigns(e)[2],g=a.deg2rad(30),v=m*(e.linewidth||1)/2,y=m*e.ticklen,x=r.w,b=r.h,w="b"===o?"M0,"+v+"l"+Math.sin(g)*y+","+Math.cos(g)*y:"M"+v+",0l"+Math.cos(g)*y+","+-Math.sin(g)*y,_={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[o];p.drawTicks(n,e,{vals:"inside"===e.ticks?f:d,layer:l,path:w,transFn:h,crisp:!1}),p.drawGrid(n,e,{vals:f,layer:r.layers[o+"grid"],path:_,transFn:h,crisp:!1}),p.drawLabels(n,e,{vals:d,layer:l,transFn:h,labelFns:p.makeLabelFns(e,0,30)})};var E=T.MINZOOM/2+.87,I="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",O="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",R=!0;function L(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}C.clearOutline=function(){S(this.dragOptions),k(this.dragOptions.gd)},C.initInteractions=function(){var e,t,r,n,d,f,h,p,v,b,k,S,M=this,C=M.layers.plotbg.select("path").node(),E=M.graphDiv,j=E._fullLayout._zoomlayer;function D(e){var t={};return t[M.id+".aaxis.min"]=e.a,t[M.id+".baxis.min"]=e.b,t[M.id+".caxis.min"]=e.c,t}function z(e,t){var r=E._fullLayout.clickmode;L(E),2===e&&(E.emit("plotly_doubleclick",null),o.call("_guiRelayout",E,D({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&_(t,E,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(E,t,M.id)}function N(e,t){return 1-t/M.h}function F(e,t){return 1-(e+(M.h-t)/Math.sqrt(3))/M.w}function B(e,t){return(e-(M.h-t)/Math.sqrt(3))/M.w}function Z(i,o){var a=r+i*e,s=n+o*t,l=Math.max(0,Math.min(1,N(0,n),N(0,s))),c=Math.max(0,Math.min(1,F(r,n),F(a,s))),u=Math.max(0,Math.min(1,B(r,n),B(a,s))),m=(l/2+u)*M.w,g=(1-l/2-c)*M.w,y=(m+g)/2,x=g-m,w=(1-l)*M.h,_=w-x/A;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),S.transition().style("opacity",1).duration(200),b=!0),E.emit("plotly_relayouting",D(h))}function U(){L(E),h!==d&&(o.call("_guiRelayout",E,D(h)),R&&E.data&&E._context.showTips&&(a.notifier(l(E,"Double-click to zoom back out"),"long"),R=!1))}function V(e,t){var r=e/M.xaxis._m,n=t/M.yaxis._m,i=[(h={a:d.a-n,b:d.b+(r+n)/2,c:d.c-(r-n)/2}).a,h.b,h.c].sort(a.sorterAsc),o=i.indexOf(h.a),l=i.indexOf(h.b),c=i.indexOf(h.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),h={a:i[o],b:i[l],c:i[c]},t=(d.a-h.a)*M.yaxis._m,e=(d.c-h.c-d.b+h.b)*M.xaxis._m);var f=s(M.x0+e,M.y0+t);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var p=s(-e,-t);M.clipDefRelative.select("path").attr("transform",p),M.aaxis.range=[h.a,M.sum-h.b-h.c],M.baxis.range=[M.sum-h.a-h.c,h.b],M.caxis.range=[M.sum-h.a-h.b,h.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,M),E.emit("plotly_relayouting",D(h))}function H(){o.call("_guiRelayout",E,D(h))}this.dragOptions={element:C,gd:E,plotinfo:{id:M.id,domain:E._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(o,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],e=E._fullLayout._invScaleX,t=E._fullLayout._invScaleY;var m=M.dragOptions.dragmode=E._fullLayout.dragmode;y(m)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===m?(M.dragOptions.moveFn=Z,M.dragOptions.clickFn=z,M.dragOptions.doneFn=U,function(e,t,o){var l=C.getBoundingClientRect();r=t-l.left,n=o-l.top,E._fullLayout._calcInverseTransform(E);var u=E._fullLayout._invTransform,m=a.apply3DTransform(u)(r,n);r=m[0],n=m[1],d={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=d,f=M.aaxis.range[1]-d.a,p=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,k=j.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:p>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),S=j.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(E)}(0,l,u)):"pan"===m?(M.dragOptions.moveFn=V,M.dragOptions.clickFn=z,M.dragOptions.doneFn=H,d={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=d,M.clearOutline(E)):(x(m)||y(m))&&w(o,l,u,M.dragOptions,m)}},C.onmousemove=function(e){g.hover(E,e,M.id),E._fullLayout._lasthover=C,E._fullLayout._hoversubplot=M.id},C.onmouseout=function(e){E._dragging||m.unhover(E,e)},m.init(this.dragOptions)}},44049:(e,t,r)=>{"use strict";var n=r(95169),i=r(17295),o=r(80809),a=r(47623),s=r(90489).addStyleRule,l=r(10191),c=r(27231),u=r(79443),d=l.extendFlat,f=l.extendDeepAll;function h(e){var r=e.name,i=e.categories,o=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])return void n.log("Plot type "+r+" already registered.");for(var i in v(e),t.subplotsRegistry[r]=e,t.componentsRegistry)b(i,e.name)}(e.basePlotModule);for(var a={},l=0;l{"use strict";var n=r(44049),i=r(53787),o=i.extendFlat,a=i.extendDeep;function s(e){var t;switch(e){case"themes__thumb":t={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":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}e.exports=function(e,t){var r,i,l=e.data,c=e.layout,u=a([],l),d=a({},c,s(t.tileClass)),f=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){d.annotations=[];var h=Object.keys(d);for(r=0;r-1&&(d[h[r]].title={text:""});for(r=0;r{"use strict";var n=r(53787),i=r(50683),o=r(97895),a=r(82231);e.exports=function(e,t){var r;return n.isPlainObject(e)||(r=n.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==t.format&&l(new Error(a.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=i(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format.replace("-","."),c.then((function(e){return r&&(r._snapshotInProgress=!1),o(e,u,t.format)})).then((function(e){s(e)})).catch((function(e){r&&(r._snapshotInProgress=!1),l(e)}))}))}},97895:(e,t,r)=>{"use strict";var n=r(53787),i=r(82231);e.exports=function(e,t,r){var o=document.createElement("a"),a="download"in o;return new Promise((function(s,l){var c,u;if(n.isIE())return c=i.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,s(t);if(a)return c=i.createBlob(e,r),u=i.createObjectURL(c),o.href=u,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),i.revokeObjectURL(u),c=null,s(t);if(n.isSafari()){var d="svg"===r?",":";base64,";return i.octetStream(d+encodeURIComponent(e)),s(t)}l(new Error("download error"))}))}},82231:(e,t,r)=>{"use strict";var n=r(44049);t.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},t.getRedrawFunc=function(e){return function(){n.getComponentMethod("colorbar","draw")(e)}},t.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},t.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var i=window.URL||window.webkitURL;t.createObjectURL=function(e){return i.createObjectURL(e)},t.revokeObjectURL=function(e){return i.revokeObjectURL(e)},t.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var n=r(82231),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(86629),toSVG:r(99367),svgToImg:r(74978),toImage:r(67574),downloadImage:r(51320)};e.exports=i},74978:(e,t,r)=>{"use strict";var n=r(53787),i=r(68041).EventEmitter,o=r(82231);e.exports=function(e){var t=e.emitter||new i,r=new Promise((function(i,a){var s=window.Image,l=e.svg,c=e.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(o.MSG_IE_BAD_FORMAT);return a(u),e.promise?r:t.emit("error",u)}var d,f,h=e.canvas,p=e.scale||1,m=e.width||300,g=e.height||150,v=p*m,y=p*g,x=h.getContext("2d",{willReadFrequently:!0}),b=new s;"svg"===c||n.isSafari()?f=o.encodeSVG(l):(d=o.createBlob(l,"svg"),f=o.createObjectURL(d)),h.width=v,h.height=y,b.onload=function(){var r;switch(d=null,o.revokeObjectURL(f),"svg"!==c&&x.drawImage(b,0,0,v,y),c){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=f;break;default:var n="Image format is not jpeg, png, svg or webp.";if(a(new Error(n)),!e.promise)return t.emit("error",n)}i(r),e.promise||t.emit("success",r)},b.onerror=function(r){if(d=null,o.revokeObjectURL(f),a(r),!e.promise)return t.emit("error",r)},b.src=f}));return e.promise?r:t}},67574:(e,t,r)=>{"use strict";var n=r(68041).EventEmitter,i=r(44049),o=r(53787),a=r(82231),s=r(86629),l=r(99367),c=r(74978);e.exports=function(e,t){var r=new n,u=s(e,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);var f=a.getRedrawFunc(d);return i.call("_doPlot",d,u.data,u.layout,u.config).then(f).then((function(){var e=a.getDelay(d._fullLayout);setTimeout((function(){var e=l(d),n=document.createElement("canvas");n.id=o.randstr(),(r=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){d&&document.body.removeChild(d)}}),e)})).catch((function(e){r.emit("error",e)})),r}},99367:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(66235),s=r(83580),l=/"/g,c="TOBESTRIPPED",u=new RegExp('("'+c+")|("+c+'")',"g");e.exports=function(e,t,r){var d,f=e._fullLayout,h=f._paper,p=f._toppaper,m=f.width,g=f.height;h.insert("rect",":first-child").call(o.setRect,0,0,m,g).call(a.fill,f.paper_bgcolor);var v=f._basePlotModules||[];for(d=0;d")?"":t.html(e).text()}));return t.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},59251:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(37471),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(32191).si,s=r(8753),l=r(92948),c=r(22331),u=r(93701).u,d=r(10191).extendFlat,f=l({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),h=d({},n.marker.line.width,{dflt:0}),p=d({width:h,editType:"calc"},s("marker.line")),m=d({line:p,editType:"calc"},s("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:u});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:a({editType:"plot"},{keys:c.eventDataKeys}),hovertext:n.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:d({},f,{description:"Sets the font used for `text`."}),insidetextfont:d({},f,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:d({},f,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:d({},n.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:m,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,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"],description:"Renamed to `orientation`."}}}},51717:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(25584).hasColorscale,a=r(1631),s=r(59251),l=r(35637);e.exports=function(e,t){var r,c,u,d,f,h,p=n.getFromId(e,t.xaxis||"x"),m=n.getFromId(e,t.yaxis||"y"),g={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=p.makeCalcdata(t,"x",g),u=m.makeCalcdata(t,"y"),d=i(t,m,"y",u),f=!!t.yperiodalignment,h="y"):(r=m.makeCalcdata(t,"y",g),u=p.makeCalcdata(t,"x"),d=i(t,p,"x",u),f=!!t.xperiodalignment,h="x"),c=d.vals;for(var v=Math.min(c.length,r.length),y=new Array(v),x=0;x{"use strict";e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},39713:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787).isArrayOrTypedArray,o=r(24956).BADNUM,a=r(44049),s=r(28605),l=r(14511).getAxisGroup,c=r(35817);function u(e,t,r,a,u){if(a.length){var b,w,_,k;switch(function(e,t){var r,o;for(r=0;rd+c||!n(u))}for(var h=0;h{"use strict";var n=r(53787),i=r(66235),o=r(44049),a=r(89016),s=r(17239),l=r(8743),c=r(25305),u=r(8222),d=n.coerceFont;function f(e,t,r,i,o,a){var s=!(!1===(a=a||{}).moduleHasSelected),l=!(!1===a.moduleHasUnselected),c=!(!1===a.moduleHasConstrain),u=!(!1===a.moduleHasCliponaxis),f=!(!1===a.moduleHasTextangle),h=!(!1===a.moduleHasInsideanchor),p=!!a.hasPathbar,m=Array.isArray(o)||"auto"===o,g=m||"inside"===o,v=m||"outside"===o;if(g||v){var y=d(i,"textfont",r.font),x=n.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(i,"insidetextfont",x),p){var w=n.extendFlat({},y);b&&delete w.color,d(i,"pathbar.textfont",w)}v&&d(i,"outsidetextfont",y),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),f&&i("textangle"),i("texttemplate")}g&&h&&i("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,c){function d(r,i){return n.coerce(e,t,u,r,i)}if(a(e,t,c,d)){s(e,t,c,d),d("xhoverformat"),d("yhoverformat"),d("orientation",t.x&&!t.y?"h":"v"),d("base"),d("offset"),d("width"),d("text"),d("hovertext"),d("hovertemplate");var h=d("textposition");f(e,t,c,d,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,d,r,c);var p=(t.marker.line||{}).color,m=o.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||i.defaultLine,{axis:"y"}),m(e,t,p||i.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,u,e)}if("group"===t.barmode)for(var a=0;a{"use strict";e.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},28372:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(53787).isArrayOrTypedArray;t.coerceString=function(e,t,r){if("string"===typeof t){if(t||!e.noBlank)return t}else if(("number"===typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},t.coerceNumber=function(e,t,r){if(n(t)){t=+t;var i=e.min,o=e.max;if(!(void 0!==i&&to))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return i(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return Array.isArray(e)?t{"use strict";var n=r(76719),i=r(44049),o=r(66235),a=r(53787).fillText,s=r(28372).getLineWidth,l=r(28605).hoverLabelText,c=r(24956).BADNUM;function u(e,t,r,i,o){var s,u,d,f,h,p,m,g=e.cd,v=g[0].trace,y=g[0].t,x="closest"===i,b="waterfall"===v.type,w=e.maxHoverDistance,_=e.maxSpikeDistance;"h"===v.orientation?(s=r,u=t,d="y",f="x",h=L,p=P):(s=t,u=r,d="x",f="y",p=L,h=P);var k=v[d+"period"],S=x||k;function T(e){return C(e,-1)}function M(e){return C(e,1)}function C(e,t){var r=e.w;return e[d]+t*r/2}function A(e){return e[d+"End"]-e[d+"Start"]}var E=x?T:k?function(e){return e.p-A(e)/2}:function(e){return Math.min(T(e),e.p-y.bardelta/2)},I=x?M:k?function(e){return e.p+A(e)/2}:function(e){return Math.max(M(e),e.p+y.bardelta/2)};function O(e,t,r){return o.finiteRange&&(r=0),n.inbox(e-s,t-s,r+Math.min(1,Math.abs(t-e)/m)-1)}function P(e){return O(E(e),I(e),w)}function R(e){var t=e[f];if(b){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function L(e){var t=u,r=e.b,i=R(e);return n.inbox(r-t,i-t,w+(i-t)/(i-r)-1)}var j=e[d+"a"],D=e[f+"a"];m=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));var z=n.getDistanceFunction(i,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(g,z,e),!1!==e.index&&g[e.index].p!==c){S||(E=function(e){return Math.min(T(e),e.p-y.bargroupwidth/2)},I=function(e){return Math.max(M(e),e.p+y.bargroupwidth/2)});var N=g[e.index],F=v.base?N.b+N.s:N.s;e[f+"0"]=e[f+"1"]=D.c2p(N[f],!0),e[f+"LabelVal"]=F;var B=y.extents[y.extents.round(N.p)];e[d+"0"]=j.c2p(x?E(N):B[0],!0),e[d+"1"]=j.c2p(x?I(N):B[1],!0);var Z=void 0!==N.orig_p;return e[d+"LabelVal"]=Z?N.orig_p:N.p,e.labelLabel=l(j,e[d+"LabelVal"],v[d+"hoverformat"]),e.valueLabel=l(D,e[f+"LabelVal"],v[f+"hoverformat"]),e.baseLabel=l(D,N.b,v[f+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,i=R(e);return n.inbox(r-t,i-t,_+(i-t)/(i-r)-1)}(N)+function(e){return O(T(e),M(e),_)}(N))/2,e[d+"Spike"]=j.c2p(N.p,!0),a(N,v,e),e.hovertemplate=v.hovertemplate,e}}function d(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=s(e,t);return o.opacity(r)?r:o.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(e,t,r,n,o){var a=u(e,t,r,n,o);if(a){var s=a.cd,l=s[0].trace,c=s[a.index];return a.color=d(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,a),[a]}},hoverOnBars:u,getTraceColor:d}},83538:(e,t,r)=>{"use strict";e.exports={attributes:r(8222),layoutAttributes:r(90871),supplyDefaults:r(6099).supplyDefaults,crossTraceDefaults:r(6099).crossTraceDefaults,supplyLayoutDefaults:r(57690),calc:r(51717),crossTraceCalc:r(39713).crossTraceCalc,colorbar:r(68971),arraysToCalcdata:r(59251),plot:r(88430).plot,style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,hoverPoints:r(48363).hoverPoints,eventData:r(45058),selectPoints:r(22145),moduleType:"trace",name:"bar",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set to *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}},90871:e=>{"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},57690:(e,t,r)=>{"use strict";var n=r(44049),i=r(28605),o=r(53787),a=r(90871);e.exports=function(e,t,r){function s(r,n){return o.coerce(e,t,a,r,n)}for(var l=!1,c=!1,u=!1,d={},f=s("barmode"),h=0;h{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(98224),s=r(66235),l=r(50973),c=r(44049),u=r(28605).tickText,d=r(22684),f=d.recordMinTextSize,h=d.clearMinTextSize,p=r(29527),m=r(28372),g=r(22331),v=r(8222),y=v.text,x=v.textposition,b=r(87267).appendArrayPointValue,w=g.TEXTPAD;function _(e){return e.id}function k(e){if(e.ids)return _}function S(e,t){return e0}function C(e){return"auto"===e?0:e}function A(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function E(e,t,r,n,i,o){var a=!!o.isHorizontal,s=!!o.constrained,l=o.angle||0,c=o.anchor||"end",u="end"===c,d="start"===c,f=((o.leftToRight||0)+1)/2,h=1-f,p=i.width,m=i.height,g=Math.abs(t-e),v=Math.abs(n-r),y=g>2*w&&v>2*w?w:0;g-=2*y,v-=2*y;var x=C(l);"auto"!==l||p<=g&&m<=v||!(p>g||m>v)||(p>v||m>g)&&p.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};F=G(F,B,D),B=G(B,F,D),Z=G(Z,U,!D),U=G(U,Z,!D)}var q=T(o.ensureSingle(R,"path"),O,g,v);if(q.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((B-F)*(U-Z))||V&&e._context.staticPlot?"M0,0Z":"M"+F+","+Z+"V"+U+"H"+B+"V"+Z+"Z").call(l.setClipUrl,t.layerClipId,e),!O.uniformtext.mode&&z){var Y=l.makePointStyleFns(d);l.singlePointStyle(c,q,d,Y,e)}!function(e,t,r,n,i,s,c,d,h,g,v){var _,k=t.xaxis,M=t.yaxis,I=e._fullLayout;function O(t,r,n){return o.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(a.convertToTspans,e)}var P=n[0].trace,R="h"===P.orientation,L=function(e,t,r,n,i){var a,s=t[0].trace,l=s.texttemplate;a=l?function(e,t,r,n,i){var a=t[0].trace,s=o.castOption(a,r,"texttemplate");if(!s)return"";var l,c,d,f,h="histogram"===a.type,p="waterfall"===a.type,m="funnel"===a.type,g="h"===a.orientation;g?(l="y",c=i,d="x",f=n):(l="x",c=n,d="y",f=i);function v(e){return u(c,c.c2l(e),!0).text}function y(e){return u(f,f.c2l(e),!0).text}var x=t[r],w={};w.label=x.p,w.labelLabel=w[l+"Label"]=v(x.p);var _=o.castOption(a,x.i,"text");(0===_||_)&&(w.text=_);w.value=x.s,w.valueLabel=w[d+"Label"]=y(x.s);var k={};b(k,a,x.i),(h||void 0===k.x)&&(k.x=g?w.value:w.label);(h||void 0===k.y)&&(k.y=g?w.label:w.value);(h||void 0===k.xLabel)&&(k.xLabel=g?w.valueLabel:w.labelLabel);(h||void 0===k.yLabel)&&(k.yLabel=g?w.labelLabel:w.valueLabel);p&&(w.delta=+x.rawS||x.s,w.deltaLabel=y(w.delta),w.final=x.v,w.finalLabel=y(w.final),w.initial=w.final-w.delta,w.initialLabel=y(w.initial));m&&(w.value=x.s,w.valueLabel=y(w.value),w.percentInitial=x.begR,w.percentInitialLabel=o.formatPercent(x.begR),w.percentPrevious=x.difR,w.percentPreviousLabel=o.formatPercent(x.difR),w.percentTotal=x.sumR,w.percenTotalLabel=o.formatPercent(x.sumR));var S=o.castOption(a,x.i,"customdata");S&&(w.customdata=S);return o.texttemplateString(s,w,e._d3locale,k,w,a._meta||{})}(e,t,r,n,i):s.textinfo?function(e,t,r,n){var i=e[0].trace,a="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(e){return u(a?n:r,e,!0).text}function d(e){return u(a?r:n,+e,!0).text}var f,h=i.textinfo,p=e[t],m=h.split("+"),g=[],v=function(e){return-1!==m.indexOf(e)};v("label")&&g.push(c(e[t].p));v("text")&&(0===(f=o.castOption(i,p.i,"text"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;v("initial")&&g.push(d(b)),v("delta")&&g.push(d(y)),v("final")&&g.push(d(x))}if(l){v("value")&&g.push(d(p.s));var w=0;v("percent initial")&&w++,v("percent previous")&&w++,v("percent total")&&w++;var _=w>1;v("percent initial")&&(f=o.formatPercent(p.begR),_&&(f+=" of initial"),g.push(f)),v("percent previous")&&(f=o.formatPercent(p.difR),_&&(f+=" of previous"),g.push(f)),v("percent total")&&(f=o.formatPercent(p.sumR),_&&(f+=" of total"),g.push(f))}return g.join("
")}(t,r,n,i):m.getValue(s.text,r);return m.coerceString(y,a)}(I,n,i,k,M);_=function(e,t){var r=m.getValue(e.textposition,t);return m.coerceEnumerated(x,r)}(P,i);var j="stack"===g.mode||"relative"===g.mode,D=n[i],z=!j||D._outmost;if(!L||"none"===_||(D.isBlank||s===c||d===h)&&("auto"===_||"inside"===_))return void r.select("text").remove();var N=I.font,F=p.getBarColor(n[i],P),B=p.getInsideTextFont(P,i,N,F),Z=p.getOutsideTextFont(P,i,N),U=r.datum();R?"log"===k.type&&U.s0<=0&&(s=k.range[0]0&&G>0&&(W<=Y&&G<=X||W<=X&&G<=Y||(R?Y>=W*(X/G):X>=G*(Y/W)))?_="inside":(_="outside",V.remove(),V=null);else _="inside"}if(!V){var K=(V=O(r,L,q=o.ensureUniformFontSize(e,"outside"===_?Z:B))).attr("transform");if(V.attr("transform",""),W=(H=l.bBox(V.node())).width,G=H.height,V.attr("transform",K),W<=0||G<=0)return void V.remove()}var $,J=P.textangle;$="outside"===_?function(e,t,r,n,i,o){var a,s=!!o.isHorizontal,l=!!o.constrained,c=o.angle||0,u=i.width,d=i.height,f=Math.abs(t-e),h=Math.abs(n-r);a=s?h>2*w?w:0:f>2*w?w:0;var p=1;l&&(p=s?Math.min(1,h/d):Math.min(1,f/u));var m=C(c),g=A(i,m),v=(s?g.x:g.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,_=(r+n)/2,k=0,T=0,M=s?S(t,e):S(r,n);s?(b=t-M*a,k=M*v):(_=n+M*a,T=-M*v);return{textX:y,textY:x,targetX:b,targetY:_,anchorX:k,anchorY:T,scale:p,rotate:m}}(s,c,d,h,H,{isHorizontal:R,constrained:"both"===P.constraintext||"outside"===P.constraintext,angle:J}):E(s,c,d,h,H,{isHorizontal:R,constrained:"both"===P.constraintext||"inside"===P.constraintext,angle:J,anchor:P.insidetextanchor});$.fontSize=q.size,f("histogram"===P.type?"bar":P.type,$,I),D.transform=$;var Q=T(V,I,g,v);o.setTransormAndDisplay(Q,$)}(e,t,R,r,h,F,B,Z,U,g,v),t.layerClipId&&l.hideOutsideRangePoint(c,R.select("text"),_,I,d.xcalendar,d.ycalendar)}));var Z=!1===d.cliponaxis;l.setClipUrl(c,Z?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,R,t,g)},toMoveInsideBar:E}},22145:e=>{"use strict";function t(e,t,r,n,i){var o=t.c2p(n?e.s0:e.p0,!0),a=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(o+a)/2,(s+l)/2]:n?[a,(s+l)/2]:[(o+a)/2,l]}e.exports=function(e,r){var n,i=e.cd,o=e.xaxis,a=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===r)for(n=0;n{"use strict";e.exports=i;var n=r(53787).distinctVals;function i(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),o=[],a=0;a{"use strict";var n=r(8996),i=r(66235),o=r(50973),a=r(53787),s=r(44049),l=r(22684).resizeText,c=r(8222),u=c.textfont,d=c.insidetextfont,f=c.outsidetextfont,h=r(28372);function p(e,t,r){o.pointStyle(e.selectAll("path"),t,r),m(e,t,r)}function m(e,t,r){e.selectAll("text").each((function(e){var i=n.select(this),s=a.ensureUniformFontSize(r,g(i,e,t,r));o.font(i,s)}))}function g(e,t,r,n){var i=n._fullLayout.font,o=r.textfont;if(e.classed("bartext-inside")){var a=w(t,r);o=y(r,t.i,i,a)}else e.classed("bartext-outside")&&(o=x(r,t.i,i));return o}function v(e,t,r){return b(u,e.textfont,t,r)}function y(e,t,r,n){var o=v(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(o={color:i.contrast(n),family:o.family,size:o.size}),b(d,e.insidetextfont,t,o)}function x(e,t,r){var n=v(e,t,r);return b(f,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var i=h.getValue(t.family,r),o=h.getValue(t.size,r),a=h.getValue(t.color,r);return{family:h.coerceString(e.family,i,n.family),size:h.coerceNumber(e.size,o,n.size),color:h.coerceColor(e.color,a,n.color)}}function w(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}e.exports={style:function(e){var t=n.select(e).selectAll("g.barlayer").selectAll("g.trace");l(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===i.barmode&&r>1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:m,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?function(e,t,r){o.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var i,s=n.select(this);if(e.selected){i=a.ensureUniformFontSize(r,g(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),o.font(s,i)}else o.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,i,e):(p(r,i,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:w,resizeText:l}},8743:(e,t,r)=>{"use strict";var n=r(66235),i=r(25584).hasColorscale,o=r(5876),a=r(53787).coercePattern;e.exports=function(e,t,r,s,l){var c=r("marker.color",s),u=i(e,"marker");u&&o(e,t,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(e,"marker.line")&&o(e,t,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),a(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},22684:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787);function o(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=o(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var n=r(32191).fF,i=r(10191).extendFlat,o=r(32608),a=r(8222);e.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:i({},a.base,{description:["Sets where the bar base is drawn (in radial axis units).","In *stack* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")}),offset:i({},a.offset,{description:["Shifts the angular position where the bar is drawn","(in *thetatunit* units)."].join(" ")}),width:i({},a.width,{description:["Sets the bar angular width (in *thetaunit* units)."].join(" ")}),text:i({},a.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:i({},a.hovertext,{description:"Same as `text`."}),marker:a.marker,hoverinfo:o.hoverinfo,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},39329:(e,t,r)=>{"use strict";var n=r(25584).hasColorscale,i=r(1631),o=r(59251),a=r(39713).setGroupPositions,s=r(35637),l=r(44049).traceIs,c=r(53787).extendFlat;e.exports={calc:function(e,t){for(var r=e._fullLayout,a=t.subplot,l=r[a].radialaxis,c=r[a].angularaxis,u=l.makeCalcdata(t,"r"),d=c.makeCalcdata(t,"theta"),f=t._length,h=new Array(f),p=u,m=d,g=0;g{"use strict";var n=r(53787),i=r(10123).handleRThetaDefaults,o=r(8743),a=r(62319);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}i(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),o(e,t,l,r,s),n.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}},29369:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(48363).getTraceColor,a=i.fillText,s=r(9226).makeHoverPointText,l=r(73355).isPtInsidePolygon;e.exports=function(e,t,r){var c=e.cd,u=c[0].trace,d=e.subplot,f=d.radialAxis,h=d.angularAxis,p=d.vangles,m=p?l:i.isPtInsideSector,g=e.maxHoverDistance,v=h._period||2*Math.PI,y=Math.abs(f.g2p(Math.sqrt(t*t+r*r))),x=Math.atan2(r,t);f.range[0]>f.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(e){return m(y,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/v)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var w=i.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),s(w,u,d,e),e.hovertemplate=u.hovertemplate,e.color=o(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}},36522:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(37180),categories:["polar","bar","showLegend"],attributes:r(62319),layoutAttributes:r(86280),supplyDefaults:r(7378),supplyLayoutDefaults:r(99486),calc:r(39329).calc,crossTraceCalc:r(39329).crossTraceCalc,plot:r(1401),colorbar:r(68971),formatLabels:r(33058),style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,hoverPoints:r(29369),selectPoints:r(22145),meta:{hrName:"bar_polar",description:["The data visualized by the radial span of the bars is set in `r`"].join(" ")}}},86280:e=>{"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc",description:["Sets the gap between bars of","adjacent location coordinates.","Values are unitless, they represent fractions of the minimum difference","in bar positions in the data."].join(" ")}}},99486:(e,t,r)=>{"use strict";var n=r(53787),i=r(86280);e.exports=function(e,t,r){var o,a={};function s(r,a){return n.coerce(e[o]||{},t[o],i,r,a)}for(var l=0;l{"use strict";var n=r(8996),i=r(51908),o=r(53787),a=r(50973),s=r(73355);e.exports=function(e,t,r){var l=e._context.staticPlot,c=t.xaxis,u=t.yaxis,d=t.radialAxis,f=t.angularAxis,h=function(e){var t=e.cxx,r=e.cyy;if(e.vangles)return function(n,i,a,l){var c,u;o.angleDelta(a,l)>0?(c=a,u=l):(c=l,u=a);var d=[s.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,e.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,d,t,r)};return function(e,n,i,a){return o.pathAnnulus(e,n,i,a,t,r)}}(t),p=t.layers.frontplot.select("g.barlayer");o.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=o.ensureSingle(r,"g","points").selectAll("g.point").data(o.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),a=e.rp0=d.c2p(e.s0),s=e.rp1=d.c2p(e.s1),l=e.thetag0=f.c2g(e.p0),p=e.thetag1=f.c2g(e.p1);if(i(a)&&i(s)&&i(l)&&i(p)&&a!==s&&l!==p){var m=d.c2g(e.s1),g=(l+p)/2;e.ct=[c.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=h(a,s,l,p)}else t="M0,0Z";o.ensureSingle(r,"path").attr("d",t)})),a.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},94837:(e,t,r)=>{"use strict";var n=r(37471),i=r(8222),o=r(18022),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(10191).extendFlat,c=n.marker,u=c.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the y sample data or coordinates.","See overview for more info."].join(" ")},x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x sample data or coordinates.","See overview for more info."].join(" ")},x0:{valType:"any",editType:"calc+clearAxisTypes",description:["Sets the x coordinate for single-box traces","or the starting coordinate for multi-box traces","set using q1/median/q3.","See overview for more info."].join(" ")},y0:{valType:"any",editType:"calc+clearAxisTypes",description:["Sets the y coordinate for single-box traces","or the starting coordinate for multi-box traces","set using q1/median/q3.","See overview for more info."].join(" ")},dx:{valType:"number",editType:"calc",description:["Sets the x coordinate step for multi-box traces","set using q1/median/q3."].join(" ")},dy:{valType:"number",editType:"calc",description:["Sets the y coordinate step for multi-box traces","set using q1/median/q3."].join(" ")},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),name:{valType:"string",editType:"calc+clearAxisTypes",description:["Sets the trace name.","The trace name appears as the legend item and on hover.","For box traces, the name will also be used for the position","coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are","missing and the position axis is categorical"].join(" ")},q1:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Quartile 1 values.","There should be as many items as the number of boxes desired."].join(" ")},median:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the median values.","There should be as many items as the number of boxes desired."].join(" ")},q3:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Quartile 3 values.","There should be as many items as the number of boxes desired."].join(" ")},lowerfence:{valType:"data_array",editType:"calc",description:["Sets the lower fence values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `lowerfence` is not provided but a sample (in `y` or `x`) is set,","we compute the lower as the last sample point below 1.5 times the IQR."].join(" ")},upperfence:{valType:"data_array",editType:"calc",description:["Sets the upper fence values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `upperfence` is not provided but a sample (in `y` or `x`) is set,","we compute the lower as the last sample point above 1.5 times the IQR."].join(" ")},notched:{valType:"boolean",editType:"calc",description:["Determines whether or not notches are drawn.","Notches displays a confidence interval around the median.","We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N),","where IQR is the interquartile range and N is the sample size.","If two boxes' notches do not overlap there is 95% confidence their medians differ.","See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info.","Defaults to *false* unless `notchwidth` or `notchspan` is set."].join(" ")},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc",description:["Sets the width of the notches relative to","the box' width.","For example, with 0, the notches are as wide as the box(es)."].join(" ")},notchspan:{valType:"data_array",editType:"calc",description:["Sets the notch span from the boxes' `median` values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `notchspan` is not provided but a sample (in `y` or `x`) is set,","we compute it as 1.57 * IQR / sqrt(N),","where N is the sample size."].join(" ")},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc",description:["If *outliers*, only the sample points lying outside the whiskers","are shown","If *suspectedoutliers*, the outlier points are shown and","points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1","are highlighted (see `outliercolor`)","If *all*, all sample points are shown","If *false*, only the box(es) are shown with no sample points","Defaults to *suspectedoutliers* when `marker.outliercolor` or","`marker.line.outliercolor` is set.","Defaults to *all* under the q1/median/q3 signature.","Otherwise defaults to *outliers*."].join(" ")},jitter:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the amount of jitter in the sample points drawn.","If *0*, the sample points align along the distribution axis.","If *1*, the sample points are drawn in a random jitter of width","equal to the width of the box(es)."].join(" ")},pointpos:{valType:"number",min:-2,max:2,editType:"calc",description:["Sets the position of the sample points in relation to the box(es).","If *0*, the sample points are places over the center of the box(es).","Positive (negative) values correspond to positions to the","right (left) for vertical boxes and above (below) for horizontal boxes"].join(" ")},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1,description:["Scales the box size when sizemode=sd","Allowing boxes to be drawn across any stddev range","For example 1-stddev, 3-stddev, 5-stddev"].join(" ")},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles",description:["Sets the upper and lower bound for the boxes","quartiles means box is drawn between Q1 and Q3","SD means the box is drawn between Mean +- Standard Deviation","Argument sdmultiple (default 1) to scale the box size","So it could be drawn 1-stddev, 3-stddev etc"].join(" ")},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc",description:["If *true*, the mean of the box(es)' underlying distribution is","drawn as a dashed line inside the box(es).","If *sd* the standard deviation is also drawn.","Defaults to *true* when `mean` is set.","Defaults to *sd* when `sd` is set","Otherwise defaults to *false*."].join(" ")},mean:{valType:"data_array",editType:"calc",description:["Sets the mean values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `mean` is not provided but a sample (in `y` or `x`) is set,","we compute the mean for each box using the sample values."].join(" ")},sd:{valType:"data_array",editType:"calc",description:["Sets the standard deviation values.","There should be as many items as the number of boxes desired.","This attribute has effect only under the q1/median/q3 signature.","If `sd` is not provided but a sample (in `y` or `x`) is set,","we compute the standard deviation for each box using the sample values."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the box(es).","If *v* (*h*), the distribution is visualized along","the vertical (horizontal)."].join(" ")},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc",description:["Sets the method used to compute the sample's Q1 and Q3 quartiles.","The *linear* method uses the 25th percentile for Q1 and 75th percentile for Q3","as computed using method #10 (listed on http://jse.amstat.org/v14n3/langford.html).","The *exclusive* method uses the median to divide the ordered dataset into two halves","if the sample is odd, it does not include the median in either half -","Q1 is then the median of the lower half and","Q3 the median of the upper half.","The *inclusive* method also uses the median to divide the ordered dataset into two halves","but if the sample is odd, it includes the median in both halves -","Q1 is then the median of the lower half and","Q3 the median of the upper half."].join(" ")},width:{valType:"number",min:0,dflt:0,editType:"calc",description:["Sets the width of the box in data coordinate","If *0* (default value) the width is automatically selected based on the positions","of other box traces in the same subplot."].join(" ")},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style",description:"Sets the color of the outlier sample points."},symbol:l({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},c.angle,{arrayOk:!1,editType:"calc"}),size:l({},c.size,{arrayOk:!1,editType:"calc"}),color:l({},c.color,{arrayOk:!1,editType:"style"}),line:{color:l({},u.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:l({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style",description:["Sets the border line color of the outlier sample points.","Defaults to marker.color"].join(" ")},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style",description:["Sets the border line width (in px) of the outlier sample points."].join(" ")},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style",description:"Sets the color of line bounding the box(es)."},width:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the width (in px) of line bounding the box(es)."},editType:"plot"},fillcolor:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc",description:["Sets the width of the whiskers relative to","the box' width.","For example, with 1, the whiskers are as wide as the box(es)."].join(" ")},showwhiskers:{valType:"boolean",editType:"calc",description:["Determines whether or not whiskers are visible.","Defaults to true for `sizemode` *quartiles*, false for *sd*."].join(" ")},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:l({},n.text,{description:["Sets the text elements associated with each sample value.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertext:l({},n.hovertext,{description:"Same as `text`."}),hovertemplate:s({description:["N.B. This only has an effect when hovering on points."].join(" ")}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style",description:["Do the hover effects highlight individual boxes ","or sample points or both?"].join(" ")}}},90497:(e,t,r)=>{"use strict";var n=r(51908),i=r(28605),o=r(64594),a=r(53787),s=r(24956).BADNUM,l=a._;e.exports=function(e,t){var r,c,y,x,b,w,_,k=e._fullLayout,S=i.getFromId(e,t.xaxis||"x"),T=i.getFromId(e,t.yaxis||"y"),M=[],C="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(y=S,x="x",b=T,w="y",_=!!t.yperiodalignment):(y=T,x="y",b=S,w="x",_=!!t.xperiodalignment);var A,E,I,O,P,R,L=function(e,t,r,i){var s,l=t in e,c=t+"0"in e,u="d"+t in e;if(l||c&&u){var d=r.makeCalcdata(e,t);return[o(e,r,t,d).vals,d]}s=c?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(e.name)&&"date"===r.type)?e.name:i;for(var f="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]),h=e._length,p=new Array(h),m=0;mA.uf};if(t._hasPreCompStats){var Z=t[x],U=function(e){return y.d2c((t[e]||[])[r])},V=1/0,H=-1/0;for(r=0;r=A.q1&&A.q3>=A.med){var G=U("lowerfence");A.lf=G!==s&&G<=A.q1?G:h(A,I,O);var q=U("upperfence");A.uf=q!==s&&q>=A.q3?q:p(A,I,O);var Y=U("mean");A.mean=Y!==s?Y:O?a.mean(I,O):(A.q1+A.q3)/2;var X=U("sd");A.sd=Y!==s&&X>=0?X:O?a.stdev(I,O,A.mean):A.q3-A.q1,A.lo=m(A),A.uo=g(A);var K=U("notchspan");K=K!==s&&K>0?K:v(A,O),A.ln=A.med-K,A.un=A.med+K;var $=A.lf,J=A.uf;t.boxpoints&&I.length&&($=Math.min($,I[0]),J=Math.max(J,I[O-1])),t.notched&&($=Math.min($,A.ln),J=Math.max(J,A.un)),A.min=$,A.max=J}else{var Q;a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+A.q1,"median = "+A.med,"q3 = "+A.q3].join("\n")),Q=A.med!==s?A.med:A.q1!==s?A.q3!==s?(A.q1+A.q3)/2:A.q1:A.q3!==s?A.q3:0,A.med=Q,A.q1=A.q3=Q,A.lf=A.uf=Q,A.mean=A.sd=Q,A.ln=A.un=Q,A.min=A.max=Q}V=Math.min(V,A.min),H=Math.max(H,A.max),A.pts2=E.filter(B),M.push(A)}}t._extremes[y._id]=i.findExtremes(y,[V,H],{padded:!0})}else{var ee=y.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ue,de;if((A={}).pos=A[w]=N[r],E=A.pts=ne[r].sort(d),O=(I=A[x]=E.map(f)).length,A.min=I[0],A.max=I[O-1],A.mean=a.mean(I,O),A.sd=a.stdev(I,O,A.mean)*t.sdmultiple,A.med=a.interp(I,.5),O%2&&(le||ce))le?(ue=I.slice(0,O/2),de=I.slice(O/2+1)):ce&&(ue=I.slice(0,O/2+1),de=I.slice(O/2)),A.q1=a.interp(ue,.5),A.q3=a.interp(de,.5);else A.q1=a.interp(I,.25),A.q3=a.interp(I,.75);A.lf=h(A,I,O),A.uf=p(A,I,O),A.lo=m(A),A.uo=g(A);var fe=v(A,O);A.ln=A.med-fe,A.un=A.med+fe,oe=Math.min(oe,A.ln),ae=Math.max(ae,A.un),A.pts2=E.filter(B),M.push(A)}t._extremes[y._id]=i.findExtremes(y,t.notched?ee.concat([oe,ae]):ee,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:k[C],dPos:F,posLetter:w,valLetter:x,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?l(e,"mean \xb1 \u03c3:").replace("\u03c3",1===t.sdmultiple?"\u03c3":t.sdmultiple+"\u03c3"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},k[C]++,M):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(e,t,r){for(var n in c)a.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[n][r[0]])&&(e[c[n]]=t[n][r[0]][r[1]]):e[c[n]]=t[n][r])}function d(e,t){return e.v-t.v}function f(e){return e.v}function h(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function p(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function m(e){return 4*e.q1-3*e.q3}function g(e){return 4*e.q3-3*e.q1}function v(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},27203:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(14511).getAxisGroup,a=["v","h"];function s(e,t,r,a){var s,l,c,u=t.calcdata,d=t._fullLayout,f=a._id,h=f.charAt(0),p=[],m=0;for(s=0;s1,b=1-d[e+"gap"],w=1-d[e+"groupgap"];for(s=0;s0){var H=A.pointpos,W=A.jitter,G=A.marker.size/2,q=0;H+W>=0&&((q=U*(H+W))>M?(V=!0,B=G,N=q):q>D&&(B=G,N=M)),q<=M&&(N=M);var Y=0;H-W<=0&&((Y=-U*(H-W))>C?(V=!0,Z=G,F=Y):Y>z&&(Z=G,F=C)),Y<=C&&(F=C)}else N=M,F=C;var X=new Array(c.length);for(l=0;l{"use strict";var n=r(53787),i=r(44049),o=r(66235),a=r(17239),s=r(25305),l=r(36562),c=r(94837);function u(e,t,r,o){function a(e){var t=0;return e&&e.length&&(t+=1,n.isArrayOrTypedArray(e[0])&&e[0].length&&(t+=1)),t}function s(t){return n.validate(e[t],c[t])}var u,d=r("y"),f=r("x");if("box"===t.type){var h=r("q1"),p=r("median"),m=r("q3");t._hasPreCompStats=h&&h.length&&p&&p.length&&m&&m.length,u=Math.min(n.minRowLength(h),n.minRowLength(p),n.minRowLength(m))}var g,v,y=a(d),x=a(f),b=y&&n.minRowLength(d),w=x&&n.minRowLength(f),_=o.calendar,k={autotypenumbers:o.autotypenumbers};if(t._hasPreCompStats)switch(String(x)+String(y)){case"00":var S=s("x0")||s("dx");g=(s("y0")||s("dy"))&&!S?"h":"v",v=u;break;case"10":g="v",v=Math.min(u,w);break;case"20":g="h",v=Math.min(u,f.length);break;case"01":g="h",v=Math.min(u,b);break;case"02":g="v",v=Math.min(u,d.length);break;case"12":g="v",v=Math.min(u,w,d.length);break;case"21":g="h",v=Math.min(u,f.length,b);break;case"11":v=0;break;case"22":var T,M=!1;for(T=0;T0?(g="v",v=x>0?Math.min(w,b):Math.min(b)):x>0?(g="h",v=Math.min(w)):v=0;if(v){t._length=v;var C=r("orientation",g);t._hasPreCompStats?"v"===C&&0===x?(r("x0",0),r("dx",1)):"h"===C&&0===y&&(r("y0",0),r("dy",1)):"v"===C&&0===x?r("x0"):"h"===C&&0===y&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o)}else t.visible=!1}function d(e,t,r,i){var o=i.prefix,a=n.coerce2(e,t,c,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(a||s)&&(l="suspectedoutliers");var u=r(o+"points",l);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",t.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 t.marker;var d=r("hoveron");"all"!==d&&-1===d.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}e.exports={supplyDefaults:function(e,t,r,i){function s(r,i){return n.coerce(e,t,c,r,i)}if(u(e,t,s,i),!1!==t.visible){a(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||r),s("line.width"),s("fillcolor",o.addOpacity(t.line.color,.5));var f=!1;if(l){var h=s("mean"),p=s("sd");h&&h.length&&(f=!0,p&&p.length&&(f="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",f)),s("showwhiskers","quartiles"===g),"sd"!==g&&"sd"!==m||s("sdmultiple"),s("width"),s("quartilemethod");var v=!1;if(l){var y=s("notchspan");y&&y.length&&(v=!0)}else n.validate(e.notchwidth,c.notchwidth)&&(v=!0);s("notched",v)&&s("notchwidth"),d(e,t,s,{prefix:"box"})}},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,c,e)}for(var a=0;a{"use strict";e.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},86333:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(76719),a=r(66235),s=i.fillText;function l(e,t,r,s){var l,c,u,d,f,h,p,m,g,v,y,x,b,w,_=e.cd,k=e.xa,S=e.ya,T=_[0].trace,M=_[0].t,C="violin"===T.type,A=M.bdPos,E=M.wHover,I=function(e){return u.c2l(e.pos)+M.bPos-u.c2l(h)};C&&"both"!==T.side?("positive"===T.side&&(g=function(e){var t=I(e);return o.inbox(t,t+E,v)},x=A,b=0),"negative"===T.side&&(g=function(e){var t=I(e);return o.inbox(t-E,t,v)},x=0,b=A)):(g=function(e){var t=I(e);return o.inbox(t-E,t+E,v)},x=b=A),w=C?function(e){return o.inbox(e.span[0]-f,e.span[1]-f,v)}:function(e){return o.inbox(e.min-f,e.max-f,v)},"h"===T.orientation?(f=t,h=r,p=w,m=g,l="y",u=S,c="x",d=k):(f=r,h=t,p=g,m=w,l="x",u=k,c="y",d=S);var O=Math.min(1,A/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(p(e)+m(e))/2}v=e.maxHoverDistance-O,y=e.maxSpikeDistance-O;var R=o.getDistanceFunction(s,p,m,P);if(o.getClosest(_,R,e),!1===e.index)return[];var L=_[e.index],j=T.line.color,D=(T.marker||{}).color;a.opacity(j)&&T.line.width?e.color=j:a.opacity(D)&&T.boxpoints?e.color=D:e.color=T.fillcolor,e[l+"0"]=u.c2p(L.pos+M.bPos-b,!0),e[l+"1"]=u.c2p(L.pos+M.bPos+x,!0),e[l+"LabelVal"]=void 0!==L.orig_p?L.orig_p:L.pos;var z=l+"Spike";e.spikeDistance=P(L)*y/v,e[z]=u.c2p(L.pos,!0);var N=T.boxmean||"sd"===T.sizemode||(T.meanline||{}).visible,F=T.boxpoints||T.points,B=F&&N?["max","uf","q3","med","mean","q1","lf","min"]:F&&!N?["max","uf","q3","med","q1","lf","min"]:!F&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],Z=d.range[1]{"use strict";e.exports={attributes:r(94837),layoutAttributes:r(56335),supplyDefaults:r(5580).supplyDefaults,crossTraceDefaults:r(5580).crossTraceDefaults,supplyLayoutDefaults:r(65235).supplyLayoutDefaults,calc:r(90497),crossTraceCalc:r(27203).crossTraceCalc,plot:r(96710).plot,style:r(90714).style,styleOnSelect:r(90714).styleOnSelect,hoverPoints:r(86333).hoverPoints,eventData:r(89202),selectPoints:r(1118),moduleType:"trace",name:"box",basePlotModule:r(48206),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{description:["Each box spans from quartile 1 (Q1) to quartile 3 (Q3).","The second quartile (Q2, i.e. the median) is marked by a line inside the box.","The fences grow outward from the boxes' edges,","by default they span +/- 1.5 times the interquartile range (IQR: Q3-Q1),","The sample mean and standard deviation as well as notches and","the sample, outlier and suspected outliers points can be optionally","added to the box plot.","The values and positions corresponding to each boxes can be input","using two signatures.","The first signature expects users to supply the sample values in the `y`","data array for vertical boxes (`x` for horizontal boxes).","By supplying an `x` (`y`) array, one box per distinct `x` (`y`) value is drawn","If no `x` (`y`) {array} is provided, a single box is drawn.","In this case, the box is positioned with the trace `name` or with `x0` (`y0`) if provided.","The second signature expects users to supply the boxes corresponding Q1, median and Q3","statistics in the `q1`, `median` and `q3` data arrays respectively.","Other box features relying on statistics namely `lowerfence`, `upperfence`, `notchspan`","can be set directly by the users.","To have plotly compute them or to show sample points besides the boxes,","users can set the `y` data array for vertical boxes (`x` for horizontal boxes)","to a 2D array with the outer length corresponding","to the number of boxes in the traces and the inner length corresponding the sample size."].join(" ")}}},56335:e=>{"use strict";e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how boxes at the same location coordinate","are displayed on the graph.","If *group*, the boxes are plotted next to one another","centered around the shared location.","If *overlay*, the boxes are plotted over one another,","you might need to set *opacity* to see them multiple boxes.","Has no effect on traces that have *width* set."].join(" ")},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc",description:["Sets the gap (in plot fraction) between boxes of","adjacent location coordinates.","Has no effect on traces that have *width* set."].join(" ")},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc",description:["Sets the gap (in plot fraction) between boxes of","the same location coordinate.","Has no effect on traces that have *width* set."].join(" ")}}},65235:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(56335);function a(e,t,r,i,o){for(var a=o+"Layout",s=!1,l=0;l{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=5,s=.01;function l(e,t,r,o,a){var s,l,c="h"===r.orientation,u=t.val,d=t.pos,f=!!d.rangebreaks,h=o.bPos,p=o.wdPos||0,m=o.bPosPxOffset||0,g=r.whiskerwidth||0,v=!1!==r.showwhiskers,y=r.notched||!1,x=y?1-2*r.notchwidth:1;Array.isArray(o.bdPos)?(s=o.bdPos[0],l=o.bdPos[1]):(s=o.bdPos,l=o.bdPos);var b=e.selectAll("path.box").data("violin"!==r.type||r.box.visible?i.identity:[]);b.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each((function(e){if(e.empty)return n.select(this).attr("d","M0,0Z");var t=d.c2l(e.pos+h,!0),o=d.l2p(t-s)+m,a=d.l2p(t+l)+m,b=f?(o+a)/2:d.l2p(t)+m,w=r.whiskerwidth,_=f?o*w+(1-w)*b:d.l2p(t-p)+m,k=f?a*w+(1-w)*b:d.l2p(t+p)+m,S=d.l2p(t-s*x)+m,T=d.l2p(t+l*x)+m,M="sd"===r.sizemode,C=u.c2p(M?e.mean-e.sd:e.q1,!0),A=M?u.c2p(e.mean+e.sd,!0):u.c2p(e.q3,!0),E=i.constrain(M?u.c2p(e.mean,!0):u.c2p(e.med,!0),Math.min(C,A)+1,Math.max(C,A)-1),I=void 0===e.lf||!1===r.boxpoints||M,O=u.c2p(I?e.min:e.lf,!0),P=u.c2p(I?e.max:e.uf,!0),R=u.c2p(e.ln,!0),L=u.c2p(e.un,!0);c?n.select(this).attr("d","M"+E+","+S+"V"+T+"M"+C+","+o+"V"+a+(y?"H"+R+"L"+E+","+T+"L"+L+","+a:"")+"H"+A+"V"+o+(y?"H"+L+"L"+E+","+S+"L"+R+","+o:"")+"Z"+(v?"M"+C+","+b+"H"+O+"M"+A+","+b+"H"+P+(0===g?"":"M"+O+","+_+"V"+k+"M"+P+","+_+"V"+k):"")):n.select(this).attr("d","M"+S+","+E+"H"+T+"M"+o+","+C+"H"+a+(y?"V"+R+"L"+T+","+E+"L"+a+","+L:"")+"V"+A+"H"+o+(y?"V"+L+"L"+S+","+E+"L"+o+","+R:"")+"Z"+(v?"M"+b+","+C+"V"+O+"M"+b+","+A+"V"+P+(0===g?"":"M"+_+","+O+"H"+k+"M"+_+","+P+"H"+k):""))}))}function c(e,t,r,n){var l=t.x,c=t.y,u=n.bdPos,d=n.bPos,f=r.boxpoints||r.points;i.seedPseudoRandom();var h=e.selectAll("g.points").data(f?function(e){return e.forEach((function(e){e.t=n,e.trace=r})),e}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var p=h.selectAll("path").data((function(e){var t,n,o=e.pts2,l=Math.max((e.max-e.min)/10,e.q3-e.q1),c=1e-9*l,h=l*s,p=[],m=0;if(r.jitter){if(0===l)for(m=1,p=new Array(o.length),t=0;te.lo&&(w.so=!0)}return o}));p.enter().append("path").classed("point",!0),p.exit().remove(),p.call(o.translatePoints,l,c)}function u(e,t,r,o){var a,s,l=t.val,c=t.pos,u=!!c.rangebreaks,d=o.bPos,f=o.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(o.bdPos)?(a=o.bdPos[0],s=o.bdPos[1]):(a=o.bdPos,s=o.bdPos);var p=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=c.c2l(e.pos+d,!0),i=c.l2p(t-a)+f,o=c.l2p(t+s)+f,p=u?(i+o)/2:c.l2p(t)+f,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),v=l.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+m+","+i+"V"+o+("sd"===h?"m0,0L"+g+","+p+"L"+m+","+i+"L"+v+","+p+"Z":"")):n.select(this).attr("d","M"+i+","+m+"H"+o+("sd"===h?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+v+"Z":""))}))}e.exports={plot:function(e,t,r,o){var a=e._context.staticPlot,s=t.xaxis,d=t.yaxis;i.makeTraceGroups(o,r,"trace boxes").each((function(e){var t,r,i=n.select(this),o=e[0],f=o.t,h=o.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():("h"===h.orientation?(t=d,r=s):(t=s,r=d),l(i,{pos:t,val:r},h,f,a),c(i,{x:s,y:d},h,f),u(i,{pos:t,val:r},h,f))}))},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},1118:e=>{"use strict";e.exports=function(e,t){var r,n,i=e.cd,o=e.xaxis,a=e.yaxis,s=[];if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(50973);e.exports={style:function(e,t,r){var a=r||n.select(e).selectAll("g.trace.boxes");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(t){var r=n.select(this),a=t[0].trace,s=a.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(i.stroke,r).call(i.fill,n)}var c=r.selectAll("path.box");if("candlestick"===a.type)c.each((function(e){if(!e.empty){var t=n.select(this),r=a[e.dir];l(t,r.line.width,r.line.color,r.fillcolor),t.style("opacity",a.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,a.line.color,a.fillcolor),r.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,a.line.color);var u=r.selectAll("path.point");o.pointStyle(u,a,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?o.selectedPointStyle(i,n):o.pointStyle(i,n,e)}}},68643:(e,t,r)=>{"use strict";var n=r(53787).extendFlat,i=r(89849).axisHoverFormat,o=r(94962),a=r(94837);function s(e){return{line:{color:n({},a.line.color,{dflt:e}),width:a.line.width,editType:"style"},fillcolor:a.fillcolor,editType:"style"}}e.exports={xperiod:o.xperiod,xperiod0:o.xperiod0,xperiodalignment:o.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:o.x,open:o.open,high:o.high,low:o.low,close:o.close,line:{width:n({},a.line.width,{description:[a.line.width.description,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),editType:"style"},increasing:s(o.increasing.line.color.dflt),decreasing:s(o.decreasing.line.color.dflt),text:o.text,hovertext:o.hovertext,whiskerwidth:n({},a.whiskerwidth,{dflt:0}),hoverlabel:o.hoverlabel}},62866:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(64594),a=r(16707).calcCommon;function s(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}e.exports=function(e,t){var r=e._fullLayout,l=i.getFromId(e,t.xaxis),c=i.getFromId(e,t.yaxis),u=l.makeCalcdata(t,"x"),d=o(t,l,"x",u).vals,f=a(e,t,u,d,c,s);return f.length?(n.extendFlat(f[0].t,{num:r._numBoxes,dPos:n.distinctVals(d).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,f):[{t:{empty:!0}}]}},50080:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(87160),a=r(17239),s=r(68643);function l(e,t,r,n){var o=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",i.addOpacity(o,.5))}e.exports=function(e,t,r,i){function c(r,i){return n.coerce(e,t,s,r,i)}o(e,t,c,i)?(a(e,t,i,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),l(e,t,c,"increasing"),l(e,t,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),i._requestRangeslider[t.xaxis]=!0):t.visible=!1}},92829:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"candlestick",basePlotModule:r(48206),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{description:["The candlestick is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The boxes represent the spread between the `open` and `close` values and","the lines represent the spread between the `low` and `high` values","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing candles are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:r(68643),layoutAttributes:r(56335),supplyLayoutDefaults:r(65235).supplyLayoutDefaults,crossTraceCalc:r(27203).crossTraceCalc,supplyDefaults:r(50080),calc:r(62866),plot:r(96710).plot,layerName:"boxlayer",style:r(90714).style,hoverPoints:r(90934).hoverPoints,selectPoints:r(98274)}},47379:(e,t,r)=>{"use strict";var n=r(60373),i=r(99862);e.exports=function(e,t,r,o,a){o("a")||(o("da"),o("a0")),o("b")||(o("db"),o("b0")),function(e,t,r,o){["aaxis","baxis"].forEach((function(a){var s=a.charAt(0),l=e[a]||{},c=i.newContainer(t,a),u={noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:t.font,name:a,data:e[s],calendar:t.calendar,dfltColor:o,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};n(l,c,u),c._categories=c._categories||[],e[a]||"-"===l.type||(e[a]={type:l.type})}))}(e,t,r,a)}},91195:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;function i(e,t){if(!n(e)||t>=10)return null;for(var r=1/0,o=-1/0,a=e.length,s=0;s{"use strict";var n=r(92948),i=r(15732),o=r(18022),a=n({editType:"calc",description:"The default font used for axis & tick labels on this carpet"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=o.defaultLine,e.exports={carpet:{valType:"string",editType:"calc",description:["An identifier for this carpet, so that `scattercarpet` and","`contourcarpet` traces can specify a carpet plot on which","they lie"].join(" ")},x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["A two dimensional array of x coordinates at each carpet point.","If omitted, the plot is a cheater plot and the xaxis is hidden","by default."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:"A two dimensional array of y coordinates at each carpet point."},a:{valType:"data_array",editType:"calc",description:["An array containing values of the first parameter value"].join(" ")},a0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `a`.","Builds a linear space of a coordinates.","Use with `da`","where `a0` is the starting coordinate and `da` the step."].join(" ")},da:{valType:"number",dflt:1,editType:"calc",description:["Sets the a coordinate step.","See `a0` for more info."].join(" ")},b:{valType:"data_array",editType:"calc",description:"A two dimensional array of y coordinates at each carpet point."},b0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `b`.","Builds a linear space of a coordinates.","Use with `db`","where `b0` is the starting coordinate and `db` the step."].join(" ")},db:{valType:"number",dflt:1,editType:"calc",description:["Sets the b coordinate step.","See `b0` for more info."].join(" ")},cheaterslope:{valType:"number",dflt:1,editType:"calc",description:["The shift applied to each successive row of data in creating a cheater plot.","Only used if `x` is been omitted."].join(" ")},aaxis:i,baxis:i,font:a,color:{valType:"color",dflt:o.defaultLine,editType:"plot",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},transforms:void 0}},97639:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,i){var o,a,s,l,c,u,d,f,h,p,m,g,v,y=n(r)?"a":"b",x=("a"===y?e.aaxis:e.baxis).smoothing,b="a"===y?e.a2i:e.b2j,w="a"===y?r:i,_="a"===y?i:r,k="a"===y?t.a.length:t.b.length,S="a"===y?t.b.length:t.a.length,T=Math.floor("a"===y?e.b2j(_):e.a2i(_)),M="a"===y?function(t){return e.evalxy([],t,T)}:function(t){return e.evalxy([],T,t)};x&&(s=Math.max(0,Math.min(S-2,T)),l=T-s,a="a"===y?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var C=b(w[0]),A=b(w[1]),E=C0?Math.floor:Math.ceil,P=E>0?Math.ceil:Math.floor,R=E>0?Math.min:Math.max,L=E>0?Math.max:Math.min,j=O(C+I),D=P(A-I),z=[[d=M(C)]];for(o=j;o*E{"use strict";var n=r(92948),i=r(18022),o=r(45446),a=r(89849).descriptionWithDates,s=r(18693).overrideAll,l=r(93701).P,c=r(10191).extendFlat;e.exports={color:{valType:"color",editType:"calc",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:n({editType:"calc",description:["Sets this axis' title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),offset:{valType:"number",dflt:10,editType:"calc",description:["An additional amount by which to offset the title from the tick","labels, given in pixels.","Note that this used to be set","by the now deprecated `titleoffset` attribute."].join(" ")},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc",description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:o.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc",description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data."].join(" ")},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},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",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")},tickvals:{valType:"data_array",editType:"calc",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},ticktext:{valType:"data_array",editType:"calc",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc",description:["Determines whether axis labels are drawn on the low side,","the high side, both, or neither side of the axis."].join(" ")},labelalias:c({},o.labelalias,{editType:"calc"}),tickfont:n({editType:"calc",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"calc",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"calc",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"calc",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"calc",description:["Hide SI prefix for 10^n if |n| is below this number"].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"calc",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"calc",description:a("tick label")},tickformatstops:s(o.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},labelpadding:{valType:"integer",dflt:10,editType:"calc",description:"Extra padding between label and the axis"},labelprefix:{valType:"string",editType:"calc",description:"Sets a axis label prefix."},labelsuffix:{valType:"string",dflt:"",editType:"calc",description:"Sets a axis label suffix."},showline:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:i.defaultLine,editType:"calc",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the axis line."},gridcolor:{valType:"color",editType:"calc",description:"Sets the axis line color."},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the axis line."},griddash:c({},l,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc",description:"Sets the number of minor grid ticks per major grid tick"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc",description:"Sets the width (in px) of the grid lines."},minorgriddash:c({},l,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:i.lightLine,editType:"calc",description:"Sets the color of the grid lines."},startline:{valType:"boolean",editType:"calc",description:["Determines whether or not a line is drawn at along the starting value","of this axis.","If *true*, the start line is drawn on top of the grid lines."].join(" ")},startlinecolor:{valType:"color",editType:"calc",description:"Sets the line color of the start line."},startlinewidth:{valType:"number",dflt:1,editType:"calc",description:"Sets the width (in px) of the start line."},endline:{valType:"boolean",editType:"calc",description:["Determines whether or not a line is drawn at along the final value","of this axis.","If *true*, the end line is drawn on top of the grid lines."].join(" ")},endlinewidth:{valType:"number",dflt:1,editType:"calc",description:"Sets the width (in px) of the end line."},endlinecolor:{valType:"color",editType:"calc",description:"Sets the line color of the end line."},tick0:{valType:"number",min:0,dflt:0,editType:"calc",description:"The starting index of grid lines along the axis"},dtick:{valType:"number",min:0,dflt:1,editType:"calc",description:"The stride between grid lines along the axis"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc",description:"The starting index of grid lines along the axis"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc",description:"The stride between grid lines along the axis"},_deprecated:{title:{valType:"string",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:n({editType:"calc",description:"Deprecated in favor of `title.font`."}),titleoffset:{valType:"number",dflt:10,editType:"calc",description:"Deprecated in favor of `title.offset`."}},editType:"calc"}},60373:(e,t,r)=>{"use strict";var n=r(24451),i=r(66235).addOpacity,o=r(44049),a=r(53787),s=r(96592),l=r(46139),c=r(33095),u=r(29550),d=r(4738),f=r(36562);e.exports=function(e,t,r){var h=r.letter,p=r.font||{},m=n[h+"axis"];function g(r,n){return a.coerce(e,t,m,r,n)}function v(r,n){return a.coerce2(e,t,m,r,n)}r.name&&(t._name=r.name,t._id=r.name),g("autotypenumbers",r.autotypenumbersDflt);var y=g("type");("-"===y&&(r.data&&function(e,t){if("-"!==e.type)return;var r=e._id.charAt(0),n=e[r+"calendar"];e.type=f(t,n,{autotypenumbers:e.autotypenumbers})}(t,r.data),"-"===t.type?t.type="linear":y=e.type=t.type),g("smoothing"),g("cheatertype"),g("showticklabels"),g("labelprefix",h+" = "),g("labelsuffix"),g("showtickprefix"),g("showticksuffix"),g("separatethousands"),g("tickformat"),g("exponentformat"),g("minexponent"),g("showexponent"),g("categoryorder"),g("tickmode"),g("tickvals"),g("ticktext"),g("tick0"),g("dtick"),"array"===t.tickmode&&(g("arraytick0"),g("arraydtick")),g("labelpadding"),t._hovertitle=h,"date"===y)&&o.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",r.calendar);d(t,r.fullLayout),t.c2p=a.identity;var x=g("color",r.dfltColor),b=x===e.color?x:p.color;g("title.text")&&(a.coerceFont(g,"title.font",{family:p.family,size:a.bigFont(p.size),color:b}),g("title.offset")),g("tickangle"),g("autorange",!t.isValidRange(e.range))&&g("rangemode"),g("range"),t.cleanRange(),g("fixedrange"),s(e,t,g,y),c(e,t,g,y,r),l(e,t,g,y,r),u(e,t,g,{data:r.data,dataAttr:h});var w=v("gridcolor",i(x,.3)),_=v("gridwidth"),k=v("griddash"),S=g("showgrid");S||(delete t.gridcolor,delete t.gridwidth,delete t.griddash);var T=v("startlinecolor",x),M=v("startlinewidth",_);g("startline",t.showgrid||!!T||!!M)||(delete t.startlinecolor,delete t.startlinewidth);var C=v("endlinecolor",x),A=v("endlinewidth",_);return g("endline",t.showgrid||!!C||!!A)||(delete t.endlinecolor,delete t.endlinewidth),S?(g("minorgridcount"),g("minorgridwidth",_),g("minorgriddash",k),g("minorgridcolor",i(w,.06)),t.minorgridcount||(delete t.minorgridwidth,delete t.minorgriddash,delete t.minorgridcolor)):(delete t.gridcolor,delete t.gridwidth,delete t.griddash),"none"===t.showticklabels&&(delete t.tickfont,delete t.tickangle,delete t.showexponent,delete t.exponentformat,delete t.minexponent,delete t.tickformat,delete t.showticksuffix,delete t.showtickprefix),t.showticksuffix||delete t.ticksuffix,t.showtickprefix||delete t.tickprefix,g("tickmode"),t}},23897:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787).isArray1D,o=r(74957),a=r(91195),s=r(14237),l=r(5546),c=r(7287),u=r(48854),d=r(32676),f=r(84446),h=r(55953);e.exports=function(e,t){var r=n.getFromId(e,t.xaxis),p=n.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,v=t.x,y=t.y,x=[];v&&i(v)&&x.push("x"),y&&i(y)&&x.push("y"),x.length&&f(t,m,g,"a","b",x);var b=t._a=t._a||t.a,w=t._b=t._b||t.b;v=t._x||t.x,y=t._y||t.y;var _={};if(t._cheater){var k="index"===m.cheatertype?b.length:b,S="index"===g.cheatertype?w.length:w;v=o(k,S,t.cheaterslope)}t._x=v=u(v),t._y=y=u(y),d(v,b,w),d(y,b,w),h(t),t.setScale();var T=a(v),M=a(y),C=.5*(T[1]-T[0]),A=.5*(T[1]+T[0]),E=.5*(M[1]-M[0]),I=.5*(M[1]+M[0]),O=1.3;return T=[A-C*O,A+C*O],M=[I-E*O,I+E*O],t._extremes[r._id]=n.findExtremes(r,T,{padded:!0}),t._extremes[p._id]=n.findExtremes(p,M,{padded:!0}),s(t,"a","b"),s(t,"b","a"),l(t,m),l(t,g),_.clipsegments=c(t._xctrl,t._yctrl,m,g),_.x=v,_.y=y,_.a=b,_.b=w,[_]}},7287:e=>{"use strict";e.exports=function(e,t,r,n){var i,o,a,s=[],l=!!r.smoothing,c=!!n.smoothing,u=e[0].length-1,d=e.length-1;for(i=0,o=[],a=[];i<=u;i++)o[i]=e[0][i],a[i]=t[0][i];for(s.push({x:o,y:a,bicubic:l}),i=0,o=[],a=[];i<=d;i++)o[i]=e[i][u],a[i]=t[i][u];for(s.push({x:o,y:a,bicubic:c}),i=u,o=[],a=[];i>=0;i--)o[u-i]=e[d][i],a[u-i]=t[d][i];for(s.push({x:o,y:a,bicubic:l}),i=d,o=[],a=[];i>=0;i--)o[d-i]=e[i][0],a[d-i]=t[i][0];return s.push({x:o,y:a,bicubic:c}),s}},14237:(e,t,r)=>{"use strict";var n=r(28605),i=r(10191).extendFlat;e.exports=function(e,t,r){var o,a,s,l,c,u,d,f,h,p,m,g,v,y,x=e["_"+t],b=e[t+"axis"],w=b._gridlines=[],_=b._minorgridlines=[],k=b._boundarylines=[],S=e["_"+r],T=e[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=e._xctrl,C=e._yctrl,A=M[0].length,E=M.length,I=e._a.length,O=e._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function R(n){var i,o,a,s,l,c,u,d,h,p,m,g,v=[],y=[],x={};if("b"===t)for(o=e.b2j(n),a=Math.floor(Math.max(0,Math.min(O-2,o))),s=o-a,x.length=O,x.crossLength=I,x.xy=function(t){return e.evalxy([],t,o)},x.dxy=function(t,r){return e.dxydi([],t,a,r,s)},i=0;i0&&(h=e.dxydi([],i-1,a,0,s),v.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),p=e.dxydi([],i-1,a,1,s),v.push(d[0]-p[0]/3),y.push(d[1]-p[1]/3)),v.push(d[0]),y.push(d[1]),l=d;else for(i=e.a2i(n),c=Math.floor(Math.max(0,Math.min(I-2,i))),u=i-c,x.length=I,x.crossLength=O,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},o=0;o0&&(m=e.dxydj([],c,o-1,u,0),v.push(l[0]+m[0]/3),y.push(l[1]+m[1]/3),g=e.dxydj([],c,o-1,u,1),v.push(d[0]-g[0]/3),y.push(d[1]-g[1]/3)),v.push(d[0]),y.push(d[1]),l=d;return x.axisLetter=t,x.axis=b,x.crossAxis=T,x.value=n,x.constvar=r,x.index=f,x.x=v,x.y=y,x.smoothing=T.smoothing,x}function L(n){var i,o,a,s,l,c=[],u=[],d={};if(d.length=x.length,d.crossLength=S.length,"b"===t)for(a=Math.max(0,Math.min(O-2,n)),l=Math.min(1,Math.max(0,n-a)),d.xy=function(t){return e.evalxy([],t,n)},d.dxy=function(t,r){return e.dxydi([],t,a,r,l)},i=0;ix.length-1||w.push(i(L(a),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u;fx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],v=x[m],o=0;ox[x.length-1]||_.push(i(R(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(L(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(L(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(e,t){return e-t})))[0],d=c[1],f=u;f<=d;f++)h=b.tick0+b.dtick*f,w.push(i(R(h),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u-1;fx[x.length-1]||_.push(i(R(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(i(R(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(i(R(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},5546:(e,t,r)=>{"use strict";var n=r(28605),i=r(10191).extendFlat;e.exports=function(e,t){var r,o,a,s=t._labels=[],l=t._gridlines;for(r=0;r{"use strict";e.exports=function(e,t,r,n){var i=e[0]-t[0],o=e[1]-t[1],a=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+o*o,.25),c=Math.pow(a*a+s*s,.25),u=(c*c*i-l*l*a)*n,d=(c*c*o-l*l*s)*n,f=c*(l+c)*3,h=l*(l+c)*3;return[[t[0]+(f&&u/f),t[1]+(f&&d/f)],[t[0]-(h&&u/h),t[1]-(h&&d/h)]]}},74957:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r){var i,o,a,s,l,c,u=[],d=n(e)?e.length:e,f=n(t)?t.length:t,h=n(e)?e:null,p=n(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(d-1)),p&&(s=(p.length-1)/(p[p.length-1]-p[0])/(f-1));var m=1/0,g=-1/0;for(o=0;o{"use strict";var n=r(62951),i=r(53787).ensureArray;function o(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}e.exports=function(e,t,r,a,s,l){var c,u,d,f,h,p,m,g,v,y,x=r[0].length,b=r.length,w=s?3*x-2:x,_=l?3*b-2:b;for(e=i(e,_),t=i(t,_),d=0;d<_;d++)e[d]=i(e[d],w),t[d]=i(t[d],w);for(u=0,f=0;u{"use strict";e.exports={RELATIVE_CULL_TOLERANCE:1e-6}},67623:e=>{"use strict";e.exports=function(e,t,r){return t&&r?function(t,r,n,i,o){var a,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var f=i*i,h=1-i,p=h*h,m=h*i*2,g=-3*p,v=3*(p-m),y=3*(m-f),x=3*f,b=o*o,w=b*o,_=1-o,k=_*_,S=k*_;for(d=0;d{"use strict";e.exports=function(e,t,r){return t&&r?function(t,r,n,i,o){var a,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var f=i*i,h=f*i,p=1-i,m=p*p,g=m*p,v=o*o,y=1-o,x=y*y,b=y*o*2,w=-3*x,_=3*(x-b),k=3*(b-v),S=3*v;for(d=0;d{"use strict";e.exports=function(e,t,r,n,i){var o=t-2,a=r-2;return n&&i?function(t,r,n){var i,s,l,c,u,d;t||(t=[]);var f=Math.max(0,Math.min(Math.floor(r),o)),h=Math.max(0,Math.min(Math.floor(n),a)),p=Math.max(0,Math.min(1,r-f)),m=Math.max(0,Math.min(1,n-h));f*=3,h*=3;var g=p*p,v=g*p,y=1-p,x=y*y,b=x*y,w=m*m,_=w*m,k=1-m,S=k*k,T=S*k;for(d=0;d{"use strict";var n=r(53787),i=r(36968),o=r(47379),a=r(24451),s=r(18022);e.exports=function(e,t,r,l){function c(r,i){return n.coerce(e,t,a,r,i)}t._clipPathId="clip"+t.uid+"carpet";var u=c("color",s.defaultLine);(n.coerceFont(c,"font"),c("carpet"),o(e,t,l,c,u),t.a&&t.b)?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),i(e,t,c)||(t.visible=!1),t._cheater&&c("cheaterslope")):t.visible=!1}},82315:(e,t,r)=>{"use strict";e.exports={attributes:r(24451),supplyDefaults:r(41055),plot:r(46132),calc:r(23897),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:r(48206),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{description:["The data describing carpet axis layout is set in `y` and (optionally)","also `x`. If only `y` is present, `x` the plot is interpreted as a","cheater plot and is filled in using the `y` values.","`x` and `y` may either be 2D arrays matching with each dimension matching","that of `a` and `b`, or they may be 1D arrays with total length equal to","that of `a` and `b`."].join(" ")}}},94624:e=>{"use strict";e.exports=function(e,t){for(var r,n=e._fullData.length,i=0;i{"use strict";e.exports=function(e,t,r){if(0===e.length)return"";var n,i=[],o=r?3:1;for(n=0;n{"use strict";var n=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r){var i;for(n(e)?e.length>t.length&&(e=e.slice(0,t.length)):e=[],i=0;i{"use strict";e.exports=function(e,t,r,n,i,o){var a=i[0]*e.dpdx(t),s=i[1]*e.dpdy(r),l=1,c=1;if(o){var u=Math.sqrt(i[0]*i[0]+i[1]*i[1]),d=Math.sqrt(o[0]*o[0]+o[1]*o[1]),f=(i[0]*o[0]+i[1]*o[1])/u/d;c=Math.max(0,f)}var h=180*Math.atan2(s,a)/Math.PI;return h<-90?(h+=180,l=-l):h>90&&(h-=180,l=-l),{angle:h,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}},46132:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(71596),a=r(20979),s=r(3332),l=r(98224),c=r(53787),u=c.strRotate,d=c.strTranslate,f=r(81653);function h(e,t,r,s,l,c,u){var d="const-"+l+"-lines",f=r.selectAll("."+d).data(c);f.enter().append("path").classed(d,!0).style("vector-effect",u?"none":"non-scaling-stroke"),f.each((function(r){var s=r,l=s.x,c=s.y,u=o([],l,e.c2p),d=o([],c,t.c2p),f="M"+a(u,d,s.smoothing);n.select(this).attr("d",f).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 p(e,t,r,o,a,c,f,h){var p=c.selectAll("text."+h).data(f);p.enter().append("text").classed(h,!0);var m=0,g={};return p.each((function(a,c){var f;if("auto"===a.axis.tickangle)f=s(o,t,r,a.xy,a.dxy);else{var h=(a.axis.tickangle+180)*Math.PI/180;f=s(o,t,r,a.xy,[Math.cos(h),Math.sin(h)])}c||(g={angle:f.angle,flip:f.flip});var p=(a.endAnchor?-1:1)*f.flip,v=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,a.font).text(a.text).call(l.convertToTspans,e),y=i.bBox(this);v.attr("transform",d(f.p[0],f.p[1])+u(f.angle)+d(a.axis.labelpadding*p,.3*y.height)),m=Math.max(m,y.width+a.axis.labelpadding)})),p.exit().remove(),g.maxExtent=m,g}e.exports=function(e,t,r,i){var l=e._context.staticPlot,u=t.xaxis,d=t.yaxis,f=e._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each((function(t){var r=n.select(this),i=t[0],m=i.trace,g=m.aaxis,y=m.baxis,x=c.ensureSingle(r,"g","minorlayer"),b=c.ensureSingle(r,"g","majorlayer"),w=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",m.opacity),h(u,d,b,g,"a",g._gridlines,!0),h(u,d,b,y,"b",y._gridlines,!0),h(u,d,x,g,"a",g._minorgridlines,!0),h(u,d,x,y,"b",y._minorgridlines,!0),h(u,d,w,g,"a-boundary",g._boundarylines,l),h(u,d,w,y,"b-boundary",y._boundarylines,l);var k=p(e,u,d,m,i,_,g._labels,"a-label"),S=p(e,u,d,m,i,_,y._labels,"b-label");!function(e,t,r,n,i,o,a,l){var u,d,f,h,p=c.aggNums(Math.min,null,r.a),m=c.aggNums(Math.max,null,r.a),g=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(p+m),d=g,f=r.ab2xy(u,d,!0),h=r.dxyda_rough(u,d),void 0===a.angle&&c.extendFlat(a,s(r,i,o,f,r.dxydb_rough(u,d)));v(e,t,r,n,f,h,r.aaxis,i,o,a,"a-title"),u=p,d=.5*(g+y),f=r.ab2xy(u,d,!0),h=r.dxydb_rough(u,d),void 0===l.angle&&c.extendFlat(l,s(r,i,o,f,r.dxyda_rough(u,d)));v(e,t,r,n,f,h,r.baxis,i,o,l,"b-title")}(e,_,m,i,u,d,k,S),function(e,t,r,n,i){var s,l,u,d,f=r.select("#"+e._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var h=c.ensureSingle(f,"path","carpetboundary"),p=t.clipsegments,m=[];for(d=0;d90&&y<270,b=n.select(this);b.text(f.title.text).call(l.convertToTspans,e),x&&(w=(-l.lineCount(b)+g)*m*o-w),b.attr("transform",d(t.p[0],t.p[1])+u(t.angle)+d(0,w)).attr("text-anchor","middle").call(i.font,f.title.font)})),b.exit().remove()}},55953:(e,t,r)=>{"use strict";var n=r(30385),i=r(56141).findBin,o=r(59616),a=r(48098),s=r(67623),l=r(65087);e.exports=function(e){var t=e._a,r=e._b,c=t.length,u=r.length,d=e.aaxis,f=e.baxis,h=t[0],p=t[c-1],m=r[0],g=r[u-1],v=t[t.length-1]-t[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;h-=x,p+=x,m-=b,g+=b,e.isVisible=function(e,t){return e>h&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,n=o(e._xctrl,e._yctrl,t,r,d.smoothing,f.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,d.smoothing,f.smoothing),e.dxydi=s([e._xctrl,e._yctrl],d.smoothing,f.smoothing),e.dxydj=l([e._xctrl,e._yctrl],d.smoothing,f.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),c-2)),n=t[r],o=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(o-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,r),u-2)),n=r[t],o=r[t+1];return Math.max(0,Math.min(u-1,t+(e-n)/(o-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,i,o){if(!o&&(nt[c-1]|ir[u-1]))return[!1,!1];var a=e.a2i(n),s=e.b2j(i),l=e.evalxy([],a,s);if(o){var d,f,h,p,m=0,g=0,v=[];nt[c-1]?(d=c-2,f=1,m=(n-t[c-1])/(t[c-1]-t[c-2])):f=a-(d=Math.max(0,Math.min(c-2,Math.floor(a)))),ir[u-1]?(h=u-2,p=1,g=(i-r[u-1])/(r[u-1]-r[u-2])):p=s-(h=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(e.dxydi(v,d,h,f,p),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(e.dxydj(v,d,h,f,p),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(r.length-2,e));return r[t+1]-r[t]},e.dxyda=function(t,r,n,i){var o=e.dxydi(null,t,r,n,i),a=e.dadi(t,n);return[o[0]/a,o[1]/a]},e.dxydb=function(t,r,n,i){var o=e.dxydj(null,t,r,n,i),a=e.dbdj(r,i);return[o[0]/a,o[1]/a]},e.dxyda_rough=function(t,r,n){var i=v*(n||.1),o=e.ab2xy(t+i,r,!0),a=e.ab2xy(t-i,r,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dxydb_rough=function(t,r,n){var i=y*(n||.1),o=e.ab2xy(t,r+i,!0),a=e.ab2xy(t,r-i,!0);return[.5*(o[0]-a[0])/i,.5*(o[1]-a[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},32676:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r){var i,o,a,s=[],l=[],c=e[0].length,u=e.length;function d(t,r){var n,i=0,o=0;return t>0&&void 0!==(n=e[r][t-1])&&(o++,i+=n),t0&&void 0!==(n=e[r-1][t])&&(o++,i+=n),r0&&o0&&i1e-5);return n.log("Smoother converged to",S,"after",T,"iterations"),e}},36968:(e,t,r)=>{"use strict";var n=r(53787).isArray1D;e.exports=function(e,t,r){var i=r("x"),o=i&&i.length,a=r("y"),s=a&&a.length;if(!o&&!s)return!1;if(t._cheater=!i,o&&!n(i)||s&&!n(a))t._length=null;else{var l=o?i.length:1/0;s&&(l=Math.min(l,a.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},41225:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(20958),o=r(8753),a=r(27231),s=r(18022).defaultLine,l=r(10191).extendFlat,c=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc",description:["Sets the coordinates via location IDs or names.","See `locationmode` for more info."].join(" ")},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc",description:"Sets the color values."},geojson:l({},i.geojson,{description:["Sets optional GeoJSON data associated with this trace.","If not given, the features on the base map are used.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")}),featureidkey:i.featureidkey,text:l({},i.text,{description:"Sets the text elements associated with each location."}),hovertext:l({},i.hovertext,{description:"Same as `text`."}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the locations."},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({},a.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},a.showlegend,{dflt:!1})},o("",{cLetter:"z",editTypeOverride:"calc"}))},70420:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(1631),a=r(62532),s=r(35637);function l(e){return e&&"string"===typeof e}e.exports=function(e,t){var r,c=t._length,u=new Array(c);r=t.geojson?function(e){return l(e)||n(e)}:l;for(var d=0;d{"use strict";var n=r(53787),i=r(5876),o=r(41225);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("locations"),c=s("z");if(l&&l.length&&n.isArrayOrTypedArray(c)&&c.length){t._length=Math.min(l.length,c.length);var u,d=s("geojson");("string"===typeof d&&""!==d||n.isPlainObject(d))&&(u="geojson-id"),"geojson-id"===s("locationmode",u)&&s("featureidkey"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)}else t.visible=!1}},10873:e=>{"use strict";e.exports=function(e,t,r,n,i){e.location=t.location,e.z=t.z;var o=n[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e.ct=o.ct,e}},61524:(e,t,r)=>{"use strict";var n=r(28605),i=r(41225),o=r(53787).fillText;e.exports=function(e,t,r){var a,s,l,c,u=e.cd,d=u[0].trace,f=e.subplot,h=[t,r],p=[t+360,r];for(s=0;s")}(e,d,a),[e]}},177:(e,t,r)=>{"use strict";e.exports={attributes:r(41225),supplyDefaults:r(32055),colorbar:r(53693),calc:r(70420),calcGeoJSON:r(9446).calcGeoJSON,plot:r(9446).plot,style:r(98316).style,styleOnSelect:r(98316).styleOnSelect,hoverPoints:r(61524),eventData:r(10873),selectPoints:r(12268),moduleType:"trace",name:"choropleth",basePlotModule:r(33857),categories:["geo","noOpacity","showLegend"],meta:{description:["The data that describes the choropleth value-to-color mapping","is set in `z`.","The geographic locations corresponding to each value in `z`","are set in `locations`."].join(" ")}}},9446:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(426),a=r(58268).getTopojsonFeatures,s=r(10351).findExtremes,l=r(98316).style;e.exports={calcGeoJSON:function(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?o.extractTraceFeature(e):a(r,i.topojson),d=[],f=[],h=0;h{"use strict";e.exports=function(e,t){var r,n,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(66235),o=r(50973),a=r(10948);function s(e,t){var r=t[0].trace,s=t[0].node3.selectAll(".choroplethlocation"),l=r.marker||{},c=l.line||{},u=a.makeColorScaleFuncFromTrace(r);s.each((function(e){n.select(this).attr("fill",u(e.z)).call(i.stroke,e.mlc||c.color).call(o.dashLine,"",e.mlw||c.width||0).style("opacity",l.opacity)})),o.selectedPointStyle(s,r)}e.exports={style:function(e,t){t&&s(e,t)},styleOnSelect:function(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?o.selectedPointStyle(r.selectAll(".choroplethlocation"),n):s(0,t)}}},94225:(e,t,r)=>{"use strict";var n=r(41225),i=r(8753),o=r(32191).fF,a=r(27231),s=r(10191).extendFlat;e.exports=s({locations:{valType:"data_array",editType:"calc",description:["Sets which features found in *geojson* to plot using","their feature `id` field."].join(" ")},z:{valType:"data_array",editType:"calc",description:"Sets the color values."},geojson:{valType:"any",editType:"calc",description:["Sets the GeoJSON data associated with this trace.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")},featureidkey:s({},n.featureidkey,{description:["Sets the key in GeoJSON features which is used as id to match the items","included in the `locations` array.","Support nested property, for example *properties.name*."].join(" ")}),below:{valType:"string",editType:"plot",description:["Determines if the choropleth polygons will be inserted","before the layer with the specified ID.","By default, choroplethmapbox traces are placed above the water layers.","If set to '',","the layer will be inserted above every existing layer."].join(" ")},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:o({},{keys:["properties"]}),showlegend:s({},a.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},57237:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(10948),a=r(50973),s=r(31360).makeBlank,l=r(426);function c(e){var t,r=e[0].trace,n=r._opts;if(r.selectedpoints){for(var o=a.makeSelectedPointStyleFns(r),s=0;s{"use strict";var n=r(53787),i=r(5876),o=r(94225);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("locations"),c=s("z"),u=s("geojson");n.isArrayOrTypedArray(l)&&l.length&&n.isArrayOrTypedArray(c)&&c.length&&("string"===typeof u&&""!==u||n.isPlainObject(u))?(s("featureidkey"),t._length=Math.min(l.length,c.length),s("below"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(e,t,a,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)):t.visible=!1}},4950:(e,t,r)=>{"use strict";e.exports={attributes:r(94225),supplyDefaults:r(392),colorbar:r(53693),calc:r(70420),plot:r(29061),hoverPoints:r(61524),eventData:r(10873),selectPoints:r(12268),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"===typeof i&&0===i.indexOf("water"))for(var o=n+1;o{"use strict";var n=r(57237).convert,i=r(57237).convertOnSelect,o=r(93845).traceLayerPrefix;function a(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",o+t+"-fill"],["line",o+t+"-line"]],this.below=null}var s=a.prototype;s.update=function(e){this._update(n(e)),e[0].trace._glTrace=this},s.updateOnSelect=function(e){this._update(i(e))},s._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new a(e,r.uid),o=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}},30681:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates of the vector field","and of the displayed cones."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the y coordinates of the vector field","and of the displayed cones."].join(" ")},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the z coordinates of the vector field","and of the displayed cones."].join(" ")},u:{valType:"data_array",editType:"calc",description:"Sets the x components of the vector field."},v:{valType:"data_array",editType:"calc",description:"Sets the y components of the vector field."},w:{valType:"data_array",editType:"calc",description:"Sets the z components of the vector field."},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled",description:["Determines whether `sizeref` is set as a *scaled* (i.e unitless) scalar","(normalized by the max u/v/w norm in the vector field) or as","*absolute* value (in the same units as the vector field)."].join(" ")},sizeref:{valType:"number",editType:"calc",min:0,description:["Adjusts the cone size scaling.","The size of the cones is determined by their u/v/w norm multiplied a factor and `sizeref`.",'This factor (computed internally) corresponds to the minimum "time" to travel across',"two successive x/y/z positions at the average velocity of those two successive positions.","All cones in a given trace use the same factor.","With `sizemode` set to *scaled*, `sizeref` is unitless, its default value is *0.5*","With `sizemode` set to *absolute*, `sizeref` has the same units as the u/v/w vector field,","its the default value is half the sample's maximum vector norm."].join(" ")},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm",description:["Sets the cones' anchor with respect to their x/y/z positions.","Note that *cm* denote the cone's center of mass which corresponds to","1/4 from the tail to tip."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets the text elements associated with the cones.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},hovertemplate:o({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(c,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},35830:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){for(var r=t.u,i=t.v,o=t.w,a=Math.min(t.x.length,t.y.length,t.z.length,r.length,i.length,o.length),s=-1/0,l=1/0,c=0;c{"use strict";var n=r(13084).gl_cone3d,i=r(13084).gl_cone3d.createConeMesh,o=r(53787).simpleMap,a=r(95049).parseColorScale,s=r(10948).extractOpts,l=r(51577);function c(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var u=c.prototype;u.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],o=this.data.u[t],a=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,o,a,s,Math.sqrt(o*o+a*a+s*s)];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&void 0!==l[t]?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var d={xaxis:0,yaxis:1,zaxis:2},f={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function p(e,t){var r=e.fullSceneLayout,i=e.dataScale,c={};function u(e,t){var n=r[t],a=i[d[t]];return o(e,(function(e){return n.d2l(e)*a}))}c.vectors=l(u(t.u,"xaxis"),u(t.v,"yaxis"),u(t.w,"zaxis"),t._len),c.positions=l(u(t.x,"xaxis"),u(t.y,"yaxis"),u(t.z,"zaxis"),t._len);var p=s(t);c.colormap=a(t),c.vertexIntensityBounds=[p.min/t._normMax,p.max/t._normMax],c.coneOffset=f[t.anchor],"scaled"===t.sizemode?c.coneSize=t.sizeref||.5:c.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5;var m=n(c),g=t.lightposition;return m.lightPosition=[g.x,g.y,g.z],m.ambient=t.lighting.ambient,m.diffuse=t.lighting.diffuse,m.specular=t.lighting.specular,m.roughness=t.lighting.roughness,m.fresnel=t.lighting.fresnel,m.opacity=t.opacity,t._pad=h[t.anchor]*m.vectorScale*m.coneScale*t._normMax,m}u.update=function(e){this.data=e;var t=p(this.scene,e);this.mesh.update(t)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(e,t){var r=e.glplot.gl,n=p(e,t),o=i(r,n),a=new c(e,t.uid);return a.mesh=o,a.data=t,o._trace=a,e.glplot.add(o),a}},85970:(e,t,r)=>{"use strict";var n=r(53787),i=r(5876),o=r(30681);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),f=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length&&h&&h.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(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},64906:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"cone",basePlotModule:r(36390),categories:["gl3d","showLegend"],attributes:r(30681),supplyDefaults:r(85970),colorbar:{min:"cmin",max:"cmax"},calc:r(35830),plot:r(13107),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{description:["Use cone traces to visualize vector fields.","","Specify a vector field using 6 1D arrays,","3 position arrays `x`, `y` and `z`","and 3 vector component arrays `u`, `v`, `w`.","The cones are drawn exactly at the positions given","by `x`, `y` and `z`."].join(" ")}}},24515:(e,t,r)=>{"use strict";var n=r(38710),i=r(37471),o=r(89849),a=o.axisHoverFormat,s=o.descriptionOnlyNumbers,l=r(8753),c=r(93701).P,u=r(92948),d=r(10191).extendFlat,f=r(81494),h=f.COMPARISON_OPS2,p=f.INTERVAL_OPS,m=i.line;e.exports=d({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:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:n.hovertemplate,texttemplate:d({},n.texttemplate,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",n.texttemplate.description].join(" ")}),textfont:d({},n.textfont,{description:["For this trace it only has an effect if `coloring` is set to *heatmap*.",n.textfont.description].join(" ")}),hoverongaps:n.hoverongaps,connectgaps:d({},n.connectgaps,{description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in.","It is defaulted to true if `z` is a","one dimensional array","otherwise it is defaulted to false."].join(" ")}),fillcolor:{valType:"color",editType:"calc",description:["Sets the fill color if `contours.type` is *constraint*.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0},description:["Determines whether or not the contour level attributes are","picked by an algorithm.","If *true*, the number of contour levels can be set in `ncontours`.","If *false*, set the contour level attributes in `contours`."].join(" ")},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc",description:["Sets the maximum number of contour levels. The actual number","of contours will be chosen automatically to be less than or","equal to the value of `ncontours`.","Has an effect only if `autocontour` is *true* or if","`contours.size` is missing."].join(" ")},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc",description:["If `levels`, the data is represented as a contour plot with multiple","levels displayed. If `constraint`, the data is represented as constraints","with the invalid region shaded as specified by the `operation` and","`value` parameters."].join(" ")},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the starting contour level value.","Must be less than `contours.end`"].join(" ")},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the end contour level value.","Must be more than `contours.start`"].join(" ")},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1},description:["Sets the step between each contour level.","Must be positive."].join(" ")},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *heatmap*, a heatmap gradient coloring is applied","between each contour level.","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},showlines:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not the contour lines are drawn.","Has an effect only if `contours.coloring` is set to *fill*."].join(" ")},showlabels:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether to label the contour lines with their values."].join(" ")},labelfont:u({editType:"plot",colorEditType:"style",description:["Sets the font used for labeling the contour levels.","The default color comes from the lines, if shown.","The default family and size come from `layout.font`."].join(" ")}),labelformat:{valType:"string",dflt:"",editType:"plot",description:s("contour label")},operation:{valType:"enumerated",values:[].concat(h).concat(p),dflt:"=",editType:"calc",description:["Sets the constraint operation.","*=* keeps regions equal to `value`","*<* and *<=* keep regions less than `value`","*>* and *>=* keep regions greater than `value`","*[]*, *()*, *[)*, and *(]* keep regions inside `value[0]` to `value[1]`","*][*, *)(*, *](*, *)[* keep regions outside `value[0]` to value[1]`","Open vs. closed intervals make no difference to constraint display, but","all versions are allowed for consistency with filter transforms."].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values of the constraint boundary.","When `operation` is set to one of the comparison values","("+h+")","*value* is expected to be a number.","When `operation` is set to one of the interval values","("+p+")","*value* is expected to be an array of two numbers where the first","is the lower bound and the second is the upper bound."].join(" ")},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:d({},m.color,{editType:"style+colorbars",description:["Sets the color of the contour level.","Has no effect if `contours.coloring` is set to *lines*."].join(" ")}),width:{valType:"number",min:0,editType:"style+colorbars",description:["Sets the contour line width in (in px)","Defaults to *0.5* when `contours.type` is *levels*.","Defaults to *2* when `contour.type` is *constraint*."].join(" ")},dash:c,smoothing:d({},m.smoothing,{description:["Sets the amount of smoothing for the contour lines,","where *0* corresponds to no smoothing."].join(" ")}),editType:"plot"}},l("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},58167:(e,t,r)=>{"use strict";var n=r(10948),i=r(9398),o=r(62897),a=r(69832);e.exports=function(e,t){var r=i(e,t),s=r[0].z;o(t,s);var l,c=t.contours,u=n.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var d=c.start,f=a(c),h=c.size||1,p=Math.floor((f-d)/h)+1;isFinite(h)||(h=1,p=1);var m=d-h/2;l=[m,m+p*h]}else l=s;return n.calc(e,t,{vals:l,cLetter:"z"}),r}},95503:e=>{"use strict";e.exports=function(e,t){var r,n=e[0],i=n.z;switch(t.type){case"levels":var o=Math.min(i[0][0],i[0][1]);for(r=0;ra.level||a.starts.length&&o===a.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":h>c&&(n.prefixBoundary=!0);break;case"<":(hc||n.starts.length&&f===u)&&(n.prefixBoundary=!0);break;case"][":d=Math.min(h[0],h[1]),f=Math.max(h[0],h[1]),dc&&(n.prefixBoundary=!0)}}}},70232:(e,t,r)=>{"use strict";var n=r(10948),i=r(79945),o=r(69832);e.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var a=t.contours,s=t.line,l=a.size||1,c=a.coloring,u=i(t,{isColorbar:!0});if("heatmap"===c){var d=n.extractOpts(t);r._fillgradient=d.reversescale?n.flipScale(d.colorscale):d.colorscale,r._zrange=[d.min,d.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==a.showlines?s.width:0,dash:s.dash},r._levels={start:a.start,end:o(a),size:l}}}},69786:e=>{"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}}},41850:(e,t,r)=>{"use strict";var n=r(51908),i=r(65559),o=r(66235),a=o.addOpacity,s=o.opacity,l=r(81494),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(e,t,r,o,l,d){var f,h,p,m=t.contours,g=r("contours.operation");(m._operation=c[g],function(e,t){var r;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===g?f=m.showlines=!0:(f=r("contours.showlines"),p=r("fillcolor",a((e.line||{}).color||l,.5))),f)&&(h=r("line.color",p&&s(p)?a(t.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),i(r,o,h,d)}},29353:(e,t,r)=>{"use strict";var n=r(81494),i=r(51908);function o(e,t){var r,o=Array.isArray(t);function a(e){return i(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=a(o?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=o?[a(t[0]),a(t[1])]:[a(t),a(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=o?t.map(a):[a(t)]),r}function a(e){return function(t){t=o(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function s(e){return function(t){return{start:t=o(e,t),end:1/0,size:1/0}}}e.exports={"[]":a("[]"),"][":a("]["),">":s(">"),"<":s("<"),"=":s("=")}},4347:e=>{"use strict";e.exports=function(e,t,r,n){var i=n("contours.start"),o=n("contours.end"),a=!1===i||!1===o,s=r("contours.size");!(a?t.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},34213:(e,t,r)=>{"use strict";var n=r(53787);function i(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}e.exports=function(e,t){var r,o,a,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),o=e[0],r=0;r{"use strict";var n=r(53787),i=r(54777),o=r(17239),a=r(41850),s=r(4347),l=r(18779),c=r(51202),u=r(24515);e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,u,r,i)}if(i(e,t,f,d)){o(e,t,d,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate");var h="constraint"===f("contours.type");f("connectgaps",n.isArray1D(t.z)),h?a(e,t,f,d,r):(s(e,t,f,(function(r){return n.coerce2(e,t,u,r)})),l(e,t,f,d)),t.contours&&"heatmap"===t.contours.coloring&&c(f,d)}else t.visible=!1}},77491:(e,t,r)=>{"use strict";var n=r(53787),i=r(29353),o=r(69832);e.exports=function(e,t,r){for(var a="constraint"===e.type?i[e._operation](e.value):e,s=a.size,l=[],c=o(a),u=r.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},f=a.start;f1e3){n.warn("Too many contours, clipping at 1000",e);break}return l}},69832:e=>{"use strict";e.exports=function(e){return e.end+e.size/1e6}},49514:(e,t,r)=>{"use strict";var n=r(53787),i=r(69786);function o(e,t,r,n){return Math.abs(e[0]-t[0])20&&t?208===e||1114===e?n=0===r[0]?1:-1:o=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(e)?o=1:-1!==i.LEFTSTART.indexOf(e)?n=1:-1!==i.TOPSTART.indexOf(e)?o=-1:n=-1;return[n,o]}(f,r,t),p=[l(e,t,[-h[0],-h[1]])],m=e.z.length,g=e.z[0].length,v=t.slice(),y=h.slice();for(u=0;u<1e4;u++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],e.crossings[d]=i.SADDLEREMAINDER[f]):delete e.crossings[d],!(h=i.NEWDELTA[f])){n.log("Found bad marching index:",f,t,e.level);break}p.push(l(e,t,h)),t[0]+=h[0],t[1]+=h[1],d=t.join(","),o(p[p.length-1],p[p.length-2],s,c)&&p.pop();var x=h[0]&&(t[0]<0||t[0]>g-2)||h[1]&&(t[1]<0||t[1]>m-2);if(t[0]===v[0]&&t[1]===v[1]&&h[0]===y[0]&&h[1]===y[1]||r&&x)break;f=e.crossings[d]}1e4===u&&n.log("Infinite loop in contour?");var b,w,_,k,S,T,M,C,A,E,I,O=o(p[0],p[p.length-1],s,c),P=0,R=.2*e.smoothing,L=[],j=0;for(u=1;u=j;u--)if((b=L[u])=j&&b+L[w]C&&A--,e.edgepaths[A]=I.concat(p,E));break}F||(e.edgepaths[C]=p.concat(E))}for(C=0;C{"use strict";var n=r(66235),i=r(88338);e.exports=function(e,t,r,o,a){a||(a={}),a.isContour=!0;var s=i(e,t,r,o,a);return s&&s.forEach((function(e){var t=e.trace;"constraint"===t.contours.type&&(t.fillcolor&&n.opacity(t.fillcolor)?e.color=n.addOpacity(t.fillcolor,1):t.contours.showlines&&n.opacity(t.line.color)&&(e.color=n.addOpacity(t.line.color,1)))})),s}},15675:(e,t,r)=>{"use strict";e.exports={attributes:r(24515),supplyDefaults:r(51726),calc:r(58167),plot:r(77551).plot,style:r(45660),colorbar:r(70232),hoverPoints:r(53233),moduleType:"trace",name:"contour",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{description:["The data from which contour lines are computed is set in `z`.","Data in `z` must be a {2D array} of numbers.","Say that `z` has N rows and M columns, then by default,","these N rows correspond to N y coordinates","(set in `y` or auto-generated) and the M columns","correspond to M x coordinates (set in `x` or auto-generated).","By setting `transpose` to *true*, the above behavior is flipped."].join(" ")}}},65559:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r,i){if(i||(i={}),e("contours.showlabels")){var o=t.font;n.coerceFont(e,"contours.labelfont",{family:o.family,size:o.size,color:r}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}},79945:(e,t,r)=>{"use strict";var n=r(8996),i=r(10948),o=r(69832);e.exports=function(e){var t=e.contours,r=t.start,a=o(t),s=t.size||1,l=Math.floor((a-r)/s)+1,c="lines"===t.coloring?0:1,u=i.extractOpts(e);isFinite(s)||(s=1,l=1);var d,f,h=u.reversescale?i.flipScale(u.colorscale):u.colorscale,p=h.length,m=new Array(p),g=new Array(p),v=u.min,y=u.max;if("heatmap"===t.coloring){for(f=0;f=y)&&(r<=v&&(r=v),a>=y&&(a=y),l=Math.floor((a-r)/s)+1,c=0),f=0;fv&&(m.unshift(v),g.unshift(g[0])),m[m.length-1]{"use strict";var n=r(69786);function i(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(e){var t,r,o,a,s,l,c,u,d,f=e[0].z,h=f.length,p=f[0].length,m=2===h||2===p;for(r=0;r{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(10948),s=r(98224),l=r(28605),c=r(4738),u=r(91581),d=r(59450),f=r(49514),h=r(77491),p=r(34213),m=r(95503),g=r(69786),v=g.LABELOPTIMIZER;function y(e,t){var r,n,a,s,l,c,u,d="",f=0,h=e.edgepaths.map((function(e,t){return t})),p=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function v(e){return Math.abs(e[0]-t[2][0])<.01}for(;h.length;){for(c=o.smoothopen(e.edgepaths[f],e.smoothing),d+=p?c:c.replace(/^M/,"L"),h.splice(h.indexOf(f),1),r=e.edgepaths[f][e.edgepaths[f].length-1],s=-1,a=0;a<4;a++){if(!r){i.log("Missing end?",f,e);break}for(u=r,Math.abs(u[1]-t[0][1])<.01&&!v(r)?n=t[1]:g(r)?n=t[0]:m(r)?n=t[3]:v(r)&&(n=t[2]),l=0;l=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;d+="L"+n}if(s===e.edgepaths.length){i.log("unclosed perimeter path");break}f=s,(p=-1===h.indexOf(f))&&(f=h[0],d+="Z")}for(f=0;fn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*a)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(d)+Math.cos(c)*a);if(f<1||h<1)return 1/0;var p=v.EDGECOST*(1/(f-1)+1/(h-1));p+=v.ANGLECOST*c*c;for(var m=s-u,g=l-d,y=s+u,x=l+d,b=0;b2*v.MAXCOST)break;h&&(s/=2),l=(a=c-s/2)+1.5*s}if(f<=v.MAXCOST)return u},t.addLabelData=function(e,t,r,n){var i=t.fontSize,o=t.width+i/3,a=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),d=Math.cos(c),f=function(e,t){return[s+e*d-t*u,l+e*u+t*d]},h=[f(-o/2,-a/2),f(-o/2,a/2),f(o/2,a/2),f(o/2,-a/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:o,height:a}),n.push(h)},t.drawLabels=function(e,t,r,o,a){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+i+")"}).call(s.convertToTspans,r)})),a){for(var c="",u=0;u{"use strict";var n=r(28605),i=r(53787);function o(e,t,r){var i={type:"linear",range:[e,t]};return n.autoTicks(i,(t-e)/(r||15)),i}e.exports=function(e,t){var r=e.contours;if(e.autocontour){var a=e.zmin,s=e.zmax;(e.zauto||void 0===a)&&(a=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=o(a,s,e.ncontours);r.size=l.dtick,r.start=n.tickFirst(l),l.range.reverse(),r.end=n.tickFirst(l),r.start===a&&(r.start+=r.size),r.end===s&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,d=r.end,f=e._input.contours;if(u>d&&(r.start=f.start=d,d=r.end=f.end=u,u=r.start),!(r.size>0))c=u===d?1:o(u,d,e.ncontours).dtick,f.size=r.size=c}}},45660:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(78290),a=r(79945);e.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=n.select(this),r=e[0].trace,o=r.contours,s=r.line,l=o.size||1,c=o.start,u="constraint"===o.type,d=!u&&"lines"===o.coloring,f=!u&&"fill"===o.coloring,h=d||f?a(r):null;t.selectAll("g.contourlevel").each((function(e){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,d?h(e.level):s.color,s.dash)}));var p=o.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){i.font(n.select(this),{family:p.family,size:p.size,color:p.color||(d?h(e.level):s.color)})})),u)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(f){var m;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===m&&(m=e.level),h(e.level+.5*l)})),void 0===m&&(m=c),t.selectAll("g.contourbg path").style("fill",h(m-.5*l))}})),o(e)}},18779:(e,t,r)=>{"use strict";var n=r(5876),i=r(65559);e.exports=function(e,t,r,o,a){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,o,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,o,c,a)}},62820:(e,t,r)=>{"use strict";var n=r(38710),i=r(24515),o=r(8753),a=r(10191).extendFlat,s=i.contours;e.exports=a({carpet:{valType:"string",editType:"calc",description:["The `carpet` of the carpet axes on which this contour trace lies"].join(" ")},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",description:["Determines the coloring method showing the contour values.","If *fill*, coloring is done evenly between each contour level","If *lines*, coloring is done on the contour lines.","If *none*, no coloring is applied on this trace."].join(" ")},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},o("",{cLetter:"z",autoColorDflt:!1}))},15904:(e,t,r)=>{"use strict";var n=r(1631),i=r(53787),o=r(84446),a=r(48854),s=r(83622),l=r(98878),c=r(43006),u=r(2383),d=r(94624),f=r(62897);e.exports=function(e,t){var r=t._carpetTrace=d(e,t);if(r&&r.visible&&"legendonly"!==r.visible){if(!t.a||!t.b){var h=e.data[r.index],p=e.data[t.index];p.a||(p.a=h.a),p.b||(p.b=h.b),u(p,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var r,u,d,f,h,p,m,g=t._carpetTrace,v=g.aaxis,y=g.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(t.z)&&o(t,v,y,"a","b",["z"]);r=t._a=t._a||t.a,f=t._b=t._b||t.b,r=r?v.makeCalcdata(t,"_a"):[],f=f?y.makeCalcdata(t,"_b"):[],u=t.a0||0,d=t.da||1,h=t.b0||0,p=t.db||1,m=t._z=a(t._z||t.z,t.transpose),t._emptypoints=l(m),s(m,t._emptypoints);var x=i.maxRowLength(m),b="scaled"===t.xtype?"":r,w=c(t,b,u,d,x,v),_="scaled"===t.ytype?"":f,k=c(t,_,h,p,m.length,y),S={a:w,b:k,z:m};"levels"===t.contours.type&&"none"!==t.contours.coloring&&n(e,t,{vals:m,containerStr:"",cLetter:"z"});return[S]}(e,t);return f(t,t._z),m}}},2383:(e,t,r)=>{"use strict";var n=r(53787),i=r(54777),o=r(62820),a=r(41850),s=r(4347),l=r(18779);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,o,r,i)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?a(e,t,u,c,r,{hasHover:!1}):(s(e,t,u,(function(r){return n.coerce2(e,t,o,r)})),l(e,t,u,c,{hasHover:!1}))}else t._defaultColor=r,t._length=null}},29969:(e,t,r)=>{"use strict";e.exports={attributes:r(62820),supplyDefaults:r(2383),colorbar:r(70232),calc:r(15904),plot:r(28422),style:r(45660),moduleType:"trace",name:"contourcarpet",basePlotModule:r(48206),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{hrName:"contour_carpet",description:["Plots contours on either the first carpet axis or the","carpet axis with a matching `carpet` attribute. Data `z`","is interpreted as matching that of the corresponding carpet","axis."].join(" ")}}},28422:(e,t,r)=>{"use strict";var n=r(8996),i=r(71596),o=r(20979),a=r(50973),s=r(53787),l=r(59450),c=r(49514),u=r(77551),d=r(69786),f=r(34213),h=r(77491),p=r(95503),m=r(94624),g=r(97639);function v(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),o=i.x-n.x,a=i.y-n.y,s=Math.sqrt(o*o+a*a);return[o/s,a/s]}function y(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function x(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-r*r)/r}e.exports=function(e,t,r,b){var w=t.xaxis,_=t.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),k=r[0],S=k.trace,T=S._carpetTrace=m(e,S),M=e.calcdata[T.index][0];if(T.visible&&"legendonly"!==T.visible){var C=k.a,A=k.b,E=S.contours,I=h(E,t,k),O="constraint"===E.type,P=E._operation,R=O?"="===P?"lines":"fill":E.coloring,L=[[C[0],A[A.length-1]],[C[C.length-1],A[A.length-1]],[C[C.length-1],A[0]],[C[0],A[0]]];l(I);var j=1e-8*(C[C.length-1]-C[0]),D=1e-8*(A[A.length-1]-A[0]);c(I,j,D);var z,N,F,B,Z=I;"constraint"===E.type&&(Z=f(I,P)),function(e,t){var r,n,i,o,a,s,l,c,u;for(r=0;r=0;B--)z=M.clipsegments[B],N=i([],z.x,w.c2p),F=i([],z.y,_.c2p),N.reverse(),F.reverse(),U.push(o(N,F,z.bicubic));var V="M"+U.join("L")+"Z";!function(e,t,r,n,a,l){var c,u,d,f,h=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||a?[]:[0]);h.enter().append("path"),h.exit().remove();var p=[];for(f=0;f=0&&(f=E,p=m):Math.abs(d[1]-f[1])<_?Math.abs(d[1]-E[1])<_&&(E[0]-d[0])*(f[0]-E[0])>=0&&(f=E,p=m):s.log("endpt to newendpt is not vert. or horz.",d,f,E)}if(p>=0)break;y+=C(d,f),d=f}if(p===t.edgepaths.length){s.log("unclosed perimeter path");break}u=p,(b=-1===x.indexOf(u))&&(u=x[0],y+=C(d,f)+"Z",d=null)}for(u=0;ug&&(n.max=g);n.len=n.max-n.min}(n,r,e,i,c,t.height),!(i.len<(t.width+t.height)*d.LABELMIN)))for(var o=Math.min(Math.ceil(i.len/R),d.LABELMAX),a=0;a{"use strict";var n=r(8753),i=r(32191).fF,o=r(27231),a=r(36018),s=r(10191).extendFlat;e.exports=s({lon:a.lon,lat:a.lat,z:{valType:"data_array",editType:"calc",description:["Sets the points' weight.","For example, a value of 10 would be equivalent to having 10 points of weight 1","in the same spot"].join(" ")},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30,description:["Sets the radius of influence of one `lon` / `lat` point in pixels.","Increasing the value makes the densitymapbox trace smoother, but less detailed."].join(" ")},below:{valType:"string",editType:"plot",description:["Determines if the densitymapbox trace will be inserted","before the layer with the specified ID.","By default, densitymapbox traces are placed below the first","layer of type symbol","If set to '',","the layer will be inserted above every existing layer."].join(" ")},text:a.text,hovertext:a.hovertext,hoverinfo:s({},o.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:i(),showlegend:s({},o.showlegend,{dflt:!1})},n("",{cLetter:"z",editTypeOverride:"calc"}))},20050:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787).isArrayOrTypedArray,o=r(24956).BADNUM,a=r(1631),s=r(53787)._;e.exports=function(e,t){for(var r=t._length,l=new Array(r),c=t.z,u=i(c)&&c.length,d=0;d{"use strict";var n=r(51908),i=r(53787),o=r(66235),a=r(10948),s=r(24956).BADNUM,l=r(31360).makeBlank;e.exports=function(e){var t=e[0].trace,r=!0===t.visible&&0!==t._length,c=t._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:l()};if(!r)return c;var u,d=[],f=t.z,h=t.radius,p=i.isArrayOrTypedArray(f)&&f.length,m=i.isArrayOrTypedArray(h);for(u=0;u0?+h[u]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var b=a.extractOpts(t),w=b.reversescale?a.flipScale(b.colorscale):b.colorscale,_=w[0][1],k=["interpolate",["linear"],["heatmap-density"],0,o.opacity(_)<1?_:o.addOpacity(_,0)];for(u=1;u{"use strict";var n=r(53787),i=r(5876),o=r(66762);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(t._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(e,t,a,s,{prefix:"",cLetter:"z"})):t.visible=!1}},45433:e=>{"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},89704:(e,t,r)=>{"use strict";var n=r(28605),i=r(16016).hoverPoints,o=r(16016).getExtraText;e.exports=function(e,t,r){var a=i(e,t,r);if(a){var s=a[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var d=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(d,d.c2l(u.z),"hover").text}return s.extraText=o(c,u,l[0].t.labels),[s]}}},46717:(e,t,r)=>{"use strict";e.exports={attributes:r(66762),supplyDefaults:r(18010),colorbar:r(53693),formatLabels:r(71652),calc:r(20050),plot:r(95715),hoverPoints:r(89704),eventData:r(45433),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";var n=r(53273),i=r(93845).traceLayerPrefix;function o(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=o.prototype;a.update=function(e){var t=this.subplot,r=this.layerList,i=n(e),o=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),o!==this.below&&(this._removeLayers(),this._addLayers(i,o),this.below=o);for(var a=0;a=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},e.exports=function(e,t){var r=t[0].trace,i=new o(e,r.uid),a=i.sourceId,s=n(t),l=i.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},60938:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(8222),i=r(37471).line,o=r(27231),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(2537),u=r(10191).extendFlat,d=r(66235);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:a("x"),yhoverformat:a("y"),hovertext:n.hovertext,hovertemplate:s({},{keys:c.eventDataKeys}),hoverinfo:u({},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,description:["Determines which trace information appear on the graph.","In the case of having multiple funnels, percentages & totals","are computed separately (per trace)."].join(" ")},texttemplate:l({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),text:n.text,textposition:n.textposition,insidetextanchor:u({},n.insidetextanchor,{dflt:"middle"}),textangle:u({},n.textangle,{dflt:0}),textfont:n.textfont,insidetextfont:n.insidetextfont,outsidetextfont:n.outsidetextfont,constraintext:n.constraintext,cliponaxis:n.cliponaxis,orientation:u({},n.orientation,{description:["Sets the orientation of the funnels.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal).","By default funnels are tend to be oriented horizontally;","unless only *y* array is presented or orientation is set to *v*.","Also regarding graphs including only 'horizontal' funnels,","*autorange* on the *y-axis* are set to *reversed*."].join(" ")}),offset:u({},n.offset,{arrayOk:!1}),width:u({},n.width,{arrayOk:!1}),marker:function(){var e=u({},n.marker);return delete e.pattern,e}(),connector:{fillcolor:{valType:"color",editType:"style",description:["Sets the fill color."].join(" ")},line:{color:u({},i.color,{dflt:d.defaultLine}),width:u({},i.width,{dflt:0,editType:"plot"}),dash:i.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if connector regions and lines are drawn."].join(" ")},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},8167:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(60938),a=r(35637),s=r(24956).BADNUM;function l(e){return e===s?0:e}e.exports=function(e,t){var r,c,u,d,f,h,p,m,g=n.getFromId(e,t.xaxis||"x"),v=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=g.makeCalcdata(t,"x"),u=v.makeCalcdata(t,"y"),d=i(t,v,"y",u),f=!!t.yperiodalignment,h="y"):(r=v.makeCalcdata(t,"y"),u=g.makeCalcdata(t,"x"),d=i(t,g,"x",u),f=!!t.xperiodalignment,h="x"),c=d.vals;var y,x=Math.min(c.length,r.length),b=new Array(x);for(t._base=[],p=0;p{"use strict";e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},23612:(e,t,r)=>{"use strict";var n=r(39713).setGroupPositions;e.exports=function(e,t){var r,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],f=[];for(i=0;i{"use strict";var n=r(53787),i=r(25305),o=r(6099).handleText,a=r(89016),s=r(17239),l=r(53252),c=r(66235);e.exports={supplyDefaults:function(e,t,r,i){function u(r,i){return n.coerce(e,t,l,r,i)}if(a(e,t,i,u)){s(e,t,i,u),u("xhoverformat"),u("yhoverformat"),u("orientation",t.y&&!t.x?"v":"h"),u("offset"),u("width");var d=u("text");u("hovertext"),u("hovertemplate");var f=u("textposition");o(e,t,i,u,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"===t.textposition||t.texttemplate||u("textinfo",Array.isArray(d)?"text+value":"value");var h=u("marker.color",r);if(u("marker.line.color",c.defaultLine),u("marker.line.width"),u("connector.visible"))u("connector.fillcolor",function(e){var t=n.isArrayOrTypedArray(e)?"#000":e;return c.addOpacity(t,.5*c.opacity(t))}(h)),u("connector.line.width")&&(u("connector.line.color"),u("connector.line.dash"))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,o;function a(e){return n.coerce(o._input,o,l,e)}if("group"===t.funnelmode)for(var s=0;s{"use strict";e.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},91568:(e,t,r)=>{"use strict";var n=r(66235).opacity,i=r(48363).hoverOnBars,o=r(53787).formatPercent;e.exports=function(e,t,r,a,s){var l=i(e,t,r,a,s);if(l){var c=l.cd,u=c[0].trace,d="h"===u.orientation,f=c[l.index];l[(d?"x":"y")+"LabelVal"]=f.s,l.percentInitial=f.begR,l.percentInitialLabel=o(f.begR,1),l.percentPrevious=f.difR,l.percentPreviousLabel=o(f.difR,1),l.percentTotal=f.sumR,l.percentTotalLabel=o(f.sumR,1);var h=f.hi||u.hoverinfo,p=[];if(h&&"none"!==h&&"skip"!==h){var m="all"===h,g=h.split("+"),v=function(e){return m||-1!==g.indexOf(e)};v("percent initial")&&p.push(l.percentInitialLabel+" of initial"),v("percent previous")&&p.push(l.percentPreviousLabel+" of previous"),v("percent total")&&p.push(l.percentTotalLabel+" of total")}return l.extraText=p.join("
"),l.color=function(e,t){var r=e.marker,i=t.mc||r.color,o=t.mlc||r.line.color,a=t.mlw||r.line.width;if(n(i))return i;if(n(o)&&a)return o}(u,f),[l]}}},17923:(e,t,r)=>{"use strict";e.exports={attributes:r(53252),layoutAttributes:r(94540),supplyDefaults:r(94431).supplyDefaults,crossTraceDefaults:r(94431).crossTraceDefaults,supplyLayoutDefaults:r(2010),calc:r(8167),crossTraceCalc:r(23612),plot:r(69324),style:r(17846).style,hoverPoints:r(91568),eventData:r(46101),selectPoints:r(22145),moduleType:"trace",name:"funnel",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Visualize stages in a process using length-encoded bars. This trace can be used","to show data in either a part-to-whole representation wherein each item appears",'in a single stage, or in a "drop-off" representation wherein each item appears in','each stage it traversed. See also the "funnelarea" trace type for a different',"approach to visualizing funnel data."].join(" ")}}},94540:e=>{"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},funnelgap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},2010:(e,t,r)=>{"use strict";var n=r(53787),i=r(94540);e.exports=function(e,t,r){var o=!1;function a(r,o){return n.coerce(e,t,i,r,o)}for(var s=0;s{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(24956).BADNUM,s=r(88430),l=r(22684).clearMinTextSize;function c(e,t,r,n){var i=[],o=[],a=n?t:r,s=n?r:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),i[3]=a.c2p(e.nextS1,!0),o[3]=s.c2p(e.nextP1,!0),n?[i,o]:[o,i]}e.exports=function(e,t,r,u){var d=e._fullLayout;l("funnel",d),function(e,t,r,s){var l=t.xaxis,u=t.yaxis;i.makeTraceGroups(s,r,"trace bars").each((function(r){var s=n.select(this),d=r[0].trace,f=i.ensureSingle(s,"g","regions");if(d.connector&&d.connector.visible){var h="h"===d.orientation,p=f.selectAll("g.region").data(i.identity);p.enter().append("g").classed("region",!0),p.exit().remove();var m=p.size();p.each((function(r,s){if(s===m-1||r.cNext){var d=c(r,l,u,h),f=d[0],p=d[1],g="";f[0]!==a&&p[0]!==a&&f[1]!==a&&p[1]!==a&&f[2]!==a&&p[2]!==a&&f[3]!==a&&p[3]!==a&&(g+=h?"M"+f[0]+","+p[1]+"L"+f[2]+","+p[2]+"H"+f[3]+"L"+f[1]+","+p[1]+"Z":"M"+f[1]+","+p[1]+"L"+f[2]+","+p[3]+"V"+p[2]+"L"+f[1]+","+p[0]+"Z"),""===g&&(g="M0,0Z"),i.ensureSingle(n.select(this),"path").attr("d",g).call(o.setClipUrl,t.layerClipId,e)}}))}else f.remove()}))}(e,t,r,u),function(e,t,r,a){var s=t.xaxis,l=t.yaxis;i.makeTraceGroups(a,r,"trace bars").each((function(r){var a=n.select(this),u=r[0].trace,d=i.ensureSingle(a,"g","lines");if(u.connector&&u.connector.visible&&u.connector.line.width){var f="h"===u.orientation,h=d.selectAll("g.line").data(i.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var p=h.size();h.each((function(r,a){if(a===p-1||r.cNext){var u=c(r,s,l,f),d=u[0],h=u[1],m="";void 0!==d[3]&&void 0!==h[3]&&(f?(m+="M"+d[0]+","+h[1]+"L"+d[2]+","+h[2],m+="M"+d[1]+","+h[1]+"L"+d[3]+","+h[2]):(m+="M"+d[1]+","+h[1]+"L"+d[2]+","+h[3],m+="M"+d[1]+","+h[0]+"L"+d[2]+","+h[2])),""===m&&(m="M0,0Z"),i.ensureSingle(n.select(this),"path").attr("d",m).call(o.setClipUrl,t.layerClipId,e)}}))}else d.remove()}))}(e,t,r,u),s.plot(e,t,r,u,{mode:d.funnelmode,norm:d.funnelmode,gap:d.funnelgap,groupgap:d.funnelgroupgap})}},17846:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(26880).DESELECTDIM,s=r(29527),l=r(22684).resizeText,c=s.styleTextPoints;e.exports={style:function(e,t,r){var s=r||n.select(e).selectAll("g.funnellayer").selectAll("g.trace");l(e,s,"funnel"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var r=n.select(this),s=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s.marker;n.select(this).call(o.fill,e.mc||t.color).call(o.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(r,s,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(o.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},50706:(e,t,r)=>{"use strict";var n=r(10650),i=r(27231),o=r(29707).Y,a=r(32191).fF,s=r(32191).si,l=r(10191).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,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:n.marker.pattern,editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{description:["If there are multiple funnelareas that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")}),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:a({},{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:o({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the ratio between height and width"].join(" ")},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot",description:["Sets the ratio between bottom length and maximum top length."].join(" ")}}},10923:(e,t,r)=>{"use strict";var n=r(44115);t.name="funnelarea",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},81393:(e,t,r)=>{"use strict";var n=r(21412);e.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},56169:(e,t,r)=>{"use strict";var n=r(53787),i=r(50706),o=r(29707).c,a=r(6099).handleText,s=r(24530).handleLabelsAndValues,l=r(24530).handleMarkerDefaults;e.exports=function(e,t,r,c){function u(r,o){return n.coerce(e,t,i,r,o)}var d=u("labels"),f=u("values"),h=s(d,f),p=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),p){t._length=p,l(e,t,c,u),u("scalegroup");var m,g=u("text"),v=u("texttemplate");if(v||(m=u("textinfo",Array.isArray(g)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),v||m&&"none"!==m){var y=u("textposition");a(e,t,c,u,y,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}o(t,c,u),u("title.text")&&(u("title.position"),n.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}else t.visible=!1}},17266:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(10923),categories:["pie-like","funnelarea","showLegend"],attributes:r(50706),layoutAttributes:r(34916),supplyDefaults:r(56169),supplyLayoutDefaults:r(30259),calc:r(81393).calc,crossTraceCalc:r(81393).crossTraceCalc,plot:r(59156),style:r(92527),styleOne:r(68872),meta:{description:["Visualize stages in a process using area-encoded trapezoids. This trace can be used",'to show data in a part-to-whole representation similar to a "pie" trace, wherein','each item appears in a single stage. See also the "funnel" trace type for a different',"approach to visualizing funnel data."].join(" ")}}},34916:(e,t,r)=>{"use strict";var n=r(24873).hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc",description:["Sets the default funnelarea slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendfunnelareacolors`."].join(" ")},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the funnelarea slice colors (whether given by `funnelareacolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},30259:(e,t,r)=>{"use strict";var n=r(53787),i=r(34916);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},59156:(e,t,r)=>{"use strict";var n=r(8996),i=r(50973),o=r(53787),a=o.strScale,s=o.strTranslate,l=r(98224),c=r(88430).toMoveInsideBar,u=r(22684),d=u.recordMinTextSize,f=u.clearMinTextSize,h=r(22084),p=r(3213),m=p.attachFxHandlers,g=p.determineInsideTextFont,v=p.layoutAreas,y=p.prerenderTitles,x=p.positionTitleOutside,b=p.formatSliceLabel;function w(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function _(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}e.exports=function(e,t){var r=e._context.staticPlot,u=e._fullLayout;f("funnelarea",u),y(t,e),v(t,u._size),o.makeTraceGroups(u._funnelarealayer,t,"trace").each((function(t){var f=n.select(this),p=t[0],v=p.trace;!function(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var o,a=Math.pow(i,2),s=t.vTotal,l=s,c=s*a/(1-a)/s;function u(){var e=Math.sqrt(c);return{x:e,y:-e}}function d(){var e=u();return[e.x,e.y]}var f,h,p=[];for(p.push(d()),f=e.length-1;f>-1;f--)if(!(h=e[f]).hidden){var m=h.v/l;c+=m,p.push(d())}var g=1/0,v=-1/0;for(f=0;f-1;f--)if(!(h=e[f]).hidden){var C=p[M+=1][0],A=p[M][1];h.TL=[-C,A],h.TR=[C,A],h.BL=S,h.BR=T,h.pxmid=_(h.TR,h.BR),S=h.TL,T=h.TR}}(t),f.each((function(){var f=n.select(this).selectAll("g.slice").data(t);f.enter().append("g").classed("slice",!0),f.exit().remove(),f.each((function(a,s){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=v.index;var f=p.cx,y=p.cy,x=n.select(this),_=x.selectAll("path.surface").data([a]);_.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(m,e,t);var k="M"+(f+a.TR[0])+","+(y+a.TR[1])+w(a.TR,a.BR)+w(a.BR,a.BL)+w(a.BL,a.TL)+"Z";_.attr("d",k),b(e,a,p);var S=h.castOption(v.textposition,a.pts),T=x.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);T.enter().append("g").classed("slicetext",!0),T.exit().remove(),T.each((function(){var r=o.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),h=o.ensureUniformFontSize(e,g(v,a,u.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,h).call(l.convertToTspans,e);var p,m,x,b=i.bBox(r.node()),w=Math.min(a.BL[1],a.BR[1])+y,_=Math.max(a.TL[1],a.TR[1])+y;m=Math.max(a.TL[0],a.BL[0])+f,x=Math.min(a.TR[0],a.BR[0])+f,(p=c(m,x,w,_,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=h.size,d(v.type,p,u),t[s].transform=p,o.setTransormAndDisplay(r,p)}))}}));var y=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var t=o.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),r=v.title.text;v._meta&&(r=o.templateString(r,v._meta)),t.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,v.title.font).call(l.convertToTspans,e);var c=x(p,u._size);t.attr("transform",s(c.x,c.y)+a(Math.min(1,c.scale))+s(c.tx,c.ty))}))}))}))}},92527:(e,t,r)=>{"use strict";var n=r(8996),i=r(68872),o=r(22684).resizeText;e.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");o(e,t,"funnelarea"),t.each((function(t){var r=t[0].trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},38710:(e,t,r)=>{"use strict";var n=r(37471),i=r(27231),o=r(92948),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(8753),u=r(10191).extendFlat;e.exports=u({z:{valType:"data_array",editType:"calc",description:"Sets the z data."},x:u({},n.x,{impliedEdits:{xtype:"array"}}),x0:u({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},n.y,{impliedEdits:{ytype:"array"}}),y0:u({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"calc",description:"Same as `text`."},transpose:{valType:"boolean",dflt:!1,editType:"calc",description:"Transposes the z data."},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes",description:["If *array*, the heatmap's x coordinates are given by *x*","(the default behavior when `x` is provided).","If *scaled*, the heatmap's x coordinates are given by *x0* and *dx*","(the default behavior when `x` is not provided)."].join(" ")},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes",description:["If *array*, the heatmap's y coordinates are given by *y*","(the default behavior when `y` is provided)","If *scaled*, the heatmap's y coordinates are given by *y0* and *dy*","(the default behavior when `y` is not provided)"].join(" ")},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc",description:["Picks a smoothing algorithm use to smooth `z` data."].join(" ")},hoverongaps:{valType:"boolean",dflt:!0,editType:"none",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data have hover labels associated with them."].join(" ")},connectgaps:{valType:"boolean",editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in.","It is defaulted to true if `z` is a","one dimensional array and `zsmooth` is not false;","otherwise it is defaulted to false."].join(" ")},xgap:{valType:"number",dflt:0,min:0,editType:"plot",description:"Sets the horizontal gap (in pixels) between bricks."},ygap:{valType:"number",dflt:0,min:0,editType:"plot",description:"Sets the vertical gap (in pixels) between bricks."},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:o({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style",description:"Sets the text font."}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},9398:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(28605),a=r(64594),s=r(1823),l=r(1631),c=r(84446),u=r(48854),d=r(83622),f=r(98878),h=r(43006),p=r(24956).BADNUM;function m(e){for(var t=[],r=e.length,n=0;n1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(S=0;Sr)return!1}return!0}(M.rangebreaks||C.rangebreaks)&&(k=function(e,t,r){for(var n=[],i=-1,o=0;o{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM;e.exports=function(e,t,r,a){var s,l,c,u,d,f;function h(e){if(n(e))return+e}if(t&&t.transpose){for(s=0,d=0;d{"use strict";e.exports={min:"zmin",max:"zmax"}},84446:(e,t,r)=>{"use strict";var n=r(53787),i=r(24956).BADNUM,o=r(64594);e.exports=function(e,t,r,a,s,l){var c=e._length,u=t.makeCalcdata(e,a),d=r.makeCalcdata(e,s);u=o(e,t,a,u).vals,d=o(e,r,s,d).vals;var f,h,p,m,g=e.text,v=void 0!==g&&n.isArray1D(g),y=e.hovertext,x=void 0!==y&&n.isArray1D(y),b=n.distinctVals(u),w=b.vals,_=n.distinctVals(d),k=_.vals,S=[],T=k.length,M=w.length;for(f=0;f{"use strict";var n=r(53787),i=r(54777),o=r(51202),a=r(17239),s=r(69904),l=r(5876),c=r(38710);e.exports=function(e,t,r,u){function d(r,i){return n.coerce(e,t,c,r,i)}i(e,t,d,u)?(a(e,t,u,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hovertemplate"),o(d,u),s(e,t,d,u),d("hoverongaps"),d("connectgaps",n.isArray1D(t.z)&&!1!==t.zsmooth),l(e,t,u,d,{prefix:"",cLetter:"z"})):t.visible=!1}},98878:(e,t,r)=>{"use strict";var n=r(53787).maxRowLength;e.exports=function(e){var t,r,i,o,a,s,l,c,u=[],d={},f=[],h=e[0],p=[],m=[0,0,0],g=n(e);for(r=0;r=0;a--)(s=((d[[(r=(o=f[a])[0])-1,i=o[1]]]||m)[2]+(d[[r+1,i]]||m)[2]+(d[[r,i-1]]||m)[2]+(d[[r,i+1]]||m)[2])/20)&&(l[o]=[r,i,s],f.splice(a,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(o in l)d[o]=l[o],u.push(l[o])}return u.sort((function(e,t){return t[2]-e[2]}))}},88338:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(28605),a=r(10948).extractOpts;e.exports=function(e,t,r,s,l){l||(l={});var c,u,d,f,h=l.isContour,p=e.cd[0],m=p.trace,g=e.xa,v=e.ya,y=p.x,x=p.y,b=p.z,w=p.xCenter,_=p.yCenter,k=p.zmask,S=m.zhoverformat,T=y,M=x;if(!1!==e.index){try{d=Math.round(e.index[1]),f=Math.round(e.index[0])}catch(F){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(d<0||d>=b[0].length||f<0||f>b.length)return}else{if(n.inbox(t-y[0],t-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(h){var C;for(T=[2*y[0]-y[1]],C=1;C{"use strict";e.exports={attributes:r(38710),supplyDefaults:r(23699),calc:r(9398),plot:r(91581),colorbar:r(53693),style:r(78290),hoverPoints:r(88338),moduleType:"trace",name:"heatmap",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","showLegend"],meta:{description:["The data that describes the heatmap value-to-color mapping","is set in `z`.","Data in `z` can either be a {2D array} of values (ragged or not)","or a 1D array of values.","In the case where `z` is a {2D array},","say that `z` has N rows and M columns.","Then, by default, the resulting heatmap will have N partitions along","the y axis and M partitions along the x axis.","In other words, the i-th row/ j-th column cell in `z`","is mapped to the i-th partition of the y axis","(starting from the bottom of the plot) and the j-th partition","of the x-axis (starting from the left of the plot).","This behavior can be flipped by using `transpose`.","Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) elements.","If M (N), then the coordinates correspond to the center of the","heatmap cells and the cells have equal width.","If M+1 (N+1), then the coordinates correspond to the edges of the","heatmap cells.","In the case where `z` is a 1D {array}, the x and y coordinates must be","provided in `x` and `y` respectively to form data triplets."].join(" ")}}},83622:(e,t,r)=>{"use strict";var n=r(53787),i=[[-1,0],[1,0],[0,-1],[0,1]];function o(e){return.5-.25*Math.min(1,.5*e)}function a(e,t,r){var n,o,a,s,l,c,u,d,f,h,p,m,g,v=0;for(s=0;sm&&(v=Math.max(v,Math.abs(e[o][a]-p)/(g-m))))}return v}e.exports=function(e,t){var r,i=1;for(a(e,t),r=0;r.01;r++)i=a(e,t,o(i));return i>.01&&n.log("interp2d didn't converge quickly",i),e}},51202:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t){e("texttemplate");var r=n.extendFlat({},t.font,{color:"auto",size:"auto"});n.coerceFont(e,"textfont",r)}},43006:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o,a,s){var l,c,u,d=[],f=n.traceIs(e,"contour"),h=n.traceIs(e,"histogram"),p=n.traceIs(e,"gl2d");if(i(t)&&t.length>1&&!h&&"category"!==s.type){var m=t.length;if(!(m<=a))return f?t.slice(0,a):t.slice(0,a+1);if(f||p)d=t.slice(0,a);else if(1===a)d=[t[0]-.5,t[0]+.5];else{for(d=[1.5*t[0]-.5*t[1]],u=1;u{"use strict";var n=r(8996),i=r(25378),o=r(44049),a=r(50973),s=r(28605),l=r(53787),c=r(98224),u=r(48529),d=r(66235),f=r(10948).extractOpts,h=r(10948).makeColorScaleFuncFromTrace,p=r(83580),m=r(81653).LINE_SPACING,g=r(75368),v=r(70059).STYLE,y="heatmap-label";function x(e){return e.selectAll("g."+y)}function b(e){x(e).remove()}function w(e,t){var r=t.length-2,n=l.constrain(l.findBin(e,t),0,r),i=t[n],o=t[n+1],a=l.constrain(n+(e-i)/(o-i)-.5,0,r),s=Math.round(a),c=Math.abs(a-s);return a&&a!==r&&c?{bin0:s,frac:c,bin1:Math.round(s+c/(a-s))}:{bin0:s,bin1:s,frac:0}}function _(e,t){var r=t.length-1,n=l.constrain(l.findBin(e,t),0,r),i=t[n],o=(e-i)/(t[n+1]-i)||0;return o<=0?{bin0:n,bin1:n,frac:0}:o<.5?{bin0:n,bin1:n+1,frac:o}:{bin0:n+1,bin1:n,frac:1-o}}function k(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(255*r[3])}e.exports=function(e,t,r,S){var T=t.xaxis,M=t.yaxis;l.makeTraceGroups(S,r,"hm").each((function(t){var r,S,C,A,E,I,O,P,R=n.select(this),L=t[0],j=L.trace,D=j.xgap||0,z=j.ygap||0,N=L.z,F=L.x,B=L.y,Z=L.xCenter,U=L.yCenter,V=o.traceIs(j,"contour"),H=V?"best":j.zsmooth,W=N.length,G=l.maxRowLength(N),q=!1,Y=!1;for(I=0;void 0===r&&I0;)S=T.c2p(F[I]),I--;for(S0;)E=M.c2p(B[I]),I--;E=T._length||S<=0||A>=M._length||E<=0)return R.selectAll("image").data([]).exit().remove(),void b(R);"fast"===X?($=G,J=W):($=Q,J=ee);var te=document.createElement("canvas");te.width=$,te.height=J;var re,ne,ie=te.getContext("2d",{willReadFrequently:!0}),oe=h(j,{noNumericCheck:!0,returnArray:!0});"fast"===X?(re=q?function(e){return G-1-e}:l.identity,ne=Y?function(e){return W-1-e}:l.identity):(re=function(e){return l.constrain(Math.round(T.c2p(F[e])-r),0,Q)},ne=function(e){return l.constrain(Math.round(M.c2p(B[e])-A),0,ee)});var ae,se,le,ce,ue=ne(0),de=[ue,ue],fe=q?0:1,he=Y?0:1,pe=0,me=0,ge=0,ve=0;function ye(e,t){if(void 0!==e){var r=oe(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),pe+=t,me+=r[0]*t,ge+=r[1]*t,ve+=r[2]*t,r}return[0,0,0,0]}function xe(e,t,r,n){var i=e[r.bin0];if(void 0===i)return ye(void 0,1);var o,a=e[r.bin1],s=t[r.bin0],l=t[r.bin1],c=a-i||0,u=s-i||0;return o=void 0===a?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-a-s)/3:void 0===s?2*(2*l-a-i)/3:l+i-a-s,ye(i+r.frac*c+n.frac*(u+r.frac*o))}if("default"!==X){var be,we=0;try{be=new Uint8Array($*J*4)}catch(vt){be=new Array($*J*4)}if("smooth"===X){var _e,ke,Se,Te=Z||F,Me=U||B,Ce=new Array(Te.length),Ae=new Array(Me.length),Ee=new Array(Q),Ie=Z?_:w,Oe=U?_:w;for(I=0;IXe||Xe>M._length))for(O=We;O$e||$e>T._length)){var Je=u({x:Ke,y:Ye},j,e._fullLayout);Je.x=Ke,Je.y=Ye;var Qe=L.z[I][O];void 0===Qe?(Je.z="",Je.zLabel=""):(Je.z=Qe,Je.zLabel=s.tickText(Ze,Qe,"hover").text);var et=L.text&&L.text[I]&&L.text[I][O];void 0!==et&&!1!==et||(et=""),Je.text=et;var tt=l.texttemplateString(Fe,Je,e._fullLayout._d3locale,Je,j._meta||{});if(tt){var rt=tt.split("
"),nt=rt.length,it=0;for(P=0;P{"use strict";var n=r(8996);e.exports=function(e){n.select(e).selectAll(".hm image").style("opacity",(function(e){return e.trace.opacity}))}},69904:e=>{"use strict";e.exports=function(e,t,r){!1===r("zsmooth")&&(r("xgap"),r("ygap")),r("zhoverformat")}},54777:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(44049);function a(e,t){var r=t(e);return"scaled"===(r?t(e+"type","array"):"scaled")&&(t(e+"0"),t("d"+e)),r}e.exports=function(e,t,r,s,l,c){var u,d,f=r("z");if(l=l||"x",c=c||"y",void 0===f||!f.length)return 0;if(i.isArray1D(e.z)){u=r(l),d=r(c);var h=i.minRowLength(u),p=i.minRowLength(d);if(0===h||0===p)return 0;t._length=Math.min(h,p,f.length)}else{if(u=a(l,r),d=a(c,r),!function(e){for(var t,r=!0,o=!1,a=!1,s=0;s0&&(o=!0);for(var l=0;l{"use strict";for(var n=r(38710),i=r(8753),o=r(10191).extendFlat,a=r(18693).overrideAll,s=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],l={},c=0;c{"use strict";var n=r(13084).gl_heatmap2d,i=r(28605),o=r(55115);function a(e,t){this.scene=e,this.uid=t,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(e.glplot,this.options),this.heatmap._trace=this}var s=a.prototype;s.handlePick=function(e){var t=this.options,r=t.shape,n=e.pointId,i=n%r[0],o=Math.floor(n/r[0]),a=n;return{trace:this,dataCoord:e.dataCoord,traceCoord:[t.x[i],t.y[o],t.z[a]],textLabel:this.textLabels[n],name:this.name,pointIndex:[o,i],hoverinfo:this.hoverinfo}},s.update=function(e,t){var r=t[0];this.index=e.index,this.name=e.name,this.hoverinfo=e.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var a=n[0].length,s=n.length;this.options.shape=[a,s],this.options.x=r.x,this.options.y=r.y,this.options.zsmooth=e.zsmooth;var l=function(e){for(var t=e.colorscale,r=e.zmin,n=e.zmax,i=t.length,a=new Array(i),s=new Array(4*i),l=0;l{"use strict";var n=r(53787),i=r(54777),o=r(5876),a=r(38234);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}i(e,t,l,s)?(l("text"),l("zsmooth"),o(e,t,s,l,{prefix:"",cLetter:"z"})):t.visible=!1}},20131:(e,t,r)=>{"use strict";var n=["*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:r(38234),supplyDefaults:r(84678),colorbar:r(53693),calc:r(9398),plot:r(7930),moduleType:"trace",name:"heatmapgl",basePlotModule:r(27952),categories:["gl","gl2d","2dMap"],meta:{description:[n,"WebGL version of the heatmap trace type."].join(" ")}}},24750:(e,t,r)=>{"use strict";var n=r(8222),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(32191).si,s=r(92948),l=r(77071),c=r(17458),u=r(10191).extendFlat;e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:i("x"),yhoverformat:i("y"),text:u({},n.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:u({},n.hovertext,{description:"Same as `text`."}),orientation:n.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:l("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:l("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:o({},{keys:c.eventDataKeys}),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:u({},n.textposition,{arrayOk:!1}),textfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:s({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),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}}},92791:e=>{"use strict";e.exports=function(e,t){for(var r=e.length,n=0,i=0;i{"use strict";e.exports=function(e,t){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",t?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",t?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}}},83321:(e,t,r)=>{"use strict";var n=r(51908);e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,i){var o=i[t];return n(o)?(o=Number(o),r[e]+=o,o):0},avg:function(e,t,r,i,o){var a=i[t];return n(a)&&(a=Number(a),r[e]+=a,o[e]++),0},min:function(e,t,r,i){var o=i[t];if(n(o)){if(o=Number(o),!n(r[e]))return r[e]=o,o;if(r[e]>o){var a=o-r[e];return r[e]=o,a}}return 0},max:function(e,t,r,i){var o=i[t];if(n(o)){if(o=Number(o),!n(r[e]))return r[e]=o,o;if(r[e]{"use strict";var n=r(24956),i=n.ONEAVGYEAR,o=n.ONEAVGMONTH,a=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=r(28605).tickIncrement;function d(e,t,r,n){if(e*t<=0)return 1/0;for(var i=Math.abs(t-e),o="date"===r.type,a=f(i,o),s=0;s<10;s++){var l=f(80*a,o);if(a===l)break;if(!h(l,e,t,o,r,n))break;a=l}return a}function f(e,t){return t&&e>c?e>a?e>1.1*i?i:e>1.1*o?o:a:e>s?s:e>l?l:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,o,s){if(n&&e>a){var l=p(t,o,s),c=p(r,o,s),u=e===i?0:1;return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(e,t,r,n,o){var s,l,c=-1.1*t,f=-.1*t,h=e-f,p=r[0],m=r[1],g=Math.min(d(p+f,p+h,n,o),d(m+f,m+h,n,o)),v=Math.min(d(p+c,p+f,n,o),d(m+c,m+f,n,o));if(g>v&&va){var y=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var a=n.c2d(t,i,o),s=a.indexOf("-",y);s>0&&(a=a.substr(0,s));var c=n.d2c(a,0,o);if(c{"use strict";var n=r(51908),i=r(53787),o=r(44049),a=r(28605),s=r(59251),l=r(83321),c=r(68403),u=r(92791),d=r(87359);function f(e,t,r,s,l){var c,u,d,h,p,m,g,v=s+"bins",y=e._fullLayout,x=t["_"+s+"bingroup"],b=y._histogramBinOpts[x],w="overlay"===y.barmode,_=function(e){return r.r2c(e,0,h)},k=function(e){return r.c2r(e,0,h)},S="date"===r.type?function(e){return e||0===e?i.cleanDate(e,null,h):null}:function(e){return n(e)?Number(e):null};function T(e,t,r){t[e+"Found"]?(t[e]=S(t[e]),null===t[e]&&(t[e]=r[e])):(m[e]=t[e]=r[e],i.nestedProperty(u[0],v+"."+e).set(r[e]))}if(t["_"+s+"autoBinFinished"])delete t["_"+s+"autoBinFinished"];else{u=b.traces;var M=[],C=!0,A=!1,E=!1;for(c=0;cr.r2l(N)&&(B=a.tickIncrement(B,b.size,!0,h)),L.start=r.l2r(B),z||i.nestedProperty(t,v+".start").set(L.start)}var Z=b.end,U=r.r2l(R.end),V=void 0!==U;if((b.endFound||V)&&U!==r.r2l(Z)){var H=V?U:i.aggNums(Math.max,null,p);L.end=r.l2r(H),V||i.nestedProperty(t,v+".start").set(L.end)}var W="autobin"+s;return!1===t._input[W]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[W],delete t[W]),[L,p]}e.exports={calc:function(e,t){var r,o,h,p,m=[],g=[],v="h"===t.orientation,y=a.getFromId(e,v?t.yaxis:t.xaxis),x=v?"y":"x",b={x:"y",y:"x"}[x],w=t[x+"calendar"],_=t.cumulative,k=f(e,t,y,x),S=k[0],T=k[1],M="string"===typeof S.size,C=[],A=M?C:S,E=[],I=[],O=[],P=0,R=t.histnorm,L=t.histfunc,j=-1!==R.indexOf("density");_.enabled&&j&&(R=R.replace(/ ?density$/,""),j=!1);var D,z="max"===L||"min"===L?null:0,N=l.count,F=c[R],B=!1,Z=function(e){return y.r2c(e,0,w)};for(i.isArrayOrTypedArray(t[b])&&"count"!==L&&(D=t[b],B="avg"===L,N=l[L]),r=Z(S.start),h=Z(S.end)+(r-a.tickIncrement(r,S.size,!1,w))/1e6;r=0&&p=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(g,_.direction,_.currentbin);var $=Math.min(m.length,g.length),J=[],Q=0,ee=$-1;for(r=0;r<$;r++)if(g[r]){Q=r;break}for(r=$-1;r>=Q;r--)if(g[r]){ee=r;break}for(r=Q;r<=ee;r++)if(n(m[r])&&n(g[r])){var te={p:m[r],s:g[r],b:0};_.enabled||(te.pts=O[r],G?te.ph0=te.ph1=O[r].length?T[O[r][0]]:m[r]:(t._computePh=!0,te.ph0=H(C[r]),te.ph1=H(C[r+1],!0))),J.push(te)}return 1===J.length&&(J[0].width1=a.tickIncrement(J[0].p,S.size,!1,w)-J[0].p),s(J,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(J,t,X),J},calcAllAutoBins:f}},17458:e=>{"use strict";e.exports={eventDataKeys:["binNumber"]}},46700:(e,t,r)=>{"use strict";var n=r(53787),i=r(24279),o=r(44049).traceIs,a=r(25305),s=n.nestedProperty,l=r(14511).getAxisGroup,c=[{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"}],u=["x","y"];e.exports=function(e,t){var r,d,f,h,p,m,g,v=t._histogramBinOpts={},y=[],x={},b=[];function w(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function _(e){return"v"===e.orientation?"x":"y"}function k(e,r,o){var a=e.uid+"__"+o;r||(r=a);var s=function(e,r){return i.getFromTrace({_fullLayout:t},e,r).type}(e,o),l=e[o+"calendar"]||"",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(o)):(r=a,s!==c.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[r]={traces:[e],dirs:[o],axType:s,calendar:e[o+"calendar"]||""}),e["_"+o+"bingroup"]=r}for(p=0;p{"use strict";var n=r(44049),i=r(53787),o=r(66235),a=r(6099).handleText,s=r(8743),l=r(24750);e.exports=function(e,t,r,c){function u(r,n){return i.coerce(e,t,l,r,n)}var d=u("x"),f=u("y");u("cumulative.enabled")&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var h=u("textposition");a(e,t,c,u,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat");var p=u("orientation",f&&!d?"h":"v"),m="v"===p?"x":"y",g="v"===p?"y":"x",v=d&&f?Math.min(i.minRowLength(d)&&i.minRowLength(f)):i.minRowLength(t[m]||[]);if(v){t._length=v,n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],c),t[g]&&u("histfunc"),u("histnorm"),u("autobin"+m),s(e,t,u,r,c),i.coerceSelectionMarkerOpacity(t,u);var y=(t.marker.line||{}).color,x=n.getComponentMethod("errorbars","supplyDefaults");x(e,t,y||o.defaultLine,{axis:"y"}),x(e,t,y||o.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},56002:e=>{"use strict";e.exports=function(e,t,r,n,i){if(e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(r.cumulative||{}).enabled){var o,a=Array.isArray(i)?n[0].pts[i[0]][i[1]]:n[i].pts;if(e.pointNumbers=a,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex,r._indexToPoints){o=[];for(var s=0;s{"use strict";var n=r(48363).hoverPoints,i=r(28605).hoverLabelText;e.exports=function(e,t,r,o,a){var s=n(e,t,r,o,a);if(s){var l=(e=s[0]).cd[e.index],c=e.cd[0].trace;if(!c.cumulative.enabled){var u="h"===c.orientation?"y":"x";e[u+"Label"]=i(e[u+"a"],[l.ph0,l.ph1],c[u+"hoverformat"])}return s}}},78799:(e,t,r)=>{"use strict";e.exports={attributes:r(24750),layoutAttributes:r(90871),supplyDefaults:r(92287),crossTraceDefaults:r(46700),supplyLayoutDefaults:r(57690),calc:r(94683).calc,crossTraceCalc:r(39713).crossTraceCalc,plot:r(88430).plot,layerName:"barlayer",style:r(29527).style,styleOnSelect:r(29527).styleOnSelect,colorbar:r(68971),hoverPoints:r(5377),selectPoints:r(22145),eventData:r(56002),moduleType:"trace",name:"histogram",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}}},68403:e=>{"use strict";e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";var n=r(24750),i=r(77071),o=r(38710),a=r(27231),s=r(89849).axisHoverFormat,l=r(32191).fF,c=r(32191).si,u=r(8753),d=r(10191).extendFlat;e.exports=d({x:n.x,y:n.y,z:{valType:"data_array",editType:"calc",description:"Sets the aggregation data."},marker:{color:{valType:"data_array",editType:"calc",description:"Sets the aggregation data."},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:d({},n.bingroup,{description:["Set the `xbingroup` and `ybingroup` default prefix","For example, setting a `bingroup` of *1* on two histogram2d traces","will make them their x-bins and y-bins match separately."].join(" ")}),xbingroup:d({},n.bingroup,{description:["Set a group of histogram traces which will have compatible x-bin settings.","Using `xbingroup`, histogram2d and histogram2dcontour traces ","(on axes of the same axis type) can have compatible x-bin settings.","Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`"].join(" ")}),ybingroup:d({},n.bingroup,{description:["Set a group of histogram traces which will have compatible y-bin settings.","Using `ybingroup`, histogram2d and histogram2dcontour traces ","(on axes of the same axis type) can have compatible y-bin settings.","Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`"].join(" ")}),xgap:o.xgap,ygap:o.ygap,zsmooth:o.zsmooth,xhoverformat:s("x"),yhoverformat:s("y"),zhoverformat:s("z",1),hovertemplate:l({},{keys:"z"}),texttemplate:c({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:o.textfont,showlegend:d({},a.showlegend,{dflt:!1})},u("",{cLetter:"z",autoColorDflt:!1}))},1823:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(83321),a=r(68403),s=r(92791),l=r(87359),c=r(94683).calcAllAutoBins;function u(e,t,r,n){var i,o=new Array(e);if(n)for(i=0;iC&&k.splice(C,k.length-C),M.length>C&&M.splice(C,M.length-C);var A=[],E=[],I=[],O="string"===typeof _.size,P="string"===typeof T.size,R=[],L=[],j=O?R:_,D=P?L:T,z=0,N=[],F=[],B=t.histnorm,Z=t.histfunc,U=-1!==B.indexOf("density"),V="max"===Z||"min"===Z?null:0,H=o.count,W=a[B],G=!1,q=[],Y=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==Z&&(G="avg"===Z,H=o[Z]);var K=_.size,$=x(_.start),J=x(_.end)+($-i.tickIncrement($,K,!1,v))/1e6;for(r=$;r=0&&h=0&&p{"use strict";var n=r(53787),i=r(18867),o=r(69904),a=r(5876),s=r(51202),l=r(54733);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,l,r,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,c),a(e,t,c,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),s(u,c),u("xhoverformat"),u("yhoverformat"))}},82700:(e,t,r)=>{"use strict";var n=r(88338),i=r(28605).hoverLabelText;e.exports=function(e,t,r,o,a){var s=n(e,t,r,o,a);if(s){var l=(e=s[0]).index,c=l[0],u=l[1],d=e.cd[0],f=d.trace,h=d.xRanges[u],p=d.yRanges[c];return e.xLabel=i(e.xa,[h[0],h[1]],f.xhoverformat),e.yLabel=i(e.ya,[p[0],p[1]],f.yhoverformat),s}}},82298:(e,t,r)=>{"use strict";e.exports={attributes:r(54733),supplyDefaults:r(82147),crossTraceDefaults:r(46700),calc:r(9398),plot:r(91581),layerName:"heatmaplayer",colorbar:r(53693),style:r(78290),hoverPoints:r(82700),eventData:r(56002),moduleType:"trace",name:"histogram2d",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{hrName:"histogram_2d",description:["The sample data from which statistics are computed is set in `x`","and `y` (where `x` and `y` represent marginal distributions,","binning is set in `xbins` and `ybins` in this case)","or `z` (where `z` represent the 2D distribution and binning set,","binning is set by `x` and `y` in this case).","The resulting distribution is visualized as a heatmap."].join(" ")}}},18867:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports=function(e,t,r,o){var a=r("x"),s=r("y"),l=i.minRowLength(a),c=i.minRowLength(s);l&&c?(t._length=Math.min(l,c),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],o),(r("z")||r("marker.color"))&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")):t.visible=!1}},44112:(e,t,r)=>{"use strict";var n=r(54733),i=r(24515),o=r(8753),a=r(89849).axisHoverFormat,s=r(10191).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,description:"Sets the contour line width in (in px)"}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:n.hovertemplate,texttemplate:i.texttemplate,textfont:i.textfont},o("",{cLetter:"z",editTypeOverride:"calc"}))},54504:(e,t,r)=>{"use strict";var n=r(53787),i=r(18867),o=r(4347),a=r(18779),s=r(51202),l=r(44112);e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,l,r,i)}i(e,t,u,c),!1!==t.visible&&(o(e,t,u,(function(r){return n.coerce2(e,t,l,r)})),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),t.contours&&"heatmap"===t.contours.coloring&&s(u,c))}},34395:(e,t,r)=>{"use strict";e.exports={attributes:r(44112),supplyDefaults:r(54504),crossTraceDefaults:r(46700),calc:r(58167),plot:r(77551).plot,layerName:"contourlayer",style:r(45660),colorbar:r(70232),hoverPoints:r(53233),moduleType:"trace",name:"histogram2dcontour",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{hrName:"histogram_2d_contour",description:["The sample data from which statistics are computed is set in `x`","and `y` (where `x` and `y` represent marginal distributions,","binning is set in `xbins` and `ybins` in this case)","or `z` (where `z` represent the 2D distribution and binning set,","binning is set by `x` and `y` in this case).","The resulting distribution is visualized as a contour plot."].join(" ")}}},72607:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(8753),a=r(29707).Y,s=r(10650),l=r(75542),c=r(67304),u=r(50668),d=r(10191).extendFlat,f=r(93701).u;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",description:["When set in conjunction with `tiling.flip`, determines on","which side the root nodes are drawn in the chart. If","`tiling.orientation` is *v* and `tiling.flip` is **, the root","nodes appear at the top. If `tiling.orientation` is *v* and","`tiling.flip` is *y*, the root nodes appear at the bottom. If","`tiling.orientation` is *h* and `tiling.flip` is **, the","root nodes appear at the left. If `tiling.orientation` is *h*","and `tiling.flip` is *x*, the root nodes appear at the right."].join(" ")},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:d({colors:l.marker.colors,line:l.marker.line,pattern:f,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,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.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:a({name:"icicle",trace:!0,editType:"calc"})}},2513:(e,t,r)=>{"use strict";var n=r(44115);t.name="icicle",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},96482:(e,t,r)=>{"use strict";var n=r(27411);t.y=function(e,t){return n.calc(e,t)},t.T=function(e){return n._runCrossTraceCalc("icicle",e)}},24546:(e,t,r)=>{"use strict";var n=r(53787),i=r(72607),o=r(66235),a=r(29707).c,s=r(6099).handleText,l=r(22331).TEXTPAD,c=r(24530).handleMarkerDefaults,u=r(10948),d=u.hasColorscale,f=u.handleDefaults;e.exports=function(e,t,r,u){function h(r,o){return n.coerce(e,t,i,r,o)}var p=h("labels"),m=h("parents");if(p&&p.length&&m&&m.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"),t.texttemplate||h("textinfo",Array.isArray(v)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(e,t,u,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition"),c(e,t,u,h);var x=t._hasColorscale=d(e,"marker","colors")||(e.marker||{}).coloraxis;x&&f(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:o.contrast(u.paper_bgcolor)}}},y&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),a(t,u,h),t._length=null}else t.visible=!1}},94748:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(19331),l=r(70397).styleOne,c=r(50668),u=r(34636),d=r(38638),f=r(96938).formatSliceLabel,h=!1;e.exports=function(e,t,r,p,m){var g=m.width,v=m.height,y=m.viewX,x=m.viewY,b=m.pathSlice,w=m.toMoveInsideSlice,_=m.strTransform,k=m.hasTransition,S=m.handleSlicesExit,T=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,C=m.prevEntry,A=e._context.staticPlot,E=e._fullLayout,I=t[0].trace,O=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),R=-1!==I.textposition.indexOf("bottom"),L=s(r,[g,v],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}).descendants(),j=1/0,D=-1/0;L.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(j=Math.min(j,t),D=Math.max(D,t))})),p=p.data(L,u.getPtId),I._maxVisibleLayers=isFinite(D)?D-j+1:0,p.enter().append("g").classed("slice",!0),S(p,h,{},[g,v],b),p.order();var z=null;if(k&&C){var N=u.getPtId(C);p.each((function(e){null===z&&u.getPtId(e)===N&&(z={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var F=function(){return z||{x0:0,x1:g,y0:0,y1:v}},B=p;return k&&(B=B.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),B.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-I.tiling.pad),s._hoverY=x(R?s.y1-I.tiling.pad/2:s.y0+I.tiling.pad/2);var p=n.select(this),m=i.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?m.transition().attrTween("d",(function(e){var t=T(e,h,F(),[g,v],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(e){return b(t(e))}})):m.attr("d",b),p.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),m.call(l,s,I,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=f(s,r,I,t,E)||"";var S=i.ensureSingle(p,"g","slicetext"),C=i.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),L=i.ensureUniformFontSize(e,u.determineTextFont(I,s,E.font));C.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":O?"start":"middle").call(o.font,L).call(a.convertToTspans,e),s.textBB=o.bBox(C.node()),s.transform=w(s,{fontSize:L.size}),s.transform.fontSize=L.size,k?C.transition().attrTween("transform",(function(e){var t=M(e,h,F(),[g,v]);return function(e){return _(t(e))}})):C.attr("transform",_(s))})),z}},28507:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"icicle",basePlotModule:r(2513),categories:[],animatable:!0,attributes:r(72607),layoutAttributes:r(91936),supplyDefaults:r(24546),supplyLayoutDefaults:r(98940),calc:r(96482).y,crossTraceCalc:r(96482).T,plot:r(14243),style:r(70397).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The icicle sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}},91936:e=>{"use strict";e.exports={iciclecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default icicle slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendiciclecolors`."].join(" ")},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the icicle slice colors (whether given by `iciclecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},98940:(e,t,r)=>{"use strict";var n=r(53787),i=r(91936);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("iciclecolorway",t.colorway),r("extendiciclecolors")}},19331:(e,t,r)=>{"use strict";var n=r(23554),i=r(72276);e.exports=function(e,t,r){var o=r.flipX,a=r.flipY,s="h"===r.orientation,l=r.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var d=n.partition().padding(r.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||o||a)&&i(d,t,{swapXY:s,flipX:o,flipY:a}),d}},14243:(e,t,r)=>{"use strict";var n=r(62470),i=r(94748);e.exports=function(e,t,r,o){return n(e,t,r,o,{type:"icicle",drawDescendants:i})}},70397:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(22684).resizeText,s=r(74927);function l(e,t,r,n){var a=t.data.data,l=!t.children,c=a.i,u=o.castOption(r,c,"marker.line.color")||i.defaultLine,d=o.castOption(r,c,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",d).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},95399:(e,t,r)=>{"use strict";for(var n=r(27231),i=r(32191).fF,o=r(10191).extendFlat,a=r(58589).colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],c=[],u=0;u][;base64],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:s,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",l.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",c.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:o({},n.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:i({},{keys:["z","color","colormodel"]}),transforms:void 0})},79585:(e,t,r)=>{"use strict";var n=r(53787),i=r(58589),o=r(51908),a=r(28605),s=r(53787).maxRowLength,l=r(89361).A;function c(e,t,r,i){return function(o){return n.constrain((o-e)*t,r,i)}}function u(e,t){return function(r){return n.constrain(r,e,t)}}e.exports=function(e,t){var r,n;if(t._hasZ)r=t.z.length,n=s(t.z);else if(t._hasSource){var d=l(t.source);r=d.height,n=d.width}var f,h=a.getFromId(e,t.xaxis||"x"),p=a.getFromId(e,t.yaxis||"y"),m=h.d2c(t.x0)-t.dx/2,g=p.d2c(t.y0)-t.dy/2,v=[m,m+n*t.dx],y=[g,g+r*t.dy];if(h&&"log"===h.type)for(f=0;f{"use strict";e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.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(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}},80338:(e,t,r)=>{"use strict";var n=r(53787),i=r(95399),o=r(58589),a=r(82231).IMAGE_URL_PREFIX;e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=r("z");(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),t._hasZ||t._hasSource)?(r("x0"),r("y0"),r("dx"),r("dy"),t._hasZ?(r("colormodel","rgb"),r("zmin",(s=o.colormodel[t.colormodel]).zminDflt||s.min),r("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=o.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),r("zsmooth"),r("text"),r("hovertext"),r("hovertemplate"),t._length=null):t.visible=!1}},86166:e=>{"use strict";e.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}},89361:(e,t,r)=>{"use strict";var n=r(2132),i=r(82231).IMAGE_URL_PREFIX,o=r(40918).Buffer;t.A=function(e){var t=e.replace(i,""),r=new o(t,"base64");return n(r)}},58555:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(58589);e.exports=function(e,t,r){var a=e.cd[0],s=a.trace,l=e.xa,c=e.ya;if(!(n.inbox(t-a.x0,t-(a.x0+a.w*s.dx),0)>0||n.inbox(r-a.y0,r-(a.y0+a.h*s.dy),0)>0)){var u,d=Math.floor((t-a.x0)/s.dx),f=Math.floor(Math.abs(r-a.y0)/s.dy);if(s._hasZ?u=a.z[f][d]:s._hasSource&&(u=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,f,1,1).data),u){var h,p=a.hi||s.hoverinfo;if(p){var m=p.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(h=!0)}var g,v=o.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),w=v.suffix,_=[];(s.hovertemplate||h)&&(_.push("["+[b[0]+w[0],b[1]+w[1],b[2]+w[2]].join(", ")),4===x&&_.push(", "+b[3]+w[3]),_.push("]"),_=_.join(""),e.extraText=y.toUpperCase()+": "+_),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[f])?g=s.hovertext[f][d]:Array.isArray(s.text)&&Array.isArray(s.text[f])&&(g=s.text[f][d]);var k=c.c2p(a.y0+(f+.5)*s.dy),S=a.x0+(d+.5)*s.dx,T=a.y0+(f+.5)*s.dy,M="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[f,d],x0:l.c2p(a.x0+d*s.dx),x1:l.c2p(a.x0+(d+1)*s.dx),y0:k,y1:k,color:b,xVal:S,xLabelVal:S,yVal:T,yLabelVal:T,zLabelVal:M,text:g,hovertemplateLabels:{zLabel:M,colorLabel:_,"color[0]Label":b[0]+w[0],"color[1]Label":b[1]+w[1],"color[2]Label":b[2]+w[2],"color[3]Label":b[3]+w[3]}})]}}}},57569:(e,t,r)=>{"use strict";e.exports={attributes:r(95399),supplyDefaults:r(80338),calc:r(79585),plot:r(94428),style:r(41280),hoverPoints:r(58555),eventData:r(86166),moduleType:"trace",name:"image",basePlotModule:r(48206),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{description:["Display an image, i.e. data on a 2D regular raster.","By default, when an image is displayed in a subplot,","its y axis will be reversed (ie. `autorange: 'reversed'`),","constrained to the domain (ie. `constrain: 'domain'`)","and it will have the same scale as its x axis (ie. `scaleanchor: 'x,`)","in order for pixels to be rendered as squares."].join(" ")}}},94428:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.strTranslate,a=r(83580),s=r(58589),l=r(75368),c=r(70059).STYLE;e.exports=function(e,t,r,u){var d=t.xaxis,f=t.yaxis,h=!e._context._exportedPlot&&l();i.makeTraceGroups(u,r,"im").each((function(t){var r=n.select(this),l=t[0],u=l.trace,p=("fast"===u.zsmooth||!1===u.zsmooth&&h)&&!u._hasZ&&u._hasSource&&"linear"===d.type&&"linear"===f.type;u._realImage=p;var m,g,v,y,x,b,w=l.z,_=l.x0,k=l.y0,S=l.w,T=l.h,M=u.dx,C=u.dy;for(b=0;void 0===m&&b0;)g=d.c2p(_+b*M),b--;for(b=0;void 0===y&&b0;)x=f.c2p(k+b*C),b--;if(gR[0];if(L||j){var D=m+A/2,z=y+E/2;O+="transform:"+o(D+"px",z+"px")+"scale("+(L?-1:1)+","+(j?-1:1)+")"+o(-D+"px",-z+"px")+";"}}I.attr("style",O);var N=new Promise((function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===S&&u._canvas.el.height===T&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=S,t.height=T;var r=t.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:t,source:u.source},e()},n.setAttribute("src",u.source)}})).then((function(){var e,t;if(u._hasZ)t=F((function(e,t){return w[t][e]})),e=t.toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var r=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,S,T).data;t=F((function(e,t){var n=4*(t*S+e);return[r[n],r[n+1],r[n+2],r[n+3]]})),e=t.toDataURL("image/png")}I.attr({"xlink:href":e,height:E,width:A,x:m,y:y})}));e._promises.push(N)}function F(e){var t=document.createElement("canvas");t.width=A,t.height=E;var r,n=t.getContext("2d",{willReadFrequently:!0}),o=function(e){return i.constrain(Math.round(d.c2p(_+e*M)-m),0,A)},a=function(e){return i.constrain(Math.round(f.c2p(k+e*C)-y),0,E)},c=s.colormodel[u.colormodel],h=c.colormodel||u.colormodel,p=c.fmt;for(b=0;b{"use strict";var n=r(8996);e.exports=function(e){n.select(e).selectAll(".im image").style("opacity",(function(e){return e[0].trace.opacity}))}},75983:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(10191).extendDeep,o=r(18693).overrideAll,a=r(92948),s=r(18022),l=r(29707).Y,c=r(45446),u=r(99862).templatedArray,d=r(59933),f=r(89849).descriptionOnlyNumbers,h=a({editType:"plot",colorEditType:"plot"}),p={color:{valType:"color",editType:"plot",description:["Sets the background color of the arc."].join(" ")},line:{color:{valType:"color",dflt:s.defaultLine,editType:"plot",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot",description:["Sets the thickness of the bar as a fraction of the total thickness of the gauge."].join(" ")},editType:"calc"},m={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot",description:["Sets the range of this axis."].join(" ")},g=u("step",i({},p,{range:m}));e.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number",description:["Determines how the value is displayed on the graph.","`number` displays the value numerically in text.","`delta` displays the difference to a reference value in text.","Finally, `gauge` displays the value graphically on an axis."].join(" ")},value:{valType:"number",editType:"calc",anim:!0,description:["Sets the number to be displayed."].join(" ")},align:{valType:"enumerated",values:["left","center","right"],editType:"plot",description:["Sets the horizontal alignment of the `text` within the box.","Note that this attribute has no effect if an angular gauge is displayed:","in this case, it is always centered"].join(" ")},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot",description:["Sets the title of this indicator."].join(" ")},align:{valType:"enumerated",values:["left","center","right"],editType:"plot",description:["Sets the horizontal alignment of the title.","It defaults to `center` except for bullet charts","for which it defaults to right."].join(" ")},font:n({},h,{description:["Set the font used to display the title"].join(" ")}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:f("value")},font:n({},h,{description:["Set the font used to display main number"].join(" ")}),prefix:{valType:"string",dflt:"",editType:"plot",description:["Sets a prefix appearing before the number."].join(" ")},suffix:{valType:"string",dflt:"",editType:"plot",description:["Sets a suffix appearing next to the number."].join(" ")},editType:"plot"},delta:{reference:{valType:"number",editType:"calc",description:["Sets the reference value to compute the delta.","By default, it is set to the current value."].join(" ")},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot",description:["Sets the position of delta with respect to the number."].join(" ")},relative:{valType:"boolean",editType:"plot",dflt:!1,description:["Show relative change"].join(" ")},valueformat:{valType:"string",editType:"plot",description:f("value")},increasing:{symbol:{valType:"string",dflt:d.INCREASING.SYMBOL,editType:"plot",description:["Sets the symbol to display for increasing value"].join(" ")},color:{valType:"color",dflt:d.INCREASING.COLOR,editType:"plot",description:["Sets the color for increasing value."].join(" ")},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:d.DECREASING.SYMBOL,editType:"plot",description:["Sets the symbol to display for increasing value"].join(" ")},color:{valType:"color",dflt:d.DECREASING.COLOR,editType:"plot",description:["Sets the color for increasing value."].join(" ")},editType:"plot"},font:n({},h,{description:["Set the font used to display the delta"].join(" ")}),prefix:{valType:"string",dflt:"",editType:"plot",description:["Sets a prefix appearing before the delta."].join(" ")},suffix:{valType:"string",dflt:"",editType:"plot",description:["Sets a suffix appearing next to the delta."].join(" ")},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"],description:["Set the shape of the gauge"].join(" ")},bar:i({},p,{color:{dflt:"green"},description:["Set the appearance of the gauge's value"].join(" ")}),bgcolor:{valType:"color",editType:"plot",description:"Sets the gauge background color."},bordercolor:{valType:"color",dflt:s.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the gauge."},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot",description:"Sets the width (in px) of the border enclosing the gauge."},axis:o({range:m,visible:n({},c.visible,{dflt:!0}),tickmode:c.minor.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:n({},c.ticks,{dflt:"outside"}),ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,ticklabelstep:c.ticklabelstep,showticklabels:c.showticklabels,labelalias:c.labelalias,tickfont:a({description:"Sets the color bar's tick label font"}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,minexponent:c.minexponent,showexponent:c.showexponent,editType:"plot"},"plot"),steps:g,threshold:{line:{color:n({},p.line.color,{description:["Sets the color of the threshold line."].join(" ")}),width:n({},p.line.width,{dflt:1,description:["Sets the width (in px) of the threshold line."].join(" ")}),editType:"plot"},thickness:n({},p.thickness,{dflt:.85,description:["Sets the thickness of the threshold line as a fraction of the thickness of the gauge."].join(" ")}),value:{valType:"number",editType:"calc",dflt:!1,description:["Sets a treshold value drawn as a line."].join(" ")},editType:"plot"},description:"The gauge of the Indicator plot.",editType:"plot"}}},94240:(e,t,r)=>{"use strict";var n=r(44115);t.name="indicator",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},76980:e=>{"use strict";e.exports={calc:function(e,t){var r=[],n=t.value;"number"!==typeof t._lastValue&&(t._lastValue=t.value);var i=t._lastValue,o=i;return t._hasDelta&&"number"===typeof t.delta.reference&&(o=t.delta.reference),r[0]={y:n,lastY:i,delta:n-o,relativeDelta:(n-o)/o},r}}},39613:e=>{"use strict";e.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},16542:(e,t,r)=>{"use strict";var n=r(53787),i=r(75983),o=r(29707).c,a=r(99862),s=r(80254),l=r(39613),c=r(96592),u=r(64698),d=r(46139),f=r(33095);function h(e,t){function r(r,o){return n.coerce(e,t,i.gauge.steps,r,o)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}e.exports={supplyDefaults:function(e,t,r,p){function m(r,o){return n.coerce(e,t,i,r,o)}o(t,p,m),m("mode"),t._hasNumber=-1!==t.mode.indexOf("number"),t._hasDelta=-1!==t.mode.indexOf("delta"),t._hasGauge=-1!==t.mode.indexOf("gauge");var g=m("value");t._range=[0,"number"===typeof g?1.5*g:1];var v,y,x,b,w,_,k=new Array(2);function S(e,t){return n.coerce(x,b,i.gauge,e,t)}function T(e,t){return n.coerce(w,_,i.gauge.axis,e,t)}if(t._hasNumber&&(m("number.valueformat"),m("number.font.color",p.font.color),m("number.font.family",p.font.family),m("number.font.size"),void 0===t.number.font.size&&(t.number.font.size=l.defaultNumberFontSize,k[0]=!0),m("number.prefix"),m("number.suffix"),v=t.number.font.size),t._hasDelta&&(m("delta.font.color",p.font.color),m("delta.font.family",p.font.family),m("delta.font.size"),void 0===t.delta.font.size&&(t.delta.font.size=(t._hasNumber?.5:1)*(v||l.defaultNumberFontSize),k[1]=!0),m("delta.reference",t.value),m("delta.relative"),m("delta.valueformat",t.delta.relative?"2%":""),m("delta.increasing.symbol"),m("delta.increasing.color"),m("delta.decreasing.symbol"),m("delta.decreasing.color"),m("delta.position"),m("delta.prefix"),m("delta.suffix"),y=t.delta.font.size),t._scaleNumbers=(!t._hasNumber||k[0])&&(!t._hasDelta||k[1])||!1,m("title.font.color",p.font.color),m("title.font.family",p.font.family),m("title.font.size",.25*(v||y||l.defaultNumberFontSize)),m("title.text"),t._hasGauge){(x=e.gauge)||(x={}),b=a.newContainer(t,"gauge"),S("shape"),(t._isBullet="bullet"===t.gauge.shape)||m("title.align","center"),(t._isAngular="angular"===t.gauge.shape)||m("align","center"),S("bgcolor",p.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width"),S("bar.thickness",l.valueThickness*("bullet"===t.gauge.shape?.5:1)),s(x,b,{name:"steps",handleItemDefaults:h}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),w={},x&&(w=x.axis||{}),_=a.newContainer(b,"axis"),T("visible"),t._range=T("range",t._range);var M={outerTicks:!0};c(w,_,T,"linear"),f(w,_,T,"linear",M),d(w,_,T,"linear",M),u(w,_,T,M)}else m("title.align","center"),m("align","center"),t._isAngular=t._isBullet=!1;t._length=null}}},70004:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"indicator",basePlotModule:r(94240),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:r(75983),supplyDefaults:r(16542).supplyDefaults,calc:r(76980).calc,plot:r(20261),meta:{description:["An indicator is used to visualize a single `value` along with some","contextual information such as `steps` or a `threshold`, using a","combination of three visual elements: a number, a delta, and/or a gauge.","Deltas are taken with respect to a `reference`.","Gauges can be either angular or bullet (aka linear) gauges."].join(" ")}}},20261:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).sX,o=r(81105).k4,a=r(53787),s=a.strScale,l=a.strTranslate,c=a.rad2deg,u=r(81653).MID_SHIFT,d=r(50973),f=r(39613),h=r(98224),p=r(28605),m=r(90471),g=r(75486),v=r(45446),y=r(66235),x={left:"start",center:"middle",right:"end"},b={left:0,center:.5,right:1},w=/[yzafpn\xb5mkMGTPEZY]/;function _(e){return e&&e.duration>0}function k(e){e.each((function(e){y.stroke(n.select(this),e.line.color)})).each((function(e){y.fill(n.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function S(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,v,e,t)}return m(i,o,l,s,n),g(i,o,l,s),o}function T(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function M(e,t,r,i){var o=document.createElementNS("http://www.w3.org/2000/svg","text"),a=n.select(o);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(h.convertToTspans,i).call(d.font,t),d.bBox(a.node())}function C(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}e.exports=function(e,t,r,m){var g,v=e._fullLayout;_(r)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each((function(t){var m,A,E,I,O,P=t[0].trace,R=n.select(this),L=P._hasGauge,j=P._isAngular,D=P._isBullet,z=P.domain,N={w:v._size.w*(z.x[1]-z.x[0]),h:v._size.h*(z.y[1]-z.y[0]),l:v._size.l+v._size.w*z.x[0],r:v._size.r+v._size.w*(1-z.x[1]),t:v._size.t+v._size.h*(1-z.y[1]),b:v._size.b+v._size.h*z.y[0]},F=N.l+N.w/2,B=N.t+N.h/2,Z=Math.min(N.w/2,N.h),U=f.innerRadius*Z,V=P.align||"center";if(A=B,L){if(j&&(m=F,A=B+Z/2,E=function(e){return function(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}(e,.9*U)}),D){var H=f.bulletPadding,W=1-f.bulletNumberDomainSize+H;m=N.l+(W+(1-W)*b[V])*N.w,E=function(e){return T(e,(f.bulletNumberDomainSize-H)*N.w,N.h)}}}else m=N.l+b[V]*N.w,E=function(e){return T(e,N.w,N.h)};!function(e,t,r,i){var c,u,f,m=r[0].trace,g=i.numbersX,v=i.numbersY,k=m.align||"center",T=x[k],A=i.transitionOpts,E=i.onComplete,I=a.ensureSingle(t,"g","numbers"),O=[];m._hasNumber&&O.push("number");m._hasDelta&&(O.push("delta"),"left"===m.delta.position&&O.reverse());var P=I.selectAll("text").data(O);function R(t,r,n,i){if(!t.match("s")||n>=0===i>=0||r(n).slice(-1).match(w)||r(i).slice(-1).match(w))return r;var o=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),a=S(e,{tickformat:o});return function(e){return Math.abs(e)<1?p.tickText(a,e).text:r(e)}}function L(){var t=S(e,{tickformat:m.number.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=m.number.suffix,s=m.number.prefix,l=I.select("text.number");function u(){var t="number"===typeof r[0].y?s+i(r[0].y)+a:"-";l.text(t).call(d.font,m.number.font).call(h.convertToTspans,e)}return _(A)?l.transition().duration(A.duration).ease(A.easing).each("end",(function(){u(),E&&E()})).each("interrupt",(function(){u(),E&&E()})).attrTween("text",(function(){var e=n.select(this),t=o(r[0].lastY,r[0].y);m._lastValue=r[0].y;var l=R(m.number.valueformat,i,r[0].lastY,r[0].y);return function(r){e.text(s+l(t(r))+a)}})):u(),c=M(s+i(r[0].y)+a,m.number.font,T,e),l}function j(){var t=S(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),p.prepTicks(t);var i=function(e){return p.tickText(t,e).text},a=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!==typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+a},f=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(r[0]));var g=I.select("text.delta");function v(){g.text(c(l(r[0]),i)).call(y.fill,f(r[0])).call(h.convertToTspans,e)}return g.call(d.font,m.delta.font).call(y.fill,f({delta:m._deltaLastValue})),_(A)?g.transition().duration(A.duration).ease(A.easing).tween("text",(function(){var e=n.select(this),t=l(r[0]),a=m._deltaLastValue,s=R(m.delta.valueformat,i,a,t),u=o(a,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,f({delta:u(t)}))}})).each("end",(function(){v(),E&&E()})).each("interrupt",(function(){v(),E&&E()})):v(),u=M(c(l(r[0]),i),m.delta.font,T,e),g}P.enter().append("text"),P.attr("text-anchor",(function(){return T})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var D,z=m.mode+m.align;m._hasDelta&&(D=j(),z+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,z+=m.delta.increasing.symbol+m.delta.decreasing.symbol,f=u);m._hasNumber&&(L(),z+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,f=c);if(m._hasDelta&&m._hasNumber){var N,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],Z=[(u.left+u.right)/2,(u.top+u.bottom)/2],U=.75*m.delta.font.size;"left"===m.delta.position&&(N=C(m,"deltaPos",0,-1*(c.width*b[m.align]+u.width*(1-b[m.align])+U),z,Math.min),F=B[1]-Z[1],f={width:c.width+u.width+U,height:Math.max(c.height,u.height),left:u.left+N,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"right"===m.delta.position&&(N=C(m,"deltaPos",0,c.width*(1-b[m.align])+u.width*b[m.align]+U,z,Math.max),F=B[1]-Z[1],f={width:c.width+u.width+U,height:Math.max(c.height,u.height),left:c.left,right:u.right+N,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"bottom"===m.delta.position&&(N=null,F=u.height,f={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),"top"===m.delta.position&&(N=null,F=c.top,f={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),D.attr({dx:N,dy:F})}(m._hasNumber||m._hasDelta)&&I.attr("transform",(function(){var e=i.numbersScaler(f);z+=e[2];var t,r=C(m,"numbersScale",1,e[0],z,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*f.bottom:v-r*(f.top+f.bottom)/2,m._numbersTop=r*f.top+t;var n=f[k];"center"===k&&(n=(f.left+f.right)/2);var o=g-r*n;return o=C(m,"numbersTranslate",0,o,z,Math.max),l(o,t)+s(r)}))}(e,R,t,{numbersX:m,numbersY:A,numbersScaler:E,transitionOpts:r,onComplete:g}),L&&(I={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},O={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var G=R.selectAll("g.angular").data(j?t:[]);G.exit().remove();var q=R.selectAll("g.angularaxis").data(j?t:[]);q.exit().remove(),j&&function(e,t,r,o){var a,s,d,f,h=r[0].trace,m=o.size,g=o.radius,v=o.innerRadius,y=o.gaugeBg,x=o.gaugeOutline,b=[m.l+m.w/2,m.t+m.h/2+g/2],w=o.gauge,T=o.layer,M=o.transitionOpts,C=o.onComplete,A=Math.PI/2;function E(e){var t=h.gauge.axis.range[0],r=(e-t)/(h.gauge.axis.range[1]-t)*Math.PI-A;return r<-A?-A:r>A?A:r}function I(e){return n.svg.arc().innerRadius((v+g)/2-e/2*(g-v)).outerRadius((v+g)/2+e/2*(g-v)).startAngle(-A)}function O(e){e.attr("d",(function(e){return I(e.thickness).startAngle(E(e.range[0])).endAngle(E(e.range[1]))()}))}w.enter().append("g").classed("angular",!0),w.attr("transform",l(b[0],b[1])),T.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),T.selectAll("g.xangularaxistick,path,text").remove(),a=S(e,h.gauge.axis),a.type="linear",a.range=h.gauge.axis.range,a._id="xangularaxis",a.ticklabeloverflow="allow",a.setScale();var P=function(e){return(a.range[0]-e.x)/(a.range[1]-a.range[0])*Math.PI+Math.PI},R={},L=p.makeLabelFns(a,0).labelStandoff;R.xFn=function(e){var t=P(e);return Math.cos(t)*L},R.yFn=function(e){var t=P(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(L+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*u)},R.anchorFn=function(e){var t=P(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},R.heightFn=function(e,t,r){var n=P(e);return-.5*(1+Math.sin(n))*r};var j=function(e){return l(b[0]+g*Math.cos(e),b[1]-g*Math.sin(e))};d=function(e){return j(P(e))};var D=function(e){var t=P(e);return j(t)+"rotate("+-c(t)+")"};if(s=p.calcTicks(a),f=p.getTickSigns(a)[2],a.visible){f="inside"===a.ticks?-1:1;var z=(a.linewidth||1)/2;p.drawTicks(e,a,{vals:s,layer:T,path:"M"+f*z+",0h"+f*a.ticklen,transFn:D}),p.drawLabels(e,a,{vals:s,layer:T,transFn:d,labelFns:R})}var N=[y].concat(h.gauge.steps),F=w.selectAll("g.bg-arc").data(N);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(O).call(k),F.exit().remove();var B=I(h.gauge.bar.thickness),Z=w.selectAll("g.value-arc").data([h.gauge.bar]);Z.enter().append("g").classed("value-arc",!0).append("path");var U=Z.select("path");_(M)?(U.transition().duration(M.duration).ease(M.easing).each("end",(function(){C&&C()})).each("interrupt",(function(){C&&C()})).attrTween("d",(V=B,H=E(r[0].lastY),W=E(r[0].y),function(){var e=i(H,W);return function(t){return V.endAngle(e(t))()}})),h._lastValue=r[0].y):U.attr("d","number"===typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var V,H,W;U.call(k),Z.exit().remove(),N=[];var G=h.gauge.threshold.value;(G||0===G)&&N.push({range:[G,G],color:h.gauge.threshold.color,line:{color:h.gauge.threshold.line.color,width:h.gauge.threshold.line.width},thickness:h.gauge.threshold.thickness});var q=w.selectAll("g.threshold-arc").data(N);q.enter().append("g").classed("threshold-arc",!0).append("path"),q.select("path").call(O).call(k),q.exit().remove();var Y=w.selectAll("g.gauge-outline").data([x]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(O).call(k),Y.exit().remove()}(e,0,t,{radius:Z,innerRadius:U,gauge:G,layer:q,size:N,gaugeBg:I,gaugeOutline:O,transitionOpts:r,onComplete:g});var Y=R.selectAll("g.bullet").data(D?t:[]);Y.exit().remove();var X=R.selectAll("g.bulletaxis").data(D?t:[]);X.exit().remove(),D&&function(e,t,r,n){var i,o,a,s,c,u=r[0].trace,d=n.gauge,h=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,w=n.onComplete;d.enter().append("g").classed("bullet",!0),d.attr("transform",l(v.l,v.t)),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var T=v.h,M=u.gauge.bar.thickness*T,C=x.x[0],A=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-f.bulletNumberDomainSize:1);i=S(e,u.gauge.axis),i._id="xbulletaxis",i.domain=[C,A],i.setScale(),o=p.calcTicks(i),a=p.makeTransTickFn(i),s=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,o):o,layer:h,path:p.makeTickPath(i,c,s),transFn:a}),p.drawLabels(e,i,{vals:o,layer:h,transFn:a,labelFns:p.makeLabelFns(i,c)}));function E(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*T})).attr("height",(function(e){return e.thickness*T}))}var I=[m].concat(u.gauge.steps),O=d.selectAll("g.bg-bullet").data(I);O.enter().append("g").classed("bg-bullet",!0).append("rect"),O.select("rect").call(E).call(k),O.exit().remove();var P=d.selectAll("g.value-bullet").data([u.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",M).attr("y",(T-M)/2).call(k),_(b)?P.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){w&&w()})).each("interrupt",(function(){w&&w()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"===typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var R=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),L=d.selectAll("g.threshold-bullet").data(R);L.enter().append("g").classed("threshold-bullet",!0).append("line"),L.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*T).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*T).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),L.exit().remove();var j=d.selectAll("g.gauge-outline").data([g]);j.enter().append("g").classed("gauge-outline",!0).append("rect"),j.select("rect").call(E).call(k),j.exit().remove()}(e,0,t,{gauge:Y,layer:X,size:N,gaugeBg:I,gaugeOutline:O,transitionOpts:r,onComplete:g});var K=R.selectAll("text.title").data(t);K.exit().remove(),K.enter().append("text").classed("title",!0),K.attr("text-anchor",(function(){return D?x.right:x[P.title.align]})).text(P.title.text).call(d.font,P.title.font).call(h.convertToTspans,e),K.attr("transform",(function(){var e,t=N.l+N.w*b[P.title.align],r=f.titlePadding,n=d.bBox(K.node());if(L){if(j)if(P.gauge.axis.visible)e=d.bBox(q.node()).top-r-n.bottom;else e=N.t+N.h/2-Z/2-n.bottom-r;D&&(e=A-(n.top+n.bottom)/2,t=N.l-f.bulletPadding*N.w)}else e=P._numbersTop-r-n.bottom;return l(t,e)}))}))}},93720:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c=r(18693).overrideAll;function u(e){return{show:{valType:"boolean",dflt:!1,description:["Determines whether or not slice planes about the",e,"dimension are drawn."].join(" ")},locations:{valType:"data_array",dflt:[],description:["Specifies the location(s) of slices on the axis.","When not specified slices would be created for","all points of the axis",e,"except start and end."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `slices`. The default fill value of the","`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}function d(e){return{show:{valType:"boolean",dflt:!0,description:["Sets the fill ratio of the `slices`. The default fill value of the",e,"`slices` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `caps`. The default fill value of the","`caps` is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")}}}var f=e.exports=c(l({x:{valType:"data_array",description:["Sets the X coordinates of the vertices on X axis."].join(" ")},y:{valType:"data_array",description:["Sets the Y coordinates of the vertices on Y axis."].join(" ")},z:{valType:"data_array",description:["Sets the Z coordinates of the vertices on Z axis."].join(" ")},value:{valType:"data_array",description:["Sets the 4th dimension (value) of the vertices."].join(" ")},isomin:{valType:"number",description:["Sets the minimum boundary for iso-surface plot."].join(" ")},isomax:{valType:"number",description:["Sets the maximum boundary for iso-surface plot."].join(" ")},surface:{show:{valType:"boolean",dflt:!0,description:["Hides/displays surfaces between minimum and maximum iso-values."].join(" ")},count:{valType:"integer",dflt:2,min:1,description:["Sets the number of iso-surfaces between minimum and maximum iso-values.","By default this value is 2 meaning that only minimum and maximum surfaces","would be drawn."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the iso-surface. The default fill value of the","surface is 1 meaning that they are entirely shaded. On the other hand","Applying a `fill` ratio less than one would allow the creation of","openings parallel to the edges."].join(" ")},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all",description:["Sets the surface pattern of the iso-surface 3-D sections. The default pattern of","the surface is `all` meaning that the rest of surface elements would be shaded.","The check options (either 1 or 2) could be used to draw half of the squares","on the surface. Using various combinations of capital `A`, `B`, `C`, `D` and `E`","may also be used to reduce the number of triangles on the iso-surfaces and","creating other patterns of interest."].join(" ")}},spaceframe:{show:{valType:"boolean",dflt:!1,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:.15,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 0.15 meaning that only 15% of the area of every faces of tetras would be","shaded. Applying a greater `fill` ratio would allow the creation of stronger","elements or could be sued to have entirely closed areas (in case of using 1)."].join(" ")}},slices:{x:u("x"),y:u("y"),z:u("z")},caps:{x:d("x"),y:d("y"),z:d("z")},text:{valType:"string",dflt:"",arrayOk:!0,description:["Sets the text elements associated with the vertices.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,description:"Same as `text`."},hovertemplate:o(),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:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");f.flatshading.dflt=!0,f.lighting.facenormalsepsilon.dflt=0,f.x.editType=f.y.editType=f.z.editType=f.value.editType="calc+clearAxisTypes",f.transforms=void 0},81139:(e,t,r)=>{"use strict";var n=r(1631),i=r(67265).processGrid,o=r(67265).filter;e.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length),t._x=o(t.x,t._len),t._y=o(t.y,t._len),t._z=o(t.z,t._len),t._value=o(t.value,t._len);var r=i(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;for(var a=1/0,s=-1/0,l=0;l{"use strict";var n=r(13084).gl_mesh3d,i=r(95049).parseColorScale,o=r(55115),a=r(10948).extractOpts,s=r(51577),l=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function D(e,t){return null===e?t:e}function z(t,r,n){I();var i,o,a,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(e,t){var r=e[0],n=e[1],i=e[2],o=function(e,t,r){for(var n=[],i=0;i-1?n[h]:E(p,m,v);f[h]=x>-1?x:P(p,m,v,D(t,y))}i=f[0],o=f[1],a=f[2],e._meshI.push(i),e._meshJ.push(o),e._meshK.push(a),++g}}function N(e,t,r,n){var i=e[3];in&&(i=n);for(var o=(e[3]-i)/(e[3]-t[3]+1e-9),a=[],s=0;s<4;s++)a[s]=(1-o)*e[s]+o*t[s];return a}function F(e,t,r){return e>=t&&e<=r}function B(e){var t=.001*(A-C);return e>=C-t&&e<=A+t}function Z(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}var U=3;function V(e,t,r,n,i,o){o||(o=1),r=[-1,-1,-1];var a=!1,s=[F(t[0][3],n,i),F(t[1][3],n,i),F(t[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return B(t[0][3])&&B(t[1][3])&&B(t[2][3])?(z(e,t,r),!0):oMath.abs(k-M)?[T,k]:[k,M];ee(r,E[0],E[1])}}var I=[[Math.min(C,M),Math.max(C,M)],[Math.min(T,A),Math.max(T,A)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(d.push(p.id),"x"===r?f.push([p.distRatio,0,0]):"y"===r?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else u=ie(1,"x"===r?b-1:"y"===r?w-1:_-1);d.length>0&&(n[o]="x"===r?te(t,d,a,s,f,n[o]):"y"===r?re(t,d,a,s,f,n[o]):ne(t,d,a,s,f,n[o]),o++),u.length>0&&(n[o]="x"===r?K(t,u,a,s,n[o]):"y"===r?$(t,u,a,s,n[o]):J(t,u,a,s,n[o]),o++)}var m=e.caps[r];m.show&&m.fill&&(L(m.fill),n[o]="x"===r?K(t,[0,b-1],a,s,n[o]):"y"===r?$(t,[0,w-1],a,s,n[o]):J(t,[0,_-1],a,s,n[o]),o++)}})),0===g&&O(),e._meshX=n,e._meshY=i,e._meshZ=o,e._meshIntensity=a,e._Xs=v,e._Ys=y,e._Zs=x}(),e}e.exports={findNearestOnAxis:l,generateIsoMeshes:f,createIsosurfaceTrace:function(e,t){var r=e.glplot.gl,i=n({gl:r}),o=new c(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}}},25430:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(93720),a=r(5876);function s(e,t,r,n,o){var s=o("isomin"),l=o("isomax");void 0!==l&&null!==l&&void 0!==s&&null!==s&&s>l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),d=o("z"),f=o("value");c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length?(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach((function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))})),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("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(e){o(e)})),a(e,t,n,o,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}e.exports={supplyDefaults:function(e,t,r,i){s(e,t,r,i,(function(r,i){return n.coerce(e,t,o,r,i)}))},supplyIsoDefaults:s}},39204:(e,t,r)=>{"use strict";e.exports={attributes:r(93720),supplyDefaults:r(25430).supplyDefaults,calc:r(81139),colorbar:{min:"cmin",max:"cmax"},plot:r(90648).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws isosurfaces between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}},27933:(e,t,r)=>{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(72547),s=r(27231),l=r(10191).extendFlat;e.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the X coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Y coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the Z coordinates of the vertices. The nth element of vectors `x`, `y` and `z`","jointly represent the X, Y and Z coordinates of the nth vertex."].join(" ")},i:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *first* vertex of a triangle. For example, `{i[m], j[m], k[m]}`","together represent face m (triangle m) in the mesh, where `i[m] = n` points to the triplet","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `i` represents a","point in space, which is the first vertex of a triangle."].join(" ")},j:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *second* vertex of a triangle. For example, `{i[m], j[m], k[m]}` ","together represent face m (triangle m) in the mesh, where `j[m] = n` points to the triplet","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `j` represents a","point in space, which is the second vertex of a triangle."].join(" ")},k:{valType:"data_array",editType:"calc",description:["A vector of vertex indices, i.e. integer values between 0 and the length of the vertex","vectors, representing the *third* vertex of a triangle. For example, `{i[m], j[m], k[m]}`","together represent face m (triangle m) in the mesh, where `k[m] = n` points to the triplet ","`{x[n], y[n], z[n]}` in the vertex arrays. Therefore, each element in `k` represents a","point in space, which is the third vertex of a triangle."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets the text elements associated with the vertices.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},hovertemplate:o({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc",description:["Sets the Delaunay axis, which is the axis that is perpendicular to the surface of the","Delaunay triangulation.","It has an effect if `i`, `j`, `k` are not provided and `alphahull` is set to indicate","Delaunay triangulation."].join(" ")},alphahull:{valType:"number",dflt:-1,editType:"calc",description:["Determines how the mesh surface triangles are derived from the set of","vertices (points) represented by the `x`, `y` and `z` arrays, if","the `i`, `j`, `k` arrays are not supplied.","For general use of `mesh3d` it is preferred that `i`, `j`, `k` are","supplied.","If *-1*, Delaunay triangulation is used, which is mainly suitable if the","mesh is a single, more or less layer surface that is perpendicular to `delaunayaxis`.","In case the `delaunayaxis` intersects the mesh surface at more than one point","it will result triangles that are very long in the dimension of `delaunayaxis`.","If *>0*, the alpha-shape algorithm is used. In this case, the positive `alphahull` value","signals the use of the alpha-shape algorithm, _and_ its value","acts as the parameter for the mesh fitting.","If *0*, the convex-hull algorithm is used. It is suitable for convex bodies","or if the intention is to enclose the `x`, `y` and `z` point set into a convex","hull."].join(" ")},intensity:{valType:"data_array",editType:"calc",description:["Sets the intensity values for vertices or cells","as defined by `intensitymode`.","It can be used for plotting fields on meshes."].join(" ")},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc",description:["Determines the source of `intensity` values."].join(" ")},color:{valType:"color",editType:"calc",description:"Sets the color of the whole mesh"},vertexcolor:{valType:"data_array",editType:"calc",description:["Sets the color of each vertex","Overrides *color*. While Red, green and blue colors","are in the range of 0 and 255; in the case of having","vertex color data in RGBA format, the alpha color","should be normalized to be between 0 and 1."].join(" ")},facecolor:{valType:"data_array",editType:"calc",description:["Sets the color of each face","Overrides *color* and *vertexcolor*."].join(" ")},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not normal smoothing is applied to the meshes,","creating meshes with an angular, low-poly look via flat reflections."].join(" ")},contour:{show:l({},a.contours.x.show,{description:["Sets whether or not dynamic contours are shown on hover"].join(" ")}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:l({},a.lightposition.x,{dflt:1e5}),y:l({},a.lightposition.y,{dflt:1e5}),z:l({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},a.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},13146:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){t.intensity&&n(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},86395:(e,t,r)=>{"use strict";var n=r(13084).gl_mesh3d,i=r(13084).delaunay_triangulate,o=r(13084).alpha_shape,a=r(13084).convex_hull,s=r(95049).parseColorScale,l=r(55115),c=r(10948).extractOpts,u=r(51577);function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=d.prototype;function h(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}f.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},f.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n,d=e.x.length,f=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,d)||!g(e.j,d)||!g(e.k,d))return;n=u(m(e.i),m(e.j),m(e.k))}else n=0===e.alphahull?a(f):e.alphahull>0?o(e.alphahull,f):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],o=t.length,a=0;a{"use strict";var n=r(44049),i=r(53787),o=r(5876),a=r(27933);e.exports=function(e,t,r,s){function l(r,n){return i.coerce(e,t,a,r,n)}function c(e){var t=e.map((function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["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(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),o(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",r)),l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null):t.visible=!1):t.visible=!1}},11829:(e,t,r)=>{"use strict";e.exports={attributes:r(27933),supplyDefaults:r(8699),calc:r(13146),colorbar:{min:"cmin",max:"cmax"},plot:r(86395),moduleType:"trace",name:"mesh3d",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws sets of triangles with coordinates given by","three 1-dimensional arrays in `x`, `y`, `z` and","(1) a sets of `i`, `j`, `k` indices","(2) Delaunay triangulation or","(3) the Alpha-shape algorithm or","(4) the Convex-hull algorithm"].join(" ")}}},94962:(e,t,r)=>{"use strict";var n=r(53787).extendFlat,i=r(37471),o=r(89849).axisHoverFormat,a=r(93701).P,s=r(54289),l=r(59933),c=l.INCREASING.COLOR,u=l.DECREASING.COLOR,d=i.line;function f(e){return{line:{color:n({},d.color,{dflt:e}),width:d.width,dash:a,editType:"style"},editType:"style"}}e.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:n({},d.width,{description:[d.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:n({},a,{description:[a.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:f(c),decreasing:f(u),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:n({},s.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})}},16707:(e,t,r)=>{"use strict";var n=r(53787),i=n._,o=r(28605),a=r(64594),s=r(24956).BADNUM;function l(e,t,r,n){return{o:e,h:t,l:r,c:n}}function c(e,t,r,a,l,c){for(var u=l.makeCalcdata(t,"open"),d=l.makeCalcdata(t,"high"),f=l.makeCalcdata(t,"low"),h=l.makeCalcdata(t,"close"),p=Array.isArray(t.text),m=Array.isArray(t.hovertext),g=!0,v=null,y=!!t.xperiodalignment,x=[],b=0;bv):g=T>_,v=T;var M=c(_,k,S,T);M.pos=w,M.yc=(_+T)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[S,k],y&&(M.orig_p=r[b]),p&&(M.tx=t.text[b]),m&&(M.htx=t.hovertext[b]),x.push(M)}else x.push({pos:w,empty:!0})}return t._extremes[l._id]=o.findExtremes(l,n.concat(f,d),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}e.exports={calc:function(e,t){var r=o.getFromId(e,t.xaxis),i=o.getFromId(e,t.yaxis),s=function(e,t,r){var i=r._minDiff;if(!i){var o,s=e._fullData,l=[];for(i=1/0,o=0;o{"use strict";var n=r(53787),i=r(87160),o=r(17239),a=r(94962);function s(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}e.exports=function(e,t,r,l){function c(r,i){return n.coerce(e,t,a,r,i)}i(e,t,c,l)?(o(e,t,l,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),c("line.dash"),s(e,t,c,"increasing"),s(e,t,c,"decreasing"),c("text"),c("hovertext"),c("tickwidth"),l._requestRangeslider[t.xaxis]=!0):t.visible=!1}},90934:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(76719),a=r(66235),s=r(53787).fillText,l=r(59933),c={increasing:l.INCREASING.SYMBOL,decreasing:l.DECREASING.SYMBOL};function u(e,t,r,n){var i,s,l=e.cd,c=e.xa,u=l[0].trace,d=l[0].t,f=u.type,h="ohlc"===f?"l":"min",p="ohlc"===f?"h":"max",m=d.bPos||0,g=function(e){return e.pos+m-t},v=d.bdPos||d.tickLen,y=d.wHover,x=Math.min(1,v/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function b(e){var t=g(e);return o.inbox(t-y,t+y,i)}function w(e){var t=e[h],n=e[p];return t===n||o.inbox(t-r,n-r,i)}function _(e){return(b(e)+w(e))/2}i=e.maxHoverDistance-x,s=e.maxSpikeDistance-x;var k=o.getDistanceFunction(n,b,w,_);if(o.getClosest(l,k,e),!1===e.index)return null;var S=l[e.index];if(S.empty)return null;var T=u[S.dir],M=T.line.color;return a.opacity(M)&&T.line.width?e.color=M:e.color=T.fillcolor,e.x0=c.c2p(S.pos+m-v,!0),e.x1=c.c2p(S.pos+m+v,!0),e.xLabelVal=void 0!==S.orig_p?S.orig_p:S.pos,e.spikeDistance=_(S)*s/i,e.xSpike=c.c2p(S.pos,!0),e}function d(e,t,r,o){var a=e.cd,s=e.ya,l=a[0].trace,c=a[0].t,d=[],f=u(e,t,r,o);if(!f)return[];var h=a[f.index].hi||l.hoverinfo,p=h.split("+");if(!("all"===h||-1!==p.indexOf("y")))return[];for(var m=["high","open","close","low"],g={},v=0;v"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},f)).y0=y.y1=w,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name="",d.push(y),g[b]=y)}return d}function f(e,t,r,i){var o=e.cd,a=e.ya,l=o[0].trace,d=o[0].t,f=u(e,t,r,i);if(!f)return[];var h=o[f.index],p=f.index=h.i,m=h.dir;function g(e){return d.labels[e]+n.hoverLabelText(a,l[e][p],l.yhoverformat)}var v=h.hi||l.hoverinfo,y=v.split("+"),x="all"===v,b=x||-1!==y.indexOf("y"),w=x||-1!==y.indexOf("text"),_=b?[g("open"),g("high"),g("low"),g("close")+" "+c[m]]:[];return w&&s(h,l,_),f.extraText=_.join("
"),f.y0=f.y1=a.c2p(h.yc,!0),[f]}e.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?d(e,t,r,n):f(e,t,r,n)},hoverSplit:d,hoverOnPoints:f}},69196:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:r(48206),categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:r(94962),supplyDefaults:r(69254),calc:r(16707).calc,plot:r(7945),style:r(11104),hoverPoints:r(90934).hoverPoints,selectPoints:r(98274)}},87160:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787);e.exports=function(e,t,r,o){var a=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],o),s&&l&&c&&u){var d=Math.min(s.length,l.length,c.length,u.length);return a&&(d=Math.min(d,i.minRowLength(a))),t._length=d,d}}},7945:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787);e.exports=function(e,t,r,o){var a=t.yaxis,s=t.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(o,r,"trace ohlc").each((function(e){var t=n.select(this),r=e[0],o=r.t;if(!0!==r.trace.visible||o.empty)t.remove();else{var c=o.tickLen,u=t.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=s.c2p(e.pos-c,!0),r=s.c2p(e.pos+c,!0),n=l?(t+r)/2:s.c2p(e.pos,!0);return"M"+t+","+a.c2p(e.o,!0)+"H"+n+"M"+n+","+a.c2p(e.h,!0)+"V"+a.c2p(e.l,!0)+"M"+r+","+a.c2p(e.c,!0)+"H"+n}))}}))}},98274:e=>{"use strict";e.exports=function(e,t){var r,n=e.cd,i=e.xaxis,o=e.yaxis,a=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;r{"use strict";var n=r(8996),i=r(50973),o=r(66235);e.exports=function(e,t,r){var a=r||n.select(e).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",(function(e){return e[0].trace.opacity})),a.each((function(e){var t=e[0].trace;n.select(this).selectAll("path").each((function(e){if(!e.empty){var r=t[e.dir].line;n.select(this).style("fill","none").call(o.stroke,r.color).call(i.dashLine,r.dash,r.width).style("opacity",t.selectedpoints&&!e.selected?.3:1)}}))}))}},16674:(e,t,r)=>{"use strict";var n=r(10191).extendFlat,i=r(27231),o=r(92948),a=r(8753),s=r(32191).fF,l=r(29707).Y,c=n({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot",description:["Sets the shape of the paths.","If `linear`, paths are composed of straight lines.","If `hspline`, paths are composed of horizontal curved splines"].join(" ")},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"],description:["This value here applies when hovering over lines."].join(" ")})});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",description:["Sets the hover interaction mode for the parcats diagram.","If `category`, hover interaction take place per category.","If `color`, hover interactions take place per color per category.","If `dimension`, hover interactions take place across all categories per dimension."].join(" ")},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"],description:["This value here applies when hovering over dimensions.","Note that `*categorycount`, *colorcount* and *bandcolorcount*","are only available when `hoveron` contains the *color* flag"].join(" ")}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot",description:["Sets the drag interaction mode for categories and dimensions.","If `perpendicular`, the categories can only move along a line perpendicular to the paths.","If `freeform`, the categories can freely move on the plane.","If `fixed`, the categories and dimensions are stationary."].join(" ")},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot",description:"Sort paths so that like colors are bundled together within each category."},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot",description:["Sets the path sorting algorithm.","If `forward`, sort paths based on dimension categories from left to right.","If `backward`, sort paths based on dimensions categories from right to left."].join(" ")},labelfont:o({editType:"calc",description:"Sets the font for the `dimension` labels."}),tickfont:o({editType:"calc",description:"Sets the font for the `category` labels."}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc",description:"The shown name of the dimension."},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the categories in the dimension.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories in this dimension appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},ticktext:{valType:"data_array",editType:"calc",description:["Sets alternative tick labels for the categories in this dimension.","Only has an effect if `categoryorder` is set to *array*.","Should be an array the same length as `categoryarray`","Used with `categoryorder`."].join(" ")},values:{valType:"data_array",dflt:[],editType:"calc",description:["Dimension values. `values[n]` represents the category value of the `n`th point in the dataset,","therefore the `values` vector for all dimensions must be the same (longer vectors","will be truncated)."].join(" ")},displayindex:{valType:"integer",editType:"calc",description:["The display index of dimension, from left to right, zero indexed, defaults to dimension","index."].join(" ")},editType:"calc",description:"The dimensions (variables) of the parallel categories diagram.",visible:{valType:"boolean",dflt:!0,editType:"calc",description:"Shows the dimension when set to `true` (the default). Hides the dimension for `false`."}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc",description:["The number of observations represented by each state. Defaults to 1 so that each state represents","one observation"].join(" ")},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},46737:(e,t,r)=>{"use strict";var n=r(38213).a0,i=r(79716),o="parcats";t.name=o,t.plot=function(e,t,r,a){var s=n(e.calcdata,o);if(s.length){var l=s[0];i(e,l,r,a)}},t.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),o=t._has&&t._has("parcats");i&&!o&&n._paperdiv.selectAll(".parcats").remove()}},72965:(e,t,r)=>{"use strict";var n=r(41689).wrap,i=r(25584).hasColorscale,o=r(1631),a=r(15302),s=r(50973),l=r(53787),c=r(51908);function u(e,t,r){e.valueInds.push(t),e.count+=r}function d(e,t,r){e.valueInds.push(t),e.count+=r}e.exports=function(e,t){var r=l.filterVisible(t.dimensions);if(0===r.length)return[];var f,h,p,m=r.map((function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,n=0;n=e.length)return!1;if(void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(r))for(t=0;t{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(5876),a=r(29707).c,s=r(80254),l=r(16674),c=r(47796);function u(e,t){function r(r,i){return n.coerce(e,t,l.dimensions,r,i)}var i=r("values"),o=r("visible");if(i&&i.length||(o=t.visible=!1),o){r("label"),r("displayindex",t._index);var a,s=e.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(a="array");var u=r("categoryorder",a);"array"===u?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),c||"array"!==u||(t.categoryorder="trace")}}e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,l,r,i)}var h=s(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,r,a,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",a.colorway[0]);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,d,f);a(t,d,f),Array.isArray(h)&&h.length||(t.visible=!1),c(t,h,"values",p),f("hoveron"),f("hovertemplate"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var m={family:d.font.family,size:Math.round(d.font.size),color:d.font.color};n.coerceFont(f,"labelfont",m);var g={family:d.font.family,size:Math.round(d.font.size/1.2),color:d.font.color};n.coerceFont(f,"tickfont",g)}},46451:(e,t,r)=>{"use strict";e.exports={attributes:r(16674),supplyDefaults:r(5126),calc:r(72965),plot:r(79716),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:r(46737),categories:["noOpacity"],meta:{description:["Parallel categories diagram for multidimensional categorical data."].join(" ")}}},18732:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).k4,o=r(37921),a=r(76719),s=r(53787),l=s.strTranslate,c=r(50973),u=r(25378),d=r(98224);function f(e,t,r,i){var o=t._context.staticPlot,a=e.map(z.bind(0,t,r)),u=i.selectAll("g.parcatslayer").data([null]);u.enter().append("g").attr("class","parcatslayer").style("pointer-events",o?"none":"all");var f=u.selectAll("g.trace.parcats").data(a,h),y=f.enter().append("g").attr("class","trace parcats");f.attr("transform",(function(e){return l(e.x,e.y)})),y.append("g").attr("class","paths");var x=f.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),h);x.attr("fill",(function(e){return e.model.color}));var _=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);w(_),x.attr("d",(function(e){return e.svgD})),_.empty()||x.sort(m),x.exit().remove(),x.on("mouseover",g).on("mouseout",v).on("click",b),y.append("g").attr("class","dimensions");var T=f.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),h);T.enter().append("g").attr("class","dimension"),T.attr("transform",(function(e){return l(e.x,0)})),T.exit().remove();var M=T.selectAll("g.category").data((function(e){return e.categories}),h),C=M.enter().append("g").attr("class","category");M.attr("transform",(function(e){return l(0,e.y)})),C.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),k(C);var A=M.selectAll("rect.bandrect").data((function(e){return e.bands}),h);A.each((function(){s.raiseToTop(this)})),A.attr("fill",(function(e){return e.color}));var L=A.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);A.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),S(L),A.exit().remove(),C.append("text").attr("class","catlabel").attr("pointer-events","none");var j=t._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",d.makeTextShadow(j)).style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){c.font(n.select(this),e.parcatsViewModel.categorylabelfont),d.convertToTspans(n.select(this),t)})),C.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){c.font(n.select(this),e.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",I),M.exit().remove(),T.call(n.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",O).on("drag",P).on("dragend",R)),f.each((function(e){e.traceSelection=n.select(this),e.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),f.exit().remove()}function h(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function m(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),E=n.mouse(d)[0];a.loneHover({trace:f,x:b-p.left+m.left,y:w-p.top+m.top,text:A,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:E1&&f.displayInd===d.dimensions.length-1?(i=c.left,o="left"):(i=c.left+c.width,o="right");var m=u.model.count,g=u.model.categoryLabel,v=m/u.parcatsViewModel.model.count,y={countLabel:m,categoryLabel:g,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
");return{trace:h,x:a*(i-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:o,hovertemplate:h.hovertemplate,hovertemplateLabels:y,eventData:[{data:h._input,fullData:h,count:m,category:g,probability:v}]}}function E(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var t,r=e.parcatsViewModel.graphDiv,i=r._fullLayout,o=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,c=this;if("color"===l?(!function(e){var t=n.select(e).datum(),r=T(t);_(r),r.each((function(){s.raiseToTop(this)})),n.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){s.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(c),C(c,"plotly_hover",n.event)):(!function(e){n.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=T(e);_(t),t.each((function(){s.raiseToTop(this)}))})),n.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(c),M(c,"plotly_hover",n.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===l?t=A(r,o,c):"color"===l?t=function(e,t,r){e._fullLayout._calcInverseTransform(e);var i,o,a=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),d=c.categoryViewModel,f=d.parcatsViewModel,h=f.model.dimensions[d.model.dimensionInd],p=f.trace,m=l.y+l.height/2;f.dimensions.length>1&&h.displayInd===f.dimensions.length-1?(i=l.left,o="left"):(i=l.left+l.width,o="right");var g=d.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(e){e.color===c.color&&(y+=e.count)}));var x=d.model.count,b=0;f.pathSelection.each((function(e){e.model.color===c.color&&(b+=e.model.count)}));var w=y/v,_=y/b,k=y/x,S={countLabel:v,categoryLabel:g,probabilityLabel:w.toFixed(3)},T=[];-1!==d.parcatsViewModel.hoverinfoItems.indexOf("count")&&T.push(["Count:",S.countLabel].join(" ")),-1!==d.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(T.push("P(color \u2229 "+g+"): "+S.probabilityLabel),T.push("P("+g+" | color): "+_.toFixed(3)),T.push("P(color | "+g+"): "+k.toFixed(3)));var M=T.join("
"),C=u.mostReadable(c.color,["black","white"]);return{trace:p,x:a*(i-t.left),y:s*(m-t.top),text:M,color:c.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:C,fontSize:10,idealAlign:o,hovertemplate:p.hovertemplate,hovertemplateLabels:S,eventData:[{data:p._input,fullData:p,category:g,count:v,probability:w,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,o,c):"dimension"===l&&(t=function(e,t,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(A(e,t,this))})),i}(r,o,c)),t&&a.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function I(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(w(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),S(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(m),-1===t.hoverinfoItems.indexOf("skip"))){"color"===e.parcatsViewModel.hoveron?C(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event)}}function O(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yd.y+d.height/2&&(a.model.displayInd=d.model.displayInd,d.model.displayInd=l),e.dragCategoryDisplayInd=a.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){o.model.dragX=n.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];void 0!==f&&o.model.dragXh.x&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=o.model.displayInd}B(e.parcatsViewModel),F(e.parcatsViewModel),D(e.parcatsViewModel),j(e.parcatsViewModel)}}function R(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var t={},r=L(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),a=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));a&&i.forEach((function(r,n){var i=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),d=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[d],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?C(e.potentialClickBand,"plotly_click",n.event.sourceEvent):M(e.potentialClickBand,"plotly_click",n.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd)e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null;e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,B(e.parcatsViewModel),F(e.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){D(e.parcatsViewModel,!0),j(e.parcatsViewModel,!0)})).each("end",(function(){(a||s)&&o.restyle(e.parcatsViewModel.graphDiv,t,[r])}))}}function L(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n),u+="l-"+r[s]+",0 ";return u+="Z"}function F(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),o=e.model.dimensions.map((function(e){return e.displayInd})),a=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function d(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return a.map((function(e){return t[e]}))}c.sort((function(t,r){var n=d(t),i=d(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var f=new Array(c.length),h=t[0].model.count,p=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?p*(v.count/h):0;for(var y,x=new Array(n.length),b=0;b1?(e.width-80-16)/(n-1):0)*i;var o,a,s,l,c,u=[],d=e.model.maxCats,f=t.categories.length,h=t.count,p=e.height-8*(d-1),m=8*(d-f)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c0?a.count/h*p:0,s={key:a.valueInds[0],model:a,width:16,height:o,y:null!==a.dragY?a.dragY:m,bands:[],parcatsViewModel:e},m=m+o+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(e,t,r,n){f(r,e,n,t)}},79716:(e,t,r)=>{"use strict";var n=r(18732);e.exports=function(e,t,r,i){var o=e._fullLayout,a=o._paper,s=o._size;n(e,a,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},59692:(e,t,r)=>{"use strict";var n=r(8753),i=r(45446),o=r(92948),a=r(29707).Y,s=r(10191).extendFlat,l=r(99862).templatedArray;e.exports={domain:a({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot",description:["Sets the angle of the labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the labels vertically.","Tilted labels with *labelangle* may be positioned better","inside margins when `labelposition` is set to *bottom*."].join(" ")},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Specifies the location of the `label`.","*top* positions labels above, next to the title","*bottom* positions labels below the graph","Tilted labels with *labelangle* may be positioned better","inside margins when `labelposition` is set to *bottom*."].join(" ")},labelfont:o({editType:"plot",description:"Sets the font for the `dimension` labels."}),tickfont:o({editType:"plot",description:"Sets the font for the `dimension` tick values."}),rangefont:o({editType:"plot",description:"Sets the font for the `dimension` range values."}),dimensions:l("dimension",{label:{valType:"string",editType:"plot",description:"The shown name of the dimension."},tickvals:s({},i.tickvals,{editType:"plot",description:["Sets the values at which ticks on this axis appear."].join(" ")}),ticktext:s({},i.ticktext,{editType:"plot",description:["Sets the text displayed at the ticks position via `tickvals`."].join(" ")}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Shows the dimension when set to `true` (the default). Hides the dimension for `false`."},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot",description:["The domain range that represents the full, shown axis extent. Defaults to the `values` extent.","Must be an array of `[fromValue, toValue]` with finite numbers as elements."].join(" ")},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["The domain range to which the filter on the dimension is constrained. Must be an array","of `[fromValue, toValue]` with `fromValue <= toValue`, or if `multiselect` is not","disabled, you may give an array of arrays, where each inner array is `[fromValue, toValue]`."].join(" ")},multiselect:{valType:"boolean",dflt:!0,editType:"plot",description:"Do we allow multiple selection ranges or just a single range?"},values:{valType:"data_array",editType:"calc",description:["Dimension values. `values[n]` represents the value of the `n`th point in the dataset,","therefore the `values` vector for all dimensions must be the same (longer vectors","will be truncated). Each value must be a finite number."].join(" ")},editType:"calc",description:"The dimensions (variables) of the parallel coordinates chart. 2..60 dimensions are supported."}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot",description:["Sets the base color of unselected lines.","in connection with `unselected.line.opacity`."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot",description:["Sets the opacity of unselected lines.","The default *auto* decreases the opacity smoothly as the number of lines increases.","Use *1* to achieve exact `unselected.line.color`."].join(" ")},editType:"plot"},editType:"plot"}}},56737:(e,t,r)=>{"use strict";var n=r(46964),i=r(8996),o=r(41689).keyFun,a=r(41689).repeat,s=r(53787).sorterAsc,l=r(53787).strTranslate,c=n.bar.snapRatio;function u(e,t){return e*(1-c)+t*c}var d=n.bar.snapClose;function f(e,t){return e*(1-d)+t*d}function h(e,t,r,n){if(function(e,t){for(var r=0;r=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,o=0,a=t.length-1;if(i<0){var s=o;o=a,a=s}for(var l=t[o],c=l,d=o;i*dt){f=r;break}}if(o=u,isNaN(o)&&(o=isNaN(d)||isNaN(f)?isNaN(d)?f:d:t-c[d][1]e[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(p,t);m&&(a.interval=l[o],a.intervalPix=p,a.region=m)}}if(e.ordinal&&!a.region){var g=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(r=0;r=x[0]&&y<=x[1]){a.clickableOrdinalRange=x;break}}}return a}function _(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,o=t.brush.svgBrush;o.wasDragged=!0,o._dragging=!0,o.grabbingBar?o.newExtent=[r-o.grabPoint,r+o.barLength-o.grabPoint].map(t.unitToPaddedPx.invert):o.newExtent=[o.startExtent,t.unitToPaddedPx.invert(r)].sort(s),t.brush.filterSpecified=!0,o.extent=o.stayingIntervals.concat([o.newExtent]),o.brushCallback(t),b(e.parentNode)}function k(e,t){var r=w(t,t.height-i.mouse(e)[1]-2*n.verticalPadding),o="crosshair";r.clickableOrdinalRange?o="pointer":r.region&&(o=r.region+"-resize"),i.select(document.body).style("cursor",o)}function S(e){e.on("mousemove",(function(e){i.event.preventDefault(),e.parent.inBrushDrag||k(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var r=t.height-i.mouse(e)[1]-2*n.verticalPadding,o=t.unitToPaddedPx.invert(r),a=t.brush,s=w(t,r),l=s.interval,c=a.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:o,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){_(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,n=r.filter,o=r.svgBrush;o._dragging||(k(e,t),_(e,t),t.brush.svgBrush.wasDragged=!1),o._dragging=!1,i.event.sourceEvent.stopPropagation();var a=o.grabbingBar;if(o.grabbingBar=!1,o.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!o.wasDragged)return o.wasDragged=void 0,o.clickableOrdinalRange?r.filterSpecified&&t.multiselect?o.extent.push(o.clickableOrdinalRange):(o.extent=[o.clickableOrdinalRange],r.filterSpecified=!0):a?(o.extent=o.stayingIntervals,0===o.extent.length&&M(r)):M(r),o.brushCallback(t),b(e.parentNode),void o.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]o.newExtent[0];o.extent=o.stayingIntervals.concat(c?[o.newExtent]:[]),o.extent.length||M(r),o.brushCallback(t),c?b(e.parentNode,s):(s(),b(e.parentNode))}else s();o.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)})))}function T(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function C(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(e,t,r,n,i,o){var a,l=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(s)})).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=C(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(r),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(a=i,function(e){var t=e.brush,r=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t),n=r.slice();t.filter.set(n),a()}),brushEndCallback:o}}},ensureAxisBrush:function(e,t,r){var i=e.selectAll("."+n.cn.axisBrush).data(a,o);i.enter().append("g").classed(n.cn.axisBrush,!0),function(e,t,r){var i=r._context.staticPlot,o=e.selectAll(".background").data(a);o.enter().append("rect").classed("background",!0).call(p).call(m).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),o.call(S).attr("height",(function(e){return e.height-n.verticalPadding}));var s=e.selectAll(".highlight-shadow").data(a);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",t).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(e){return e.height})).call(x);var c=e.selectAll(".highlight").data(a);c.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"),c.attr("y1",(function(e){return e.height})).call(x)}(i,t,r)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?C(e.sort(T)):[e[0]]):e=[e.sort(s)],t.tickvals){var r=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[h(0,r,e[0],[]),h(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},89338:(e,t,r)=>{"use strict";e.exports={attributes:r(59692),supplyDefaults:r(88860),calc:r(61009),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(69837),categories:["gl","regl","noOpacity","noHover"],meta:{description:["Parallel coordinates for multidimensional exploratory data analysis.","The samples are specified in `dimensions`.","The colors are set in `line.color`."].join(" ")}}},69837:(e,t,r)=>{"use strict";var n=r(8996),i=r(38213).a0,o=r(55136),a=r(83580);t.name="parcoords",t.plot=function(e){var t=i(e.calcdata,"parcoords")[0];t.length&&o(e,t)},t.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),o=t._has&&t._has("parcoords");i&&!o&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},t.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,r=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:a.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},61009:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray,i=r(10948),o=r(41689).wrap;e.exports=function(e,t){var r,a;return i.hasColorscale(t,"line")&&n(t.line.color)?(r=t.line.color,a=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(e){for(var t=new Array(e),r=0;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"}}},88860:(e,t,r)=>{"use strict";var n=r(53787),i=r(25584).hasColorscale,o=r(5876),a=r(29707).c,s=r(80254),l=r(28605),c=r(59692),u=r(56737),d=r(46964).maxDimensionCount,f=r(47796);function h(e,t,r,i){function o(r,i){return n.coerce(e,t,c.dimensions,r,i)}var a=o("values"),s=o("visible");if(a&&a.length||(s=t.visible=!1),s){o("label"),o("tickvals"),o("ticktext"),o("tickformat");var d=o("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:d},l.setConvert(t._ax,i.layout),o("multiselect");var f=o("constraintrange");f&&(t.constraintrange=u.cleanRanges(f,t))}}e.exports=function(e,t,r,l){function u(r,i){return n.coerce(e,t,c,r,i)}var p=e.dimensions;Array.isArray(p)&&p.length>d&&(n.log("parcoords traces support up to "+d+" dimensions at the moment"),p.splice(d));var m=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:h}),g=function(e,t,r,a,s){var l=s("line.color",r);if(i(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),o(e,t,a,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,l,u);a(t,l,u),Array.isArray(m)&&m.length||(t.visible=!1),f(t,m,"values",g);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",v),n.coerceFont(u,"tickfont",v),n.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},90785:(e,t,r)=>{"use strict";var n=r(53787).isTypedArray;t.convertTypedArray=function(e){return n(e)?Array.prototype.slice.call(e):e},t.isOrdinal=function(e){return!!e.tickvals},t.isVisible=function(e){return e.visible||!("visible"in e)}},98735:(e,t,r)=>{"use strict";var n=r(89338);n.plot=r(55136),e.exports=n},67365:(e,t,r)=>{"use strict";var n=r(26234),i=n("./shaders/vertex.glsl"),o=n("./shaders/fragment.glsl"),a=r(46964).maxDimensionCount,s=r(53787),l=1e-6,c=2048,u=new Uint8Array(4),d=new Uint8Array(4),f={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,i){var o=e._gl;o.enable(o.SCISSOR_TEST),o.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function p(e,t,r,n,i,o){var a=o.key;r.drawCompleted||(!function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[a]),delete r.currentRafs[a],h(e,o.scissorX,o.scissorY,o.scissorWidth,o.viewBoxSize[1])),r.clearOnly||(o.count=2*c,o.offset=2*l*n,t(o),l*n+c>>8*t)%256/255}function v(e,t,r){for(var n=new Array(8*t),i=0,o=0;od&&(d=e[i].dim1.canvasX,a=i);0===s&&h(T,0,0,r.canvasWidth,r.canvasHeight);var f=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var o=!e&&n{"use strict";e.exports=function(e,t,r,n){var i,o;for(n||(n=1/0),i=0;i{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(11199),s=r(28605),l=i.strRotate,c=i.strTranslate,u=r(98224),d=r(50973),f=r(10948),h=r(41689),p=h.keyFun,m=h.repeat,g=h.unwrap,v=r(90785),y=r(46964),x=r(56737),b=r(67365);function w(e,t,r){return i.aggNums(e,null,t,r)}function _(e,t){return S(w(Math.min,e,t),w(Math.max,e,t))}function k(e){var t=e.range;return t?S(t[0],t[1]):_(e.values,e._length)}function S(e,t){return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(t)&&isFinite(t)||(t=0),e===t&&(0===e?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function T(e,t,r,i,a){var s,l,c=k(r);return i?n.scale.ordinal().domain(i.map((s=o(r.tickformat),l=a,l?function(e,t){var r=l[t];return null===r||void 0===r?s(e):r}:s))).range(i.map((function(r){var n=(r-c[0])/(c[1]-c[0]);return e-t+n*(2*t-e)}))):n.scale.linear().domain(c).range([e-t,t])}function M(e){if(e.tickvals){var t=k(e);return n.scale.ordinal().domain(e.tickvals).range(e.tickvals.map((function(e){return(e-t[0])/(t[1]-t[0])})))}}function C(e){var t=e.map((function(e){return e[0]})),r=e.map((function(e){var t=a(e[1]);return n.rgb("rgb("+t[0]+","+t[1]+","+t[2]+")")})),i="rgb".split("").map((function(e){return n.scale.linear().clamp(!0).domain(t).range(r.map((i=e,function(e){return e[i]})));var i}));return function(e){return i.map((function(t){return t(e)}))}}function A(e){return e.dimensions.some((function(e){return e.brush.filterSpecified}))}function E(e,t,r){var o=g(t),s=o.trace,l=v.convertTypedArray(o.lineColor),c=s.line,u={color:a(s.unselected.line.color),opacity:s.unselected.line.opacity},d=f.extractOpts(c),h=d.reversescale?f.flipScale(o.cscale):o.cscale,p=s.domain,m=s.dimensions,x=e.width,b=s.labelangle,w=s.labelside,_=s.labelfont,S=s.tickfont,T=s.rangefont,M=i.extendDeepNoArrays({},c,{color:l.map(n.scale.linear().domain(k({values:l,range:[d.min,d.max],_length:s._length}))),blockLineCount:y.blockLineCount,canvasOverdrag:y.overdrag*y.canvasPixelRatio}),A=Math.floor(x*(p.x[1]-p.x[0])),E=Math.floor(e.height*(p.y[1]-p.y[0])),I=e.margin||{l:80,r:80,t:100,b:80},O=A,P=E;return{key:r,colCount:m.filter(v.isVisible).length,dimensions:m,tickDistance:y.tickDistance,unitToColor:C(h),lines:M,deselectedLines:u,labelAngle:b,labelSide:w,labelFont:_,tickFont:S,rangeFont:T,layoutWidth:x,layoutHeight:e.height,domain:p,translateX:p.x[0]*x,translateY:e.height-p.y[1]*e.height,pad:I,canvasWidth:O*y.canvasPixelRatio+2*M.canvasOverdrag,canvasHeight:P*y.canvasPixelRatio,width:O,height:P,canvasPixelRatio:y.canvasPixelRatio}}function I(e,t,r){var a=r.width,s=r.height,l=r.dimensions,c=r.canvasPixelRatio,u=function(e){return a*e/Math.max(1,r.colCount-1)},d=y.verticalPadding/s,f=function(e,t){return n.scale.linear().range([t,e-t])}(s,y.verticalPadding),h={key:r.key,xScale:u,model:r,inBrushDrag:!1},p={};return h.dimensions=l.filter(v.isVisible).map((function(a,l){var m=function(e,t){return n.scale.linear().domain(k(e)).range([t,1-t])}(a,d),g=p[a.label];p[a.label]=(g||0)+1;var b=a.label+(g?"__"+g:""),w=a.constraintrange,_=w&&w.length;_&&!Array.isArray(w[0])&&(w=[w]);var S=_?w.map((function(e){return e.map(m)})):[[-1/0,1/0]],C=a.values;C.length>a._length&&(C=C.slice(0,a._length));var E,I=a.tickvals;function O(e,t){return{val:e,text:E[t]}}function P(e,t){return e.val-t.val}if(Array.isArray(I)&&I.length){E=a.ticktext,Array.isArray(E)&&E.length?E.length>I.length?E=E.slice(0,I.length):I.length>E.length&&(I=I.slice(0,E.length)):E=I.map(o(a.tickformat));for(var R=1;R=r||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],d=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:d};d!==z&&(u?o.hover(f):o.unhover&&o.unhover(f),z=d)}})),D.style("opacity",(function(e){return e.pick?0:1})),h.style("background","rgba(255, 255, 255, 0)");var N=h.selectAll("."+y.cn.parcoords).data(C,p);N.exit().remove(),N.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var F=N.selectAll("."+y.cn.parcoordsControlView).data(m,p);F.enter().append("g").classed(y.cn.parcoordsControlView,!0),F.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var B=F.selectAll("."+y.cn.yAxis).data((function(e){return e.dimensions}),p);B.enter().append("g").classed(y.cn.yAxis,!0),F.each((function(e){R(B,e,k)})),D.each((function(e){if(e.viewModel){!e.lineLayer||o?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||o;e.lineLayer.render(e.viewModel.panels,t)}})),B.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),B.call(n.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;M.linePickActive(!1),e.x=Math.max(-y.overdrag,Math.min(e.model.width+y.overdrag,n.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,B.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),R(B,t,k),B.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),n.select(this).attr("transform",c(e.x,0)),B.each((function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,R(B,t,k),n.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),M.linePickActive(!0),o&&o.axesMoved&&o.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),B.exit().remove();var Z=B.selectAll("."+y.cn.axisOverlays).data(m,p);Z.enter().append("g").classed(y.cn.axisOverlays,!0),Z.selectAll("."+y.cn.axis).remove();var U=Z.selectAll("."+y.cn.axis).data(m,p);U.enter().append("g").classed(y.cn.axis,!0),U.each((function(e){var t=e.model.height/e.model.tickDistance,r=e.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return v.isOrdinal(e)?t:L(e.model.dimensions[e.visibleIndex],t)})).scale(r)),d.font(U.selectAll("text"),e.model.tickFont)})),U.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),U.selectAll("text").style("text-shadow",u.makeTextShadow(T)).style("cursor","default");var V=Z.selectAll("."+y.cn.axisHeading).data(m,p);V.enter().append("g").classed(y.cn.axisHeading,!0);var H=V.selectAll("."+y.cn.axisTitle).data(m,p);H.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),H.text((function(e){return e.label})).each((function(t){var r=n.select(this);d.font(r,t.model.labelFont),u.convertToTspans(r,e)})).attr("transform",(function(e){var t=P(e.model.labelAngle,e.model.labelSide),r=y.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)})).attr("text-anchor",(function(e){var t=P(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var W=Z.selectAll("."+y.cn.axisExtent).data(m,p);W.enter().append("g").classed(y.cn.axisExtent,!0);var G=W.selectAll("."+y.cn.axisExtentTop).data(m,p);G.enter().append("g").classed(y.cn.axisExtentTop,!0),G.attr("transform",c(0,-y.axisExtentOffset));var q=G.selectAll("."+y.cn.axisExtentTopText).data(m,p);q.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(O),q.text((function(e){return j(e,!0)})).each((function(e){d.font(n.select(this),e.model.rangeFont)}));var Y=W.selectAll("."+y.cn.axisExtentBottom).data(m,p);Y.enter().append("g").classed(y.cn.axisExtentBottom,!0),Y.attr("transform",(function(e){return c(0,e.model.height+y.axisExtentOffset)}));var X=Y.selectAll("."+y.cn.axisExtentBottomText).data(m,p);X.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(O),X.text((function(e){return j(e,!1)})).each((function(e){d.font(n.select(this),e.model.rangeFont)})),x.ensureAxisBrush(Z,T,e)}},55136:(e,t,r)=>{"use strict";var n=r(93616),i=r(56162),o=r(90785).isVisible,a={};function s(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return-1===i&&(i+=t.length),i}(e.exports=function(e,t){var r=e._fullLayout;if(i(e,[],a)){var l={},c={},u={},d={},f=r._size;t.forEach((function(t,r){var n=t[0].trace;u[r]=n.index;var i=d[r]=n._fullInput.index;l[r]=e.data[i].dimensions,c[r]=e.data[i].dimensions.slice()}));n(e,t,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(t,n,i){var o=c[t][n],a=i.map((function(e){return e.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===l[s]){var f=o.constraintrange;l[s]=f||null}var h=e._fullData[u[t]].dimensions[n];a.length?(1===a.length&&(a=a[0]),o.constraintrange=a,h.constraintrange=a.slice(),a=[a]):(delete o.constraintrange,delete h.constraintrange,a=null);var p={};p[s]=a,e.emit("plotly_restyle",[p,[d[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return s(e,t,r)-s(e,t,n)}}(r,c[t].filter(o));l[t].sort(n),c[t].filter((function(e){return!o(e)})).sort((function(e){return c[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[d[t]]])}})}}).reglPrecompiled=a},10650:(e,t,r)=>{"use strict";var n=r(27231),i=r(29707).Y,o=r(92948),a=r(18022),s=r(32191).fF,l=r(32191).si,c=r(10191).extendFlat,u=r(93701).u,d=o({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."});e.exports={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:c({},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",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:c({},d,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:c({},d,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:c({},d,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:c({},d,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:c({},d,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}}},20268:(e,t,r)=>{"use strict";var n=r(44115);t.name="pie",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},21412:(e,t,r)=>{"use strict";var n=r(51908),i=r(25378),o=r(66235),a={};function s(e){return function(t,r){return!!t&&(!!(t=i(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t))}}function l(e,t){var r,n=JSON.stringify(e),o=t[n];if(!o){for(o=e.slice(),r=0;r=0})),("funnelarea"===t.type?v:t.sort)&&o.sort((function(e,t){return t.v-e.v})),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,o=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(o=l(o,a));for(var c=0,u=0;u{"use strict";var n=r(51908),i=r(53787),o=r(10650),a=r(29707).c,s=r(6099).handleText,l=r(53787).coercePattern;function c(e,t){var r=Array.isArray(e),o=i.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,o?t.length:1/0);if(isFinite(a)||(a=0),a&&o){for(var s,l=0;l0){s=!0;break}}s||(a=0)}return{hasLabels:r,hasValues:o,len:a}}function u(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");l(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:c,handleMarkerDefaults:u,supplyDefaults:function(e,t,r,n){function l(r,n){return i.coerce(e,t,o,r,n)}var d=c(l("labels"),l("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(l("label0"),l("dlabel")),f){t._length=f,u(e,t,n,l,!0),l("scalegroup");var h,p=l("text"),m=l("texttemplate");if(m||(h=l("textinfo",Array.isArray(p)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),m||h&&"none"!==h){var g=l("textposition");s(e,t,n,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&l("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&l("insidetextorientation")}a(t,n,l);var v=l("hole");if(l("title.text")){var y=l("title.position",v?"middle center":"top center");v||"middle center"!==y||(t.title.position="top center"),i.coerceFont(l,"title.font",n.font)}l("sort"),l("direction"),l("rotation"),l("pull")}else t.visible=!1}}},51938:(e,t,r)=>{"use strict";var n=r(87267).appendArrayMultiPointValues;e.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},61337:(e,t,r)=>{"use strict";var n=r(50973),i=r(66235);e.exports=function(e,t,r,o){var a=r.marker.pattern;a&&a.shape?n.pointStyle(e,r,o,t):i.fill(e,t.color)}},22084:(e,t,r)=>{"use strict";var n=r(53787);function i(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var r=i((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=i(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports={attributes:r(10650),supplyDefaults:r(24530).supplyDefaults,supplyLayoutDefaults:r(76683),layoutAttributes:r(24873),calc:r(21412).calc,crossTraceCalc:r(21412).crossTraceCalc,plot:r(3213).plot,style:r(62570),styleOne:r(68872),moduleType:"trace",name:"pie",basePlotModule:r(20268),categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}}},24873:e=>{"use strict";e.exports={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},76683:(e,t,r)=>{"use strict";var n=r(53787),i=r(24873);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}},3213:(e,t,r)=>{"use strict";var n=r(8996),i=r(44115),o=r(76719),a=r(66235),s=r(50973),l=r(53787),c=l.strScale,u=l.strTranslate,d=r(98224),f=r(22684),h=f.recordMinTextSize,p=f.clearMinTextSize,m=r(22331).TEXTPAD,g=r(22084),v=r(51938),y=r(53787).isValidTextValue;function x(e,t,r){var i=r[0],a=i.cx,s=i.cy,c=i.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",(function(e){var r=t._fullLayout,d=t._fullData[c.index];if(!t._dragging&&!1!==r.hovermode){var f=d.hoverinfo;if(Array.isArray(f)&&(f=o.castHoverinfo({hoverinfo:[g.castOption(f,e.pts)],_module:c._module},r,0)),"all"===f&&(f="label+text+value+percent+name"),d.hovertemplate||"none"!==f&&"skip"!==f&&f){var h=e.rInscribed||0,p=a+e.pxmid[0]*(1-h),m=s+e.pxmid[1]*(1-h),y=r.separators,x=[];if(f&&-1!==f.indexOf("label")&&x.push(e.label),e.text=g.castOption(d.hovertext||d.text,e.pts),f&&-1!==f.indexOf("text")){var b=e.text;l.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,y),f&&-1!==f.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/i.vTotal,e.percentLabel=g.formatPiePercent(e.percent,y),f&&-1!==f.indexOf("percent")&&x.push(e.percentLabel);var w=d.hoverlabel,_=w.font,k=[];o.loneHover({trace:c,x0:p-h*i.r,x1:p+h*i.r,y:m,_x0:u?a+e.TL[0]:p-h*i.r,_x1:u?a+e.TR[0]:p+h*i.r,_y0:u?s+e.TL[1]:m-h*i.r,_y1:u?s+e.BL[1]:m+h*i.r,text:x.join("
"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(w.bgcolor,e.pts)||e.color,borderColor:g.castOption(w.bordercolor,e.pts),fontFamily:g.castOption(_.family,e.pts),fontSize:g.castOption(_.size,e.pts),fontColor:g.castOption(_.color,e.pts),nameLength:g.castOption(w.namelength,e.pts),textAlign:g.castOption(w.align,e.pts),hovertemplate:g.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[v(e,d)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:k}),e.bbox=k[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[v(e,d)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,i=t._fullData[c.index],a=n.select(this).datum();c._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[v(a,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(o.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,i=t._fullData[c.index];t._dragging||!1===r.hovermode||(t._hoverdata=[v(e,i)],o.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var i=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,o=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n||a.contrast(t.color),family:i,size:o}}function w(e,t){for(var r,n,i=0;it&&t>n||r=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(d||h){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(s||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((o={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,o.scale>=1)return o;m.push(o)}(p||h)&&((o=k(e,n,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(o)),(p||f)&&((o=S(e,n,a,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(o));for(var x=0,b=0,w=0;w=1)break}return m[x]}function k(e,t,r,n,i){t=Math.max(0,t-2*m);var o=e.width/e.height,a=C(o,n,t,r);return{scale:2*a/e.height,rCenter:T(o,a/t),rotate:M(i)}}function S(e,t,r,n,i){t=Math.max(0,t-2*m);var o=e.height/e.width,a=C(o,n,t,r);return{scale:2*a/e.width,rCenter:T(o,a/t),rotate:M(i+Math.PI/2)}}function T(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function C(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function A(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function E(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,o=e.height/2;return r<0&&(i*=-1),n<0&&(o*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(o)*(i>0?1:-1)/2,y:o/(1+r*r/(n*n)),outside:!0}}function I(e,t){var r,n,i,o=e.trace,a={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=o.title.font.size,i=P(o),-1!==o.title.position.indexOf("top")?(a.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==o.title.position.indexOf("bottom")&&(a.y+=(1+i)*e.r);var l,c,u=(l=e.r,c=e.trace.aspectratio,l/(void 0===c?1:c)),d=t.w*(o.domain.x[1]-o.domain.x[0])/2;return-1!==o.title.position.indexOf("left")?(d+=u,a.x-=(1+i)*u,s.tx+=e.titleBox.width/2):-1!==o.title.position.indexOf("center")?d*=2:-1!==o.title.position.indexOf("right")&&(d+=u,a.x+=(1+i)*u,s.tx-=e.titleBox.width/2),r=d/e.titleBox.width,n=O(e,t)/e.titleBox.height,{x:a.x,y:a.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function O(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function R(e,t){for(var r=[],n=0;n1?u=(c=r.r)/i.aspectratio:c=(u=r.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}a=Math.min(a,l/r.vTotal)}for(n=0;n")}if(o){var x=l.castOption(i,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")}}(t),w=g.getFirstFilled(i.text,t.pts);(y(w)||""===w)&&(b.text=w),t.text=l.texttemplateString(x,b,e._fullLayout._d3locale,b,i._meta||{})}else t.text=""}}function D(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=(t.left+t.right)/2,a=(t.top+t.bottom)/2;e.textX=o*n-a*i,e.textY=o*i+a*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,o=e._fullLayout,f=o._size;p("pie",o),w(t,e),R(t,f);var m=l.makeTraceGroups(o._pielayer,t,"trace").each((function(t){var p=n.select(this),m=t[0],v=m.trace;!function(e){var t,r,n,i=e[0],o=i.r,a=i.trace,s=g.getRotationAngle(a.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===a.direction){for(t=0;ti.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-a.hole,r.rInscribed=A(r,i))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=n.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var w=[[[],[]],[[],[]]],k=!1;y.each((function(i,a){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=v.index,w[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var c=m.cx,u=m.cy,f=n.select(this),p=f.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),f.call(x,e,t),v.pull){var y=+g.castOption(v.pull,i.pts)||0;y>0&&(c+=y*i.pxmid[0],u+=y*i.pxmid[1])}i.cxFinal=c,i.cyFinal=u;var S=v.hole;if(i.v===m.vTotal){var T="M"+(c+i.px0[0])+","+(u+i.px0[1])+O(i.px0,i.pxmid,!0,1)+O(i.pxmid,i.px0,!0,1)+"Z";S?p.attr("d","M"+(c+S*i.px0[0])+","+(u+S*i.px0[1])+O(i.px0,i.pxmid,!1,S)+O(i.pxmid,i.px0,!1,S)+"Z"+T):p.attr("d",T)}else{var M=O(i.px0,i.px1,!0,1);if(S){var C=1-S;p.attr("d","M"+(c+S*i.px1[0])+","+(u+S*i.px1[1])+O(i.px1,i.px0,!1,S)+"l"+C*i.px0[0]+","+C*i.px0[1]+M+"Z")}else p.attr("d","M"+c+","+u+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}j(e,i,m);var A=g.castOption(v.textposition,i.pts),I=f.selectAll("g.slicetext").data(i.text&&"none"!==A?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each((function(){var r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=l.ensureUniformFontSize(e,"outside"===A?function(e,t,r){var n=g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,i=g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,o=g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:i,size:o}}(v,i,o.font):b(v,i,o.font));r.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,f).call(d.convertToTspans,e);var p,y=s.bBox(r.node());if("outside"===A)p=E(y,i);else if(p=_(y,i,m),"auto"===A&&p.scale<1){var x=l.ensureUniformFontSize(e,v.outsidetextfont);r.call(s.font,x),p=E(y=s.bBox(r.node()),i)}var w=p.textPosAngle,S=void 0===w?i.pxmid:L(m.r,w);if(p.targetX=c+S[0]*p.rCenter+(p.x||0),p.targetY=u+S[1]*p.rCenter+(p.y||0),D(p,y),p.outside){var T=p.targetY;i.yLabelMin=T-y.height/2,i.yLabelMid=T,i.yLabelMax=T+y.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}p.fontSize=f.size,h(v.type,p,o),t[a].transform=p,l.setTransormAndDisplay(r,p)}))}function O(e,t,r,n){var o=n*(t[0]-e[0]),a=n*(t[1]-e[1]);return"a"+n*m.r+","+n*m.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+o+","+a}}));var S=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(S.enter().append("g").classed("titletext",!0),S.exit().remove(),S.each((function(){var t,r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=v.title.text;v._meta&&(i=l.templateString(i,v._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,v.title.font).call(d.convertToTspans,e),t="middle center"===v.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(m):I(m,f),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),k&&function(e,t){var r,n,i,o,a,s,l,c,u,d,f,h,p;function m(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,r){r||(r={});var i,c,u,f,h=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),p=n?e.yLabelMin:e.yLabelMax,m=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+a(e.px0[1],e.px1[1]),y=h-p;if(y*l>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c=(g.castOption(t.pull,u.pts)||0)||((e.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+a(u.px0[1],u.px1[1])-p-e.labelExtraY)*l>0&&(e.labelExtraY+=y):(m+e.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-d.indexOf(e)),(f=u.cxFinal+o(u.px0[0],u.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=f)))}for(n=0;n<2;n++)for(i=n?m:v,a=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(o=r?Math.max:Math.min,s=r?1:-1,(c=e[n][r]).sort(i),u=e[1-n][r],d=u.concat(c),h=[],f=0;fMath.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(o+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(y,v),k&&v.automargin){var T=s.bBox(p.node()),M=v.domain,C=f.w*(M.x[1]-M.x[0]),A=f.h*(M.y[1]-M.y[0]),O=(.5*C-m.r)/f.w,P=(.5*A-m.r)/f.h;i.autoMargin(e,"pie."+v.uid+".automargin",{xl:M.x[0]-O,xr:M.x[1]+O,yb:M.y[0]-P,yt:M.y[1]+P,l:Math.max(m.cx-m.r-T.left,0),r:Math.max(T.right-(m.cx+m.r),0),b:Math.max(T.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-T.top,0),pad:5})}}))}));setTimeout((function(){m.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:j,transformInsideText:_,determineInsideTextFont:b,positionTitleOutside:I,prerenderTitles:w,layoutAreas:R,attachFxHandlers:x,computeTransform:D}},62570:(e,t,r)=>{"use strict";var n=r(8996),i=r(68872),o=r(22684).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");o(e,t,"pie"),t.each((function(t){var r=t[0].trace,o=n.select(this);o.style({opacity:r.opacity}),o.selectAll("path.surface").each((function(t){n.select(this).call(i,t,r,e)}))}))}},68872:(e,t,r)=>{"use strict";var n=r(66235),i=r(22084).castOption,o=r(61337);e.exports=function(e,t,r,a){var s=r.marker.line,l=i(s.color,t.pts)||n.defaultLine,c=i(s.width,t.pts)||0;e.call(o,t,r,a).style("stroke-width",c).call(n.stroke,l)}},97365:(e,t,r)=>{"use strict";var n=r(37471);e.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc",description:["Faster alternative to specifying `x` and `y` separately.","If supplied, it must be a typed `Float32Array` array that","represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]`"].join(" ")},indices:{valType:"data_array",editType:"calc",description:["A sequential value, 0..n, supply it to avoid creating this array inside plotting.","If specified, it must be a typed `Int32Array` array.","Its length must be equal to or greater than the number of points.","For the best performance and memory use, create one large `indices` typed array","that is guaranteed to be at least as long as the largest number of points during","use, and reuse it on each `Plotly.restyle()` call."].join(" ")},xbounds:{valType:"data_array",editType:"calc",description:["Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through","the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits."].join(" ")},ybounds:{valType:"data_array",editType:"calc",description:["Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through","the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits."].join(" ")},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc",description:["Sets the marker fill color. It accepts a specific color.","If the color is not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc",description:["Sets the marker opacity. The default value is `1` (fully opaque).","If the markers are not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning.","Opacity fades the color even if `blend` is left on `false` even if there","is no translucency effect in that case."].join(" ")},blend:{valType:"boolean",dflt:null,editType:"calc",description:["Determines if colors are blended together for a translucency effect","in case `opacity` is specified as a value less then `1`.","Setting `blend` to `true` reduces zoom/pan","speed if used with large numbers of points."].join(" ")},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc",description:["Sets the minimum size (in px) of the rendered marker points, effective when","the `pointcloud` shows a million or more points."].join(" ")},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc",description:["Sets the maximum size (in px) of the rendered marker points.","Effective when the `pointcloud` shows only few points."].join(" ")},border:{color:{valType:"color",arrayOk:!1,editType:"calc",description:["Sets the stroke color. It accepts a specific color.","If the color is not fully opaque and there are hundreds of thousands","of points, it may cause slower zooming and panning."].join(" ")},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Specifies what fraction of the marker area is covered with the","border."].join(" ")},editType:"calc"},editType:"calc"},transforms:void 0}},19433:(e,t,r)=>{"use strict";var n=r(13084).gl_pointcloud2d,i=r(55115),o=r(10351).findExtremes,a=r(83821);function s(e,t){this.scene=e,this.uid=t,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(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=a(e,{})},l.updateFast=function(e){var t,r,n,a,s,l,c=this.xData=this.pickXData=e.x,u=this.yData=this.pickYData=e.y,d=this.pickXYData=e.xy,f=e.xbounds&&e.ybounds,h=e.indices,p=this.bounds;if(d){if(n=d,t=d.length>>>1,f)p[0]=e.xbounds[0],p[2]=e.xbounds[1],p[1]=e.ybounds[0],p[3]=e.ybounds[1];else for(l=0;lp[2]&&(p[2]=a),sp[3]&&(p[3]=s);if(h)r=h;else for(r=new Int32Array(t),l=0;lp[2]&&(p[2]=a),sp[3]&&(p[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var m=i(e.marker.color),g=i(e.marker.border.color),v=e.opacity*e.marker.opacity;m[3]*=v,this.pointcloudOptions.color=m;var y=e.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,g[3]*=v,this.pointcloudOptions.borderColor=g;var x=e.marker.sizemin,b=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var w=this.scene.xaxis,_=this.scene.yaxis,k=b/2||.5;e._extremes[w._id]=o(w,[p[0],p[2]],{ppad:k}),e._extremes[_._id]=o(_,[p[1],p[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(e,t){var r=new s(e,t.uid);return r.update(t),r}},73523:(e,t,r)=>{"use strict";var n=r(53787),i=r(97365);e.exports=function(e,t,r){function o(r,o){return n.coerce(e,t,i,r,o)}o("x"),o("y"),o("xbounds"),o("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),o("text"),o("marker.color",r),o("marker.opacity"),o("marker.blend"),o("marker.sizemin"),o("marker.sizemax"),o("marker.border.color",r),o("marker.border.arearatio"),t._length=null}},26248:(e,t,r)=>{"use strict";var n=["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" ");e.exports={attributes:r(97365),supplyDefaults:r(73523),calc:r(51454),plot:r(19433),moduleType:"trace",name:"pointcloud",basePlotModule:r(27952),categories:["gl","gl2d","showLegend"],meta:{description:[n,"The data visualized as a point cloud set in `x` and `y`","using the WebGl plotting engine."].join(" ")}}},25499:(e,t,r)=>{"use strict";var n=r(92948),i=r(27231),o=r(18022),a=r(54289),s=r(29707).Y,l=r(32191).fF,c=r(8753),u=r(99862).templatedArray,d=r(89849).descriptionOnlyNumbers,f=r(10191).extendFlat,h=r(18693).overrideAll;(e.exports=h({hoverinfo:f({},i.hoverinfo,{flags:[],arrayOk:!1,description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired.","Note that this attribute is superseded by `node.hoverinfo` and `node.hoverinfo`","for nodes and links respectively."].join(" ")}),hoverlabel:a.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h",description:"Sets the orientation of the Sankey diagram."},valueformat:{valType:"string",dflt:".3s",description:d("value")},valuesuffix:{valType:"string",dflt:"",description:["Adds a unit to follow the value in the hover tooltip. Add a space if a separation","is necessary from the value."].join(" ")},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap",description:["If value is `snap` (the default), the node arrangement is assisted by automatic snapping of elements to","preserve space between nodes specified via `nodepad`.","If value is `perpendicular`, the nodes can only move along a line perpendicular to the flow.","If value is `freeform`, the nodes can freely move on the plane.","If value is `fixed`, the nodes are stationary."].join(" ")},textfont:n({description:"Sets the font for node labels"}),customdata:void 0,node:{label:{valType:"data_array",dflt:[],description:"The shown name of the node."},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"},description:["Groups of nodes.","Each group is defined by an array with the indices of the nodes it contains.","Multiple groups can be specified."].join(" ")},x:{valType:"data_array",dflt:[],description:"The normalized horizontal position of the node."},y:{valType:"data_array",dflt:[],description:"The normalized vertical position of the node."},color:{valType:"color",arrayOk:!0,description:["Sets the `node` color. It can be a single value, or an array for specifying color for each `node`.","If `node.color` is omitted, then the default `Plotly` color palette will be cycled through","to have a variety of colors. These defaults are not fully opaque, to allow some visibility of","what is beneath the node."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data to each node."].join(" ")},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,description:["Sets the color of the `line` around each `node`."].join(" ")},width:{valType:"number",min:0,dflt:.5,arrayOk:!0,description:["Sets the width (in px) of the `line` around each `node`."].join(" ")}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20,description:"Sets the padding (in px) between the `nodes`."},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20,description:"Sets the thickness (in px) of the `nodes`."},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all",description:["Determines which trace information appear when hovering nodes.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:a.hoverlabel,hovertemplate:l({},{description:"Variables `sourceLinks` and `targetLinks` are arrays of link objects.",keys:["value","label"]}),description:"The nodes of the Sankey plot."},link:{arrowlen:{valType:"number",min:0,dflt:0,description:["Sets the length (in px) of the links arrow, if 0 no arrow will be drawn."].join(" ")},label:{valType:"data_array",dflt:[],description:"The shown name of the link."},color:{valType:"color",arrayOk:!0,description:["Sets the `link` color. It can be a single value, or an array for specifying color for each `link`.","If `link.color` is omitted, then by default, a translucent grey link will be used."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data to each link."].join(" ")},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,description:["Sets the color of the `line` around each `link`."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,description:["Sets the width (in px) of the `line` around each `link`."].join(" ")}},source:{valType:"data_array",dflt:[],description:"An integer number `[0..nodes.length - 1]` that represents the source node."},target:{valType:"data_array",dflt:[],description:"An integer number `[0..nodes.length - 1]` that represents the target node."},value:{valType:"data_array",dflt:[],description:"A numeric value representing the flow volume value."},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all",description:["Determines which trace information appear when hovering links.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:a.hoverlabel,hovertemplate:l({},{description:"Variables `source` and `target` are node objects.",keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",description:"The label of the links to color based on their concentration within a flow.",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1,description:"Sets the upper bound of the color domain."},cmin:{valType:"number",editType:"calc",dflt:0,description:"Sets the lower bound of the color domain."},colorscale:f(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),description:"The links of the Sankey plot."}},"calc","nested")).transforms=void 0},53436:(e,t,r)=>{"use strict";var n=r(18693).overrideAll,i=r(38213).a0,o=r(1549),a=r(18971),s=r(19602),l=r(63e3),c=r(26002).prepSelect,u=r(53787),d=r(44049),f="sankey";function h(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,o="pan"===n.dragmode?"move":"crosshair",a=r._bgRect;if(a&&"pan"!==i&&"zoom"!==i){s(a,o);var f={_id:"x",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},p={gd:e,element:a.node(),plotinfo:{id:t,xaxis:f,yaxis:h,fillRangeItems:u.noop},subplot:t,xaxes:[f],yaxes:[h],doneFnCompleted:function(r){var n,i=e._fullData[t],o=i.node.groups.slice(),a=[];function s(e){for(var t=i._sankey.graph.nodes,r=0;r{"use strict";var n=r(47978),i=r(53787),o=r(41689).wrap,a=i.isArrayOrTypedArray,s=i.isIndex,l=r(10948);function c(e){var t,r=e.node,o=e.link,c=[],u=a(o.color),d=a(o.customdata),f={},h={},p=o.colorscales.length;for(t=0;ty&&(y=o.source[t]),o.target[t]>y&&(y=o.target[t]);var x,b=y+1;e.node._count=b;var w=e.node.groups,_={};for(t=0;t0&&s(A,b)&&s(E,b)&&(!_.hasOwnProperty(A)||!_.hasOwnProperty(E)||_[A]!==_[E])){_.hasOwnProperty(E)&&(E=_[E]),_.hasOwnProperty(A)&&(A=_[A]),E=+E,f[A=+A]=f[E]=!0;var I="";o.label&&o.label[t]&&(I=o.label[t]);var O=null;I&&h.hasOwnProperty(I)&&(O=h[I]),c.push({pointNumber:t,label:I,color:u?o.color[t]:o.color,customdata:d?o.customdata[t]:o.customdata,concentrationscale:O,source:A,target:E,value:+C}),M.source.push(A),M.target.push(E)}}var P=b+w.length,R=a(r.color),L=a(r.customdata),j=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:D,color:R?r.color[t]:r.color,customdata:L?r.customdata[t]:r.customdata})}var z=!1;return function(e,t,r){for(var o=i.init2dArray(e,0),a=0;a1}))}(P,M.source,M.target)&&(z=!0),{circular:z,links:c,nodes:j,groups:w,groupLookup:_}}e.exports=function(e,t){var r=c(t);return o({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},54421:e=>{"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"}}},57530:(e,t,r)=>{"use strict";var n=r(53787),i=r(25499),o=r(66235),a=r(25378),s=r(29707).c,l=r(70439),c=r(99862),u=r(80254);function d(e,t){function r(r,o){return n.coerce(e,t,i.link.colorscales,r,o)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(e,t,r,f){function h(r,o){return n.coerce(e,t,i,r,o)}var p=n.extendDeep(f.hoverlabel,e.hoverlabel),m=e.node,g=c.newContainer(t,"node");function v(e,t){return n.coerce(m,g,i.node,e,t)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",e.hoverinfo),l(m,g,v,p),v("hovertemplate");var y=f.colorway;v("color",g.label.map((function(e,t){return o.addOpacity(function(e){return y[e%y.length]}(t),.8)}))),v("customdata");var x=e.link||{},b=c.newContainer(t,"link");function w(e,t){return n.coerce(x,b,i.link,e,t)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",e.hoverinfo),l(x,b,w,p),w("hovertemplate");var _,k=a(f.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";w("color",n.repeat(k,b.value.length)),w("customdata"),u(x,b,{name:"colorscales",handleItemDefaults:d}),s(t,f,h),h("orientation"),h("valueformat"),h("valuesuffix"),g.x.length&&g.y.length&&(_="freeform"),h("arrangement",_),n.coerceFont(h,"textfont",n.extendFlat({},f.font)),t._length=null}},67751:(e,t,r)=>{"use strict";e.exports={attributes:r(25499),supplyDefaults:r(57530),calc:r(59691),plot:r(1549),moduleType:"trace",name:"sankey",basePlotModule:r(53436),selectPoints:r(7531),categories:["noOpacity"],meta:{description:["Sankey plots for network flow data analysis.","The nodes are specified in `nodes` and the links between sources and targets in `links`.","The colors are set in `nodes[i].color` and `links[i].color`, otherwise defaults are used."].join(" ")}}},1549:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=i.numberFormat,a=r(36709),s=r(76719),l=r(66235),c=r(54421).cn,u=i._;function d(e){return""!==e}function f(e,t){return e.filter((function(e){return e.key===t.traceId}))}function h(e,t){n.select(e).select("path").style("fill-opacity",t),n.select(e).select("rect").style("fill-opacity",t)}function p(e){n.select(e).select("text.name").style("fill","black")}function m(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function g(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function v(e,t,r){t&&r&&f(r,t).selectAll("."+c.sankeyLink).filter(m(t)).call(x.bind(0,t,r,!1))}function y(e,t,r){t&&r&&f(r,t).selectAll("."+c.sankeyLink).filter(m(t)).call(b.bind(0,t,r,!1))}function x(e,t,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),i&&f(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),r&&f(t,e).selectAll("."+c.sankeyNode).filter(g(e)).call(v)}function b(e,t,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(e){return e.tinyColorAlpha})),i&&f(t,e).selectAll("."+c.sankeyLink).filter((function(e){return e.link.label===i})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),r&&f(t,e).selectAll(c.sankeyNode).filter(g(e)).call(y)}function w(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}e.exports=function(e,t){for(var r=e._fullLayout,i=r._paper,f=r._size,m=0;m"),color:w(a,"bgcolor")||l.addOpacity(m.color,1),borderColor:w(a,"bordercolor"),fontFamily:w(a,"font.family"),fontSize:w(a,"font.size"),fontColor:w(a,"font.color"),nameLength:w(a,"namelength"),textAlign:w(a,"align"),idealAlign:n.event.x"),color:w(a,"bgcolor")||i.tinyColorHue,borderColor:w(a,"bordercolor"),fontFamily:w(a,"font.family"),fontSize:w(a,"font.size"),fontColor:w(a,"font.color"),nameLength:w(a,"namelength"),textAlign:w(a,"align"),idealAlign:"left",hovertemplate:a.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e});h(_,.85),p(_)}}},unhover:function(t,i,o){!1!==e._fullLayout.hovermode&&(n.select(t).call(y,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(t,r,i){var o=r.node;o.originalEvent=n.event,e._hoverdata=[o],n.select(t).call(y,r,i),s.click(e,{target:!0})}}})}},36709:(e,t,r)=>{"use strict";var n=r(98020),i=r(81105).k4,o=r(8996),a=r(22854),s=r(6954),l=r(54421),c=r(25378),u=r(66235),d=r(50973),f=r(53787),h=f.strTranslate,p=f.strRotate,m=r(41689),g=m.keyFun,v=m.repeat,y=m.unwrap,x=r(98224),b=r(44049),w=r(81653),_=w.CAP_SHIFT,k=w.LINE_SPACING;function S(e,t,r){var n,i=y(t),o=i.trace,u=o.domain,d="h"===o.orientation,h=o.node.pad,p=o.node.thickness,m=e.width*(u.x[1]-u.x[0]),g=e.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(l.sankeyIterations).size(d?[m,g]:[g,m]).nodeWidth(p).nodePadding(h).nodeId((function(e){return e.pointNumber})).nodes(v).links(x);var w,_,k,S=n();for(var T in n.nodePadding()=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+h}))}(function(e){var t,r,n=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),i=[],o=-1,a=-1/0;for(w=0;wa+p&&(o+=1,t=s.x0),a=s.x0,i[o]||(i[o]=[]),i[o].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i}(v=S.nodes));n.update(S)}return{circular:b,key:r,trace:o,guid:f.randstr(),horizontal:d,width:m,height:g,nodePad:o.node.pad,nodeLineColor:o.node.line.color,nodeLineWidth:o.node.line.width,linkLineColor:o.link.line.color,linkLineWidth:o.link.line.width,linkArrowLength:o.link.arrowlen,valueFormat:o.valueformat,valueSuffix:o.valuesuffix,textFont:o.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:d?g:m,dragPerpendicular:d?m:g,arrangement:o.arrangement,sankey:n,graph:S,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function T(e,t,r){var n=c(t.color),i=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function M(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var r=e.width/2,n=e.circularPathData;return"top"===e.circularLinkType?"M "+(n.targetX-t)+" "+(n.targetY+r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(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-t)+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"L"+(n.targetX-t)+" "+(n.targetY-r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z":"M "+(n.targetX-t)+" "+(n.targetY-r)+" L"+(n.rightInnerExtent-t)+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-t)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(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-t)+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r-t)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-t)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+r)+"L"+(n.targetX-t)+" "+(n.targetY+r)+(t>0?"L"+n.targetX+" "+n.targetY:"")+"Z"}(e.link,t);var r=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>r&&(t=r);var n=e.link.source.x1,o=e.link.target.x0-t,a=i(n,o),s=a(.5),l=a(.5),c=e.link.y0-e.link.width/2,u=e.link.y0+e.link.width/2,d=e.link.y1-e.link.width/2,f=e.link.y1+e.link.width/2,h="M"+n+","+c,p="C"+s+","+c+" "+l+","+d+" "+o+","+d,m="C"+l+","+f+" "+s+","+u+" "+n+","+u,g=t>0?"L"+(o+t)+","+(d+e.link.width/2):"";return h+p+(g+="L"+o+","+f)+m+"Z"}}function C(e,t){var r=c(t.color),n=l.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var o=t.dx,a=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=f.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(o),visibleHeight:a,zoneX:-n,zoneY:-i,zoneWidth:o+2*n,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function A(e){e.attr("transform",(function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function E(e){e.call(A)}function I(e,t){e.call(E),t.attr("d",M())}function O(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function P(e){return e.link.width>1||e.linkLineWidth>0}function R(e){return h(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function L(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)}))}function j(e,t,r,i){var a=o.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(o){if("fixed"!==o.arrangement&&(f.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),f.raiseToTop(this),o.interactionState.dragInProgress=o.node,z(o.node),o.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,o.interactionState.hovered),o.interactionState.hovered=!1),"snap"===o.arrangement)){var a=o.traceId+"|"+o.key;o.forceLayouts[a]?o.forceLayouts[a].alpha(1):function(e,t,r,i){!function(e){for(var t=0;t0&&n.forceLayouts[t].alpha(0)}}(0,t,o,r)).stop()}(0,a,o),function(e,t,r,n,i){window.requestAnimationFrame((function o(){var a;for(a=0;a0)window.requestAnimationFrame(o);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,D(r,i)}}))}(e,t,o,a,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=o.event.x,i=o.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),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),I(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t{"use strict";e.exports=function(e,t){for(var r=[],n=e.cd[0].trace,i=n._sankey.graph.nodes,o=0;o{"use strict";var n=r(53787);e.exports=function(e,t){for(var r=0;r{"use strict";var n=r(89849).axisHoverFormat,i=r(32191).si,o=r(32191).fF,a=r(8753),s=r(92948),l=r(93701).P,c=r(93701).u,u=r(50973),d=r(80775),f=r(10191).extendFlat;function h(e){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M* on the "+e+" axis.","Special values in the form of *M* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function p(e){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+e+" axis.","When `"+e+"period` is round number of weeks,","the `"+e+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function m(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+e+" axis."].join(" ")}}e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:h("x"),yperiod:h("y"),xperiod0:p("x0"),yperiod0:p("y0"),xperiodalignment:m("x"),yperiodalignment:m("y"),xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+d.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:o({},{keys:d.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:f({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},a("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},a("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},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",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})}},18719:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(28605),a=r(64594),s=r(24956).BADNUM,l=r(26775),c=r(65664),u=r(62532),d=r(35637);function f(e,t,r,n,i,a,s){var c=t._length,u=e._fullLayout,d=r._id,f=n._id,h=u._firstScatter[m(t)]===t.uid,p=(g(t,u,r,n)||{}).orientation,v=t.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};s&&(y.ppad=x.ppad=s);var b=c<2||i[0]!==i[c-1]||a[0]!==a[c-1];b&&("tozerox"===v||"tonextx"===v&&(h||"h"===p))?y.tozero=!0:(t.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(t)||l.hasText(t))||(y.padded=!1,y.ppad=0),b&&("tozeroy"===v||"tonexty"===v&&(h||"v"===p))?x.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(x.padded=!1),d&&(t._extremes[d]=o.findExtremes(r,i,y)),f&&(t._extremes[f]=o.findExtremes(n,a,x))}function h(e,t){if(l.hasMarkers(e)){var r,n=e.marker,a=1.6*(e.marker.sizeref||1);if(r="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/a),3)}:function(e){return Math.max((e||0)/a,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};o.setConvert(s);for(var c=s.makeCalcdata(e.marker,"size"),u=new Array(t),d=0;dl&&I[v].gap;)v--;for(x=I[v].s,m=I.length-1;m>v;m--)I[m].s=x;for(;l{"use strict";var n=r(53787);e.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},65664:(e,t,r)=>{"use strict";var n=r(25584).hasColorscale,i=r(1631),o=r(26775);e.exports=function(e,t){o.hasLines(t)&&n(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),o.hasMarkers(t)&&(n(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},80775:e=>{"use strict";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},42344:(e,t,r)=>{"use strict";var n=r(18719),i=r(39713).setGroupPositions;function o(e,t,r,n,i,o,a){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[a]=r,e.splice(t,0,s),t&&r===e[t-1][a]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else o&&(s.s=function(e,t,r,n){var i=e[t-1],o=e[t+1];return o?i?i.s+(o.s-i.s)*(r-i[n])/(o[n]-i[n]):o.s:i.s}(e,t,r,a));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}e.exports=function(e,t){"group"===e._fullLayout.scattermode&&function(e,t){for(var r=t.xaxis,n=t.yaxis,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=[],c=[],u=0;uC[d]&&d{"use strict";var n=r(53787),i=r(25305),o=r(37471);e.exports=function(e,t){var r,a,s;function l(e){return n.coerce(a._input,a,o,e)}if("group"===t.scattermode)for(s=0;s=0;d--){var f=e[d];if("scatter"===f.type&&f.xaxis===c.xaxis&&f.yaxis===c.yaxis){f.opacity=void 0;break}}}}}},539:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(37471),a=r(80775),s=r(26775),l=r(89016),c=r(17239),u=r(12507),d=r(6408),f=r(82028),h=r(80156),p=r(37480),m=r(4363),g=r(53787).coercePattern;e.exports=function(e,t,r,v){function y(r,i){return n.coerce(e,t,o,r,i)}var x=l(e,t,v,y);if(x||(t.visible=!1),t.visible){c(e,t,v,y),y("xhoverformat"),y("yhoverformat");var b=u(e,t,v,y);"group"===v.scattermode&&void 0===t.orientation&&y("orientation","v");var w=!b&&x{"use strict";var n=r(66235),i=r(53787).isArrayOrTypedArray;e.exports=function(e,t,r,o){var a=!1;if(t.marker){var s=t.marker.color,l=(t.marker.line||{}).color;s&&!i(s)?a=s:l&&!i(l)&&(a=l)}o("fillcolor",n.addOpacity((t.line||{}).color||a||r,.5))}},48529:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o={_fullLayout:r},a=n.getFromTrace(o,t,"x"),s=n.getFromTrace(o,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),i.xLabel=n.tickText(a,a.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(c),!0).text,i}},83821:(e,t,r)=>{"use strict";var n=r(66235),i=r(26775);e.exports=function(e,t){var r,o;if("lines"===e.mode)return(r=e.line.color)&&n.opacity(r)?r:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var a=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(o=a&&n.opacity(a)?a:s&&n.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?n.opacity(o)<.3?n.addOpacity(o,.3):o:(r=(e.line||{}).color)&&n.opacity(r)&&i.hasLines(e)&&e.line.width?r:e.fillcolor}},25305:(e,t,r)=>{"use strict";var n=r(14511).getAxisGroup;e.exports=function(e,t,r,i){var o=t.orientation,a=t[{v:"x",h:"y"}[o]+"axis"],s=n(r,a)+o,l=r._alignmentOpts||{},c=i("alignmentgroup"),u=l[s];u||(u=l[s]={});var d=u[c];d?d.traces.push(t):d=u[c]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var f=i("offsetgroup"),h=d.offsetGroups,p=h[f];f&&(p||(p=h[f]={offsetIndex:Object.keys(h).length}),t._offsetIndex=p.offsetIndex)}},77128:(e,t,r)=>{"use strict";var n=r(53787),i=r(76719),o=r(44049),a=r(83821),s=r(66235),l=n.fillText;e.exports=function(e,t,r,c){var u=e.cd,d=u[0].trace,f=e.xa,h=e.ya,p=f.c2p(t),m=h.c2p(r),g=[p,m],v=d.hoveron||"",y=-1!==d.mode.indexOf("markers")?3:.5,x=!!d.xperiodalignment,b=!!d.yperiodalignment;if(-1!==v.indexOf("points")){var w=function(e){var t=Math.max(y,e.mrc||0),r=f.c2p(e.x)-p,n=h.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-y/t)},_=i.getDistanceFunction(c,(function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,o=Math.abs(f.c2p(e.x)-p);return o=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,o=Math.abs(h.c2p(e.y)-m);return oq!==(F=L[P][1])>=q&&(D=L[P-1][0],z=L[P][0],F-N&&(j=D+(z-D)*(q-N)/(F-N),V=Math.min(V,j),H=Math.max(H,j)));V=Math.max(V,0),H=Math.min(H,f._length);var Y=s.defaultLine;return s.opacity(d.fillcolor)?Y=d.fillcolor:s.opacity((d.line||{}).color)&&(Y=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:V,x1:H,y0:q,y1:q,color:Y,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},88975:(e,t,r)=>{"use strict";var n=r(26775);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(37471),layoutAttributes:r(61070),supplyDefaults:r(539),crossTraceDefaults:r(22551),supplyLayoutDefaults:r(95227),calc:r(18719).calc,crossTraceCalc:r(42344),arraysToCalcdata:r(62532),plot:r(96865),colorbar:r(68971),formatLabels:r(48529),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(77128),selectPoints:r(97976),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(48206),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},61070:e=>{"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}}},95227:(e,t,r)=>{"use strict";var n=r(53787),i=r(61070);e.exports=function(e,t){var r,o,a="group"===t.barmode;"group"===t.scattermode&&(r="scattergap",o=a?t.bargap:.2,n.coerce(e,t,i,r,o))}},82028:(e,t,r)=>{"use strict";var n=r(53787).isArrayOrTypedArray,i=r(25584).hasColorscale,o=r(5876);e.exports=function(e,t,r,a,s,l){l||(l={});var c=(e.marker||{}).color;(s("line.color",r),i(e,"line"))?o(e,t,a,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r);s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},84542:(e,t,r)=>{"use strict";var n=r(50973),i=r(24956),o=i.BADNUM,a=i.LOG_CLIP,s=a+.5,l=a-.5,c=r(53787),u=c.segmentsIntersect,d=c.constrain,f=r(80775);e.exports=function(e,t){var r,i,a,h,p,m,g,v,y,x,b,w,_,k,S,T,M,C,A=t.trace||{},E=t.xaxis,I=t.yaxis,O="log"===E.type,P="log"===I.type,R=E._length,L=I._length,j=t.backoff,D=A.marker,z=t.connectGaps,N=t.baseTolerance,F=t.shape,B="linear"===F,Z=A.fill&&"none"!==A.fill,U=[],V=f.minTolerance,H=e.length,W=new Array(H),G=0;function q(r){var n=e[r];if(!n)return!1;var i=t.linearized?E.l2p(n.x):E.c2p(n.x),a=t.linearized?I.l2p(n.y):I.c2p(n.y);if(i===o){if(O&&(i=E.c2p(n.x,!0)),i===o)return!1;P&&a===o&&(i*=Math.abs(E._m*L*(E._m>0?s:l)/(I._m*R*(I._m>0?s:l)))),i*=1e3}if(a===o){if(P&&(a=I.c2p(n.y,!0)),a===o)return!1;a*=1e3}return[i,a]}function Y(e,t,r,n){var i=r-e,o=n-t,a=.5-e,s=.5-t,l=i*i+o*o,c=i*a+o*s;if(c>0&&cae||e[1]le)return[d(e[0],oe,ae),d(e[1],se,le)]}function de(e,t){return e[0]===t[0]&&(e[0]===oe||e[0]===ae)||(e[1]===t[1]&&(e[1]===se||e[1]===le)||void 0)}function fe(e,t,r){return function(n,i){var o=ue(n),a=ue(i),s=[];if(o&&a&&de(o,a))return s;o&&s.push(o),a&&s.push(a);var l=2*c.constrain((n[e]+i[e])/2,t,r)-((o||n)[e]+(a||i)[e]);l&&((o&&a?l>0===o[e]>a[e]?o:a:o||a)[e]+=l);return s}}function he(e){var t=e[0],r=e[1],n=t===W[G-1][0],i=r===W[G-1][1];if(!n||!i)if(G>1){var o=t===W[G-2][0],a=r===W[G-2][1];n&&(t===oe||t===ae)&&o?a?G--:W[G-1]=e:i&&(r===se||r===le)&&a?o?G--:W[G-1]=e:W[G++]=e}else W[G++]=e}function pe(e){W[G-1][0]!==e[0]&&W[G-1][1]!==e[1]&&he([Q,ee]),he(e),te=null,Q=ee=0}"linear"===F||"spline"===F?ne=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var o=ce[i],a=u(e[0],e[1],t[0],t[1],o[0],o[1],o[2],o[3]);a&&(!n||Math.abs(a.x-r[0][0])>1||Math.abs(a.y-r[0][1])>1)&&(a=[a.x,a.y],n&&K(a,e)ae?ae:0,J=t[1]le?le:0,$||J){if(G)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),W[G++]=n[1])}else re=ne(W[G-1],t)[0],W[G++]=re;else W[G++]=[$||t[0],J||t[1]];var i=W[G-1];$&&J&&(i[0]!==$||i[1]!==J)?(te&&(Q!==$&&ee!==J?he(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?oe:ae,le]:[n>0?ae:oe,se]}(te,t):[Q||$,ee||J]):Q&&ee&&he([Q,ee])),he([$,J])):Q-$&&ee-J&&he([$||Q,J||ee]),te=t,Q=$,ee=J}else te&&pe(ne(te,t)[0]),W[G++]=t}for(r=0;rX(m,ve))break;a=m,(_=y[0]*v[0]+y[1]*v[1])>b?(b=_,h=m,g=!1):_=e.length||!m)break;ge(m),i=m}}else ge(h)}te&&he([Q||te[0],ee||te[1]]),U.push(W.slice(0,G))}var ye=F.slice(F.length-1);if(j&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,we=[],_e=0;_e{"use strict";e.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},98022:e=>{"use strict";var t={tonextx:1,tonexty:1,tonext:1};e.exports=function(e,r,n){var i,o,a,s,l,c={},u=!1,d=-1,f=0,h=-1;for(o=0;o=0?l=h:(l=h=f,f++),l{"use strict";var n=r(51908);e.exports=function(e,t){t||(t=2);var r=e.marker,i=r.sizeref||1,o=r.sizemin||0,a="area"===r.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var r=a(e/t);return n(r)&&r>0?Math.max(r,o):0}}},68971:e=>{"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},6408:(e,t,r)=>{"use strict";var n=r(66235),i=r(25584).hasColorscale,o=r(5876),a=r(26775);e.exports=function(e,t,r,s,l,c){var u=a.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(r=d),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(e,"marker")&&o(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),i(e,"marker.line")&&o(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},17239:(e,t,r)=>{"use strict";var n=r(53787).dateTick0,i=r(24956).ONEWEEK;function o(e,t){return n(t,e%i===0?1:0)}e.exports=function(e,t,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var a=n("xperiod");a&&(n("xperiod0",o(a,t.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",o(s,t.ycalendar)),n("yperiodalignment"))}}},96865:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(53787),a=o.ensureSingle,s=o.identity,l=r(50973),c=r(26775),u=r(84542),d=r(98022),f=r(71962).tester;function h(e,t,r,d,h,p,m){var g,v=e._context.staticPlot;!function(e,t,r,i,a){var s=r.xaxis,l=r.yaxis,u=n.extent(o.simpleMap(s.range,s.r2c)),d=n.extent(o.simpleMap(l.range,l.r2c)),f=i[0].trace;if(!c.hasMarkers(f))return;var h=f.marker.maxdisplayed;if(0===h)return;var p=i.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(p.length/h),g=0;a.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return y?e.transition():e}var b=r.xaxis,w=r.yaxis,_=d[0].trace,k=_.line,S=n.select(p),T=a(S,"g","errorbars"),M=a(S,"g","lines"),C=a(S,"g","points"),A=a(S,"g","text");if(i.getComponentMethod("errorbars","plot")(e,T,r,m),!0===_.visible){var E,I;x(S).style("opacity",_.opacity);var O=_.fill.charAt(_.fill.length-1);"x"!==O&&"y"!==O&&(O=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=S;var P,R,L="",j=[],D=_._prevtrace;D&&(L=D._prevRevpath||"",I=D._nextFill,j=D._polygons);var z,N,F,B,Z,U,V,H="",W="",G=[],q=o.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(I&&I.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(z=l.steps(k.shape),N=l.steps(k.shape.split("").reverse().join(""))):z=N="spline"===k.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),k.smoothing):l.smoothopen(e,k.smoothing)}:function(e){return"M"+e.join("L")},F=function(e){return N(e.reverse())},G=u(d,{xaxis:b,yaxis:w,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),g=0;g0,g=d(e,t,r);((u=i.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,r){t.each((function(t){var i=a(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,e);var o=t[0].trace,c=[];o._ownfill&&c.push("_ownFill"),o._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(e){o[e]=null})).remove(),u.order().each((function(e){o[e]=a(n.select(this),"path","js-fill")}))}))}(e,u,t),m)?(c&&(f=c()),n.transition().duration(o.duration).ease(o.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){i.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,o)}))}))):u.each((function(r,n){h(e,n,t,r,g,this,o)}));p&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},97976:(e,t,r)=>{"use strict";var n=r(26775);e.exports=function(e,t){var r,i,o,a,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],d=s[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r{"use strict";var t=["orientation","groupnorm","stackgaps"];e.exports=function(e,r,n,i){var o=n._scatterStackOpts,a=i("stackgroup");if(a){var s=r.xaxis+r.yaxis,l=o[s];l||(l=o[s]={});var c=l[a],u=!1;c?c.traces.push(r):(c=l[a]={traceIndices:[],traces:[r]},u=!0);for(var d={orientation:r.x&&!r.y?"h":"v"},f=0;f{"use strict";var n=r(8996),i=r(50973),o=r(44049);function a(e,t,r){i.pointStyle(e.selectAll("path.point"),t,r)}function s(e,t,r){i.textPointStyle(e.selectAll("text"),t,r)}e.exports={style:function(e){var t=n.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){a(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){s(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,e),o.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:s,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,e),s(r,n,e))}}},26775:(e,t,r)=>{"use strict";var n=r(53787);e.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){return n.isPlainObject(e.marker)&&n.isArrayOrTypedArray(e.marker.size)}}},37480:(e,t,r)=>{"use strict";var n=r(53787);e.exports=function(e,t,r,i,o){o=o||{},i("textposition"),n.coerceFont(i,"textfont",o.font||r.font),o.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},89016:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049);e.exports=function(e,t,r,o){var a,s=o("x"),l=o("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),s){var c=n.minRowLength(s);l?a=Math.min(c,n.minRowLength(l)):(a=c,o("y0"),o("dy"))}else{if(!l)return 0;a=n.minRowLength(l),o("x0"),o("dx")}return t._length=a,a}},50844:(e,t,r)=>{"use strict";var n=r(37471),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(32191).si,l=r(27231),c=r(72301),u=r(79291),d=r(10191).extendFlat,f=r(18693).overrideAll,h=r(99238),p=n.line,m=n.marker,g=m.line,v=d({width:p.width,dash:{valType:"enumerated",values:h(c),dflt:"solid",description:"Sets the dash style of the lines."}},i("line"));function y(e){return{show:{valType:"boolean",dflt:!1,description:["Sets whether or not projections are shown along the",e,"axis."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the projection color."},scale:{valType:"number",min:0,max:10,dflt:2/3,description:["Sets the scale factor determining the size of the","projection marker points."].join(" ")}}}var x=e.exports=f({x:n.x,y:n.y,z:{valType:"data_array",description:"Sets the z coordinates."},text:d({},n.text,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:s({},{}),hovertext:d({},n.hovertext,{description:["Sets text elements associated with each (x,y,z) triplet.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y,z) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),mode:d({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1,description:["If *-1*, the scatter points are not fill with a surface","If *0*, *1*, *2*, the scatter points are filled with","a Delaunay surface about the x, y, z respectively."].join(" ")},surfacecolor:{valType:"color",description:"Sets the surface fill color."},projection:{x:y("x"),y:y("y"),z:y("z")},connectgaps:n.connectgaps,line:v,marker:d({symbol:{valType:"enumerated",values:h(u),dflt:"circle",arrayOk:!0,description:"Sets the marker symbol type."},size:d({},m.size,{dflt:8}),sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode,opacity:d({},m.opacity,{arrayOk:!1,description:["Sets the marker opacity.","Note that the marker opacity for scatter3d traces","must be a scalar value for performance reasons.","To set a blending opacity value","(i.e. which is not transparent), set *marker.color*","to an rgba color and use its alpha channel."].join(" ")}),colorbar:m.colorbar,line:d({width:d({},g.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:d({},n.textposition,{dflt:"top center"}),textfont:{color:n.textfont.color,size:n.textfont.size,family:d({},n.textfont.family,{arrayOk:!1})},opacity:l.opacity,hoverinfo:d({},l.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"},51454:(e,t,r)=>{"use strict";var n=r(62532),i=r(65664);e.exports=function(e,t){var r=[{x:!1,y:!1,trace:t,t:{}}];return n(r,t),i(e,t),r}},42561:(e,t,r)=>{"use strict";var n=r(44049);function i(e,t,r,i){if(!t||!t.visible)return null;for(var o=n.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),s=0;s0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else a[s]=[-l[0]*r,l[1]*r]}return a}e.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],o=function(e){for(var t=0;t{"use strict";var n=r(13084).gl_line3d,i=r(13084).gl_scatter3d,o=r(13084).gl_error3d,a=r(13084).gl_mesh3d,s=r(13084).delaunay_triangulate,l=r(53787),c=r(55115),u=r(95049).formatColor,d=r(94244),f=r(72301),h=r(79291),p=r(28605),m=r(87267).appendArrayPointValue,g=r(42561);function v(e,t){this.scene=e,this.uid=t,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=v.prototype;function x(e){return null===e||void 0===e?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function b(e){return null===e||void 0===e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function w(e,t){return t(4*e)}function _(e){return h[e]}function k(e,t,r,n,i){var o=null;if(l.isArrayOrTypedArray(e)){o=[];for(var a=0;a=0){var m=function(e,t,r){var n,i=(r+1)%3,o=(r+2)%3,a=[],l=[];for(n=0;n{"use strict";var n=r(44049),i=r(53787),o=r(26775),a=r(6408),s=r(82028),l=r(37480),c=r(50844);e.exports=function(e,t,r,u){function d(r,n){return i.coerce(e,t,c,r,n)}var f=function(e,t,r,i){var o=0,a=r("x"),s=r("y"),l=r("z");n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),a&&s&&l&&(o=Math.min(a.length,s.length,l.length),t._length=t._xlength=t._ylength=t._zlength=o);return o}(e,t,d,u);if(f){d("text"),d("hovertext"),d("hovertemplate"),d("xhoverformat"),d("yhoverformat"),d("zhoverformat"),d("mode"),o.hasLines(t)&&(d("connectgaps"),s(e,t,r,u,d)),o.hasMarkers(t)&&a(e,t,r,u,d,{noSelect:!0,noAngle:!0}),o.hasText(t)&&(d("texttemplate"),l(e,t,u,d,{noSelect:!0}));var h=(t.line||{}).color,p=(t.marker||{}).color;d("surfaceaxis")>=0&&d("surfacecolor",h||p);for(var m=["x","y","z"],g=0;g<3;++g){var v="projection."+m[g];d(v+".show")&&(d(v+".opacity"),d(v+".scale"))}var y=n.getComponentMethod("errorbars","supplyDefaults");y(e,t,h||p||r,{axis:"z"}),y(e,t,h||p||r,{axis:"y",inherit:"z"}),y(e,t,h||p||r,{axis:"x",inherit:"z"})}else t.visible=!1}},81284:(e,t,r)=>{"use strict";e.exports={plot:r(62211),attributes:r(50844),markerSymbols:r(79291),supplyDefaults:r(42020),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(51454),moduleType:"trace",name:"scatter3d",basePlotModule:r(36390),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_3d",description:["The data visualized as scatter point or lines in 3D dimension","is set in `x`, `y`, `z`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","Projections are achieved via `projection`.","Surface fills are achieved via `surfaceaxis`."].join(" ")}}},35355:(e,t,r)=>{"use strict";var n=r(37471),i=r(27231),o=r(32191).fF,a=r(32191).si,s=r(8753),l=r(10191).extendFlat,c=n.marker,u=n.line,d=c.line;e.exports={carpet:{valType:"string",editType:"calc",description:["An identifier for this carpet, so that `scattercarpet` and","`contourcarpet` traces can specify a carpet plot on which","they lie"].join(" ")},a:{valType:"data_array",editType:"calc",description:"Sets the a-axis coordinates."},b:{valType:"data_array",editType:"calc",description:"Sets the b-axis coordinates."},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{description:["Sets text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:a({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{description:["Sets hover text elements associated with each (a,b) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:d.width,editType:"calc"},s("marker.line")),gradient:c.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:o()}},39738:(e,t,r)=>{"use strict";var n=r(51908),i=r(65664),o=r(62532),a=r(35637),s=r(18719).calcMarkerSize,l=r(94624);e.exports=function(e,t){var r=t._carpetTrace=l(e,t);if(r&&r.visible&&"legendonly"!==r.visible){var c;t.xaxis=r.xaxis,t.yaxis=r.yaxis;var u,d,f=t._length,h=new Array(f),p=!1;for(c=0;c{"use strict";var n=r(53787),i=r(80775),o=r(26775),a=r(6408),s=r(82028),l=r(80156),c=r(37480),u=r(4363),d=r(35355);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}h("carpet"),t.xaxis="x",t.yaxis="y";var p=h("a"),m=h("b"),g=Math.min(p.length,m.length);if(g){t._length=g,h("text"),h("texttemplate"),h("hovertext"),h("mode",g{"use strict";e.exports=function(e,t,r,n,i){var o=n[i];return e.a=o.a,e.b=o.b,e.y=o.y,e}},18039:e=>{"use strict";e.exports=function(e,t){var r={},n=t._carpet,i=n.ab2ij([e.a,e.b]),o=Math.floor(i[0]),a=i[0]-o,s=Math.floor(i[1]),l=i[1]-s,c=n.evalxy([],o,s,a,l);return r.yLabel=c[1].toFixed(3),r}},74092:(e,t,r)=>{"use strict";var n=r(77128),i=r(53787).fillText;e.exports=function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index){var l=1-s.y0/e.ya._length,c=e.xa._length,u=c*l/2,d=c-u;return s.x0=Math.max(Math.min(s.x0,d),u),s.x1=Math.max(Math.min(s.x1,d),u),a}var f=s.cd[s.index];s.a=f.a,s.b=f.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var h=s.trace,p=h._carpet,m=h._module.formatLabels(f,h);s.yLabel=m.yLabel,delete s.text;var g=[];if(!h.hovertemplate){var v=(f.hi||h.hoverinfo).split("+");-1!==v.indexOf("all")&&(v=["a","b","text"]),-1!==v.indexOf("a")&&y(p.aaxis,f.a),-1!==v.indexOf("b")&&y(p.baxis,f.b),g.push("y: "+s.yLabel),-1!==v.indexOf("text")&&i(f,h,g),s.extraText=g.join("
")}return a}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}},31871:(e,t,r)=>{"use strict";e.exports={attributes:r(35355),supplyDefaults:r(77050),colorbar:r(68971),formatLabels:r(18039),calc:r(39738),plot:r(87349),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(74092),selectPoints:r(97976),eventData:r(1651),moduleType:"trace",name:"scattercarpet",basePlotModule:r(48206),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{hrName:"scatter_carpet",description:["Plots a scatter trace on either the first carpet axis or the","carpet axis with a matching `carpet` attribute."].join(" ")}}},87349:(e,t,r)=>{"use strict";var n=r(96865),i=r(28605),o=r(50973);e.exports=function(e,t,r,a){var s,l,c,u=r[0][0].carpet,d=i.getFromId(e,u.xaxis||"x"),f=i.getFromId(e,u.yaxis||"y"),h={xaxis:d,yaxis:f,plot:t.plot};for(s=0;s{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(37471),a=r(27231),s=r(8753),l=r(93701).P,c=r(10191).extendFlat,u=r(18693).overrideAll,d=o.marker,f=o.line,h=d.line;e.exports=u({lon:{valType:"data_array",description:"Sets the longitude coordinates (in degrees East)."},lat:{valType:"data_array",description:"Sets the latitude coordinates (in degrees North)."},locations:{valType:"data_array",description:["Sets the coordinates via location IDs or names.","Coordinates correspond to the centroid of each location given.","See `locationmode` for more info."].join(" ")},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3",description:["Determines the set of locations used to match entries in `locations`","to regions on the map.","Values *ISO-3*, *USA-states*, *country names* correspond to features on","the base map and value *geojson-id* corresponds to features from a custom","GeoJSON linked to the `geojson` attribute."].join(" ")},geojson:{valType:"any",editType:"calc",description:["Sets optional GeoJSON data associated with this trace.","If not given, the features on the base map are used when `locations` is set.","It can be set as a valid GeoJSON object or as a URL string.","Note that we only accept GeoJSONs of type *FeatureCollection* or *Feature*","with geometries of type *Polygon* or *MultiPolygon*."].join(" ")},featureidkey:{valType:"string",editType:"calc",dflt:"id",description:["Sets the key in GeoJSON features which is used as id to match the items","included in the `locations` array.","Only has an effect when `geojson` is set.","Support nested property, for example *properties.name*."].join(" ")},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{description:["Sets text elements associated with each (lon,lat) pair","or item in `locations`.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) or `locations` coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:c({},o.hovertext,{description:["Sets hover text elements associated with each (lon,lat) pair","or item in `locations`.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) or `locations` coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),textfont:o.textfont,textposition:o.textposition,line:{color:f.color,width:f.width,dash:l},connectgaps:o.connectgaps,marker:c({symbol:d.symbol,opacity:d.opacity,angle:d.angle,angleref:c({},d.angleref,{values:["previous","up","north"],description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen.","With *north*, angle 0 points north based on the current map projection."].join(" ")}),standoff:d.standoff,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,colorbar:d.colorbar,line:c({width:h.width},s("marker.line")),gradient:d.gradient},s("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape."].join(" ")},fillcolor:o.fillcolor,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:n()},"calc","nested")},73997:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(65664),a=r(62532),s=r(35637),l=r(53787)._;function c(e){return e&&"string"===typeof e}e.exports=function(e,t){var r,u=Array.isArray(t.locations),d=u?t.locations.length:t._length,f=new Array(d);r=t.geojson?function(e){return c(e)||n(e)}:c;for(var h=0;h{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(37480),l=r(4363),c=r(20958);e.exports=function(e,t,r,u){function d(r,i){return n.coerce(e,t,c,r,i)}var f,h=d("locations");if(h&&h.length){var p,m=d("geojson");("string"===typeof m&&""!==m||n.isPlainObject(m))&&(p="geojson-id"),"geojson-id"===d("locationmode",p)&&d("featureidkey"),f=h.length}else{var g=d("lon")||[],v=d("lat")||[];f=Math.min(g.length,v.length)}f?(t._length=f,d("text"),d("hovertext"),d("hovertemplate"),d("mode"),i.hasLines(t)&&(a(e,t,r,u,d),d("connectgaps")),i.hasMarkers(t)&&o(e,t,r,u,d,{gradient:!0}),i.hasText(t)&&(d("texttemplate"),s(e,t,u,d)),d("fill"),"none"!==t.fill&&l(e,t,r,d),n.coerceSelectionMarkerOpacity(t,d)):t.visible=!1}},77070:e=>{"use strict";e.exports=function(e,t,r,n,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var o=n[i];return o.fIn&&o.fIn.properties&&(e.properties=o.fIn.properties),e}},16087:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.geo]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=n.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=n.tickText(o,o.c2l(a[1]),!0).text,i}},40914:(e,t,r)=>{"use strict";var n=r(76719),i=r(24956).BADNUM,o=r(83821),a=r(53787).fillText,s=r(20958);e.exports=function(e,t,r){var l=e.cd,c=l[0].trace,u=e.xa,d=e.ya,f=e.subplot,h=f.projection.isLonLatOverEdges,p=f.project;if(n.getClosest(l,(function(e){var n=e.lonlat;if(n[0]===i)return 1/0;if(h(n))return 1/0;var o=p(n),a=p([t,r]),s=Math.abs(o[0]-a[0]),l=Math.abs(o[1]-a[1]),c=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)}),e),!1!==e.index){var m=l[e.index],g=m.lonlat,v=[u.c2p(g),d.c2p(g)],y=m.mrc||1;e.x0=v[0]-y,e.x1=v[0]+y,e.y0=v[1]-y,e.y1=v[1]+y,e.loc=m.loc,e.lon=g[0],e.lat=g[1];var x={};x[c.geo]={_subplot:f};var b=c._module.formatLabels(m,c,x);return e.lonLabel=b.lonLabel,e.latLabel=b.latLabel,e.color=o(c,m),e.extraText=function(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,o="all"===i?s.hoverinfo.flags:i.split("+"),l=-1!==o.indexOf("location")&&Array.isArray(e.locations),c=-1!==o.indexOf("lon"),u=-1!==o.indexOf("lat"),d=-1!==o.indexOf("text"),f=[];function h(e){return e+"\xb0"}l?f.push(t.loc):c&&u?f.push("("+h(r.latLabel)+", "+h(r.lonLabel)+")"):c?f.push(n.lon+h(r.lonLabel)):u&&f.push(n.lat+h(r.latLabel));d&&a(t,e,f);return f.join("
")}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},56100:(e,t,r)=>{"use strict";e.exports={attributes:r(20958),supplyDefaults:r(42807),colorbar:r(68971),formatLabels:r(16087),calc:r(73997),calcGeoJSON:r(77910).calcGeoJSON,plot:r(77910).plot,style:r(62443),styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(40914),eventData:r(77070),selectPoints:r(47483),moduleType:"trace",name:"scattergeo",basePlotModule:r(33857),categories:["geo","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_geo",description:["The data visualized as scatter point or lines on a geographic map","is provided either by longitude/latitude pairs in `lon` and `lat`","respectively or by geographic location IDs or names in `locations`."].join(" ")}}},77910:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(58268).getTopojsonFeatures,a=r(31360),s=r(426),l=r(10351).findExtremes,c=r(24956).BADNUM,u=r(18719).calcMarkerSize,d=r(26775),f=r(62443);e.exports={calcGeoJSON:function(e,t){var r,n,i=e[0].trace,a=t[i.geo],d=a._subplot,f=i._length;if(Array.isArray(i.locations)){var h=i.locationmode,p="geojson-id"===h?s.extractTraceFeature(e):o(i,d.topojson);for(r=0;r{"use strict";var n=r(26775),i=r(24956).BADNUM;e.exports=function(e,t){var r,o,a,s,l,c=e.cd,u=e.xaxis,d=e.yaxis,f=[],h=c[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===t)for(l=0;l{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(5196),s=a.stylePoints,l=a.styleText;e.exports=function(e,t){t&&function(e,t){var r=t[0].trace,a=t[0].node3;a.style("opacity",t[0].trace.opacity),s(a,r,e),l(a,r,e),a.selectAll("path.js-line").style("fill","none").each((function(e){var t=n.select(this),r=e.trace,a=r.line||{};t.call(o.stroke,a.color).call(i.dashLine,a.dash||"",a.width||0),"none"!==r.fill&&t.call(o.fill,r.fillcolor)}))}(e,t)}},50474:(e,t,r)=>{"use strict";var n=r(27231),i=r(37471),o=r(89849).axisHoverFormat,a=r(8753),s=r(99238),l=r(10191).extendFlat,c=r(18693).overrideAll,u=r(45201).DASHES,d=i.line,f=i.marker,h=f.line,p=e.exports=c({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:o("x"),yhoverformat:o("y"),text:i.text,hovertext:i.hovertext,textposition:i.textposition,textfont:i.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:d.color,width:d.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:s(u),dflt:"solid",description:"Sets the style of the lines."}},marker:l({},a("marker"),{symbol:f.symbol,angle:f.angle,size:f.size,sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:l({},a("marker.line"),{width:h.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");p.x.editType=p.y.editType=p.x0.editType=p.y0.editType="calc+clearAxisTypes",p.hovertemplate=i.hovertemplate,p.texttemplate=i.texttemplate},78121:(e,t,r)=>{"use strict";var n=r(36689);e.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(48206),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(50474),supplyDefaults:r(58458),crossTraceDefaults:r(22551),colorbar:r(68971),formatLabels:r(76890),calc:r(88762),hoverPoints:n.hoverPoints,selectPoints:r(23691),meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}}},88762:(e,t,r)=>{"use strict";var n=r(28984),i=r(53787),o=r(24279),a=r(10351).findExtremes,s=r(64594),l=r(18719),c=l.calcMarkerSize,u=l.calcAxisExpansion,d=l.setFirstScatter,f=r(65664),h=r(13925),p=r(31444),m=r(24956).BADNUM,g=r(45201).TOO_MANY_POINTS;function v(e,t,r){var n=e._extremes[t._id],i=a(t,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}e.exports=function(e,t){var r,a=e._fullLayout,l=t._xA=o.getFromId(e,t.xaxis,"x"),y=t._yA=o.getFromId(e,t.yaxis,"y"),x=a._plots[t.xaxis+t.yaxis],b=t._length,w=b>=g,_=2*b,k={},S=l.makeCalcdata(t,"x"),T=y.makeCalcdata(t,"y"),M=s(t,l,"x",S),C=s(t,y,"y",T),A=M.vals,E=C.vals;t._x=A,t._y=E,t.xperiodalignment&&(t._origX=S,t._xStarts=M.starts,t._xEnds=M.ends),t.yperiodalignment&&(t._origY=T,t._yStarts=C.starts,t._yEnds=C.ends);var I=new Array(_),O=new Array(b);for(r=0;r1&&i.extendFlat(s.line,h.linePositions(e,r,n));if(s.errorX||s.errorY){var l=h.errorBarPositions(e,r,n,o,a);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},h.textPosition(e,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},h.textPosition(e,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},h.textPosition(e,r,s.text,s.markerUnsel)));return s}(e,0,t,I,A,E),L=p(e,x);return d(a,t),w?R.marker&&(P=R.marker.sizeAvg||Math.max(R.marker.size,3)):P=c(t,b),u(e,t,l,y,A,E,P),R.errorX&&v(t,l,R.errorX),R.errorY&&v(t,y,R.errorY),R.fill&&!L.fill2d&&(L.fill2d=!0),R.marker&&!L.scatter2d&&(L.scatter2d=!0),R.line&&!L.line2d&&(L.line2d=!0),!R.errorX&&!R.errorY||L.error2d||(L.error2d=!0),R.text&&!L.glText&&(L.glText=!0),R.marker&&(R.marker.snap=b),L.lineOptions.push(R.line),L.errorXOptions.push(R.errorX),L.errorYOptions.push(R.errorY),L.fillOptions.push(R.fill),L.markerOptions.push(R.marker),L.markerSelectedOptions.push(R.markerSel),L.markerUnselectedOptions.push(R.markerUnsel),L.textOptions.push(R.text),L.textSelectedOptions.push(R.textSel),L.textUnselectedOptions.push(R.textUnsel),L.selectBatch.push([]),L.unselectBatch.push([]),k._scene=L,k.index=L.count,k.x=A,k.y=E,k.positions=I,L.count++,[{x:!1,y:!1,t:k,trace:t}]}},45201:e=>{"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]}}},13925:(e,t,r)=>{"use strict";var n=r(51908),i=r(53203),o=r(43721),a=r(44049),s=r(53787),l=r(50973),c=r(24279),u=r(95049).formatColor,d=r(26775),f=r(94244),h=r(43497),p=r(45201),m=r(26880).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=r(87267).appendArrayPointValue;function y(e,t){var r,i=e._fullLayout,o=t._length,a=t.textfont,l=t.textposition,c=Array.isArray(l)?l:[l],u=a.color,d=a.size,f=a.family,h={},p=e._context.plotGlPixelRatio,m=t.texttemplate;if(m){h.text=[];var g=i._d3locale,y=Array.isArray(m),x=y?Math.min(m.length,o):o,b=y?function(e){return m[e]}:function(){return m};for(r=0;rp.TOO_MANY_POINTS||d.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var f=n[0],h=n[1];for(i=0;i1?l[i]:l[0]:l,p=Array.isArray(c)?c.length>1?c[i]:c[0]:c,m=g[h],v=g[p],y=u?u/.8+1:0,x=-v*y-.5*v;a.offset[i]=[m*y/f,x/f]}}return a}}},58458:(e,t,r)=>{"use strict";var n=r(53787),i=r(44049),o=r(43497),a=r(50474),s=r(80775),l=r(26775),c=r(89016),u=r(17239),d=r(6408),f=r(82028),h=r(4363),p=r(37480);e.exports=function(e,t,r,m){function g(r,i){return n.coerce(e,t,a,r,i)}var v=!!e.marker&&o.isOpenSymbol(e.marker.symbol),y=l.isBubble(e),x=c(e,t,m,g);if(x){u(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x{"use strict";var n=r(53787),i=r(66235),o=r(26880).DESELECTDIM;e.exports={styleTextSelection:function(e){var t,r,a=e[0],s=a.trace,l=a.t,c=l._scene,u=l.index,d=c.selectBatch[u],f=c.unselectBatch[u],h=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=n.extendFlat({},h);if(d.length||f.length){var v=p.color,y=m.color,x=h.color,b=Array.isArray(x);for(g.color=new Array(s._length),t=0;t{"use strict";var n=r(48529);e.exports=function(e,t,r){var i=e.i;return"x"in e||(e.x=t._x[i]),"y"in e||(e.y=t._y[i]),n(e,t,r)}},43497:(e,t,r)=>{"use strict";var n=r(45201);t.isOpenSymbol=function(e){return"string"===typeof e?n.OPEN_RE.test(e):e%200>100},t.isDotSymbol=function(e){return"string"===typeof e?n.DOT_RE.test(e):e>200}},36689:(e,t,r)=>{"use strict";var n=r(44049),i=r(53787),o=r(83821);function a(e,t,r,a){var s=e.xa,l=e.ya,c=e.distance,u=e.dxy,d=e.index,f={pointNumber:d,x:t[d],y:r[d]};f.tx=Array.isArray(a.text)?a.text[d]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[d]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[d]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[d]:a.textposition;var h=a.textfont;h&&(f.ts=i.isArrayOrTypedArray(h.size)?h.size[d]:h.size,f.tc=Array.isArray(h.color)?h.color[d]:h.color,f.tf=Array.isArray(h.family)?h.family[d]:h.family);var p=a.marker;p&&(f.ms=i.isArrayOrTypedArray(p.size)?p.size[d]:p.size,f.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[d]:p.opacity,f.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[d]:p.symbol,f.ma=i.isArrayOrTypedArray(p.angle)?p.angle[d]:p.angle,f.mc=i.isArrayOrTypedArray(p.color)?p.color[d]:p.color);var m=p&&p.line;m&&(f.mlc=Array.isArray(m.color)?m.color[d]:m.color,f.mlw=i.isArrayOrTypedArray(m.width)?m.width[d]:m.width);var g=p&&p.gradient;g&&"none"!==g.type&&(f.mgt=Array.isArray(g.type)?g.type[d]:g.type,f.mgc=Array.isArray(g.color)?g.color[d]:g.color);var v=s.c2p(f.x,!0),y=l.c2p(f.y,!0),x=f.mrc||1,b=a.hoverlabel;b&&(f.hbg=Array.isArray(b.bgcolor)?b.bgcolor[d]:b.bgcolor,f.hbc=Array.isArray(b.bordercolor)?b.bordercolor[d]:b.bordercolor,f.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[d]:b.font.size,f.htc=Array.isArray(b.font.color)?b.font.color[d]:b.font.color,f.htf=Array.isArray(b.font.family)?b.font.family[d]:b.font.family,f.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[d]:b.namelength);var w=a.hoverinfo;w&&(f.hi=Array.isArray(w)?w[d]:w);var _=a.hovertemplate;_&&(f.ht=Array.isArray(_)?_[d]:_);var k={};k[e.index]=f;var S=a._origX,T=a._origY,M=i.extendFlat({},e,{color:o(a,f),x0:v-x,x1:v+x,xLabelVal:S?S[d]:f.x,y0:y-x,y1:y+x,yLabelVal:T?T[d]:f.y,cd:k,distance:c,spikeDistance:u,hovertemplate:f.ht});return f.htx?M.text=f.htx:f.tx?M.text=f.tx:a.text&&(M.text=a.text),i.fillText(f,a,M),n.getComponentMethod("errorbars","hoverInfo")(f,a,M),M}e.exports={hoverPoints:function(e,t,r,n){var i,o,s,l,c,u,d,f,h,p,m=e.cd,g=m[0].t,v=m[0].trace,y=e.xa,x=e.ya,b=g.x,w=g.y,_=y.c2p(t),k=x.c2p(r),S=e.distance;if(g.tree){var T=y.p2c(_-S),M=y.p2c(_+S),C=x.p2c(k-S),A=x.p2c(k+S);i="x"===n?g.tree.range(Math.min(T,M),Math.min(x._rl[0],x._rl[1]),Math.max(T,M),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(T,M),Math.min(C,A),Math.max(T,M),Math.max(C,A))}else i=g.ids;var E=S;if("x"===n){var I=!!v.xperiodalignment,O=!!v.yperiodalignment;for(u=0;u=Math.min(P,R)&&_<=Math.max(P,R)?0:1/0}if(d=Math.min(L,j)&&k<=Math.max(L,j)?0:1/0}p=Math.sqrt(d*d+f*f),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[o=i[u]],c=w[o],d=y.c2p(l)-_,f=x.c2p(c)-k,(h=Math.sqrt(d*d+f*f)){"use strict";var n=r(78121);n.plot=r(69551),e.exports=n},69551:(e,t,r)=>{"use strict";var n=r(76768),i=r(929),o=r(56026),a=r(55808),s=r(53787),l=r(57873).selectMode,c=r(56162),u=r(26775),d=r(98022),f=r(96667).styleTextSelection,h={};function p(e,t,r,n){var i=e._size,o=e.width*n,a=e.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,d=i.w*n,f=i.h*n;return[s+t.domain[0]*d,l+r.domain[0]*f,o-c-(1-t.domain[1])*d,a-u-(1-r.domain[1])*f]}(e.exports=function(e,t,r){if(r.length){var m,g,v=e._fullLayout,y=t._scene,x=t.xaxis,b=t.yaxis;if(y)if(c(e,["ANGLE_instanced_arrays","OES_element_index_uint"],h)){var w=y.count,_=v._glcanvas.data()[0].regl;if(d(e,t,r),y.dirty){if(!0===y.error2d&&(y.error2d=o(_)),!0===y.line2d&&(y.line2d=i(_)),!0===y.scatter2d&&(y.scatter2d=n(_)),!0===y.fill2d&&(y.fill2d=i(_)),!0===y.glText)for(y.glText=new Array(w),m=0;my.glText.length){var k=w-y.glText.length;for(m=0;mr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),y.line2d.update(y.lineOptions)),y.error2d){var T=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(T)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,w),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(e,t){var n=r[t];if(e&&n&&n[0]&&n[0].trace){var i,o,a=n[0],s=a.trace,l=a.t,c=y.lineOptions[t],u=[];s._ownfill&&u.push(t),s._nexttrace&&u.push(t+1),u.length&&(y.fillOrder[t]=u);var d,f,h=[],p=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(d=0;dd&&isNaN(p[f+1]);)f-=2;0!==p[d+1]&&(h=[p[d],0]),h=h.concat(p.slice(d,f+2)),0!==p[f+1]&&(h=h.concat([p[f],0]))}else if("tozerox"===s.fill){for(d=0;dd&&isNaN(p[f]);)f-=2;0!==p[d]&&(h=[0,p[d+1]]),h=h.concat(p.slice(d,f+2)),0!==p[f]&&(h=h.concat([0,p[f+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],i=0,e.splitNull=!0,o=0;o-1;for(m=0;m{"use strict";var n=r(53787);e.exports=function(e,t){var r=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},o={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((r=t._scene={}).init=function(){n.extendFlat(r,o,i)},r.init(),r.update=function(e){var t=n.repeat(e,r.count);if(r.fill2d&&r.fill2d.update(t),r.scatter2d&&r.scatter2d.update(t),r.line2d&&r.line2d.update(t),r.error2d&&r.error2d.update(t.concat(t)),r.select2d&&r.select2d.update(t),r.glText)for(var i=0;i{"use strict";var n=r(26775),i=r(96667).styleTextSelection;e.exports=function(e,t){var r=e.cd,o=e.xaxis,a=e.yaxis,s=[],l=r[0].trace,c=r[0].t,u=l._length,d=c.x,f=c.y,h=c._scene,p=c.index;if(!h)return s;var m=n.hasText(l),g=n.hasMarkers(l),v=!g&&!m;if(!0!==l.visible||v)return s;var y=[],x=[];if(!1!==t&&!t.degenerate)for(var b=0;b{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(20958),a=r(37471),s=r(85675),l=r(27231),c=r(8753),u=r(10191).extendFlat,d=r(18693).overrideAll,f=r(85675),h=o.line,p=o.marker;e.exports=d({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean",description:"Determines whether clustering is enabled or disabled."},maxzoom:u({},f.layers.maxzoom,{description:["Sets the maximum zoom level.","At zoom levels equal to or greater than this, points will never be clustered."].join(" ")}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1,description:["Sets how many points it takes to create a cluster or advance to the next cluster step.","Use this in conjunction with arrays for `size` and / or `color`.","If an integer, steps start at multiples of this number.","If an array, each step extends from the given value until one less than the next value."].join(" ")},size:{valType:"number",arrayOk:!0,dflt:20,min:0,description:["Sets the size for each cluster step."].join(" ")},color:{valType:"color",arrayOk:!0,description:["Sets the color for each cluster step."].join(" ")},opacity:u({},p.opacity,{dflt:1})},mode:u({},a.mode,{dflt:"markers",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover."].join(" ")}),text:u({},a.text,{description:["Sets text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:u({},a.hovertext,{description:["Sets hover text elements associated with each (lon,lat) pair","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (lon,lat) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:h.color,width:h.width},connectgaps:a.connectgaps,marker:u({symbol:{valType:"string",dflt:"circle",arrayOk:!0,description:["Sets the marker symbol.","Full list: https://www.mapbox.com/maki-icons/","Note that the array `marker.color` and `marker.size`","are only available for *circle* symbols."].join(" ")},angle:{valType:"number",dflt:"auto",arrayOk:!0,description:["Sets the marker orientation from true North, in degrees clockwise.","When using the *auto* default, no rotation would be applied","in perspective views which is different from using a zero angle."].join(" ")},allowoverlap:{valType:"boolean",dflt:!1,description:["Flag to draw all symbols, even if they overlap."].join(" ")},opacity:p.opacity,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode},c("marker")),fill:o.fill,fillcolor:a.fillcolor,textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:"string",description:["Determines if this scattermapbox trace's layers are to be inserted","before the layer with the specified ID.","By default, scattermapbox layers are inserted","above all the base layers.","To place the scattermapbox layers above every other layer, set `below` to *''*."].join(" ")},selected:{marker:a.selected.marker},unselected:{marker:a.unselected.marker},hoverinfo:u({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:n()},"calc","nested")},64902:(e,t,r)=>{"use strict";var n=r(51908),i=r(53787),o=r(24956).BADNUM,a=r(31360),s=r(10948),l=r(50973),c=r(94244),u=r(26775),d=r(31387),f=r(87267).appendArrayPointValue,h=r(98224).NEWLINES,p=r(98224).BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return i.isArrayOrTypedArray(e)?t?function(t){return n(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:v}function v(){return""}function y(e){return e[0]===o}function x(e,t){var r;if(i.isArrayOrTypedArray(e)&&i.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(37480),l=r(4363),c=r(36018),u=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,c,r,i)}function h(r,i){return n.coerce2(e,t,c,r,i)}var p=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],o=Math.min(n.length,i.length);return t._length=o,o}(0,t,f);if(p){if(f("text"),f("texttemplate"),f("hovertext"),f("hovertemplate"),f("mode"),f("below"),i.hasLines(t)&&(a(e,t,r,d,f,{noDash:!0}),f("connectgaps")),i.hasMarkers(t)){o(e,t,r,d,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(n.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),n.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}var g=h("cluster.maxzoom"),v=h("cluster.step"),y=h("cluster.color",t.marker&&t.marker.color||r),x=h("cluster.size"),b=h("cluster.opacity");f("cluster.enabled",!1!==g||!1!==v||!1!==y||!1!==x||!1!==b),i.hasText(t)&&s(e,t,d,f,{noSelect:!0,font:{family:-1!==u.indexOf(d.font.family)?d.font.family:"Open Sans Regular",size:d.font.size,color:d.font.color}}),f("fill"),"none"!==t.fill&&l(e,t,r,f),n.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},34249:e=>{"use strict";e.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}},71652:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot.mockAxis,a=e.lonlat;return i.lonLabel=n.tickText(o,o.c2l(a[0]),!0).text,i.latLabel=n.tickText(o,o.c2l(a[1]),!0).text,i}},16016:(e,t,r)=>{"use strict";var n=r(76719),i=r(53787),o=r(83821),a=i.fillText,s=r(24956).BADNUM,l=r(93845).traceLayerPrefix;function c(e,t,r){if(!e.hovertemplate){var n=(t.hi||e.hoverinfo).split("+"),i=-1!==n.indexOf("all"),o=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=t.lonlat,c=[];return i||o&&s?c.push("("+u(l[1])+", "+u(l[0])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(i||-1!==n.indexOf("text"))&&a(t,e,c),c.join("
")}function u(e){return e+"\xb0"}}e.exports={hoverPoints:function(e,t,r){var a=e.cd,u=a[0].trace,d=e.xa,f=e.ya,h=e.subplot,p=[],m=l+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var v=h.map.queryRenderedFeatures(null,{layers:[m]});p=v.map((function(e){return e.id}))}var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-y;if(n.getClosest(a,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;if(g&&-1===p.indexOf(e.i+1))return 1/0;var n=i.modHalf(t[0],360),o=t[1],a=h.project([n,o]),l=a.x-d.c2p([x,o]),c=a.y-f.c2p([n,r]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var b=a[e.index],w=b.lonlat,_=[i.modHalf(w[0],360)+y,w[1]],k=d.c2p(_),S=f.c2p(_),T=b.mrc||1;e.x0=k-T,e.x1=k+T,e.y0=S-T,e.y1=S+T;var M={};M[u.subplot]={_subplot:h};var C=u._module.formatLabels(b,u,M);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=o(u,b),e.extraText=c(u,b,a[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:c}},52959:(e,t,r)=>{"use strict";e.exports={attributes:r(36018),supplyDefaults:r(31971),colorbar:r(68971),formatLabels:r(71652),calc:r(73997),plot:r(56361),hoverPoints:r(16016).hoverPoints,eventData:r(34249),selectPoints:r(40028),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(7428),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_mapbox",description:["The data visualized as scatter point, lines or marker symbols","on a Mapbox GL geographic map","is provided by longitude/latitude pairs in `lon` and `lat`."].join(" ")}}},56361:(e,t,r)=>{"use strict";var n=r(53787),i=r(64902),o=r(93845).traceLayerPrefix,a={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:o+t+"-fill",line:o+t+"-line",circle:o+t+"-circle",symbol:o+t+"-symbol",cluster:o+t+"-cluster",clusterCount:o+t+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[e]);o?o.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)},l.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},l.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i,o=this.layerIds[e],a=this.subplot.getMapLayers(),s=0;s=0;r--){var i=t[r];n.removeLayer(u.layerIds[i])}e||n.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var i=t[r];n.removeLayer(u.layerIds[i]),e||n.removeSource(u.sourceIds[i])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},e.exports=function(e,t){var r,n,o,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,d=new s(e,l.uid,c,u),f=i(e.gd,t),h=d.below=e.belowLookup["trace-"+l.uid];if(c)for(d.addSource("circle",f.circle,l.cluster),r=0;r{"use strict";var n=r(53787),i=r(26775),o=r(24956).BADNUM;e.exports=function(e,t){var r,a=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=a[0].trace;if(!i.hasMarkers(u))return[];if(!1===t)for(r=0;r{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(10191).extendFlat,a=r(37471),s=r(27231),l=a.line;e.exports={mode:a.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the radial coordinates"},theta:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the angular coordinates"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Alternate to `r`.","Builds a linear space of r coordinates.","Use with `dr`","where `r0` is the starting coordinate and `dr` the step."].join(" ")},dr:{valType:"number",dflt:1,editType:"calc",description:"Sets the r coordinate step."},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Alternate to `theta`.","Builds a linear space of theta coordinates.","Use with `dtheta`","where `theta0` is the starting coordinate and `dtheta` the step."].join(" ")},dtheta:{valType:"number",editType:"calc",description:["Sets the theta coordinate step.","By default, the `dtheta` step equals the subplot's period divided","by the length of the `r` coordinates."].join(" ")},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes",description:["Sets the unit of input *theta* values.","Has an effect only when on *linear* angular axes."].join(" ")},text:a.text,texttemplate:i({editType:"plot"},{keys:["r","theta","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterpolar has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:a.hoveron,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},70422:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(28605),a=r(65664),s=r(62532),l=r(35637),c=r(18719).calcMarkerSize;e.exports=function(e,t){for(var r=e._fullLayout,u=t.subplot,d=r[u].radialaxis,f=r[u].angularaxis,h=d.makeCalcdata(t,"r"),p=f.makeCalcdata(t,"theta"),m=t._length,g=new Array(m),v=0;v{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(80156),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(32608);function f(e,t,r,n){var i,o=n("r"),a=n("theta");if(o)a?i=Math.min(o.length,a.length):(i=o.length,n("theta0"),n("dtheta"));else{if(!a)return 0;i=t.theta.length,n("r0"),n("dr")}return t._length=i,i}e.exports={handleRThetaDefaults:f,supplyDefaults:function(e,t,r,h){function p(r,i){return n.coerce(e,t,d,r,i)}var m=f(e,t,h,p);if(m){p("thetaunit"),p("mode",m{"use strict";var n=r(53787),i=r(28605);e.exports=function(e,t,r){var o,a,s={},l=r[t.subplot]._subplot;l?(o=l.radialAxis,a=l.angularAxis):(o=(l=r[t.subplot]).radialaxis,a=l.angularaxis);var c=o.c2l(e.r);s.rLabel=i.tickText(o,c,!0).text;var u="degrees"===a.thetaunit?n.rad2deg(e.theta):e.theta;return s.thetaLabel=i.tickText(a,u,!0).text,s}},9226:(e,t,r)=>{"use strict";var n=r(77128);function i(e,t,r,n){var i=r.radialAxis,o=r.angularAxis;i._hovertitle="r",o._hovertitle="\u03b8";var a={};a[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,a);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var d=l.split("+");-1!==d.indexOf("all")&&(d=["r","theta","text"]),-1!==d.indexOf("r")&&u(i,n.rLabel),-1!==d.indexOf("theta")&&u(o,n.thetaLabel),-1!==d.indexOf("text")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join("
")}}e.exports={hoverPoints:function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},91775:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:r(37180),categories:["polar","symbols","showLegend","scatter-like"],attributes:r(32608),supplyDefaults:r(10123).supplyDefaults,colorbar:r(68971),formatLabels:r(33058),calc:r(70422),plot:r(68356),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(9226).hoverPoints,selectPoints:r(97976),meta:{hrName:"scatter_polar",description:["The scatterpolar trace type encompasses line charts, scatter charts, text charts, and bubble charts","in polar coordinates.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},68356:(e,t,r)=>{"use strict";var n=r(96865),i=r(24956).BADNUM;e.exports=function(e,t,r){for(var o=t.layers.frontplot.select("g.scatterlayer"),a=t.xaxis,s=t.yaxis,l={xaxis:a,yaxis:s,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},c=t.radialAxis,u=t.angularAxis,d=0;d{"use strict";var n=r(32608),i=r(50474),o=r(32191).si;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:o({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}},56085:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:r(37180),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:r(33430),supplyDefaults:r(34451),colorbar:r(68971),formatLabels:r(9130),calc:r(29066),hoverPoints:r(61784).hoverPoints,selectPoints:r(23691),meta:{hrName:"scatter_polar_gl",description:["The scatterpolargl trace type encompasses line charts, scatter charts, and bubble charts","in polar coordinates using the WebGL plotting engine.","The data visualized as scatter point or lines is set in","`r` (radial) and `theta` (angular) coordinates","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},29066:(e,t,r)=>{"use strict";var n=r(65664),i=r(18719).calcMarkerSize,o=r(13925),a=r(28605),s=r(45201).TOO_MANY_POINTS;e.exports=function(e,t){var r=e._fullLayout,l=t.subplot,c=r[l].radialaxis,u=r[l].angularaxis,d=t._r=c.makeCalcdata(t,"r"),f=t._theta=u.makeCalcdata(t,"theta"),h=t._length,p={};h{"use strict";var n=r(53787),i=r(26775),o=r(10123).handleRThetaDefaults,a=r(6408),s=r(82028),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(33430);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p=o(e,t,f,h);p?(h("thetaunit"),h("mode",p{"use strict";var n=r(33058);e.exports=function(e,t,r){var i=e.i;return"r"in e||(e.r=t._r[i]),"theta"in e||(e.theta=t._theta[i]),n(e,t,r)}},61784:(e,t,r)=>{"use strict";var n=r(36689),i=r(9226).makeHoverPointText;e.exports={hoverPoints:function(e,t,r,o){var a=e.cd[0].t,s=a.r,l=a.theta,c=n.hoverPoints(e,t,r,o);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var d=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=s[u.index],f.theta=l[u.index],d.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,i(f,h,d,u),c}}}},33982:(e,t,r)=>{"use strict";var n=r(56085);n.plot=r(51047),e.exports=n},51047:(e,t,r)=>{"use strict";var n=r(28984),i=r(51908),o=r(69551),a=r(31444),s=r(13925),l=r(53787),c=r(45201).TOO_MANY_POINTS;e.exports=function(e,t,r){if(r.length){var u=t.radialAxis,d=t.angularAxis,f=a(e,t);return r.forEach((function(r){if(r&&r[0]&&r[0].trace){var o,a=r[0],h=a.trace,p=a.t,m=h._length,g=p.r,v=p.theta,y=p.opts,x=g.slice(),b=v.slice();for(o=0;o=c&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=w),y.line&&w.length>1&&l.extendFlat(y.line,s.linePositions(e,h,w)),y.text&&(l.extendFlat(y.text,{positions:w},s.textPosition(e,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:w},s.textPosition(e,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:w},s.textPosition(e,h,y.text,y.markerUnsel))),y.fill&&!f.fill2d&&(f.fill2d=!0),y.marker&&!f.scatter2d&&(f.scatter2d=!0),y.line&&!f.line2d&&(f.line2d=!0),y.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(y.line),f.fillOptions.push(y.fill),f.markerOptions.push(y.marker),f.markerSelectedOptions.push(y.markerSel),f.markerUnselectedOptions.push(y.markerUnsel),f.textOptions.push(y.text),f.textSelectedOptions.push(y.textSel),f.textUnselectedOptions.push(y.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),p.x=_,p.y=k,p.rawx=_,p.rawy=k,p.r=g,p.theta=v,p.positions=w,p._scene=f,p.index=f.count,f.count++}})),o(e,t,r)}},e.exports.reglPrecompiled={}},42037:(e,t,r)=>{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(10191).extendFlat,a=r(37471),s=r(27231),l=a.line;e.exports={mode:a.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the real component of the data, in units of normalized impedance","such that real=1, imag=0 is the center of the chart."].join(" ")},imag:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the imaginary component of the data, in units of normalized impedance","such that real=1, imag=0 is the center of the chart."].join(" ")},text:a.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:a.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:o({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,marker:a.marker,cliponaxis:o({},a.cliponaxis,{dflt:!1}),textposition:a.textposition,textfont:a.textfont,fill:o({},a.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scattersmith has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:a.fillcolor,hoverinfo:o({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:a.hoveron,hovertemplate:n(),selected:a.selected,unselected:a.unselected}},86536:(e,t,r)=>{"use strict";var n=r(51908),i=r(24956).BADNUM,o=r(65664),a=r(62532),s=r(35637),l=r(18719).calcMarkerSize;e.exports=function(e,t){for(var r=e._fullLayout,c=t.subplot,u=r[c].realaxis,d=r[c].imaginaryaxis,f=u.makeCalcdata(t,"real"),h=d.makeCalcdata(t,"imag"),p=t._length,m=new Array(p),g=0;g{"use strict";var n=r(53787),i=r(26775),o=r(6408),a=r(82028),s=r(80156),l=r(37480),c=r(4363),u=r(80775).PTS_LINESONLY,d=r(42037);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p=function(e,t,r,n){var i,o=n("real"),a=n("imag");o&&a&&(i=Math.min(o.length,a.length));return t._length=i,i}(0,t,0,h);if(p){h("mode",p{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot;return i.realLabel=n.tickText(o.radialAxis,e.real,!0).text,i.imagLabel=n.tickText(o.angularAxis,e.imag,!0).text,i}},88598:(e,t,r)=>{"use strict";var n=r(77128);function i(e,t,r,n){var i=r.radialAxis,o=r.angularAxis;i._hovertitle="real",o._hovertitle="imag";var a={};a[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,a);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var d=l.split("+");-1!==d.indexOf("all")&&(d=["real","imag","text"]),-1!==d.indexOf("real")&&u(i,n.realLabel),-1!==d.indexOf("imag")&&u(o,n.imagLabel),-1!==d.indexOf("text")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join("
")}}e.exports={hoverPoints:function(e,t,r,o){var a=n(e,t,r,o);if(a&&!1!==a[0].index){var s=a[0];if(void 0===s.index)return a;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,a}},makeHoverPointText:i}},62363:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:r(17389),categories:["smith","symbols","showLegend","scatter-like"],attributes:r(42037),supplyDefaults:r(37061),colorbar:r(68971),formatLabels:r(77769),calc:r(86536),plot:r(12480),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(88598).hoverPoints,selectPoints:r(97976),meta:{hrName:"scatter_smith",description:["The scattersmith trace type encompasses line charts, scatter charts, text charts, and bubble charts","in smith coordinates.","The data visualized as scatter point or lines is set in","`real` and `imag` (imaginary) coordinates","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}}},12480:(e,t,r)=>{"use strict";var n=r(96865),i=r(24956).BADNUM,o=r(68297).smith;e.exports=function(e,t,r){for(var a=t.layers.frontplot.select("g.scatterlayer"),s=t.xaxis,l=t.yaxis,c={xaxis:s,yaxis:l,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},u=0;u{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(37471),a=r(27231),s=r(8753),l=r(93701).P,c=r(10191).extendFlat,u=o.marker,d=o.line,f=u.line;e.exports={a:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},b:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},c:{valType:"data_array",editType:"calc",description:["Sets the quantity of component `a` in each data point.","If `a`, `b`, and `c` are all provided, they need not be","normalized, only the relative values matter. If only two","arrays are provided they must be normalized to match","`ternary.sum`."].join(" ")},sum:{valType:"number",dflt:0,min:0,editType:"calc",description:["The number each triplet should sum to,","if only two of `a`, `b`, and `c` are provided.","This overrides `ternary.sum` to normalize this specific","trace, but does not affect the values displayed on the axes.","0 (or missing) means to use ternary.sum"].join(" ")},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{description:["Sets text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},o.hovertext,{description:["Sets hover text elements associated with each (a,b,c) point.","If a single string, the same string appears over","all the data points.","If an array of strings, the items are mapped in order to the","the data points in (a,b,c).","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")}),line:{color:d.color,width:d.width,dash:l,backoff:d.backoff,shape:c({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:c({},o.fill,{values:["none","toself","tonext"],dflt:"none",description:["Sets the area to fill with a solid color.","Use with `fillcolor` if not *none*.","scatterternary has a subset of the options available to scatter.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other."].join(" ")}),fillcolor:o.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,angle:u.angle,angleref:u.angleref,standoff:u.standoff,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:c({},a.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:n()}},45216:(e,t,r)=>{"use strict";var n=r(51908),i=r(65664),o=r(62532),a=r(35637),s=r(18719).calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(e,t){var r,u,d,f,h,p,m=e._fullLayout[t.subplot].sum,g=t.sum||m,v={a:t.a,b:t.b,c:t.c};for(r=0;r{"use strict";var n=r(53787),i=r(80775),o=r(26775),a=r(6408),s=r(82028),l=r(80156),c=r(37480),u=r(4363),d=r(43859);e.exports=function(e,t,r,f){function h(r,i){return n.coerce(e,t,d,r,i)}var p,m=h("a"),g=h("b"),v=h("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):g&&v&&(p=Math.min(g.length,v.length)),p){t._length=p,h("sum"),h("text"),h("hovertext"),"fills"!==t.hoveron&&h("hovertemplate"),h("mode",p{"use strict";e.exports=function(e,t,r,n,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[i]){var o=n[i];e.a=o.a,e.b=o.b,e.c=o.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}},16675:(e,t,r)=>{"use strict";var n=r(28605);e.exports=function(e,t,r){var i={},o=r[t.subplot]._subplot;return i.aLabel=n.tickText(o.aaxis,e.a,!0).text,i.bLabel=n.tickText(o.baxis,e.b,!0).text,i.cLabel=n.tickText(o.caxis,e.c,!0).text,i}},16893:(e,t,r)=>{"use strict";var n=r(77128);e.exports=function(e,t,r,i){var o=n(e,t,r,i);if(o&&!1!==o[0].index){var a=o[0];if(void 0===a.index){var s=1-a.y0/e.ya._length,l=e.xa._length,c=l*s/2,u=l-c;return a.x0=Math.max(Math.min(a.x0,u),c),a.x1=Math.max(Math.min(a.x1,u),c),o}var d=a.cd[a.index],f=a.trace,h=a.subplot;a.a=d.a,a.b=d.b,a.c=d.c,a.xLabelVal=void 0,a.yLabelVal=void 0;var p={};p[f.subplot]={_subplot:h};var m=f._module.formatLabels(d,f,p);a.aLabel=m.aLabel,a.bLabel=m.bLabel,a.cLabel=m.cLabel;var g=d.hi||f.hoverinfo,v=[];if(!f.hovertemplate){var y=g.split("+");-1!==y.indexOf("all")&&(y=["a","b","c"]),-1!==y.indexOf("a")&&x(h.aaxis,a.aLabel),-1!==y.indexOf("b")&&x(h.baxis,a.bLabel),-1!==y.indexOf("c")&&x(h.caxis,a.cLabel)}return a.extraText=v.join("
"),a.hovertemplate=f.hovertemplate,o}function x(e,t){v.push(e._hovertitle+": "+t)}}},35104:(e,t,r)=>{"use strict";e.exports={attributes:r(43859),supplyDefaults:r(54507),colorbar:r(68971),formatLabels:r(16675),calc:r(45216),plot:r(18591),style:r(5196).style,styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(16893),selectPoints:r(97976),eventData:r(86716),moduleType:"trace",name:"scatterternary",basePlotModule:r(70184),categories:["ternary","symbols","showLegend","scatter-like"],meta:{hrName:"scatter_ternary",description:["Provides similar functionality to the *scatter* type but on a ternary phase diagram.","The data is provided by at least two arrays out of `a`, `b`, `c` triplets."].join(" ")}}},18591:(e,t,r)=>{"use strict";var n=r(96865);e.exports=function(e,t,r){var i=t.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var o=t.xaxis,a=t.yaxis,s={xaxis:o,yaxis:a,plot:i,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},l=t.layers.frontplot.select("g.scatterlayer"),c=0;c{"use strict";var n=r(37471),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(50474),l=r(99727).idRegex,c=r(99862).templatedArray,u=r(10191).extendFlat,d=n.marker,f=d.line,h=u(i("marker.line",{editTypeOverride:"calc"}),{width:u({},f.width,{editType:"calc"}),editType:"calc"}),p=u(i("marker"),{symbol:d.symbol,angle:d.angle,size:u({},d.size,{editType:"markerSize"}),sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:h,editType:"calc"});function m(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:l[e],editType:"plot"},description:["Sets the list of "+e+" axes","corresponding to dimensions of this splom trace.","By default, a splom will match the first N "+e+"axes","where N is the number of input dimensions.","Note that, in case where `diagonal.visible` is false and `showupperhalf`","or `showlowerhalf` is false, this splom trace will generate","one less x-axis and one less y-axis."].join(" ")}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:c("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not this dimension is shown on the graph.","Note that even visible false dimension contribute to the","default grid generate by this splom trace."].join(" ")},label:{valType:"string",editType:"calc",description:"Sets the label corresponding to this splom dimension."},values:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the dimension values to be plotted."},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes",description:["Sets the axis type for this dimension's generated","x and y axes.","Note that the axis `type` values set in layout take","precedence over this attribute."].join(" ")},matches:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not the x & y axes generated by this","dimension match.","Equivalent to setting the `matches` axis attribute in the layout","with the correct axis id."].join(" ")},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:u({},s.text,{description:["Sets text elements associated with each (x,y) pair to appear on hover.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates."].join(" ")}),hovertext:u({},s.hovertext,{description:"Same as `text`."}),hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),marker:p,xaxes:m("x"),yaxes:m("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the diagonal are displayed."].join(" ")},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the upper half","from the diagonal are displayed."].join(" ")},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not subplots on the lower half","from the diagonal are displayed."].join(" ")},selected:{marker:s.selected.marker,editType:"calc"},unselected:{marker:s.unselected.marker,editType:"calc"},opacity:s.opacity}},7339:(e,t,r)=>{"use strict";var n=r(44049),i=r(97481);e.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:r(32213),supplyDefaults:r(38459),colorbar:r(68971),calc:r(36445),plot:r(29169),hoverPoints:r(82989).hoverPoints,selectPoints:r(66378),editStyle:r(22764),meta:{description:["Splom traces generate scatter plot matrix visualizations.","Each splom `dimensions` items correspond to a generated axis.","Values for each of those dimensions are set in `dimensions[i].values`.","Splom traces support all `scattergl` marker style attributes.","Specify `layout.grid` attributes and/or layout x-axis and y-axis attributes","for more control over the axis positioning and style. "].join(" ")}},n.register(i)},42471:(e,t,r)=>{"use strict";var n=r(929),i=r(44049),o=r(56162),a=r(38213).a0,s=r(48206),l=r(24279).getFromId,c=r(28605).shouldShowZeroLine,u="splom",d={};function f(e,t,r){for(var n=r.matrixOptions.data.length,i=t._visibleDims,o=r.viewOpts.ranges=new Array(n),a=0;a{"use strict";var n=r(53787),i=r(24279),o=r(18719).calcMarkerSize,a=r(18719).calcAxisExpansion,s=r(65664),l=r(13925).markerSelection,c=r(13925).markerStyle,u=r(52799),d=r(24956).BADNUM,f=r(45201).TOO_MANY_POINTS;e.exports=function(e,t){var r,h,p,m,g,v,y=t.dimensions,x=t._length,b={},w=b.cdata=[],_=b.data=[],k=t._visibleDims=[];function S(e,r){for(var i=e.makeCalcdata({v:r.values,vcalendar:t.calendar},"v"),o=0;of?b.sizeAvg||Math.max(b.size,3):o(t,x),h=0;h{"use strict";var n=r(53787),i=r(80254),o=r(32213),a=r(26775),s=r(6408),l=r(47796),c=r(43497).isOpenSymbol;function u(e,t){function r(r,i){return n.coerce(e,t,o.dimensions,r,i)}r("label");var i=r("values");i&&i.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}e.exports=function(e,t,r,d){function f(r,i){return n.coerce(e,t,o,r,i)}var h=i(e,t,{name:"dimensions",handleItemDefaults:u}),p=f("diagonal.visible"),m=f("showupperhalf"),g=f("showlowerhalf");if(l(t,h,"values")&&(p||m||g)){f("text"),f("hovertext"),f("hovertemplate"),f("xhoverformat"),f("yhoverformat"),s(e,t,r,d,f,{noAngleRef:!0,noStandOff:!0});var v=c(t.marker.symbol),y=a.isBubble(t);f("marker.line.width",v||y?1:0),function(e,t,r,n){var i,o,a=t.dimensions,s=a.length,l=t.showupperhalf,c=t.showlowerhalf,u=t.diagonal.visible,d=new Array(s),f=new Array(s);for(i=0;io&&l||i{"use strict";var n=r(53787),i=r(65664),o=r(13925).markerStyle;e.exports=function(e,t){var r=t.trace,a=e._fullLayout._splomScenes[r.uid];if(a){i(e,r),n.extendFlat(a.matrixOptions,o(e,r));var s=n.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(s,null)}}},39947:(e,t)=>{"use strict";t.getDimIndex=function(e,t){for(var r=t._id,n={x:0,y:1}[r.charAt(0)],i=e._visibleDims,o=0;o{"use strict";var n=r(39947),i=r(36689).calcHover;e.exports={hoverPoints:function(e,t,r){var o=e.cd[0].trace,a=e.scene.matrixOptions.cdata,s=e.xa,l=e.ya,c=s.c2p(t),u=l.c2p(r),d=e.distance,f=n.getDimIndex(o,s),h=n.getDimIndex(o,l);if(!1===f||!1===h)return[e];for(var p,m,g=a[f],v=a[h],y=d,x=0;x{"use strict";var n=r(7339);n.basePlotModule=r(42471),e.exports=n},29169:(e,t,r)=>{"use strict";var n=r(55358),i=r(53787),o=r(24279),a=r(57873).selectMode;function s(e,t){var r,s,l,c,u,d=e._fullLayout,f=d._size,h=t.trace,p=t.t,m=d._splomScenes[h.uid],g=m.matrixOptions,v=g.cdata,y=d._glcanvas.data()[0].regl,x=d.dragmode;if(0!==v.length){g.lower=h.showupperhalf,g.upper=h.showlowerhalf,g.diagonal=h.diagonal.visible;var b=h._visibleDims,w=v.length,_=m.viewOpts={};for(_.ranges=new Array(w),_.domains=new Array(w),u=0;u-1,O=!0;if(a(x)||!!h.selectedpoints||I){var P=h._length;if(h.selectedpoints){m.selectBatch=h.selectedpoints;var R=h.selectedpoints,L={};for(l=0;l{"use strict";var n=r(53787);e.exports=function(e,t){var r=e._fullLayout,i=t.uid,o=r._splomScenes;o||(o=r._splomScenes={});var a={dirty:!0,selectBatch:[],unselectBatch:[]},s=o[t.uid];return s||((s=o[i]=n.extendFlat({},a,{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,a),s}},66378:(e,t,r)=>{"use strict";var n=r(53787),i=n.pushUnique,o=r(26775),a=r(39947);e.exports=function(e,t){var r=e.cd,s=r[0].trace,l=r[0].t,c=e.scene,u=c.matrixOptions.cdata,d=e.xaxis,f=e.yaxis,h=[];if(!c)return h;var p=!o.hasMarkers(s)&&!o.hasText(s);if(!0!==s.visible||p)return h;var m=a.getDimIndex(s,d),g=a.getDimIndex(s,f);if(!1===m||!1===g)return h;var v=l.xpx[m],y=l.ypx[g],x=u[m],b=u[g],w=(e.scene.selectBatch||[]).slice(),_=[];if(!1!==t&&!t.degenerate)for(var k=0;k{"use strict";var n=r(8753),i=r(89849).axisHoverFormat,o=r(32191).fF,a=r(27933),s=r(27231),l=r(10191).extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the x coordinates of the vector field."},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the y coordinates of the vector field."},z:{valType:"data_array",editType:"calc+clearAxisTypes",description:"Sets the z coordinates of the vector field."},u:{valType:"data_array",editType:"calc",description:"Sets the x components of the vector field."},v:{valType:"data_array",editType:"calc",description:"Sets the y components of the vector field."},w:{valType:"data_array",editType:"calc",description:"Sets the z components of the vector field."},starts:{x:{valType:"data_array",editType:"calc",description:["Sets the x components of the starting position of the streamtubes"].join(" ")},y:{valType:"data_array",editType:"calc",description:["Sets the y components of the starting position of the streamtubes"].join(" ")},z:{valType:"data_array",editType:"calc",description:["Sets the z components of the starting position of the streamtubes"].join(" ")},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc",description:["The maximum number of displayed segments in a streamtube."].join(" ")},sizeref:{valType:"number",editType:"calc",min:0,dflt:1,description:["The scaling factor for the streamtubes.","The default is 1, which avoids two max divergence tubes from touching","at adjacent starting positions."].join(" ")},text:{valType:"string",dflt:"",editType:"calc",description:["Sets a text element associated with this trace.","If trace `hoverinfo` contains a *text* flag,","this text element will be seen in all hover labels.","Note that streamtube traces do not support array `text` values."].join(" ")},hovertext:{valType:"string",dflt:"",editType:"calc",description:"Same as `text`."},hovertemplate:o({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(c,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(e){c[e]=a[e]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},67265:(e,t,r)=>{"use strict";var n=r(53787),i=r(1631);function o(e){var t,r,i,o,s,l,c,u,d,f,h,p,m=e._x,g=e._y,v=e._z,y=e._len,x=-1/0,b=1/0,w=-1/0,_=1/0,k=-1/0,S=1/0,T="";for(y&&(c=m[0],d=g[0],h=v[0]),y>1&&(u=m[y-1],f=g[y-1],p=v[y-1]),t=0;tu?"-":"+")+"x")).replace("y",(d>f?"-":"+")+"y")).replace("z",(h>p?"-":"+")+"z");var E=function(){y=0,M=[],C=[],A=[]};(!y||y{"use strict";var n=r(13084).gl_streamtube3d,i=n.createTubeMesh,o=r(53787),a=r(95049).parseColorScale,s=r(10948).extractOpts,l=r(51577),c={xaxis:0,yaxis:1,zaxis:2};function u(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var d=u.prototype;function f(e){var t=e.length;return t>2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function h(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var r=e.fullSceneLayout,i=e.dataScale,u=t._len,d={};function p(e,t){var n=r[t],a=i[c[t]];return o.simpleMap(e,(function(e){return n.d2l(e)*a}))}if(d.vectors=l(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),v=p(t._Zs,"zaxis");if(d.meshgrid=[m,g,v],d.gridFill=t._gridFill,t._slen)d.startingPositions=l(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var y=g[0],x=f(m),b=f(v),w=new Array(x.length*b.length),_=0,k=0;k{"use strict";var n=r(53787),i=r(5876),o=r(921);e.exports=function(e,t,r,a){function s(r,i){return n.coerce(e,t,o,r,i)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),f=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&f&&f.length&&h&&h.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(e,t,a,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),t._length=null):t.visible=!1}},53624:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"streamtube",basePlotModule:r(36390),categories:["gl3d","showLegend"],attributes:r(921),supplyDefaults:r(98988),colorbar:{min:"cmin",max:"cmax"},calc:r(67265).calc,plot:r(92063),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{description:["Use a streamtube trace to visualize flow in a vector field.","","Specify a vector field using 6 1D arrays of equal length,","3 position arrays `x`, `y` and `z`","and 3 vector component arrays `u`, `v`, and `w`.","","By default, the tubes' starting positions will be cut from the vector field's","x-z plane at its minimum y value.","To specify your own starting position, use attributes `starts.x`, `starts.y`","and `starts.z`.","The color is encoded by the norm of (u, v, w), and the local radius","by the divergence of (u, v, w)."].join(" ")}}},75542:(e,t,r)=>{"use strict";var n=r(27231),i=r(32191).fF,o=r(32191).si,a=r(8753),s=r(29707).Y,l=r(10650),c=r(424),u=r(10191).extendFlat,d=r(93701).u;e.exports={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:u({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:u({},l.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:d,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:o({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}},51998:(e,t,r)=>{"use strict";var n=r(44115);t.name="sunburst",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},27411:(e,t,r)=>{"use strict";var n=r(23554),i=r(51908),o=r(53787),a=r(10948).makeColorScaleFuncFromTrace,s=r(21412).makePullColorFn,l=r(21412).generateExtendedColors,c=r(10948).calc,u=r(24956).ALMOST_EQUAL,d={},f={},h={};function p(e,t,r){var n=0,i=e.children;if(i){for(var o=i.length,a=0;a=0};y?(r=Math.min(v.length,b.length),l=function(e){return M(v[e])&&C(e)},d=function(e){return String(v[e])}):(r=Math.min(x.length,b.length),l=function(e){return M(x[e])&&C(e)},d=function(e){return String(x[e])}),_&&(r=Math.min(r,w.length));for(var A=0;A1){for(var P=o.randstr(),R=0;R{"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},17688:(e,t,r)=>{"use strict";var n=r(53787),i=r(75542),o=r(29707).c,a=r(6099).handleText,s=r(24530).handleMarkerDefaults,l=r(10948),c=l.hasColorscale,u=l.handleDefaults;e.exports=function(e,t,r,l){function d(r,o){return n.coerce(e,t,i,r,o)}var f=d("labels"),h=d("parents");if(f&&f.length&&h&&h.length){var p=d("values");p&&p.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),s(e,t,l,d);var m=t._hasColorscale=c(e,"marker","colors")||(e.marker||{}).coloraxis;m&&u(e,t,l,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",m?1:.7);var g=d("text");d("texttemplate"),t.texttemplate||d("textinfo",Array.isArray(g)?"text+label":"label"),d("hovertext"),d("hovertemplate");a(e,t,l,d,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("insidetextorientation"),d("sort"),d("rotation"),d("root.color"),o(t,l,d),t._length=null}else t.visible=!1}},74927:(e,t,r)=>{"use strict";var n=r(50973),i=r(66235);e.exports=function(e,t,r,o,a){var s=t.data.data,l=s.i,c=a||s.color;if(l>=0){t.i=s.i;var u=r.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),n.pointStyle(e,r,o,t)}else i.fill(e,c)}},38638:(e,t,r)=>{"use strict";var n=r(8996),i=r(44049),o=r(87267).appendArrayPointValue,a=r(76719),s=r(53787),l=r(24521),c=r(34636),u=r(22084).formatPieValue;function d(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a"),name:T||L("name")?y.name:void 0,color:S("hoverlabel.bgcolor")||x.color,borderColor:S("hoverlabel.bordercolor"),fontFamily:S("hoverlabel.font.family"),fontSize:S("hoverlabel.font.size"),fontColor:S("hoverlabel.font.color"),nameLength:S("hoverlabel.namelength"),textAlign:S("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:O,eventData:l};g&&(z.x0=A-i.rInscribed*i.rpx1,z.x1=A+i.rInscribed*i.rpx1,z.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(z.x=A,z.idealAlign=A<0?"left":"right");var N=[];a.loneHover(z,{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:r,inOut_bbox:N}),l[0].bbox=N[0],p._hasHoverLabel=!0}if(v){var F=e.select("path.surface");f.styleOne(F,i,y,r,{hovered:!0})}p._hasHoverEvent=!0,r.emit("plotly_hover",{points:l||[d(i,y,f.eventDataKeys)],event:n.event})}})),e.on("mouseout",(function(t){var i=r._fullLayout,o=r._fullData[p.index],s=n.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=n.event,r.emit("plotly_unhover",{points:[d(s,o,f.eventDataKeys)],event:n.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),v){var l=e.select("path.surface");f.styleOne(l,s,o,r,{hovered:!1})}})),e.on("click",(function(e){var t=r._fullLayout,o=r._fullData[p.index],s=g&&(c.isHierarchyRoot(e)||c.isLeaf(e)),u=c.getPtId(e),h=c.isEntry(e)?c.findEntryWithChild(m,u):c.findEntryWithLevel(m,u),v=c.getPtId(h),y={points:[d(e,o,f.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,"plotly_"+p.type+"click",y);if(!1!==x&&t.hovermode&&(r._hoverdata=[d(e,o,f.eventDataKeys)],a.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:v}],traces:[p.index]},w={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",r,b,w)}}))}},34636:(e,t,r)=>{"use strict";var n=r(53787),i=r(66235),o=r(19602),a=r(22084);function s(e){return e.data.data.pid}t.findEntryWithLevel=function(e,r){var n;return r&&e.eachAfter((function(e){if(t.getPtId(e)===r)return n=e.copy()})),n||e},t.findEntryWithChild=function(e,r){var n;return e.eachAfter((function(e){for(var i=e.children||[],o=0;o0)},t.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},t.isHeader=function(e,r){return!(t.isLeaf(e)||e.depth===r._maxDepth-1)},t.getParent=function(e,r){return t.findEntryWithLevel(e,s(r))},t.listPath=function(e,r){var n=e.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return t.listPath(n,r).concat(i)},t.getPath=function(e){return t.listPath(e,"label").join("/")+"/"},t.formatValue=a.formatPieValue,t.formatPercent=function(e,t){var r=n.formatPercent(e,0);return"0%"===r&&(r=a.formatPiePercent(e,t)),r}},14347:(e,t,r)=>{"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:r(51998),categories:[],animatable:!0,attributes:r(75542),layoutAttributes:r(88984),supplyDefaults:r(17688),supplyLayoutDefaults:r(22223),calc:r(27411).calc,crossTraceCalc:r(27411).crossTraceCalc,plot:r(96938).plot,style:r(41154).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data spanning outward radially from root to leaves.","The sunburst sectors are determined by the entries in *labels* or *ids*","and in *parents*."].join(" ")}}},88984:e=>{"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default sunburst slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendsunburstcolors`."].join(" ")},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the sunburst slice colors (whether given by `sunburstcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},22223:(e,t,r)=>{"use strict";var n=r(53787),i=r(88984);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}},96938:(e,t,r)=>{"use strict";var n=r(8996),i=r(23554),o=r(81105).sX,a=r(50973),s=r(53787),l=r(98224),c=r(22684),u=c.recordMinTextSize,d=c.clearMinTextSize,f=r(3213),h=r(22084).getRotationAngle,p=f.computeTransform,m=f.transformInsideText,g=r(41154).styleOne,v=r(29527).resizeText,y=r(38638),x=r(424),b=r(34636);function w(e,r,c,d){var f=e._context.staticPlot,v=e._fullLayout,w=!v.uniformtext.mode&&b.hasTransition(d),k=n.select(c).selectAll("g.slice"),S=r[0],T=S.trace,M=S.hierarchy,C=b.findEntryWithLevel(M,T.level),A=b.getMaxDepth(T),E=v._size,I=T.domain,O=E.w*(I.x[1]-I.x[0]),P=E.h*(I.y[1]-I.y[0]),R=.5*Math.min(O,P),L=S.cx=E.l+E.w*(I.x[1]+I.x[0])/2,j=S.cy=E.t+E.h*(1-I.y[0])-P/2;if(!C)return k.remove();var D=null,z={};w&&k.each((function(e){z[b.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!D&&b.isEntry(e)&&(D=e)}));var N=function(e){return i.partition().size([2*Math.PI,e.height+1])(e)}(C).descendants(),F=C.height+1,B=0,Z=A;S.hasMultipleRoots&&b.isHierarchyRoot(C)&&(N=N.slice(1),F-=1,B=1,Z+=1),N=N.filter((function(e){return e.y1<=Z}));var U=h(T.rotation);U&&N.forEach((function(e){e.x0+=U,e.x1+=U}));var V=Math.min(F,A),H=function(e){return(e-B)/V*R},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},G=function(e){return s.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,L,j)},q=function(e){return L+_(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Y=function(e){return j+_(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(k=k.data(N,b.getPtId)).enter().append("g").classed("slice",!0),w?k.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=b.getPtId(e),n=z[r],i=z[b.getPtId(C)];if(i){var a=(e.x1>i.x1?2*Math.PI:0)+U;t=e.rpx1X?2*Math.PI:0)+U;t={x0:i,x1:i}}else t={rpx0:R,rpx1:R},s.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:U,x1:U};return o(t,n)}(e);return function(e){return G(t(e))}})):d.attr("d",G),c.call(y,C,e,r,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),d.call(g,i,T,e);var h=s.ensureSingle(c,"g","slicetext"),_=s.ensureSingle(h,"text","",(function(e){e.attr("data-notex",1)})),k=s.ensureUniformFontSize(e,b.determineTextFont(T,i,v.font));_.text(t.formatSliceLabel(i,C,T,r,v)).classed("slicetext",!0).attr("text-anchor","middle").call(a.font,k).call(l.convertToTspans,e);var M=a.bBox(_.node());i.transform=m(M,i,S),i.transform.targetX=q(i),i.transform.targetY=Y(i);var A=function(e,t){var r=e.transform;return p(r,t),r.fontSize=k.size,u(T.type,r,v),s.getTextTransform(r)};w?_.transition().attrTween("transform",(function(e){var t=function(e){var t,r=z[b.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},D)if(e.parent)if(X){var i=e.x1>X?2*Math.PI:0;t.x0=t.x1=i}else s.extendFlat(t,J(e));else t.x0=t.x1=U;else t.x0=t.x1=U;var a=o(t.transform.textPosAngle,e.transform.textPosAngle),l=o(t.rpx1,e.rpx1),c=o(t.x0,e.x0),d=o(t.x1,e.x1),f=o(t.transform.scale,n.scale),h=o(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,m=o(t.transform.rCenter,n.rCenter),g=function(e){return m(Math.pow(e,p))};return function(e){var t=l(e),r=c(e),i=d(e),o=g(e),s={pxmid:W(t,(r+i)/2),rpx1:t,transform:{textPosAngle:a(e),rCenter:o,x:n.x,y:n.y}};return u(T.type,n,v),{transform:{targetX:q(s),targetY:Y(s),scale:f(e),rotate:h(e),rCenter:o}}}}(e);return function(e){return A(t(e),M)}})):_.attr("transform",A(i,M))}))}function _(e){return t=e.rpx1,r=e.transform.textPosAngle,[t*Math.sin(r),-t*Math.cos(r)];var t,r}t.plot=function(e,t,r,i){var o,a,s=e._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(d("sunburst",s),(o=l.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u)?(i&&(a=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){a&&a()})).each("interrupt",(function(){a&&a()})).each((function(){l.selectAll("g.trace").each((function(t){w(e,t,this,r)}))}))):(o.each((function(t){w(e,t,this,r)})),s.uniformtext.mode&&v(e,s._sunburstlayer.selectAll(".trace"),"sunburst"));c&&o.exit().remove()},t.formatSliceLabel=function(e,t,r,n,i){var o=r.texttemplate,a=r.textinfo;if(!o&&(!a||"none"===a))return"";var l=i.separators,c=n[0],u=e.data.data,d=c.hierarchy,f=b.isHierarchyRoot(e),h=b.getParent(d,e),p=b.getValue(e);if(!o){var m,g=a.split("+"),v=function(e){return-1!==g.indexOf(e)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(b.formatValue(u.v,l)),!f){v("current path")&&y.push(b.getPath(e.data));var x=0;v("percent parent")&&x++,v("percent entry")&&x++,v("percent root")&&x++;var w=x>1;if(x){var _,k=function(e){m=b.formatPercent(_,l),w&&(m+=" of "+e),y.push(m)};v("percent parent")&&!f&&(_=p/b.getValue(h),k("parent")),v("percent entry")&&(_=p/b.getValue(t),k("entry")),v("percent root")&&(_=p/b.getValue(d),k("root"))}}return v("text")&&(m=s.castOption(r,u.i,"text"),s.isValidTextValue(m)&&y.push(m)),y.join("
")}var S=s.castOption(r,u.i,"texttemplate");if(!S)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=b.formatValue(u.v,l)),T.currentPath=b.getPath(e.data),f||(T.percentParent=p/b.getValue(h),T.percentParentLabel=b.formatPercent(T.percentParent,l),T.parent=b.getPtLabel(h)),T.percentEntry=p/b.getValue(t),T.percentEntryLabel=b.formatPercent(T.percentEntry,l),T.entry=b.getPtLabel(t),T.percentRoot=p/b.getValue(d),T.percentRootLabel=b.formatPercent(T.percentRoot,l),T.root=b.getPtLabel(d),u.hasOwnProperty("color")&&(T.color=u.color);var M=s.castOption(r,u.i,"text");return(s.isValidTextValue(M)||""===M)&&(T.text=M),T.customdata=s.castOption(r,u.i,"customdata"),s.texttemplateString(S,T,i._d3locale,T,r._meta||{})}},41154:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(22684).resizeText,s=r(74927);function l(e,t,r,n){var a=t.data.data,l=!t.children,c=a.i,u=o.castOption(r,c,"marker.line.color")||i.defaultLine,d=o.castOption(r,c,"marker.line.width")||0;e.call(s,t,r,n).style("stroke-width",d).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}e.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each((function(t){var r=n.select(this),i=t[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each((function(t){n.select(this).call(l,t,i,e)}))}))},styleOne:l}},72547:(e,t,r)=>{"use strict";var n=r(66235),i=r(8753),o=r(89849).axisHoverFormat,a=r(32191).fF,s=r(27231),l=r(10191).extendFlat,c=r(18693).overrideAll;function u(e){return{valType:"boolean",dflt:!1,description:["Determines whether or not these contour lines are projected","on the",e,"plane.","If `highlight` is set to *true* (the default), the projected","lines are shown on hover.","If `show` is set to *true*, the projected lines are shown","in permanence."].join(" ")}}function d(e){return{show:{valType:"boolean",dflt:!1,description:["Determines whether or not contour lines about the",e,"dimension are drawn."].join(" ")},start:{valType:"number",dflt:null,editType:"plot",description:["Sets the starting contour level value.","Must be less than `contours.end`"].join(" ")},end:{valType:"number",dflt:null,editType:"plot",description:["Sets the end contour level value.","Must be more than `contours.start`"].join(" ")},size:{valType:"number",dflt:null,min:0,editType:"plot",description:["Sets the step between each contour level.","Must be positive."].join(" ")},project:{x:u("x"),y:u("y"),z:u("z")},color:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the contour lines."},usecolormap:{valType:"boolean",dflt:!1,description:["An alternate to *color*.","Determines whether or not the contour lines are colored using","the trace *colorscale*."].join(" ")},width:{valType:"number",min:1,max:16,dflt:2,description:"Sets the width of the contour lines."},highlight:{valType:"boolean",dflt:!0,description:["Determines whether or not contour lines about the",e,"dimension are highlighted on hover."].join(" ")},highlightcolor:{valType:"color",dflt:n.defaultLine,description:"Sets the color of the highlighted contour lines."},highlightwidth:{valType:"number",min:1,max:16,dflt:2,description:"Sets the width of the highlighted contour lines."}}}var f=e.exports=c(l({z:{valType:"data_array",description:"Sets the z coordinates."},x:{valType:"data_array",description:"Sets the x coordinates."},y:{valType:"data_array",description:"Sets the y coordinates."},text:{valType:"string",dflt:"",arrayOk:!0,description:["Sets the text elements associated with each z value.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,description:"Same as `text`."},hovertemplate:a(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the `z` data are filled in."].join(" ")},surfacecolor:{valType:"data_array",description:["Sets the surface color values,","used for setting a color scale independent of `z`."].join(" ")}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:d("x"),y:d("y"),z:d("z")},hidesurface:{valType:"boolean",dflt:!1,description:["Determines whether or not a surface is drawn.","For example, set `hidesurface` to *false*","`contours.x.show` to *true* and","`contours.y.show` to *true* to draw a wire frame plot."].join(" ")},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10,description:"Numeric vector, representing the X coordinate for each vertex."},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4,description:"Numeric vector, representing the Y coordinate for each vertex."},z:{valType:"number",min:-1e5,max:1e5,dflt:0,description:"Numeric vector, representing the Z coordinate for each vertex."}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8,description:"Ambient light increases overall color visibility but can wash out the image."},diffuse:{valType:"number",min:0,max:1,dflt:.8,description:"Represents the extent that incident rays are reflected in a range of angles."},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2,description:["Represents the reflectance as a dependency of the viewing angle; e.g. paper is reflective","when viewing it from the edge of the paper (almost 90 degrees), causing shine."].join(" ")}},opacity:{valType:"number",min:0,max:1,dflt:1,description:["Sets the opacity of the surface.","Please note that in the case of using high `opacity` values for example a value","greater than or equal to 0.5 on two surfaces (and 0.25 with four surfaces), an","overlay of multiple transparent surfaces may not perfectly be sorted in depth by the","webgl API. This behavior may be improved in the near future and is subject to change."].join(" ")},opacityscale:{valType:"any",editType:"calc",description:["Sets the opacityscale.","The opacityscale must be an array containing","arrays mapping a normalized value to an opacity value.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values would have","higher opacity values and those in the middle would be more transparent","Alternatively, `opacityscale` may be a palette name string","of the following list: 'min', 'max', 'extremes' and 'uniform'.","The default is 'uniform'."].join(" ")},_deprecated:{zauto:l({},i.zauto,{description:"Obsolete. Use `cauto` instead."}),zmin:l({},i.zmin,{description:"Obsolete. Use `cmin` instead."}),zmax:l({},i.zmax,{description:"Obsolete. Use `cmax` instead."})},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},37042:(e,t,r)=>{"use strict";var n=r(1631);e.exports=function(e,t){t.surfacecolor?n(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):n(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},87223:(e,t,r)=>{"use strict";var n=r(13084).gl_surface3d,i=r(13084).ndarray,o=r(13084).ndarray_linear_interpolate.d2,a=r(83622),s=r(98878),l=r(53787).isArrayOrTypedArray,c=r(95049).parseColorScale,u=r(55115),d=r(10948).extractOpts;function f(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 h=f.prototype;h.getXat=function(e,t,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===r?i:n.d2l(i,0,r)},h.getYat=function(e,t,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===r?i:n.d2l(i,0,r)},h.getZat=function(e,t,r,n){var i=this.data.z[t][e];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),void 0===r?i:n.d2l(i,0,r)},h.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.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 o=0;o<3;o++){var a=e.dataCoordinate[o];null!==a&&void 0!==a&&(e.dataCoordinate[o]*=this.scene.dataScale[o])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?e.textLabel=s[i][n]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var p=[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 m(e,t){if(e0){r=p[n];break}return r}function y(e,t){if(!(e<1||t<1)){for(var r=g(e),n=g(t),i=1,o=0;ow;)r--,r/=v(r),++r1?n:1},h.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],o=e[0].shape[1],a=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*r+1),l=1+n+1,c=1+o+1,u=i(new Float32Array(l*c),[l,c]),d=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];to&&(this.minValues[t]=o),this.maxValues[t]{"use strict";var n=r(44049),i=r(53787),o=r(5876),a=r(72547),s=.1;function l(e,t,r,n){var i=n("opacityscale");"max"===i?t.opacityscale=[[0,s],[1,1]]:"min"===i?t.opacityscale=[[0,1],[1,s]]:"extremes"===i?t.opacityscale=function(e,t){for(var r=[],n=0;n<32;n++){var i=n/31,o=t+(1-t)*(1-Math.pow(Math.sin(e*i*Math.PI),2));r.push([i,Math.max(0,Math.min(1,o))])}return r}(1,s):function(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!==+e[0][0]||1!==+e[e.length-1][0])return!1;for(var r=0;r{"use strict";e.exports={attributes:r(72547),supplyDefaults:r(10).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:r(37042),plot:r(87223),moduleType:"trace",name:"surface",basePlotModule:r(36390),categories:["gl3d","2dMap","showLegend"],meta:{description:["The data the describes the coordinates of the surface is set in `z`.","Data in `z` should be a {2D array}.","Coordinates in `x` and `y` can either be 1D {arrays}","or {2D arrays} (e.g. to graph parametric surfaces).","If not provided in `x` and `y`, the x and y coordinates are assumed","to be linear starting at 0 with a unit step.","The color scale corresponds to the `z` values by default.","For custom color scales, use `surfacecolor` which should be a {2D array},","where its bounds can be controlled using `cmin` and `cmax`."].join(" ")}}},75921:(e,t,r)=>{"use strict";var n=r(63858),i=r(10191).extendFlat,o=r(18693).overrideAll,a=r(92948),s=r(29707).Y,l=r(89849).descriptionOnlyNumbers;(e.exports=o({domain:s({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null,description:["The width of columns expressed as a ratio. Columns fill the available width","in proportion of their specified column widths."].join(" ")},columnorder:{valType:"data_array",description:["Specifies the rendered order of the data columns; for example, a value `2` at position `0`","means that column index `0` in the data will be rendered as the","third column, as columns have an index base of zero."].join(" ")},header:{values:{valType:"data_array",dflt:[],description:["Header cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:28,description:"The height of cells."},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",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[],description:["Cell values. `values[m][n]` represents the value of the `n`th point in column `m`,","therefore the `values[m]` vector length for all columns must be the same (longer vectors","will be truncated). Each value must be a finite number or a string."].join(" ")},format:{valType:"data_array",dflt:[],description:l("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null,description:"Prefix for cell values."},suffix:{valType:"string",arrayOk:!0,dflt:null,description:"Suffix for cell values."},height:{valType:"number",dflt:20,description:"The height of cells."},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",description:["Sets the cell fill color. It accepts either a specific color","or an array of colors or a 2D array of colors."].join(" ")}},font:i({},a({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},71591:(e,t,r)=>{"use strict";var n=r(38213).a0,i=r(10388),o="table";t.name=o,t.plot=function(e){var t=n(e.calcdata,o)[0];t.length&&i(e,t)},t.clean=function(e,t,r,n){var i=n._has&&n._has(o),a=t._has&&t._has(o);i&&!a&&n._paperdiv.selectAll(".table").remove()}},64981:(e,t,r)=>{"use strict";var n=r(41689).wrap;e.exports=function(){return n({})}},46322:e=>{"use strict";e.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}},57749:(e,t,r)=>{"use strict";var n=r(46322),i=r(10191).extendFlat,o=r(51908);function a(e){if(Array.isArray(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(n[i]=a,a.key=l++,a.firstRowIndex=s,a.lastRowIndex=c,a={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=o,s=c+1,o=0);return n}e.exports=function(e,t){var r=l(t.cells.values),h=function(e){return e.slice(t.header.values.length,e.length)},p=l(t.header.values);p.length&&!p[0].length&&(p[0]=[""],p=l(p));var m=p.concat(h(r).map((function(){return c((p[0]||[""]).length)}))),g=t.domain,v=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),y=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),x=t.header.values.length?m[0].map((function(){return t.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return t.cells.height})):[],w=x.reduce(s,0),_=f(b,y-w+n.uplift),k=d(f(x,w),[]),S=d(_,k),T={},M=t._fullInput.columnorder.concat(h(r.map((function(e,t){return t})))),C=m.map((function(e,r){var n=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return o(n)?Number(n):1})),A=C.reduce(s,0);C=C.map((function(e){return e/A*v}));var E=Math.max(a(t.header.line.width),a(t.cells.line.width)),I={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:E,height:y,columnOrder:M,groupHeight:y,rowBlocks:S,headerRowBlocks:k,scrollY:0,cells:i({},t.cells,{values:r}),headerCells:i({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var r=T[e];return T[e]=(r||0)+1,{key:e+"__"+T[e],label:e,specIndex:t,xIndex:M[t],xScale:u,x:void 0,calcdata:void 0,columnWidth:C[t]}}))};return I.columns.forEach((function(e){e.calcdata=I,e.x=u(e)})),I}},1662:(e,t,r)=>{"use strict";var n=r(10191).extendFlat;t.splitToPanels=function(e){var t=[0,0],r=n({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:n({},e.calcdata,{cells:e.calcdata.headerCells})});return[n({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r]},t.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"===typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}},1468:(e,t,r)=>{"use strict";var n=r(53787),i=r(75921),o=r(29707).c;e.exports=function(e,t,r,a){function s(r,o){return n.coerce(e,t,i,r,o)}o(t,a,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({},a.font)),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),o=i.slice().sort((function(e,t){return e-t})),a=i.map((function(e){return o.indexOf(e)})),s=a.length;s{"use strict";e.exports={attributes:r(75921),supplyDefaults:r(1468),calc:r(64981),plot:r(10388),moduleType:"trace",name:"table",basePlotModule:r(71591),categories:["noOpacity"],meta:{description:["Table view for detailed data viewing.","The data are arranged in a grid of rows and columns.","Most styling can be specified for columns, rows or individual cells.","Table is using a column-major order, ie. the grid is represented as a vector of column vectors."].join(" ")}}},10388:(e,t,r)=>{"use strict";var n=r(46322),i=r(8996),o=r(53787).numberFormat,a=r(41689),s=r(50973),l=r(98224),c=r(53787).raiseToTop,u=r(53787).strTranslate,d=r(53787).cancelTransition,f=r(57749),h=r(1662),p=r(66235);function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function v(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function y(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function x(e,t,r){var o=e.selectAll("."+n.cn.scrollbarKit).data(a.repeat,a.keyFun);o.enter().append("g").classed(n.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),o.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return j(t,t.length-1)+(t.length?D(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-C(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){var t=e.width+n.scrollbarWidth/2+n.scrollbarOffset;return u(t,C(e))}));var s=o.selectAll("."+n.cn.scrollbar).data(a.repeat,a.keyFun);s.enter().append("g").classed(n.cn.scrollbar,!0);var l=s.selectAll("."+n.cn.scrollbarSlider).data(a.repeat,a.keyFun);l.enter().append("g").classed(n.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return u(0,e.scrollbarState.topY||0)}));var c=l.selectAll("."+n.cn.scrollbarGlyph).data(a.repeat,a.keyFun);c.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),c.attr("y2",(function(e){return e.scrollbarState.barLength-n.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||r?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr("stroke-opacity",0);var d=s.selectAll("."+n.cn.scrollbarCaptureZone).data(a.repeat,a.keyFun);d.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,o=this.getBoundingClientRect(),a=r.scrollbarState,s=n-o.top,l=i.scale.linear().domain([0,a.scrollableAreaHeight]).range([0,a.totalHeight]).clamp(!0);a.topY<=s&&s<=a.bottomY||E(t,e,null,l(s-a.barLength/2))(r)})).call(i.behavior.drag().origin((function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",E(t,e)).on("dragend",(function(){}))),d.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),d.remove())}function b(e,t,r,o){var l=function(e){var t=e.selectAll("."+n.cn.columnCells).data(a.repeat,a.keyFun);return t.enter().append("g").classed(n.cn.columnCells,!0),t.exit().remove(),t}(r),c=function(e){var t=e.selectAll("."+n.cn.columnCell).data(h.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.columnCell,!0),t.exit().remove(),t}(l);!function(e){e.each((function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,i={size:k(r.size,n,t),color:k(r.color,n,t),family:k(r.family,n,t)};e.rowNumber=e.key,e.align=k(e.calcdata.cells.align,n,t),e.cellBorderWidth=k(e.calcdata.cells.line.width,n,t),e.font=i}))}(c);var u=function(e){var t=e.selectAll("."+n.cn.cellRect).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(n.cn.cellRect,!0),t}(c);!function(e){e.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=i.select(this);p.stroke(t,k(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,k(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}))}(u);var d=function(e){var t=e.selectAll("."+n.cn.cellTextHolder).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(c),f=function(e){var t=e.selectAll("."+n.cn.cellText).data(a.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(n.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){i.event.stopPropagation()})),t}(d);!function(e){e.each((function(e){s.font(i.select(this),e.font)}))}(f),w(f,t,o,e),L(c)}function w(e,t,r,a){e.text((function(e){var t=e.column.specIndex,r=e.rowNumber,i=e.value,a="string"===typeof i,s=a&&i.match(/
/i),l=!a||s;e.mayHaveMarkup=a&&i.match(/[<&>]/);var c,u="string"===typeof(c=i)&&c.match(n.latexCheck);e.latex=u;var d,f,h=u?"":k(e.calcdata.cells.prefix,t,r)||"",p=u?"":k(e.calcdata.cells.suffix,t,r)||"",m=u?null:k(e.calcdata.cells.format,t,r)||null,g=h+(m?o(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!u&&(d=_(g)),e.cellHeightMayIncrease=s||u||e.mayHaveMarkup||(void 0===d?_(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var v=(" "===n.wrapSplitCharacter?g.replace(/i&&n.push(o),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=j(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(I(e,r,t,c,n.prevPages,n,0),I(e,r,t,c,n.prevPages,n,1),x(r,e))}}function E(e,t,r,o){return function(a){var s=a.calcdata?a.calcdata:a,l=t.filter((function(e){return s.key===e.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===o?s.scrollY+c*i.event.dy:o;var d=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(T);return A(e,d,l),s.scrollY===u}}function I(e,t,r,n,i,o,a){n[a]!==i[a]&&(clearTimeout(o.currentRepaint[a]),o.currentRepaint[a]=setTimeout((function(){var o=r.filter((function(e,t){return t===a&&n[t]!==i[t]}));b(e,t,o,r),i[a]=n[a]})))}function O(e,t,r,o){return function(){var a=i.select(t.parentNode);a.each((function(e){var t=e.fragments;a.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var r,i,o=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*n.cellPad;for(e.value="";s.length;)c+(i=(r=s.shift()).width+o)>u&&(e.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(e.value+=l.join(n.wrapSpacer)),e.wrapped=!0})),a.selectAll("tspan.line").remove(),w(a.select("."+n.cn.cellText),r,e,o),i.select(t.parentNode.parentNode).call(L)}}function P(e,t,r,o,a){return function(){if(!a.settledY){var s=i.select(t.parentNode),l=N(a),c=a.key-l.firstRowIndex,d=l.rows[c].rowHeight,f=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*n.cellPad:d,h=Math.max(f,d);h-l.rows[c].rowHeight&&(l.rows[c].rowHeight=h,e.selectAll("."+n.cn.columnCell).call(L),A(null,e.filter(T),0),x(r,o,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),r=i.select(e.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),o=e.transform.baseVal.consolidate(),s=r.top-t.top+(o?o.matrix.f:n.cellPad);return u(R(a,i.select(e.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),a.settledY=!0}}}function R(e,t){switch(e.align){case"left":default:return n.cellPad;case"right":return e.column.columnWidth-(t||0)-n.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function L(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+D(t,1/0)}),0),r=D(N(e),e.key);return u(0,r+t)})).selectAll("."+n.cn.cellRect).attr("height",(function(e){return(t=N(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight;var t,r}))}function j(e,t){for(var r=0,n=t-1;n>=0;n--)r+=z(e[n]);return r}function D(e,t){for(var r=0,n=0;n{"use strict";var n=r(32191).fF,i=r(32191).si,o=r(8753),a=r(29707).Y,s=r(10650),l=r(75542),c=r(50668),u=r(10191).extendFlat,d=r(93701).u;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",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:l.marker.colors,pattern:d,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:u({},s.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},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({},s.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),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",description:["Sets the positions of the `text` elements."].join(" ")},sort:s.sort,root:l.root,domain:a({name:"treemap",trace:!0,editType:"calc"})}},96959:(e,t,r)=>{"use strict";var n=r(44115);t.name="treemap",t.plot=function(e,r,i,o){n.plotBasePlot(t.name,e,r,i,o)},t.clean=function(e,r,i,o){n.cleanBasePlot(t.name,e,r,i,o)}},70331:(e,t,r)=>{"use strict";var n=r(27411);t.y=function(e,t){return n.calc(e,t)},t.T=function(e){return n._runCrossTraceCalc("treemap",e)}},50668:e=>{"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},5731:(e,t,r)=>{"use strict";var n=r(53787),i=r(67304),o=r(66235),a=r(29707).c,s=r(6099).handleText,l=r(22331).TEXTPAD,c=r(24530).handleMarkerDefaults,u=r(10948),d=u.hasColorscale,f=u.handleDefaults;e.exports=function(e,t,r,u){function h(r,o){return n.coerce(e,t,i,r,o)}var p=h("labels"),m=h("parents");if(p&&p.length&&m&&m.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"),t.texttemplate||h("textinfo",Array.isArray(v)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(e,t,u,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var x=-1!==t.textposition.indexOf("bottom");c(e,t,u,h),(t._hasColorscale=d(e,"marker","colors")||(e.marker||{}).coloraxis)?f(e,t,u,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;h("marker.pad.t",x?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",x?b:b/4),h("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:o.contrast(u.paper_bgcolor)}}},y&&(h("pathbar.thickness",t.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),a(t,u,h),t._length=null}else t.visible=!1}},62470:(e,t,r)=>{"use strict";var n=r(8996),i=r(34636),o=r(22684).clearMinTextSize,a=r(29527).resizeText,s=r(39193);e.exports=function(e,t,r,l,c){var u,d,f=c.type,h=c.drawDescendants,p=e._fullLayout,m=p["_"+f+"layer"],g=!r;(o(f,p),(u=m.selectAll("g.trace."+f).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(f,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(r))?(l&&(d=l()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){m.selectAll("g.trace").each((function(t){s(e,t,this,r,h)}))}))):(u.each((function(t){s(e,t,this,r,h)})),p.uniformtext.mode&&a(e,m.selectAll(".trace"),f));g&&u.exit().remove()}},67616:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(70427),l=r(94571).styleOne,c=r(50668),u=r(34636),d=r(38638),f=!0;e.exports=function(e,t,r,h,p){var m=p.barDifY,g=p.width,v=p.height,y=p.viewX,x=p.viewY,b=p.pathSlice,w=p.toMoveInsideSlice,_=p.strTransform,k=p.hasTransition,S=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,M=p.makeUpdateTextInterpolator,C={},A=e._context.staticPlot,E=e._fullLayout,I=t[0],O=I.trace,P=I.hierarchy,R=g/O._entryDepth,L=u.listPath(r.data,"id"),j=s(P.copy(),[g,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(j=j.filter((function(e){var t=L.indexOf(e.data.id);return-1!==t&&(e.x0=R*t,e.x1=R*(t+1),e.y0=m,e.y1=m+v,e.onPathbar=!0,!0)}))).reverse(),(h=h.data(j,u.getPtId)).enter().append("g").classed("pathbar",!0),S(h,f,C,[g,v],b),h.order();var D=h;k&&(D=D.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),D.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(g,v)/2),s._hoverY=x(s.y1-v/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?p.transition().attrTween("d",(function(e){var t=T(e,f,C,[g,v]);return function(e){return b(t(e))}})):p.attr("d",b),h.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),p.call(l,s,O,e,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var m=i.ensureSingle(h,"g","slicetext"),S=i.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),I=i.ensureUniformFontSize(e,u.determineTextFont(O,s,E.font,{onPathbar:!0}));S.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(o.font,I).call(a.convertToTspans,e),s.textBB=o.bBox(S.node()),s.transform=w(s,{fontSize:I.size,onPathbar:!0}),s.transform.fontSize=I.size,k?S.transition().attrTween("transform",(function(e){var t=M(e,f,C,[g,v]);return function(e){return _(t(e))}})):S.attr("transform",_(s))}))}},53221:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(98224),s=r(70427),l=r(94571).styleOne,c=r(50668),u=r(34636),d=r(38638),f=r(96938).formatSliceLabel,h=!1;e.exports=function(e,t,r,p,m){var g=m.width,v=m.height,y=m.viewX,x=m.viewY,b=m.pathSlice,w=m.toMoveInsideSlice,_=m.strTransform,k=m.hasTransition,S=m.handleSlicesExit,T=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,C=m.prevEntry,A=e._context.staticPlot,E=e._fullLayout,I=t[0].trace,O=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),R=-1!==I.textposition.indexOf("bottom"),L=!R&&!I.marker.pad.t||R&&!I.marker.pad.b,j=s(r,[g,v],{packing:I.tiling.packing,squarifyratio:I.tiling.squarifyratio,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}).descendants(),D=1/0,z=-1/0;j.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),z=Math.max(z,t))})),p=p.data(j,u.getPtId),I._maxVisibleLayers=isFinite(z)?z-D+1:0,p.enter().append("g").classed("slice",!0),S(p,h,{},[g,v],b),p.order();var N=null;if(k&&C){var F=u.getPtId(C);p.each((function(e){null===N&&u.getPtId(e)===F&&(N={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var B=function(){return N||{x0:0,x1:g,y0:0,y1:v}},Z=p;return k&&(Z=Z.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),Z.each((function(s){var p=u.isHeader(s,I);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-I.marker.pad.r),s._hoverY=x(R?s.y1-I.marker.pad.b/2:s.y0+I.marker.pad.t/2);var m=n.select(this),S=i.ensureSingle(m,"path","surface",(function(e){e.style("pointer-events",A?"none":"all")}));k?S.transition().attrTween("d",(function(e){var t=T(e,h,B(),[g,v]);return function(e){return b(t(e))}})):S.attr("d",b),m.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),S.call(l,s,I,e,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?L?"":u.getPtLabel(s)||"":f(s,r,I,t,E)||"";var C=i.ensureSingle(m,"g","slicetext"),j=i.ensureSingle(C,"text","",(function(e){e.attr("data-notex",1)})),D=i.ensureUniformFontSize(e,u.determineTextFont(I,s,E.font));j.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":O||p?"start":"middle").call(o.font,D).call(a.convertToTspans,e),s.textBB=o.bBox(j.node()),s.transform=w(s,{fontSize:D.size,isHeader:p}),s.transform.fontSize=D.size,k?j.transition().attrTween("transform",(function(e){var t=M(e,h,B(),[g,v]);return function(e){return _(t(e))}})):j.attr("transform",_(s))})),N}},72276:e=>{"use strict";e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var o=t.children;if(o)for(var a=0;a{"use strict";e.exports={moduleType:"trace",name:"treemap",basePlotModule:r(96959),categories:[],animatable:!0,attributes:r(67304),layoutAttributes:r(37895),supplyDefaults:r(5731),supplyLayoutDefaults:r(71364),calc:r(70331).y,crossTraceCalc:r(70331).T,plot:r(51902),style:r(94571).style,colorbar:r(68971),meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}}},37895:e=>{"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}}},71364:(e,t,r)=>{"use strict";var n=r(53787),i=r(37895);e.exports=function(e,t){function r(r,o){return n.coerce(e,t,i,r,o)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}},70427:(e,t,r)=>{"use strict";var n=r(23554),i=r(72276);e.exports=function(e,t,r){var o,a=r.flipX,s=r.flipY,l="dice-slice"===r.packing,c=r.pad[s?"bottom":"top"],u=r.pad[a?"right":"left"],d=r.pad[a?"left":"right"],f=r.pad[s?"top":"bottom"];l&&(o=u,u=c,c=o,o=d,d=f,f=o);var h=n.treemap().tile(function(e,t){switch(e){case"squarify":return n.treemapSquarify.ratio(t);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(u).paddingRight(d).paddingTop(c).paddingBottom(f).size(l?[t[1],t[0]]:t)(e);return(l||a||s)&&i(h,t,{swapXY:l,flipX:a,flipY:s}),h}},51902:(e,t,r)=>{"use strict";var n=r(62470),i=r(53221);e.exports=function(e,t,r,o){return n(e,t,r,o,{type:"treemap",drawDescendants:i})}},39193:(e,t,r)=>{"use strict";var n=r(8996),i=r(81105).sX,o=r(34636),a=r(53787),s=r(22331).TEXTPAD,l=r(88430).toMoveInsideBar,c=r(22684).recordMinTextSize,u=r(50668),d=r(67616);function f(e){return o.isHierarchyRoot(e)?"":o.getPtId(e)}e.exports=function(e,t,r,h,p){var m=e._fullLayout,g=t[0],v=g.trace,y="icicle"===v.type,x=g.hierarchy,b=o.findEntryWithLevel(x,v.level),w=n.select(r),_=w.selectAll("g.pathbar"),k=w.selectAll("g.slice");if(!b)return _.remove(),void k.remove();var S=o.isHierarchyRoot(b),T=!m.uniformtext.mode&&o.hasTransition(h),M=o.getMaxDepth(v),C=m._size,A=v.domain,E=C.w*(A.x[1]-A.x[0]),I=C.h*(A.y[1]-A.y[0]),O=E,P=v.pathbar.thickness,R=v.marker.line.width+u.gapWithPathbar,L=v.pathbar.visible?v.pathbar.side.indexOf("bottom")>-1?I+R:-(P+R):0,j={x0:O,x1:O,y0:L,y1:L+P},D=function(e,t,r){var n=v.tiling.pad,i=function(e){return e-n<=t.x0},o=function(e){return e+n>=t.x1},a=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:o(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:o(e.x1+n)?r[0]:e.x1,y0:a(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:a(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},z=null,N={},F={},B=null,Z=function(e,t){return t?N[f(e)]:F[f(e)]},U=function(e,t,r,n){if(t)return N[f(x)]||j;var i=F[v.level]||r;return function(e){return e.data.depth-b.data.depth=(n-=(y?te:te.r)-s)){var h=(r+n)/2;r=h,n=h}var p;ae?i<(p=o-(y?te:te.b))&&p"===ee?(l.x-=o,c.x-=o,u.x-=o,d.x-=o):"/"===ee?(u.x-=o,d.x-=o,a.x-=o/2,s.x-=o/2):"\\"===ee?(l.x-=o,c.x-=o,a.x-=o/2,s.x-=o/2):"<"===ee&&(a.x-=o,s.x-=o),Q(l),Q(d),Q(a),Q(c),Q(u),Q(s),"M"+$(l.x,l.y)+"L"+$(c.x,c.y)+"L"+$(s.x,s.y)+"L"+$(u.x,u.y)+"L"+$(d.x,d.y)+"L"+$(a.x,a.y)+"Z"},toMoveInsideSlice:se,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ue,handleSlicesExit:de,hasTransition:T,strTransform:fe}):_.remove()}},94571:(e,t,r)=>{"use strict";var n=r(8996),i=r(66235),o=r(53787),a=r(34636),s=r(22684).resizeText,l=r(74927);function c(e,t,r,n,s){var c,u,d=(s||{}).hovered,f=t.data.data,h=f.i,p=f.color,m=a.isHierarchyRoot(t),g=1;if(d)c=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(m&&p===r.root.color)g=100,c="rgba(0,0,0,0)",u=0;else if(c=o.castOption(r,h,"marker.line.color")||i.defaultLine,u=o.castOption(r,h,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var v=r.marker.depthfade;if(v){var y,x=i.combine(i.addOpacity(r._backgroundColor,.75),p);if(!0===v){var b=a.getMaxDepth(r);y=isFinite(b)?a.isLeaf(t)?0:r._maxVisibleLayers-(t.data.depth-r._entryDepth):t.data.height+1}else y=t.data.depth-r._entryDepth,r._atRootLevel||y++;if(y>0)for(var w=0;w{"use strict";var n=r(94837),i=r(10191).extendFlat,o=r(89849).axisHoverFormat;e.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,xhoverformat:o("x"),yhoverformat:o("y"),name:i({},n.name,{description:["Sets the trace name.","The trace name appears as the legend item and on hover.","For violin traces, the name will also be used for the position","coordinate, if `x` and `x0` (`y` and `y0` if horizontal) are","missing and the position axis is categorical.","Note that the trace name is also used as a default value","for attribute `scalegroup` (please see its description for details)."].join(" ")}),orientation:i({},n.orientation,{description:["Sets the orientation of the violin(s).","If *v* (*h*), the distribution is visualized along","the vertical (horizontal)."].join(" ")}),bandwidth:{valType:"number",min:0,editType:"calc",description:["Sets the bandwidth used to compute the kernel density estimate.","By default, the bandwidth is determined by Silverman's rule of thumb."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple violins that should be sized according to","to some metric (see `scalemode`), link them by providing a non-empty group id here","shared by every trace in the same group.","If a violin's `width` is undefined, `scalegroup` will default to the trace's name.","In this case, violins with the same names will be linked together"].join(" ")},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc",description:["Sets the metric by which the width of each violin is determined.","*width* means each violin has the same (max) width","*count* means the violins are scaled by the number of sample points making","up each violin."].join(" ")},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc",description:["Sets the method by which the span in data space where the density function will be computed.","*soft* means the span goes from the sample's minimum value minus two bandwidths","to the sample's maximum value plus two bandwidths.","*hard* means the span goes from the sample's minimum to its maximum value.","For custom span settings, use mode *manual* and fill in the `span` attribute."].join(" ")},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the span in data space for which the density function will be computed.","Has an effect only when `spanmode` is set to *manual*."].join(" ")},line:{color:{valType:"color",editType:"style",description:"Sets the color of line bounding the violin(s)."},width:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the width (in px) of line bounding the violin(s)."},editType:"plot"},fillcolor:n.fillcolor,points:i({},n.boxpoints,{description:["If *outliers*, only the sample points lying outside the whiskers","are shown","If *suspectedoutliers*, the outlier points are shown and","points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1","are highlighted (see `outliercolor`)","If *all*, all sample points are shown","If *false*, only the violins are shown with no sample points.","Defaults to *suspectedoutliers* when `marker.outliercolor` or","`marker.line.outliercolor` is set,","otherwise defaults to *outliers*."].join(" ")}),jitter:i({},n.jitter,{description:["Sets the amount of jitter in the sample points drawn.","If *0*, the sample points align along the distribution axis.","If *1*, the sample points are drawn in a random jitter of width","equal to the width of the violins."].join(" ")}),pointpos:i({},n.pointpos,{description:["Sets the position of the sample points in relation to the violins.","If *0*, the sample points are places over the center of the violins.","Positive (negative) values correspond to positions to the","right (left) for vertical violins and above (below) for horizontal violins."].join(" ")}),width:i({},n.width,{description:["Sets the width of the violin in data coordinates.","If *0* (default value) the width is automatically selected based on the positions","of other violin traces in the same subplot."].join(" ")}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,quartilemethod:n.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines if an miniature box plot is drawn inside the violins. "].join(" ")},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot",description:["Sets the width of the inner box plots relative to","the violins' width.","For example, with 1, the inner box plots are as wide as the violins."].join(" ")},fillcolor:{valType:"color",editType:"style",description:"Sets the inner box plot fill color."},line:{color:{valType:"color",editType:"style",description:"Sets the inner box plot bounding line color."},width:{valType:"number",min:0,editType:"style",description:"Sets the inner box plot bounding line width."},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines if a line corresponding to the sample's mean is shown","inside the violins.","If `box.visible` is turned on, the mean line is drawn inside the inner box.","Otherwise, the mean line is drawn from one side of the violin to other."].join(" ")},color:{valType:"color",editType:"style",description:"Sets the mean line color."},width:{valType:"number",min:0,editType:"style",description:"Sets the mean line width."},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc",description:["Determines on which side of the position value the density function making up","one half of a violin is plotted.","Useful when comparing two violin traces under *overlay* mode, where one trace","has `side` set to *positive* and the other to *negative*."].join(" ")},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",description:["Do the hover effects highlight individual violins","or sample points or the kernel density estimate or any combination of them?"].join(" ")}}},99130:(e,t,r)=>{"use strict";var n=r(53787),i=r(28605),o=r(90497),a=r(56332),s=r(24956).BADNUM;function l(e,t,r){var i=t.max-t.min;if(!i)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,i/1e4);var o=r.length,a=n.stdev(r,o-1,t.mean);return Math.max(function(e,t,r){return 1.059*Math.min(t,r/1.349)*Math.pow(e,-.2)}(o,a,t.q3-t.q1),i/100)}function c(e,t,r,n){var o,a=e.spanmode,l=e.span||[],c=[t.min,t.max],u=[t.min-2*n,t.max+2*n];function d(n){var i=l[n],o="multicategory"===r.type?r.r2c(i):r.d2c(i,0,e[t.valLetter+"calendar"]);return o===s?u[n]:o}var f={type:"linear",range:o="soft"===a?u:"hard"===a?c:[d(0),d(1)]};return i.setConvert(f),f.cleanRange(),o}e.exports=function(e,t){var r=o(e,t);if(r[0].t.empty)return r;for(var s=e._fullLayout,u=i.getFromId(e,t["h"===t.orientation?"xaxis":"yaxis"]),d=1/0,f=-1/0,h=0,p=0,m=0;m{"use strict";var n=r(27203).setPositionOffset,i=["v","h"];e.exports=function(e,t){for(var r=e.calcdata,o=t.xaxis,a=t.yaxis,s=0;s{"use strict";var n=r(53787),i=r(66235),o=r(5580),a=r(46830);e.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}function c(r,i){return n.coerce2(e,t,a,r,i)}if(o.handleSampleDefaults(e,t,l,s),!1!==t.visible){l("bandwidth"),l("side"),l("width")||(l("scalegroup",t.name),l("scalemode"));var u,d=l("span");Array.isArray(d)&&(u="manual"),l("spanmode",u);var f=l("line.color",(e.marker||{}).color||r),h=l("line.width"),p=l("fillcolor",i.addOpacity(t.line.color,.5));o.handlePointsDefaults(e,t,l,{prefix:""});var m=c("box.width"),g=c("box.fillcolor",p),v=c("box.line.color",f),y=c("box.line.width",h);l("box.visible",Boolean(m||g||v||y))||(t.box={visible:!1});var x=c("meanline.color",f),b=c("meanline.width",h);l("meanline.visible",Boolean(x||b))||(t.meanline={visible:!1}),l("quartilemethod")}}},56332:(e,t,r)=>{"use strict";var n=r(53787),i=function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)};t.makeKDE=function(e,t,r){var n=r.length,o=i,a=e.bandwidth,s=1/(n*a);return function(e){for(var t=0,i=0;i{"use strict";var n=r(66235),i=r(53787),o=r(28605),a=r(86333),s=r(56332);e.exports=function(e,t,r,l,c){c||(c={});var u,d,f=c.hoverLayer,h=e.cd,p=h[0].trace,m=p.hoveron,g=-1!==m.indexOf("violins"),v=-1!==m.indexOf("kde"),y=[];if(g||v){var x=a.hoverOnBoxes(e,t,r,l);if(v&&x.length>0){var b,w,_,k,S,T=e.xa,M=e.ya;"h"===p.orientation?(S=t,b="y",_=M,w="x",k=T):(S=r,b="x",_=T,w="y",k=M);var C=h[e.index];if(S>=C.span[0]&&S<=C.span[1]){var A=i.extendFlat({},e),E=k.c2p(S,!0),I=s.getKdeValue(C,p,S),O=s.getPositionOnKdePath(C,p,E),P=_._offset,R=_._length;A[b+"0"]=O[0],A[b+"1"]=O[1],A[w+"0"]=A[w+"1"]=E,A[w+"Label"]=w+": "+o.hoverLabelText(k,S,p[w+"hoverformat"])+", "+h[0].t.labels.kde+" "+I.toFixed(3);for(var L=0,j=0;j{"use strict";e.exports={attributes:r(46830),layoutAttributes:r(24476),supplyDefaults:r(81626),crossTraceDefaults:r(5580).crossTraceDefaults,supplyLayoutDefaults:r(91119),calc:r(99130),crossTraceCalc:r(95556),plot:r(97051),style:r(57961),styleOnSelect:r(5196).styleOnSelect,hoverPoints:r(59750),selectPoints:r(1118),moduleType:"trace",name:"violin",basePlotModule:r(48206),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{description:["In vertical (horizontal) violin plots,","statistics are computed using `y` (`x`) values.","By supplying an `x` (`y`) array, one violin per distinct x (y) value","is drawn","If no `x` (`y`) {array} is provided, a single violin is drawn.","That violin position is then positioned with","with `name` or with `x0` (`y0`) if provided."].join(" ")}}},24476:(e,t,r)=>{"use strict";var n=r(56335),i=r(53787).extendFlat;e.exports={violinmode:i({},n.boxmode,{description:["Determines how violins at the same location coordinate","are displayed on the graph.","If *group*, the violins are plotted next to one another","centered around the shared location.","If *overlay*, the violins are plotted over one another,","you might need to set *opacity* to see them multiple violins.","Has no effect on traces that have *width* set."].join(" ")}),violingap:i({},n.boxgap,{description:["Sets the gap (in plot fraction) between violins of","adjacent location coordinates.","Has no effect on traces that have *width* set."].join(" ")}),violingroupgap:i({},n.boxgroupgap,{description:["Sets the gap (in plot fraction) between violins of","the same location coordinate.","Has no effect on traces that have *width* set."].join(" ")})}},91119:(e,t,r)=>{"use strict";var n=r(53787),i=r(24476),o=r(65235);e.exports=function(e,t,r){o._supply(e,t,r,(function(r,o){return n.coerce(e,t,i,r,o)}),"violin")}},97051:(e,t,r)=>{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(96710),s=r(84542),l=r(56332);e.exports=function(e,t,r,c){var u=e._context.staticPlot,d=e._fullLayout,f=t.xaxis,h=t.yaxis;function p(e,t){var r=s(e,{xaxis:f,yaxis:h,trace:t,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return o.smoothopen(r[0],1)}i.makeTraceGroups(c,r,"trace violins").each((function(e){var r=n.select(this),o=e[0],s=o.t,c=o.trace;if(!0!==c.visible||s.empty)r.remove();else{var m=s.bPos,g=s.bdPos,v=t[s.valLetter+"axis"],y=t[s.posLetter+"axis"],x="both"===c.side,b=x||"positive"===c.side,w=x||"negative"===c.side,_=r.selectAll("path.violin").data(i.identity);_.enter().append("path").style("vector-effect",u?"none":"non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each((function(e){var t,r,i,o,a,l,u,f,h=n.select(this),_=e.density,k=_.length,S=y.c2l(e.pos+m,!0),T=y.l2p(S);if(c.width)t=s.maxKDE/g;else{var M=d._violinScaleGroupStats[c.scalegroup];t="count"===c.scalemode?M.maxKDE/g*(M.maxCount/e.pts.length):M.maxKDE/g}if(b){for(u=new Array(k),a=0;a{"use strict";var n=r(8996),i=r(66235),o=r(5196).stylePoints;e.exports=function(e){var t=n.select(e).selectAll("g.trace.violins");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(t){var r=t[0].trace,a=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;a.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(i.stroke,r.line.color).call(i.fill,r.fillcolor),a.selectAll("path.box").style("stroke-width",l.width+"px").call(i.stroke,l.color).call(i.fill,s.fillcolor);var d={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(d).call(i.stroke,c.color),a.selectAll("path.meanline").style(d).call(i.stroke,c.color),o(a,r,e)}))}},41688:(e,t,r)=>{"use strict";var n=r(8753),i=r(93720),o=r(72547),a=r(27231),s=r(10191).extendFlat,l=r(18693).overrideAll,c=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,description:["Displays/hides tetrahedron shapes between minimum and","maximum iso-values. Often useful when either caps or","surfaces are disabled or filled with values less than 1."].join(" ")},fill:{valType:"number",min:0,max:1,dflt:1,description:["Sets the fill ratio of the `spaceframe` elements. The default fill value","is 1 meaning that they are entirely shaded. Applying a `fill` ratio less","than one would allow the creation of openings parallel to the edges."].join(" ")}},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:o.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},a.hoverinfo),showlegend:s({},a.showlegend,{dflt:!1})}),"calc","nested");c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},34014:(e,t,r)=>{"use strict";var n=r(13084).gl_mesh3d,i=r(95049).parseColorScale,o=r(55115),a=r(10948).extractOpts,s=r(51577),l=r(90648).findNearestOnAxis,c=r(90648).generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var d=u.prototype;d.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],o=this.data._Ys.length,a=this.data._Zs.length,s=l(r,this.data._Xs).id,c=l(n,this.data._Ys).id,u=l(i,this.data._Zs).id,d=e.index=u+a*c+a*o*s;e.traceCoordinate=[this.data._meshX[d],this.data._meshY[d],this.data._meshZ[d],this.data._value[d]];var f=this.data.hovertext||this.data.text;return Array.isArray(f)&&void 0!==f[d]?e.textLabel=f[d]:f&&(e.textLabel=f),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=c(e);var l={positions:s(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=a(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},e.exports=function(e,t){var r=e.glplot.gl,i=n({gl:r}),o=new u(e,i,t.uid);return i._trace=o,o.update(t),e.glplot.add(i),o}},66226:(e,t,r)=>{"use strict";var n=r(53787),i=r(41688),o=r(25430).supplyIsoDefaults,a=r(10).opacityscaleDefaults;e.exports=function(e,t,r,s){function l(r,o){return n.coerce(e,t,i,r,o)}o(e,t,r,s,l),a(e,t,s,l)}},10001:(e,t,r)=>{"use strict";e.exports={attributes:r(41688),supplyDefaults:r(66226),calc:r(81139),colorbar:{min:"cmin",max:"cmax"},plot:r(34014),moduleType:"trace",name:"volume",basePlotModule:r(36390),categories:["gl3d","showLegend"],meta:{description:["Draws volume trace between iso-min and iso-max values with coordinates given by","four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex","of a uniform or non-uniform 3-D grid. Horizontal or vertical slices, caps as well as","spaceframe between iso-min and iso-max values could also be drawn using this trace."].join(" ")}}},90508:(e,t,r)=>{"use strict";var n=r(8222),i=r(37471).line,o=r(27231),a=r(89849).axisHoverFormat,s=r(32191).fF,l=r(32191).si,c=r(81348),u=r(10191).extendFlat,d=r(66235);function f(e){return{marker:{color:u({},n.marker.color,{arrayOk:!1,editType:"style",description:"Sets the marker color of all "+e+" values."}),line:{color:u({},n.marker.line.color,{arrayOk:!1,editType:"style",description:"Sets the line color of all "+e+" values."}),width:u({},n.marker.line.width,{arrayOk:!1,editType:"style",description:"Sets the line width of all "+e+" values."}),editType:"style"},editType:"style"},editType:"style"}}e.exports={measure:{valType:"data_array",dflt:[],editType:"calc",description:["An array containing types of values.","By default the values are considered as 'relative'.","However; it is possible to use 'total' to compute the sums.","Also 'absolute' could be applied to reset the computed total","or to declare an initial value where needed."].join(" ")},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc",description:["Sets where the bar base is drawn (in position axis units)."].join(" ")},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:a("x"),yhoverformat:a("y"),hovertext:n.hovertext,hovertemplate:s({},{keys:c.eventDataKeys}),hoverinfo:u({},o.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1,description:["Determines which trace information appear on the graph.","In the case of having multiple waterfalls, totals","are computed separately (per trace)."].join(" ")},texttemplate:l({editType:"plot"},{keys:c.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:f("increasing"),decreasing:f("decreasing"),totals:f("intermediate sums and total"),connector:{line:{color:u({},i.color,{dflt:d.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot",description:["Sets the shape of connector lines."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if connector lines are drawn. "].join(" ")},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},91184:(e,t,r)=>{"use strict";var n=r(28605),i=r(64594),o=r(53787).mergeArray,a=r(35637),s=r(24956).BADNUM;function l(e){return"a"===e||"absolute"===e}function c(e){return"t"===e||"total"===e}e.exports=function(e,t){var r,u,d,f,h,p,m=n.getFromId(e,t.xaxis||"x"),g=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=m.makeCalcdata(t,"x"),d=g.makeCalcdata(t,"y"),f=i(t,g,"y",d),h=!!t.yperiodalignment,p="y"):(r=g.makeCalcdata(t,"y"),d=m.makeCalcdata(t,"x"),f=i(t,m,"x",d),h=!!t.xperiodalignment,p="x"),u=f.vals;for(var v,y=Math.min(u.length,r.length),x=new Array(y),b=0,w=!1,_=0;_{"use strict";e.exports={eventDataKeys:["initial","delta","final"]}},69054:(e,t,r)=>{"use strict";var n=r(39713).setGroupPositions;e.exports=function(e,t){var r,i,o=e._fullLayout,a=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],f=[];for(i=0;i{"use strict";var n=r(53787),i=r(25305),o=r(6099).handleText,a=r(89016),s=r(17239),l=r(90508),c=r(66235),u=r(59933),d=u.INCREASING.COLOR,f=u.DECREASING.COLOR;function h(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",c.defaultLine),e(t+".marker.line.width")}e.exports={supplyDefaults:function(e,t,r,i){function c(r,i){return n.coerce(e,t,l,r,i)}if(a(e,t,i,c)){s(e,t,i,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var u=c("textposition");if(o(e,t,i,c,u,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),t.texttemplate||c("textinfo")),h(c,"increasing",d),h(c,"decreasing",f),h(c,"totals","#4499FF"),c("connector.visible"))c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,o;function a(e){return n.coerce(o._input,o,l,e)}if("group"===t.waterfallmode)for(var s=0;s{"use strict";e.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},43723:(e,t,r)=>{"use strict";var n=r(28605).hoverLabelText,i=r(66235).opacity,o=r(48363).hoverOnBars,a=r(59933),s=a.INCREASING.SYMBOL,l=a.DECREASING.SYMBOL;e.exports=function(e,t,r,a,c){var u=o(e,t,r,a,c);if(u){var d=u.cd,f=d[0].trace,h="h"===f.orientation,p=h?"x":"y",m=h?e.xa:e.ya,g=d[u.index],v=g.isSum?g.b+g.s:g.rawS;u.initial=g.b+g.s-v,u.delta=v,u.final=u.initial+u.delta;var y=S(Math.abs(u.delta));u.deltaLabel=v<0?"("+y+")":y,u.finalLabel=S(u.final),u.initialLabel=S(u.initial);var x=g.hi||f.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var w="all"===x,_=x.split("+"),k=function(e){return w||-1!==_.indexOf(e)};g.isSum||(!k("final")||k(h?"x":"y")||b.push(u.finalLabel),k("delta")&&(v<0?b.push(u.deltaLabel+" "+l):b.push(u.deltaLabel+" "+s)),k("initial")&&b.push("Initial: "+u.initialLabel))}return b.length&&(u.extraText=b.join("
")),u.color=function(e,t){var r=e[t.dir].marker,n=r.color,o=r.line.color,a=r.line.width;if(i(n))return n;if(i(o)&&a)return o}(f,g),[u]}function S(e){return n(m,e,f[p+"hoverformat"])}}},83696:(e,t,r)=>{"use strict";e.exports={attributes:r(90508),layoutAttributes:r(2810),supplyDefaults:r(75431).supplyDefaults,crossTraceDefaults:r(75431).crossTraceDefaults,supplyLayoutDefaults:r(28654),calc:r(91184),crossTraceCalc:r(69054),plot:r(13474),style:r(5037).style,hoverPoints:r(43723),eventData:r(24050),selectPoints:r(22145),moduleType:"trace",name:"waterfall",basePlotModule:r(48206),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{description:["Draws waterfall trace which is useful graph to displays the","contribution of various elements (either positive or negative)","in a bar chart. The data visualized by the span of the bars is","set in `y` if `orientation` is set to *v* (the default) and the","labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}}},2810:e=>{"use strict";e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},waterfallgap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}}},28654:(e,t,r)=>{"use strict";var n=r(53787),i=r(2810);e.exports=function(e,t,r){var o=!1;function a(r,o){return n.coerce(e,t,i,r,o)}for(var s=0;s{"use strict";var n=r(8996),i=r(53787),o=r(50973),a=r(24956).BADNUM,s=r(88430),l=r(22684).clearMinTextSize;e.exports=function(e,t,r,c){var u=e._fullLayout;l("waterfall",u),s.plot(e,t,r,c,{mode:u.waterfallmode,norm:u.waterfallmode,gap:u.waterfallgap,groupgap:u.waterfallgroupgap}),function(e,t,r,s){var l=t.xaxis,c=t.yaxis;i.makeTraceGroups(s,r,"trace bars").each((function(r){var s=n.select(this),u=r[0].trace,d=i.ensureSingle(s,"g","lines");if(u.connector&&u.connector.visible){var f="h"===u.orientation,h=u.connector.mode,p=d.selectAll("g.line").data(i.identity);p.enter().append("g").classed("line",!0),p.exit().remove();var m=p.size();p.each((function(r,s){if(s===m-1||r.cNext){var u=function(e,t,r,n){var i=[],o=[],a=n?t:r,s=n?r:t;return i[0]=a.c2p(e.s0,!0),o[0]=s.c2p(e.p0,!0),i[1]=a.c2p(e.s1,!0),o[1]=s.c2p(e.p1,!0),i[2]=a.c2p(e.nextS0,!0),o[2]=s.c2p(e.nextP0,!0),n?[i,o]:[o,i]}(r,l,c,f),d=u[0],p=u[1],g="";d[0]!==a&&p[0]!==a&&d[1]!==a&&p[1]!==a&&("spanning"===h&&!r.isSum&&s>0&&(g+=f?"M"+d[0]+","+p[1]+"V"+p[0]:"M"+d[1]+","+p[0]+"H"+d[0]),"between"!==h&&(r.isSum||s{"use strict";var n=r(8996),i=r(50973),o=r(66235),a=r(26880).DESELECTDIM,s=r(29527),l=r(22684).resizeText,c=s.styleTextPoints;e.exports={style:function(e,t,r){var s=r||n.select(e).selectAll("g.waterfalllayer").selectAll("g.trace");l(e,s,"waterfall"),s.style("opacity",(function(e){return e[0].trace.opacity})),s.each((function(t){var r=n.select(this),s=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;n.select(this).call(o.fill,t.color).call(o.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),c(r,s,e),r.selectAll(".lines").each((function(){var e=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},6377:(e,t,r)=>{"use strict";var n=r(28605),i=r(53787),o=r(94043),a=r(95355).p,s=r(24956).BADNUM;t.moduleType="transform",t.name="aggregate";var l=t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this aggregate transform is enabled or disabled."].join(" ")},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the grouping target to which the aggregation is applied.","Data points with matching group values will be coalesced into","one point, using the supplied aggregation functions to reduce data","in other data arrays.","If a string, `groups` is assumed to be a reference to a data array","in the parent trace object.","To aggregate by nested variables, use *.* to access them.","For example, set `groups` to *marker.color* to aggregate","about the marker color array.","If an array, `groups` is itself the data array by which we aggregate."].join(" ")},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc",description:["A reference to the data array in the parent trace to aggregate.","To aggregate by nested variables, use *.* to access them.","For example, set `groups` to *marker.color* to aggregate","over the marker color array.","The referenced array must already exist, unless `func` is *count*,","and each array may only be referenced once."].join(" ")},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc",description:["Sets the aggregation function.","All values from the linked `target`, corresponding to the same value","in the `groups` array, are collected and reduced by this function.","*count* is simply the number of values in the `groups` array, so does","not even require the linked array to exist. *first* (*last*) is just","the first (last) linked value.","Invalid values are ignored, so for example in *avg* they do not","contribute to either the numerator or the denominator.","Any data type (numeric, date, category) may be aggregated with any","function, even though in certain cases it is unlikely to make sense,","for example a sum of dates or average of categories.","*median* will return the average of the two central values if there is","an even count. *mode* will return the first value to reach the maximum","count, in case of a tie.","*change* will return the difference between the first and last linked values.","*range* will return the difference between the min and max linked values."].join(" ")},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc",description:["*stddev* supports two formula variants: *sample* (normalize by N-1)","and *population* (normalize by N)."].join(" ")},enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this aggregation function is enabled or disabled."].join(" ")},editType:"calc"},editType:"calc"},c=l.aggregations;function u(e,t,r,o){if(o.enabled){for(var a=o.target,l=i.nestedProperty(t,a),c=l.get(),u=function(e,t){var r=e.func,n=t.d2c,o=t.c2d;switch(r){case"count":return d;case"first":return f;case"last":return h;case"sum":return function(e,t){for(var r=0,i=0;ii&&(i=u,a=c)}}return i?o(a):s};case"rms":return function(e,t){for(var r=0,i=0,a=0;a{"use strict";var n=r(53787),i=r(44049),o=r(28605),a=r(95355).p,s=r(81494),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;t.moduleType="transform",t.name="filter",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this filter transform is enabled or disabled."].join(" ")},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the filter target by which the filter is applied.","If a string, `target` is assumed to be a reference to a data array","in the parent trace object.","To filter about nested variables, use *.* to access them.","For example, set `target` to *marker.color* to filter","about the marker color array.","If an array, `target` is then the data array by which the filter is applied."].join(" ")},operation:{valType:"enumerated",values:[].concat(l).concat(c).concat(u),dflt:"=",editType:"calc",description:["Sets the filter operation.","*=* keeps items equal to `value`","*!=* keeps items not equal to `value`","*<* keeps items less than `value`","*<=* keeps items less than or equal to `value`","*>* keeps items greater than `value`","*>=* keeps items greater than or equal to `value`","*[]* keeps items inside `value[0]` to `value[1]` including both bounds","*()* keeps items inside `value[0]` to `value[1]` excluding both bounds","*[)* keeps items inside `value[0]` to `value[1]` including `value[0]` but excluding `value[1]","*(]* keeps items inside `value[0]` to `value[1]` excluding `value[0]` but including `value[1]","*][* keeps items outside `value[0]` to `value[1]` and equal to both bounds","*)(* keeps items outside `value[0]` to `value[1]`","*](* keeps items outside `value[0]` to `value[1]` and equal to `value[0]`","*)[* keeps items outside `value[0]` to `value[1]` and equal to `value[1]`","*{}* keeps items present in a set of values","*}{* keeps items not present in a set of values"].join(" ")},value:{valType:"any",dflt:0,editType:"calc",description:["Sets the value or values by which to filter.","Values are expected to be in the same type as the data linked","to `target`.","When `operation` is set to one of","the comparison values ("+l+")","`value` is expected to be a number or a string.","When `operation` is set to one of the interval values","("+c+")","`value` is expected to be 2-item array where the first item","is the lower bound and the second item is the upper bound.","When `operation`, is set to one of the set values","("+u+")","`value` is expected to be an array with as many items as","the desired set elements."].join(" ")},preservegaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps in data arrays produced by the filter operation","are preserved.","Setting this to *true* might be useful when plotting a line chart","with `connectgaps` set to *false*."].join(" ")},editType:"calc"},t.supplyDefaults=function(e){var r={};function o(i,o){return n.coerce(e,r,t.attributes,i,o)}if(o("enabled")){var a=o("target");if(n.isArrayOrTypedArray(a)&&0===a.length)return r.enabled=!1,r;o("preservegaps"),o("operation"),o("value");var s=i.getComponentMethod("calendars","handleDefaults");s(e,r,"valuecalendar",null),s(e,r,"targetcalendar",null)}return r},t.calcTransform=function(e,t,r){if(r.enabled){var i=n.getTargetArray(t,r);if(i){var s=r.target,d=i.length;t._length&&(d=Math.min(d,t._length));var f=r.targetcalendar,h=t._arrayAttrs,p=r.preservegaps;if("string"===typeof s){var m=n.nestedProperty(t,s+"calendar").get();m&&(f=m)}var g,v,y=function(e,t,r){var n=e.operation,i=e.value,o=Array.isArray(i);function a(e){return-1!==e.indexOf(n)}var s,d=function(r){return t(r,0,e.valuecalendar)},f=function(e){return t(e,0,r)};a(l)?s=d(o?i[0]:i):a(c)?s=o?[d(i[0]),d(i[1])]:[d(i),d(i)]:a(u)&&(s=o?i.map(d):[d(i)]);switch(n){case"=":return function(e){return f(e)===s};case"!=":return function(e){return f(e)!==s};case"<":return function(e){return f(e)":return function(e){return f(e)>s};case">=":return function(e){return f(e)>=s};case"[]":return function(e){var t=f(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=f(e);return t>s[0]&&t=s[0]&&ts[0]&&t<=s[1]};case"][":return function(e){var t=f(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=f(e);return ts[1]};case"](":return function(e){var t=f(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=f(e);return t=s[1]};case"{}":return function(e){return-1!==s.indexOf(f(e))};case"}{":return function(e){return-1===s.indexOf(f(e))}}}(r,o.getDataToCoordFunc(e,t,s,i),f),x={},b={},w=0;p?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},v=function(e,t){var r=x[e.astr][t];e.get().push(r)}),S(g);for(var _=a(t.transforms,r),k=0;k{"use strict";var n=r(53787),i=r(94043),o=r(44115),a=r(95355).p;function s(e,t){var r,s,l,c,u,d,f,h,p,m,g=t.transform,v=t.transformIndex,y=e.transforms[v].groups,x=a(e.transforms,g);if(!n.isArrayOrTypedArray(y)||0===y.length)return[e];var b=n.filterUnique(y),w=new Array(b.length),_=y.length,k=i.findArrayAttributes(e),S=g.styles||[],T={};for(r=0;r1?"%{group} (%{trace})":"%{group}");var l=e.styles,c=a.styles=[];if(l)for(o=0;o{"use strict";t.p=function(e,t){for(var r,n,i=0;i{"use strict";var n=r(53787),i=r(28605),o=r(95355).p,a=r(24956).BADNUM;t.moduleType="transform",t.name="sort",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this sort transform is enabled or disabled."].join(" ")},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc",description:["Sets the target by which the sort transform is applied.","If a string, *target* is assumed to be a reference to a data array","in the parent trace object.","To sort about nested variables, use *.* to access them.","For example, set `target` to *marker.size* to sort","about the marker size array.","If an array, *target* is then the data array by which","the sort transform is applied."].join(" ")},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc",description:["Sets the sort transform order."].join(" ")},editType:"calc"},t.supplyDefaults=function(e){var r={};function i(i,o){return n.coerce(e,r,t.attributes,i,o)}return i("enabled")&&(i("target"),i("order")),r},t.calcTransform=function(e,t,r){if(r.enabled){var s=n.getTargetArray(t,r);if(s){var l=r.target,c=s.length;t._length&&(c=Math.min(c,t._length));var u,d,f=t._arrayAttrs,h=function(e,t,r,n){var i,o=new Array(n),s=new Array(n);for(i=0;i{"use strict";t.version="2.27.1"},13084:e=>{var t;self,t=function(){return function(){var e={7386:function(e,t,r){e.exports={alpha_shape:r(2350),convex_hull:r(5537),delaunay_triangulate:r(4419),gl_cone3d:r(1140),gl_error3d:r(3110),gl_heatmap2d:r(6386),gl_line3d:r(6086),gl_mesh3d:r(8116),gl_plot2d:r(2117),gl_plot3d:r(1059),gl_pointcloud2d:r(8271),gl_scatter3d:r(2182),gl_select_box:r(6623),gl_spikes2d:r(3050),gl_streamtube3d:r(7307),gl_surface3d:r(3754),ndarray:r(5050),ndarray_linear_interpolate:r(3581)}},2146:function(e,t,r){"use strict";function n(e,t){for(var r=0;rf)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,p.prototype),t}function p(e,t,r){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return v(e)}return m(e,t,r)}function m(e,t,r){if("string"===typeof e)return function(e,t){if("string"===typeof t&&""!==t||(t="utf8"),!p.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|w(e,t),n=h(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return y(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e));if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer))return x(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return x(e,t,r);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return p.from(n,t,r);var i=function(e){if(p.isBuffer(e)){var t=0|b(e.length),r=h(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!==typeof e.length||re(e.length)?h(0):y(e):"Buffer"===e.type&&Array.isArray(e.data)?y(e.data):void 0}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return p.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e))}function g(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function v(e){return g(e),h(e<0?0:0|b(e))}function y(e){for(var t=e.length<0?0:0|b(e.length),r=h(t),n=0;n=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function w(e,t){if(p.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function _(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function k(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function S(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),re(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=p.from(t,n)),p.isBuffer(t))return 0===t.length?-1:T(e,t,r,n,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):T(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(e,t,r,n,i){var o,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-l),o=r;o>=0;o--){for(var d=!0,f=0;fi&&(n=i):n=i;var o,a=t.length;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:o>223?3:o>191?2:1;if(i+s<=r){var l=void 0,c=void 0,u=void 0,d=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128===(192&(l=e[i+1]))&&(d=(31&o)<<6|63&l)>127&&(a=d);break;case 3:l=e[i+1],c=e[i+2],128===(192&l)&&128===(192&c)&&(d=(15&o)<<12|(63&l)<<6|63&c)>2047&&(d<55296||d>57343)&&(a=d);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&d<1114112&&(a=d)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?(p.isBuffer(o)||(o=p.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else{if(!p.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},p.byteLength=w,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},d&&(p.prototype[d]=p.prototype.inspect),p.prototype.compare=function(e,t,r,n,i){if(te(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),d=0;d>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return M(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function L(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,r,n,i,o){if(!p.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i){Y(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function Z(e,t,r,n,i){Y(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,4),u.write(e,t,r,n,23,4),r+4}function H(e,t,r,n,i){return t=+t,r>>>=0,i||U(e,0,r,8),u.write(e,t,r,n,52,8),r+8}p.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},p.prototype.readBigUInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||N(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},p.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||N(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},p.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},p.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},p.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},p.prototype.readBigInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||N(e,4,this.length),u.read(this,e,!0,23,4)},p.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),u.read(this,e,!1,23,4)},p.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),u.read(this,e,!0,52,8)},p.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),u.read(this,e,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||F(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,255,0),this[t]=255&e,t+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigUInt64LE=ie((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=ie((function(e){return Z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},p.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},p.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},p.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},p.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},p.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},p.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},p.prototype.writeBigInt64LE=ie((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=ie((function(e){return Z(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(e,t,r){return V(this,e,t,!0,r)},p.prototype.writeFloatBE=function(e,t,r){return V(this,e,t,!1,r)},p.prototype.writeDoubleLE=function(e,t,r){return H(this,e,t,!0,r)},p.prototype.writeDoubleBE=function(e,t,r){return H(this,e,t,!1,r)},p.prototype.copy=function(e,t,r,n){if(!p.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=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),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function Y(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new W.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,r){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,o)}function X(e,t){if("number"!==typeof e)throw new W.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw X(e,r),new W.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new W.ERR_BUFFER_OUT_OF_BOUNDS;throw new W.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(l(t))}),TypeError),G("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=q(String(r)):"bigint"===typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=q(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function J(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace($,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ee(e,t,r,n){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function re(e){return e!==e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();function ie(e){return"undefined"===typeof BigInt?oe:e}function oe(){throw new Error("BigInt not supported")}},2321:function(e){"use strict";e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(i||"undefined"===typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"===typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!==typeof i)return!1;var o=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!o&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(o=!0),o}},3910:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,l)),u=0,d=l>0?a-4:a;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3187:function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,l=(1<>1,u=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*m}},1152:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=n(),d=i(),f=o();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,t,r,s),new a({turntable:u,orbit:d,matrix:f},c)};var n=r(3440),i=r(7774),o=r(9298);function a(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.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=a.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r0?c=c.ushln(d):d<0&&(u=u.ushln(-d)),s(c,u)}},234:function(e,t,r){"use strict";var n=r(3218);e.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},4275:function(e,t,r){"use strict";var n=r(1928);e.exports=function(e){return e.cmp(new n(0))}},9958:function(e,t,r){"use strict";var n=r(4275);e.exports=function(e){var t=e.length,r=e.words,i=0;if(1===t)i=r[0];else if(2===t)i=r[0]+67108864*r[1];else for(var o=0;o20?52:r+32}},3218:function(e,t,r){"use strict";r(1928),e.exports=function(e){return e&&"object"===typeof e&&Boolean(e.words)}},5514:function(e,t,r){"use strict";var n=r(1928),i=r(8362);e.exports=function(e){var t=i.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},8524:function(e,t,r){"use strict";var n=r(5514),i=r(4275);e.exports=function(e,t){var r=i(e),o=i(t);if(0===r)return[n(0),n(1)];if(0===o)return[n(0),n(0)];o<0&&(e=e.neg(),t=t.neg());var a=e.gcd(t);return a.cmpn(1)?[e.div(a),t.div(a)]:[e,t]}},2813:function(e,t,r){"use strict";var n=r(1928);e.exports=function(e){return new n(e)}},3962:function(e,t,r){"use strict";var n=r(8524);e.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},4951:function(e,t,r){"use strict";var n=r(4275);e.exports=function(e){return n(e[0])*n(e[1])}},4354:function(e,t,r){"use strict";var n=r(8524);e.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},7999:function(e,t,r){"use strict";var n=r(9958),i=r(1112);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var o=t.abs().divmod(r.abs()),a=o.div,s=n(a),l=o.mod,c=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(f=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var d=r.bitLength()-l.bitLength()+53,f=n(l.ushln(d).divRound(r));return d<1023?c*f*Math.pow(2,-d):c*(f*=Math.pow(2,-1023))*Math.pow(2,1023-d)}},5070:function(e){"use strict";function t(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>=0?(o=a,i=a-1):n=a+1}return o}function r(e,t,r,n,i){for(var o=i+1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)>0?(o=a,i=a-1):n=a+1}return o}function n(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<0?(o=a,n=a+1):i=a-1}return o}function i(e,t,r,n,i){for(var o=n-1;n<=i;){var a=n+i>>>1,s=e[a];(void 0!==r?r(s,t):s-t)<=0?(o=a,n=a+1):i=a-1}return o}function o(e,t,r,n,i){for(;n<=i;){var o=n+i>>>1,a=e[o],s=void 0!==r?r(a,t):a-t;if(0===s)return o;s<=0?n=o+1:i=o-1}return-1}function a(e,t,r,n,i,o){return"function"===typeof r?o(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):o(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,o){return a(e,r,n,i,o,t)},gt:function(e,t,n,i,o){return a(e,t,n,i,o,r)},lt:function(e,t,r,i,o){return a(e,t,r,i,o,n)},le:function(e,t,r,n,o){return a(e,t,r,n,o,i)},eq:function(e,t,r,n,i){return a(e,t,r,n,i,o)}}},2288:function(e,t){"use strict";function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},1928:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(6601).Buffer}catch(T){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","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"],d=[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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(o),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,y=g>>>13,x=0|a[3],b=8191&x,w=x>>>13,_=0|a[4],k=8191&_,S=_>>>13,T=0|a[5],M=8191&T,C=T>>>13,A=0|a[6],E=8191&A,I=A>>>13,O=0|a[7],P=8191&O,R=O>>>13,L=0|a[8],j=8191&L,D=L>>>13,z=0|a[9],N=8191&z,F=z>>>13,B=0|s[0],Z=8191&B,U=B>>>13,V=0|s[1],H=8191&V,W=V>>>13,G=0|s[2],q=8191&G,Y=G>>>13,X=0|s[3],K=8191&X,$=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(d,Z))|0)+((8191&(i=(i=Math.imul(d,U))+Math.imul(f,Z)|0))<<13)|0;c=((o=Math.imul(f,U))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,Z),i=(i=Math.imul(p,U))+Math.imul(m,Z)|0,o=Math.imul(m,U);var ve=(c+(n=n+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,H)|0))<<13)|0;c=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,Z),i=(i=Math.imul(v,U))+Math.imul(y,Z)|0,o=Math.imul(y,U),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var ye=(c+(n=n+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,q)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(b,Z),i=(i=Math.imul(b,U))+Math.imul(w,Z)|0,o=Math.imul(w,U),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,Y)|0;var xe=(c+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((o=o+Math.imul(f,$)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(k,Z),i=(i=Math.imul(k,U))+Math.imul(S,Z)|0,o=Math.imul(S,U),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,$)|0;var be=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(M,Z),i=(i=Math.imul(M,U))+Math.imul(C,Z)|0,o=Math.imul(C,U),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(v,K)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((o=o+Math.imul(f,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,Z),i=(i=Math.imul(E,U))+Math.imul(I,Z)|0,o=Math.imul(I,U),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,Y)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var _e=(c+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,Z),i=(i=Math.imul(P,U))+Math.imul(R,Z)|0,o=Math.imul(R,U),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,Z),i=(i=Math.imul(j,U))+Math.imul(D,Z)|0,o=Math.imul(D,U),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Se=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,Z),i=(i=Math.imul(N,U))+Math.imul(F,Z)|0,o=Math.imul(F,U),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,Y)|0,n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,fe)|0;var Te=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,W))+Math.imul(F,H)|0,o=Math.imul(F,W),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,Y)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,fe)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,Y))+Math.imul(F,q)|0,o=Math.imul(F,Y),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,$)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(b,de)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,fe)|0;var Ce=(c+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,$))+Math.imul(F,K)|0,o=Math.imul(F,$),n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,fe)|0;var Ae=(c+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,fe)|0;var Ee=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,re),i=(i=Math.imul(N,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,le)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,fe)|0;var Ie=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(N,oe),i=(i=Math.imul(N,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,fe)|0;var Oe=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((o=o+Math.imul(I,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(N,le),i=(i=Math.imul(N,ce))+Math.imul(F,le)|0,o=Math.imul(F,ce),n=n+Math.imul(j,de)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(D,de)|0,o=o+Math.imul(D,fe)|0;var Pe=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(N,de),i=(i=Math.imul(N,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Re=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(D,pe)|0))<<13)|0;c=((o=o+Math.imul(D,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Le=(c+(n=Math.imul(N,pe))|0)+((8191&(i=(i=Math.imul(N,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=xe,l[4]=be,l[5]=we,l[6]=_e,l[7]=ke,l[8]=Se,l[9]=Te,l[10]=Me,l[11]=Ce,l[12]=Ae,l[13]=Ee,l[14]=Ie,l[15]=Oe,l[16]=Pe,l[17]=Re,l[18]=Le,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-o|d>>>o,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(i,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0===(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(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 w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(x,y),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),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)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),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)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},2692:function(e){"use strict";e.exports=function(e){var t,r,n,i=e.length,o=0;for(t=0;t>>1;if(!(u<=0)){var d,f=i.mallocDouble(2*u*s),h=i.mallocInt32(s);if((s=l(e,u,f,h))>0){if(1===u&&n)o.init(s),d=o.sweepComplete(u,r,0,s,f,h,0,s,f,h);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(t,u,p,m))>0&&(o.init(s+c),d=1===u?o.sweepBipartite(u,r,0,s,f,h,0,c,p,m):a(u,r,n,s,f,h,c,p,m),i.free(p),i.free(m))}i.free(f),i.free(h)}return d}}}function u(e,t){n.push([e,t])}},7333:function(e,t){"use strict";function r(e){return e?function(e,t,r,n,i,o,a,s,l,c,u){return i-n>l-s?function(e,t,r,n,i,o,a,s,l,c,u){for(var d=2*e,f=n,h=d*n;fc-l?n?function(e,t,r,n,i,o,a,s,l,c,u){for(var d=2*e,f=n,h=d*n;f0;){var L=(P-=1)*b,j=_[L],D=_[L+1],z=_[L+2],N=_[L+3],F=_[L+4],B=_[L+5],Z=P*w,U=k[Z],V=k[Z+1],H=1&B,W=!!(16&B),G=u,q=C,Y=E,X=I;if(H&&(G=E,q=I,Y=u,X=C),!(2&B&&D>=(z=g(e,j,D,z,G,q,V)))&&!(4&B&&(D=v(e,j,D,z,G,q,U))>=z)){var K=z-D,$=F-N;if(W){if(e*K*(K+$)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,f=2*e,h=d,p=s[f*d+t];c=x?(h=y,p=x):v>=w?(h=g,p=v):(h=b,p=w):x>=w?(h=y,p=x):w>=v?(h=g,p=v):(h=b,p=w);for(var _=f*(u-1),k=f*h,S=0;Sr&&i[d+t]>c;--u,d-=a){for(var f=d,h=d+a,p=0;pf;++f,l+=s)if(i[l+d]===a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"lof;++f,l+=s)if(i[l+d]h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"lo<=p0":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=e+t,f=r;n>f;++f,l+=s)if(i[l+d]<=a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"hi<=p0":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=e+t,f=r;n>f;++f,l+=s)if(i[l+d]<=a)if(u===f)u+=1,c+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[c],i[c++]=p}var m=o[f];o[f]=o[u],o[u++]=m}return u},"loh;++h,l+=s){var p=i[l+d],m=i[l+f];if(pg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=o[h];o[h]=o[u],o[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,n,i,o,a){for(var s=2*e,l=s*r,c=l,u=r,d=t,f=e+t,h=r;n>h;++h,l+=s){var p=i[l+d],m=i[l+f];if(p<=a&&a<=m)if(u===h)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=o[h];o[h]=o[u],o[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,o,a,s){for(var l=2*e,c=l*r,u=c,d=r,f=t,h=e+t,p=r;n>p;++p,c+=l){var m=i[c+f],g=i[c+h];if(!(m>=a)&&!(s>=g))if(d===p)d+=1,u+=l;else{for(var v=0;l>v;++v){var y=i[c+v];i[c+v]=i[u],i[u++]=y}var x=o[p];o[p]=o[d],o[d++]=x}}return d}}},309:function(e){"use strict";e.exports=function(e,n){n<=4*t?r(0,n-1,e):c(0,n-1,e)};var t=32;function r(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var o=r[n++],a=r[n++],s=i,l=n-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function l(e,t,r,n){var i=n[e*=2];return i>1,g=m-f,v=m+f,y=h,x=g,b=m,w=v,_=p,k=e+1,S=u-1,T=0;s(y,x,d)&&(T=y,y=x,x=T),s(w,_,d)&&(T=w,w=_,_=T),s(y,b,d)&&(T=y,y=b,b=T),s(x,b,d)&&(T=x,x=b,b=T),s(y,w,d)&&(T=y,y=w,w=T),s(b,w,d)&&(T=b,b=w,w=T),s(x,_,d)&&(T=x,x=_,_=T),s(x,b,d)&&(T=x,x=b,b=T),s(w,_,d)&&(T=w,w=_,_=T);for(var M=d[2*x],C=d[2*x+1],A=d[2*w],E=d[2*w+1],I=2*y,O=2*b,P=2*_,R=2*h,L=2*m,j=2*p,D=0;D<2;++D){var z=d[I+D],N=d[O+D],F=d[P+D];d[R+D]=z,d[L+D]=N,d[j+D]=F}i(g,e,d),i(v,u,d);for(var B=k;B<=S;++B)if(l(B,M,C,d))B!==k&&n(B,k,d),++k;else if(!l(B,A,E,d))for(;;){if(l(S,A,E,d)){l(S,M,C,d)?(o(B,k,S,d),++k,--S):(n(B,S,d),--S);break}if(--S>>1;o(p,C);var A=0,E=0;for(k=0;k=a)m(u,d,E--,I=I-a|0);else if(I>=0)m(l,c,A--,I);else if(I<=-a){I=-I-a|0;for(var O=0;O>>1;o(p,A);var E=0,I=0,O=0;for(S=0;S>1===p[2*S+3]>>1&&(R=2,S+=1),P<0){for(var L=-(P>>1)-1,j=0;j>1)-1,0===R?m(l,c,E--,L):1===R?m(u,d,I--,L):2===R&&m(f,h,O--,L)}},scanBipartite:function(e,t,r,n,i,s,u,d,f,h,v,y){var x=0,b=2*e,w=t,_=t+e,k=1,S=1;n?S=a:k=a;for(var T=i;T>>1;o(p,E);var I=0;for(T=0;T=a?(P=!n,M-=a):(P=!!n,M-=1),P)g(l,c,I++,M);else{var R=y[M],L=b*M,j=v[L+t+1],D=v[L+t+1+e];e:for(var z=0;z>>1;o(p,k);var S=0;for(x=0;x=a)l[S++]=b-a;else{var M=h[b-=1],C=g*b,A=f[C+t+1],E=f[C+t+1+e];e:for(var I=0;I=0;--I)if(l[I]===b){for(L=I+1;L0;){for(var h=r.pop(),p=(u=-1,d=-1,l=a[s=r.pop()],1);p=0||(t.flip(s,h),i(e,t,r,u,s,d),i(e,t,r,s,d,u),i(e,t,r,d,h,u),i(e,t,r,h,u,d))}}},7098:function(e,t,r){"use strict";var n=r(5070);function i(e,t,r,n,i,o,a){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=i,this.next=o,this.boundary=a}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,a=0;a0||l.length>0;){for(;s.length>0;){var h=s.pop();if(c[h]!==-a){c[h]=a,u[h];for(var p=0;p<3;++p){var m=f[3*h+p];m>=0&&0===c[m]&&(d[3*h+p]?l.push(m):(s.push(m),c[m]=a))}}}var g=l;l=s,s=g,l.length=0,a=-a}var v=function(e,t,r){for(var n=0,i=0;i1&&i(r[f[h-2]],r[f[h-1]],o)>0;)e.push([f[h-1],f[h-2],a]),h-=1;f.length=h,f.push(a);var p=d.upperIds;for(h=p.length;h>1&&i(r[p[h-2]],r[p[h-1]],o)<0;)e.push([p[h-2],p[h-1],a]),h-=1;p.length=h,p.push(a)}}function d(e,t){var r;return(r=e.a[0]m[0]&&i.push(new s(m,p,2,c),new s(p,m,1,c))}i.sort(l);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,[],[],[],[])],y=[],x=(c=0,i.length);c=0}}(),o.removeTriangle=function(e,t,r){var n=this.stars;a(n[e],t,r),a(n[t],r,e),a(n[r],e,t)},o.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},o.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;nt[2]?1:0)}function v(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--o){var x=t[u=(C=n[o])[0]],b=x[0],w=x[1],_=e[b],k=e[w];if((_[0]-k[0]||_[1]-k[1])<0){var S=b;b=w,w=S}x[0]=b;var T,M=x[1]=C[1];for(i&&(T=x[2]);o>0&&n[o-1][0]===u;){var C,A=(C=n[--o])[1];i?t.push([M,A,T]):t.push([M,A]),M=A}i?t.push([M,w,T]):t.push([M,w])}return f}(e,t,f,g,r),x=p(e,y);return v(t,x,r),!!x||f.length>0||g.length>0}},5528:function(e,t,r){"use strict";e.exports=function(e,t,r,n){var o=s(t,e),d=s(n,r),f=u(o,d);if(0===a(f))return null;var h=s(e,r),p=u(d,h),m=i(p,f),g=c(o,m);return l(e,g)};var n=r(3962),i=r(9189),o=r(4354),a=r(4951),s=r(6695),l=r(7584),c=r(4469);function u(e,t){return o(n(e[0],t[1]),n(e[1],t[0]))}},5692:function(e){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]}]}},9156:function(e,t,r){"use strict";var n=r(5692),i=r(3578);function o(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function a(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,c,u,d,f,h,p,m;if(e||(e={}),h=(e.nshades||72)-1,f=e.format||"hex",(d=e.colormap)||(d="jet"),"string"===typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");u=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>h+1)throw new Error(d+" map requires nshades to be at least size "+u.length);p=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"===typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*h)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),v=[];for(m=0;m0||l(e,t,o)?-1:1:0===s?c>0||l(e,t,r)?1:-1:i(c-s)}var d=n(e,t,r);return d>0?a>0&&n(e,t,o)>0?1:-1:d<0?a>0||n(e,t,o)>0?1:-1:n(e,t,o)>0||l(e,t,r)?1:-1};var n=r(417),i=r(7538),o=r(87),a=r(2019),s=r(9662);function l(e,t,r){var n=o(e[0],-t[0]),i=o(e[1],-t[1]),l=o(r[0],-t[0]),c=o(r[1],-t[1]),u=s(a(n,l),a(i,c));return u[u.length-1]>=0}},7538:function(e){"use strict";e.exports=function(e){return e<0?-1:e>0?1:0}},9209:function(e){e.exports=function(e,n){var i=e.length,o=e.length-n.length;if(o)return o;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var a=e[0]+e[1],s=n[0]+n[1];if(o=a+e[2]-(s+n[2]))return o;var l=t(e[0],e[1]),c=t(n[0],n[1]);return t(l,e[2])-t(c,n[2])||t(l+e[2],a)-t(c+n[2],s);case 4:var u=e[0],d=e[1],f=e[2],h=e[3],p=n[0],m=n[1],g=n[2],v=n[3];return u+d+f+h-(p+m+g+v)||t(u,d,f,h)-t(p,m,g,v,p)||t(u+d,u+f,u+h,d+f,d+h,f+h)-t(p+m,p+g,p+v,m+g,m+v,g+v)||t(u+d+f,u+d+h,u+f+h,d+f+h)-t(p+m+g,p+m+v,p+g+v,m+g+v);default:for(var y=e.slice().sort(r),x=n.slice().sort(r),b=0;be[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},8722:function(e,t,r){"use strict";e.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var i=new Array(r),o=t[r-1],a=0;a=t[l]&&(s+=1);o[a]=s}}return e}(n(o,!0),r)}};var n=r(2183),i=r(2153)},9680:function(e){"use strict";e.exports=function(e,t,r,n,i,o){var a=i-1,s=i*i,l=a*a,c=(1+2*i)*l,u=i*l,d=s*(3-2*i),f=s*a;if(e.length){o||(o=new Array(e.length));for(var h=e.length-1;h>=0;--h)o[h]=c*e[h]+u*t[h]+d*r[h]+f*n[h];return o}return c*e+u*t+d*r+f*n},e.exports.derivative=function(e,t,r,n,i,o){var a=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){o||(o=new Array(e.length));for(var u=e.length-1;u>=0;--u)o[u]=a*e[u]+s*t[u]+l*r[u]+c*n[u];return o}return a*e+s*t+l*r[u]+c*n}},4419:function(e,t,r){"use strict";var n=r(2183),i=r(1215);function o(e,t){this.point=e,this.index=t}function a(e,t){for(var r=e.point,n=t.point,i=r.length,o=0;o=2)return!1;e[r]=n}return!0})):w.filter((function(e){for(var t=0;t<=s;++t){var r=v[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(u=0;u>>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))}},3094:function(e){"use strict";function t(e,r,n){var i=0|e[n];if(i<=0)return[];var o,a=new Array(i);if(n===e.length-1)for(o=0;o0)return function(e,t){var r,n;for(r=new Array(e),n=0;n=r-1){f=l.length-1;var p=e-t[r-1];for(h=0;h=r-1)for(var u=s.length-1,d=(t[r-1],0);d=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--d)n.push(o(l[d-1],c[d-1],arguments[d])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var f=r;f>0;--f){var h=o(c[f-1],u[f-1],arguments[f]);n.push(h),i.push((h-n[a++])*d)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(o(a[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,i=this._velocity,a=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,d=u>1e-6?1/u:0;this._time.push(e);for(var f=r;f>0;--f){var h=arguments[f];n.push(o(l[f-1],c[f-1],n[a++]+h)),i.push(h*d)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--d)n.push(o(l[d],c[d],n[a]+u*i[a])),i.push(0),a+=1}}},7080:function(e){"use strict";function t(e,t,r,n,i,o){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=o}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function o(e,t){this._compare=e,this.root=t}e.exports=function(e){return new o(e||h,null)};var a=o.prototype;function s(e,t){var r;return t.left&&(r=s(e,t.left))?r:(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left&&(i=l(e,t,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(e,t,r,n.right)}function c(e,t,r,n,i){var o,a=r(e,i.key),s=r(t,i.key);if(a<=0){if(i.left&&(o=c(e,t,r,n,i.left)))return o;if(s>0&&(o=n(i.key,i.value)))return o}if(s>0&&i.right)return c(e,t,r,n,i.right)}function u(e,t){this.tree=e,this._stack=t}Object.defineProperty(a,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(a,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(a,"length",{get:function(){return this.root?this.root._count:0}}),a.insert=function(e,r){for(var a=this._compare,s=this.root,l=[],c=[];s;){var u=a(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var d=l.length-2;d>=0;--d)s=l[d],c[d]<=0?l[d]=new t(s._color,s.key,s.value,l[d+1],s.right,s._count+1):l[d]=new t(s._color,s.key,s.value,s.left,l[d+1],s._count+1);for(d=l.length-1;d>1;--d){var f=l[d-1];if(s=l[d],1===f._color||1===s._color)break;var h=l[d-2];if(h.left===f)if(f.left===s){if(!(p=h.right)||0!==p._color){h._color=0,h.left=f.right,f._color=1,f.right=h,l[d-2]=f,l[d-1]=s,i(h),i(f),d>=3&&((m=l[d-3]).left===h?m.left=f:m.right=f);break}f._color=1,h.right=n(1,p),h._color=0,d-=1}else{if(!(p=h.right)||0!==p._color){f.right=s.left,h._color=0,h.left=s.right,s._color=1,s.left=f,s.right=h,l[d-2]=s,l[d-1]=f,i(h),i(f),i(s),d>=3&&((m=l[d-3]).left===h?m.left=s:m.right=s);break}f._color=1,h.right=n(1,p),h._color=0,d-=1}else if(f.right===s){if(!(p=h.left)||0!==p._color){h._color=0,h.right=f.left,f._color=1,f.left=h,l[d-2]=f,l[d-1]=s,i(h),i(f),d>=3&&((m=l[d-3]).right===h?m.right=f:m.left=f);break}f._color=1,h.left=n(1,p),h._color=0,d-=1}else{var p;if(!(p=h.left)||0!==p._color){var m;f.left=s.right,h._color=0,h.right=s.left,s._color=1,s.right=f,s.left=h,l[d-2]=s,l[d-1]=f,i(h),i(f),i(s),d>=3&&((m=l[d-3]).right===h?m.right=s:m.left=s);break}f._color=1,h.left=n(1,p),h._color=0,d-=1}}return l[0]._color=1,new o(a,l[0])},a.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return c(t,r,this._compare,e,this.root)}},Object.defineProperty(a,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new u(this,e)}}),Object.defineProperty(a,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new u(this,e)}}),a.at=function(e){if(e<0)return new u(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new u(this,[])},a.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<=0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o<0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>0&&(i=n.length),r=o<=0?r.left:r.right}return n.length=i,new u(this,n)},a.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var o=t(e,r.key);n.push(r),o>=0&&(i=n.length),r=o<0?r.left:r.right}return n.length=i,new u(this,n)},a.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},a.remove=function(e){var t=this.find(e);return t?t.remove():this},a.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var d=u.prototype;function f(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function h(e,t){return et?1:0}Object.defineProperty(d,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(d,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),d.clone=function(){return new u(this.tree,this._stack.slice())},d.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var a=new Array(e.length),s=e[e.length-1];a[a.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l)(s=e[l]).left===e[l+1]?a[l]=new t(s._color,s.key,s.value,a[l+1],s.right,s._count):a[l]=new t(s._color,s.key,s.value,s.left,a[l+1],s._count);if((s=a[a.length-1]).left&&s.right){var c=a.length;for(s=s.left;s.right;)a.push(s),s=s.right;var u=a[c-1];for(a.push(new t(s._color,u.key,u.value,s.left,s.right,s._count)),a[c-1].key=s.key,a[c-1].value=s.value,l=a.length-2;l>=c;--l)s=a[l],a[l]=new t(s._color,s.key,s.value,s.left,a[l+1],s._count);a[c-1].left=a[c]}if(0===(s=a[a.length-1])._color){var d=a[a.length-2];for(d.left===s?d.left=null:d.right===s&&(d.right=null),a.pop(),l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((o=e[l-1]).left===t){if((a=o.right).right&&0===a.right._color)return s=(a=o.right=r(a)).right=r(a.right),o.right=a.left,a.left=o,a.right=s,a._color=o._color,t._color=1,o._color=1,s._color=1,i(o),i(a),l>1&&((c=e[l-2]).left===o?c.left=a:c.right=a),void(e[l-1]=a);if(a.left&&0===a.left._color)return s=(a=o.right=r(a)).left=r(a.left),o.right=s.left,a.left=s.right,s.left=o,s.right=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),l>1&&((c=e[l-2]).left===o?c.left=s:c.right=s),void(e[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.right=n(0,a));o.right=n(0,a);continue}a=r(a),o.right=a.left,a.left=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=e[l-2]).left===o?c.left=a:c.right=a),e[l-1]=a,e[l]=o,l+11&&((c=e[l-2]).right===o?c.right=a:c.left=a),void(e[l-1]=a);if(a.right&&0===a.right._color)return s=(a=o.left=r(a)).right=r(a.right),o.left=s.right,a.right=s.left,s.right=o,s.left=a,s._color=o._color,o._color=1,a._color=1,t._color=1,i(o),i(a),i(s),l>1&&((c=e[l-2]).right===o?c.right=s:c.left=s),void(e[l-1]=s);if(1===a._color){if(0===o._color)return o._color=1,void(o.left=n(0,a));o.left=n(0,a);continue}var c;a=r(a),o.left=a.right,a.right=o,a._color=o._color,o._color=0,i(o),i(a),l>1&&((c=e[l-2]).right===o?c.right=a:c.left=a),e[l-1]=a,e[l]=o,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(d,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(d,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),d.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),d.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var a=r.length-2;a>=0;--a)(i=r[a]).left===r[a+1]?n[a]=new t(i._color,i.key,i.value,n[a+1],i.right,i._count):n[a]=new t(i._color,i.key,i.value,i.left,n[a+1],i._count);return new o(this.tree._compare,n[0])},d.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(d,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},7453:function(e,t,r){"use strict";e.exports=function(e,t){var r=new u(e);return r.update(t),r};var n=r(9557),i=r(1681),o=r(1011),a=r(2864),s=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function u(e){this.gl=e,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=o(e)}var d=u.prototype;function f(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,r,n){if(n in e){var i,o=e[n],a=this[n];(t?Array.isArray(o)&&Array.isArray(o[0]):Array.isArray(o))?this[n]=i=[r(o[0]),r(o[1]),r(o[2])]:this[n]=i=[r(o),r(o),r(o)];for(var s=0;s<3;++s)if(i[s]!==a[s])return!0}return!1}e=e||{};var r,o=t.bind(this,!1,Number),a=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(Array.isArray(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,d=!1;if("bounds"in e)for(var f=e.bounds,h=0;h<2;++h)for(var p=0;p<3;++p)f[h][p]!==this.bounds[h][p]&&(d=!0),this.bounds[h][p]=f[h][p];if("ticks"in e)for(r=e.ticks,u=!0,this.autoTicks=!1,h=0;h<3;++h)this.tickSpacing[h]=0;else o("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(h=0;h<3;++h)r[h].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}a("tickEnable"),l("tickFont")&&(u=!0),o("tickSize"),o("tickAngle"),o("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),a("labelEnable"),o("labelSize"),o("labelPad"),c("labelColor"),a("lineEnable"),a("lineMirror"),o("lineWidth"),c("lineColor"),a("lineTickEnable"),a("lineTickMirror"),o("lineTickLength"),o("lineTickWidth"),c("lineTickColor"),a("gridEnable"),o("gridWidth"),c("gridColor"),a("zeroEnable"),c("zeroLineColor"),o("zeroLineWidth"),a("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(m||u)&&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&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var h=[new f,new f,new f];function p(e,t,r,n,i){for(var o=e.primalOffset,a=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var d=o,f=s,h=a,p=l;c&1<0?(h[u]=-1,p[u]=0):(h[u]=0,p[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];d.draw=function(e){e=e||g;for(var t=this.gl,r=e.model||l,n=e.view||l,i=e.projection||l,o=this.bounds,s=e._ortho||!1,u=a(r,n,i,o,s),d=u.cubeEdges,f=u.axis,b=n[12],w=n[13],_=n[14],k=n[15],S=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*w+i[11]*_+i[15]*k)/t.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=d[T],this.lastCubeProps.axis[T]=f[T];var M=h;for(T=0;T<3;++T)p(h[T],T,this.bounds,d,f);t=this.gl;var C,A,E,I=m;for(T=0;T<3;++T)this.backgroundEnable[T]?I[T]=f[T]:I[T]=0;for(this._background.draw(r,n,i,o,I,this.backgroundColor),this._lines.bind(r,n,i,this),T=0;T<3;++T){var O=[0,0,0];f[T]>0?O[T]=o[1][T]:O[T]=o[0][T];for(var P=0;P<2;++P){var R=(T+1+P)%3,L=(T+1+(1^P))%3;this.gridEnable[R]&&this._lines.drawGrid(R,L,this.bounds,O,this.gridColor[R],this.gridWidth[R]*this.pixelRatio)}for(P=0;P<2;++P)R=(T+1+P)%3,L=(T+1+(1^P))%3,this.zeroEnable[L]&&Math.min(o[0][L],o[1][L])<=0&&Math.max(o[0][L],o[1][L])>=0&&this._lines.drawZero(R,L,this.bounds,O,this.zeroLineColor[L],this.zeroLineWidth[L]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,M[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var j=c(v,M[T].primalMinor),D=c(y,M[T].mirrorMinor),z=this.lineTickLength;for(P=0;P<3;++P){var N=S/r[5*P];j[P]*=z[P]*N,D[P]*=z[P]*N}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,M[T].primalOffset,j,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,M[T].mirrorOffset,D,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function F(e){(E=[0,0,0])[e]=1}function B(e,t,r){var n=(e+1)%3,i=(e+2)%3,o=t[n],a=t[i],s=r[n],l=r[i];o>0&&l>0||o>0&&l<0||o<0&&l>0||o<0&&l<0?F(n):(a>0&&s>0||a>0&&s<0||a<0&&s>0||a<0&&s<0)&&F(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),T=0;T<3;++T){var Z=M[T].primalMinor,U=M[T].mirrorMinor,V=c(x,M[T].primalOffset);for(P=0;P<3;++P)this.lineTickEnable[T]&&(V[P]+=S*Z[P]*Math.max(this.lineTickLength[P],0)/r[5*P]);var H=[0,0,0];if(H[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,A=1,"auto"===(C=[this.tickAlign[T],.5,A])[0]?C[0]=0:C[0]=parseInt(""+C[0]),E=[0,0,0],B(T,Z,U),P=0;P<3;++P)V[P]+=S*Z[P]*this.tickPad[P]/r[5*P];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],H,E,C)}if(this.labelEnable[T]){for(A=0,E=[0,0,0],this.labels[T].length>4&&(F(T),A=1),"auto"===(C=[this.labelAlign[T],.5,A])[0]?C[0]=0:C[0]=parseInt(""+C[0]),P=0;P<3;++P)V[P]+=S*Z[P]*this.labelPad[P]/r[5*P];V[T]+=.5*(o[0][T]+o[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],E,C)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(e,t,r){"use strict";e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,d=[0,0,0],f=[0,0,0],h=-1;h<=1;h+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),d[l]=h,f[l]=h;for(var p=-1;p<=1;p+=2){d[c]=p;for(var m=-1;m<=1;m+=2)d[u]=m,t.push(d[0],d[1],d[2],f[0],f[1],f[2]),s+=1}var g=c;c=u,u=g}var v=n(e,new Float32Array(t)),y=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:v,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:e.FLOAT,size:3,offset:12,stride:24}],y),b=o(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new a(e,v,x,b)};var n=r(5827),i=r(2944),o=r(1943).bg;function a(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=a.prototype;s.draw=function(e,t,r,n,i,o){for(var a=!1,s=0;s<3;++s)a=a||i[s];if(a){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:i,colors:o},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()}},2864:function(e,t,r){"use strict";e.exports=function(e,t,r,o,h){i(s,t,e),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=o[x][2];for(var b=0;b<2;++b){u[1]=o[b][1];for(var w=0;w<2;++w)u[0]=o[w][0],f(l[y],u,s),y+=1}}var _=-1;for(x=0;x<8;++x){for(var k=l[x][3],S=0;S<3;++S)c[x][S]=l[x][S]/k;h&&(c[x][2]*=-1),k<0&&(_<0||c[x][2]A&&(_|=1<A&&(_|=1<c[x][1])&&(D=x);var z=-1;for(x=0;x<3;++x)(F=D^1<c[N][0]&&(N=F))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(z^D)]=D&z,B[n.log2(D^N)]=D&N;var Z=7^N;Z===_||Z===j?(Z=7^z,B[n.log2(N^Z)]=Z&N):B[n.log2(z^Z)]=Z&z;var U=g,V=_;for(T=0;T<3;++T)U[T]=V&1< 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}"]);t.f=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=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}"]),u=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}"]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(e,t,r){"use strict";e.exports=function(e,t,r,o,s,l){var u=n(e),d=i(e,[{buffer:u,size:3}]),f=a(e);f.attributes.position.location=0;var h=new c(e,f,u,d);return h.update(t,r,o,s,l),h};var n=r(5827),i=r(2944),o=r(875),a=r(1943).f,s=window||process.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,d=[0,0];u.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=r,i.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,r,n,i){var a=[];function s(e,t,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[t];u||(u=c[t]=function(e,t){try{return o(e,t)}catch(r){return console.warn('error vectorizing text:"'+e+'" error:',r),{cells:[],positions:[]}}}(t,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var d=(n||12)/12,f=u.positions,h=u.cells,p=0,m=h.length;p=0;--v){var y=f[g[v]];a.push(d*y[0],-d*y[1],e)}}for(var c=[0,0,0],u=[0,0,0],d=[0,0,0],f=[0,0,0],h={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){d[p]=a.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,h),f[p]=(a.length/3|0)-d[p],c[p]=a.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var o=Math.pow(10,i),a=Math.round(e*t*o),s=a+"";if(s.indexOf("e")>=0)return s;var l=a/o,c=a%o;a<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(a<0&&(u="-"+u),i){for(var d=""+c;d.length=e[0][i];--a)o.push({x:a*t[i],text:r(t[i],a)});n.push(o)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,o,i),r}function u(e,t){for(var r=n.malloc(e.length,t),i=e.length,o=0;o=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=o(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var d;d=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?d:d.subarray(0,e.length),t),n.free(d)}else if("object"===typeof e&&"number"===typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!==typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.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!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.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=e.createBuffer(),o=new s(e,r,i,0,n);return o.update(t),o}},1140:function(e,t,r){"use strict";var n=r(2858);e.exports=function(e,t){var r=e.positions,i=e.vectors,o={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),o;for(var a=0,s=1/0,l=-1/0,c=1/0,u=-1/0,d=1/0,f=-1/0,h=null,p=null,m=[],g=1/0,v=!1,y=0;ya&&(a=n.length(b)),y){var w=2*n.distance(h,x)/(n.length(p)+n.length(b));w?(g=Math.min(g,w),v=!1):v=!0}v||(h=x,p=b),m.push(b)}var _=[s,c,d],k=[l,u,f];t&&(t[0]=_,t[1]=k),0===a&&(a=1);var S=1/a;isFinite(g)||(g=1),o.vectorScale=g;var T=e.coneSize||.5;e.absoluteConeSize&&(T=e.absoluteConeSize*S),o.coneScale=T,y=0;for(var M=0;y=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(e){this.pickId=e},h.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],o=0;o<3;++o)r[4*n+o]=i[o];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(n&&r&&i){var o=[],a=[],s=[],l=[],d=[];this.cells=r,this.positions=n,this.vectors=i;var f=e.meshColor||[1,1,1,1],h=e.vertexIntensity,p=1/0,m=-1/0;if(h)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},h.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||d,n=e.view||d,i=e.projection||d,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:o,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(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},h.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],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=t),i},h.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(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),u=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),d=a(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var h=i(e),p=i(e),m=i(e),g=i(e),v=i(e),y=new f(e,d,l,u,h,p,v,m,g,o(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:v,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:p,type:e.FLOAT,size:4}]),r.traceType||"cone");return y.update(t),y}},7234:function(e,t,r){var n=r(6832),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"]),o=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"]),a=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}"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(e){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"}},6603:function(e,t,r){var n=r(1950);e.exports=function(e){return n[e]}},3110:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=n(t),a=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=o(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,a,l);return c.update(e),c};var n=r(5827),i=r(2944),o=r(7667),a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,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 c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||a,i=r.projection=e.projection||a;r.model=e.model||a,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var o=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*o+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var d=0;d<3;++d)t.lineWidth(this.lineWidth[d]*this.pixelRatio),r.capSize=this.capSize[d]*u,this.lineCount[d]&&t.drawArrays(t.LINES,this.lineOffset[d],this.lineCount[d]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var o=[0,0,0];o[(n+t)%3]=i,r.push(o)}e[t]=r}return e}();function d(e,t,r,n){for(var i=u[n],o=0;o0&&((h=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,h[0],h[1],h[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,h),a+=2+d(i,h,m,s))}this.lineCount[s]=a-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(e,t,r){"use strict";var n=r(6832),i=r(5158),o=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}"]),a=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(e){return i(e,o,a,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(e,t,r){"use strict";var n=r(8931);e.exports=function(e,t,r,n){i||(i=e.FRAMEBUFFER_UNSUPPORTED,o=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),o=0;ou||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var d=1;if("color"in(n=n||{})){if((d=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(d>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(d>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+d+" draw buffers")}}var f=e.UNSIGNED_BYTE,h=e.getExtension("OES_texture_float");if(n.float&&d>0){if(!h)throw new Error("gl-fbo: Context does not support floating point textures");f=e.FLOAT}else n.preferFloat&&d>0&&h&&(f=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(e,t,r,f,d,m,g,c)};var i,o,a,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function d(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case a: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 f(e,t,r,i,o,a){if(!i)return null;var s=n(e,t,r,o,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,a,e.TEXTURE_2D,s.handle,0),s}function h(e,t,r,n,i){var o=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,o),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,o),o}function p(e,t,r,n,i,o,a,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[a]);var y=r.getExtension("WEBGL_depth_texture");y?p?e.depth=f(r,i,o,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=f(r,i,o,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=h(r,i,o,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=h(r,i,o,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=h(r,i,o,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var o=c(n),a=0;a>8*h&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=e,p.pickOffset=t,p.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,a),r+this.shape[0]*this.shape[1]}}}(),u.pick=function(e,t,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var o=r-n,a=this.xData,s=this.yData;return{object:this,pointId:o,dataCoord:[a[o%this.shape[0]],s[o/this.shape[0]|0]]}},u.update=function(e){var t=(e=e||{}).shape||[0,0],r=e.x||i(t[0]),a=e.y||i(t[1]),s=e.z||new Float32Array(t[0]*t[1]),l=!1!==e.zsmooth;this.xData=r,this.yData=a;var c,u,f,h,p=e.colorLevels||[0],m=e.colorValues||[0,0,0,1],g=p.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=a[0],f=v[2]=r[r.length-1],h=v[3]=a[a.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=a[0]+(a[1]-a[0])/2,f=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,h=v[3]=a[a.length-1]+(a[a.length-1]-a[a.length-2])/2);var y=1/(f-c),x=1/(h-u),b=t[0],w=t[1];this.shape=[b,w];var _=(l?(b-1)*(w-1):b*w)*(d.length>>>1);this.numVertices=_;for(var k=o.mallocUint8(4*_),S=o.mallocFloat32(2*_),T=o.mallocUint8(2*_),M=o.mallocUint32(_),C=0,A=l?b-1:b,E=l?w-1:w,I=0;I 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"}];t.createShader=function(e){return i(e,o,a,null,l)},t.createPickShader=function(e){return i(e,o,s,null,l)}},6086:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=d(t);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 a=f(t);a.attributes.position.location=0,a.attributes.nextPosition.location=1,a.attributes.arcLength.location=2,a.attributes.lineWidth.location=3,a.attributes.color.location=4;for(var s=n(t),l=i(t,[{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}]),u=c(new Array(1024),[256,1,4]),h=0;h<1024;++h)u.data[h]=255;var p=o(t,u);p.wrap=t.REPEAT;var m=new v(t,r,a,s,l,p);return m.update(e),m};var n=r(5827),i=r(2944),o=r(8931),a=new Uint8Array(4),s=new Float32Array(a.buffer),l=r(5070),c=r(5050),u=r(248),d=u.createShader,f=u.createPickShader,h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){for(var r=0,n=0;n<3;++n){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)}function m(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function g(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function v(e,t,r,n,i,o){this.gl=e,this.shader=t,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=o,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||h,view:e.view||h,projection:e.projection||h,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],o=[],a=[],s=0,u=0,d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=e.position||e.positions;if(f){var h=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t0){for(var _=0;_<24;++_)i.push(i[i.length-12]);u+=2,g=!0}continue e}d[0][r]=Math.min(d[0][r],b[r],w[r]),d[1][r]=Math.max(d[1][r],b[r],w[r])}Array.isArray(h[0])?(v=h.length>t-1?h[t-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>t?h[t]:h.length>0?h[h.length-1]:[0,0,0,1]):v=y=h,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=s;if(s+=p(b,w),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],w[0],w[1],w[2],k,x,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(b[0],b[1],b[2],w[0],w[1],w[2],k,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],w[0],w[1],w[2],k,-x,v[0],v[1],v[2],v[3],w[0],w[1],w[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],w[0],w[1],w[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),o.push(s),a.push(f[f.length-1].slice()),this.bounds=d,this.vertexCount=u,this.points=a,this.arcLength=o,"dashes"in e){var S=e.dashes.slice();for(S.unshift(0),t=1;t1.0001)return null;v+=g[d]}return Math.abs(v-1)>.001?null:[f,s(e,g),g]}},2056:function(e,t,r){var n=r(6832),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"]),o=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"]),a=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}"]),c=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}"]),u=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}"]),d=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}"]),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\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}"]),h=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}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:f,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"}]}},8116:function(e,t,r){"use strict";var n=r(5158),i=r(5827),o=r(2944),a=r(8931),s=r(115),l=r(104),c=r(7437),u=r(5050),d=r(9156),f=r(7212),h=r(5306),p=r(2056),m=r(4340),g=p.meshShader,v=p.wireShader,y=p.pointShader,x=p.pickShader,b=p.pointPickShader,w=p.contourShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,x,b,w,k,S,T,M,C){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=o,this.pointPickShader=a,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=d,this.triangleIds=c,this.triangleVAO=h,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=w,this.pointUVs=k,this.pointSizes=S,this.pointIds=b,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=C,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=_,this._view=_,this._projection=_,this._resolution=[1,1]}var S=k.prototype;function T(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}function M(e){var t=n(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function C(e){var t=n(e,x.vertex,x.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function A(e){var t=n(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function E(e){var t=n(e,w.vertex,w.fragment);return t.attributes.position.location=0,t}S.isOpaque=function(){return!this.hasAlpha},S.isTransparent=function(){return this.hasAlpha},S.pickSlots=1,S.setPickBase=function(e){this.pickId=e},S.highlight=function(e){if(e&&this.contourEnable){for(var t=f(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,o=r.length,a=h.mallocFloat32(6*o),s=0,l=0;l0&&((d=this.triShader).bind(),d.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((d=this.lineShader).bind(),d.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((d=this.pointShader).bind(),d.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((d=this.contourShader).bind(),d.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},S.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||_,n=e.view||_,i=e.projection||_,o=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],a=0;a<3;++a)o[0][a]=Math.max(o[0][a],this.clipBounds[0][a]),o[1][a]=Math.min(o[1][a],this.clipBounds[1][a]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:o,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},S.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=new Array(r.length),o=0;ol[S]&&(o.uniforms.dataAxis=e,o.uniforms.screenOffset=t,o.uniforms.color=g[n],o.uniforms.angle=v[n],c.drawArrays(c.TRIANGLES,l[S],l[T]-l[S]))),y[n]&&k&&(t[1^n]-=M*h*x[n],o.uniforms.dataAxis=r,o.uniforms.screenOffset=t,o.uniforms.color=b[n],o.uniforms.angle=w[n],c.drawArrays(c.TRIANGLES,_,k)),t[1^n]=M*u[2+(1^n)]-1,p[n+2]&&(t[1^n]+=M*h*m[n+2],Sl[S]&&(o.uniforms.dataAxis=e,o.uniforms.screenOffset=t,o.uniforms.color=g[n+2],o.uniforms.angle=v[n+2],c.drawArrays(c.TRIANGLES,l[S],l[T]-l[S]))),y[n+2]&&k&&(t[1^n]+=M*h*x[n+2],o.uniforms.dataAxis=r,o.uniforms.screenOffset=t,o.uniforms.color=b[n+2],o.uniforms.angle=w[n+2],c.drawArrays(c.TRIANGLES,_,k))}}(),c.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,o=r.screenBox,a=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)t[u]=2*(a[u]*c-o[u])/(o[2+u]-o[u])-1;n.bind(),n.uniforms.dataAxis=e,n.uniforms.screenOffset=t,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),c.bind=function(){var e=[0,0],t=[0,0],r=[0,0];return function(){var n=this.plot,i=this.shader,o=n._tickBounds,a=n.dataBox,s=n.screenBox,l=n.viewBox;i.bind();for(var c=0;c<2;++c){var u=o[c],d=o[c+2]-u,f=.5*(a[c+2]+a[c]),h=a[c+2]-a[c],p=l[c],m=l[c+2]-p,g=s[c],v=s[c+2]-g;t[c]=2*d/h*m/v,e[c]=2*(u-f)/h*m/v}r[1]=2*n.pixelRatio/(s[3]-s[1]),r[0]=r[1]*(s[3]-s[1])/(s[2]-s[0]),i.uniforms.dataScale=t,i.uniforms.dataShift=e,i.uniforms.textScale=r,this.vbo.bind(),i.attributes.textCoordinate.pointer()}}(),c.update=function(e){var t,r,n,i,a,s=[],l=e.ticks,c=e.bounds;for(a=0;a<2;++a){var u=[Math.floor(s.length/3)],d=[-1/0],f=l[a];for(t=0;t=0){var m=t[p]-n[p]*(t[p+2]-t[p])/(n[p+2]-n[p]);0===p?a.drawLine(m,t[1],m,t[3],h[p],f[p]):a.drawLine(t[0],m,t[2],m,h[p],f[p])}}for(p=0;p=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},c.removeObject=function(e){for(var t=this.objects,r=0;rMath.abs(t))c.rotate(o,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var a=-p.zoomSpeed*i*t/window.innerHeight*(o-c.lastT())/20;c.pan(o,0,0,d*(Math.exp(a)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(8161),i=r(1152),o=r(6145),a=r(6475),s=r(2565),l=r(5233)},8245:function(e,t,r){var n=r(6832),i=r(5158),o=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}"]),a=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(e){return i(e,o,a,null,[{name:"position",type:"vec2"}])}},1059:function(e,t,r){"use strict";var n=r(4296),i=r(7453),o=r(2771),a=r(6496),s=r(2611),l=r(4234),c=r(8126),u=r(6145),d=r(1120),f=r(5268),h=r(8245),p=r(2321)({tablet:!0,featureDetect:!0});function m(){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 g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function v(e){return"boolean"!==typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch(n){return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],x=new m,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),w=h(r),_=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,k={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:_},S=e.axes||{},T=i(r,S);T.enable=!S.disable;var M=e.spikes||{},C=a(r,M),A=[],E=[],I=[],O=[],P=!0,R=!0,L=new Array(16),j=new Array(16),D={view:null,projection:L,model:j,_ortho:!1},z=(R=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),N=e.cameraObject||n(t,k),F={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:N,axes:T,axesPixels:null,spikes:C,bounds:y,objects:A,shape:z,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:v(e.autoResize),autoBounds:v(e.autoBounds),autoScale:!!e.autoScale,autoCenter:v(e.autoCenter),clipToBounds:v(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.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(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,R=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},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)}},B=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function Z(){if(!F._stopped&&F.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),o=0|Math.ceil(n*F.pixelRatio);if(i!==t.width||o!==t.height){t.width=i,t.height=o;var a=t.style;a.position=a.position||"absolute",a.left="0px",a.top="0px",a.width=r+"px",a.height=n+"px",P=!0}}}function U(){for(var e=A.length,t=O.length,n=0;n0&&0===I[t-1];)I.pop(),O.pop().dispose()}function V(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&Z(),window.addEventListener("resize",Z),F.update=function(e){F._stopped||(e=e||{},P=!0,R=!0)},F.add=function(e){F._stopped||(e.axes=T,A.push(e),E.push(-1),P=!0,R=!0,U())},F.remove=function(e){if(!F._stopped){var t=A.indexOf(e);t<0||(A.splice(t,1),E.pop(),P=!0,R=!0,U())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener("resize",Z),t.removeEventListener("webglcontextlost",V),F.mouseListener.enabled=!1,!F.contextLost)){T.dispose(),C.dispose();for(var e=0;ex.distance)continue;for(var c=0;c 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"]),t.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"]),t.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"])},8271:function(e,t,r){"use strict";var n=r(5158),i=r(5827),o=r(5306),a=r(8023);function s(e,t,r,n,i){this.plot=e,this.offsetBuffer=t,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(e,t){var r=e.gl,o=i(r),l=i(r),c=n(r,a.pointVertex,a.pointFragment),u=n(r,a.pickVertex,a.pickFragment),d=new s(e,o,l,c,u);return d.update(t),e.addObject(d),d};var l=s.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(e){var t;function r(t,r){return t in e?e[t]:r}e=e||{},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=e.positions.length>>>1,i=e.positions instanceof Float32Array,a=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=n,s=e.positions,l=i?s:o.mallocFloat32(s.length),c=a?e.idToIndex:o.mallocInt32(n);if(i||l.set(s),!a)for(l.set(s),t=0;t>>1;for(r=0;r=t[0]&&o<=t[2]&&a>=t[1]&&a<=t[3]&&n++}return n}(this.points,a),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(c,.33333)));e[0]=2/s,e[4]=2/l,e[6]=-2*a[0]/s-1,e[7]=-2*a[1]/l-1,this.offsetBuffer.bind(),i.bind(),i.attributes.position.pointer(),i.uniforms.matrix=e,i.uniforms.color=this.color,i.uniforms.borderColor=this.borderColor,i.uniforms.pointCloud=u<5,i.uniforms.pointSize=u,i.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),n&&(t[0]=255&r,t[1]=r>>8&255,t[2]=r>>16&255,t[3]=r>>24&255,this.pickBuffer.bind(),i.attributes.pickId.pointer(o.UNSIGNED_BYTE),i.uniforms.pickOffset=t,this.pickOffset=r);var d=o.getParameter(o.BLEND),f=o.getParameter(o.DITHER);return d&&!this.blend&&o.disable(o.BLEND),f&&o.disable(o.DITHER),o.drawArrays(o.POINTS,0,this.pointCount),d&&!this.blend&&o.enable(o.BLEND),f&&o.enable(o.DITHER),r+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(e,t,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var o=r-n,a=this.points;return{object:this,pointId:o,dataCoord:[a[2*o],a[2*o+1]]}}},6093:function(e){e.exports=function(e,t,r,n){var i,o,a,s,l,c=t[0],u=t[1],d=t[2],f=t[3],h=r[0],p=r[1],m=r[2],g=r[3];return(o=c*h+u*p+d*m+f*g)<0&&(o=-o,h=-h,p=-p,m=-m,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-n)*i)/a,l=Math.sin(n*i)/a):(s=1-n,l=n),e[0]=s*c+l*h,e[1]=s*u+l*p,e[2]=s*d+l*m,e[3]=s*f+l*g,e}},8240:function(e){"use strict";e.exports=function(e){return e||0===e?e.toString():""}},4123:function(e,t,r){"use strict";var n=r(875);e.exports=function(e,t,r){var o=i[t];if(o||(o=i[t]={}),e in o)return o[e];var a={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(e,a);a.triangles=!1;var l,c,u=n(e,a);if(r&&1!==r){for(l=0;l 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}"]),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 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"]),c=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}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],d={vertex:o,fragment:l,attributes:u},f={vertex:a,fragment:l,attributes:u},h={vertex:s,fragment:l,attributes:u},p={vertex:o,fragment:c,attributes:u},m={vertex:a,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return v(e,d)},t.createOrtho=function(e){return v(e,f)},t.createProject=function(e){return v(e,h)},t.createPickPerspective=function(e){return v(e,p)},t.createPickOrtho=function(e){return v(e,m)},t.createPickProject=function(e){return v(e,g)}},2182:function(e,t,r){"use strict";var n=r(3596),i=r(5827),o=r(2944),a=r(5306),s=r(104),l=r(9282),c=r(4123),u=r(8240),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*o,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*o,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*o,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*o,e}function h(e,t,r,n){return f(n,n),f(n,n),f(n,n)}function p(e,t){this.index=e,this.dataCoordinate=this.position=t}function m(e){return!0===e||e>1?1:e}function g(e,t,r,n,i,o,a,s,l,c,u,d){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=o,this.glyphBuffer=a,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=c,this.pickOrthoShader=u,this.pickProjectShader=d,this.points=[],this._selectResult=new p(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(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),a=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),d=i(t),f=i(t),h=i(t),p=i(t),m=o(t,[{buffer:d,size:3,type:t.FLOAT},{buffer:f,size:4,type:t.FLOAT},{buffer:h,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),v=new g(t,r,n,a,d,f,h,p,m,s,c,u);return v.update(e),v};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],w=[0,0,0,1],_=[0,0,0,1],k=d.slice(),S=[0,0,0],T=[[0,0,0],[0,0,0]];function M(e){return e[0]=e[1]=e[2]=0,e}function C(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function A(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}function E(e,t,r,n){var i,o=t.axesProject,a=t.gl,l=e.uniforms,c=r.model||d,u=r.view||d,f=r.projection||d,p=t.axesBounds,m=function(e){for(var t=T,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],y[0]=2/a.drawingBufferWidth,y[1]=2/a.drawingBufferHeight,e.bind(),l.view=u,l.projection=f,l.screenSize=y,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=m,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(o[g]){l.scale=t.projectScale[g],l.opacity=t.projectOpacity[g];for(var v=k,E=0;E<16;++E)v[E]=0;for(E=0;E<4;++E)v[5*E]=1;v[5*g]=0,i[g]<0?v[12+g]=p[0][g]:v[12+g]=p[1][g],s(v,c,v),l.model=v;var I=(g+1)%3,O=(g+2)%3,P=M(x),R=M(b);P[I]=1,R[O]=1;var L=h(0,0,0,C(w,P)),j=h(0,0,0,C(_,R));if(Math.abs(L[1])>Math.abs(j[1])){var D=L;L=j,j=D,D=P,P=R,R=D;var z=I;I=O,O=z}L[0]<0&&(P[I]=-1),j[1]>0&&(R[O]=-1);var N=0,F=0;for(E=0;E<4;++E)N+=Math.pow(c[4*I+E],2),F+=Math.pow(c[4*O+E],2);P[I]/=Math.sqrt(N),R[O]/=Math.sqrt(F),l.axes[0]=P,l.axes[1]=R,l.fragClipBounds[0]=A(S,m[0],g,-1e8),l.fragClipBounds[1]=A(S,m[1],g,1e8),t.vao.bind(),t.vao.draw(a.TRIANGLES,t.vertexCount),t.lineWidth>0&&(a.lineWidth(t.lineWidth*n),t.vao.draw(a.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function O(e,t,r,n,i,o,a){var s=r.gl;if((o===r.projectHasAlpha||a)&&E(t,r,n,i),o===r.hasAlpha||a){e.bind();var l=e.uniforms;l.model=n.model||d,l.view=n.view||d,l.projection=n.projection||d,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=I,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 P(e,t,r,i){var o;o=Array.isArray(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,i=t>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){Array.isArray(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=m(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,o,s=e.position,l=e.font||"normal",c=e.alignment||[0,0];if(2===c.length)i=c[0],o=c[1];else for(i=[],o=[],n=0;n0){var R=0,L=x,j=[0,0,0,1],D=[0,0,0,1],z=Array.isArray(h)&&Array.isArray(h[0]),N=Array.isArray(v)&&Array.isArray(v[0]);e:for(n=0;n0?1-M[0][0]:G<0?1+M[1][0]:1,q*=q>0?1-M[0][1]:q<0?1+M[1][1]:1],X=S.cells||[],K=S.positions||[];for(k=0;k0){var v=r*u;a.drawBox(d-v,f-v,h+v,f+v,o),a.drawBox(d-v,p-v,h+v,p+v,o),a.drawBox(d-v,f-v,d+v,p+v,o),a.drawBox(h-v,f-v,h+v,p+v,o)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(e,t,r){"use strict";e.exports=function(e,t){var r=t[0],o=t[1],a=n(e,r,o,{}),s=i.mallocUint8(r*o*4);return new l(e,a,s)};var n=r(4234),i=r(5306),o=r(5050),a=r(2288).nextPow2;function s(e,t,r,n,i){this.coord=[e,t],this.id=r,this.value=n,this.distance=i}function l(e,t,r){this.gl=e,this.fbo=t,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],r=this.fbo.shape[1];if(r*t*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(a(r*t*4)),o=0;or)for(e=r;et)for(e=t;e=0){for(var k=0|_.type.charAt(_.type.length-1),S=new Array(k),T=0;T=0;)M+=1;w[y]=M}var C=new Array(r.length);function A(){f.program=a.program(h,f._vref,f._fref,b,w);for(var e=0;e=0){if((p=f.charCodeAt(f.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+d+": "+f);s(e,t,h[0],i,p,o,d)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+d+": "+f);var p;if((p=f.charCodeAt(f.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+d+": "+f);l(e,t,h,i,p,o,d)}}}return o};var n=r(9068);function i(e,t,r,n,i,o){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=i,this._constFunc=o}var o=i.prototype;o.pointer=function(e,t,r,n){var i=this,o=i._gl,a=i._locations[i._index];o.vertexAttribPointer(a,i._dimension,e||o.FLOAT,!!t,r||0,n||0),o.enableVertexAttribArray(a)},o.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(o,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var a=[function(e,t,r){return void 0===r.length?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return void 0===r.length?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,i){return void 0===r.length?e.vertexAttrib3f(t,r,n,i):e.vertexAttrib3fv(t,r)},function(e,t,r,n,i,o){return void 0===r.length?e.vertexAttrib4f(t,r,n,i,o):e.vertexAttrib4fv(t,r)}];function s(e,t,r,n,o,s,l){var c=a[o],u=new i(e,t,r,n,o,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(n[r]),c(e,n[r],t),t},get:function(){return u},enumerable:!0})}function l(e,t,r,n,i,o,a){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+v+"fv"](s[d],!1,f);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((v=y.charCodeAt(y.length-1)-48)<2||v>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+v+"iv"](s[d],f);break;case"v":e["uniform"+v+"fv"](s[d],f);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function c(e,t){if("object"!==typeof t)return[[e,t]];var r=[];for(var n in t){var i=t[n],o=e;parseInt(n)+""===n?o+="["+n+"]":o+="."+n,"object"===typeof i?r.push.apply(r,c(o,i)):r.push([o,i])}return r}function u(e,t,n){if("object"===typeof n){var c=d(n);Object.defineProperty(e,t,{get:o(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(e,t,{get:(u=n,function(e,t,r){return e.getUniform(t.program,r[u])}),set:l(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?a(r,!1):a(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return a(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type);var u}function d(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r1){s[0]in o||(o[s[0]]=[]),o=o[s[0]];for(var l=1;l1)for(var l=0;l 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"]),o=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"]),a=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}"]);t.meshShader={vertex:i,fragment:o,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:a,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(e,t,r){"use strict";var n=r(2858),i=r(4020),o=["xyz","xzy","yxz","yzx","zxy","zyx"],a=function(e,t,r,o){for(var a=0,s=0;s0)for(k=0;k<8;k++){var S=(k+1)%8;c.push(f[k],h[k],h[S],h[S],f[S],f[k]),d.push(y,v,v,v,y,y),p.push(m,g,g,g,m,m);var T=c.length;u.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var M=f;f=h,h=M;var C=y;y=v,v=C;var A=m;m=g,g=A}return{positions:c,cells:u,vectors:d,vertexIntensity:p}}(e,r,o,a)})),d=[],f=[],h=[],p=[];for(s=0;st)return r-1}return r},l=function(e,t,r){return er?r:e},c=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nd-1||y>f-1||x>h-1)return n.create();var b,w,_,k,S,T,M=o[0][p],C=o[0][v],A=o[1][m],E=o[1][y],I=o[2][g],O=(a-M)/(C-M),P=(c-A)/(E-A),R=(u-I)/(o[2][x]-I);switch(isFinite(O)||(O=.5),isFinite(P)||(P=.5),isFinite(R)||(R=.5),r.reversedX&&(p=d-1-p,v=d-1-v),r.reversedY&&(m=f-1-m,y=f-1-y),r.reversedZ&&(g=h-1-g,x=h-1-x),r.filled){case 5:S=g,T=x,_=m*h,k=y*h,b=p*h*f,w=v*h*f;break;case 4:S=g,T=x,b=p*h,w=v*h,_=m*h*d,k=y*h*d;break;case 3:_=m,k=y,S=g*f,T=x*f,b=p*f*h,w=v*f*h;break;case 2:_=m,k=y,b=p*f,w=v*f,S=g*f*d,T=x*f*d;break;case 1:b=p,w=v,S=g*d,T=x*d,_=m*d*h,k=y*d*h;break;default:b=p,w=v,_=m*d,k=y*d,S=g*d*f,T=x*d*f}var L=i[b+_+S],j=i[b+_+T],D=i[b+k+S],z=i[b+k+T],N=i[w+_+S],F=i[w+_+T],B=i[w+k+S],Z=i[w+k+T],U=n.create(),V=n.create(),H=n.create(),W=n.create();n.lerp(U,L,N,O),n.lerp(V,j,F,O),n.lerp(H,D,B,O),n.lerp(W,z,Z,O);var G=n.create(),q=n.create();n.lerp(G,U,H,P),n.lerp(q,V,W,P);var Y=n.create();return n.lerp(Y,G,q,R),Y}(t,e,h)},m=e.getDivergence||function(e,t){var r=n.create(),i=1e-4;n.add(r,e,[i,0,0]);var o=p(r);n.subtract(o,o,t),n.scale(o,o,1/i),n.add(r,e,[0,i,0]);var a=p(r);n.subtract(a,a,t),n.scale(a,a,1/i),n.add(r,e,[0,0,i]);var s=p(r);return n.subtract(s,s,t),n.scale(s,s,1/i),n.add(r,o,a),n.add(r,r,s),r},g=[],v=t[0][0],y=t[0][1],x=t[0][2],b=t[1][0],w=t[1][1],_=t[1][2],k=function(e){var t=e[0],r=e[1],n=e[2];return!(tb||rw||n_)},S=10*n.distance(t[0],t[1])/i,T=S*S,M=1,C=0,A=r.length;A>1&&(M=function(e){for(var t=[],r=[],n=[],i={},o={},a={},s=e.length,l=0;lC&&(C=z),j.push(z),g.push({points:O,velocities:P,divergences:j});for(var N=0;N<100*i&&O.lengthT&&n.scale(F,F,S/Math.sqrt(B)),n.add(F,F,I),R=p(F),n.squaredDistance(L,F)-T>-1e-4*T&&(O.push(F),L=F,P.push(R),D=m(F,R),z=n.length(D),isFinite(z)&&z>C&&(C=z),j.push(z)),I=F}}var Z=a(g,e.colormap,C,M);return d?Z.tubeScale=d:(0===C&&(C=1),Z.tubeScale=.5*u*M/C),Z};var u=r(9578),d=r(1140).createMesh;e.exports.createTubeMesh=function(e,t){return d(e,t,{shaders:u,traceType:"streamtube"})}},9054:function(e,t,r){var n=r(5158),i=r(6832),o=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"]),a=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 \u2014 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"]);t.createShader=function(e){var t=n(e,o,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,o,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,a,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},3754:function(e,t,r){"use strict";e.exports=function(e){var t=e.gl,r=y(t),n=b(t),s=x(t),l=w(t),c=i(t),u=o(t,[{buffer:c,size:4,stride:_,offset:0},{buffer:c,size:3,stride:_,offset:16},{buffer:c,size:3,stride:_,offset:28}]),d=i(t),f=o(t,[{buffer:d,size:4,stride:20,offset:0},{buffer:d,size:1,stride:20,offset:16}]),h=i(t),p=o(t,[{buffer:h,size:2,type:t.FLOAT}]),m=a(t,1,C,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new A(t,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,d,f,h,p,[0,0,0]),v={levels:[[],[],[]]};for(var k in e)v[k]=e[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=r(2288),i=r(5827),o=r(2944),a=r(8931),s=r(5306),l=r(9156),c=r(7498),u=r(7382),d=r(5050),f=r(4162),h=r(104),p=r(7437),m=r(5070),g=r(9144),v=r(9054),y=v.createShader,x=v.createContourShader,b=v.createPickShader,w=v.createPickContourShader,_=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],S=[[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(e,t,r,n,i){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=T[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var C=256;function A(e,t,r,n,i,o,a,l,c,u,f,h,p,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=o,this._vao=a,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=h,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=p,this._dynamicVAO=m,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=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(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}var E=A.prototype;E.genColormap=function(e,t){var r=!1,n=u([l({colormap:e,nshades:C,format:"rgba"}).map((function(e,n){var i=t?function(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(e){this.pickId=e};var I=[0,0,0],O={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var r,n,i,o=t.axes&&t.axes.lastCubeProps.axis||I,a=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(a=a||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=O.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]=t.axesBounds[+(o[r]>0)][r],h(l,e.model,l);var c=O.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=e.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return O.showSurface=a,O.showContour=s,O}var R={model:k,view:k,projection:k,inverseModel:k.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},L=k.slice(),j=[1,0,0,0,1,0,0,0,1];function D(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=R;n.model=e.model||k,n.view=e.view||k,n.projection=e.projection||k,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=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var o=n.clipBounds[i],a=0;a<3;++a)o[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=j,n.vertexColor=this.vertexColor;var s=L;for(h(s,n.view,n.model),h(s,n.projection,s),p(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 c=s[12+i];for(a=0;a<3;++a)c+=s[4*a+i]*this.lightPosition[a];n.lightPosition[i]=c/l}var u=P(n,this);if(u.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=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var d=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,d.bind(),d.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(d.uniforms.permutation=T[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),o=n-i,a=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(a),l=a-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var d=u?o:1-o,f=0;f<2;++f)for(var h=i+u,p=s+f,g=d*(f?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(h,p)*g;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=m.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(w-c[x])&&(y[x]+=1)}for(r.index[0]=o<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=a/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},E.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},E.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=B(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=B(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=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 e||"coords"in e){var i=(t.shape[0]+2)*(t.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]=d(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var o=this.shape,a=0;a<2;++a)this._field[2].size>this._field[a].data.length&&(s.freeFloat(this._field[a].data),this._field[a].data=s.mallocFloat(this._field[2].size)),this._field[a]=d(this._field[a].data,[o[0]+2,o[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(a=0;a<2;++a){var c=l[a];for(v=0;v<2;++v)if(c.shape[v]!==o[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[a],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(a=0;a<2;++a){var h=u[a];if((Array.isArray(h)||h.length)&&(h=d(h)),h.shape[0]!==o[a])throw new Error("gl-surface: invalid tick length");var p=d(h.data,o);p.stride[a]=h.stride[0],p.stride[1^a]=0,this.padField(this._field[a],p)}}else{for(a=0;a<2;++a){var m=[0,0];m[a]=1,this._field[a]=d(this._field[a].data,[o[0]+2,o[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var xe=0;xe<5;++xe)J.pop();Z-=1}continue e}J.push(ne[0],ne[1],ae[0],ae[1],ne[2]),Z+=1}}re.push(Z)}this._contourOffsets[Q]=te,this._contourCounts[Q]=re}var be=s.mallocFloat(J.length);for(a=0;as||a[1]<0||a[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(a,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var d,h,g=0;if(2===a.length)g=e.LUMINANCE,a=[a[0],a[1],1],t=n(t.data,a,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==a.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===a[2])g=e.ALPHA;else if(2===a[2])g=e.LUMINANCE_ALPHA;else if(3===a[2])g=e.RGB;else{if(4!==a[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}}c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var v=t.size;if(l)d=0===t.offset&&t.data.length===v?t.data:t.data.subarray(t.offset,t.offset+v);else{var y=[a[2],a[2]*a[0],1];h=o.malloc(v,r);var x=n(h,a,y,0);"float32"!==r&&"float64"!==r||c!==e.UNSIGNED_BYTE?i.assign(x,t):u(x,t),d=h.subarray(0,v)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,g,a[0],a[1],0,g,c,d),l||o.free(h),new f(e,b,a[0],a[1],g,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var a=null,s=null,l=null;function c(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function d(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,r,n,i,o){this.gl=e,this.handle=t,this.format=i,this.type=o,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var a=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return a._wrapS},set:function(e){return a.wrapS=e}},{get:function(){return a._wrapT},set:function(e){return a.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return a._shape[0]},set:function(e){return a.width=e}},{get:function(){return a._shape[1]},set:function(e){return a.height=e}}]),this._shapeVector=l}var h=f.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,i){var o=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var a=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new f(e,a,t,r,n,i)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&a.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==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(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[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),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),h.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},h.setPixels=function(e,t,r,a){var s=this.gl;this.bind(),Array.isArray(t)?(a=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),a=a||0;var l=c(e)?e:e.raw;if(l)this._mipLevels.indexOf(a)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(a)):s.texSubImage2D(s.TEXTURE_2D,a,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>a||r+e.shape[0]>this._shape[0]>>>a||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,a,s,l,c,d){var f=d.dtype,h=d.shape.slice();if(h.length<2||h.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=p(h,d.stride.slice());if("float32"===f?m=e.FLOAT:"float64"===f?(m=e.FLOAT,v=!1,f="float32"):"uint8"===f?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,v=!1,f="uint8"),2===h.length)g=e.LUMINANCE,h=[h[0],h[1],1],d=n(d.data,h,[d.stride[0],d.stride[1],1],d.offset);else{if(3!==h.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===h[2])g=e.ALPHA;else if(2===h[2])g=e.LUMINANCE_ALPHA;else if(3===h[2])g=e.RGB;else{if(4!==h[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}h[2]}if(g!==e.LUMINANCE&&g!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=d.size,x=c.indexOf(a)<0;if(x&&c.push(a),m===l&&v)0===d.offset&&d.data.length===y?x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,d.data):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,d.data):x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,d.data.subarray(d.offset,d.offset+y)):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,d.data.subarray(d.offset,d.offset+y));else{var b;b=l===e.FLOAT?o.mallocFloat32(y):o.mallocUint8(y);var w=n(b,h,[h[2],h[2]*h[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(w,d):i.assign(w,d),x?e.texImage2D(e.TEXTURE_2D,a,s,h[0],h[1],0,s,l,b.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,a,t,r,h[0],h[1],s,l,b.subarray(0,y)),l===e.FLOAT?o.freeFloat32(b):o.freeUint8(b)}}(s,t,r,a,this.format,this.type,this._mipLevels,e)}}},3056:function(e){"use strict";e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(5415),i=r(899),o=r(9305)},8827:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},7622:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},8782:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},8501:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},903:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2];return e[0]=i*l-o*s,e[1]=o*a-n*l,e[2]=n*s-i*a,e}},5981:function(e,t,r){e.exports=r(8288)},8288:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}},8629:function(e,t,r){e.exports=r(7979)},7979:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},9305:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},154:function(e){e.exports=1e-6},4932:function(e,t,r){e.exports=function(e,t){var r=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[2];return Math.abs(r-a)<=n*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(o-l)<=n*Math.max(1,Math.abs(o),Math.abs(l))};var n=r(154)},5777:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},3306:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},7447:function(e,t,r){e.exports=function(e,t,r,i,o,a){var s,l;for(t||(t=3),r||(r=0),l=i?Math.min(i*t+r,e.length):e.length,s=r;s0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}},6660:function(e){e.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},392:function(e){e.exports=function(e,t,r,n){var i=r[1],o=r[2],a=t[1]-i,s=t[2]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=i+a*c-s*l,e[2]=o+a*l+s*c,e}},3222:function(e){e.exports=function(e,t,r,n){var i=r[0],o=r[2],a=t[0]-i,s=t[2]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=i+s*l+a*c,e[1]=t[1],e[2]=o+s*c-a*l,e}},3388:function(e){e.exports=function(e,t,r,n){var i=r[0],o=r[1],a=t[0]-i,s=t[1]-o,l=Math.sin(n),c=Math.cos(n);return e[0]=i+a*c-s*l,e[1]=o+a*l+s*c,e[2]=t[2],e}},1624:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},5685:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},6722:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},831:function(e){e.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},5294:function(e,t,r){e.exports=r(6403)},3303:function(e,t,r){e.exports=r(4337)},6403:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},4337:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},8921:function(e,t,r){e.exports=r(911)},911:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},9908:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2];return e[0]=n*r[0]+i*r[3]+o*r[6],e[1]=n*r[1]+i*r[4]+o*r[7],e[2]=n*r[2]+i*r[5]+o*r[8],e}},3255:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return a=a||1,e[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/a,e[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,e[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,e}},6568:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,d=c*i+l*n-a*o,f=c*o+a*i-s*n,h=-a*n-s*i-l*o;return e[0]=u*c+h*-a+d*-l-f*-s,e[1]=d*c+h*-s+f*-a-u*-l,e[2]=f*c+h*-l+u*-s-d*-a,e}},3433:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},1413:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},3470:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},5313:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},5446:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+o*o)}},205:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},4242:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},5680:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},4020:function(e,t,r){e.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},8177:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}},8746:function(e){e.exports=function(e,t,r,n){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=o+n*(r[1]-o),e[2]=a+n*(r[2]-a),e[3]=s+n*(r[3]-s),e}},3030:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2170:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},746:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},6459:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},381:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=n*a,e[2]=i*a,e[3]=o*a),e}},3770:function(e,t,r){var n=r(381),i=r(5510);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},5510:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4224:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},6453:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},1542:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return r*r+n*n+i*i+o*o}},9037:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},2705:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},6342:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a,e}},5022:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*o-l*i,d=c*i+l*n-a*o,f=c*o+a*i-s*n,h=-a*n-s*i-l*o;return e[0]=u*c+h*-a+d*-l-f*-s,e[1]=d*c+h*-s+f*-a-u*-l,e[2]=f*c+h*-l+u*-s-d*-a,e[3]=t[3],e}},9365:function(e,t,r){var n=r(8096),i=r(7896);e.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return F(r),O+=r.length,(C=C.slice(r.length)).length}}function q(){return/[^a-fA-F0-9]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function Y(){return"."===t||/[eE]/.test(t)?(C.push(t),M=m,r=t,S+1):"x"===t&&1===C.length&&"0"===C[0]?(M=w,C.push(t),r=t,S+1):/[^\d]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function X(){return"f"===t&&(C.push(t),r=t,S+=1),/[eE]/.test(t)?(C.push(t),r=t,S+1):("-"!==t&&"+"!==t||!/[eE]/.test(r))&&/[^\d]/.test(t)?(F(C.join("")),M=l,S):(C.push(t),r=t,S+1)}function K(){if(/[^\d\w_]/.test(t)){var e=C.join("");return M=N[e]?y:z[e]?v:g,F(C.join("")),M=l,S}return C.push(t),r=t,S+1}};var n=r(399),i=r(9746),o=r(9525),a=r(9458),s=r(3585),l=999,c=9999,u=0,d=1,f=2,h=3,p=4,m=5,g=6,v=7,y=8,x=9,b=10,w=11,_=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(e,t,r){var n=r(9525);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),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"])},9525:function(e){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"]},9458:function(e,t,r){var n=r(399);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"])},399:function(e){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"]},9746:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(e,t,r){var n=r(3193);e.exports=function(e,t){var r=n(t),i=[];return i=(i=i.concat(r(e))).concat(r(null))}},6832:function(e){e.exports=function(e){"string"===typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n0;)for(var s=(e=a.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,d=0;d<=r;++d){var f=u[d];i[d]=f<0?t:o[f]}var h=this.orient();if(h>0)return c;c.lastVisited=-n,0===h&&a.push(c)}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,o=this.tuple,a=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[a];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)o[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var d=c[u];if(!(d.lastVisited>=r)){var f=o[u];o[u]=e;var h=this.orient();if(o[u]=f,h<0){s=d;continue e}d.boundary?d.lastVisited=-r:d.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,d=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var f=[];d.length>0;){var h=(t=d.pop()).vertices,p=t.adjacent,m=h.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=p[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=e):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),d.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var w=v.adjacent,_=h.slice(),k=p.slice(),S=new o(_,k,!0);u.push(S);var T=w.indexOf(t);if(!(T<0))for(w[T]=S,k[m]=v,_[g]=-1,k[g]=t,p[g]=S,S.flip(),b=0;b<=n;++b){var M=_[b];if(!(M<0||M===r)){for(var C=new Array(n-1),A=0,E=0;E<=n;++E){var I=_[E];I<0||E===b||(C[A++]=I)}f.push(new a(C,S,b))}}}}}for(f.sort(s),g=0;g+1=0?a[l++]=s[u]:c=1&u;if(c===(1&e)){var d=a[0];a[0]=a[1],a[1]=d}t.push(a)}}return t}},9014:function(e,t,r){"use strict";var n=r(5070);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return e&&0!==e.length?new v(g(e)):new v(null)};var o=i.prototype;function a(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function u(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function f(e,t){for(var r=0;r>1],o=[],a=[],s=[];for(r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=n.ge(this.leftPoints,e,p),i=n.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},o.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){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 o=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=o,i.right=s}a(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?a(this,this.left):a(this,this.right);return 1}for(o=n.ge(this.leftPoints,e,p);othis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:d(this.rightPoints,e,t):f(this.leftPoints,t);var r},o.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?d(this.rightPoints,e,r):f(this.leftPoints,r)};var y=v.prototype;y.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},y.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},y.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},y.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,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([]):[]}})},9560:function(e){"use strict";e.exports=function(e){for(var t=new Array(e),r=0;r13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},3578:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},7191:function(e,t,r){var n=r(4690),i=r(9823),o=r(7332),a=r(7787),s=r(7437),l=r(2142),c={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},u=i(),d=i(),f=[0,0,0,0],h=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,n,i){e[0]=t[0]*n+r[0]*i,e[1]=t[1]*n+r[1]*i,e[2]=t[2]*n+r[2]*i}e.exports=function(e,t,r,i,g,v){if(t||(t=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,e))return!1;if(o(d,u),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(a(d)<1e-8))return!1;var y,x,b=u[3],w=u[7],_=u[11],k=u[12],S=u[13],T=u[14],M=u[15];if(0!==b||0!==w||0!==_){if(f[0]=b,f[1]=w,f[2]=_,f[3]=M,!s(d,d))return!1;l(d,d),function(e,t,r){var n=t[0],i=t[1],o=t[2],a=t[3];e[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*a,e[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*a,e[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*a,e[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*a}(g,f,d)}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=k,t[1]=S,t[2]=T,x=u,(y=h)[0][0]=x[0],y[0][1]=x[1],y[0][2]=x[2],y[1][0]=x[4],y[1][1]=x[5],y[1][2]=x[6],y[2][0]=x[8],y[2][1]=x[9],y[2][2]=x[10],r[0]=c.length(h[0]),c.normalize(h[0],h[0]),i[0]=c.dot(h[0],h[1]),m(h[1],h[1],h[0],1,-i[0]),r[1]=c.length(h[1]),c.normalize(h[1],h[1]),i[0]/=r[1],i[1]=c.dot(h[0],h[2]),m(h[2],h[2],h[0],1,-i[1]),i[2]=c.dot(h[1],h[2]),m(h[2],h[2],h[1],1,-i[2]),r[2]=c.length(h[2]),c.normalize(h[2],h[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,h[1],h[2]),c.dot(h[0],p)<0)for(var C=0;C<3;C++)r[C]*=-1,h[C][0]*=-1,h[C][1]*=-1,h[C][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+h[0][0]-h[1][1]-h[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-h[0][0]+h[1][1]-h[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-h[0][0]-h[1][1]+h[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+h[0][0]+h[1][1]+h[2][2],0)),h[2][1]>h[1][2]&&(v[0]=-v[0]),h[0][2]>h[2][0]&&(v[1]=-v[1]),h[1][0]>h[0][1]&&(v[2]=-v[2]),!0}},4690:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)e[i]=t[i]*n;return!0}},7649:function(e,t,r){var n=r(1868),i=r(1102),o=r(7191),a=r(7787),s=r(1116),l=d(),c=d(),u=d();function d(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,d){if(0===a(t)||0===a(r))return!1;var f=o(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),h=o(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!h)&&(n(u.translate,l.translate,c.translate,d),n(u.skew,l.skew,c.skew,d),n(u.scale,l.scale,c.scale,d),n(u.perspective,l.perspective,c.perspective,d),s(u.quaternion,l.quaternion,c.quaternion,d),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},1102:function(e,t,r){var n={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)},i=(n.create(),n.create());e.exports=function(e,t,r,o,a,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=a[0],e[7]=a[1],e[11]=a[2],e[15]=a[3],n.identity(i),0!==o[2]&&(i[9]=o[2],n.multiply(e,e,i)),0!==o[1]&&(i[9]=0,i[8]=o[1],n.multiply(e,e,i)),0!==o[0]&&(i[8]=0,i[4]=o[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},9298:function(e,t,r){"use strict";var n=r(5070),i=r(7649),o=r(7437),a=r(6109),s=r(7115),l=r(5240),c=r(3012),u=r(998),d=(r(3668),r(899)),f=[0,0,0];function h(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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(e){return new h((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=h.prototype;p.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),a=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)a[c]=s[l++];else{var u=t[r+1]-t[r],f=(l=16*r,this.prevMatrix),h=!0;for(c=0;c<16;++c)f[c]=s[l++];var p=this.nextMatrix;for(c=0;c<16;++c)p[c]=s[l++],h=h&&f[c]===p[c];if(u<1e-6||h)for(c=0;c<16;++c)a[c]=f[c];else i(a,f,p,(e-t[r])/u)}var m=this.computedUp;m[0]=a[1],m[1]=a[5],m[2]=a[9],d(m,m);var g=this.computedInverse;o(g,a);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-a[2+4*c]*b}},p.idle=function(e){if(!(e1&&n(e[a[u-2]],e[a[u-1]],c)<=0;)u-=1,a.pop();for(a.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+a.length-2);for(var d=0,f=(i=0,a.length);i0;--h)r[d++]=s[h];return r};var n=r(417)[3]},6145:function(e,t,r){"use strict";e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==a.alt,a.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==a.shift,a.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==a.control,a.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==a.meta,a.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==o||l(s))&&(r=0|e,i=c||0,o=u||0,t&&t(r,i,o,a))}function u(e){c(0,e)}function d(){(r||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,r=0,a.shift=a.alt=a.control=a.meta=!1,t&&t(0,0,0,a))}function f(e){l(e)&&t&&t(r,i,o,a)}function h(e){0===n.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var n=r(4110)},2565:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,o=e.clientX||0,a=e.clientY||0,s=(i=r)===window||i===document||i===document.body?t:i.getBoundingClientRect();return n[0]=o-s.left,n[1]=a-s.top,n}},4110:function(e,t){"use strict";function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"===typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0"),"function"!==typeof e.vertex&&t("Must specify vertex creation function"),"function"!==typeof e.cell&&t("Must specify cell creation function"),"function"!==typeof e.phase&&t("Must specify phase function");for(var s=e.getters||[],l=new Array(o),c=0;c=0?l[c]=!0:l[c]=!1;return function(e,t,r,o,a,s){var l=[s,a].join(",");return(0,i[l])(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,0,r,l)};var i={"false,0,1":function(e,t,r,n,i){return function(o,a,s,l){var c,u=0|o.shape[0],d=0|o.shape[1],f=o.data,h=0|o.offset,p=0|o.stride[0],m=0|o.stride[1],g=h,v=0|-p,y=0,x=0|-m,b=0,w=-p-m|0,_=0,k=0|p,S=m-p*u|0,T=0,M=0,C=0,A=2*u|0,E=n(A),I=n(A),O=0,P=0,R=-1,L=-1,j=0,D=0|-u,z=0|u,N=0,F=-u-1|0,B=u-1|0,Z=0,U=0,V=0;for(T=0;T0){if(M=1,E[O++]=r(f[g],a,s,l),g+=k,u>0)for(T=1,c=f[g],P=E[O]=r(c,a,s,l),j=E[O+R],N=E[O+D],Z=E[O+F],P===j&&P===N&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,j,N,Z,a,s,l),U=I[O]=C++),O+=1,g+=k,T=2;T0)for(T=1,c=f[g],P=E[O]=r(c,a,s,l),j=E[O+R],N=E[O+D],Z=E[O+F],P===j&&P===N&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,j,N,Z,a,s,l),U=I[O]=C++,Z!==N&&t(I[O+D],U,b,_,N,Z,a,s,l)),O+=1,g+=k,T=2;T0){if(T=1,E[O++]=r(f[g],a,s,l),g+=k,d>0)for(M=1,c=f[g],P=E[O]=r(c,a,s,l),N=E[O+D],j=E[O+R],Z=E[O+F],P===N&&P===j&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,N,j,Z,a,s,l),U=I[O]=C++),O+=1,g+=k,M=2;M0)for(M=1,c=f[g],P=E[O]=r(c,a,s,l),N=E[O+D],j=E[O+R],Z=E[O+F],P===N&&P===j&&P===Z||(y=f[g+v],b=f[g+x],_=f[g+w],e(T,M,c,y,b,_,P,N,j,Z,a,s,l),U=I[O]=C++,Z!==N&&t(I[O+D],U,_,y,Z,N,a,s,l)),O+=1,g+=k,M=2;M2&&o[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,0).lo(1,1).hi(o[0]-2,o[1]-2),e.pick(-1,-1,1).lo(1,1).hi(o[0]-2,o[1]-2)),o[1]>2&&(r(i.pick(0,-1).lo(1).hi(o[1]-2),e.pick(0,-1,1).lo(1).hi(o[1]-2)),t(e.pick(0,-1,0).lo(1).hi(o[1]-2))),o[1]>2&&(r(i.pick(o[0]-1,-1).lo(1).hi(o[1]-2),e.pick(o[0]-1,-1,1).lo(1).hi(o[1]-2)),t(e.pick(o[0]-1,-1,0).lo(1).hi(o[1]-2))),o[0]>2&&(r(i.pick(-1,0).lo(1).hi(o[0]-2),e.pick(-1,0,0).lo(1).hi(o[0]-2)),t(e.pick(-1,0,1).lo(1).hi(o[0]-2))),o[0]>2&&(r(i.pick(-1,o[1]-1).lo(1).hi(o[0]-2),e.pick(-1,o[1]-1,0).lo(1).hi(o[0]-2)),t(e.pick(-1,o[1]-1,1).lo(1).hi(o[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(o[0]-1,0,0,0),e.set(o[0]-1,0,1,0),e.set(0,o[1]-1,0,0),e.set(0,o[1]-1,1,0),e.set(o[0]-1,o[1]-1,0,0),e.set(o[0]-1,o[1]-1,1,0),e}}e.exports=function(e,t,r){return Array.isArray(r)||(r=n(t.dimension,"string"===typeof r?r:"clamp")),0===t.size?e:0===t.dimension?(e.set(0),e):function(e){var t=e.join();if(o=u[t])return o;for(var r=e.length,n=[d,f],i=1;i<=r;++i)n.push(h(i));var o=p.apply(void 0,n);return u[t]=o,o}(r)(e,t)}},3581:function(e){"use strict";function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),n=v+x*d+b*f,a=y+x*p+b*m;var w=0,_=0,k=0,S=h,T=d-u*h,M=f-l*d,C=g,A=p-u*g,E=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=h+m*u+g*c,a=p+m*f+g*d;var v=0,y=0,x=u,b=c-l*u,w=f,_=d-l*f;for(y=0;y0;){y<64?(c=y,y=0):(c=64,y-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+y*f+x*u+b*d,a=v+y*m+x*h+b*p;var w=0,_=0,k=0,S=f,T=u-c*f,M=d-s*u,C=m,A=h-c*m,E=p-s*h;for(k=0;kr;){v=0,y=m-a;t:for(g=0;gb)break t;y+=d,v+=f}for(v=m,y=m-a,g=0;g>1,H=V-B,W=V+B,G=Z,q=H,Y=V,X=W,K=U,$=i+1,J=o-1,Q=!0,ee=0,te=0,re=0,ne=d,ie=t(ne),oe=t(ne);T=l*G,M=l*q,F=s;e:for(S=0;S0){g=G,G=q,q=g;break e}if(re<0)break e;F+=h}T=l*X,M=l*K,F=s;e:for(S=0;S0){g=X,X=K,K=g;break e}if(re<0)break e;F+=h}T=l*G,M=l*Y,F=s;e:for(S=0;S0){g=G,G=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*Y,F=s;e:for(S=0;S0){g=q,q=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*G,M=l*X,F=s;e:for(S=0;S0){g=G,G=X,X=g;break e}if(re<0)break e;F+=h}T=l*Y,M=l*X,F=s;e:for(S=0;S0){g=Y,Y=X,X=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*K,F=s;e:for(S=0;S0){g=q,q=K,K=g;break e}if(re<0)break e;F+=h}T=l*q,M=l*Y,F=s;e:for(S=0;S0){g=q,q=Y,Y=g;break e}if(re<0)break e;F+=h}T=l*X,M=l*K,F=s;e:for(S=0;S0){g=X,X=K,K=g;break e}if(re<0)break e;F+=h}for(T=l*G,M=l*q,C=l*Y,A=l*X,E=l*K,I=l*Z,O=l*V,P=l*U,N=0,F=s,S=0;S0)){if(re<0){for(T=l*b,M=l*$,C=l*J,F=s,S=0;S0)for(;;){for(w=s+J*l,N=0,S=0;S0)){for(w=s+J*l,N=0,S=0;SU){e:for(;;){for(w=s+$*l,N=0,F=s,S=0;S1&&n?s(r,n[0],n[1]):s(r)}(e,t,l);return n(l,c)}},8729:function(e,t,r){"use strict";var n=r(8139),i={};e.exports=function(e){var t=e.order,r=e.dtype,o=[t,r].join(":"),a=i[o];return a||(i[o]=a=n(t,r)),a(e),e}},5050:function(e,t,r){var n=r(4780),i="undefined"!==typeof Float64Array;function o(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,r=new Array(t.length);for(e=0;e=0&&(t+=o*(r=0|e),i-=r),new n(this.data,i,o,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,o=0,a=Math.ceil;return"number"===typeof e&&((o=0|e)<0?(i+=r*(t-1),t=a(-t/o)):t=a(t/o),r*=o),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"===typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,o){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|o}var i=n.prototype;return i.dtype=e,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(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,o=this.shape[0],a=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"===typeof e&&e>=0&&(r+=s*(i=0|e),o-=i),"number"===typeof t&&t>=0&&(r+=l*(i=0|t),a-=i),new n(this.data,o,a,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],o=this.stride[0],a=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"===typeof e&&((l=0|e)<0?(s+=o*(r-1),r=c(-r/l)):r=c(r/l),o*=l),"number"===typeof t&&((l=0|t)<0?(s+=a*(i-1),i=c(-i/l)):i=c(i/l),a*=l),new n(this.data,r,i,o,a,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],o=this.offset;return"number"===typeof e&&e>=0?o=o+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"===typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,o)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,o,a,s){this.data=e,this.shape=[t,r,n],this.stride=[i,o,a],this.offset=0|s}var i=n.prototype;return i.dtype=e,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 e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,o=0,a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],d=this.stride[2];return"number"===typeof e&&e>=0&&(i+=c*(o=0|e),a-=o),"number"===typeof t&&t>=0&&(i+=u*(o=0|t),s-=o),"number"===typeof r&&r>=0&&(i+=d*(o=0|r),l-=o),new n(this.data,a,s,l,c,u,d,i)},i.step=function(e,t,r){var i=this.shape[0],o=this.shape[1],a=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,d=0,f=Math.ceil;return"number"===typeof e&&((d=0|e)<0?(u+=s*(i-1),i=f(-i/d)):i=f(i/d),s*=d),"number"===typeof t&&((d=0|t)<0?(u+=l*(o-1),o=f(-o/d)):o=f(o/d),l*=d),"number"===typeof r&&((d=0|r)<0?(u+=c*(a-1),a=f(-a/d)):a=f(a/d),c*=d),new n(this.data,i,o,a,s,l,c,u)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,o=this.stride;return new n(this.data,i[e],i[t],i[r],o[e],o[t],o[r],this.offset)},i.pick=function(e,r,n){var i=[],o=[],a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof n&&n>=0?a=a+this.stride[2]*n|0:(i.push(this.shape[2]),o.push(this.stride[2])),(0,t[i.length+1])(this.data,i,o,a)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,o,a,s,l,c){this.data=e,this.shape=[t,r,n,i],this.stride=[o,a,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=e,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(t,r,n,i,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=o},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"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(e,t,r,i){var o=this.offset,a=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],d=this.stride[0],f=this.stride[1],h=this.stride[2],p=this.stride[3];return"number"===typeof e&&e>=0&&(o+=d*(a=0|e),s-=a),"number"===typeof t&&t>=0&&(o+=f*(a=0|t),l-=a),"number"===typeof r&&r>=0&&(o+=h*(a=0|r),c-=a),"number"===typeof i&&i>=0&&(o+=p*(a=0|i),u-=a),new n(this.data,s,l,c,u,d,f,h,p,o)},i.step=function(e,t,r,i){var o=this.shape[0],a=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],d=this.stride[2],f=this.stride[3],h=this.offset,p=0,m=Math.ceil;return"number"===typeof e&&((p=0|e)<0?(h+=c*(o-1),o=m(-o/p)):o=m(o/p),c*=p),"number"===typeof t&&((p=0|t)<0?(h+=u*(a-1),a=m(-a/p)):a=m(a/p),u*=p),"number"===typeof r&&((p=0|r)<0?(h+=d*(s-1),s=m(-s/p)):s=m(s/p),d*=p),"number"===typeof i&&((p=0|i)<0?(h+=f*(l-1),l=m(-l/p)):l=m(l/p),f*=p),new n(this.data,o,a,s,l,c,u,d,f,h)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var o=this.shape,a=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],a[e],a[t],a[r],a[i],this.offset)},i.pick=function(e,r,n,i){var o=[],a=[],s=this.offset;return"number"===typeof e&&e>=0?s=s+this.stride[0]*e|0:(o.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof r&&r>=0?s=s+this.stride[1]*r|0:(o.push(this.shape[1]),a.push(this.stride[1])),"number"===typeof n&&n>=0?s=s+this.stride[2]*n|0:(o.push(this.shape[2]),a.push(this.stride[2])),"number"===typeof i&&i>=0?s=s+this.stride[3]*i|0:(o.push(this.shape[3]),a.push(this.stride[3])),(0,t[o.length+1])(this.data,o,a,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,o,a,s,l,c,u,d){this.data=e,this.shape=[t,r,n,i,o],this.stride=[a,s,l,c,u],this.offset=0|d}var i=n.prototype;return i.dtype=e,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(t,r,n,i,o,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]=a},i.get=function(t,r,n,i,o){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*o]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,o){return new n(this.data,"number"!==typeof e||e<0?this.shape[0]:0|e,"number"!==typeof t||t<0?this.shape[1]:0|t,"number"!==typeof r||r<0?this.shape[2]:0|r,"number"!==typeof i||i<0?this.shape[3]:0|i,"number"!==typeof o||o<0?this.shape[4]:0|o,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,o){var a=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.shape[3],f=this.shape[4],h=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"===typeof e&&e>=0&&(a+=h*(s=0|e),l-=s),"number"===typeof t&&t>=0&&(a+=p*(s=0|t),c-=s),"number"===typeof r&&r>=0&&(a+=m*(s=0|r),u-=s),"number"===typeof i&&i>=0&&(a+=g*(s=0|i),d-=s),"number"===typeof o&&o>=0&&(a+=v*(s=0|o),f-=s),new n(this.data,l,c,u,d,f,h,p,m,g,v,a)},i.step=function(e,t,r,i,o){var a=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],d=this.stride[0],f=this.stride[1],h=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,v=0,y=Math.ceil;return"number"===typeof e&&((v=0|e)<0?(g+=d*(a-1),a=y(-a/v)):a=y(a/v),d*=v),"number"===typeof t&&((v=0|t)<0?(g+=f*(s-1),s=y(-s/v)):s=y(s/v),f*=v),"number"===typeof r&&((v=0|r)<0?(g+=h*(l-1),l=y(-l/v)):l=y(l/v),h*=v),"number"===typeof i&&((v=0|i)<0?(g+=p*(c-1),c=y(-c/v)):c=y(c/v),p*=v),"number"===typeof o&&((v=0|o)<0?(g+=m*(u-1),u=y(-u/v)):u=y(u/v),m*=v),new n(this.data,a,s,l,c,u,d,f,h,p,m,g)},i.transpose=function(e,t,r,i,o){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,o=void 0===o?4:0|o;var a=this.shape,s=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],a[o],s[e],s[t],s[r],s[i],s[o],this.offset)},i.pick=function(e,r,n,i,o){var a=[],s=[],l=this.offset;return"number"===typeof e&&e>=0?l=l+this.stride[0]*e|0:(a.push(this.shape[0]),s.push(this.stride[0])),"number"===typeof r&&r>=0?l=l+this.stride[1]*r|0:(a.push(this.shape[1]),s.push(this.stride[1])),"number"===typeof n&&n>=0?l=l+this.stride[2]*n|0:(a.push(this.shape[2]),s.push(this.stride[2])),"number"===typeof i&&i>=0?l=l+this.stride[3]*i|0:(a.push(this.shape[3]),s.push(this.stride[3])),"number"===typeof o&&o>=0?l=l+this.stride[4]*o|0:(a.push(this.shape[4]),s.push(this.stride[4])),(0,t[a.length+1])(this.data,a,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(e,t){var r=-1===t?"T":String(t),n=s[r];return-1===t?n(e):0===t?n(e,c[e][0]):n(e,c[e],a)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,o){if(void 0===e)return(0,c.array[0])([]);"number"===typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var a=t.length;if(void 0===r){r=new Array(a);for(var s=a-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===o)for(o=0,s=0;s>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var r=n.hi(e),a=n.lo(e);return t>e===e>0?a===o?(r+=1,a=0):a+=1:0===a?(a=o,r-=1):a-=1,n.pack(a,r)}},115:function(e,t){t.vertexNormals=function(e,t,r){for(var n=t.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao){var b=i[c],w=1/Math.sqrt(g*y);for(x=0;x<3;++x){var _=(x+1)%3,k=(x+2)%3;b[x]+=w*(v[_]*m[k]-v[k]*m[_])}}}for(a=0;ao)for(w=1/Math.sqrt(S),x=0;x<3;++x)b[x]*=w;else for(x=0;x<3;++x)b[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=new Array(n),o=void 0===r?1e-6:r,a=0;ao?1/Math.sqrt(h):0,c=0;c<3;++c)f[c]*=h;i[a]=f}return i}},567:function(e){"use strict";e.exports=function(e,t,r,n,i,o,a,s,l,c){var u=t+o+c;if(d>0){var d=Math.sqrt(u+1);e[0]=.5*(a-l)/d,e[1]=.5*(s-n)/d,e[2]=.5*(r-o)/d,e[3]=.5*d}else{var f=Math.max(t,o,c);d=Math.sqrt(2*f-u+1),t>=f?(e[0]=.5*d,e[1]=.5*(i+r)/d,e[2]=.5*(s+n)/d,e[3]=.5*(a-l)/d):o>=f?(e[0]=.5*(r+i)/d,e[1]=.5*d,e[2]=.5*(l+a)/d,e[3]=.5*(s-n)/d):(e[0]=.5*(n+s)/d,e[1]=.5*(a+l)/d,e[2]=.5*d,e[3]=.5*(r-i)/d)}return e}},7774:function(e,t,r){"use strict";e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var i=new d(r,t,Math.log(n));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var n=r(8444),i=r(3012),o=r(5950),a=r(7437),s=r(567);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function u(e,t){var r=t[0],n=t[1],i=t[2],o=t[3],a=c(r,n,i,o);a>1e-6?(e[0]=r/a,e[1]=n/a,e[2]=i/a,e[3]=o/a):(e[0]=e[1]=e[2]=0,e[3]=1)}function d(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),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 f=d.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;o(r,t);var n=this.computedCenter,i=this.computedEye,a=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],a[0]=r[1],a[1]=r[5],a[2]=r[9];for(var l=0;l<3;++l){for(var c=0,d=0;d<3;++d)c+=r[l+4*d]*i[d];r[12+l]=-c}},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},f.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},f.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},f.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,o=i[1],a=i[5],s=i[9],c=l(o,a,s);o/=c,a/=c,s/=c;var u=i[0],d=i[4],f=i[8],h=u*o+d*a+f*s,p=l(u-=o*h,d-=a*h,f-=s*h);u/=p,d/=p,f/=p;var m=i[2],g=i[6],v=i[10],y=m*o+g*a+v*s,x=m*u+g*d+v*f,b=l(m-=y*o+x*u,g-=y*a+x*d,v-=y*s+x*f);m/=b,g/=b,v/=b;var w=u*t+o*r,_=d*t+a*r,k=f*t+s*r;this.center.move(e,w,_,k);var S=Math.exp(this.computedRadius[0]);S=Math.max(1e-4,S+n),this.radius.set(e,Math.log(S))},f.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var i=this.computedMatrix,o=i[0],a=i[4],s=i[8],u=i[1],d=i[5],f=i[9],h=i[2],p=i[6],m=i[10],g=t*o+r*u,v=t*a+r*d,y=t*s+r*f,x=-(p*y-m*v),b=-(m*g-h*y),w=-(h*v-p*g),_=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(w,2))),k=c(x,b,w,_);k>1e-6?(x/=k,b/=k,w/=k,_/=k):(x=b=w=0,_=1);var S=this.computedRotation,T=S[0],M=S[1],C=S[2],A=S[3],E=T*_+A*x+M*w-C*b,I=M*_+A*b+C*x-T*w,O=C*_+A*w+T*b-M*x,P=A*_-T*x-M*b-C*w;if(n){x=h,b=p,w=m;var R=Math.sin(n)/l(x,b,w);x*=R,b*=R,w*=R,P=P*(_=Math.cos(t))-(E=E*_+P*x+I*w-O*b)*x-(I=I*_+P*b+O*x-E*w)*b-(O=O*_+P*w+E*b-I*x)*w}var L=c(E,I,O,P);L>1e-6?(E/=L,I/=L,O/=L,P/=L):(E=I=O=0,P=1),this.rotation.set(e,E,I,O,P)},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var o=this.computedMatrix;i(o,t,r,n);var a=this.computedRotation;s(a,o[0],o[1],o[2],o[4],o[5],o[6],o[8],o[9],o[10]),u(a,a),this.rotation.set(e,a[0],a[1],a[2],a[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},f.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},f.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;a(n,t);var i=n[15];if(Math.abs(i)>1e-6){var o=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(e);var d=Math.exp(this.computedRadius[0]);this.center.set(e,o-n[2]*d,l-n[6]*d,c-n[10]*d),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.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]}},f.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},4930:function(e,t,r){"use strict";var n=r(6184);e.exports=function(e,t,r){return n(r="undefined"!==typeof r?r+"":" ",t)+e}},4405:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=0|t.length,i=e.length,o=[new Array(r),new Array(r)],a=0;a0){a=o[u][r][0],l=u;break}s=a[1^l];for(var d=0;d<2;++d)for(var f=o[d][r],h=0;h0&&(a=p,s=m,l=d)}return i||a&&c(a,l),s}function d(e,r){var i=o[r][e][0],a=[e];c(i,r);for(var s=i[1^r];;){for(;s!==e;)a.push(s),s=u(a[a.length-2],s,!1);if(o[0][e].length+o[1][e].length===0)break;var l=a[a.length-1],d=e,f=a[1],h=u(l,d,!0);if(n(t[l],t[d],t[f],t[h])<0)break;a.push(e),s=u(l,d)}return a}function f(e,t){return t[1]===t[t.length-1]}for(a=0;a0;){o[0][a].length;var m=d(a,h);f(0,m)?p.push.apply(p,m):(p.length>0&&l.push(p),p=m)}p.length>0&&l.push(p)}return l};var n=r(9398)},3959:function(e,t,r){"use strict";e.exports=function(e,t){for(var r=n(e,t.length),i=new Array(t.length),o=new Array(t.length),a=[],s=0;s0;){i[h=a.pop()]=!1;var c=r[h];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(h=0;h0;){var N=D.pop(),F=A[N];l(F,(function(e,t){return e-t}));var B,Z=F.length,U=z[N];for(0===U&&(B=[V=p[N]]),h=0;h=0||(z[H]=1^U,D.push(H),0===U&&(j(V=p[H])||(V.reverse(),B.push(V))))}0===U&&r.push(B)}return r};var n=r(8348),i=r(4166),o=r(211),a=r(9660),s=r(9662),l=r(1215),c=r(3959);function u(e,t){for(var r=new Array(e),n=0;n0&&t[i]===r[0]))return 1;o=e[i-1]}for(var s=1;o;){var l=o.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,o=o.right}else if(c>0)o=o.left;else{if(!(c<0))return 0;s=1,o=o.right}}return s}}(v.slabs,v.coordinates);return 0===o.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(o),y)};var n=r(417)[3],i=r(4385),o=r(9014),a=r(5070);function s(){return!0}function l(e){for(var t={},r=0;r=c?(S=1,y=c+2*f+p):y=f*(S=-f/c)+p):(S=0,h>=0?(T=0,y=p):-h>=d?(T=1,y=d+2*h+p):y=h*(T=-h/d)+p);else if(T<0)T=0,f>=0?(S=0,y=p):-f>=c?(S=1,y=c+2*f+p):y=f*(S=-f/c)+p;else{var M=1/k;y=(S*=M)*(c*S+u*(T*=M)+2*f)+T*(u*S+d*T+2*h)+p}else S<0?(b=d+h)>(x=u+f)?(w=b-x)>=(_=c-2*u+d)?(S=1,T=0,y=c+2*f+p):y=(S=w/_)*(c*S+u*(T=1-S)+2*f)+T*(u*S+d*T+2*h)+p:(S=0,b<=0?(T=1,y=d+2*h+p):h>=0?(T=0,y=p):y=h*(T=-h/d)+p):T<0?(b=c+f)>(x=u+h)?(w=b-x)>=(_=c-2*u+d)?(T=1,S=0,y=d+2*h+p):y=(S=1-(T=w/_))*(c*S+u*T+2*f)+T*(u*S+d*T+2*h)+p:(T=0,b<=0?(S=1,y=c+2*f+p):f>=0?(S=0,y=p):y=f*(S=-f/c)+p):(w=d+h-u-f)<=0?(S=0,T=1,y=d+2*h+p):w>=(_=c-2*u+d)?(S=1,T=0,y=c+2*f+p):y=(S=w/_)*(c*S+u*(T=1-S)+2*f)+T*(u*S+d*T+2*h)+p;var C=1-S-T;for(l=0;l0){var c=e[r-1];if(0===n(s,c)&&o(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},6184:function(e){"use strict";var t,r="";e.exports=function(e,n){if("string"!==typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||"undefined"===typeof t)t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,i)}},8161:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(e){"use strict";e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var o=r;(l=(s=e[i])-((r=o+s)-o))&&(e[--n]=r,r=l)}var a=0;for(i=n;i0){if(o<=0)return a;n=i+o}else{if(!(i<0))return a;if(o>=0)return a;n=-(i+o)}var s=33306690738754716e-32*n;return a>=s||a<=-s?a:d(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],o=t[0]-n[0],a=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],c=r[1]-n[1],u=e[2]-n[2],d=t[2]-n[2],h=r[2]-n[2],p=o*c,m=a*l,g=a*s,v=i*c,y=i*l,x=o*s,b=u*(p-m)+d*(g-v)+h*(y-x),w=7771561172376103e-31*((Math.abs(p)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(d)+(Math.abs(y)+Math.abs(x))*Math.abs(h));return b>w||-b>w?b:f(e,t,r,n)}];function p(e){var t=h[e.length];return t||(t=h[e.length]=u(e.length)),t.apply(void 0,e)}function m(e,t,r,n,i,o,a){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return o(t,r,s,l);case 5:return a(t,r,s,l,c)}for(var u=new Array(arguments.length),d=0;d0&&a>0||o<0&&a<0)return!1;var s=n(r,e,t),l=n(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==o||0!==a||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var o=e[i],a=t[i],s=Math.min(o,a),l=Math.max(o,a),c=r[i],u=n[i],d=Math.min(c,u);if(Math.max(c,u)=n?(i=d,(l+=1)=n?(i=d,(l+=1)>1,c=t[2*l+1];if(c===o)return l;o>1,c=t[2*l+1];if(c===o)return l;o>1,c=t[2*l+1];if(c===o)return l;o0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6656:function(e,t,r){"use strict";var n=r(9392),i=r(9521);function o(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var o=e[0]+e[1],a=t[0]+t[1];if(s=o+e[2]-(a+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],o)-i(c+t[2],a);default:var u=e.slice(0);u.sort();var d=t.slice(0);d.sort();for(var f=0;f>1,s=o(e[a],t);s<=0?(0===s&&(i=a),r=a+1):s>0&&(n=a-1)}return i}function u(e,t){for(var r=new Array(e.length),i=0,a=r.length;i=e.length||0!==o(e[g],s)););}return r}function d(e,t){if(t<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=d,t.boundary=function(e){for(var t=[],r=0,n=e.length;r>1:(e>>1)-1}function x(e){for(var t=v(e);;){var r=t,n=2*e+1,i=2*(e+1),o=e;if(n0;){var r=y(e);if(!(r>=0&&t0){var e=S[0];return g(0,M-1),M-=1,x(0),e}return-1}function _(e,t){var r=S[e];return c[r]===t?e:(c[r]=-1/0,b(e),w(),c[r]=t,b((M+=1)-1))}function k(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&_(T[t],m(t)),T[r]>=0&&_(T[r],m(r))}}var S=[],T=new Array(o);for(d=0;d>1;d>=0;--d)x(d);for(;;){var C=w();if(C<0||c[C]>r)break;k(C)}var A=[];for(d=0;d=0&&r>=0&&t!==r){var n=T[t],i=T[r];n!==i&&I.push([n,i])}})),i.unique(i.normalize(I)),{positions:A,edges:I}};var n=r(417),i=r(6656)},6638:function(e,t,r){"use strict";e.exports=function(e,t){var r,o,a,s;if(t[0][0]t[1][0]))return i(t,e);r=t[1],o=t[0]}if(e[0][0]e[1][0]))return-i(e,t);a=e[1],s=e[0]}var l=n(r,o,s),c=n(r,o,a);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,a,o),c=n(s,a,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return o[0]-s[0]};var n=r(417);function i(e,t){var r,i,o,a;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}r=t[1],i=t[0]}e[0][1]0)if(t[0]!==a[1][0])r=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==a[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function d(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=c(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?a(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var d=this.horizontal[t];if(d.length>0){var f=n.ge(d,e[1],l);if(f=d.length)return i;h=d[f]}}if(h.start)if(s){var p=o(s[0],s[1],[e[0],h.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=h.index)}else i=h.index;else h.y!==e[1]&&(i=h.index)}}}return i}},4670:function(e,t,r){"use strict";var n=r(9130),i=r(9662);function o(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function a(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var o=1-i,a=e.length,s=new Array(a),l=0;l0||i>0&&u<0){var d=a(s,u,l,i);r.push(d),n.push(d.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(e,t){for(var r=[],n=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(e,t){for(var r=[],n=o(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(a(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},8974:function(e,t,r){var n;!function(){"use strict";var i={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 o(e){return function(e,t){var r,n,a,s,l,c,u,d,f,h=1,p=e.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||d&&!s.sign?f="":(f=d?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?f+r+l:"0"===c?f+l+r:l+f+r)}return m}(function(e){if(s[e])return s[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))a.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=o,t.vsprintf=a,"undefined"!==typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(t,r,t,e))||(e.exports=n))}()},4162:function(e,t,r){"use strict";e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,o=new Array(n),a=new Array(n),s=0;sn|0},vertex:function(e,t,r,n,i,o,a,s,l,c,u,d,f){var h=(a<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==h&&15!==h)switch(h){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(n+r-2*f)/(r-n),t-.25-.25*(i+r-2*f)/(r-i)]);break;case 2:u.push([e-.75-.25*(-n-r+2*f)/(n-r),t-.25-.25*(o+n-2*f)/(n-o)]);break;case 3:u.push([e-.5,t-.5-.5*(i+r+o+n-4*f)/(r-i+n-o)]);break;case 4:u.push([e-.25-.25*(o+i-2*f)/(i-o),t-.75-.25*(-i-r+2*f)/(i-r)]);break;case 5:u.push([e-.5-.5*(n+r+o+i-4*f)/(r-n+i-o),t-.5]);break;case 6:u.push([e-.5-.25*(-n-r+o+i)/(n-r+i-o),t-.5-.25*(-i-r+o+n)/(i-r+n-o)]);break;case 7:u.push([e-.75-.25*(o+i-2*f)/(i-o),t-.75-.25*(o+n-2*f)/(n-o)]);break;case 8:u.push([e-.75-.25*(-o-i+2*f)/(o-i),t-.75-.25*(-o-n+2*f)/(o-n)]);break;case 9:u.push([e-.5-.25*(n+r+-o-i)/(r-n+o-i),t-.5-.25*(i+r+-o-n)/(r-i+o-n)]);break;case 10:u.push([e-.5-.5*(-n-r-o-i+4*f)/(n-r+o-i),t-.5]);break;case 11:u.push([e-.25-.25*(-o-i+2*f)/(o-i),t-.75-.25*(i+r-2*f)/(r-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-r-o-n+4*f)/(i-r+o-n)]);break;case 13:u.push([e-.75-.25*(n+r-2*f)/(r-n),t-.25-.25*(-o-n+2*f)/(o-n)]);break;case 14:u.push([e-.25-.25*(-n-r+2*f)/(n-r),t-.25-.25*(-i-r+2*f)/(i-r)])}},cell:function(e,t,r,n,i,o,a,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},a={}},6946:function(e,t,r){"use strict";e.exports=function e(t,r,i){i=i||{};var a=o[t];a||(a=o[t]={" ":{data:new Float32Array(0),shape:.2}});var s=a[r];if(!s)if(r.length<=1||!/\d/.test(r))s=a[r]=function(e){for(var t=e.cells,r=e.positions,n=new Float32Array(6*t.length),i=0,o=0,a=0;a0&&(d+=.02);var h=new Float32Array(u),p=0,m=-.5*d;for(f=0;fMath.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var o=0,a=0,l=0;l<3;++l)o+=e[l]*e[l],a+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=a/o*e[l];return s(i,i),i}function f(e,t,r,i,o,a,s,l){this.center=n(r),this.up=n(i),this.right=n(o),this.radius=n([a]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var h=f.prototype;h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,o=0;o<3;++o)i+=t[o]*r[o],n+=t[o]*t[o];var l=Math.sqrt(n),u=0;for(o=0;o<3;++o)r[o]-=t[o]*i/n,u+=r[o]*r[o],t[o]/=l;var d=Math.sqrt(u);for(o=0;o<3;++o)r[o]/=d;var f=this.computedToward;a(f,t,r),s(f,f);var h=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),x=Math.sin(m),b=this.computedCenter,w=g*y,_=v*y,k=x,S=-g*x,T=-v*x,M=y,C=this.computedEye,A=this.computedMatrix;for(o=0;o<3;++o){var E=w*r[o]+_*f[o]+k*t[o];A[4*o+1]=S*r[o]+T*f[o]+M*t[o],A[4*o+2]=E,A[4*o+3]=0}var I=A[1],O=A[5],P=A[9],R=A[2],L=A[6],j=A[10],D=O*j-P*L,z=P*R-I*j,N=I*L-O*R,F=c(D,z,N);for(D/=F,z/=F,N/=F,A[0]=D,A[4]=z,A[8]=N,o=0;o<3;++o)C[o]=b[o]+A[2+4*o]*h;for(o=0;o<3;++o){u=0;for(var B=0;B<3;++B)u+=A[o+4*B]*C[B];A[12+o]=-u}A[15]=1},h.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var p=[0,0,0];h.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var a=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=a[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(o(i,i,n,p),c=0;c<3;++c)a[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,a[0],a[1],a[2]),this.right.set(e,s[0],s[1],s[2])}},h.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,o=(Math.exp(this.computedRadius[0]),i[1]),a=i[5],s=i[9],l=c(o,a,s);o/=l,a/=l,s/=l;var u=i[0],d=i[4],f=i[8],h=u*o+d*a+f*s,p=c(u-=o*h,d-=a*h,f-=s*h),m=(u/=p)*t+o*r,g=(d/=p)*t+a*r,v=(f/=p)*t+s*r;this.center.move(e,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(e,Math.log(y))},h.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},h.setMatrix=function(e,t,r,n){var o=1;"number"===typeof r&&(o=0|r),(o<0||o>3)&&(o=1);var a=(o+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[o],l=t[o+4],d=t[o+8];if(n){var f=Math.abs(s),h=Math.abs(l),p=Math.abs(d),m=Math.max(f,h,p);f===m?(s=s<0?-1:1,l=d=0):p===m?(d=d<0?-1:1,s=l=0):(l=l<0?-1:1,s=d=0)}else{var g=c(s,l,d);s/=g,l/=g,d/=g}var v,y,x=t[a],b=t[a+4],w=t[a+8],_=x*s+b*l+w*d,k=c(x-=s*_,b-=l*_,w-=d*_),S=l*(w/=k)-d*(b/=k),T=d*(x/=k)-s*w,M=s*b-l*x,C=c(S,T,M);if(S/=C,T/=C,M/=C,this.center.jump(e,H,W,G),this.radius.idle(e),this.up.jump(e,s,l,d),this.right.jump(e,x,b,w),2===o){var A=t[1],E=t[5],I=t[9],O=A*x+E*b+I*w,P=A*S+E*T+I*M;v=D<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,O)}else{var R=t[2],L=t[6],j=t[10],D=R*s+L*l+j*d,z=R*x+L*b+j*w,N=R*S+L*T+j*M;v=Math.asin(u(D)),y=Math.atan2(N,z)}this.angle.jump(e,y,v),this.recalcMatrix(e);var F=t[2],B=t[6],Z=t[10],U=this.computedMatrix;i(U,t);var V=U[15],H=U[12]/V,W=U[13]/V,G=U[14]/V,q=Math.exp(this.computedRadius[0]);this.center.jump(e,H-F*q,W-B*q,G-Z*q)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},h.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],o=n[1],a=n[2],s=c(i,o,a);if(!(s<1e-6)){i/=s,o/=s,a/=s;var l=t[0]-r[0],d=t[1]-r[1],f=t[2]-r[2],h=c(l,d,f);if(!(h<1e-6)){l/=h,d/=h,f/=h;var p=this.computedRight,m=p[0],g=p[1],v=p[2],y=i*m+o*g+a*v,x=c(m-=y*i,g-=y*o,v-=y*a);if(!(x<.01&&(x=c(m=o*f-a*d,g=a*l-i*f,v=i*d-o*l))<1e-6)){m/=x,g/=x,v/=x,this.up.set(e,i,o,a),this.right.set(e,m,g,v),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(h));var b=o*v-a*g,w=a*m-i*v,_=i*g-o*m,k=c(b,w,_),S=i*l+o*d+a*f,T=m*l+g*d+v*f,M=(b/=k)*l+(w/=k)*d+(_/=k)*f,C=Math.asin(u(S)),A=Math.atan2(M,T),E=this.angle._state,I=E[E.length-1],O=E[E.length-2];I%=2*Math.PI;var P=Math.abs(I+2*Math.PI-A),R=Math.abs(I-A),L=Math.abs(I-2*Math.PI-A);P0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(h(e),0,e)}function m(e){return new Uint16Array(h(2*e),0,e)}function g(e){return new Uint32Array(h(4*e),0,e)}function v(e){return new Int8Array(h(e),0,e)}function y(e){return new Int16Array(h(2*e),0,e)}function x(e){return new Int32Array(h(4*e),0,e)}function b(e){return new Float32Array(h(4*e),0,e)}function w(e){return new Float64Array(h(8*e),0,e)}function _(e){return a?new Uint8ClampedArray(h(e),0,e):p(e)}function k(e){return s?new BigUint64Array(h(8*e),0,e):null}function S(e){return l?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=d[t];return r.length>0?r.pop():new o(e)}t.free=function(e){if(o.isBuffer(e))d[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){f(e.buffer)},t.freeArrayBuffer=f,t.freeBuffer=function(e){d[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return v(e);case"int16":return y(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return w(e);case"uint8_clamped":return _(e);case"bigint64":return S(e);case"biguint64":return k(e);case"buffer":return M(e);case"data":case"dataview":return T(e);default:return null}return null},t.mallocArrayBuffer=h,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=v,t.mallocInt16=y,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=w,t.mallocUint8Clamped=_,t.mallocBigUint64=k,t.mallocBigInt64=S,t.mallocDataView=T,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,d[e].length=0}},1731:function(e){"use strict";function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(o=n.size),n.lineSpacing&&n.lineSpacing>0&&(a=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,o+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",_(function(e,t,r,n,o,a){r=r.replace(/\n/g,""),r=!0===a.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(k=0;k-1?parseInt(e[1+i]):0,l=o>-1?parseInt(r[1+o]):0;s!==l&&(n=n.replace(z(),"?px "),M*=Math.pow(.75,l-s),n=n.replace("?px ",z())),T+=.25*E*(l-s)}if(!0===a.superscripts){var c=e.indexOf(p),d=r.indexOf(p),h=c>-1?parseInt(e[1+c]):0,m=d>-1?parseInt(r[1+d]):0;h!==m&&(n=n.replace(z(),"?px "),M*=Math.pow(.75,m-h),n=n.replace("?px ",z())),T-=.25*E*(m-h)}if(!0===a.bolds){var g=e.indexOf(u)>-1,y=r.indexOf(u)>-1;!g&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!y&&(n=n.replace("bold ",""))}if(!0===a.italics){var x=e.indexOf(f)>-1,b=r.indexOf(f)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}t.font=n}for(_=0;_",o="",a=i.length,s=o.length,l=t[0]===p||t[0]===v,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(o,c+a))&&!(u<=c);){for(var d=c;d=u)n[d]=null,r=r.substr(0,d)+" "+r.substr(d+1);else if(null!==n[d]){var f=n[d].indexOf(t[0]);-1===f?n[d]+=t:l&&(n[d]=n[d].substr(0,f+1)+(1+parseInt(n[d][f+1]))+n[d].substr(f+2))}var h=c+a,m=r.substr(h,u-h).indexOf(i);c=-1!==m?m:u+s}return n}function b(e,t){var r=n(e,128);return t?o(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function w(e,t,r,n){var i=b(e,n),o=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=e.length,l=0;l=0?t[o]:i}))},has___:{value:x((function(t){var n=y(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:x((function(n,i){var o,a=y(n);return a?a[r]=i:(o=e.indexOf(n))>=0?t[o]=i:(o=e.length,t[o]=i,e[o]=n),this}))},delete___:{value:x((function(n){var i,o,a=y(n);return a?r in a&&delete a[r]:!((i=e.indexOf(n))<0)&&(o=e.length-1,e[i]=void 0,t[i]=t[o],e[i]=e[o],e.length=o,t.length=o,!0)}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"===typeof r?function(){function n(){this instanceof m||b();var e,n=new r,i=void 0,o=!1;return e=t?function(e,t){return n.set(e,t),n.has(e)||(i||(i=new m),i.set(e,t)),this}:function(e,t){if(o)try{n.set(e,t)}catch(r){i||(i=new m),i.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:x((function(e,t){return i?n.has(e)?n.get(e):i.get___(e,t):n.get(e,t)}))},has___:{value:x((function(e){return n.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!n.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");o=!0}))}})}t&&"undefined"!==typeof Proxy&&(Proxy=void 0),n.prototype=m.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=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function v(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return a(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(r){return}}}function x(e){return e.prototype=null,Object.freeze(e)}function b(){h||"undefined"===typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},9222:function(e,t,r){var n=r(7178);e.exports=function(){var e={};return function(t){if(("object"!==typeof t||null===t)&&"function"!==typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},7178:function(e){e.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},4037:function(e,t,r){var n=r(9222);e.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},6183:function(e){"use strict";var t=function(){return function(e,t,r,n,i,o){var a=e[0],s=r[0],l=[0],c=s;n|=0;var u=0,d=s;for(u=0;u=0!==h>=0&&i.push(l[0]+.5+.5*(f+h)/(f-h)),n+=d,++l[0]}}};e.exports=function(e){return r={funcName:e.funcName},function(e){var t={};return function(r,n,i){var o=r.dtype,a=r.order,s=[o,a.join()].join(),l=t[s];return l||(t[s]=l=e([o,a])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(t.bind(void 0,r));var r}({funcName:"zeroCrossings"})},9584:function(e,t,r){"use strict";e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(6183)},6601:function(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}return r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},r(7386)}()},e.exports=t()},84672:e=>{e.exports=function(e,t,r,n){var i=e[0],o=e[1],a=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var s=n-r,l=0,c=s-1;lo!==h>o&&i<(f-u)*(o-d)/(h-d)+u&&(a=!a)}return a}},82070:(e,t,r)=>{var n,i=r(41725),o=r(44877),a=r(24780),s=r(42987),l=r(64652),c=r(20812),u=!1,d=o();function f(e,t,r){var i=n.segments(e),o=n.segments(t),a=r(n.combine(i,o));return n.polygon(a)}n={buildLog:function(e){return!0===e?u=i():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=a(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:a(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,d,e)},union:function(e,t){return f(e,t,n.selectUnion)},intersect:function(e,t){return f(e,t,n.selectIntersect)},difference:function(e,t){return f(e,t,n.selectDifference)},differenceRev:function(e,t){return f(e,t,n.selectDifferenceRev)},xor:function(e,t){return f(e,t,n.selectXor)}},"object"===typeof window&&(window.PolyBool=n),e.exports=n},41725:e=>{e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},44877:e=>{e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],o=r[1],a=n[0],s=n[1],l=t[0];return(a-i)*(t[1]-o)-(s-o)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],o=n[0]-r[0],a=t[0]-r[0],s=n[1]-r[1],l=a*o+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=a-i>e&&(o-c)*(i-u)/(a-u)+c-n>e&&(s=!s),o=c,a=u}return s}};return t}},20812:e=>{var t={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),i=1;i{var n=r(74122);e.exports=function(e,t,r){function i(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var o=n.create();function a(e,r){o.insertBefore(e,(function(n){return function(e,r,n,i,o,a){var s=t.pointsCompare(r,o);return 0!==s?s:t.pointsSame(n,a)?0:e!==i?e?1:-1:t.pointAboveOrOnLine(n,i?o:a,i?a:o)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function s(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return a(r,e.end),r}(e,t);return function(e,t,r){var i=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=i,a(i,e.pt)}(r,e,t),r}function l(e,t){var n=i(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,a(e.other,e.pt)}(e,t),s(n,e.primary)}function c(i,a){var s=n.create();function c(e){return s.findTransition((function(r){return function(e,r){var n=e.seg.start,i=e.seg.end,o=r.seg.start,a=r.seg.end;return t.pointsCollinear(n,o,a)?t.pointsCollinear(i,o,a)||t.pointAboveOrOnLine(i,o,a)?1:-1:t.pointAboveOrOnLine(n,o,a)?1:-1}(e,r.ev)>0}))}function u(e,n){var i=e.seg,o=n.seg,a=i.start,s=i.end,c=o.start,u=o.end;r&&r.checkIntersection(i,o);var d=t.linesIntersect(a,s,c,u);if(!1===d){if(!t.pointsCollinear(a,s,c))return!1;if(t.pointsSame(a,u)||t.pointsSame(s,c))return!1;var f=t.pointsSame(a,c),h=t.pointsSame(s,u);if(f&&h)return n;var p=!f&&t.pointBetween(a,c,u),m=!h&&t.pointBetween(s,c,u);if(f)return m?l(n,s):l(e,u),n;p&&(h||(m?l(n,s):l(e,u)),l(n,a))}else 0===d.alongA&&(-1===d.alongB?l(e,c):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,u)),0===d.alongB&&(-1===d.alongA?l(n,a):0===d.alongA?l(n,d.pt):1===d.alongA&&l(n,s));return!1}for(var d=[];!o.isEmpty();){var f=o.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var h=c(f),p=h.before?h.before.ev:null,m=h.after?h.after.ev:null;function g(){if(p){var e=u(f,p);if(e)return e}return!!m&&u(f,m)}r&&r.tempStatus(f.seg,!!p&&p.seg,!!m&&m.seg);var v,y=g();if(y){var x;if(e)(x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(y.seg),f.other.remove(),f.remove()}if(o.getHead()!==f){r&&r.rewind(f.seg);continue}if(e)x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:i,f.seg.myFill.above=x?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill)v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?a:i,f.seg.otherFill={above:v,below:v};r&&r.status(f.seg,!!p&&p.seg,!!m&&m.seg),f.other.status=h.insert(n.node({ev:f}))}else{var b=f.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)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!f.primary){var w=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=w}d.push(f.seg)}o.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,i,o,a=e[e.length-1],l=0;l{e.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},42987:e=>{e.exports=function(e,t,r){var n=[],i=[];return e.forEach((function(e){var o=e.start,a=e.end;if(t.pointsSame(o,a))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u{function t(e,t,r){var n=[];return e.forEach((function(e){var i=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[i]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[i],below:2===t[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(e,r){return t(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return t(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return t(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return t(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return t(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};e.exports=r},52023:(e,t,r)=>{"use strict";var n=r(13841).Transform,i=r(85944);function o(){n.call(this,{readableObjectMode:!0})}function a(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}o.prototype=Object.create(n.prototype),o.prototype.constructor=o,i(o.prototype),t.OF=function(e,t,r){for(var n=t,i=0;i{"use strict";function t(e,t){var r=new Error(e);return r.code=t,r}function r(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function n(e,r,n){this.input=e.subarray(r,n),this.start=r;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==i&&"MM\0*"!==i)throw t("invalid TIFF signature","EBADDATA");this.big_endian="M"===i[0]}n.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},n.prototype.read_uint16=function(e){var r=this.input;if(e+2>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?256*r[e]+r[e+1]:r[e]+256*r[e+1]},n.prototype.read_uint32=function(e){var r=this.input;if(e+4>r.length)throw t("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[e]+65536*r[e+1]+256*r[e+2]+r[e+3]:r[e]+256*r[e+1]+65536*r[e+2]+16777216*r[e+3]},n.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},n.prototype.exif_format_length=function(e){switch(e){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}},n.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return r=this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return r=this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},n.prototype.scan_ifd=function(e,n,i){var o=this.read_uint16(n);n+=2;for(var a=0;athis.input.length)throw t("unexpected EOF","EBADDATA");for(var p=[],m=f,g=0;g0&&(this.ifds_to_read.push({id:s,offset:p[0]}),h=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:n+this.start,data_length:d,data_offset:f+this.start,value:p,is_subifd_link:h}))return void(this.aborted=!0);n+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(n)})},e.exports.ExifParser=n,e.exports.get_orientation=function(e){var t=0;try{return new n(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch(r){return-1}}},64736:(e,t,r)=>{"use strict";var n=r(52023).n8,i=r(52023).Ag;function o(e,t){if(e.length<4+t)return null;var r=i(e,t);return e.length>4&15,i=15&e[4],o=e[5]>>4&15,a=n(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t})),r=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>r.height||t.width===r.height&&t.height>r.width?t:r}(t.sizes),n=1;t.transforms.forEach((function(e){var t={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"===e.type&&(n=0===e.value?r[n]:t[n=t[n=r[n]]]),"irot"===e.type)for(var i=0;i{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=r(64736),s=r(51193),l=n("ftyp");e.exports=function(e){if(i(e,4,l)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var n,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){n=u.data;break}}if(n){var d=a.readSizeFromMeta(n);if(d){var f={width:d.width,height:d.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(d.variants.length>1&&(f.variants=d.variants),d.orientation&&(f.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=e.length){var h=o(e,d.exif_location.offset),p=e.slice(d.exif_location.offset+h+4,d.exif_location.offset+d.exif_location.length),m=s.get_orientation(p);m>0&&(f.orientation=m)}return f}}}}}}},82184:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=n("BM");e.exports=function(e){if(!(e.length<26)&&i(e,0,a))return{width:o(e,18),height:o(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},94857:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=n("GIF87a"),s=n("GIF89a");e.exports=function(e){if(!(e.length<10)&&(i(e,0,a)||i(e,0,s)))return{width:o(e,6),height:o(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},35234:(e,t,r)=>{"use strict";var n=r(52023).mP;e.exports=function(e){var t=n(e,0),r=n(e,2),i=n(e,4);if(0===t&&1===r&&i){for(var o=[],a={width:0,height:0},s=0;sa.width||c>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:o,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},65731:(e,t,r)=>{"use strict";var n=r(52023).n8,i=r(52023).eG,o=r(52023).OF,a=r(51193),s=i("Exif\0\0");e.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var r,i,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(e.length-t<2)return;r=n(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&r>=10&&o(e,t,s)&&(i=a.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=i),c}t+=r}}},91229:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=n("\x89PNG\r\n\x1a\n"),s=n("IHDR");e.exports=function(e){if(!(e.length<24)&&i(e,0,a)&&i(e,12,s))return{width:o(e,16),height:o(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},56211:(e,t,r)=>{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).Ag,a=n("8BPS\0\x01");e.exports=function(e){if(!(e.length<22)&&i(e,0,a))return{width:o(e,18),height:o(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},2223:e=>{"use strict";function t(e){return"number"===typeof e&&isFinite(e)&&e>0}var r=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(e){return s.test(e)?e.match(s)[0]:"px"}e.exports=function(e){if(function(e){var t,r=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);r{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=r(52023).n8,s=r(52023).nm,l=r(52023).Ag,c=n("II*\0"),u=n("MM\0*");function d(e,t,r){return r?a(e,t):o(e,t)}function f(e,t,r){return r?l(e,t):s(e,t)}function h(e,t,r){var n=d(e,t+2,r);return 1!==f(e,t+4,r)||3!==n&&4!==n?null:3===n?d(e,t+8,r):f(e,t+8,r)}e.exports=function(e){if(!(e.length<8)&&(i(e,0,c)||i(e,0,u))){var t=77===e[0],r=f(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var o=12*d(e,n+0,t);if(!(o<=0)&&(n+=2,!(e.length-n{"use strict";var n=r(52023).eG,i=r(52023).OF,o=r(52023).mP,a=r(52023).nm,s=r(51193),l=n("RIFF"),c=n("WEBP");function u(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&o(e,t+6),height:16383&o(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function d(e,t){if(47===e[t]){var r=a(e,t+1);return{width:1+(16383&r),height:1+(r>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function f(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?r=r||u(e,t+8):"VP8L"===h&&p>=9?r=r||d(e,t+8):"VP8X"===h&&p>=10?r=r||f(e,t+8):"EXIF"===h&&(n=s.get_orientation(e.slice(t+8,t+8+p)),t=1/0),t+=8+p}else t++;if(r)return n>0&&(r.orientation=n),r}}}},80075:(e,t,r)=>{"use strict";e.exports={avif:r(43211),bmp:r(82184),gif:r(94857),ico:r(35234),jpeg:r(65731),png:r(91229),psd:r(56211),svg:r(2223),tiff:r(73126),webp:r(36992)}},2132:(e,t,r)=>{"use strict";var n=r(80075);e.exports=function(e){return function(e){for(var t=Object.keys(n),r=0;r{"use strict";var n=r(79165);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==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 t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},75192:(e,t,r)=>{e.exports=r(61729)()},79165:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5609:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},74776:(e,t,r)=>{"use strict";var n=r(2816),i=r(67668),o=r(5609);e.exports={formats:o,parse:i,stringify:n}},67668:(e,t,r)=>{"use strict";var n=r(49837),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&null!==(s=a.exec(o))&&d=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(u,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var r,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,d),h=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=n.combine(c[m],g):c[m]=g}return c}(e,r):e,d=r.plainObjects?Object.create(null):{},f=Object.keys(u),h=0;h{"use strict";var n=r(73170),i=r(49837),o=r(5609),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,f=o.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},m=function e(t,r,o,a,s,c,d,f,m,g,v,y,x,b,w,_){for(var k,S=t,T=_,M=0,C=!1;void 0!==(T=T.get(p))&&!C;){var A=T.get(t);if(M+=1,"undefined"!==typeof A){if(A===M)throw new RangeError("Cyclic object value");C=!0}"undefined"===typeof T.get(p)&&(M=0)}if("function"===typeof f?S=f(r,S):S instanceof Date?S=v(S):"comma"===o&&l(S)&&(S=i.maybeMap(S,(function(e){return e instanceof Date?v(e):e}))),null===S){if(s)return d&&!b?d(r,h.encoder,w,"key",y):r;S=""}if("string"===typeof(k=S)||"number"===typeof k||"boolean"===typeof k||"symbol"===typeof k||"bigint"===typeof k||i.isBuffer(S))return d?[x(b?r:d(r,h.encoder,w,"key",y))+"="+x(d(S,h.encoder,w,"value",y))]:[x(r)+"="+x(String(S))];var E,I=[];if("undefined"===typeof S)return I;if("comma"===o&&l(S))b&&d&&(S=i.maybeMap(S,d)),E=[{value:S.length>0?S.join(",")||null:void 0}];else if(l(f))E=f;else{var O=Object.keys(S);E=m?O.sort(m):O}for(var P=a&&l(S)&&1===S.length?r+"[]":r,R=0;R0?w+b:""}},49837:(e,t,r)=>{"use strict";var n=r(5609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===n.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{for(var n=r(3460),i="undefined"===typeof window?r.g:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c{"use strict";var n=r(47313),i=r(62224);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r