package.dist.plotly-strict.min.js Maven / Gradle / Ivy
Show all versions of plotly.js Show documentation
/**
* plotly.js (strict - minified) v2.34.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly-strict.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Plotly=e():t.Plotly=e()}(self,(function(){return function(){var t={79288:function(t,e,r){"use strict";var n=r(3400),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},86712:function(t,e,r){"use strict";t.exports=r(84224)},37240:function(t,e,r){"use strict";t.exports=r(51132)},29744:function(t,e,r){"use strict";t.exports=r(94456)},29352:function(t,e,r){"use strict";t.exports=r(67244)},96144:function(t,e,r){"use strict";t.exports=r(97776)},53219:function(t,e,r){"use strict";t.exports=r(61712)},4624:function(t,e,r){"use strict";t.exports=r(95856)},54543:function(t,e,r){"use strict";t.exports=r(54272)},45e3:function(t,e,r){"use strict";t.exports=r(85404)},62300:function(t,e,r){"use strict";t.exports=r(26048)},6920:function(t,e,r){"use strict";t.exports=r(66240)},10264:function(t,e,r){"use strict";t.exports=r(40448)},32016:function(t,e,r){"use strict";t.exports=r(64884)},27528:function(t,e,r){"use strict";t.exports=r(15088)},75556:function(t,e,r){"use strict";t.exports=r(76744)},39204:function(t,e,r){"use strict";t.exports=r(94704)},73996:function(t,e,r){"use strict";t.exports=r(62396)},16489:function(t,e,r){"use strict";t.exports=r(32028)},5e3:function(t,e,r){"use strict";t.exports=r(81932)},77280:function(t,e,r){"use strict";t.exports=r(45536)},33992:function(t,e,r){"use strict";t.exports=r(42600)},17600:function(t,e,r){"use strict";t.exports=r(21536)},49116:function(t,e,r){"use strict";t.exports=r(65664)},46808:function(t,e,r){"use strict";t.exports=r(29044)},36168:function(t,e,r){"use strict";t.exports=r(48928)},64456:function(t,e,r){"use strict";var n=r(32016);n.register([r(37240),r(29352),r(5e3),r(33992),r(17600),r(49116),r(6920),r(67484),r(79440),r(39204),r(83096),r(36168),r(20260),r(63560),r(65832),r(46808),r(73996),r(48824),r(89904),r(25120),r(13752),r(4340),r(62300),r(29800),r(8363),r(54543),r(75819),r(15680),r(32140),r(77280),r(19960),r(56816),r(70192),r(45e3),r(27528),r(84764),r(3920),r(50248),r(4624),r(69967),r(10264),r(86152),r(53219),r(81604),r(58400),r(29744),r(89336),r(86712),r(75556),r(16489),r(97312),r(96144)]),t.exports=n},3920:function(t,e,r){"use strict";t.exports=r(43480)},25120:function(t,e,r){"use strict";t.exports=r(6296)},4340:function(t,e,r){"use strict";t.exports=r(7404)},86152:function(t,e,r){"use strict";t.exports=r(65456)},56816:function(t,e,r){"use strict";t.exports=r(22020)},20260:function(t,e,r){"use strict";t.exports=r(75792)},32140:function(t,e,r){"use strict";t.exports=r(156)},84764:function(t,e,r){"use strict";t.exports=r(45499)},48824:function(t,e,r){"use strict";t.exports=r(3296)},69967:function(t,e,r){"use strict";t.exports=r(4184)},8363:function(t,e,r){"use strict";t.exports=r(36952)},70192:function(t,e,r){"use strict";t.exports=r(11572)},81604:function(t,e,r){"use strict";t.exports=r(76924)},89336:function(t,e,r){"use strict";t.exports=r(95443)},67484:function(t,e,r){"use strict";t.exports=r(34864)},97312:function(t,e,r){"use strict";t.exports=r(76272)},29800:function(t,e,r){"use strict";t.exports=r(15436)},63560:function(t,e,r){"use strict";t.exports=r(5621)},89904:function(t,e,r){"use strict";t.exports=r(91304)},50248:function(t,e,r){"use strict";t.exports=r(41724)},65832:function(t,e,r){"use strict";t.exports=r(31991)},79440:function(t,e,r){"use strict";t.exports=r(22869)},13752:function(t,e,r){"use strict";t.exports=r(67776)},83096:function(t,e,r){"use strict";t.exports=r(95952)},72196:function(t){"use strict";t.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}]},13916:function(t,e,r){"use strict";var n=r(72196),i=r(25376),a=r(33816),o=r(31780).templatedArray;r(36208),t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(23816).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,v=p-h,y=3*t.startarrowsize*t.arrowwidth||0,g=y+h,m=y-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,g),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else g=s?g+s:g,m=s?m-s:m,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,g),ppadminus:Math.max(f,v,m)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},42300:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(31780).arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,X=["x","y"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(Y=!0):Y=!0),K=it._offset+it.r2p(e[et]),Q=.5}else{var dt="domain"===ht;"x"===et?($=e[et],K=dt?it._offset+it._length*$:K=A.l+A.w*$):($=1-e[et],K=dt?it._offset+it._length*$:K=A.t+A.h*$),Q=e.showarrow?.5:$}if(e.showarrow){ft.head=K;var vt=e["a"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var yt=l.getRefType(nt);"domain"===yt?("y"===et&&(vt=1-vt),ft.tail=it._offset+it._length*vt):"paper"===yt?"y"===et?(vt=1-vt,ft.tail=A.t+A.h*vt):ft.tail=A.l+A.w*vt:ft.tail=it._offset+it.r2p(vt),J=tt}else ft.tail=K+vt,J=tt+vt;ft.text=ft.tail+tt;var gt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,gt-1)),"pixel"===nt){var mt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-gt;mt>0?(ft.tail+=mt,ft.text+=mt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else J=tt=lt*q(Q,ct),ft.text=K+tt;ft.text+=ut,tt+=ut,J+=ut,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(k-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(D-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?z:null,t);else{var wt=N+_t-v.top,At=N+bt-v.left;G.call(h.positionText,At,wt).call(u.setClipUrl,U?z:null,t)}V.select("rect").call(u.setRect,N,N,k,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(L.x.text-B/2),Math.round(L.y.text-H/2)),P.attr({transform:"rotate("+C+","+L.x.text+","+L.y.text+")"});var Tt,kt=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=L.x.head,f=L.y.head,h=L.x.tail+r,p=L.y.tail+n,v=L.x.text+r,b=L.y.text+n,_=o.rotationXYMatrix(C,v,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),z=+j.attr("width"),I=+j.attr("height"),D=v-.5*z,F=D+z,B=b-.5*I,N=B+I,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(k);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=O.append("g").style({opacity:c.opacity(H)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(c.stroke,c.rgb(H));if(y(W,q,e),T.annotationPosition&&W.node().parentNode&&!a){var Y=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));Y+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var K,J,$=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(p-X),transform:s(Y,X)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");d.init({element:$.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);K=t.x,J=t.y,g&&g.autorange&&M(g._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(K,J),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S("x",m(g,t,"x",A,e)),S("y",m(x,r,"y",A,e)),e.axref===e.xref&&S("ax",m(g,t,"ax",A,e)),e.ayref===e.yref&&S("ay",m(x,r,"ay",A,e)),G.attr("transform",s(t,r)),P.attr({transform:"rotate("+C+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&kt(0,0),I&&d.init({element:R.node(),gd:t,prepFn:function(){Tt=P.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",m(g,t,"ax",A,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",m(x,r,"ay",A.w,e)):S("ay",e.ay+r),kt(t,r);else{if(a)return;var i,o;if(g)i=m(g,t,"x",A,e);else{var l=e._xsize/A.w,c=e.x+(e._xshift-e.xshift)/A.w-l/2;i=d.align(c+t/A.w,l,0,1,e.xanchor)}if(x)o=m(x,r,"y",A,e);else{var u=e._ysize/A.h,f=e.y-(e._yshift+e.yshift)/A.h-u/2;o=d.align(f-r/A.h,u,0,1,e.yanchor)}S("x",i),S("y",o),g&&x||(n=d.getCursor(g?.5:i,x?.5:o,e.xanchor,e.yanchor))}P.attr({transform:s(t,r)+Tt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",W(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=e.indexOf("end")>=0,b=d.backoff*y+r.standoff,_=v.backoff*g+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-u.x,A=o.y-u.y;if(h=(f=Math.atan2(A,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+A*A))return void I();if(b){if(b*b>w*w+A*A)return void I();var T=b*Math.cos(f),k=b*Math.sin(f);u.x+=T,u.y+=k,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+A*A)return void I();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),z="";if(E1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},56864:function(t,e,r){"use strict";var n=r(24040),i=r(3400);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(45899)}}},layoutAttributes:r(45899),handleDefaults:r(52808),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var pt=Math.pow(10,Math.floor(Math.log(ht)/Math.LN10));ut*=pt*c.roundUp(ht/pt,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ut}lt.domain=o?[ot+O/B.h,ot+Q-O/B.h]:[ot+C/B.w,ot+Q-C/B.w],lt.setScale(),t.attr("transform",u(Math.round(B.l),Math.round(B.t)));var dt,vt=t.select("."+k.cbtitleunshift).attr("transform",u(-Math.round(B.l),-Math.round(B.t))),yt=lt.ticklabelposition,gt=lt.title.font.size,mt=t.select("."+k.cbaxis),xt=0,bt=0;function _t(n,i){var a={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:F._dfltTitle.colorbar,containerGroup:t.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&ct||!o&&!ct)&&("top"===V&&(t=C+B.l+tt*P,e=O+B.t+et*(1-ot-Q)+3+.75*gt),"bottom"===V&&(t=C+B.l+tt*P,e=O+B.t+et*(1-ot)-3-.25*gt),"right"===V&&(e=O+B.t+et*I+3+.75*gt,t=C+B.l+tt*ot),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ct||o&&ct){var a,l=t.select("."+k.cbtitle),f=l.select("text"),h=[-M/2,M/2],d=l.select(".h"+lt._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),bt=a.width,(xt=a.height)>v&&(h[1]-=(xt-v)/2)):f.node()&&!f.classed(k.jsPlaceholder)&&(a=p.bBox(f.node()),bt=a.width,xt=a.height),o){if(xt){if(xt+=5,"top"===V)lt.domain[1]-=xt/B.h,h[1]*=-1;else{lt.domain[0]+=xt/B.h;var g=y.lineCount(f);h[1]+=(1-g)*v}l.attr("transform",u(h[0],h[1])),lt.setScale()}}else bt&&("right"===V&&(lt.domain[0]+=(bt+gt/2)/B.w),l.attr("transform",u(h[0],h[1])),lt.setScale())}t.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?u(0,Math.round(B.h*(1-lt.domain[1]))):u(Math.round(B.w*lt.domain[0]),0)),mt.attr("transform",o?u(0,Math.round(-B.t)):u(Math.round(-B.l),0));var m=t.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(X);m.enter().append("rect").classed(k.cbfill,!0).attr("style",""),m.exit().remove();var x=H.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,a){var s=[0===a?H[0]:(X[a]+X[a-1])/2,a===X.length-1?H[1]:(X[a]+X[a+1])/2].map(lt.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",rt).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var u=G(t).replace("e-","");l.attr("fill",i(u).toHexString())}}));var b=t.select("."+k.cblines).selectAll("path."+k.cbline).data(j.color&&j.width?Z:[]);b.enter().append("path").classed(k.cbline,!0),b.exit().remove(),b.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+j.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+K).call(p.lineGroupStyle,j.width,q(t),j.dash)})),mt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+K+(M||0)/2-("outside"===e.ticks?1:0),A=s.calcTicks(lt),T=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,A):A,layer:mt,path:s.makeTickPath(lt,_,T),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:A,layer:mt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(o&&!ct||!o&&ct){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===V)i=s,t=B.l+tt*a+10+gt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===V&&(i=B.t+et*a+10+(-1===yt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===V){var l=U.text.split("
").length;i=B.t+et*a+10-K-w*gt*l}_t((o?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:V,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?F.width:F.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=K+M/2;-1===yt.indexOf("inside")&&(n=p.bBox(mt.node()),s+=o?n.width:n.height),dt=vt.select("text");var c=0,f=o&&"top"===V,v=!o&&"right"===V,y=0;if(dt.node()&&!dt.classed(k.jsPlaceholder)){var m,x=vt.select(".h"+lt._id+"title-math-group").node();x&&(o&&ct||!o&&!ct)?(c=(n=p.bBox(x)).width,m=n.height):(c=(n=p.bBox(vt.node())).right-B.l-(o?rt:st),m=n.bottom-B.t-(o?st:rt),o||"top"!==V||(s+=n.height,y=n.height)),v&&(dt.attr("transform",u(c/2+gt/2,0)),c*=2),s=Math.max(s,o?c:m)}var b=2*(o?C:O)+s+S+M/2,w=0;!o&&U.text&&"bottom"===L&&I<=0&&(b+=w=b/2,y+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=y;var N=S+M,j=(o?rt:st)-N/2-(o?C:0),H=(o?st:rt)-(o?$:O+y-w);t.select("."+k.cbbg).attr("x",j).attr("y",H).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max($+N,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style("stroke-width",S);var q=v?Math.max(c-10,0):0;t.selectAll("."+k.cboutline).attr("x",(o?rt:st+C)+q).attr("y",(o?st+O-$:rt)+(f?xt:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max($-(o?2*O+xt:2*C+q),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M});var G=o?nt*b:0,W=o?0:(1-it)*b-y;if(G=R?B.l-G:-G,W=D?B.t-W:-W,t.attr("transform",u(G,W)),!o&&(S||i(E).getAlpha()&&!i.equals(F.paper_bgcolor,E))){var Y=mt.selectAll("text"),X=Y[0].length,Z=t.select("."+k.cbbg).node(),J=p.bBox(Z),Q=p.getTranslate(t);Y.each((function(t,e){var r=X-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=J.right+Q.x+st-S-2+P-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(X<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=A[z],at=T[z],ot=A[L],ut=T[L],ft=b-K;o?("pixels"===h?(tt.y=I,tt.t=$*ot,tt.b=$*ut):(tt.t=tt.b=0,tt.yt=I+l*ot,tt.yb=I-l*ut),"pixels"===_?(tt.x=P,tt.l=b*et,tt.r=b*at):(tt.l=ft*et,tt.r=ft*at,tt.xl=P-g*et,tt.xr=P+g*at)):("pixels"===h?(tt.x=P,tt.l=$*et,tt.r=$*at):(tt.l=tt.r=0,tt.xl=P+l*et,tt.xr=P-l*at),"pixels"===_?(tt.y=1-I,tt.t=b*ot,tt.b=b*ut):(tt.t=ft*ot,tt.b=ft*ut,tt.yt=I-g*ot,tt.yb=I+g*ut));var ht=e.y<.5?"b":"t",pt=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var bt={r:F.width-j-G,l:j+tt.r,b:F.height-H-W,t:H+tt.b};R&&D?a.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][ht]=bt[ht]:D||o?r._fullLayout._reservedMargin[e._id][pt]=bt[pt]:r._fullLayout._reservedMargin[e._id][ht]=bt[ht]}],r)}(r,e,t);g&&g.then&&(t._promises||[]).push(g),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},90553:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t){return n.isPlainObject(t.colorbar)}},55080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(42996),supplyDefaults:r(64013),draw:r(37848).draw,hasColorbar:r(90553)}},49084:function(t,e,r){"use strict";var n=r(42996),i=r(53756).counter,a=r(95376),o=r(88304).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===a,u="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:"z",c:"color"}[a]));var p=a+"auto",d=a+"min",v=a+"max",y=a+"mid",g=(s(h+p),s(h+d),s(h+v),{});g[d]=g[v]=void 0;var m={};m[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},47128:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(94288).extractOpts;t.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,v=f.mid,y=function(){return i.aggNums(Math.min,null,l)},g=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=y():h&&(p=u._colorAx&&n(p)?Math.min(p,y()):y()),void 0===d?d=g():h&&(d=u._colorAx&&n(d)?Math.max(d,g()):g()),h&&void 0!==v&&(d-v>v-p?p=v-(d-v):d-v=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},95504:function(t,e,r){"use strict";var n=r(3400),i=r(94288).hasColorscale,a=r(94288).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},67416:function(t,e,r){"use strict";var n=r(3400),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},72760:function(t,e){"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},86476:function(t,e,r){"use strict";var n=r(29128),i=r(52264),a=r(89184),o=r(3400).removeElement,s=r(33816),l=t.exports={};l.align=r(78316),l.getCursor=r(67416);var c=r(2616);function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,v,y=t.gd,g=1,m=y._context.doubleClickDelay,x=t.element;y._mouseDownTime||(y._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)m&&(g=Math.max(g-1,1)),y._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(g,p),!v){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}y._dragging=!1,y._dragged=!1}else y._dragged=!1}},l.coverSlip=u},2616:function(t,e,r){"use strict";var n=r(95924),i=r(91200),a=r(52200).getGraphDiv,o=r(92456),s=t.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},98192:function(t,e){"use strict";e.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(38248),s=r(49760),l=r(24040),c=r(76308),u=r(8932),f=i.strTranslate,h=r(72736),p=r(9616),d=r(84284).LINE_SPACING,v=r(13448).DESELECTDIM,y=r(43028),g=r(7152),m=r(10624).appendArrayPointValue,x=t.exports={};function b(t){return"none"===t?void 0:t}x.font=function(t,e){var r=e.variant,n=e.style,i=e.weight,a=e.color,o=e.size,s=e.family,l=e.shadow,u=e.lineposition,f=e.textcase;s&&t.style("font-family",s),o+1&&t.style("font-size",o+"px"),a&&t.call(c.fill,a),i&&t.style("font-weight",i),n&&t.style("font-style",n),r&&t.style("font-variant",r),f&&t.style("text-transform",b(function(t){return _[t]}(f))),l&&t.style("text-shadow","auto"===l?h.makeTextShadow(c.contrast(a)):b(l)),u&&t.style("text-decoration-line",b(function(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(t,e,r,n){var i=e.fillpattern,a=e.fillgradient,o=i&&x.getPatternAttr(i.shape,0,"");if(o){var s=x.getPatternAttr(i.bgcolor,0,null),l=x.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,f=x.getPatternAttr(i.size,0,8),h=x.getPatternAttr(i.solidity,0,.3),p=e.uid;x.pattern(t,"point",r,p,o,f,h,void 0,i.fillmode,s,l,u)}else if(a&&"none"!==a.type){var d,v,y=a.type,g="scatterfill-"+e.uid;n&&(g="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===y&&(y+="reversed"),t.call(x.gradient,r,g,y,a.colorscale,"fill")):("horizontal"===y?(d={x:a.start,y:0},v={x:a.stop,y:0}):"vertical"===y&&(d={x:0,y:a.start},v={x:0,y:a.stop}),d.x=e._xA.c2p(void 0===d.x?e._extremes.x.min[0].val:d.x,!0),d.y=e._yA.c2p(void 0===d.y?e._extremes.y.min[0].val:d.y,!0),v.x=e._xA.c2p(void 0===v.x?e._extremes.x.max[0].val:v.x,!0),v.y=e._yA.c2p(void 0===v.y?e._extremes.y.max[0].val:v.y,!0),t.call(E,r,g,"linear",a.colorscale,"fill",d,v,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,c=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());w(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},x.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&w(i,t[0].trace,e,r)}))};var A=r(71984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(A).forEach((function(t){var e=A[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(x.symbolNoFill[r]=!0)}));var T=x.symbolNames.length;function k(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=T||t>=400?0:Math.floor(Math.max(t,0))};var M=a("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function E(t,e,r,a,o,l,u,f,h,p){var d,v=o.length;"linear"===a?d={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:f.x,y2:f.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===a&&(d={node:"radialGradient",reversed:p});for(var y=new Array(v),g=0;g=0&&void 0===t.i&&(t.i=o.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var u;u="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=u,n.selectedSizeFn&&(u=t.mrc=n.selectedSizeFn(t));var f=x.symbolNumber(t.mx||s.symbol)||0;t.om=f%200>=100;var h=nt(t,r),p=W(t,r);e.attr("d",k(f,u,h,p))}var d,v,y,g=!1;if(t.so)y=l.outlierwidth,v=l.outliercolor,d=s.outliercolor;else{var m=(l||{}).width;y=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(d=c.defaultLine,g=!0),d="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,d).style({"stroke-width":(y||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:y)+"px");var b=s.gradient,_=t.mgt;_?g=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=s.pattern,A=w&&x.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var T=t.mgc;T?g=!0:T=b.color;var M=r.uid;g&&(M+="-"+t.i),x.gradient(e,a,M,_,[[0,T],[1,d]],"fill")}else if(A){var E=!1,z=w.fgcolor;!z&&o&&o.color&&(z=o.color,E=!0);var L=x.getPatternAttr(z,t.i,o&&o.color||null),C=x.getPatternAttr(w.bgcolor,t.i,null),O=w.fgopacity,P=x.getPatternAttr(w.size,t.i,8),I=x.getPatternAttr(w.solidity,t.i,.3);E=E||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var D=r.uid;E&&(D+="-"+t.i),x.pattern(e,"point",a,D,A,P,I,t.mcc,w.fillmode,C,L,O)}else i.isArrayOrTypedArray(d)?c.fill(e,d[t.i]):c.fill(e,d);y&&c.stroke(e,v)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=y.isBubble(t)?g(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:v*e});var d=a.color,y=o.color,g=s.color;(y||g)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?y||e:g||e});var m=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||m/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,v))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",k(x.symbolNumber(a),o,nt(n,e),W(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function I(t,e,r){return r&&(t=j(t)),e?R(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return z=e,e}function R(t){var e=n.round(t,2);return L=e,e}function F(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=3*c*(l+c),p=3*l*(l+c);return[[D(e[0]+(h&&u/h)),R(e[1]+(h&&f/h))],[D(e[0]-(p&&u/p)),R(e[1]-(p&&f/p))]]}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};m(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var v=t.tp||e.textposition,y=P(t,e),g=a?a(t):t.tc||e.textfont.color;o.call(x.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,textcase:t.tC||e.textfont.textcase,lineposition:t.tE||e.textfont.lineposition,shadow:t.tS||e.textfont.shadow,size:y,color:g}).text(c).call(h.convertToTspans,r).call(O,v,y,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=P(t,e);c.fill(i,a);var u=l.traceIs(e,"bar-like");O(i,o,s,t.mrc2||t.mrc,u)}))}},x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||w>=f&&w<=c)&&(A<=h&&A>=u||A>=h&&A<=u)&&(t=[w,A])}return t}x.steps=function(t){var e=B[t]||N;return function(t){for(var r="M"+D(t[0][0])+","+R(t[0][1]),n=t.length,i=1;i=1e4&&(x.savedBBoxes={},U=0),r&&(x.savedBBoxes[r]=y),U++,i.extendFlat({},y)},x.setClipUrl=function(t,e,r){t.attr("clip-path",H(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var q=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(q,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var G=/translate\([^)]*\)\s*$/;function W(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(G);t=1===e&&1===r?[]:[f(o,s),"scale("+e+","+r+")",f(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},x.getMarkerStandoff=W;var Y,X,Z,K,J,$,Q=Math.atan2,tt=Math.cos,et=Math.sin;function rt(t,e){var r=e[0],n=e[1];return[r*tt(t)-n*et(t),r*et(t)+n*tt(t)]}function nt(t,e){var r,n,a=t.ma;void 0===a&&((a=e.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,u=e._yA;if(!c||!u)return 90;r=c.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var f,h=t.lonlat[0],p=t.lonlat[1],d=e._geo.project([h,p+1e-5]),v=e._geo.project([h+1e-5,p]),y=Q(v[1]-n,v[0]-r),g=Q(d[1]-n,d[0]-r);if("north"===s)f=a/180*Math.PI;else if("previous"===s){var m=h/180*Math.PI,x=p/180*Math.PI,b=Y/180*Math.PI,_=X/180*Math.PI,w=b-m,A=tt(_)*et(w),T=et(_)*tt(x)-tt(_)*et(x)*tt(w);f=-Q(A,T)-Math.PI,Y=h,X=p}var k=rt(y,[tt(f),0]),M=rt(g,[et(f),0]);a=Q(k[1]+M[1],k[0]+M[0])/Math.PI*180,"previous"!==s||$===e.uid&&t.i===J+1||(a=null)}if("previous"===s&&!e._geo)if($===e.uid&&t.i===J+1&&o(r)&&o(n)){var S=r-Z,E=n-K,z=e.line&&e.line.shape||"",L=z.slice(z.length-1);"h"===L&&(E=0),"v"===L&&(S=0),a+=Q(E,S)/Math.PI*180+90}else a=null}return Z=r,K=n,J=t.i,$=e.uid,a}x.getMarkerAngle=nt},71984:function(t,e,r){"use strict";var n,i,a,o,s=r(21984),l=r(33428).round,c="M0,0Z",u=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,p=Math.cos,d=Math.sin;function v(t){return null===t}function y(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var c=t/180*h,u=0,f=0,v=s(r),y="",g=0;g0,f=t._context.staticPlot;e.each((function(e){var h,p=e[0].trace,d=p.error_x||{},v=p.error_y||{};p.ids&&(h=function(t){return t.id});var y=o.hasMarkers(p)&&p.marker.maxdisplayed>0;v.visible||d.visible||(e=[]);var g=n.select(this).selectAll("g.errorbar").data(e,h);if(g.exit().remove(),e.length){d.visible||g.selectAll("path.xerror").remove(),v.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var m=g.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(g,r.layerClipId,t),g.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!y||t.vis){var a,o=e.select("path.yerror");if(v.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var h=v.width;a="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2*h),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var p=e.select("path.xerror");if(d.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var g=(d.copy_ystyle?v:d).width;a="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(a+="m0,-"+g+"v"+2*g),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=e.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",a)}else p.remove()}}))}}))}},92036:function(t,e,r){"use strict";var n=r(33428),i=r(76308);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},55756:function(t,e,r){"use strict";var n=r(25376),i=r(65460).hoverlabel,a=r(92880).extendFlat;t.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(t,e,r){"use strict";var n=r(3400),i=r(24040);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.indexK[0]._length||_t<0||_t>J[0]._length)return v.unhoverRaw(t,e)}else bt="xpx"in e?e.xpx:K[0]._length/2,_t="ypx"in e?e.ypx:J[0]._length/2;if(e.pointerX=bt+K[0]._offset,e.pointerY=_t+J[0]._offset,nt="xval"in e?x.flat(b,e.xval):x.p2c(K,bt),it="yval"in e?x.flat(b,e.yval):x.p2c(J,_t),!i(nt[0])||!i(it[0]))return o.warn("Fx.hover failed",e,t),v.unhoverRaw(t,e)}var kt=1/0;function Mt(r,n){for(ot=0;otvt&&(yt.splice(0,vt),kt=yt[0].distance),M&&0!==rt&&0===yt.length){dt.distance=rt,dt.index=!1;var u=lt._module.hoverPoints(dt,ht,pt,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter((function(t){return t.spikeDistance<=rt}))),u&&u.length){var f,h=u.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(h.length){var p=h[0];i(p.x0)&&i(p.y0)&&(f=Et(p),(!mt.vLinePoint||mt.vLinePoint.spikeDistance>f.spikeDistance)&&(mt.vLinePoint=f))}var v=u.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(v.length){var y=v[0];i(y.x0)&&i(y.y0)&&(f=Et(y),(!mt.hLinePoint||mt.hLinePoint.spikeDistance>f.spikeDistance)&&(mt.hLinePoint=f))}}}}}function St(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Nt-1;jt--)qt(yt[jt]);yt=Ut,Ot()}var Gt=t._hoverdata,Wt=[],Yt=q(t),Xt=G(t);for(at=0;at1||yt.length>1)||"closest"===S&&xt&&yt.length>1,se=d.combine(_.plot_bgcolor||d.background,_.paper_bgcolor),le=D(yt,{gd:t,hovermode:S,rotateLabels:oe,bgColor:se,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),ce=le.hoverLabels;if(x.isUnifiedHover(S)||(function(t,e,r,n){var i,a,o,s,l,c,u,f=e?"xa":"ya",h=e?"ya":"xa",p=0,d=1,v=t.size(),y=new Array(v),g=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},A=function(t){return t*r._invScaleY};function T(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;se.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[f],i=t[h],a="x"===n._id.charAt(0),o=n.range;0===g&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,p=F(t,e),v=t.anchor,T="end"===v?-1:1;if("middle"===v)u=(c=t.crossPos+(a?A(p.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?A(t.by):w(t.bx));else if(a)u=(c=t.crossPos+A(E+p.y)-A(t.by/2-E))+A(t.by);else{var M=w(T*E+p.x),S=M+w(T*t.bx);c=t.crossPos+Math.min(M,S),u=t.crossPos+Math.max(M,S)}a?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(u,x)-Math.max(c,m)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}y[g++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?k:1)/2,pmin:s,pmax:l}]})),y.sort((function(t,e){return t[0].posref-e[0].posref||d*(e[0].traceIndex-t[0].traceIndex)}));!i&&p<=v;){for(p++,i=!0,s=0;s.01){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(M.push.apply(M,S),y.splice(s+1,1),u=0,l=M.length-1;l>=0;l--)u+=M[l].dp;for(o=u/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}y.forEach(T)}for(s=y.length-1;s>=0;s--){var C=y[s];for(l=C.length-1;l>=0;l--){var O=C[l],P=O.datum;P.offset=O.dp,P.del=O.del}}}(ce,oe,_,le.commonLabelBoundingBox),B(ce,oe,_._invScaleX,_._invScaleY)),l&&l.tagName){var ue=m.getComponentMethod("annotations","hasClickToShow")(t,Wt);h(n.select(l),ue?"pointer":"")}l&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Gt)&&(Gt&&t.emit("plotly_unhover",{event:e,points:Gt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:K,yaxes:J,xvals:nt,yvals:it}))}(t,e,r,a,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=q(i),o=G(i),s=D(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),p=Math.max(s,l),v=t.trace;if(m.traceIs(v,"gl3d")){var y=i._fullLayout[v.scene]._scene.container,g=y.offsetLeft,x=y.offsetTop;u+=g,f+=g,h+=x,p+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:p+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||d.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||d.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function D(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,u=e.bgColor,h=e.container,v=e.outerContainer,y=e.commonLabelOpts||{};if(0===t.length)return[[]];var g=e.fontFamily||b.HOVERFONT,T=e.fontSize||b.HOVERFONTSIZE,k=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,S=e.fontVariant||i.font.variant,L=e.fontTextcase||i.font.textcase,C=e.fontLineposition||i.font.lineposition,O=e.fontShadow||i.font.shadow,I=t[0],D=I.xa,F=I.ya,B=a.charAt(0),N=B+"Label",j=I[N];if(void 0===j&&"multicategory"===D.type)for(var U=0;Ui.width-A&&(P=i.width-A),e.attr("d","M"+(x-P)+",0L"+(x-P+E)+","+w+E+"H"+A+"v"+w+(2*z+_.height)+"H"+-A+"V"+w+E+"H"+(x-P-E)+"Z"),x=P,Q.minX=x-A,Q.maxX=x+A,"top"===D.side?(Q.minY=b-(2*z+_.height),Q.maxY=b-z):(Q.minY=b+z,Q.maxY=b+(2*z+_.height))}else{var R,B,N;"right"===F.side?(R="start",B=1,N="",x=D._offset+D._length):(R="end",B=-1,N="-",x=D._offset),b=F._offset+(I.y0+I.y1)/2,s.attr("text-anchor",R),e.attr("d","M0,0L"+N+E+","+E+"V"+(z+_.height/2)+"h"+N+(2*z+_.width)+"V-"+(z+_.height/2)+"H"+N+E+"V-"+E+"Z"),Q.minY=b-(z+_.height/2),Q.maxY=b+(z+_.height/2),"right"===F.side?(Q.minX=x+E,Q.maxX=x+E+(2*z+_.width)):(Q.minX=x-E-(2*z+_.width),Q.maxX=x-E);var U,V=_.height/2,q=H-_.top-V,G="clip"+i._uid+"commonlabel"+F._id;if(x<_.width+2*z+E){U="M-"+(E+z)+"-"+V+"h-"+(_.width-z)+"V"+V+"h"+(_.width-z)+"Z";var Y=_.width-x+z;f.positionText(s,Y,q),"end"===R&&s.selectAll("tspan").each((function(){var t=n.select(this),e=p.tester.append("text").text(t.text()).call(p.font,m),i=W(r,e.node());Math.round(i.width)=0?dt:vt+mt=0?vt:Mt+mt=0?ht:pt+xt=0?pt:St+xt=0,"top"!==t.idealAlign&&J||!$?J?(N+=V/2,t.anchor="start"):t.anchor="middle":(N-=V/2,t.anchor="end"),t.crossPos=N;else{if(t.pos=N,J=B+U/2+Q<=q,$=B-U/2-Q>=0,"left"!==t.idealAlign&&J||!$)if(J)B+=U/2,t.anchor="start";else{t.anchor="middle";var tt=Q/2,et=B+tt-q,rt=B-tt;et>0&&(B-=et),rt<0&&(B+=-rt)}else B-=U/2,t.anchor="end";t.crossPos=B}w.attr("text-anchor",t.anchor),I&&P.attr("text-anchor",t.anchor),e.attr("transform",l(B,N)+(s?c(A):""))})),{hoverLabels:Et,commonLabelBoundingBox:Q}}function R(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=V(t.name,t.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[u+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(h[c+"other"]=h[c+"Val"],h[c+"otherLabel"]=h[c+"Label"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(I,(function(e,r){return s=V(r,t.nameLength),""}))}return[l,s]}function F(t,e){var r=0,n=t.offset;return e&&(n*=-S,r=t.offset*M),{x:r,y:n}}function B(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,u=r.select("text.nums"),h=t.anchor,d="end"===h?-1:1,v=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(E+z))+s*(i.txwidth+z),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+z),{alignShift:s,textShiftX:l,text2ShiftX:c}),y=F(t,e),g=y.x,m=y.y,x="middle"===h;r.select("path").attr("d",x?"M-"+a(t.bx/2+t.tx2width/2)+","+o(m-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(d*E+g)+","+o(E+m)+"v"+o(t.by/2-E)+"h"+a(d*t.bx)+"v-"+o(t.by)+"H"+a(d*E+g)+"V"+o(m-E)+"Z");var b=g+v.textShiftX,_=m+t.ty0-t.by/2+z,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==h?(u.attr("text-anchor","start"),b=x?-t.bx/2-t.tx2width/2+z:-t.bx-z):"right"===w&&"end"!==h&&(u.attr("text-anchor","end"),b=x?t.bx/2-t.tx2width/2-z:t.bx+z)),u.call(f.positionText,a(b),o(_)),t.tx2width&&(r.select("text.name").call(f.positionText,a(v.text2ShiftX+v.alignShift*z+g),o(m+t.ty0-t.by/2+z)),r.select("rect").call(p.setRect,a(v.text2ShiftX+(v.alignShift-1)*t.tx2width/2+g),o(m-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=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("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:y.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:y.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=y.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+y.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=y.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+y.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function j(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var h=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var v,g,m=e.hLinePoint;n=m&&m.xa,"cursor"===(i=m&&m.ya).spikesnap?(v=c.pointerX,g=c.pointerY):(v=n._offset+m.x,g=i._offset+m.y);var x,b,_=a.readability(m.color,h)<1.5?d.contrast(h):m.color,w=i.spikemode,A=i.spikethickness,T=i.spikecolor||_,k=y.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=v),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":A,stroke:T,"stroke-dasharray":p.dashStyle(i.spikedash,A)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":A+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==i.side?A:-A),cy:g,r:A,fill:T}).classed("spikeline",!0)}if(f){var E,z,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,z=c.pointerY):(E=n._offset+L.x,z=i._offset+L.y);var C,O,P=a.readability(L.color,h)<1.5?d.contrast(h):L.color,I=n.spikemode,D=n.spikethickness,R=n.spikecolor||P,F=y.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(C=F,O=z),-1!==I.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),C=l.t+(1-N)*l.h,O=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:C,y2:O,"stroke-width":D,stroke:R,"stroke-dasharray":p.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:C,y2:O,"stroke-width":D+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:R}).classed("spikeline",!0)}}}function U(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function V(t,e){return f.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function H(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function q(t){return t.offsetTop+t.clientTop}function G(t){return t.offsetLeft+t.clientLeft}function W(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,a=n.top,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},16132:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},41008:function(t,e,r){"use strict";var n=r(3400),i=r(65460);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},93024:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(86476),o=r(10624),s=r(65460),l=r(83292);t.exports={moduleType:"component",name:"fx",constants:r(92456),schema:{layout:s},attributes:r(55756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(81976),supplyDefaults:r(95448),supplyLayoutDefaults:r(88336),calc:r(55056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(62376)}},65460:function(t,e,r){"use strict";var n=r(92456),i=r(25376),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},88336:function(t,e,r){"use strict";var n=r(3400),i=r(65460),a=r(41008),o=r(16132);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),c=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},81976:function(t,e,r){"use strict";var n=r(3400),i=r(16132),a=r(65460);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},12704:function(t,e,r){"use strict";var n=r(3400),i=r(53756).counter,a=r(86968).u,o=r(33816).idRegex,s=r(31780),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),f=u*(1-o),h=0;h1){h||p||d||"independent"===T("pattern")&&(h=!0),y._hasSubplotGrid=h;var x,b,_="top to bottom"===T("roworder"),w=h?.2:.1,A=h?.3:.1;v&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),y._domains={x:u("x",T,w,x,m),y:u("y",T,A,b,g,_)}}else delete e.grid}function T(t,e){return n.coerce(r,y,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,v=r.rows,y=r.columns,g="independent"===r.pattern,m=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(v);var b=1;for(n=0;n("legend"===t?1:0));if(!1===M&&(r[t]=void 0),(!1!==M||f.uirevision)&&(p("uirevision",r.uirevision),!1!==M)){p("borderwidth");var S,E,z,L="h"===p("orientation"),C="paper"===p("yref"),O="paper"===p("xref"),P="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?C?(E=1.1,z="bottom"):(E=1,z="top"):C?(E=-.1,z="top"):(E=0,z="bottom")):(E=1,z="auto",O?S=1.02:(S=1,P="right")),i.coerce(f,h,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),i.coerce(f,h,{y:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:E}},"y"),p("traceorder",_),c.isGrouped(r[t])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",P),p("yanchor",z),p("valign"),i.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",L?"left":"top");var I=i.extendFlat({},d,{size:i.bigFont(d.size)});i.coerceFont(p,"title.font",I)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n1)}var B=d.hiddenlabels||[];if(!(A||d.showlegend&&S.length))return s.selectAll("."+w).remove(),d._topdefs.select("#"+r).remove(),a.autoMargin(t,w);var N=i.ensureSingle(s,"g",w,(function(t){A||t.attr("pointer-events","all")})),j=i.ensureSingleById(d._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(N,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));U.call(u.stroke,h.bordercolor).call(u.fill,h.bgcolor).style("stroke-width",h.borderwidth+"px");var V,H=i.ensureSingle(N,"g","scrollbox"),q=h.title;h._titleWidth=0,h._titleHeight=0,q.text?((V=i.ensureSingle(H,"text",w+"titletext")).attr("text-anchor","start").call(c.font,q.font).text(q.text),z(V,H,t,h,_)):H.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(N,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),W=H.selectAll("g.groups").data(S);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(M,t,h)})).call(x,t,h).each((function(){A||n.select(this).call(E,t,w)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout,o=O(i);i||(i=a[o]);var s=a._size,l=b.isVertical(i),u=b.isGrouped(i),f="fraction"===i.entrywidthmode,h=i.borderwidth,d=2*h,v=p.itemGap,y=i.indentation+i.itemwidth+2*v,g=2*(h+v),m=C(i),x=i.y<0||0===i.y&&"top"===m,_=i.y>1||1===i.y&&"bottom"===m,w=i.tracegroupgap,A={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var k=0;i._width=0,i._height=0;var M=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,h+M[0],h+M[1]+i._height+e/2+v),i._height+=e,i._width=Math.max(i._width,t[0].width)})),k=y+i._width,i._width+=v+y+d,i._height+=g,u&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),E=i.x<0||0===i.x&&"right"===S,z=i.x>1||1===i.x&&"left"===S,P=_||x,I=a.width/2;i._maxWidth=Math.max(E?P&&"left"===S?s.l+s.w:I:z?P&&"right"===S?s.r+s.w:I:s.w,2*y);var D=0,R=0;r.each((function(t){var e=T(t,i,y);D=Math.max(D,e),R+=e})),k=null;var F=0;if(u){var B=0,N=0,j=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=T(r,i,y),a=r[0].height;c.setTranslate(this,M[0],M[1]+h+v+a/2+e),e+=a,t=Math.max(t,n),A[r[0].trace.legendgroup]=t}));var r=t+v;N>0&&r+h+N>i._maxWidth?(F=Math.max(F,N),N=0,j+=B+w,B=e):B=Math.max(B,e),c.setTranslate(this,N,j),N+=r})),i._width=Math.max(F,N)+h,i._height=j+B+g}else{var U=r.size(),V=R+d+(U-1)*v=i._maxWidth&&(F=Math.max(F,W),q=0,G+=H,i._height+=H,H=0),c.setTranslate(this,M[0]+h+q,M[1]+h+G+e/2+v),W=q+r+v,q+=n,H=Math.max(H,e)})),V?(i._width=q+d,i._height=H+g):(i._width=Math.max(F,W)+d,i._height+=H+g)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(h+p.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(h+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,X=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+o+"toggle"),r=t[0].height,a=t[0].trace.legendgroup,s=T(t,i,y);u&&""!==a&&(s=A[a]);var h=X?y:k||s;l||f||(h+=v/2),c.setRect(e,0,-r/2,h,r)}))}(t,W,Y,h)},function(){var e,u,m,x,b=d._size,_=h.borderwidth,T="paper"===h.xref,M="paper"===h.yref;if(q.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*v,i=0,a=t.node(),o=c.bBox(a).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*p.titlePad-o):"top right"===e.title.side&&(i=e._width-2*r-2*p.titlePad-o),f.positionText(t,r+p.titlePad+i,r+n)}}(V,h,_),!A){var S,E;S=T?b.l+b.w*h.x-y[L(h)]*h._width:d.width*h.x-y[L(h)]*h._width,E=M?b.t+b.h*(1-h.y)-y[C(h)]*h._effHeight:d.height*(1-h.y)-y[C(h)]*h._effHeight;var z=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=L(o),l=C(o),c="paper"===o.xref,u="paper"===o.yref;t._fullLayout._reservedMargin[e]={};var f=o.y<.5?"b":"t",h=o.x<.5?"l":"r",p={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(c&&u)return a.autoMargin(t,e,{x:o.x,y:o.y,l:o._width*y[s],r:o._width*g[s],b:o._effHeight*g[l],t:o._effHeight*y[l]});c?t._fullLayout._reservedMargin[e][f]=p[f]:u||"v"===o.orientation?t._fullLayout._reservedMargin[e][h]=p[h]:t._fullLayout._reservedMargin[e][f]=p[f]}(t,w,S,E);if(z)return;if(d.margin.autoexpand){var O=S,P=E;S=T?i.constrain(S,0,d.width-h._width):O,E=M?i.constrain(E,0,d.height-h._effHeight):P,S!==O&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==P&&i.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(N,S,E)}if(G.on(".drag",null),N.on("wheel",null),A||h._height<=h._maxHeight||t._context.staticPlot){var I=h._effHeight;A&&(I=h._height),U.attr({width:h._width-_,height:I-_,x:_/2,y:_/2}),c.setTranslate(H,0,0),j.select("rect").attr({width:h._width-2*_,height:I-2*_,x:_,y:_}),c.setClipUrl(H,r,t),c.setRect(G,0,0,0,0),delete h._scrollY}else{var D,R,F,B=Math.max(p.scrollBarMinHeight,h._effHeight*h._effHeight/h._height),W=h._effHeight-B-2*p.scrollBarMargin,Y=h._height-h._effHeight,X=W/Y,Z=Math.min(h._scrollY||0,Y);U.attr({width:h._width-2*_+p.scrollBarWidth+p.scrollBarMargin,height:h._effHeight-_,x:_/2,y:_/2}),j.select("rect").attr({width:h._width-2*_+p.scrollBarWidth+p.scrollBarMargin,height:h._effHeight-2*_,x:_,y:_+Z}),c.setClipUrl(H,r,t),$(Z,B,X),N.on("wheel",(function(){$(Z=i.constrain(h._scrollY+n.event.deltaY/W*Y,0,Y),B,X),0!==Z&&Z!==Y&&n.event.preventDefault()}));var K=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;D="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=Z})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,Z=function(t,e,r){var n=(r-e)/X+t;return i.constrain(n,0,Y)}(F,D,R),$(Z,B,X))}));G.call(K);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(D=t.changedTouches[0].clientY,F=Z)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,Z=function(t,e,r){var n=(e-r)/X+t;return i.constrain(n,0,Y)}(F,D,R),$(Z,B,X))}));H.call(J)}function $(e,r,n){h._scrollY=t._fullLayout[w]._scrollY=e,c.setTranslate(H,0,-e),c.setRect(G,h._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),j.select("rect").attr("y",_+e)}t._context.edits.legendPosition&&(N.classed("cursor-move",!0),l.init({element:N.node(),gd:t,prepFn:function(t){if(t.target!==G.node()){var e=c.getTranslate(N);m=e.x,x=e.y}},moveFn:function(t,r){if(void 0!==m&&void 0!==x){var n=m+t,i=x+r;c.setTranslate(N,n,i),e=l.align(n,h._width,b.l,b.l+b.w,h.xanchor),u=l.align(i+h._height,-h._height,b.t+b.h,b.t,h.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==u){var r={};r[w+".x"]=e,r[w+".y"]=u,o.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&k(t,N,n,e,r)}}))}],t)}}function T(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function k(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&h(r,t,n))}function M(t,e,r){var n,a,s=O(r),l=t.data()[0][0],u=l.trace,h=o.traceIs(u,"pie-like"),d=!r._inHover&&e._context.edits.legendText&&!h,v=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=h?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var y=i.ensureSingle(t,"text",s+"text");y.attr("text-anchor","start").call(c.font,a).text(d?S(n,v):n);var g=r.indentation+r.itemwidth+2*p.itemGap;f.positionText(y,g,0),d?y.call(f.makeEditable,{gd:e,text:n}).call(z,t,e,r).on("edit",(function(n){this.text(S(n,v)).call(z,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var c=o.getTransformIndices(a,"groupby"),f=c[c.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(l.trace._group,n),s=h.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",e,"shapes["+u.index+"].name",s.name):o.call("_guiRestyle",e,s,u.index)})):z(y,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function E(t,e,r){var a,o=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTimeo&&(s=Math.max(s-1,1)),k(e,i,t,s,n.event)}})))}function z(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node(),s=O(r);r||(r=e._fullLayout[s]);var l,u,h=r.borderwidth,d=(n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*v;if(o){var y=c.bBox(o);l=y.height,u=y.width,n===_?c.setTranslate(a,h,h+.75*l):c.setTranslate(a,0,.25*l)}else{var g="."+s+(n===_?"title":"")+"text",m=t.select(g),x=f.lineCount(m),b=m.node();if(l=d*x,u=b?c.bBox(b).width:0,n===_)"left"===r.title.side&&(u+=2*p.itemGap),f.positionText(m,h+p.titlePad,h+d);else{var w=2*p.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=p.itemGap,u-=r.indentation+r.itemwidth),f.positionText(m,w,-d*((x-1)/2-.3))}}n===_?(r._titleWidth=u,r._titleHeight=l):(i.lineHeight=d,i.height=Math.max(l,16)+3,i.width=u)}else t.remove()}(e,r,n,i)}))}function L(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function C(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function O(t){return t._id||"legend"}t.exports=function(t,e){if(e)A(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var a=0;aS&&(M=S)}T[a][0]._groupMinRank=M,T[a][0]._preGroupSort=a}var E=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(T.forEach((function(t,e){t[0]._preGroupSort=e})),T.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;ar?r:t}t.exports=function(t,e,r){var g=e._fullLayout;r||(r=g.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return m?n:Math.min(i,r)};function A(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",d=o?u.visible&&u.type===o:i.traceIs(u,"bar"),v=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(d?[t]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",p).attr("transform",_),v.exit().remove(),v.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r._inHover&&"mc"in a){var d=c(f),v=d.mid;void 0===v&&(v=(d.max+d.min)/2),p=s.tryColorscale(f,"")(v)}var g=p||a.mc||f.color,m=f.pattern,x=m&&s.getPatternAttr(m.shape,0,"");if(x){var b=s.getPatternAttr(m.bgcolor,0,null),_=s.getPatternAttr(m.fgcolor,0,null),A=m.fgopacity,T=y(m.size,8,10),k=y(m.solidity,.5,1),M="legend-"+u.uid;i.call(s.pattern,"legend",e,M,x,T,k,p,m.fillmode,b,_,A)}else i.call(l.fill,g);o&&l.stroke(i,a.mlc||h.color)}))}function T(t,r,o){var s=t[0],l=s.trace,c=o?l.visible&&l.type===o:i.traceIs(l,o),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(c?[t]:[]);if(u.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var p=l.marker||{},d=w(h(p.line.width,s.pts),p.line,5,2),v="pieLike",y=a.minExtend(l,{marker:{line:{width:d}}},v),g=a.minExtend(s,{trace:y},v);f(u,g,y,e)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,u=t[0].height;if("middle"===l&&0===s||!c||!u)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(c-u+3))||0,h=r.indentation;i.attr("transform",o(h,f))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var p=i.selectAll("g.legendsymbols").data([t]);p.enter().append("g").classed("legendsymbols",!0),p.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,v=h.reversescale;if(p){if(!r){var y=p.length;u=0===o?p[v?y-1:0][1]:1===o?p[v?0:y-1][1]:p[Math.floor((y-1)/2)][1]}}else{var g=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(g)?g[o]||g[0]:g}f.attr("d",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(v,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,A(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){A(t,this,"funnel")})).each((function(t){A(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){T(t,this,"funnelarea")})).each((function(t){T(t,this,"pie")})).each((function(t){var r,i,o=v(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,y=o.anyFill,g=o.anyLine,m=t[0],b=m.trace,_=c(b),A=_.colorscale,T=_.reversescale,k=u.hasMarkers(b)||!y?"M5,0":g?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",k+"h"+x+"v6h-"+x+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+b.uid;s.gradient(t,e,r,d(T),A,"fill")}})),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(m,{trace:i})]}var z=M.select(".legendlines").selectAll("path").data(f||h?[r]:[]);z.enter().append("path").classed("js-line",!0),z.exit().remove(),z.attr("d",k+(h?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(T),A,"stroke")}})})).each((function(t){var r,i,o=v(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,y=!h&&!c&&!l&&u.hasText(d);function g(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||y||f){var b={},w={};if(h){b.mc=g("marker.color",x),b.mx=g("marker.symbol",x),b.mo=g("marker.opacity",a.mean,[.2,1]),b.mlc=g("marker.line.color",x),b.mlw=g("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var A=g("marker.size",a.mean,[2,16],12);b.ms=A,w.marker.size=A}f&&(w.line={width:g("line.width",x,[0,10],5)}),y&&(b.tx="Aa",b.tp=g("textposition",x),b.ts=10,b.tc=g("textfont.color",x),b.tf=g("textfont.family",x),b.tw=g("textfont.weight",x),b.ty=g("textfont.style",x),b.tv=g("textfont.variant",x),b.tC=g("textfont.textcase",x),b.tE=g("textfont.lineposition",x),b.tS=g("textfont.shadow",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var T=n.select(this).select("g.legendpoints"),k=T.selectAll("path.scatterpts").data(h?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=T.selectAll("g.pointtext").data(y?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},66540:function(t,e,r){"use strict";r(76052),t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(t,e,r){"use strict";var n=r(24040),i=r(7316),a=r(79811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),c=l._,u=t.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,v=(1+d)/2,y=(1-d)/2;for(i=0;i1?(O=["toggleHover"],P=["resetViews"]):g?(C=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],P=["resetGeo"]):y?(O=["hoverClosest3d"],P=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(C=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],P=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:m?O=["hoverClosestPie"]:k?(O=["hoverClosestCartesian","hoverCompareCartesian"],P=["resetViewSankey"]):O=["toggleHover"],v&&O.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(t){for(var e=0;e0)){var v=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a0?t.touches[0].clientX:0}function g(t,e,r,n){var i=o.ensureSingle(t,"rect",v.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(u,u),"stroke-width":f}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function m(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(t,e,r,i){var s,c=e.calcdata,u=t.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(t){return v.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),u.order(),u.exit().remove(),u.each((function(t,o){var l=n.select(this),u=0===o,p=h.getFromId(e,t,"y"),d=p._name,v=i[d],y={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(y.layout.xaxis.rangebreaks=r.rangebreaks),y.layout[d]={type:p.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(y.layout[d].rangebreaks=p.rangebreaks),a.supplyDefaults(y);var g=y._fullLayout.xaxis,m=y._fullLayout[d];g.clearCalc(),g.setScale(),m.clearCalc(),m.setScale();var x={id:t,plotgroup:l,xaxis:g,yaxis:m,isRangePlot:!0};u?s=x:(x.mainplot="xy",x.mainplotinfo=s),f.rangePlot(e,x,function(t,e){for(var r=[],n=0;n=n.max)e=B[r+1];else if(t=n.pmax)e=B[r+1];else if(tr._length||m+_<0)return;u=g+_,p=m+_;break;case l:if(b="col-resize",g+_>r._length)return;u=g+_,p=m;break;case c:if(b="col-resize",m+_<0)return;u=g,p=m+_;break;default:b="ew-resize",u=v,p=v+_}if(p=0;T--){var k=r.append("path").attr(y).style("opacity",T?.1:g).call(o.stroke,x).call(o.fill,m).call(s.dashLine,T?"solid":_,T?4+b:b);if(d(k,t,a),w){var M=l(t.layout,"selections",a);k.style({cursor:"move"});var S={element:k.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},E=n(c,t);i(E,k,S)}else k.style("pointer-events",T?"all":"none");A[T]=k}var z=A[0];A[1].node().addEventListener("click",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void v(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=v,f(t)}}}(t,z)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function v(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,f(t))}t.exports={draw:f,drawOne:p,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=v,f(t)}}}},34200:function(t,e,r){"use strict";var n=r(98192).u,i=r(92880).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(t,e,r){"use strict";var n=r(72760).selectMode,i=r(1936).clearOutline,a=r(9856),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),c=e.gd,u=c._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,p=f.yaxis,d=e.isActiveSelection,v=e.dragmode,y=(c.layout||{}).selections||[];if(!n(v)&&void 0!==d){var g=c._fullLayout._activeSelectionIndex;if(g-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(g)){W(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=J(_))){for(o&&o.remove(),y=0;y=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=v(r);if(s||l){var c,u,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(c=A(f,t)),c&&a.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(u=T(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:u}).then((function(){e&&k(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function X(t){return t._id}function Z(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(X),c=r.map(X);for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function $(t,e,r){var n,i;for(n=0;n-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ct(et);ut([L(t,nt,"x"),L(t,pt,"y")])(Q,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ft(t,Q),h._reselect=!1}if(!a&&h._deselect){var vt=h._deselect;(function(t,e,r){for(var n=0;n=0)T._fullLayout._deactivateShape(T);else if(!x){var r=k.clickmode;z.done(Mt).then((function(){if(z.clear(Mt),2===t){for(bt.remove(),J=0;J-1&&V(e,T,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(T,void 0);l.click(T,e,C.id)})).catch(M.error)}},n.doneFn=function(){Tt.remove(),z.done(Mt).then((function(){z.clear(Mt),!S&&K&&n.selectionDefs&&(K.subtract=xt,n.selectionDefs.push(K),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,X)),(S||x)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),b&&ft(T,at)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:V}},46056:function(t,e,r){"use strict";var n=r(13916),i=r(25376),a=r(52904).line,o=r(98192).u,s=r(92880).extendFlat,l=r(31780).templatedArray,c=(r(36208),r(45464)),u=r(21776).ye,f=r(97728);t.exports=l("shape",{visible:s({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},c.legend,{editType:"calc+arraydraw"}),legendgroup:s({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},c.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:s({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:s({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:s({},a.color,{editType:"arraydraw"}),width:s({},a.width,{editType:"calc+arraydraw"}),dash:s({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:u({},{keys:Object.keys(f)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),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"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},96084:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(85448),o=r(65152);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if("pixel"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+c:c,v=h>0?h+c:c;return{ppad:c,ppadplus:u?d:v,ppadminus:u?v:d}}return{ppad:c}}function u(t,e,r){var n,i,s="x"===t._id.charAt(0)?"x":"y",l="category"===t.type||"multicategory"===t.type,c=0,u=0,f=l?t.r2c:t.d2c;if("scaled"===e[s+"sizemode"]?(n=e[s+"0"],i=e[s+"1"],l&&(c=e[s+"0shift"],u=e[s+"1shift"])):(n=e[s+"anchor"],i=e[s+"anchor"]),void 0!==n)return[f(n)+c,f(i)+u];if(e.path){var h,p,d,v,y=1/0,g=-1/0,m=e.path.match(a.segmentRE);for("date"===t.type&&(f=o.decodeDate(f)),h=0;hg&&(g=v)));return g>=y?[y,g]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o=t?e-n:n-e,-180/Math.PI*Math.atan2(i,a)}(x,_,b,w):0),k.call((function(e){return e.call(o.font,T).attr({}),a.convertToTspans(e,t),e}));var G=function(t,e,r,n,i,a,o){var s,l,c,u,h=i.label.textposition,p=i.label.textangle,d=i.label.padding,v=i.type,y=Math.PI/180*a,g=Math.sin(y),m=Math.cos(y),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===x&&(x="start"===h?"auto"===p?r>t?"left":rt?"right":rt?"right":rt?"left":r1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[z]=t,k(),M())}}()}}function V(t,r){!function(t,r){if(e.length)for(var n=0;n_?(M=p,L="y0",S=_,C="y1"):(M=_,L="y1",S=p,C="y0"),it(n),st(l,r),function(t,e,r){var n=e.xref,i=e.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),h.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),nt.moveFn="move"===D?at:ot,nt.altKey=n.altKey)},doneFn:function(){b(t)||(v(e),lt(l),A(e,t,r),i.call("_guiRelayout",t,u.getUpdateObj()))},clickFn:function(){b(t)||lt(l)}};function it(r){if(b(t))D=null;else if(j)D="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=nt.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!U&&i>R&&a>F&&!r.shiftKey?d.getCursor(o/i,1-s/a):"move";v(e,l),D=l.split("-")[0]}}function at(n,i){if("path"===r.type){var a=function(t){return t},o=a,u=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt($(t)+n)},q&&"date"===q.type&&(o=g.encodeDate(o))),N?V("yanchor",r.yanchor=et(k+i)):(u=function(t){return et(Q(t)+i)},W&&"date"===W.type&&(u=g.encodeDate(u))),V("path",r.path=T(I,o,u))}else B?V("xanchor",r.xanchor=tt(w+n)):(V("x0",r.x0=tt(f+n)),V("x1",r.x1=tt(x+n))),N?V("yanchor",r.yanchor=et(k+i)):(V("y0",r.y0=et(p+i)),V("y1",r.y1=et(_+i)));e.attr("d",m(t,r)),st(l,r),c(t,s,r,H)}function ot(n,i){if(U){var a=function(t){return t},o=a,u=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt($(t)+n)},q&&"date"===q.type&&(o=g.encodeDate(o))),N?V("yanchor",r.yanchor=et(k+i)):(u=function(t){return et(Q(t)+i)},W&&"date"===W.type&&(u=g.encodeDate(u))),V("path",r.path=T(I,o,u))}else if(j){if("resize-over-start-point"===D){var h=f+n,d=N?p-i:p+i;V("x0",r.x0=B?h:tt(h)),V("y0",r.y0=N?d:et(d))}else if("resize-over-end-point"===D){var v=x+n,y=N?_-i:_+i;V("x1",r.x1=B?v:tt(v)),V("y1",r.y1=N?y:et(y))}}else{var b=function(t){return-1!==D.indexOf(t)},A=b("n"),G=b("s"),Y=b("w"),X=b("e"),Z=A?M+i:M,K=G?S+i:S,J=Y?E+n:E,rt=X?z+n:z;N&&(A&&(Z=M-i),G&&(K=S-i)),(!N&&K-Z>F||N&&Z-K>F)&&(V(L,r[L]=N?Z:et(Z)),V(C,r[C]=N?K:et(K))),rt-J>R&&(V(O,r[O]=B?J:tt(J)),V(P,r[P]=B?rt:tt(rt)))}e.attr("d",m(t,r)),st(l,r),c(t,s,r,H)}function st(t,e){(B||N)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=$(B?e.xanchor:a.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,y.paramIsX))),o=Q(N?e.yanchor:a.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,y.paramIsY)));if(i=g.roundPositionForSharpStrokeRendering(i,1),o=g.roundPositionForSharpStrokeRendering(o,1),B&&N){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(B){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function lt(t){t.selectAll(".visual-cue").remove()}d.init(nt),rt.node().onmousemove=it}(t,F,u,e,r,D):!0===u.editable&&F.style("pointer-events",P||f.opacity(z)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(t,e){if(_(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void k(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=k,x(t)}}}(t,F)}))}u._input&&!0===u.visible&&("above"===u.layer?M(t._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?M(t._fullLayout._shapeLowerLayer):"between"===u.layer?M(w.shapelayerBetween):w._hadPlotinfo?M((w.mainplotinfo||w).shapelayer):M(t._fullLayout._shapeLowerLayer))}function A(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function T(t,e,r){return t.replace(y.segmentRE,(function(t){var n=0,i=t.charAt(0),a=y.paramIsX[i],o=y.paramIsY[i],s=y.numParams[i];return i+t.substr(1).replace(y.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function k(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(u(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(_(t)){u(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e0&&lp&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),u+d}))}(r,l,u);if("pixel"===r.xsizemode){var k=l(r.xanchor);f=k+r.x0+_,h=k+r.x1+w}else f=l(r.x0)+_,h=l(r.x1)+w;if("pixel"===r.ysizemode){var M=u(r.yanchor);p=M-r.y0+A,d=M-r.y1+T}else p=u(r.y0)+A,d=u(r.y1)+T;if("line"===v)return"M"+f+","+p+"L"+h+","+d;if("rect"===v)return"M"+f+","+p+"H"+h+"V"+d+"H"+f+"Z";var S=(f+h)/2,E=(p+d)/2,z=Math.abs(S-f),L=Math.abs(E-p),C="A"+z+","+L,O=S+z+","+E;return"M"+O+C+" 0 1,1 "+S+","+(E-L)+C+" 0 0,1 "+O+"Z"}},41592:function(t,e,r){"use strict";var n=r(4016);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(46056),supplyLayoutDefaults:r(43712),supplyDrawNewShapeDefaults:r(65144),includeBasePlot:r(36632)("shapes"),calcAutorange:r(96084),draw:n.draw,drawOne:n.drawOne}},97728:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t){return t.x0shift||0}function i(t){return t.x1shift||0}function a(t){return t.y0shift||0}function o(t){return t.y1shift||0}function s(t,r){return e(t.x1,r)+i(t)-e(t.x0,r)-n(t)}function l(t,r,n){return e(t.y1,n)+o(t)-e(t.y0,n)-a(t)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:l(t,0,r)/s(t,e)},dx:s,dy:l,width:function(t,e){return Math.abs(s(t,e))},height:function(t,e,r){return Math.abs(l(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(s(t,e),2)+Math.pow(l(t,0,r),2))},xcenter:function(t,a){return r((e(t.x1,a)+i(t)+e(t.x0,a)+n(t))/2,a)},ycenter:function(t,n,i){return r((e(t.y1,i)+o(t)+e(t.y0,i)+a(t))/2,i)}}},89861:function(t,e,r){"use strict";var n=r(25376),i=r(66741),a=r(92880).extendDeepAll,o=r(67824).overrideAll,s=r(85656),l=r(31780).templatedArray,c=r(60876),u=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},60876:function(t){"use strict";t.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}},8132:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(89861),o=r(60876).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,u=0;u0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function z(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(k,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function C(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[f.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,y(e))}if(s.enter().append("g").classed(f.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(l)})).remove(),0!==a.length){var c=s.selectAll("g."+f.groupClassName).data(a,g);c.enter().append("g").classed(f.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u0||A<0){var E={left:[-T,0],right:[T,0],top:[0,-T],bottom:[0,T]}[_.side];a.attr("transform",l(E[0],E[1]))}}}function ht(t,e){t.text(e).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))}if(at.call(ct,ot),et&&(S?at.on(".opacity",null):(ht(at,x),E=!0),at.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==b?o.call("_guiRestyle",t,m,e,b):o.call("_guiRelayout",t,m,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(f.positionText,w.x,w.y)})),N)){if(N&&!S){var pt=at.node().getBBox(),dt=pt.y+pt.height+1.6*Y;ot.attr("y",dt)}V?ot.on(".opacity",null):(ht(ot,j),H=!0),ot.call(f.makeEditable,{gd:t}).on("edit",(function(e){o.call("_guiRelayout",t,"title.subtitle.text",e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(f.positionText,ot.attr("x"),ot.attr("y"))}))}return at.classed("js-placeholder",E),ot&&ot.classed("js-placeholder",H),T},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},88444:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(92880).extendFlat,o=r(67824).overrideAll,s=r(66741),l=r(31780).templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(t){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(88444),o=r(73712).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},14420:function(t,e,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=r(72736),c=r(31780).arrayEditor,u=r(84284).LINE_SPACING,f=r(73712),h=r(37400);function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function v(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?g(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),y(t,n,i,a,e),s||g(t,n,i,a,e))}function y(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(m,i,u,t).call(M,i,h,p),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),g(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(A,i)})),o.setTranslate(e,l.lx,l.ly)}function g(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),h=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,y=0,g=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?y=g.headerHeight+f.gapButtonHeader:d=g.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(y=-f.gapButtonHeader+f.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-g.openWidth);var b={x:g.lx+d+o.pad.l,y:g.ly+y+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(m,o,s,t).call(M,o,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(v(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(v(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(A,o),u.call(_,o)}))})),u.call(_,o),x?(T.w=Math.max(g.openWidth,g.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(g.openHeight,g.headerHeight)),T.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,p);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;uw,k=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=y+g;E+M>c&&(E=c-M);var z=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),T?(this.hbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:k,height:M}),this._hbarXMin=S+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=g>A,C=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,P=d+v,I=y;P+C>l&&(P=l-C);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:I,width:C,height:O}),this._vbarYMin=I+O/2,this._vbarTranslateMax=A-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?f+C+.5:f+.5,N=h-.5,j=T?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(T||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),T||L?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:y,width:v,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||L){var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(H),L&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},84284:function(t){"use strict";t.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"}}},36208:function(t){"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},48164:function(t){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(t){"use strict";t.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"}},69104:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(t){"use strict";t.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]}},87792:function(t){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(t){"use strict";t.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,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(t,e){"use strict";e.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"]],e.STYLE=e.CSS_DECLARATIONS.map((function(t){return t.join(": ")+"; "})).join("")},9616:function(t,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},64884:function(t,e,r){"use strict";e.version=r(25788).version,r(88324),r(79288);for(var n=r(24040),i=e.register=n.register,a=r(22448),o=Object.keys(a),s=0;s",""," "," "," plotly-logomark "," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(t,e){"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},11864:function(t,e,r){"use strict";var n=r(20435),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,v=l([r,n]);function y(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}v?(u=0,f=o,h=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},38116:function(t,e,r){"use strict";var n=r(83160).decode,i=r(63620),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(t){return o.isView(t)&&!(t instanceof s)}function c(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};var u={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function f(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){-1===(i.extras||[]).indexOf(t)?(d(t)&&(t=v(t)),t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)):e.set(t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){d(t)&&(t=v(t)),i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(s.get(t,r))}},angle:{coerceFunction:function(t,e,r){d(t)&&(t=v(t)),"auto"===t?e.set("auto"):n(t)?e.set(h(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||f(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!f(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(r),g=t.charAt(0);!c||"G"!==g&&"g"!==g||(t=t.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),A=t.match(w?x:m);if(!A)return u;var T=A[1],k=A[3]||"1",M=Number(A[5]||1),S=Number(A[7]||0),E=Number(A[9]||0),z=Number(A[11]||0);if(c){if(2===T.length)return u;var L;T=Number(T);try{var C=y.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===k.charAt(k.length-1);k=parseInt(k,10),L=C.newDate(T,C.toMonthIndex(T,k,O),M)}else L=C.newDate(T,Number(k),M)}catch(t){return u}return L?(L.toJD()-v)*f+S*h+E*p+z*d:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),k-=1;var P=new Date(Date.UTC(2e3,k,M,S,E));return P.setUTCFullYear(T),P.getUTCMonth()!==k||P.getUTCDate()!==M?u:P.getTime()+z*d},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==u};var A=90*f,T=3*h,k=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,m,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(t,f));try{a=y.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=g("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===u)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return z[r("%q")(i)]})),_(n))try{t=y.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var C=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return L(e,t,n,i)};var O=3*f;e.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+v,a=y.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-v)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+O);return c.setUTCMonth(c.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&y.getComponentMethod("calendars","getCal")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,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 h=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},e.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||v<0||v>1?null:{x:t+l*v,y:e+f*v}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,v=h*h+p*p,y=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,v,t-i,e-a),l(h,p,v,r-i,n-a));return Math.sqrt(y)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f0?p=i:h=i,f++}return a}},33040:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(72160),o=r(8932),s=r(22548).defaultLine,l=r(38116).isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,p,d,v,y=l(n),g=l(e),m=o.extractOpts(t),x=[];if(i=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):f,s=y?function(t,e){return void 0===t[e]?c:a(i(t[e]))}:f,p=g?function(t,e){return void 0===t[e]?1:h(t[e])}:h,y||g)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(t,e,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(57624).E9,o=r(38248),s=r(39032),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=t.exports={};f.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=r(22296),f.keyedContainer=r(37804),f.relativeAttr=r(23193),f.isPlainObject=r(63620),f.toLogRange=r(36896),f.relinkPrivateKeys=r(51528);var p=r(38116);f.isArrayBuffer=p.isArrayBuffer,f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=r(20435);f.mod=d.mod,f.modHalf=d.modHalf;var v=r(63064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var y=r(67555);f.dateTime2ms=y.dateTime2ms,f.isDateTime=y.isDateTime,f.ms2DateTime=y.ms2DateTime,f.ms2DateTimeLocal=y.ms2DateTimeLocal,f.cleanDate=y.cleanDate,f.isJSDate=y.isJSDate,f.formatDate=y.formatDate,f.incrementMonth=y.incrementMonth,f.dateTick0=y.dateTick0,f.dfltRange=y.dfltRange,f.findExactDates=y.findExactDates,f.MIN_MS=y.MIN_MS,f.MAX_MS=y.MAX_MS;var g=r(14952);f.findBin=g.findBin,f.sorterAsc=g.sorterAsc,f.sorterDes=g.sorterDes,f.distinctVals=g.distinctVals,f.roundUp=g.roundUp,f.sort=g.sort,f.findIndexOfMin=g.findIndexOfMin,f.sortObjectKeys=r(95376);var m=r(63084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.geometricMean=m.geometricMean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(52248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(11864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(98308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(92348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var A=r(92880);f.extendFlat=A.extendFlat,f.extendDeep=A.extendDeep,f.extendDeepAll=A.extendDeepAll,f.extendDeepNoArrays=A.extendDeepNoArrays;var T=r(24248);f.log=T.log,f.warn=T.warn,f.error=T.error;var k=r(53756);f.counterRegex=k.counter;var M=r(91200);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(52200);function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&o(t)&&t>=0&&t%1==0},f.noop=r(16628),f.identity=r(35536),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var R={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(R,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(F,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var j=/^[:|\|]/;function U(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,p="xother"===s||"yother"===s||c||h||u,d=s;(c||u)&&(d=d.substring(1)),(h||u)&&(d=d.substring(0,d.length-1));var v,y,g,m=null,x=null;if(n.parseMultDiv){var b=function(t){var e=t.match(B);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(d);d=b.key,m=b.op,x=b.number}if(p){if(void 0===(v=e[d]))return""}else for(g=3;g=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var V=2e9;f.seedPseudoRandom=function(){V=2e9},f.pseudoRandom=function(){var t=V;return V=(69069*V+1)%4294967296,Math.abs(V-t)<429496729?f.pseudoRandom():V/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var H=f.getFirefoxVersion(),q=null!==H&&H<86;f.getPositionFromD3Event=function(){return q?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},63620:function(t){"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},37804:function(t,e,r){"use strict";var n=r(22296),i=/^\w*$/;t.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},30988:function(t,e,r){"use strict";var n=r(33428);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},52248:function(t,e,r){"use strict";var n=r(36524);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},22296:function(t,e,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,v=r.length,y=r[0][0],g=r[0][1],m=0;for(u=1;uMath.max(f,y)||c>Math.max(h,g)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},5048:function(t,e,r){"use strict";var n=r(16576),i=r(28624);t.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}},34296:function(t,e,r){"use strict";var n=r(38248),i=r(25928);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o-1;s--){var l=a[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}},52416:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function f(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,h=0,p=e.length,d=0,v=p>1?(e[p-1]-e[0])/(p-1):1;for(o=v>=0?r?l:c:r?f:u,t+=v*s*(r?-1:1)*(v>=0?1:-1);h90&&i.log("Long binary search..."),h-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},e.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},43080:function(t,e,r){"use strict";var n=r(72160);t.exports=function(t){return t?n(t):[0,0,0,1]}},9188:function(t,e,r){"use strict";var n=r(2264),i=r(43616),a=r(3400),o=null;t.exports=function(){if(null!==o)return o;o=!1;var t=a.isIE()||a.isSafari()||a.isIOS();if(window.navigator.userAgent&&!t){var e=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"==typeof r)o=e.some((function(t){return r.apply(null,t)}));else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;o=e.some((function(t){var e=t[1];return l===e||l===e.toLowerCase()})),s.remove()}}return o}},72736:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(84284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,y){var S=t.text(),E=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),C=n.select(t.node().parentNode);if(!C.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",C.selectAll("svg."+O).remove(),C.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2===h||3===h){var p=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===h?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,o,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===h?MathJax.Hub.Queue((function(){return o=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:f},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),p,d,(function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})):3===h&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){p(),d(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}else i.warn("No MathJax version:",MathJax.version)}(E[2],o,(function(n,i,o){C.selectAll("svg."+O).remove(),C.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return P(),void e();var l=C.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:O,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,v=p.height;(d>c||v>u)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,v=p.height);var g=+t.attr("x"),m=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,g,m]+")"+a(-d/2,x-v/2)});else if("l"===O[0])m=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))g=0,m=x;else{var b=t.attr("text-anchor");g-=d*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}s.attr({x:g,y:m}),y&&y.call(t,l),e(l)}))}))):P(),t}function P(){C.empty()||(O=t.attr("class")+"-math",C.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(g," ");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag "+t+">.",e)}b.test(e)?u():(r=t,l=[{node:t}]);for(var E=e.split(m),C=0;C|>|>)/g,f=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},v="",y=["http:","https:","mailto:","",void 0,":"],g=e.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/
/i;e.BR_TAG_ALL=/
/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&z(n)}var M=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(m),a=[],o="",s=0,l=0;l3?a.push(c.substr(0,p-3)+"..."):a.push(c.substr(0,p));break}o=""}}return a.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z(t){return t.replace(E,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==y.indexOf(i)&&-1!==y.indexOf(a)?e:""}function C(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="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 t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=z,e.sanitizeHTML=function(t){t=t.replace(g," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(m),o=0;oa.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},36896:function(t,e,r){"use strict";var n=r(38248);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},59972:function(t,e,r){"use strict";var n=t.exports={},i=r(79552).locationmodeToLayer,a=r(55712).NO;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},11680:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(t){"use strict";t.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"}}},69820:function(t,e,r){"use strict";var n=r(24040);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(t);for(r=0;r3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(c(m))e.set(null);else{if(!Array.isArray(m))return a.warn("Unrecognized full array edit value",f,m),!0;e.set(m)}return!v&&(h(y,g),p(t),!0)}var x,b,_,w,A,T,k,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),z=E||[],L=u(g,f).get(),C=[],O=-1,P=z.length;for(x=0;xz.length-(k?0:1))a.warn("index out of range",f,_);else if(void 0!==T)A.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(T)?C.push(_):k?("add"===T&&(T={}),z.splice(_,0,T),L&&L.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)z.splice(C[x],1),L&&L.splice(C[x],1);if(z.length?E||e.set(z):e.set(null),v)return!1;if(h(y,g),d!==i){var I;if(-1===O)I=S;else{for(P=Math.max(z.length,P),I=[],x=0;x=O);x++)I.push(_);for(x=O;x=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),P(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function D(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var a in P(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var v=0;v-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function H(t,e,r){t=o.getGraphDiv(t),A.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(q(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(T.doLegend),a.layoutstyle&&s.push(T.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(T.doTicksRelayout),a.modebar&&s.push(T.doModeBar),a.camera&&s.push(T.doCamera),a.colorbars&&s.push(T.doColorBars),s.push(E)),s.push(h.rehover,h.redrag,h.reselect),c.add(t,H,[t,i.undoit],H,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function q(t,e,r){var n,i,a=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return o.coerce(n,i,v,t,e)},c={};for(var u in r.rangesAltered){var f=p.id2name(u);if(n=t.layout[f],i=a[f],d(n,i,l,c),i._matchGroup)for(var h in i._matchGroup)if(h!==u){var y=a[p.id2name(h)];y.autorange=i.autorange,y.range=i.range.slice(),y._input.range=i.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),d=Object.keys(e),v=p.list(t),y=o.extendDeepAll({},e),g={};for(V(e),d=Object.keys(e),n=0;n0&&"string"!=typeof P.parts[D];)D--;var R=P.parts[D],F=P.parts[D-1]+"."+R,j=P.parts.slice(0,D).join("."),U=s(t.layout,j).get(),H=s(l,j).get(),q=P.get();if(void 0!==I){T[O]=I,S[O]="reverse"===R?I:B(q);var G=f.getLayoutValObject(l,P.parts);if(G&&G.impliedEdits&&null!==I)for(var Z in G.impliedEdits)E(o.relativeAttr(O,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(O))if(I){E("autosize",null);var J="height"===O?"width":"height";E(J,l[J])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",I?null:l.width),E("height",I?null:l.height);else if(F.match(W))C(F),s(l,j+"._inputRange").set(null);else if(F.match(Y)){C(F),s(l,j+"._inputRange").set(null);var $=s(l,j).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(X)&&s(l,j+"._inputDomain").set(null);if("type"===R){z=U;var Q="linear"===H.type&&"log"===I,tt="log"===H.type&&"linear"===I;if(Q||tt){if(z&&z.range)if(H.autorange)Q&&(z.range=z.range[1]>z.range[0]?[1,2]:[2,1]);else{var et=z.range[0],rt=z.range[1];Q?(et<=0&&rt<=0&&E(j+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(j+".range[0]",Math.log(et)/Math.LN10),E(j+".range[1]",Math.log(rt)/Math.LN10)):(E(j+".range[0]",Math.pow(10,et)),E(j+".range[1]",Math.pow(10,rt)))}else E(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[P.parts[0]]&&"radialaxis"===P.parts[1]&&delete l[P.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,H,I,E),u.getComponentMethod("images","convertCoords")(t,H,I,E)}else E(j+".autorange",!0),E(j+".range",null);s(l,j+"._inputRange").set(null)}else if(R.match(M)){var nt=s(l,O).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,E),u.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=w.containerArrayMatch(O);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(I)?S[O]=null:w.isRemoveVal(I)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),k.update(_,st),g[r]||(g[r]={});var lt=g[r][n];lt||(lt=g[r][n]={}),lt[ot]=I,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),H.autorange?_.calc=!0:_.plot=!0):("dragmode"===O&&(!1===I&&!1!==q||!1!==I&&!1===q)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===I||"select"===I)&&"lasso"!==q&&"select"!==q||l._has("gl2d")?_.plot=!0:G?k.update(_,G):_.calc=!0,P.set(I))}}for(r in g)w.applyContainerArrayChanges(t,h(a,r),g[r],_,h)||(_.plot=!0);for(var ct in L){var ut=(z=p.getFromId(t,ct))&&z._constraintGroup;if(ut)for(var ft in _.calc=!0,ut)L[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}(K(t)||e.height||e.width)&&(_.plot=!0);var ht=l.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,u){function f(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,A.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var p,d,v=0;function y(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var g=[],m=null==e,x=Array.isArray(e);if(m||x||!o.isPlainObject(e)){if(m||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&ww)&&T.push(d);g=T}}g.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,y=(u[v]||d[v]||{}).name,g=e[n].name,m=u[y]||d[y];y&&g&&"number"==typeof g&&m&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(u[y]||d[y]).name+'" with a frame whose name of type "number" also equates to "'+y+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[v]={name:v},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],u=e.deleteTraces,f=t,h=[r,l],p=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][a]=s)}function f(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function h(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},39172:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=r(72736),l=r(73696),c=r(76308),u=r(43616),f=r(81668),h=r(45460),p=r(54460),d=r(84284),v=r(71888),y=v.enforce,g=v.clean,m=r(19280).doAutoRange,x="start",b=r(33816).zindexSeparator;function _(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&a[0]e[0])return!0}return!1}function w(t){var r,i,s,l,f,v,y=t._fullLayout,g=y._size,m=g.p,x=p.list(t,"",!0);if(y._paperdiv.style({width:t._context.responsive&&y.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":y.width+"px",height:t._context.responsive&&y.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":y.height+"px"}).selectAll(".main-svg").call(u.setSize,y.width,y.height),t._context.setBackground(t,y.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!y._has("cartesian"))return a.previousPromises(t);function w(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-m-n:e._offset+e._length+m+n:g.t+g.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:g.l+g.w*(t.position||0)+n%1}for(r=0;r.5?"t":"b",o=t._fullLayout.margin[a],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===t?("top"===r&&(a+=i),a+=n-e*n):("bottom"===r&&(a+=i),a+=e*n),a}(a,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>o?s:0}(t,e,v);if(y>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(t,e,r,n,i){var a="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=o.isTopAnchor(e)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(e)&&"t"===r||o.isBottomAnchor(e)&&"b"===r)&&lA?u.push({code:"unused",traceType:m,templateCount:w,dataCount:A}):A>w&&u.push({code:"reused",traceType:m,templateCount:w,dataCount:A})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=v(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&y(a)&&t(a,o)}}({data:p,layout:h},""),u.length)return u.map(g)}},67024:function(t,e,r){"use strict";var n=r(38248),i=r(36424),a=r(7316),o=r(3400),s=r(81792),l=r(37164),c=r(63268),u=r(25788).version,f={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(t,e){var r,h,p,d;function v(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!v("width")&&null!==e.width||!v("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var y={};function g(t,r){return o.coerce(e,y,f,t,r)}var m=g("format"),x=g("width"),b=g("height"),_=g("scale"),w=g("setBackground"),A=g("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var k=o.extendFlat({},h);x?k.width=x:null===e.width&&n(d.width)&&(k.width=d.width),b?k.height=b:null===e.height&&n(d.height)&&(k.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(T);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(T._fullLayout))}))}function z(){return new Promise((function(t,e){var r=l(T,m,_),n=T._fullLayout.width,f=T._fullLayout.height;function h(){i.purge(T),document.body.removeChild(T)}if("full-json"===m){var p=a.graphJson(T,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(A?p:s.encodeJSON(p))}if(h(),"svg"===m)return t(A?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),c({format:m,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(T,r,k,M).then(S).then(E).then(z).then((function(e){t(function(t){return A?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},21480:function(t,e,r){"use strict";var n=r(3400),i=r(7316),a=r(73060),o=r(20556).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;hx.length&&i.push(p("unused",a,g.concat(x.length)));var k,M,S,E,z,L=x.length,C=Array.isArray(T);if(C&&(L=Math.min(L,T.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(p("unused",a,g.concat(M,x[M].length)));var O=x[M].length;for(k=0;k<(C?Math.min(O,T[M].length):O);k++)S=C?T[M][k]:T,E=m[M][k],z=x[M][k],n.validate(E,S)?z!==E&&z!==+E&&i.push(p("dynamic",a,g.concat(M,k),E,z)):i.push(p("value",a,g.concat(M,k),E))}else i.push(p("array",a,g.concat(M),m[M]));else for(M=0;M1&&h.push(p("object","layout"))),i.supplyDefaults(d);for(var v=d._fullData,y=r.length,g=0;g0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p="start"===l,d="end"===l,v=t[r+"period0"],y=a(v,h)||0,g=[],m=[],x=[],b=i.length,_=0;_k;)T=o(T,-c,h);for(;T<=k;)T=o(T,c,h);A=o(T,-c,h)}else{for(T=y+(w=Math.round((k-y)/u))*u;T>k;)T-=u;for(;T<=k;)T+=u;A=T-u}g[_]=p?A:d?T:(A+T)/2,m[_]=A,x[_]=T}return{vals:g,starts:m,ends:x}}},26720:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(39032).FP_SAFE,s=r(24040),l=r(43616),c=r(79811),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=y(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,v=f[0].val;for(r=1;r0&&((k=L-s(b)-l(_))>C?M/k>O&&(w=b,A=_,O=M/k):M/L>O&&(w={val:b.val,nopad:1},A={val:_.val,nopad:1},O=M/L));if(h===v){var P=h-1,I=h+1;if(E)if(0===h)i=[0,1];else{var D=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),R=h/(1-Math.min(.5,D/L));i=h>0?[0,R]:[R,0]}else i=z?[Math.max(0,P),Math.max(1,I)]:[P,I]}else E?(w.val>=0&&(w={val:0,nopad:1}),A.val<=0&&(A={val:0,nopad:1})):z&&(w.val-O*s(w)<0&&(w={val:0,nopad:1}),A.val<=0&&(A={val:1,nopad:1})),O=(A.val-w.val-p(e,b.val,_.val))/(L-s(w)-l(A)),i=[w.val-O*s(w),A.val+O*l(A)];return i=T(i,e),e.limitRange&&e.limitRange(),m&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=k((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=k(r.vpadplus||r.vpad),z=k(r.vpadminus||r.vpad);if(!A){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=O;n--)C(n);return{min:d,max:v,opts:r}},concatExtremes:y};var v=3;function y(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function b(t){return i(t)&&Math.abs(t)=e}function A(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))=c&&(o=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&A(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&A(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&A(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&A(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},76808:function(t){"use strict";t.exports=function(t,e,r){var n,i;if(r){var a="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[a?1:0],i=r[a?0:1]}var o=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},54460:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,c=r(72736),u=r(81668),f=r(76308),h=r(43616),p=r(94724),d=r(98728),v=r(39032),y=v.ONEMAXYEAR,g=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,A=v.ONEAVGMONTH,T=v.ONEMINMONTH,k=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,z=v.ONEMIN,L=v.ONESEC,C=v.ONEMILLI,O=v.ONEMICROSEC,P=v.MINUS_SIGN,I=v.BADNUM,D={K:"zeroline"},R={K:"gridline",L:"path"},F={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},N={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=r(84284),V=U.MID_SHIFT,H=U.CAP_SHIFT,q=U.LINE_SPACING,G=U.OPPOSITE_SIDE,W=t.exports={};W.setConvert=r(78344);var Y=r(52976),X=r(79811),Z=X.idSort,K=X.isLinked;W.id2name=X.id2name,W.name2id=X.name2id,W.cleanId=X.cleanId,W.list=X.list,W.listIds=X.listIds,W.getFromId=X.getFromId,W.getFromTrace=X.getFromTrace;var J=r(19280);W.getAutoRange=J.getAutoRange,W.findExtremes=J.findExtremes;var $=1e-4;function Q(t){var e=(t[1]-t[0])*$;return[t[0]-e,t[1]+e]}W.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},W.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},W.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==W.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=W.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},W.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:W.getFromId(e,r).cleanPos)(t)},W.redrawComponents=function(t,e){e=e||W.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;un&&h2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},W.saveRangeInitial=function(t,e){for(var r=W.list(t,"",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=W.tickIncrement(t,"M6","reverse")+1.5*M:a.exactMonths>.8?t=W.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=W.tickIncrement(t,r);if(l<=n)return l}return t}(m,t,g,c,a)),y=m;y<=u;)y=W.tickIncrement(y,g,!1,a);return{start:e.c2r(m,0,a),end:e.c2r(y,0,a),size:g,_dataSpan:u-c}},W.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=W.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,W.prepTicks(t,r),a){var c=i(e.dtick),u=i(t.dtick),f=c?e.dtick:+e.dtick.substring(1),h=u?t.dtick:+t.dtick.substring(1);c&&u?nt(f,h)?f===2*k&&h===2*M&&(t.dtick=k):f===2*k&&h===3*M?t.dtick=k:f!==k||(e._input.minor||{}).nticks?it(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=M:"M"===String(e.dtick).charAt(0)?u?t.dtick="M1":nt(f,h)?f>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?nt(f,h)||(t.dtick=it(f/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},W.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,W.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=W.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtickt.range[1],p=!t.ticklabelindex||s.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],d=s.simpleMap(t.range,t.r2l,void 0,void 0,e),v=d[1]=(V?0:1);H--){var q=!H;H?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var G=H?t:s.extendFlat({},t,t.minor);if(q?W.prepMinorTicks(G,t,e):W.prepTicks(G,e),"array"!==G.tickmode)if("sync"!==G.tickmode){var Y=Q(d),X=Y[0],Z=Y[1],K=i(G.dtick),J="log"===l&&!(K||"L"===G.dtick.charAt(0)),$=W.tickFirst(G,e);if(H){if(t._tmin=$,$=Z:nt<=Z;nt=W.tickIncrement(nt,it,v,c)){if(H&&tt++,G.rangebreaks&&!v){if(nt=D)break}if(N.length>R||nt===rt)break;rt=nt;var at={value:nt};H?(J&&nt!==(0|nt)&&(at.simpleLabel=!0),u>1&&tt%u&&(at.skipLabel=!0),N.push(at)):(at.minor=!0,j.push(at))}}else N=[],F=st(t);else H?(N=[],F=lt(t,!q)):(j=[],B=lt(t,!q))}!j||j.length<2?p=!1:(r=(j[1].value-j[0].value)*(h?-1:1),n=t.tickformat,(/%f/.test(n)?r>=O:/%L/.test(n)?r>=C:/%[SX]/.test(n)?r>=L:/%M/.test(n)?r>=z:/%[HI]/.test(n)?r>=E:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=M:/%[UVW]/.test(n)?r>=k:/%[Bbm]/.test(n)?r>=T:/%[q]/.test(n)?r>=_:!/%[Yy]/.test(n)||r>=m)||(p=!1));if(p){var ot=N.concat(j);f&&N.length&&(ot=ot.slice(1)),(ot=ot.sort((function(t,e){return t.value-e.value})).filter((function(t,e,r){return 0===e||t.value!==r[e-1].value}))).map((function(t,e){return void 0!==t.minor||t.skipLabel?null:e})).filter((function(t){return null!==t})).forEach((function(t){p.map((function(e){var r=t+e;r>=0&&r0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=m?h=u>=m&&u<=y?u:g:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=T?h=u>=T&&u<=w?u:A:r===k&&f>=k?h=k:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,v=0;v<84;v++){var z=(v+.5)/84;e.maskBreaks(i*(1-z)+z*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>k&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(U,t,t._definedDelta),t.rangebreaks){var yt="y"===t._id.charAt(0),gt=1;"auto"===t.tickmode&&(gt=t.tickfont?t.tickfont.size:12);var mt=NaN;for(a=N.length-1;a>-1;a--)if(N[a].drop)N.splice(a,1);else{N[a].value=Ft(N[a].value,t);var xt=t.c2p(N[a].value);(yt?mt>xt-gt:mtD||nD&&(r.periodX=D),n
10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=z&&a<=16||e>=E)t._tickround="M";else if(e>=L&&a<=19||e>=z)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(bt(t.exponentformat)&&!_t(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function mt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}W.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>g)e/=g,n=a(10),t.dtick="M"+12*yt(e,n,ct);else if(o>A)e/=A,t.dtick="M"+yt(e,1,ut);else if(o>M){if(t.dtick=yt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ht),!r){var l=W.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=yt(e,E,ut):o>z?t.dtick=yt(e,z,ft):o>L?t.dtick=yt(e,L,ft):(n=a(10),t.dtick=yt(e,n,ct))}else if("log"===t.type){t.tick0=0;var u=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(u[1]-u[0])<1){var f=1.5*Math.abs((u[1]-u[0])/e);e=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/f,n=a(10),t.dtick="L"+yt(e,n,ct)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Rt(t)?(t.tick0=0,n=1,t.dtick=yt(e,n,vt)):(t.tick0=0,n=a(10),t.dtick=yt(e,n,ct));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},W.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?dt:pt,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},W.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var p=s.simpleMap(t.range,t.r2l),d=(Math.abs(p[1]-p[0])-(t._lBreaks||0))/1e4;for(a=0;a ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)e.text=wt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||bt(p)&&_t(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":P)+h:(e.text=wt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,y):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):Rt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=wt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=wt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=P+e.text)}}}}(t,o,r,c,y):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=wt(e.x,t,i,n)}(t,o,0,c,y),n||(t.tickprefix&&!v(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!v(t.showticksuffix)&&(o.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(o.text)){var g=t.labelalias[o.text];"string"==typeof g&&(o.text=g)}return("boundaries"===t.tickson||t.showdividers)&&(o.xbnd=[h(o.x-.5),h(o.x+t.dtick-.5)]),o},W.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return W.hoverLabelText(t,n,r)+" - "+W.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=W.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var xt=["f","p","n","μ","m","","k","M","G","T"];function bt(t){return"SI"===t||"B"===t}function _t(t){return t>14||t<-15}function wt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=W.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};gt(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"":"B"===l&&9===c?t+="B":bt(l)&&(t+=xt[c/3+5])),a?P+t:t}function At(t,e){if(t){var r=Object.keys(j).reduce((function(t,r){return-1!==e.indexOf(r)&&j[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function Tt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=W.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=W.drawOne(t,n,r);return n._shiftPusher&&jt(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},W.drawOne=function(t,e,r){var n,i,l,p=(r=r||{}).axShifts||{},d=r.overlayingShiftedAx||[];e.setScale();var v=t._fullLayout,y=e._id,g=y.charAt(0),m=W.counterLetter(y),x=v._plots[e._mainSubplot];if(x){if(e._shiftPusher=e.autoshift||-1!==d.indexOf(e._id)||-1!==d.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var b=e.linewidth/2||0;"inside"===e.ticks&&(b+=e.ticklen),jt(e,b,p,!0),jt(e,e.shift||0,p,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,p));var _=x[g+"axislayer"],w=e._mainLinePosition,A=w+=e._shift,T=e._mainMirrorPosition,k=e._vals=W.calcTicks(e),M=[e.mirror,A,T].join("_");for(n=0;n0?r.bottom-u:0,f))));var h=0,p=0;if(e._shiftPusher&&(h=Math.max(f,r.height>0?"l"===l?u-r.left:r.right-u:0),e.title.text!==v._dfltTitle[g]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(p+=St(e))),e._fullDepth=Math.max(h,p)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1],y="number"==typeof e._shift?e._shift:0;if("x"===g){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,f),d.reverse()),r.width>0){var x=r.right-(e._offset+e._length);x>0&&(n.xr=1,n.r=x);var b=e._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(e._depth=Math.max(r.height>0?u-r.left:0,f),n[l]=e._depth-y):(e._depth=Math.max(r.height>0?r.right-u:0,f),n[l]=e._depth+y,d.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.b=_);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[m]="free"===e.anchor?e.position:e._anchorAxis.domain[d[0]],e.title.text!==v._dfltTitle[g]&&(n[l]+=St(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=f),!0===e.mirror||"ticks"===e.mirror?i[m]=e._anchorAxis.domain[d[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[m]=[e._counterDomainMin,e._counterDomainMax][d[1]]))}ft&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(At(n,e.automargin),At(i,e.automargin)),a.autoMargin(t,Lt(e),n),a.autoMargin(t,Ct(e),i),a.autoMargin(t,Ot(e),s)})),s.syncOrAsync(ct)}}function ht(t){var r=y+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,a,o;if(t._selections[e].size())n=1/0,i=-1/0,a=1/0,o=-1/0,t._selections[e].each((function(){var t=zt(this),e=h.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),a=Math.min(a,e.left),o=Math.max(o,e.right)}));else{var s=W.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(e,r,A)),S[r]}},W.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},W.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},W.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(u+=h*H,f+=(t.linewidth||0)/2),(i||a)&&(u+=(t.linewidth||0)/2,f+=3),s&&"top"===c&&(f-=h*(1-H)),(i||n)&&(u=-u),"bottom"!==c&&"right"!==c||(f=-f),[l?u:0,s?f:0]}(t),r=t.ticklabelshift||0,n=t.ticklabelstandoff||0,i=e[0],a=e[1],o=t.range[0]>t.range[1],s=t.ticklabelposition&&-1!==t.ticklabelposition.indexOf("inside"),c=!s;if(r&&(r*=o?-1:1),n){var u=t.side;n*=s&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===t._id.charAt(0)?function(e){return l(i+t._offset+t.l2p(kt(e))+r,a+n)}:function(e){return l(a+n,i+t._offset+t.l2p(kt(e))+r)}},W.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},W.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),c=a("right"),u=a("bottom")||l||o||c,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,v=h?t.ticklen:0;if(f?v*=-1:u&&(v=0),h&&(p+=v,r)){var y=s.deg2rad(r);p=v*Math.cos(y)+1,d=v*Math.sin(y)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var g,m,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},A=0,T=t.side,k=t._id.charAt(0),M=t.tickangle;if("x"===k)b=(_=!f&&"bottom"===T||f&&"top"===T)?1:-1,f&&(b*=-1),g=d*b,m=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=V:x=-90===M&&"bottom"===T?H:90===M&&"top"===T?V:.5,A=V/2*(M/90)),w.xFn=function(t){return t.dx+g+A*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===k){if(b=(_=!f&&"left"===T||f&&"right"===T)?1:-1,f&&(b*=-1),g=p,m=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===T||90===M&&"right"===T?H:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);A=Math.abs(Math.sin(E))*H*b,x=0}}w.xFn=function(t){return t.dx+e-(g+t.fontSize*x)*b+A*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*V},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},W.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Mt);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Nt(e,[B]),o.attr("transform",r.transFn)},W.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&W.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,u=0;u=0;g--){var m=g?v:y;if(m){var x=m.selectAll("path."+i).data(g?s:o,Mt);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?d:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Nt(e,[R,F])}},W.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=W.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Z(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,e.zerolinecolor||f.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Nt(e,[D])},W.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,u=r.cls||o+"tick",f=r.vals.filter((function(t){return t.text})),p=r.labelFns,d=r.secondary?0:e.tickangle,v=(e._prevTickAngles||{})[u],y=r.layer.selectAll("g."+u).data(e.showticklabels?f:[],Mt),g=[];function m(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),u=p.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(t)+","+(p.yFn(t)-t.fontSize/2)+")":""),d=c.lineCount(o),v=q*t.fontSize,y=p.heightFn(t,i(a)?+a:0,(d-1)*v);if(y&&(f+=l(0,y)),s.empty()){var g=o.select("text");g.attr({transform:f,"text-anchor":u}),g.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var m=h.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",f+l(m,0))}}))}y.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,p.xFn(e),p.yFn(e)).call(h.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant,textcase:e.fontTextcase,lineposition:e.fontLineposition,shadow:e.fontShadow}).text(e.text).call(c.convertToTspans,t),t._promises[i]?g.push(t._promises.pop().then((function(){m(r,d)}))):m(r,d)})),Nt(e,[N]),y.exit().remove(),r.repositionOnUpdate&&y.each((function(t){n.select(this).select("text").call(c.positionText,p.xFn(t),p.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,c=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(e.range,e.r2l);l=e.l2p(u[0])+e._offset,c=e.l2p(u[1])+e._offset}var f=Math.min(l,c),p=Math.max(l,c),d=e.side,v=1/0,g=-1/0;for(var m in y.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},m(y,v+1?v:d);var x=null;e._selections&&(e._selections[u]=y);var b=[function(){return g.length&&Promise.all(g)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(y,v)}))):b.push((function(){if(m(y,d),f.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){x=e.autotickangles[0];var t,n=0,i=[],a=1;y.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=zt(this),s=h.bBox(o.node());a=Math.max(a,c.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var o=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=f.length,u=Math.abs((f[l-1].x-f[0].x)*e._m)/(l-1),p=o?u/2:u,v=o?e.ticklen:1.25*n*a,g=p/Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),b=e.autotickangles.map((function(t){return t*Math.PI/180})),_=b.find((function(t){return Math.abs(Math.cos(t))<=g}));void 0===_&&(_=b.reduce((function(t,e){return Math.abs(Math.cos(t))j*I&&(C=I,E[S]=z[S]=O[S])}var U=Math.abs(C-L);U-T>0?T*=1+T/(U-=T):T=0,"y"!==e._id.charAt(0)&&(T=-T),E[M]=w.p2r(w.r2p(z[M])+k*T),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var V=s.syncOrAsync(b);return V&&V.then&&t._promises.push(V),V},W.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},W.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===I)&&(Et(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=W.counterLetter(e._id),l=e._offset+(Math.abs(n[0])1)for(n=1;n2*o}(i,e))return"date";var y="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,y)?"category":function(t,e){for(var r=t.length,n=0;n=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=_(o[s])){u=g;break}var f=i("pattern",u);if(f===g)for(s=0;s<2;s++)(c=_(o[s]))&&(e.bounds[s]=o[s]=c-1);if(f)for(s=0;s<2;s++)switch(c=o[s],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=c;break;case m:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=o[s]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},22416:function(t,e,r){"use strict";var n=r(38116).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o=t.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,c=r("categoryorder",a);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function y(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||A)for(r=0;rP&&FC&&(C=F);h/=(C-L)/(2*O),L=l.l2r(L),C=l.l2r(C),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function H(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,C)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function W(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,v=0;v=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||gt||qt(),yt)o.indexOf("select")>-1&&S(r,i,K,J,e.id,Ct),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&>){var s=v?P:O,c="s"===v||"w"===g?0:1,f=s._name+".range["+c+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,c),d="left",y="middle";if(s.fixedrange)return;v?(y="n"===v?"top":"bottom","right"===s.side&&(d="right")):"e"===g&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:y}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,f,e)}))}}}function It(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St="",At.r=At.l,At.t=At.b,zt.attr("d","M0,0Z")}if(At.l=Math.min(_t,n),At.r=Math.max(_t,n),At.t=Math.min(wt,i),At.b=Math.max(wt,i),rt.isSubplotConstrained)a>C||o>C?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?At.t=wt-o:At.b=wt+o):(a=o*tt/et,_t>n?At.l=_t-a:At.r=_t+a),zt.attr("d",G(At))):s();else if(nt.isSubplotConstrained)if(a>C||o>C){St="xy";var l=Math.min(At.l/tt,(et-At.b)/et),c=Math.max(At.r/tt,(et-At.t)/et);At.l=l*tt,At.r=c*tt,At.b=(1-l)*et,At.t=(1-c)*et,zt.attr("d",G(At))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;u1&&(void 0!==a.maxallowed&&st===(a.range[0]1&&(void 0!==o.maxallowed&<===(o.range[0]0){var y=p.id;if(-1!==y.indexOf(d))continue;y+=d+(u+1),p=a.extendFlat({},p,{id:y,plot:o._cartesianlayer.selectAll(".subplot").select("."+y)})}for(var g,m=[],x=0;x1&&(w+=d+_),b.push(n+w),r=0;rb[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},42568:function(t,e,r){"use strict";var n=r(85024);t.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},96312:function(t,e,r){"use strict";var n=r(76808);t.exports=function(t,e,r,i){var a=e._template||{},o=e.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,u=e.getAutorangeDflt(l,i),f=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==f&&!0!==f)&&(null===l[0]||"min"!==f&&"max reversed"!==f)&&(null===l[1]||"max"!==f&&"min reversed"!==f)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(f=r("autorange",u=e.getAutorangeDflt(l,i))),f&&(n(r,f,l),"linear"!==o&&"-"!==o||r("rangemode")),e.cleanRange()}},21160:function(t,e,r){"use strict";var n=r(84284).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},78344:function(t,e,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(3400),o=a.numberFormat,s=r(38248),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=r(39032),d=p.FP_SAFE,v=p.BADNUM,y=p.LOG_CLIP,g=p.ONEWEEK,m=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=r(79811),A=r(33816),T=A.HOUR_PATTERN,k=A.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*y*Math.abs(n-i))}return v}function z(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===v){if(!s(e))return v;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function L(e,r,n){return c(e,r,n||t.calendar)}function C(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return v}function P(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=P(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:P(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):v},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j="y"===p;B=function(e){if(!s(e))return v;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?E:f,t.l2c="log"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p="log"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=z,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(z(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,v,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=C,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return C(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=C,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=P,t.l2r=t.c2r=f,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return C(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),u=t.l2r(n);if(void 0!==r){var f=c+1;void 0!==n&&(f=Math.min(f,u)),i[s?1:0]=f}if(void 0!==n){var h=u+1;void 0!==r&&(h=Math.max(h,c)),i[s?0:1]=h}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===p?A.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||A.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],c=null===o[1];for("date"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],v,t.calendar),o[1]=a.cleanDate(o[1],v,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!a.isDateTime(o[n],t.calendar)){t[e]=i;break}if(t.r2l(o[0])===t.r2l(o[1])){var u=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(u-1e3),o[1]=t.l2r(u+1e3);break}}else{if(!s(o[n])){if(l||c||!s(o[1-n])){t[e]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f="y"===p;if(f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function y(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),v=a.simpleMap(e.xr1,i.r2l),y=d[1]-d[0],g=v[1]-v[0];p[0]=(d[0]*(1-r)+r*v[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*g/y),i.range[0]=i.l2r(d[0]*(1-r)+r*v[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*v[1])}else p[0]=0,p[2]=c;if(h){var m=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=m[1]-m[0],_=x[1]-x[0];p[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(m[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(m[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,A=h?u/p[3]:1,T=f?p[0]:0,k=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,z=l._offset-S;n.clipRect.call(o.setTranslate,T,k).call(o.setScale,1/w,1/A),n.plot.call(o.setTranslate,E,z).call(o.setScale,w,A),o.setPointGroupScale(n.zoomScalePts,1/w,1/A),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/A)}s.redrawComponents(t)}},14944:function(t,e,r){"use strict";var n=r(24040).traceIs,i=r(52976);function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",f=c[u],h={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,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){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}t.exports=function(t){return new M(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,v=p._ax,g=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n="geo"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),u&&l.clipAngle(u-w.clipPad),l}(n),m=[[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=f.rotation||{},_=h.range||[],A=p.range||[];if(n.fitbounds){d._length=m[1][0]-m[0][0],v._length=m[1][1]-m[0][1],d.range=y(r,d),v.range=y(r,v);var T=(d.range[0]+d.range[1])/2,k=(v.range[0]+v.range[1])/2;if(n._isScoped)x={lon:T,lat:k};else if(n._isClipped){x={lon:T,lat:k},b={lon:T,lat:k,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,z=w.lataxisSpan[M]/2||90;_=[T-S,T+S],A=[k-z,k+z]}else x={lon:T,lat:k},b={lon:T,lat:b.lat,roll:b.roll}}g.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var L=E(_,A);g.fitExtent(m,L);var C=this.bounds=g.getBounds(L),O=this.fitScale=g.scale(),P=g.translate();if(n.fitbounds){var I=g.getBounds(E(d.range,v.range)),D=Math.min((C[1][0]-C[0][0])/(I[1][0]-I[0][0]),(C[1][1]-C[0][1])/(I[1][1]-I[0][1]));isFinite(D)?g.scale(D*O):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else g.scale(f.scale*O);var R=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(g.translate([P[0]+(R[0]-P[0]),P[1]+(R[1]-P[1])]).clipExtent(C),n._isAlbersUsa){var F=g([x.lon,x.lat]),B=g.translate();g.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return"lonaxis"===t||"lataxis"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e["show"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(".layer").data(u,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append("g").attr("class",(function(t){return"layer "+t})).each((function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):c(t)&&(o[t]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(k(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];"lonaxis"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):"lataxis"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};v.setConvert(l,r);var c=v.calcTicks(l);e.isScoped||"lonaxis"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,u),s.indexOf("event")>-1&&p.click(i,n.event))}))}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},10816:function(t,e,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(43520),o="geo",s=i(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(40384),supplyLayoutDefaults:r(86920),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[o],s=0;s0&&C<0&&(C+=360);var O,P,I,D=(L+C)/2;if(!p){var R=d?f.projRotate:[D,0,0];O=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(P=-96.6,I=38.7):(P=d?D:O,I=(z[0]+z[1])/2),r("center.lon",P),r("center.lat",I),v&&(r("projection.tilt"),r("projection.distance")),y&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),d||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):g?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}t.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},79248:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(24040),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r=u(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,v,y=u(0,e);function g(t){return e.invert(t)}function m(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return y.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=g(r)})).on("zoom",(function(){if(h=n.mouse(this),function(t){var r=g(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return y.scale(e.scale()),void y.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?g(h)&&(d=g(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=g(r=h),v=!0,t.render(!0);var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.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),v&&f(t,e,m)})),y}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),h=function(t){for(var e=0,r=arguments.length,i=[];++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var v=180-a-2*p,g=(Math.atan2(h,u)-Math.atan2(c,i))*s,x=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return y(r[0],r[1],a,g)<=y(r[0],r[1],v,x)?[a,g,r[2]]:[v,x,r[2]]}(A,r,E);isFinite(T[0])&&isFinite(T[1])&&isFinite(T[2])||(T=E),e.rotate(T),E=T}}else r=v(e,M=b);h.of(this,arguments)({type:"zoom"})})),k=h.of(this,arguments),p++||k({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(c),d.call(a,"zoom",null),r=h.of(this,arguments),--p||r({type:"zoomend"}),f(t,e,g)})).on("zoom.redraw",(function(){t.render(!0);var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(a,h,"on")}function v(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function y(t,e,r,n){var i=g(r-t),a=g(n-e);return Math.sqrt(i*i+a*a)}function g(t){return(t%360+540)%360-180}function m(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function x(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(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(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=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(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(y(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(y(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(y="turntable"):y="turntable")}else y="turntable";r("dragmode",y),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},346:function(t,e,r){"use strict";var n=r(86140),i=r(86968).u,a=r(92880).extendFlat,o=r(3400).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(t,e,r){"use strict";var n=r(43080),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new a;return e.merge(t),e}},87152:function(t,e,r){"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.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/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g," "));l[c]=p,u.tickmode=f}}for(e.ticks=l,c=0;c<3;++c)for(o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},T.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,v=0;v")):"isosurface"===t.type||"volume"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),E.push("value: "+T.valueLabel),h.textLabel&&E.push(h.textLabel),x=E.join("
")):x=h.textLabel;var z={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:A};d.appendArrayPointValue(z,_,A),t._module.eventData&&(z=_._module.eventData(z,h,_,{},A));var L={points:[z]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*m[0]/m[3])*s,y:(.5-.5*m[1]/m[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,A,"bgcolor")||u.color,borderColor:d.castHoverOption(_,A,"bordercolor"),fontFamily:d.castHoverOption(_,A,"font.family"),fontSize:d.castHoverOption(_,A,"font.size"),fontColor:d.castHoverOption(_,A,"font.color"),nameLength:d.castHoverOption(_,A,"namelength"),textAlign:d.castHoverOption(_,A,"align"),hovertemplate:f.castOption(_,A,"hovertemplate"),hovertemplateLabels:f.extendFlat({},z,T),eventData:[z]},{container:n,gd:r,inOut_bbox:C}),z.bbox=C[0]}h.distance<5&&(h.buttons||w)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},T.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var M=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=M[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][o])g[0][o]=-1,g[1][o]=1;else{var O=g[1][o]-g[0][o];g[0][o]-=O/32,g[1][o]+=O/32}if(b=[g[0][o],g[1][o]],b=_(b,l),g[0][o]=b[0],g[1][o]=b[1],l.isReversed()){var P=g[0][o];g[0][o]=g[1][o],g[1][o]=P}}else b=l.range,g[0][o]=l.r2l(b[0]),g[1][o]=l.r2l(b[1]);g[0][o]===g[1][o]&&(g[0][o]-=1,g[1][o]+=1),m[o]=g[1][o]-g[0][o],l.range=[g[0][o],g[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var I=u.aspectmode;if("cube"===I)y=[1,1,1];else if("manual"===I){var D=u.aspectratio;y=[D.x,D.y,D.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(o=0;o<3;++o){var F=x[c=(l=u[M[o]]).type];R[o]=Math.pow(F.acc,1/F.count)/p[o]}y="data"===I||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}u.aspectratio.x=f.aspectratio.x=y[0],u.aspectratio.y=f.aspectratio.y=y[1],u.aspectratio.z=f.aspectratio.z=y[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 B=u.domain||null,N=e._size||null;if(B&&N){var j=n.container.style;j.position="absolute",j.left=N.l+B.x[0]*N.w+"px",j.top=N.t+(1-B.y[1])*N.h+"px",j.width=N.w*(B.x[1]-B.x[0])+"px",j.height=N.h*(B.y[1]-B.y[0])+"px"}n.glplot.redraw()}},T.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},T.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},T.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},T.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},T.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,c=s.isCameraChanged(t),h=s.isAspectChanged(t),p=c||h;if(p){var d={};c&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+".camera")).get(),d[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,l._preGUI,d),c&&(r.set(e),f.nestedProperty(l,s.id+".camera").set(e)),h&&(a.set(i),f.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},T.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,c=o.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var h=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[h]=p;var v=i.layout;u.call("_storeDirectGUIEdit",v,a._preGUI,d),o.up=p,f.nestedProperty(v,h).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},T.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,a);switch(u.data.set(o),c.putImageData(u,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},T.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},T.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t._mockAxis,e)},t.exports=A},52094:function(t){"use strict";t.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;aOpenStreetMap contributors',o=['© Carto',a].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:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],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:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],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);t.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 @plotly/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\')'}}},89032:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){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}}},33688:function(t,e,r){"use strict";var n=r(3480),i=r(3400),a=i.strTranslate,o=i.strScale,s=r(84888).KY,l=r(9616),c=r(33428),u=r(43616),f=r(72736),h=r(14440),p="mapbox",d=e.constants=r(47552);function v(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://")||0===t.indexOf("stamen"))}e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=i.counterRegex(p),e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=r(5232),e.supplyLayoutDefaults=r(5976),e.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots[p];if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;lw/2){var A=m.split("|").join("
");b.text(A).attr("data-unformatted",A).call(f.convertToTspans,t),_=u.bBox(b.node())}b.attr("transform",a(-3,8-_.height)),x.insert("rect",".static-attribution").attr({x:-_.width-6,y:-_.height-3,width:_.width+6,height:_.height+3,fill:"rgba(255, 255, 255, 0.75)"});var T=1;_.width+6>w&&(T=w/(_.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];x.attr("transform",a(k[0],k[1])+o(T))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=0;n0){for(var r=0;r0}function u(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&y(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&c.click(n,e.originalEvent)}}},b.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),h(o)||f(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},b.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&I.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(h,s,u,n),w.cleanPlot(h,s,u,n);var N=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,V=!(!s._has||!s._has("cartesian"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&v({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var u=1-2*s;n=Math.round(u*n),i=Math.round(u*i)}}var h=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n1,v=!e.height&&Math.abs(r.height-i)>1;(v||d)&&(d&&(r.width=n),v&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(u),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),u.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(f.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(p){var m=(r.t+r.b)/p;m>1&&(r.t/=m,r.b/=m)}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,A=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+y},r:{val:b,size:r.r+y},b:{val:A,size:r.b+y},t:{val:_,size:r.t+y}},v[e]=1}else delete d[e],delete v[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),O(e);var i=e._size,a=e.margin,s={t:0,b:0,l:0,r:0},c=f.extendFlat({},i),u=a.l,h=a.r,p=a.t,v=a.b,y=e._pushmargin,g=e._pushmarginIds,m=e.minreducedwidth,x=e.minreducedheight;if(!1!==a.autoexpand){for(var b in y)g[b]||delete y[b];var _=t._fullLayout._reservedMargin;for(var A in _)for(var T in _[A]){var k=_[A][T];s[T]=Math.max(s[T],k)}for(var M in y.base={l:{val:0,size:u},r:{val:1,size:h},t:{val:1,size:p},b:{val:0,size:v}},s){var S=0;for(var E in y)"base"!==E&&o(y[E][M].size)&&(S=y[E][M].size>S?y[E][M].size:S);var z=Math.max(0,a[M]-S);s[M]=Math.max(0,s[M]-z)}for(var L in y){var C=y[L].l||{},P=y[L].b||{},I=C.val,D=C.size,R=P.val,F=P.size,B=r-s.r-s.l,N=n-s.t-s.b;for(var j in y){if(o(D)&&y[j].r){var U=y[j].r.val,V=y[j].r.size;if(U>I){var H=(D*U+(V-B)*I)/(U-I),q=(V*(1-I)+(D-B)*(1-U))/(U-I);H+q>u+h&&(u=H,h=q)}}if(o(F)&&y[j].t){var G=y[j].t.val,W=y[j].t.size;if(G>R){var Y=(F*G+(W-N)*R)/(G-R),X=(W*(1-R)+(F-N)*(1-G))/(G-R);Y+X>v+p&&(v=Y,p=X)}}}}}var Z=f.constrain(r-a.l-a.r,2,m),K=f.constrain(n-a.t-a.b,2,x),J=Math.max(0,r-Z),$=Math.max(0,n-K);if(J){var Q=(u+h)/J;Q>1&&(u/=Q,h/=Q)}if($){var tt=(v+p)/$;tt>1&&(v/=tt,p/=tt)}if(i.l=Math.round(u)+s.l,i.r=Math.round(h)+s.r,i.t=Math.round(p)+s.t,i.b=Math.round(v)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=d.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],a=f.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},w.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(f.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=u(t[a],e)}else e&&(i[a]="_function")})),i}var a=Array.isArray(t),o=f.isTypedArray(t);if((a||o)&&t.dtype&&t.shape){var l=t.bdata;return u({dtype:t.dtype,shape:t.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map((function(t){return u(t,e)})):o?f.simpleMap(t,f.identity):f.isJSDate(t)?f.ms2DateTimeLocal(+t):t}var h={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(h.layout=u(l),i)){var p=l._size;h.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return c&&(h.frames=u(c)),a&&(h.config=u(t._context,!0)),"object"===n?h:JSON.stringify(h)},w.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:p,y:p}]),o[0].t||(o[0].t={}),o[0].trace=r,h[e]=o}}for(R(o,s,u),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=90||i>90&&a>=450?1:s<=0&&c<=0?0:Math.max(s,c),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&c>=0?0:Math.min(s,c),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),e]}(d),_=b[2]-b[0],w=b[3]-b[1],A=p/h,T=Math.abs(w/_);A>T?(v=h,x=(p-(y=h*T))/i.h/2,g=[s[0],s[1]],m=[f[0]+x,f[1]-x]):(y=p,x=(h-(v=p/T))/i.w/2,g=[s[0]+x,s[1]-x],m=[f[0],f[1]]),r.xLength2=v,r.yLength2=y,r.xDomain2=g,r.yDomain2=m;var k,M=r.xOffset2=i.l+i.w*g[0],S=r.yOffset2=i.t+i.h*(1-m[1]),E=r.radius=v/_,z=r.innerRadius=r.getHole(e)*E,L=r.cx=M-E*b[0],C=r.cy=S+E*b[3],O=r.cxx=L-M,P=r.cyy=C-S,I=a.side;"counterclockwise"===I?(k=I,I="top"):"clockwise"===I&&(k=I,I="bottom"),r.radialAxis=r.mockAxis(t,e,a,{_id:"x",side:I,_trueSide:k,domain:[z/i.w,E/i.w]}),r.angularAxis=r.mockAxis(t,e,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(t,e),r.updateAngularAxis(t,e),r.updateRadialAxis(t,e),r.updateRadialAxisTitle(t,e),r.xaxis=r.mockCartesianAxis(t,e,{_id:"x",domain:g}),r.yaxis=r.mockCartesianAxis(t,e,{_id:"y",domain:m});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",l(O,P)),n.frontplot.attr("transform",l(M,S)).call(u.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(e);v(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],void 0!==i.minallowed){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(void 0!==i.maxallowed){var l=i.r2l(i.maxallowed);i._rl[0]90&&v<=270&&(y.tickangle=180);var x=m?function(t){var e=P(r,L([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(y.l2p(t.x)+u,0)},b=m?function(t){return O(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(y.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),g){y.setScale();var w=0,A=m?(y.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(y,t,!0,!1)})):h.calcTicks(y),T=m?A:h.clipEnds(y,A),k=h.getTickSigns(y)[2];m&&(("top"===y.ticks&&"bottom"===y.side||"bottom"===y.ticks&&"top"===y.side)&&(k=-k),"top"===y.ticks&&"top"===y.side&&(w=-y.ticklen),"bottom"===y.ticks&&"bottom"===y.side&&(w=y.ticklen)),h.drawTicks(n,y,{vals:A,layer:i["radial-axis"],path:h.makeTickPath(y,0,k),transFn:x,crisp:!1}),h.drawGrid(n,y,{vals:T,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,y,{vals:A,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(y,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i["radial-axis"],g&&(d.showticklabels||d.ticks),{transform:E}),V(i["radial-grid"],g&&d.showgrid,{transform:m?"":S}),V(i["radial-line"].select("line"),g&&d.showline,{x1:m?-a:u,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(e),c=n.id+"title",f=0;if(l.title){var h=u.bBox(n.layers["radial-axis"].node()).height,p=l.title.font.size,d=l.side;f="top"===d?p:"counterclockwise"===d?-(h+.4*p):h+.8*p}var v=void 0!==r?r:n.radialAxisAngle,y=R(v),g=Math.cos(y),m=Math.sin(y),b=o+a/2*g+f*m,_=s-a/2*m+f*g;n.layers["radial-axis-title"]=x.draw(i,c,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:I(i,"Click to enter radial axis title"),attributes:{x:b,y:_,"text-anchor":"middle"},transform:{rotate:-v}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),v=r.angularAxis,y=r.isSmith;y||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),v.setGeometry(),v.setScale());var g=y?function(t){var e=P(r,L([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return v.t2g(t.x)};"linear"===v.type&&"radians"===v.thetaunit&&(v.tick0=F(v.tick0),v.dtick=F(v.dtick));var m=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=y?function(t){var e=P(r,L([0,t.x]));return l(e[0],e[1])}:function(t){return m(g(t))},b=y?function(t){var e=P(r,L([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=g(t);return m(e)+s(-F(e))},_=y?function(t){return C(r,t.x,0,1/0)}:function(t){var e=g(t),r=Math.cos(e),n=Math.sin(e);return"M"+[f+u*r,p-u*n]+"L"+[f+a*r,p-a*n]},w=h.makeLabelFns(v,0).labelStandoff,A={xFn:function(t){var e=g(t);return Math.cos(e)*w},yFn:function(t){var e=g(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=g(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=g(t);return-.5*(1+Math.sin(n))*r}},T=j(d);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+v._id+"tick").remove(),r.angularTickLayout=T);var k,S=y?[1/0].concat(v.tickvals||[]).map((function(t){return h.tickText(v,t,!0,!1)})):h.calcTicks(v);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===e.gridshape?(k=S.map(g),o.angleDelta(k[0],k[1])<0&&(k=k.slice().reverse())):k=null,r.vangles=k,"category"===v.type&&(S=S.filter((function(t){return o.isAngleInsideSector(g(t),r.sectorInRad)}))),v.visible){var E="inside"===v.ticks?-1:1,z=(v.linewidth||1)/2;h.drawTicks(n,v,{vals:S,layer:i["angular-axis"],path:"M"+E*z+",0h"+E*v.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,v,{vals:S,layer:i["angular-grid"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,v,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:A})}V(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,v=s.radius,x=s.innerRadius,A=s.cx,T=s.cy,k=s.cxx,M=s.cyy,z=s.sectorInRad,L=s.vangles,C=s.radialAxis,O=E.clampTiny,P=E.findXYatLength,I=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=y.makeDragger(f,"path","maindrag",!1===t.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(A,T)),F.onmousemove=function(t){m.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||g.unhover(u,t)};var B,N,j,U,V,H,q,G,W,Y={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-k,e-M)}function K(t,e){return Math.atan2(M-e,t-k)}function J(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function $(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,v)),o=a-D,l=a+D;return"M"+J(o,n)+"A"+[o,o]+" 0,0,0 "+J(o,i)+"L"+J(l,i)+"A"+[l,l]+" 0,0,1 "+J(l,n)+"Z"}function Q(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=J(t,e),o=J(t,r),l=O((a[0]+o[0])/2),c=O((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=P(D,u,l,c);n=P(R,f,h[0][0],h[0][1]),i=P(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function tt(t,e){return e=Math.max(Math.min(e,v),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf("event")>-1&&m.click(u,e,s.id)}Y.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],L){var g=E.findPolygonOffset(v,z[0],z[1],L);B+=k+g[0],N+=M+g[1]}switch(l){case"zoom":Y.clickFn=st,c||(Y.moveFn=L?it:rt,Y.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=y.makeZoombox(h,q,A,T,V)).attr("fill-rule","evenodd"),W=y.makeCorners(h,A,T),w(u)}());break;case"select":case"lasso":b(t,n,a,Y,l)}},g.init(Y)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,v=i.radialAxis,m=S.radialDragBoxSize,x=m/2;if(v.visible){var b,_,A,M=R(i.radialAxisAngle),E=v._rl,z=E[0],L=E[1],C=E[r],O=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),A="radialdrag"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),A="radialdrag-inner");var P,I,D,B=y.makeRectDragger(u,A,"crosshair",-x,-x,m,m),N={element:B,gd:c};!1===t.dragmode&&(N.dragmode=!1),V(n.select(B),v.visible&&h0==(r?D>z:Dn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,r){var n,i,a=e[r],o=e._length,s=function(r){return t.d2c(r,e.thetaunit)};if(a)for(n=new Array(o),i=0;i0?1:0}function r(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function n(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function i(t,e){return e*t.radius}t.exports={smith:r,reactanceArc:function(t,e,a,o){var s=n(t,r([a,e])),l=s[0],c=s[1],u=n(t,r([o,e])),f=u[0],h=u[1];if(0===e)return["M"+l+","+c,"L"+f+","+h].join(" ");var p=i(t,1/Math.abs(e));return["M"+l+","+c,"A"+p+","+p+" 0 0,"+(e<0?1:0)+" "+f+","+h].join(" ")},resistanceArc:function(t,a,o,s){var l=i(t,1/(a+1)),c=n(t,r([a,o])),u=c[0],f=c[1],h=n(t,r([a,s])),p=h[0],d=h[1];if(e(o)!==e(s)){var v=n(t,r([a,0]));return["M"+u+","+f,"A"+l+","+l+" 0 0,"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,y.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function v(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o("uirevision",n.uirevision),e.type="linear";var p=o("color"),d=p!==i.color.dflt?p:r.font.color,v=e._name.charAt(0).toUpperCase(),y="Component "+v,g=o("title.text",y);e._hovertitle=g===y?g:v,a.coerceFont(o,"title.font",r.font,{overrideDflt:{size:a.bigFont(r.font.size),color:d}}),o("min"),u(t,e,o,"linear"),l(t,e,o,"linear"),s(t,e,o,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),c(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",r.font,{overrideDflt:{color:d}}),o("tickangle"),o("tickformat")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}t.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},24696:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(24040),o=r(3400),s=o.strTranslate,l=o._,c=r(76308),u=r(43616),f=r(78344),h=r(92880).extendFlat,p=r(7316),d=r(54460),v=r(86476),y=r(93024),g=r(72760),m=g.freeMode,x=g.rectMode,b=r(81668),_=r(22676).prepSelect,w=r(22676).selectOnClick,A=r(22676).clearOutline,T=r(22676).clearSelectionsCache,k=r(33816);function M(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r._hasClipOnAxisFalse=!1;for(var a=0;aE*b?i=(a=b)*E:a=(i=x)/E,o=g*i/x,l=m*a/b,r=e.l+e.w*v-i/2,n=e.t+e.h*(1-y)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*T-_,_-w-2*A],domain:[v-o/2,v+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-A-T],domain:[y-l/2,y+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var k=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-A-T],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[k,k+l*E],anchor:"free",position:0,_id:"y",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-T,A],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var z=p.caxis=h({},t.caxis,{range:[_-w-A,T],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[k,k+l*E],anchor:"free",position:0,_id:"y",_length:i});f(z,p.graphDiv._fullLayout),z.setScale();var L="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",L),p.layers.plotbg.select("path").attr("d",L);var C="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",C);var O=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),p.clipDefRelative.select("path").attr("transform",null);var P=s(r-S._offset,n+a);p.layers.baxis.attr("transform",P),p.layers.bgrid.attr("transform",P);var I=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);p.layers.aaxis.attr("transform",I),p.layers.agrid.attr("transform",I);var D=s(r+i/2,n)+"rotate(-30)"+s(0,-z._offset);p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(c.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(c.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",z.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(c.stroke,z.linecolor||"#000").style("stroke-width",(z.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.layers,a=e.aaxis,o=e.baxis,s=e.caxis;if(e.drawAx(a),e.drawAx(o),e.drawAx(s),t){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),u=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:a,propName:e.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:e.x0+e.w/2,y:e.y0-a.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:o,propName:e.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:e.x0-u,y:e.y0+e.h+.83*o.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:e.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:e.x0+e.w+u,y:e.y0+e.h+.83*s.title.font.size+u,"text-anchor":"middle"}})}},S.drawAx=function(t){var e,r=this,n=r.graphDiv,i=t._name,a=i.charAt(0),s=t._id,l=r.layers[i],c=a+"tickLayout",u=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);r[c]!==u&&(l.selectAll("."+s+"tick").remove(),r[c]=u),t.setScale();var f=d.calcTicks(t),h=d.clipEnds(t,f),p=d.makeTransTickFn(t),v=d.getTickSigns(t)[2],y=o.deg2rad(30),g=v*(t.linewidth||1)/2,m=v*t.ticklen,x=r.w,b=r.h,_="b"===a?"M0,"+g+"l"+Math.sin(y)*m+","+Math.cos(y)*m:"M"+g+",0l"+Math.cos(y)*m+","+-Math.sin(y)*m,w={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[a];d.drawTicks(n,t,{vals:"inside"===t.ticks?h:f,layer:l,path:_,transFn:p,crisp:!1}),d.drawGrid(n,t,{vals:h,layer:r.layers[a+"grid"],path:w,transFn:p,crisp:!1}),d.drawLabels(n,t,{vals:f,layer:l,transFn:p,labelFns:d.makeLabelFns(t,0,30)})};var z=k.MINZOOM/2+.87,L="m-0.87,.5h"+z+"v3h-"+(z+5.2)+"l"+(z/2+2.6)+",-"+(.87*z+4.5)+"l2.6,1.5l-"+z/2+","+.87*z+"Z",C="m0.87,.5h-"+z+"v3h"+(z+5.2)+"l-"+(z/2+2.6)+",-"+(.87*z+4.5)+"l-2.6,1.5l"+z/2+","+.87*z+"Z",O="m0,1l"+z/2+","+.87*z+"l2.6,-1.5l-"+(z/2+2.6)+",-"+(.87*z+4.5)+"l-"+(z/2+2.6)+","+(.87*z+4.5)+"l2.6,1.5l"+z/2+",-"+.87*z+"Z",P=!0;function I(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){T(this.dragOptions),A(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,g,b,A,T,M=this,S=M.layers.plotbg.select("path").node(),z=M.graphDiv,D=z._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+".aaxis.min"]=t.a,e[M.id+".baxis.min"]=t.b,e[M.id+".caxis.min"]=t.c,e}function F(t,e){var r=z._fullLayout.clickmode;I(z),2===t&&(z.emit("plotly_doubleclick",null),a.call("_guiRelayout",z,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,z,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&y.click(z,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),v=(l/2+u)*M.w,y=(1-l/2-c)*M.w,m=(v+y)/2,x=y-v,_=(1-l)*M.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),T.transition().style("opacity",1).duration(200),b=!0),z.emit("plotly_relayouting",R(p))}function V(){I(z),p!==f&&(a.call("_guiRelayout",z,R(p)),P&&z.data&&z._context.showTips&&(o.notifier(l(z,"Double-click to zoom back out"),"long"),P=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=s(-t,-e);M.clipDefRelative.select("path").attr("transform",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,M),z.emit("plotly_relayouting",R(p))}function q(){a.call("_guiRelayout",z,R(p))}this.dragOptions={element:S,gd:z,plotinfo:{id:M.id,domain:z._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=z._fullLayout._invScaleX,e=z._fullLayout._invScaleY;var v=M.dragOptions.dragmode=z._fullLayout.dragmode;m(v)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===v?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,z._fullLayout._calcInverseTransform(z);var u=z._fullLayout._invTransform,v=o.apply3DTransform(u)(r,n);r=v[0],n=v[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),g="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,A=D.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",g),T=D.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(z)}(0,l,u)):"pan"===v?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearOutline(z)):(x(v)||m(v))&&_(a,l,u,M.dragOptions,v)}},S.onmousemove=function(t){y.hover(z,t,M.id),z._fullLayout._lasthover=S,z._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){z._dragging||v.unhover(z,t)},v.init(this.dragOptions)}},24040:function(t,e,r){"use strict";var n=r(24248),i=r(16628),a=r(52416),o=r(63620),s=r(52200).addStyleRule,l=r(92880),c=r(45464),u=r(64859),f=l.extendFlat,h=l.extendDeepAll;function p(t){var r=t.name,i=t.categories,a=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in g(t),e.subplotsRegistry[r]=t,e.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},84664:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;p=0)return t}else if("string"==typeof t&&"%"===(t=t.trim()).slice(-1)&&n(t.slice(0,-1))&&(t=+t.slice(0,-1))>=0)return t+"%"}function d(t,e,r,n,a,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),u=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),d=!!o.hasPathbar,v=Array.isArray(a)||"auto"===a,y=v||"inside"===a,g=v||"outside"===a;if(y||g){var m=h(n,"textfont",r.font),x=i.extendFlat({},m),b=!(t.textfont&&t.textfont.color);if(b&&delete x.color,h(n,"insidetextfont",x),d){var _=i.extendFlat({},m);b&&delete _.color,h(n,"pathbar.textfont",_)}g&&h(n,"outsidetextfont",m),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}y&&p&&n("insidetextanchor")}t.exports={supplyDefaults:function(t,e,r,n){function u(r,n){return i.coerce(t,e,f,r,n)}if(s(t,e,n,u)){l(t,e,n,u),u("xhoverformat"),u("yhoverformat"),u("zorder"),u("orientation",e.x&&!e.y?"h":"v"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate");var h=u("textposition");d(t,0,n,u,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(t,e,u,r,n);var p=(e.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(t,e,p||a.defaultLine,{axis:"y"}),v(t,e,p||a.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(e,u)}else e.visible=!1},crossTraceDefaults:function(t,e){var r,n;function a(t,e){return i.coerce(n._input,n,f,t,e)}for(var o=0;oa))return e}return void 0!==r?r:t.dflt},e.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},e.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},e.getValue=function(t,e){var r;return a(t)?e0?e+=r:u<0&&(e-=r)}return e}function I(t){var e=u,r=t.b,i=P(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+"a"],R=t[h+"a"];v=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(y,F,t),!1!==t.index&&y[t.index].p!==c){T||(z=function(t){return Math.min(k(t),t.p-m.bargroupwidth/2)},L=function(t){return Math.max(M(t),t.p+m.bargroupwidth/2)});var B=y[t.index],N=g.base?B.b+B.s:B.s;t[h+"0"]=t[h+"1"]=R.c2p(B[h],!0),t[h+"LabelVal"]=N;var j=m.extents[m.extents.round(B.p)];t[f+"0"]=D.c2p(x?z(B):j[0],!0),t[f+"1"]=D.c2p(x?L(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+"LabelVal"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+"LabelVal"],g[f+"hoverformat"]),t.valueLabel=l(R,t[h+"LabelVal"],g[h+"hoverformat"]),t.baseLabel=l(R,B.b,g[h+"hoverformat"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=P(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return C(k(t),M(t),w)}(B))/2,t[f+"Spike"]=D.c2p(B.p,!0),o(B,g,t),t.hovertemplate=g.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}t.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},51132:function(t,e,r){"use strict";t.exports={attributes:r(20832),layoutAttributes:r(39324),supplyDefaults:r(31508).supplyDefaults,crossTraceDefaults:r(31508).crossTraceDefaults,supplyLayoutDefaults:r(37156),calc:r(71820),crossTraceCalc:r(96376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(84664),plot:r(98184).plot,style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(63400).hoverPoints,eventData:r(52160),selectPoints:r(45784),moduleType:"trace",name:"bar",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(t){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(t,e,r){"use strict";var n=r(24040),i=r(54460),a=r(3400),o=r(39324),s=r(31508).validateCornerradius;t.exports=function(t,e,r){function l(r,n){return a.coerce(t,e,o,r,n)}for(var c=!1,u=!1,f=!1,h={},p=l("barmode"),d=0;d0)-(t<0)}function k(t,e){return t0}function E(t,e,r,n,i){return!(t<0||e<0)&&(r<=t&&n<=e||r<=e&&n<=t||(i?t>=r*(e/n):e>=n*(t/r)))}function z(t){return"auto"===t?0:t}function L(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function C(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,f="start"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=a.hasB,v=a.r,y=a.overhead,g=i.width,m=i.height,x=Math.abs(e-t),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var A=z(l);"auto"!==l||g<=x&&m<=b||!(g>x||m>b)||(g>b||m>x)&&g_){var E=function(t,e,r,n,i,a,o,s,l){var c,u,f,h,p=Math.max(0,Math.abs(e-t)-2*_),d=Math.max(0,Math.abs(n-r)-2*_),v=a-_,y=o?v-Math.sqrt(v*v-(v-o)*(v-o)):v,g=l?2*v:s?v-o:2*y,m=l?2*v:s?2*y:v-o;return i.y/i.x>=d/(p-g)?h=d/i.y:i.y/i.x<=(d-m)/p?h=p/i.x:!l&&s?(c=i.x*i.x+i.y*i.y/4,f=(p-v)*(p-v)+(d/2-v)*(d/2-v)-v*v,h=(-(u=-2*i.x*(p-v)-i.y*(d/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):l?(c=(i.x*i.x+i.y*i.y)/4,f=(p/2-v)*(p/2-v)+(d/2-v)*(d/2-v)-v*v,h=(-(u=-i.x*(p/2-v)-i.y*(d/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):(c=i.x*i.x/4+i.y*i.y,f=(p/2-v)*(p/2-v)+(d-v)*(d-v)-v*v,h=(-(u=-i.x*(p/2-v)-2*i.y*(d-v))+Math.sqrt(u*u-4*c*f))/(2*c)),{scale:h=Math.min(1,h),pad:s?Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(d-i.y*h)/2)*(v-(d-i.y*h)/2)))-o):Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(p-i.x*h)/2)*(v-(p-i.x*h)/2)))-o)}}(t,e,r,n,S,v,y,o,d);T=E.scale,M=E.pad}else T=1,s&&(T=Math.min(1,x/S.x,b/S.y)),M=0;var C=i.left*p+i.right*h,O=(i.top+i.bottom)/2,P=(t+_)*p+(e-_)*h,I=(r+n)/2,D=0,R=0;if(f||u){var F=(o?S.x:S.y)/2;v&&(u||d)&&(w+=M);var B=o?k(t,e):k(r,n);o?f?(P=t+B*w,D=-B*F):(P=e-B*w,D=B*F):f?(I=r+B*w,R=-B*F):(I=n-B*w,R=B*F)}return{textX:C,textY:O,targetX:P,targetY:I,anchorX:D,anchorY:R,scale:T,rotate:A}}t.exports={plot:function(t,e,r,f,y,g){var w=e.xaxis,O=e.yaxis,P=t._fullLayout,I=t._context.staticPlot;y||(y={mode:P.barmode,norm:P.barmode,gap:P.bargap,groupgap:P.bargroupgap},p("bar",P));var D=a.makeTraceGroups(f,r,"trace bars").each((function(r){var c=n.select(this),f=r[0].trace,p=r[0].t,D="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,B="bar"===f.type,N=B||R,j=0;D&&f.connector.visible&&"between"===f.connector.mode&&(j=f.connector.line.width/2);var U="h"===f.orientation,V=S(y),H=a.ensureSingle(c,"g","points"),q=A(f),G=H.selectAll("g.point").data(a.identity,q);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(c,A){var S,D,R=n.select(this),H=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),n?[i,a]:[a,i]}(c,w,O,U),q=H[0][0],G=H[0][1],W=H[1][0],Y=H[1][1],X=0==(U?G-q:Y-W);if(X&&N&&v.getLineWidth(f,c)&&(X=!1),X||(X=!(i(q)&&i(G)&&i(W)&&i(Y))),c.isBlank=X,X&&(U?G=q:Y=W),j&&!X&&(U?(q-=k(q,G)*j,G+=k(q,G)*j):(W-=k(W,Y)*j,Y+=k(W,Y)*j)),"waterfall"===f.type){if(!X){var Z=f[c.dir].marker;S=Z.line.width,D=Z.color}}else S=v.getLineWidth(f,c),D=c.mc||f.marker.color;function K(t){var e=n.round(S/2%1,2);return 0===y.gap&&0===y.groupgap?n.round(Math.round(t)-e,2):t}var J=s.opacity(D)<1||S>.01?K:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?K(t):t>e?Math.ceil(t):Math.floor(t)};t._context.staticPlot||(q=J(q,G,U),G=J(G,q,U),W=J(W,Y,!U),Y=J(Y,W,!U));var $,Q=U?w.c2p:O.c2p;$=c.s0>0?c._sMax:c.s0<0?c._sMin:c.s1>0?c._sMax:c._sMin;var tt,et,rt=B||F?function(t,e){if(!t)return 0;var r,n=U?Math.abs(Y-W):Math.abs(G-q),i=U?Math.abs(G-q):Math.abs(Y-W),a=J(Math.abs(Q($,!0)-Q(0,!0))),o=c.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===e?n*(Math.min(50,t)/100):t,J(Math.max(Math.min(r,o),0))}(p.cornerradiusvalue,p.cornerradiusform):0,nt="M"+q+","+W+"V"+Y+"H"+G+"V"+W+"Z",it=0;if(rt&&c.s){var at=0===T(c.s0)||T(c.s)===T(c.s0)?c.s1:c.s0;if((it=J(c.hasB?0:Math.abs(Q($,!0)-Q(at,!0))))