Skip to content

Instantly share code, notes, and snippets.

@egberts
Created August 23, 2024 20:43
Show Gist options
  • Save egberts/64a933fc8ec7f6c3a4e5af5a5e70d4ed to your computer and use it in GitHub Desktop.
Save egberts/64a933fc8ec7f6c3a4e5af5a5e70d4ed to your computer and use it in GitHub Desktop.
Sankey chart in Python
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.34.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly.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)},13792: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(86636),r(42192),r(32140),r(77280),r(89296),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(63796),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)},89296:function(t,e,r){"use strict";t.exports=r(29928)},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)},86636:function(t,e,r){"use strict";t.exports=r(38983)},70192:function(t,e,r){"use strict";t.exports=r(11572)},81604:function(t,e,r){"use strict";t.exports=r(76924)},63796:function(t,e,r){"use strict";t.exports=r(62944)},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)},42192:function(t,e,r){"use strict";t.exports=r(97924)},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"],u=t["a"+a+"ref"],c=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,v=p-h,g=3*t.startarrowsize*t.arrowwidth||0,y=g+h,m=g-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=s?y+s:y,m=s?m-s:m,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,d,y),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,u,c=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r<c.length;r++)if(a=(i=c[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,u=o.yaxis,l._id===i.xref&&u._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&u.d2r(o.y)===s(i._yclick,u)){(i.visible?"onout"===a?h:p:f).push(r);break}n===d&&i.visible&&"onout"===a&&h.push(r)}return{on:f,off:h,explicitOff:p}}function s(t,e){return"log"===e.type?e.l2r(t):e.d2r(t)}t.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),u=l.on,c=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(u.length||c.length){for(r=0;r<u.length;r++)(s=a(t.layout,"annotations",h[u[r]])).modifyItem("visible",!0),n.extendFlat(f,s.getUpdateObj());for(r=0;r<c.length;r++)(s=a(t.layout,"annotations",h[c[r]])).modifyItem("visible",!1),n.extendFlat(f,s.getUpdateObj());return i.call("update",t,{},f)}}}},87192:function(t,e,r){"use strict";var n=r(3400),i=r(76308);t.exports=function(t,e,r,a){a("opacity");var o=a("bgcolor"),s=a("bordercolor"),l=i.opacity(s);a("borderpad");var u=a("borderwidth"),c=a("showarrow");if(a("text",c?" ":r._dfltTitle.annotation),a("textangle"),n.coerceFont(a,"font",r.font),a("width"),a("align"),a("height")&&a("valign"),c){var f,h,p=a("arrowside");-1!==p.indexOf("end")&&(f=a("arrowhead"),h=a("arrowsize")),-1!==p.indexOf("start")&&(a("startarrowhead",f),a("startarrowsize",h)),a("arrowcolor",l?e.bordercolor:i.defaultLine),a("arrowwidth",2*(l&&u||1)),a("standoff"),a("startstandoff")}var d=a("hovertext"),v=r.hoverlabel||{};if(d){var g=a("hoverlabel.bgcolor",v.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),y=a("hoverlabel.bordercolor",v.bordercolor||i.contrast(g)),m=n.extendFlat({},v.font);m.color||(m.color=y),n.coerceFont(a,"hoverlabel.font",m)}a("captureevents",!!d)}},26828:function(t,e,r){"use strict";var n=r(38248),i=r(36896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h<c.length;h++)l=c[h],u="annotations["+h+"].",l[f+"ref"]===e._id&&p(f),l["a"+f+"ref"]===e._id&&p("a"+f);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(u+t,s)}}},45216:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(87192),s=r(13916);function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a("visible"),u=a("clicktoshow");if(l||u){o(t,e,r,a);for(var c=e.showarrow,f=["x","y"],h=[-10,-30],p={_fullLayout:r},d=0;d<2;d++){var v=f[d],g=i.coerceRef(t,e,p,v,"","paper");if("paper"!==g&&i.getFromId(p,g)._annIndices.push(e._index),i.coercePosition(e,p,a,g,v,.5),c){var y="a"+v,m=i.coerceRef(t,e,p,y,"pixel",["pixel","paper"]);"pixel"!==m&&m!==g&&(m=e[y]="pixel");var x="pixel"===m?h[d]:.4;i.coercePosition(e,p,a,m,y,x)}a(v+"anchor"),a(v+"shift")}if(n.noneOrAll(t,e,["x","y"]),c&&n.noneOrAll(t,e,["ax","ay"]),u){var b=a("xclick"),_=a("yclick");e._xclick=void 0===b?e.x:i.cleanPosition(b,p,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,p,e.yref)}}}t.exports=function(t,e){a(t,e,{name:"annotations",handleItemDefaults:l})}},23816:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(54460),u=r(76308),c=r(43616),f=r(93024),h=r(72736),p=r(93972),d=r(86476),v=r(31780).arrayEditor,g=r(33652);function y(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),x(t,r,e,!1,n,i)}function m(t,e,r,n,i){var a=i[r],o=i[r+"ref"],s=-1!==r.indexOf("y"),u="domain"===l.getRefType(o),c=s?n.h:n.w;return t?u?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/c}function x(t,e,r,a,y,x){var b,_,w=t._fullLayout,T=t._fullLayout._size,k=t._context.edits;a?(b="annotation-"+a,_=a+".annotations"):(b="annotation",_="annotations");var A=v(t.layout,_,e),M=A.modifyBase,S=A.modifyItem,E=A.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var L="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var C={x:{},y:{}},O=+e.textangle||0,P=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",e.opacity),I=P.append("g").classed("annotation-text-g",!0),D=k[e.showarrow?"annotationTail":"annotationPosition"],z=e.captureevents||k.annotationText||D,R=I.append("g").style("pointer-events",z?"all":null).call(p,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",W(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();f.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){f.loneUnhover(w._hoverlayer.node())}));var F=e.borderwidth,B=e.borderpad,N=F+B,j=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),U=e.width||e.height,V=w._topclips.selectAll("#"+L).data(U?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",L).append("rect"),V.exit().remove();var q=e.font,H=w._meta?o.templateString(e.text,w._meta):e.text,G=R.append("text").classed("annotation-text",!0).text(H);k.annotationText?G.call(h.makeEditable,{delegate:R,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),i.call("_guiRelayout",t,E())})):G.call(Y)}else n.selectAll("#"+L).remove();function W(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return a&&(n.subplotId=a),n}function Y(r){return r.call(c.font,q).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),h.convertToTspans(r,t,X),r}function X(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(j.node());var n=R.select(".annotation-text-math-group"),f=!n.empty(),v=c.bBox((f?n:G).node()),b=v.width,_=v.height,A=e.width||b,z=e.height||_,B=Math.round(A+2*N),q=Math.round(z+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,X=["x","y"],Z=0;Z<X.length;Z++){var K,J,$,Q,tt,et=X[Z],rt=e[et+"ref"]||et,nt=e["a"+et+"ref"],it={x:y,y:x}[et],at=(O+("x"===et?0:-90))*Math.PI/180,ot=B*Math.cos(at),st=q*Math.sin(at),lt=Math.abs(ot)+Math.abs(st),ut=e[et+"anchor"],ct=e[et+"shift"]*("x"===et?1:-1),ft=C[et],ht=l.getRefType(rt);if(it&&"domain"!==ht){var pt=it.r2fraction(e[et]);(pt<0||pt>1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(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=T.l+T.w*$):($=1-e[et],K=dt?it._offset+it._length*$:K=T.t+T.h*$),Q=e.showarrow?.5:$}if(e.showarrow){ft.head=K;var vt=e["a"+et];if(tt=ot*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(vt=1-vt),ft.tail=it._offset+it._length*vt):"paper"===gt?"y"===et?(vt=1-vt,ft.tail=T.t+T.h*vt):ft.tail=T.l+T.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 yt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,yt-1)),"pixel"===nt){var mt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-yt;mt>0?(ft.tail+=mt,ft.text+=mt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ct,ft.head+=ct}else J=tt=lt*H(Q,ut),ft.text=K+tt;ft.text+=ct,tt+=ct,J+=ct,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(A-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(z-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:N+bt-1,y:N+_t}).call(c.setClipUrl,U?L:null,t);else{var wt=N+_t-v.top,Tt=N+bt-v.left;G.call(h.positionText,Tt,wt).call(c.setClipUrl,U?L:null,t)}V.select("rect").call(c.setRect,N,N,A,z),j.call(c.setRect,F/2,F/2,B-F,q-F),R.call(c.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-q/2)),I.attr({transform:"rotate("+O+","+C.x.text+","+C.y.text+")"});var kt,At=function(r,n){P.selectAll(".annotation-arrow-g").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,v=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(O,v,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr("width"),D=+j.attr("height"),z=v-.5*L,F=z+L,B=b-.5*D,N=B+D,U=[[z,B,z,N],[z,N,F,N],[F,N,F,B],[F,B,z,B]].map(A);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,q=e.arrowcolor,H=e.arrowside,G=P.append("g").style({opacity:u.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(u.stroke,u.rgb(q));if(g(W,H,e),k.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(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");d.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(R);K=t.x,J=t.y,y&&y.autorange&&M(y._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(c.setTranslate,i,a),S("x",m(y,t,"x",T,e)),S("y",m(x,r,"y",T,e)),e.axref===e.xref&&S("ax",m(y,t,"ax",T,e)),e.ayref===e.yref&&S("ay",m(x,r,"ay",T,e)),G.attr("transform",s(t,r)),I.attr({transform:"rotate("+O+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&At(0,0),D&&d.init({element:R.node(),gd:t,prepFn:function(){kt=I.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",m(y,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",m(x,r,"ay",T.w,e)):S("ay",e.ay+r),At(t,r);else{if(a)return;var i,o;if(y)i=m(y,t,"x",T,e);else{var l=e._xsize/T.w,u=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(u+t/T.w,l,0,1,e.xanchor)}if(x)o=m(x,r,"y",T,e);else{var c=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-c/2;o=d.align(f-r/T.h,c,0,1,e.yanchor)}S("x",i),S("y",o),y&&x||(n=d.getCursor(y?.5:i,x?.5:o,e.xanchor,e.yanchor))}I.attr({transform:s(t,r)+kt}),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<e.annotations.length;r++)e.annotations[r].visible&&y(t,r);return a.previousPromises(t)},drawOne:y,drawRaw:x}},33652:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(72196),o=r(3400),s=o.strScale,l=o.strRotate,u=o.strTranslate;t.exports=function(t,e,r){var o,c,f,h,p=t.node(),d=a[r.arrowhead||0],v=a[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),y=(r.arrowwidth||1)*(r.startarrowsize||1),m=e.indexOf("start")>=0,x=e.indexOf("end")>=0,b=d.backoff*g+r.standoff,_=v.backoff*y+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},c={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-c.x,T=o.y-c.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void D();if(b){if(b*b>w*w+T*T)return void D();var k=b*Math.cos(f),A=b*Math.sin(f);c.x+=k,c.y+=A,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+T*T)return void D();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(),L="";if(E<b+_)return void D();var C=p.getPointAtLength(0),O=p.getPointAtLength(.1);f=Math.atan2(C.y-O.y,C.x-O.x),o=p.getPointAtLength(Math.min(_,E)),L="0px,"+_+"px,";var P=p.getPointAtLength(E),I=p.getPointAtLength(E-.1);h=Math.atan2(P.y-I.y,P.x-I.x),c=p.getPointAtLength(Math.max(0,E-b)),L+=E-(L?_+b:b)+"px,"+E+"px",t.style("stroke-dasharray",L)}function D(){t.style("stroke-dasharray","0px,100px")}function z(e,a,o,c){e.path&&(e.noRotate&&(o=0),n.select(p.parentNode).append("path").attr({class:t.attr("class"),d:e.path,transform:u(a.x,a.y)+l(180*o/Math.PI)+s(c)}).style({fill:i.rgb(r.arrowcolor),"stroke-width":0}))}m&&z(v,o,f,y),x&&z(d,c,h,g)}},79180:function(t,e,r){"use strict";var n=r(23816),i=r(42300);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(13916),supplyLayoutDefaults:r(45216),includeBasePlot:r(36632)("annotations"),calcAutorange:r(90272),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(26828)}},45899:function(t,e,r){"use strict";var n=r(13916),i=r(67824).overrideAll,a=r(31780).templatedArray;t.exports=i(a("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},42456:function(t,e,r){"use strict";var n=r(3400),i=r(54460);function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()}},52808:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(87192),s=r(45899);function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function u(t){var n=t+"axis",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l("visible")&&(o(t,e,a.fullLayout,l),u("x"),u("y"),u("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){a(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},71836:function(t,e,r){"use strict";var n=r(23816).drawRaw,i=r(94424),a=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],u=!1,c=0;c<3;c++){var f=a[c],h=l[f],p=e[f+"axis"].r2fraction(h);if(p<0||p>1){u=!0;break}}u?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},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<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:r(42456),draw:r(71836)}},54976:function(t,e,r){"use strict";t.exports=r(38700),r(15168),r(67020),r(89792),r(55668),r(65168),r(2084),r(26368),r(24747),r(65616),r(30632),r(73040),r(1104),r(51456),r(4592),r(45348)},97776:function(t,e,r){"use strict";var n=r(54976),i=r(3400),a=r(39032),o=a.EPOCHJD,s=a.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},u=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},c="##",f={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},h={};function p(t){var e=h[t];return e||(h[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function v(t){return"Sets the calendar system to use with `"+t+"` date data."}var g={xcalendar:d(v("x"))},y=i.extendFlat({},g,{ycalendar:d(v("y"))}),m=i.extendFlat({},y,{zcalendar:d(v("z"))}),x=d(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:y,bar:y,box:y,heatmap:y,contour:y,histogram:y,histogram2d:y,histogram2dcontour:y,scatter3d:m,surface:m,mesh3d:m,scattergl:y,ohlc:g,candlestick:g},layout:{calendar:d(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults:u,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)u(t,e,r[i]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,u,h=Math.floor((e+.05)/s)+o,d=p(r).fromJD(h),v=0;-1!==(v=t.indexOf("%",v));)"0"===(n=t.charAt(v+1))||"-"===n||"_"===n?(a=3,i=t.charAt(v+2),"_"===n&&(n="-")):(i=n,n="0",a=2),(l=f[i])?(u=l===c?c:d.formatDate(l[n]),t=t.substr(0,v)+u+t.substr(v+a),v+=u.length):v+=a;return t}}},22548:function(t,e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},76308:function(t,e,r){"use strict";var n=r(49760),i=r(38248),a=r(38116).isTypedArray,o=t.exports={},s=r(22548);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.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,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},42996:function(t,e,r){"use strict";var n=r(94724),i=r(25376),a=r(92880).extendFlat,o=r(67824).overrideAll;t.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(t){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(26332),o=r(25404),s=r(95936),l=r(42568),u=r(42996);t.exports=function(t,e,r){var c=i.newContainer(e,"colorbar"),f=t.colorbar||{};function h(t,e){return n.coerce(f,c,u,t,e)}var p=r.margin||{t:0,b:0,l:0,r:0},d=r.width-p.l-p.r,v=r.height-p.t-p.b,g="v"===h("orientation"),y=h("thicknessmode");h("thickness","fraction"===y?30/(g?d:v):30);var m=h("lenmode");h("len","fraction"===m?1:g?v:d);var x,b,_,w="paper"===h("yref"),T="paper"===h("xref"),k="left";g?(_="middle",k=T?"left":"right",x=T?1.02:1,b=.5):(_=w?"bottom":"top",k="center",x=.5,b=w?1.02:1),n.coerce(f,c,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:x}},"x"),n.coerce(f,c,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:b}},"y"),h("xanchor",k),h("xpad"),h("yanchor",_),h("ypad"),n.noneOrAll(f,c,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var A=n.coerce(f,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",-1!==A.indexOf("inside")?"hide past domain":"hide past div"),a(f,c,h,"linear");var M=r.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};-1!==A.indexOf("inside")&&(S.bgColor="black"),l(f,c,h,"linear",S),s(f,c,h,"linear",S),o(f,c,h,"linear",S),h("title.text",r._dfltTitle.colorbar);var E=c.showticklabels?c.tickfont:M,L=n.extendFlat({},M,{family:E.family,size:n.bigFont(E.size)});n.coerceFont(h,"title.font",L),h("title.side",g?"top":"right")}},37848:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(7316),o=r(24040),s=r(54460),l=r(86476),u=r(3400),c=u.strTranslate,f=r(92880).extendFlat,h=r(93972),p=r(43616),d=r(76308),v=r(81668),g=r(72736),y=r(94288).flipScale,m=r(28336),x=r(37668),b=r(94724),_=r(84284),w=_.LINE_SPACING,T=_.FROM_TL,k=_.FROM_BR,A=r(63964).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+A.colorbar).data(function(t){var e,r,n,i,a=t._fullLayout,o=t.calcdata,s=[];function l(t){return f(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?y(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var c=0;c<o.length;c++){var h=o[c];if((n=h[0].trace)._module){var p=n._module.colorbar;if(!0===n.visible&&p)for(var d=Array.isArray(p),v=d?p:[p],g=0;g<v.length;g++){var m=(i=v[g]).container;(r=m?n[m]:n)&&r.showscale&&((e=l(r.colorbar))._id="cb"+n.uid+(d&&m?"-"+m:""),e._traceIndex=n.index,e._propPrefix=(m?m+".":"")+"colorbar.",e._meta=n._meta,u(),s.push(e))}}}for(var x in a._colorAxes)if((r=a[x]).showscale){var b=a._colorAxes[x];(e=l(r.colorbar))._id="cb"+x,e._propPrefix=x+".colorbar.",e._meta=a._meta,i={min:"cmin",max:"cmax"},"heatmap"!==b[0]&&(n=b[1],i.calc=n._module.colorbar.calc),u(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append("g").attr("class",(function(t){return t._id})).classed(A.colorbar,!0),e.each((function(e){var r=n.select(this);u.ensureSingle(r,"rect",A.cbbg),u.ensureSingle(r,"g",A.cbfills),u.ensureSingle(r,"g",A.cblines),u.ensureSingle(r,"g",A.cbaxis,(function(t){t.classed(A.crisp,!0)})),u.ensureSingle(r,"g",A.cbtitleunshift,(function(t){t.append("g").classed(A.cbtitle,!0)})),u.ensureSingle(r,"rect",A.cboutline);var y=function(t,e,r){var o="v"===e.orientation,l=e.len,h=e.lenmode,y=e.thickness,_=e.thicknessmode,M=e.outlinewidth,S=e.borderwidth,E=e.bgcolor,L=e.xanchor,C=e.yanchor,O=e.xpad,P=e.ypad,I=e.x,D=o?e.y:1-e.y,z="paper"===e.yref,R="paper"===e.xref,F=r._fullLayout,B=F._size,N=e._fillcolor,j=e._line,U=e.title,V=U.side,q=e._zrange||n.extent(("function"==typeof N?N:j.color).domain()),H="function"==typeof j.color?j.color:function(){return j.color},G="function"==typeof N?N:function(){return N},W=e._levels,Y=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,u=a.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(i=0;i<1e5&&(n=a.start+i*u,!(u>0?n>=l:n<=l));i++)n>c&&n<f&&o.push(n);if(e._fillgradient)s=[0];else if("function"==typeof e._fillcolor){var h=e._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,i=0;i<1e5&&(n=h.start+i*u,!(u>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&"string"==typeof e._fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,q),X=Y.fill,Z=Y.line,K=Math.round(y*("fraction"===_?o?B.w:B.h:1)),J=K/(o?B.w:B.h),$=Math.round(l*("fraction"===h?o?B.h:B.w:1)),Q=$/(o?B.h:B.w),tt=R?B.w:r._fullLayout.width,et=z?B.h:r._fullLayout.height,rt=Math.round(o?I*tt+O:D*et+P),nt={center:.5,right:1}[L]||0,it={top:1,middle:.5}[C]||0,at=o?I-nt*J:D-it*J,ot=o?D-it*Q:I-nt*Q,st=Math.round(o?et*(1-ot):tt*ot);e._lenFrac=Q,e._thickFrac=J,e._uFrac=at,e._vFrac=ot;var lt=e._axis=function(t,e,r){var n=t._fullLayout,i="v"===e.orientation,a={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,labelalias:e.labelalias,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+e._id},l={letter:o,font:n.font,noAutotickangles:"y"===o,noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function c(t,e){return u.coerce(a,s,b,t,e)}return m(a,s,c,l,n),x(a,s,c,l),s}(r,e,q);lt.position=J+(o?I+O/B.w:D+P/B.h);var ut=-1!==["top","bottom"].indexOf(V);if(o&&ut&&(lt.title.side=V,lt.titlex=I+O/B.w,lt.titley=ot+("top"===U.side?Q-P/B.h:P/B.h)),o||ut||(lt.title.side=V,lt.titley=D+P/B.h,lt.titlex=ot+O/B.w),j.color&&"auto"===e.tickmode){lt.tickmode="linear",lt.tick0=W.start;var ct=W.size,ft=u.constrain($/50,4,15)+1,ht=(q[1]-q[0])/((e.nticks||ft)*ct);if(ht>1){var pt=Math.pow(10,Math.floor(Math.log(ht)/Math.LN10));ct*=pt*u.roundUp(ht/pt,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ct}lt.domain=o?[ot+P/B.h,ot+Q-P/B.h]:[ot+O/B.w,ot+Q-O/B.w],lt.setScale(),t.attr("transform",c(Math.round(B.l),Math.round(B.t)));var dt,vt=t.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(B.l),-Math.round(B.t))),gt=lt.ticklabelposition,yt=lt.title.font.size,mt=t.select("."+A.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("."+A.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 u.syncOrAsync([a.previousPromises,function(){var t,e;(o&&ut||!o&&!ut)&&("top"===V&&(t=O+B.l+tt*I,e=P+B.t+et*(1-ot-Q)+3+.75*yt),"bottom"===V&&(t=O+B.l+tt*I,e=P+B.t+et*(1-ot)-3-.25*yt),"right"===V&&(e=P+B.t+et*D+3+.75*yt,t=O+B.l+tt*ot),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ut||o&&ut){var a,l=t.select("."+A.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(A.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 y=g.lineCount(f);h[1]+=(1-y)*v}l.attr("transform",c(h[0],h[1])),lt.setScale()}}else bt&&("right"===V&&(lt.domain[0]+=(bt+yt/2)/B.w),l.attr("transform",c(h[0],h[1])),lt.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?c(0,Math.round(B.h*(1-lt.domain[1]))):c(Math.round(B.w*lt.domain[0]),0)),mt.attr("transform",o?c(0,Math.round(-B.t)):c(Math.round(-B.l),0));var m=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(X);m.enter().append("rect").classed(A.cbfill,!0).attr("style",""),m.exit().remove();var x=q.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,a){var s=[0===a?q[0]:(X[a]+X[a-1])/2,a===X.length-1?q[1]:(X[a]+X[a+1])/2].map(lt.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",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 c=G(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(j.color&&j.width?Z:[]);b.enter().append("path").classed(A.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,H(t),j.dash)})),mt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+K+(M||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(lt),k=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,T):T,layer:mt,path:s.makeTickPath(lt,_,k),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:T,layer:mt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(o&&!ut||!o&&ut){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===V)i=s,t=B.l+tt*a+10+yt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===V&&(i=B.t+et*a+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===V){var l=U.text.split("<br>").length;i=B.t+et*a+10-K-w*yt*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===gt.indexOf("inside")&&(n=p.bBox(mt.node()),s+=o?n.width:n.height),dt=vt.select("text");var u=0,f=o&&"top"===V,v=!o&&"right"===V,g=0;if(dt.node()&&!dt.classed(A.jsPlaceholder)){var m,x=vt.select(".h"+lt._id+"title-math-group").node();x&&(o&&ut||!o&&!ut)?(u=(n=p.bBox(x)).width,m=n.height):(u=(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,g=n.height)),v&&(dt.attr("transform",c(u/2+yt/2,0)),u*=2),s=Math.max(s,o?u:m)}var b=2*(o?O:P)+s+S+M/2,w=0;!o&&U.text&&"bottom"===C&&D<=0&&(b+=w=b/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var N=S+M,j=(o?rt:st)-N/2-(o?O:0),q=(o?st:rt)-(o?$:P+g-w);t.select("."+A.cbbg).attr("x",j).attr("y",q).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 H=v?Math.max(u-10,0):0;t.selectAll("."+A.cboutline).attr("x",(o?rt:st+O)+H).attr("y",(o?st+P-$:rt)+(f?xt:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max($-(o?2*P+xt:2*O+H),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M});var G=o?nt*b:0,W=o?0:(1-it)*b-g;if(G=R?B.l-G:-G,W=z?B.t-W:-W,t.attr("transform",c(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("."+A.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+I-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=T[L],at=k[L],ot=T[C],ct=k[C],ft=b-K;o?("pixels"===h?(tt.y=D,tt.t=$*ot,tt.b=$*ct):(tt.t=tt.b=0,tt.yt=D+l*ot,tt.yb=D-l*ct),"pixels"===_?(tt.x=I,tt.l=b*et,tt.r=b*at):(tt.l=ft*et,tt.r=ft*at,tt.xl=I-y*et,tt.xr=I+y*at)):("pixels"===h?(tt.x=I,tt.l=$*et,tt.r=$*at):(tt.l=tt.r=0,tt.xl=I+l*et,tt.xr=I-l*at),"pixels"===_?(tt.y=1-D,tt.t=b*ot,tt.b=b*ct):(tt.t=ft*ot,tt.b=ft*ct,tt.yt=D-y*ot,tt.yb=D+y*ct));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-q-W,t:q+tt.b};R&&z?a.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][ht]=bt[ht]:z||o?r._fullLayout._reservedMargin[e._id][pt]=bt[pt]:r._fullLayout._reservedMargin[e._id][ht]=bt[ht]}],r)}(r,e,t);y&&y.then&&(t._promises||[]).push(y),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},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),u="showScaleDflt"in e?e.showScaleDflt:"z"===a,c="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:"z",c:"color"}[a]));var p=a+"auto",d=a+"min",v=a+"max",g=a+"mid",y=(s(h+p),s(h+d),s(h+v),{});y[d]=y[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:y},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},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,u=r.containerStr,c=u?i.nestedProperty(e,u).get():e,f=a(c),h=!1!==f.auto,p=f.min,d=f.max,v=f.mid,g=function(){return i.aggNums(Math.min,null,l)},y=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=g():h&&(p=c._colorAx&&n(p)?Math.min(p,g()):g()),void 0===d?d=y():h&&(d=c._colorAx&&n(d)?Math.max(d,y()):y()),h&&void 0!==v&&(d-v>v-p?p=v-(d-v):d-v<v-p&&(d=v+(v-p))),p===d&&(p-=.5,d+=.5),f._sync("min",p),f._sync("max",d),f.autocolorscale&&(o=p*d<0?s.colorscale.diverging:p>=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},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<t.length;s++){var l=t[s],u=l._module.colorbar;if(u)if(Array.isArray(u))for(var c=0;c<u.length;c++)o(l,u[c]);else o(l,u);i(l,"marker.line")&&o(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in e._colorAxes)o(e[f],{min:"cmin",max:"cmax"})}},27260:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(90553),o=r(64013),s=r(88304).isValid,l=r(24040).traceIs;function u(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,c,f,h){var p=h.prefix,d=h.cLetter,v="_module"in r,g=u(e,p),y=u(r,p),m=u(r._template||{},p)||{},x=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,c,f,h)};if(v){var b=c._colorAxes||{},_=f(p+"coloraxis");if(_){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",T=b[_];return void(T?(T[2].push(x),T[0]!==w&&(T[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var k=g[d+"min"],A=g[d+"max"],M=n(k)&&n(A)&&k<A;f(p+d+"auto",!M)?f(p+d+"mid"):(f(p+d+"min"),f(p+d+"max"));var S,E,L=g.colorscale,C=m.colorscale;void 0!==L&&(S=!s(L)),void 0!==C&&(S=!s(C)),f(p+"autocolorscale",S),f(p+"colorscale"),f(p+"reversescale"),"marker.line."!==p&&(p&&v&&(E=a(g)),f(p+"showscale",E)&&(p&&m&&(y._template=m),o(g,y,c)))}},94288:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(38248),o=r(3400),s=r(76308),l=r(88304).isValid,u=["showscale","autocolorscale","colorscale","reversescale","colorbar"],c=["min","max","mid","auto"];function f(t){var e,r,n,i=t._colorAx,a=i||t,o={};for(r=0;r<u.length;r++)o[n=u[r]]=a[n];if(i)for(e="c",r=0;r<c.length;r++)o[n=c[r]]=a["c"+n];else{var s;for(r=0;r<c.length;r++)((s="c"+(n=c[r]))in a||(s="z"+n)in a)&&(o[n]=a[s]);e=s.charAt(0)}return o._sync=function(t,r){var n=-1!==c.indexOf(t)?e+t:t;a[n]=a["_"+n]=r},o}function h(t){for(var e=f(t),r=e.min,n=e.max,i=e.reversescale?p(e.colorscale):e.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function p(t){for(var e=t.length,r=new Array(e),n=e-1,i=0;n>=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,u=new Array(l),c=0;c<l;c++){var f=i(o[c]).toRgb();u[c]=[f.r,f.g,f.b,f.a]}var h,p=n.scale.linear().domain(r).range(u).clamp(!0),d=e.noNumericCheck,g=e.returnArray;return(h=d&&g?p:d?function(t){return v(p(t))}:g?function(t){return a(t)?p(t):i(t).isValid()?t:s.defaultLine}:function(t){return a(t)?v(p(t)):i(t).isValid()?t:s.defaultLine}).domain=p.domain,h.range=function(){return o},h}function v(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}t.exports={hasColorscale:function(t,e,r){var n=e?o.nestedProperty(t,e).get()||{}:t,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var s=!1;if(o.isArrayOrTypedArray(i))for(var u=0;u<i.length;u++)if(a(i[u])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||a(n.cmin)&&a(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:f,extractScale:h,flipScale:p,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:function(t,e){return d(h(t),e)}}},8932:function(t,e,r){"use strict";var n=r(88304),i=r(94288);t.exports={moduleType:"component",name:"colorscale",attributes:r(49084),layoutAttributes:r(92332),supplyLayoutDefaults:r(51608),handleDefaults:r(27260),crossTraceDefaults:r(95504),calc:r(47128),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92332:function(t,e,r){"use strict";var n=r(92880).extendFlat,i=r(49084),a=r(88304).scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},51608:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(92332),o=r(27260);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,u=e._colorAxes;function c(t,e){return n.coerce(s,l,a.coloraxis,t,e)}for(var f in u){var h=u[f];if(h[0])s=t[f]||{},(l=i.newContainer(e,f,"coloraxis"))._name=f,o(s,l,e,c,{prefix:"",cLetter:"c"});else{for(var p=0;p<h[2].length;p++)h[2][p]();delete e._colorAxes[f]}}}},88304:function(t,e,r){"use strict";var n=r(49760),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=i.RdBu;function o(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}t.exports={scales:i,defaultScale:a,get:function(t,e){if(e||(e=a),!t)return e;function r(){try{t=i[t]||JSON.parse(t)}catch(r){t=e}}return"string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e},isValid:function(t){return void 0!==i[t]||o(t)}}},78316:function(t){"use strict";t.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return"left"===i||"bottom"===i?a:"center"===i||"middle"===i?s:"right"===i||"top"===i?o:a<2/3-s?a:o>4/3-s?o:s}},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 u=r(2616);function c(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,h,p,d,v,g=t.gd,y=1,m=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function _(a){g._dragged=!1,g._dragging=!0;var o=f(a);e=o[0],r=o[1],d=a.target,p=a,v=2===a.buttons||a.ctrlKey,void 0===a.clientX&&void 0===a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-g._mouseDownTime<m?y+=1:(y=1,g._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!v?(h=c()).style.cursor=window.getComputedStyle(x).cursor:i||(h=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),!1!==t.dragmode&&(a.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var i=f(n),a=t.minDrag||s.MINDRAG,o=b(i[0]-e,i[1]-r,a),u=o[0],c=o[1];(u||c)&&(g._dragged=!0,l.unhover(g,n)),g._dragged&&t.moveFn&&!v&&(g._dragdata={element:x,dx:u,dy:c},t.moveFn(u,c))}function T(e){if(delete g._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),i?o(h):u&&(h.documentElement.style.cursor=u,u=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>m&&(y=Math.max(y-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(y,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)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=c},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),u=r(76308),c=r(8932),f=i.strTranslate,h=r(72736),p=r(9616),d=r(84284).LINE_SPACING,v=r(13448).DESELECTDIM,g=r(43028),y=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,c=e.lineposition,f=e.textcase;s&&t.style("font-family",s),o+1&&t.style("font-size",o+"px"),a&&t.call(u.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(u.contrast(a)):b(l)),c&&t.style("text-decoration-line",b(function(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(c)))};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),c=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,c)}else if(a&&"none"!==a.type){var d,v,g=a.type,y="scatterfill-"+e.uid;n&&(y="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===g&&(g+="reversed"),t.call(x.gradient,r,y,g,a.colorscale,"fill")):("horizontal"===g?(d={x:a.start,y:0},v={x:a.stop,y:0}):"vertical"===g&&(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,y,"linear",a.colorscale,"fill",d,v,!0,!1))}else e.fillcolor&&t.call(u.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,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(u).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());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 T=r(71984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(T).forEach((function(t){var e=T[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 k=x.symbolNames.length;function A(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>=k||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,c,f,h,p){var d,v=o.length;"linear"===a?d={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:f.x,y2:f.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===a&&(d={node:"radialGradient",reversed:p});for(var g=new Array(v),y=0;y<v;y++)d.reversed?g[v-1-y]=[M(100*(1-o[y][0])),o[y][1]]:g[y]=[M(100*o[y][0]),o[y][1]];var m=e._fullLayout,x="g"+m._uid+"-"+r,b=m._defs.select(".gradients").selectAll("#"+x).data([a+g.join(";")],i.identity);b.exit().remove(),b.enter().append(d.node).each((function(){var t=n.select(this);d.attrs&&t.attr(d.attrs),t.attr("id",x);var e=t.selectAll("stop").data(g);e.exit().remove(),e.enter().append("stop"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+"%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}))})),t.style(l,q(x,e)).style(l+"-opacity",null),t.classed("gradient_filled",!0)}x.gradient=function(t,e,r,n,i,a){var o=S[n];return E(t,e,r,o.type,i,a,o.start,o.stop,!1,o.reversed)},x.pattern=function(t,e,r,a,o,l,c,f,h,p,d,v){var g="legend"===e;f&&("overlay"===h?(p=f,d=u.contrast(p)):(p=void 0,d=f));var y,m,x,b,_,w,T,k,A,M=r._fullLayout,S="p"+M._uid+"-"+a,E={},L=s(d),C=u.tinyRGB(L),O=v*L.getAlpha();switch(o){case"/":y=l*Math.sqrt(2),m=l*Math.sqrt(2),w="path",E={d:x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"\\":y=l*Math.sqrt(2),m=l*Math.sqrt(2),w="path",E={d:x="M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"x":y=l*Math.sqrt(2),m=l*Math.sqrt(2),x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2+"M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,b=l-l*Math.sqrt(1-c),w="path",E={d:x,opacity:O,stroke:C,"stroke-width":b+"px"};break;case"|":w="path",w="path",E={d:x="M"+(y=l)/2+",0L"+y/2+","+(m=l),opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"-":w="path",w="path",E={d:x="M0,"+(m=l)/2+"L"+(y=l)+","+m/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"+":w="path",x="M"+(y=l)/2+",0L"+y/2+","+(m=l)+"M0,"+m/2+"L"+y+","+m/2,b=l-l*Math.sqrt(1-c),w="path",E={d:x,opacity:O,stroke:C,"stroke-width":b+"px"};break;case".":y=l,m=l,c<Math.PI/4?_=Math.sqrt(c*l*l/Math.PI):(T=c,k=Math.PI/4,1,_=(A=l/2)+(l/Math.sqrt(2)-A)*(T-k)/(1-k)),w="circle",E={cx:y/2,cy:m/2,r:_,opacity:O,fill:C}}var P=[o||"noSh",p||"noBg",d||"noFg",l,c].join(";"),I=M._defs.select(".patterns").selectAll("#"+S).data([P],i.identity);I.exit().remove(),I.enter().append("pattern").each((function(){var t=n.select(this);if(t.attr({id:S,width:y+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),p){var e=s(p),r=u.tinyRGB(e),i=e.getAlpha(),a=t.selectAll("rect").data([0]);a.exit().remove(),a.enter().append("rect").attr({width:y+"px",height:m+"px",fill:r,"fill-opacity":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(E)})),t.style("fill",q(S,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","patterns").selectAll("pattern").remove(),n.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},x.pointStyle=function(t,e,r,i){if(t.size()){var a=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,a,r,i)}))}},x.singlePointStyle=function(t,e,r,n,a,o){var s=r.marker,l=s.line;if(o&&o.i>=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 c;c="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=c,n.selectedSizeFn&&(c=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",A(f,c,h,p))}var d,v,g,y=!1;if(t.so)g=l.outlierwidth,v=l.outliercolor,d=s.outliercolor;else{var m=(l||{}).width;g=(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)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(d=u.defaultLine,y=!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(u.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var b=s.gradient,_=t.mgt;_?y=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],S[_]||(_=0));var w=s.pattern,T=w&&x.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var k=t.mgc;k?y=!0:k=b.color;var M=r.uid;y&&(M+="-"+t.i),x.gradient(e,a,M,_,[[0,k],[1,d]],"fill")}else if(T){var E=!1,L=w.fgcolor;!L&&o&&o.color&&(L=o.color,E=!0);var C=x.getPatternAttr(L,t.i,o&&o.color||null),O=x.getPatternAttr(w.bgcolor,t.i,null),P=w.fgopacity,I=x.getPatternAttr(w.size,t.i,8),D=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 z=r.uid;E&&(z+="-"+t.i),x.pattern(e,"point",a,z,T,I,D,t.mcc,w.fillmode,O,C,P)}else i.isArrayOrTypedArray(d)?u.fill(e,d[t.i]):u.fill(e,d);g&&u.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=g.isBubble(t)?y(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,h=void 0!==c,p=void 0!==f;(i.isArrayOrTypedArray(u)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?c:e:p?f:v*e});var d=a.color,g=o.color,y=s.color;(g||y)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?g||e:y||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,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.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){u.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",A(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;r<a.length;r++)a[r](e,t)}))}},x.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&i.isArrayOrTypedArray(n))return c.makeColorScaleFuncFromTrace(r)}return i.identity};var L,C,O={start:1,end:-1,middle:0,bottom:1,top:-1};function P(t,e,r,i,a){var o=n.select(t.node().parentNode),s=-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle",l=-1!==e.indexOf("left")?"end":-1!==e.indexOf("right")?"start":"middle",u=i?i/.8+1:0,c=(h.lineCount(t)-1)*d+1,p=O[l]*u,v=.75*r+O[s]*u+(O[s]-1)*c*r/2;t.attr("text-anchor",l),a||o.attr("transform",f(p,v))}function I(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function D(t,e,r){return r&&(t=j(t)),e?R(t[1]):z(t[0])}function z(t){var e=n.round(t,2);return L=e,e}function R(t){var e=n.round(t,2);return C=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),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),p=3*l*(l+u);return[[z(e[0]+(h&&c/h)),R(e[1]+(h&&f/h))],[z(e[0]-(p&&c/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),u=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(u||0===u){if(s){var c=e._module.formatLabels,f=c?c(t,e,l):{},p={};m(p,e,t.i);var d=e._meta||{};u=i.texttemplateString(u,f,l._d3locale,p,t,d)}var v=t.tp||e.textposition,g=I(t,e),y=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:g,color:y}).text(u).call(h.convertToTspans,r).call(P,v,g,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=I(t,e);u.fill(i,a);var c=l.traceIs(e,"bar-like");P(i,o,s,t.mrc2||t.mrc,c)}))}},x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(F(t[r-1],t[r],t[r+1],e));for(n+="Q"+i[0][0]+" "+t[1],r=2;r<t.length-1;r++)n+="C"+i[r-2][1]+" "+i[r-1][0]+" "+t[r];return n+"Q"+i[t.length-3][1]+" "+t[t.length-1]},x.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r,n="M"+t[0],i=t.length-1,a=[F(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(F(t[r-1],t[r],t[r+1],e));for(a.push(F(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+="C"+a[r-1][1]+" "+a[r][0]+" "+t[r];return n+"C"+a[i][1]+" "+a[0][0]+" "+t[0]+"Z"};var B={hv:function(t,e,r){return"H"+z(e[0])+"V"+D(e,1,r)},vh:function(t,e,r){return"V"+R(e[1])+"H"+D(e,0,r)},hvh:function(t,e,r){return"H"+z((t[0]+e[0])/2)+"V"+R(e[1])+"H"+D(e,0,r)},vhv:function(t,e,r){return"V"+R((t[1]+e[1])/2)+"H"+z(e[0])+"V"+D(e,1,r)}},N=function(t,e,r){return"L"+D(e,0,r)+","+D(e,1,r)};function j(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,u=e?e[0]:L||0,c=e?e[1]:C||0,f=l[0],h=l[1],p=f-u,d=h-c,v=Math.atan2(d,p),g=s?r[o]:r;if("auto"===g){var y=l.i;"scatter"===n.type&&y--;var m=l.marker,b=m.symbol;i.isArrayOrTypedArray(b)&&(b=b[y]);var _=m.size;i.isArrayOrTypedArray(_)&&(_=_[y]),g=m?x.symbolBackOffs[x.symbolNumber(b)]*_:0,g+=x.getMarkerStandoff(a[y],n)||0}var w=f-g*Math.cos(v),T=h-g*Math.sin(v);(w<=f&&w>=u||w>=f&&w<=u)&&(T<=h&&T>=c||T>=h&&T<=c)&&(t=[w,T])}return t}x.steps=function(t){var e=B[t]||N;return function(t){for(var r="M"+z(t[0][0])+","+R(t[0][1]),n=t.length,i=1;i<n;i++)r+=e(t[i-1],t[i],i===n-1);return r}},x.applyBackoff=j,x.makeTester=function(){var t=i.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(t){t.attr(p.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),e=i.ensureSingle(t,"path","js-reference-point",(function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));x.tester=t,x.testref=e},x.savedBBoxes={};var U=0;function V(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}function q(t,e){if(!t)return null;var r=e._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+t+"')":"url(#"+t+")"}x.bBox=function(t,e,r){var a,o,s;if(r||(r=V(t)),r){if(a=x.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=V(l)){var u=+l.getAttribute("x")||0,c=+l.getAttribute("y")||0,f=l.getAttribute("transform");if(!f){var p=x.bBox(l,!1,r);return u&&(p.left+=u,p.right+=u),c&&(p.top+=c,p.bottom+=c),p}if(r+="~"+u+"~"+c+"~"+f,a=x.savedBBoxes[r])return i.extendFlat({},a)}}e?o=t:(s=x.tester.node(),o=t.cloneNode(!0),s.appendChild(o)),n.select(o).attr("transform",null).call(h.positionText,0,0);var d=o.getBoundingClientRect(),v=x.testref.node().getBoundingClientRect();e||s.removeChild(o);var g={height:d.height,width:d.width,left:d.left-v.left,top:d.top-v.top,right:d.right-v.left,bottom:d.bottom-v.top};return U>=1e4&&(x.savedBBoxes={},U=0),r&&(x.savedBBoxes[r]=g),U++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",q(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var 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 u=e._xA,c=e._yA;if(!u||!c)return 90;r=u.c2p(t.x),n=c.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]),g=Q(v[1]-n,v[0]-r),y=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,T=tt(_)*et(w),k=et(_)*tt(x)-tt(_)*et(x)*tt(w);f=-Q(T,k)-Math.PI,Y=h,X=p}var A=rt(g,[tt(f),0]),M=rt(y,[et(f),0]);a=Q(A[1]+M[1],A[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,L=e.line&&e.line.shape||"",C=L.slice(L.length-1);"h"===C&&(E=0),"v"===C&&(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,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,p=Math.cos,d=Math.sin;function v(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*h,c=0,f=0,v=s(r),g="",y=0;y<v.length;y++){var m=v[y],x=m[0],b=c,_=f;if("M"===x||"L"===x)c=+m[1],f=+m[2];else if("m"===x||"l"===x)c+=+m[1],f+=+m[2];else if("H"===x)c=+m[1];else if("h"===x)c+=+m[1];else if("V"===x)f=+m[1];else if("v"===x)f+=+m[1];else if("A"===x){c=+m[1],f=+m[2];var w=l(u,[+m[6],+m[7]]);m[6]=w[0],m[7]=w[1],m[3]=+m[3]+t}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(c-=b,f-=_);var T=l(u,[c,f]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(m[1]=T[0],m[2]=T[1]),m[0]=x,g+=m[0]+m.slice(1).join(",")}return i=g,g}t.exports={circle:{n:0,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?g(e,r,i):i}},square:{n:1,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(t,e,r){if(v(e))return u;var n=l(.4*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(t,e,r){if(v(e))return u;var n=l(.8*t/c,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return g(e,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+","+l(t/2,2)+"H"+n+"L0,-"+l(t,2)+"Z")}},"triangle-down":{n:6,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+",-"+l(t/2,2)+"H"+n+"L0,"+l(t,2)+"Z")}},"triangle-left":{n:7,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M"+l(t/2,2)+",-"+n+"V"+n+"L-"+l(t,2)+",0Z")}},"triangle-right":{n:8,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+l(t/2,2)+",-"+n+"V"+n+"L"+l(t,2)+",0Z")}},"triangle-ne":{n:9,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(t,e,r){if(v(e))return u;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return g(e,r,"M"+n+","+o+"L"+i+","+l(.809*t,2)+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(t,e,r){if(v(e))return u;var n=l(.924*t,2),i=l(.383*t,2);return g(e,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(t,e,r){if(v(e))return u;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),c=l(-n,2),f=l(-.309*n,2),h=l(.118*n,2),p=l(.809*n,2);return g(e,r,"M"+i+","+f+"H"+a+"L"+o+","+h+"L"+s+","+p+"L0,"+l(.382*n,2)+"L-"+s+","+p+"L-"+o+","+h+"L-"+a+","+f+"H-"+i+"L0,"+c+"Z")}},hexagram:{n:18,f:function(t,e,r){if(v(e))return u;var n=l(.66*t,2),i=l(.38*t,2),a=l(.76*t,2);return g(e,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(t,e,r){if(v(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(t,e,r){if(v(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(t,e,r){if(v(e))return u;var n=l(1.1*t,2),i=l(2*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2),i=l(1.9*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(t,e,r){if(v(e))return u;var n=l(.7*t,2),i=l(1.4*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2),i=l(.7*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/c,2);return g(e,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2),i=l(.65*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(.85*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t,e,r){if(v(e))return u;var n=l(t/2,2),i=l(t,2);return g(e,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(t,e,r){if(v(e))return u;var n=h/2.5,i=2*t*p(n),a=2*t*d(n);return g(e,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(t,e,r){if(v(e))return u;var n=h/4,i=2*t*p(n),a=2*t*d(n);return g(e,r,"M0,0L"+-i+","+a+"A "+2*t+","+2*t+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}}},97644:function(t){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},14880:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(54460),o=r(3400),s=r(93792);function l(t,e,r,i){var l=e["error_"+i]||{},u=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var c=s(l),f=0;f<t.length;f++){var h=t[f],p=h.i;if(void 0===p)p=f;else if(null===p)continue;var d=h[i];if(n(r.c2l(d))){var v=c(d,p);if(n(v[0])&&n(v[1])){var g=h[i+"s"]=d-v[0],y=h[i+"h"]=d+v[1];u.push(g,y)}}}var m=r._id,x=e._extremes[m],b=a.findExtremes(r,u,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}t.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,"errorBarsOK")){var s=a.getFromId(t,o.xaxis),u=a.getFromId(t,o.yaxis);l(n,o,s,"x"),l(n,o,u,"y")}}}},93792:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},65200:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(3400),o=r(31780),s=r(97644);t.exports=function(t,e,r,l){var u="error_"+l.axis,c=o.newContainer(e,u),f=t[u]||{};function h(t,e){return a.coerce(f,c,s,t,e)}if(!1!==h("visible",void 0!==f.array||void 0!==f.value||"sqrt"===f.type)){var p=h("type","array"in f?"data":"percent"),d=!0;"sqrt"!==p&&(d=h("symmetric",!(("data"===p?"arrayminus":"valueminus")in f))),"data"===p?(h("array"),h("traceref"),d||(h("arrayminus"),h("tracerefminus"))):"percent"!==p&&"constant"!==p||(h("value"),d||h("valueminus"));var v="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&h(v,!(f.color||n(f.thickness)||n(f.width))),l.inherit&&c[v]||(h("color",r),h("thickness"),h("width",i.traceIs(e,"gl3d")?0:4))}}},64968:function(t,e,r){"use strict";var n=r(3400),i=r(67824).overrideAll,a=r(97644),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,"calc","nested"),scattergl:i(o,"calc","nested")}},supplyDefaults:r(65200),calc:r(14880),makeComputeError:r(93792),plot:r(78512),style:r(92036),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},78512:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(43616),o=r(43028);t.exports=function(t,e,r,s){var l=r.xaxis,u=r.yaxis,c=s&&s.duration>0,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 g=o.hasMarkers(p)&&p.marker.maxdisplayed>0;v.visible||d.visible||(e=[]);var y=n.select(this).selectAll("g.errorbar").data(e,h);if(y.exit().remove(),e.length){d.visible||y.selectAll("path.xerror").remove(),v.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var m=y.enter().append("g").classed("errorbar",!0);c&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(y,r.layerClipId,t),y.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!g||t.vis){var a,o=e.select("path.yerror");if(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()?c&&(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 y=(d.copy_ystyle?v:d).width;a="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(a+="m0,-"+y+"v"+2*y),p.size()?c&&(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<e.length;s++){var l=e[s],u=l[0].trace;if(!i.traceIs(u,"pie-like")){var c=i.traceIs(u,"2dMap")?a:n.fillArray;c(u.hoverinfo,l,"hi",o(u)),u.hovertemplate&&c(u.hovertemplate,l,"ht"),u.hoverlabel&&(c(u.hoverlabel.bgcolor,l,"hbg"),c(u.hoverlabel.bordercolor,l,"hbc"),c(u.hoverlabel.font.size,l,"hts"),c(u.hoverlabel.font.color,l,"htc"),c(u.hoverlabel.font.family,l,"htf"),c(u.hoverlabel.font.weight,l,"htw"),c(u.hoverlabel.font.style,l,"hty"),c(u.hoverlabel.font.variant,l,"htv"),c(u.hoverlabel.namelength,l,"hnl"),c(u.hoverlabel.align,l,"hta"))}}}},62376:function(t,e,r){"use strict";var n=r(24040),i=r(83292).hover;t.exports=function(t,e,r){var a=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function o(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},92456:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},95448:function(t,e,r){"use strict";var n=r(3400),i=r(55756),a=r(16132);t.exports=function(t,e,r,o){var s=n.extendFlat({},o.hoverlabel);e.hovertemplate&&(s.namelength=-1),a(t,e,(function(r,a){return n.coerce(t,e,i,r,a)}),s)}},10624:function(t,e,r){"use strict";var n=r(3400);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==r.indexOf(n[a]+i[o]))return!0;return!1}return-1!==r.indexOf(e.getSubplot(t))},e.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},e.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},e.getDistanceFunction=function(t,r,n,i){return"closest"===t?i||e.quadrature(r,n):"x"===t.charAt(0)?r:n},e.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},e.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},e.makeEventData=function(t,r,n){var i="index"in t?t.index:t.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:i};if(r._indexToPoints){var o=r._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return r._module.eventData?a=r._module.eventData(a,t,r,n,i):("xVal"in t?a.x=t.xVal:"x"in t&&(a.x=t.x),"yVal"in t?a.y=t.yVal:"y"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),e.appendArrayPointValue(a,r,i),a},e.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){var c=o(n.nestedProperty(e,l).get(),r);void 0!==c&&(t[u]=c)}}},e.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){for(var c=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(c,r[h]);t[u]=f}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};e.isUnifiedHover=function(t){return"string"==typeof t&&!!l[t]},e.isXYhover=function(t){return"string"==typeof t&&!!s[t]}},83292:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(49760),o=r(3400),s=o.pushUnique,l=o.strTranslate,u=o.strRotate,c=r(95924),f=r(72736),h=r(72213),p=r(43616),d=r(76308),v=r(86476),g=r(54460),y=r(33816).zindexSeparator,m=r(24040),x=r(10624),b=r(92456),_=r(77864),w=r(31140),T=b.YANGLE,k=Math.PI*T/180,A=1/Math.sin(k),M=Math.cos(k),S=Math.sin(k),E=b.HOVERARROWSIZE,L=b.HOVERTEXTPAD,C={box:!0,ohlc:!0,violin:!0,candlestick:!0},O={scatter:!0,scattergl:!0,splom:!0};function P(t,e){return t.distance-e.distance}function I(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,a){t=o.getGraphDiv(t);var l=e.target;o.throttle(t._fullLayout._uid+b.HOVERID,b.HOVERMINTIME,(function(){!function(t,e,r,a,l){r||(r="xy"),"string"==typeof r&&(r=r.split(y)[0]);var u,f,p,b=Array.isArray(r)?r:[r],_=t._fullLayout,w=_.hoversubplots,T=_._plots||[],k=T[r],M=_._has("cartesian"),S=e.hovermode||_.hovermode,L="x"===(S||"").charAt(0),D="y"===(S||"").charAt(0);if(M&&(L||D)&&"axis"===w)for(var R=b.length,V=0;V<R;V++)if(T[u=b[V]]){f=g.getFromId(t,u,"x"),p=g.getFromId(t,u,"y");var W=(L?f:p)._subplotsWith;if(W&&W.length)for(var Y=0;Y<W.length;Y++)s(b,W[Y])}if(k&&"single"!==w){var X=k.overlays.map((function(t){return t.id}));b=b.concat(X)}for(var Z=b.length,K=new Array(Z),J=new Array(Z),$=!1,Q=0;Q<Z;Q++)if(T[u=b[Q]])$=!0,K[Q]=T[u].xaxis,J[Q]=T[u].yaxis;else{if(!_[u]||!_[u]._subplot)return void o.warn("Unrecognized subplot: "+u);var tt=_[u]._subplot;K[Q]=tt.xaxis,J[Q]=tt.yaxis}if(S&&!$&&(S="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(S)||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return v.unhoverRaw(t,e);var et=_.hoverdistance;-1===et&&(et=1/0);var rt=_.spikedistance;-1===rt&&(rt=1/0);var nt,it,at,ot,st,lt,ut,ct,ft,ht,pt,dt,vt,gt=[],yt=[],mt={hLinePoint:null,vLinePoint:null},xt=!1;if(Array.isArray(e))for(S="array",at=0;at<e.length;at++)(st=t.calcdata[e[at].curveNumber||0])&&(lt=st[0].trace,"skip"!==st[0].trace.hoverinfo&&(yt.push(st),"h"===lt.orientation&&(xt=!0)));else{var bt,_t,wt=t.calcdata.slice();for(wt.sort((function(t,e){return(t[0].trace.zorder||0)-(e[0].trace.zorder||0)})),ot=0;ot<wt.length;ot++)st=wt[ot],"skip"!==(lt=st[0].trace).hoverinfo&&x.isTraceInSubplots(lt,b)&&(yt.push(st),"h"===lt.orientation&&(xt=!0));if(l){if(!1===c.triggerHandler(t,"plotly_beforehover",e))return;var Tt=l.getBoundingClientRect();bt=e.clientX-Tt.left,_t=e.clientY-Tt.top,_._calcInverseTransform(t);var kt=o.apply3DTransform(_._invTransform)(bt,_t);if(bt=kt[0],_t=kt[1],bt<0||bt>K[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 At=1/0;function Mt(r,n){for(ot=0;ot<yt.length;ot++)if((st=yt[ot])&&st[0]&&st[0].trace&&!0===(lt=st[0].trace).visible&&0!==lt._length&&-1===["carpet","contourcarpet"].indexOf(lt._module.name)){if(ft=S,x.isUnifiedHover(ft)&&(ft=ft.charAt(0)),"splom"===lt.type?ut=b[ct=0]:(ut=x.getSubplot(lt),ct=b.indexOf(ut)),dt={cd:st,trace:lt,xa:K[ct],ya:J[ct],maxHoverDistance:et,maxSpikeDistance:rt,index:!1,distance:Math.min(At,et),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:d.defaultLine,name:lt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},_[ut]&&(dt.subplot=_[ut]._subplot),_._splomScenes&&_._splomScenes[lt.uid]&&(dt.scene=_._splomScenes[lt.uid]),"array"===ft){var a=e[ot];"pointNumber"in a?(dt.index=a.pointNumber,ft="closest"):(ft="","xval"in a&&(ht=a.xval,ft="x"),"yval"in a&&(pt=a.yval,ft=ft?"closest":"y"))}else void 0!==r&&void 0!==n?(ht=r,pt=n):(ht=nt[ct],pt=it[ct]);if(vt=gt.length,0!==et)if(lt._module&&lt._module.hoverPoints){var s=lt._module.hoverPoints(dt,ht,pt,ft,{finiteRange:!0,hoverLayer:_._hoverlayer,hoversubplots:w,gd:t});if(s)for(var l,u=0;u<s.length;u++)l=s[u],i(l.x0)&&i(l.y0)&&gt.push(N(l,S))}else o.log("Unrecognized trace type in hover:",lt);if("closest"===S&&gt.length>vt&&(gt.splice(0,vt),At=gt[0].distance),M&&0!==rt&&0===gt.length){dt.distance=rt,dt.index=!1;var c=lt._module.hoverPoints(dt,ht,pt,"closest",{hoverLayer:_._hoverlayer});if(c&&(c=c.filter((function(t){return t.spikeDistance<=rt}))),c&&c.length){var f,h=c.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=c.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(v.length){var g=v[0];i(g.x0)&&i(g.y0)&&(f=Et(g),(!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;o<t.length;o++)f&&f._id!==t[o].xa._id||p&&p._id!==t[o].ya._id||(n=t[o].spikeDistance,r&&0===o&&(n=-1/0),n<=a&&n<=e&&(i=t[o],a=n));return i}function Et(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}Mt();var Lt={fullLayout:_,container:_._hoverlayer,event:e},Ct=t._spikepoints,Ot={vLinePoint:mt.vLinePoint,hLinePoint:mt.hLinePoint};t._spikepoints=Ot;var Pt=function(){var t=gt.filter((function(t){return f&&f._id===t.xa._id&&p&&p._id===t.ya._id})),e=gt.filter((function(t){return!(f&&f._id===t.xa._id&&p&&p._id===t.ya._id)}));t.sort(P),e.sort(P),gt=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];m.traceIs(s.trace,"bar-like")||m.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(gt=t.concat(e),S)};Pt();var It=S.charAt(0),Dt=("x"===It||"y"===It)&&gt[0]&&O[gt[0].trace.type];if(M&&0!==rt&&0!==gt.length){var zt=St(gt.filter((function(t){return t.ya.showspikes})),rt,Dt);mt.hLinePoint=Et(zt);var Rt=St(gt.filter((function(t){return t.xa.showspikes})),rt,Dt);mt.vLinePoint=Et(Rt)}if(0===gt.length){var Ft=v.unhoverRaw(t,e);return!M||null===mt.hLinePoint&&null===mt.vLinePoint||U(Ct)&&j(t,mt,Lt),Ft}if(M&&U(Ct)&&j(t,mt,Lt),x.isXYhover(ft)&&0!==gt[0].length&&"splom"!==gt[0].trace.type){var Bt=gt[0],Nt=(gt=C[Bt.trace.type]?gt.filter((function(t){return t.trace.index===Bt.trace.index})):[Bt]).length;Mt(q("x",Bt,_),q("y",Bt,_));var jt,Ut=[],Vt={},qt=0,Ht=function(t){var e=C[t.trace.type]?I(t):t.trace.index;if(Vt[e]){var r=Vt[e]-1,n=Ut[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Ut[r]=t)}else qt++,Vt[e]=qt,Ut.push(t)};for(jt=0;jt<Nt;jt++)Ht(gt[jt]);for(jt=gt.length-1;jt>Nt-1;jt--)Ht(gt[jt]);gt=Ut,Pt()}var Gt=t._hoverdata,Wt=[],Yt=H(t),Xt=G(t);for(at=0;at<gt.length;at++){var Zt=gt[at],Kt=x.makeEventData(Zt,Zt.trace,Zt.cd);if(!1!==Zt.hovertemplate){var Jt=!1;Zt.cd[Zt.index]&&Zt.cd[Zt.index].ht&&(Jt=Zt.cd[Zt.index].ht),Zt.hovertemplate=Jt||Zt.trace.hovertemplate||!1}if(Zt.xa&&Zt.ya){var $t=Zt.x0+Zt.xa._offset,Qt=Zt.x1+Zt.xa._offset,te=Zt.y0+Zt.ya._offset,ee=Zt.y1+Zt.ya._offset,re=Math.min($t,Qt),ne=Math.max($t,Qt),ie=Math.min(te,ee),ae=Math.max(te,ee);Kt.bbox={x0:re+Xt,x1:ne+Xt,y0:ie+Yt,y1:ae+Yt}}Zt.eventData=[Kt],Wt.push(Kt)}t._hoverdata=Wt;var oe="y"===S&&(yt.length>1||gt.length>1)||"closest"===S&&xt&&gt.length>1,se=d.combine(_.plot_bgcolor||d.background,_.paper_bgcolor),le=z(gt,{gd:t,hovermode:S,rotateLabels:oe,bgColor:se,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),ue=le.hoverLabels;if(x.isUnifiedHover(S)||(function(t,e,r,n){var i,a,o,s,l,u,c,f=e?"xa":"ya",h=e?"ya":"xa",p=0,d=1,v=t.size(),g=new Array(v),y=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},T=function(t){return t*r._invScaleY};function k(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;s<t.length;s++)(u=t[s]).pos+u.dp+u.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos>e.pmax-1&&(u.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((u=t[s]).pos<e.pmin+1)for(u.del=!0,n--,o=2*u.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos+u.dp+u.size>e.pmax&&(u.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===y&&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 u,c,p=F(t,e),v=t.anchor,k="end"===v?-1:1;if("middle"===v)c=(u=t.crossPos+(a?T(p.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?T(t.by):w(t.bx));else if(a)c=(u=t.crossPos+T(E+p.y)-T(t.by/2-E))+T(t.by);else{var M=w(k*E+p.x),S=M+w(k*t.bx);u=t.crossPos+Math.min(M,S),c=t.crossPos+Math.max(M,S)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(c,x)-Math.max(u,m)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?A:1)/2,pmin:s,pmax:l}]})),g.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<g.length-1;){var M=g[s],S=g[s+1],L=M[M.length-1],C=S[0];if((a=L.pos+L.dp+L.size-C.pos-C.dp+C.size)>.01){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(M.push.apply(M,S),g.splice(s+1,1),c=0,l=M.length-1;l>=0;l--)c+=M[l].dp;for(o=c/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(k)}for(s=g.length-1;s>=0;s--){var O=g[s];for(l=O.length-1;l>=0;l--){var P=O[l],I=P.datum;I.offset=P.dp,I.del=P.del}}}(ue,oe,_,le.commonLabelBoundingBox),B(ue,oe,_._invScaleX,_._invScaleY)),l&&l.tagName){var ce=m.getComponentMethod("annotations","hasClickToShow")(t,Wt);h(n.select(l),ce?"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=H(i),o=G(i),s=z(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,u=t.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),p=Math.max(s,l),v=t.trace;if(m.traceIs(v,"gl3d")){var g=i._fullLayout[v.scene]._scene.container,y=g.offsetLeft,x=g.offsetTop;c+=y,f+=y,h+=x,p+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:p+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!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:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||d.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(u=t.offset)})).each((function(t){t.offset-=u})),B(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var D=/<extra>([\s\S]*)<\/extra>/;function z(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,h=e.container,v=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var y=e.fontFamily||b.HOVERFONT,k=e.fontSize||b.HOVERFONTSIZE,A=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,S=e.fontVariant||i.font.variant,C=e.fontTextcase||i.font.textcase,O=e.fontLineposition||i.font.lineposition,P=e.fontShadow||i.font.shadow,D=t[0],z=D.xa,F=D.ya,B=a.charAt(0),N=B+"Label",j=D[N];if(void 0===j&&"multicategory"===z.type)for(var U=0;U<t.length&&void 0===(j=t[U][N]);U++);var V=W(r,v),q=V.top,H=V.width,G=V.height,Y=void 0!==j&&D.distance<=e.hoverdistance&&("x"===a||"y"===a);if(Y){var X,Z,K=!0;for(X=0;X<t.length;X++)if(K&&void 0===t[X].zLabel&&(K=!1),Z=t[X].hoverinfo||t[X].trace.hoverinfo){var J=Array.isArray(Z)?Z:Z.split("+");if(-1===J.indexOf("all")&&-1===J.indexOf(a)){Y=!1;break}}K&&(Y=!1)}var $=h.selectAll("g.axistext").data(Y?[0]:[]);$.enter().append("g").classed("axistext",!0),$.exit().remove();var Q={minX:0,maxX:0,minY:0,maxY:0};if($.each((function(){var t=n.select(this),e=o.ensureSingle(t,"path","",(function(t){t.style({"stroke-width":"1px"})})),s=o.ensureSingle(t,"text","",(function(t){t.attr("data-notex",1)})),u=g.bgcolor||d.defaultLine,c=g.bordercolor||d.contrast(u),h=d.contrast(u),v=g.font,m={weight:v.weight||A,style:v.style||M,variant:v.variant||S,textcase:v.textcase||C,lineposition:v.lineposition||O,shadow:v.shadow||P,family:v.family||y,size:v.size||k,color:v.color||h};e.style({fill:u,stroke:c}),s.text(j).call(p.font,m).call(f.positionText,0,0).call(f.convertToTspans,r),t.attr("transform","");var x,b,_=W(r,s.node());if("x"===a){var w="top"===z.side?"-":"";s.attr("text-anchor","middle").call(f.positionText,0,"top"===z.side?q-_.bottom-E-L:q-_.top+E+L),x=z._offset+(D.x0+D.x1)/2,b=F._offset+("top"===z.side?0:F._length);var T=_.width/2+L,I=x;x<T?I=T:x>i.width-T&&(I=i.width-T),e.attr("d","M"+(x-I)+",0L"+(x-I+E)+","+w+E+"H"+T+"v"+w+(2*L+_.height)+"H"+-T+"V"+w+E+"H"+(x-I-E)+"Z"),x=I,Q.minX=x-T,Q.maxX=x+T,"top"===z.side?(Q.minY=b-(2*L+_.height),Q.maxY=b-L):(Q.minY=b+L,Q.maxY=b+(2*L+_.height))}else{var R,B,N;"right"===F.side?(R="start",B=1,N="",x=z._offset+z._length):(R="end",B=-1,N="-",x=z._offset),b=F._offset+(D.y0+D.y1)/2,s.attr("text-anchor",R),e.attr("d","M0,0L"+N+E+","+E+"V"+(L+_.height/2)+"h"+N+(2*L+_.width)+"V-"+(L+_.height/2)+"H"+N+E+"V-"+E+"Z"),Q.minY=b-(L+_.height/2),Q.maxY=b+(L+_.height/2),"right"===F.side?(Q.minX=x+E,Q.maxX=x+E+(2*L+_.width)):(Q.minX=x-E-(2*L+_.width),Q.maxX=x-E);var U,V=_.height/2,H=q-_.top-V,G="clip"+i._uid+"commonlabel"+F._id;if(x<_.width+2*L+E){U="M-"+(E+L)+"-"+V+"h-"+(_.width-L)+"V"+V+"h"+(_.width-L)+"Z";var Y=_.width-x+L;f.positionText(s,Y,H),"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)<Math.round(_.width)&&t.attr("x",Y-i.width),e.remove()}))}else f.positionText(s,B*(L+E),H),U=null;var X=i._topclips.selectAll("#"+G).data(U?[0]:[]);X.enter().append("clipPath").attr("id",G).append("path"),X.exit().remove(),X.select("path").attr("d",U),p.setClipUrl(s,U?G:null,r)}t.attr("transform",l(x,b))})),x.isUnifiedHover(a)){h.selectAll("g.hovertext").remove();var tt=t.filter((function(t){return"none"!==t.hoverinfo}));if(0===tt.length)return[];var et=i.hoverlabel,rt=et.font,nt={showlegend:!0,legend:{title:{text:j,font:rt},font:rt,bgcolor:et.bgcolor,bordercolor:et.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},it={font:rt};_(nt,it,r._fullData);var at=it.legend;at.entries=[];for(var ot=0;ot<tt.length;ot++){var st=tt[ot];if("none"!==st.hoverinfo){var lt=R(st,!0,a,i,j),ut=lt[0],ct=lt[1];st.name=ct,st.text=""!==ct?ct+" : "+ut:ut;var ft=st.cd[st.index];ft&&(ft.mc&&(st.mc=ft.mc),ft.mcc&&(st.mc=ft.mcc),ft.mlc&&(st.mlc=ft.mlc),ft.mlcc&&(st.mlc=ft.mlcc),ft.mlw&&(st.mlw=ft.mlw),ft.mrc&&(st.mrc=ft.mrc),ft.dir&&(st.dir=ft.dir)),st._distinct=!0,at.entries.push([st])}}at.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),at.layer=h,at._inHover=!0,at._groupTitleFont=et.grouptitlefont,w(r,at);var ht,pt,dt,vt,gt=h.select("g.legend"),yt=W(r,gt.node()),mt=yt.width+2*L,xt=yt.height+2*L,bt=tt[0],_t=(bt.x0+bt.x1)/2,wt=(bt.y0+bt.y1)/2,Tt=!(m.traceIs(bt.trace,"bar-like")||m.traceIs(bt.trace,"box-violin"));"y"===B?Tt?(pt=wt-L,ht=wt+L):(pt=Math.min.apply(null,tt.map((function(t){return Math.min(t.y0,t.y1)}))),ht=Math.max.apply(null,tt.map((function(t){return Math.max(t.y0,t.y1)})))):pt=ht=o.mean(tt.map((function(t){return(t.y0+t.y1)/2})))-xt/2,"x"===B?Tt?(dt=_t+L,vt=_t-L):(dt=Math.max.apply(null,tt.map((function(t){return Math.max(t.x0,t.x1)}))),vt=Math.min.apply(null,tt.map((function(t){return Math.min(t.x0,t.x1)})))):dt=vt=o.mean(tt.map((function(t){return(t.x0+t.x1)/2})))-mt/2;var kt,At,Mt=z._offset,St=F._offset;return vt+=Mt-mt,pt+=St-xt,kt=(dt+=Mt)+mt<H&&dt>=0?dt:vt+mt<H&&vt>=0?vt:Mt+mt<H?Mt:dt-_t<_t-vt+mt?H-mt:0,kt+=L,At=(ht+=St)+xt<G&&ht>=0?ht:pt+xt<G&&pt>=0?pt:St+xt<G?St:ht-wt<wt-pt+xt?G-xt:0,At+=L,gt.attr("transform",l(kt-1,At-1)),gt}var Et=h.selectAll("g.hovertext").data(t,(function(t){return I(t)}));return Et.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(d.fill,d.addOpacity(c,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(p.font,{weight:A,style:M,variant:S,textcase:C,lineposition:O,shadow:P,family:y,size:k})})),Et.exit().remove(),Et.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var h=t.bgcolor||o,v=d.combine(d.opacity(h)?h:d.defaultLine,c),g=d.combine(d.opacity(o)?o:d.defaultLine,c),m=t.borderColor||d.contrast(v),x=R(t,Y,a,i,j,e),b=x[0],_=x[1],w=e.select("text.nums").call(p.font,{family:t.fontFamily||y,size:t.fontSize||k,color:t.fontColor||m,weight:t.fontWeight||A,style:t.fontStyle||M,variant:t.fontVariant||S,textcase:t.fontTextcase||C,lineposition:t.fontLineposition||O,shadow:t.fontShadow||P}).text(b).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r),I=e.select("text.name"),D=0,z=0;if(_&&_!==b){I.call(p.font,{family:t.fontFamily||y,size:t.fontSize||k,color:g,weight:t.fontWeight||A,style:t.fontStyle||M,variant:t.fontVariant||S,textcase:t.fontTextcase||C,lineposition:t.fontLineposition||O,shadow:t.fontShadow||P}).text(_).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r);var F=W(r,I.node());D=F.width+2*L,z=F.height+2*L}else I.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:m});var B=t.xa._offset+(t.x0+t.x1)/2,N=t.ya._offset+(t.y0+t.y1)/2,U=Math.abs(t.x1-t.x0),V=Math.abs(t.y1-t.y0),X=W(r,w.node()),Z=X.width/i._invScaleX,K=X.height/i._invScaleY;t.ty0=(q-X.top)/i._invScaleY,t.bx=Z+2*L,t.by=Math.max(K+2*L,z),t.anchor="start",t.txwidth=Z,t.tx2width=D,t.offset=0;var J,$,Q=(Z+E+L+D)*i._invScaleX;if(s)t.pos=B,J=N+V/2+Q<=G,$=N-V/2-Q>=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<=H,$=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-H,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),D&&I.attr("text-anchor",t.anchor),e.attr("transform",l(B,N)+(s?u(T):""))})),{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 u=r.charAt(0),c="x"===u?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"<br>"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"<br>"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[u+"Label"]===i?l=t[c+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"<br>":"")+t.text),void 0!==t.extraText&&(l+=(l?"<br>":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[u+"Label"]!==i&&(h[u+"other"]=h[u+"Val"],h[u+"otherLabel"]=h[u+"Label"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(D,(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,u,c=r.select("text.nums"),h=t.anchor,d="end"===h?-1:1,v=(u=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(E+L))+s*(i.txwidth+L),"middle"===i.anchor&&(l-=i.tx2width/2,u+=i.txwidth/2+L),{alignShift:s,textShiftX:l,text2ShiftX:u}),g=F(t,e),y=g.x,m=g.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+y)+","+o(E+m)+"v"+o(t.by/2-E)+"h"+a(d*t.bx)+"v-"+o(t.by)+"H"+a(d*E+y)+"V"+o(m-E)+"Z");var b=y+v.textShiftX,_=m+t.ty0-t.by/2+L,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==h?(c.attr("text-anchor","start"),b=x?-t.bx/2-t.tx2width/2+L:-t.bx-L):"right"===w&&"end"!==h&&(c.attr("text-anchor","end"),b=x?t.bx/2-t.tx2width/2-L:t.bx+L)),c.call(f.positionText,a(b),o(_)),t.tx2width&&(r.select("text.name").call(f.positionText,a(v.text2ShiftX+v.alignShift*L+y),o(m+t.ty0-t.by/2+L)),r.select("rect").call(p.setRect,a(v.text2ShiftX+(v.alignShift-1)*t.tx2width/2+y),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 u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("fontWeight","htw","hoverlabel.font.weight"),c("fontStyle","hty","hoverlabel.font.style"),c("fontVariant","htv","hoverlabel.font.variant"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function j(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var h=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var v,y,m=e.hLinePoint;n=m&&m.xa,"cursor"===(i=m&&m.ya).spikesnap?(v=u.pointerX,y=u.pointerY):(v=n._offset+m.x,y=i._offset+m.y);var x,b,_=a.readability(m.color,h)<1.5?d.contrast(h):m.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,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:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":p.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(E=u.pointerX,L=u.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var O,P,I=a.readability(C.color,h)<1.5?d.contrast(h):C.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=g.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(O=F,P=L),-1!==D.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),O=l.t+(1-N)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:O,y2:P,"stroke-width":z,stroke:R,"stroke-dasharray":p.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:O,y2:P,"stroke-width":z+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?z:-z),r:z,fill:R}).classed("spikeline",!0)}}}function 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 q(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var u=s[t+"End"];void 0===u&&(u=s[t]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function H(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,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),f=u[0],h=u[1],p=c[0],d=c[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},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"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},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 u(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var p=u+c*h;l[a?i-1-h:h]=[p,p+f]}return l}function f(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=""}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=u(e,r,"x"),a=u(e,r,"y");if(t.grid||i||a){var o,f,h=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),v=p&&i!==r.xaxes&&d&&a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(d&&(o=a.length),p&&(f=i.length));var g=s.newContainer(e,"grid"),y=k("rows",o),m=k("columns",f);if(y*m>1){h||p||d||"independent"===k("pattern")&&(h=!0),g._hasSubplotGrid=h;var x,b,_="top to bottom"===k("roworder"),w=h?.2:.1,T=h?.3:.1;v&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),g._domains={x:c("x",k,w,x,m),y:c("y",k,T,b,y,_)}}else delete e.grid}function k(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,c,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,v=r.rows,g=r.columns,y="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<v;n++){var _=l[n]=new Array(g),w=x[n]||[];for(i=0;i<g;i++)if(y?(s=1===b?"xy":"x"+b+"y"+b,b++):s=w[i],_[i]="",-1!==p.cartesian.indexOf(s)){if(c=s.indexOf("y"),a=s.slice(0,c),o=s.slice(c),void 0!==m[a]&&m[a]!==i||void 0!==m[o]&&m[o]!==n)continue;_[i]=s,m[a]=i,m[o]=n}}}else{var T=u(e,h,"x"),k=u(e,h,"y");r.xaxes=f(T,p.xaxis,g,m,"x"),r.yaxes=f(k,p.yaxis,v,m,"y")}var A=r._anchors={},M="top to bottom"===r.roworder;for(var S in m){var E,L,C,O=S.charAt(0),P=r[O+"side"];if(P.length<8)A[S]="free";else if("x"===O){if("t"===P.charAt(0)===M?(E=0,L=1,C=v):(E=v-1,L=-1,C=-1),d){var I=m[S];for(n=E;n!==C;n+=L)if((s=l[n][I])&&(c=s.indexOf("y"),s.slice(0,c)===S)){A[S]=s.slice(c);break}}else for(n=E;n!==C;n+=L)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){A[S]=o;break}}else if("l"===P.charAt(0)?(E=0,L=1,C=g):(E=g-1,L=-1,C=-1),d){var D=m[S];for(n=E;n!==C;n+=L)if((s=l[D][n])&&(c=s.indexOf("y"),s.slice(c)===S)){A[S]=s.slice(0,c);break}}else for(n=E;n!==C;n+=L)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){A[S]=a;break}}}}}},65760:function(t,e,r){"use strict";var n=r(33816),i=r(31780).templatedArray;r(36208),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},63556:function(t,e,r){"use strict";var n=r(38248),i=r(36896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,f=e._id.charAt(0),h=0;h<c.length;h++)if(u="images["+h+"].",(l=c[h])[f+"ref"]===e._id){var p=l[f],d=l["size"+f],v=null,g=null;if(o){v=i(p,e.range);var y=d/Math.pow(10,v)/2;g=2*Math.log(y+Math.sqrt(1+y*y))/Math.LN10}else g=(v=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(v)?n(g)||(g=null):(v=null,g=null),a(u+f,v),a(u+"size"+f,g)}}},25024:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(65760);function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a("source");if(!a("visible",!!s))return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:r},u=["x","y"],c=0;c<2;c++){var f=u[c],h=i.coerceRef(t,e,l,f,"paper",void 0);"paper"!==h&&i.getFromId(l,h)._imgIndices.push(e._index),i.coercePosition(e,l,a,h,f,0)}return e}t.exports=function(t,e){a(t,e,{name:"images",handleItemDefaults:s})}},60963:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(54460),o=r(79811),s=r(9616);t.exports=function(t){var e,r,l=t._fullLayout,u=[],c={},f=[];for(r=0;r<l.images.length;r++){var h=l.images[r];if(h.visible)if("below"===h.layer&&"paper"!==h.xref&&"paper"!==h.yref){e=o.ref2id(h.xref)+o.ref2id(h.yref);var p=l._plots[e];if(!p){f.push(h);continue}p.mainplot&&(e=p.mainplot.id),c[e]||(c[e]=[]),c[e].push(h)}else"above"===h.layer?u.push(h):f.push(h)}var d={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},v={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function g(e){var r=n.select(this);if(this._imgSrc!==e.source)if(r.attr("xmlns",s.svg),e.source&&"data:"===e.source.slice(0,5))r.attr("xlink:href",e.source),this._imgSrc=e.source;else{var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=i,n.onload=function(){var e=document.createElement("canvas");e.width=this.width,e.height=this.height,e.getContext("2d",{willReadFrequently:!0}).drawImage(this,0,0);var n=e.toDataURL("image/png");r.attr("xlink:href",n),t()},r.on("error",i),n.src=e.source,this._imgSrc=e.source}.bind(this));t._promises.push(i)}}function y(e){var r,o,s=n.select(this),u=a.getFromId(t,e.xref),c=a.getFromId(t,e.yref),f="domain"===a.getRefType(e.xref),h="domain"===a.getRefType(e.yref),p=l._size;r=void 0!==u?"string"==typeof e.xref&&f?u._length*e.sizex:Math.abs(u.l2p(e.sizex)-u.l2p(0)):e.sizex*p.w,o=void 0!==c?"string"==typeof e.yref&&h?c._length*e.sizey:Math.abs(c.l2p(e.sizey)-c.l2p(0)):e.sizey*p.h;var g,y,m=r*d[e.xanchor].offset,x=o*v[e.yanchor].offset,b=d[e.xanchor].sizing+v[e.yanchor].sizing;switch(g=void 0!==u?"string"==typeof e.xref&&f?u._length*e.x+u._offset:u.r2p(e.x)+u._offset:e.x*p.w+p.l,g+=m,y=void 0!==c?"string"==typeof e.yref&&h?c._length*(1-e.y)+c._offset:c.r2p(e.y)+c._offset:p.h-e.y*p.h+p.t,y+=x,e.sizing){case"fill":b+=" slice";break;case"stretch":b="none"}s.attr({x:g,y:y,width:r,height:o,preserveAspectRatio:b,opacity:e.opacity});var _=(u&&"domain"!==a.getRefType(e.xref)?u._id:"")+(c&&"domain"!==a.getRefType(e.yref)?c._id:"");i.setClipUrl(s,_?"clip"+l._uid+_:null,t)}var m=l._imageLowerLayer.selectAll("image").data(f),x=l._imageUpperLayer.selectAll("image").data(u);m.enter().append("image"),x.enter().append("image"),m.exit().remove(),x.exit().remove(),m.each((function(t){g.bind(this)(t),y.bind(this)(t)})),x.each((function(t){g.bind(this)(t),y.bind(this)(t)}));var b=Object.keys(l._plots);for(r=0;r<b.length;r++){e=b[r];var _=l._plots[e];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(c[e]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(t){g.bind(this)(t),y.bind(this)(t)}))}}}},7402:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(65760),supplyLayoutDefaults:r(25024),includeBasePlot:r(36632)("images"),draw:r(60963),convertCoords:r(63556)}},3800:function(t,e,r){"use strict";var n=r(25376),i=r(22548);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},65196:function(t){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},77864:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(31780),o=r(45464),s=r(3800),l=r(64859),u=r(42451);function c(t,e,r,c){var f=e[t]||{},h=a.newContainer(r,t);function p(t,e){return i.coerce(f,h,s,t,e)}var d=i.coerceFont(p,"font",r.font);if(p("bgcolor",r.paper_bgcolor),p("bordercolor"),p("visible")){for(var v,g=function(t,e){var r=v._input,n=v;return i.coerce(r,n,o,t,e)},y=r.font||{},m=i.coerceFont(p,"grouptitlefont",y,{overrideDflt:{size:Math.round(1.1*y.size)}}),x=0,b=!1,_="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),T=c.concat(w).filter((function(e){return t===(e.legend||"legend")})),k=0;k<T.length;k++)if((v=T[k]).visible){var A=v._isShape;(v.showlegend||v._dfltShowLegend&&!(v._module&&v._module.attributes&&v._module.attributes.showlegend&&!1===v._module.attributes.showlegend.dflt))&&(x++,v.showlegend&&(b=!0,(!A&&n.traceIs(v,"pie-like")||!0===v._input.showlegend)&&x++),i.coerceFont(g,"legendgrouptitle.font",m)),(!A&&n.traceIs(v,"bar")&&"stack"===r.barmode||-1!==["tonextx","tonexty"].indexOf(v.fill))&&(_=u.isGrouped({traceorder:_})?"grouped+reversed":"reversed"),void 0!==v.legendgroup&&""!==v.legendgroup&&(_=u.isReversed({traceorder:_})?"reversed+grouped":"grouped")}var M=i.coerce(e,r,l,"showlegend",b&&x>("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,L,C="h"===p("orientation"),O="paper"===p("yref"),P="paper"===p("xref"),I="left";if(C?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?O?(E=1.1,L="bottom"):(E=1,L="top"):O?(E=-.1,L="top"):(E=0,L="bottom")):(E=1,L="auto",P?S=1.02:(S=1,I="right")),i.coerce(f,h,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:S}},"x"),i.coerce(f,h,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:E}},"y"),p("traceorder",_),u.isGrouped(r[t])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",I),p("yanchor",L),p("valign"),i.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",C?"left":"top");var D=i.extendFlat({},d,{size:i.bigFont(d.size)});i.coerceFont(p,"title.font",D)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(n=0;n<a.length;n++)i.pushUnique(u,a[n].legend);for(e._legends=[],n=0;n<u.length;n++){var f=u[n];c(f,t,e,a),e[f]&&e[f].visible&&(e[f]._id=f),e._legends.push(f)}}},31140:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(7316),o=r(24040),s=r(95924),l=r(86476),u=r(43616),c=r(76308),f=r(72736),h=r(33048),p=r(65196),d=r(84284),v=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,m=r(35456),x=r(2012),b=r(42451),_=1,w=/^legend[0-9]*$/;function T(t,e){var r,s,h=e||{},d=t._fullLayout,w=P(h),T=h._inHover;if(T?(s=h.layer,r="hover"):(s=d._infolayer,r=w),s){var S;if(r+=d._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),T){if(!h.entries)return;S=m(h.entries,h)}else{for(var I=(t.calcdata||[]).slice(),D=d.shapes,z=0;z<D.length;z++){var R=D[z];if(R.showlegend){var F={_isShape:!0,_fullInput:R,index:R._index,name:R.name||R.label.text||"shape "+R._index,legend:R.legend,legendgroup:R.legendgroup,legendgrouptitle:R.legendgrouptitle,legendrank:R.legendrank,legendwidth:R.legendwidth,showlegend:R.showlegend,visible:R.visible,opacity:R.opacity,mode:"line"===R.type?"lines":"markers",line:R.line,marker:{line:R.line,color:R.fillcolor,size:12,symbol:"rect"===R.type?"square":"circle"===R.type?"circle":"hexagon2"}};I.push([{trace:F}])}}S=d.showlegend&&m(I,h,d._legends.length>1)}var B=d.hiddenlabels||[];if(!(T||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){T||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(c.stroke,h.bordercolor).call(c.fill,h.bgcolor).style("stroke-width",h.borderwidth+"px");var V,q=i.ensureSingle(N,"g","scrollbox"),H=h.title;h._titleWidth=0,h._titleHeight=0,H.text?((V=i.ensureSingle(q,"text",w+"titletext")).attr("text-anchor","start").call(u.font,H.font).text(H.text),L(V,q,t,h,_)):q.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(N,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),W=q.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(){T||n.select(this).call(E,t,w)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout,o=P(i);i||(i=a[o]);var s=a._size,l=b.isVertical(i),c=b.isGrouped(i),f="fraction"===i.entrywidthmode,h=i.borderwidth,d=2*h,v=p.itemGap,g=i.indentation+i.itemwidth+2*v,y=2*(h+v),m=O(i),x=i.y<0||0===i.y&&"top"===m,_=i.y>1||1===i.y&&"bottom"===m,w=i.tracegroupgap,T={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var A=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;u.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)})),A=g+i._width,i._width+=v+g+d,i._height+=y,c&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=C(i),E=i.x<0||0===i.x&&"right"===S,L=i.x>1||1===i.x&&"left"===S,I=_||x,D=a.width/2;i._maxWidth=Math.max(E?I&&"left"===S?s.l+s.w:D:L?I&&"right"===S?s.r+s.w:D:s.w,2*g);var z=0,R=0;r.each((function(t){var e=k(t,i,g);z=Math.max(z,e),R+=e})),A=null;var F=0;if(c){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=k(r,i,g),a=r[0].height;u.setTranslate(this,M[0],M[1]+h+v+a/2+e),e+=a,t=Math.max(t,n),T[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),u.setTranslate(this,N,j),N+=r})),i._width=Math.max(F,N)+h,i._height=j+B+y}else{var U=r.size(),V=R+d+(U-1)*v<i._maxWidth,q=0,H=0,G=0,W=0;r.each((function(t){var e=t[0].height,r=k(t,i,g),n=V?r:z;f||(n+=v),n+h+H-v>=i._maxWidth&&(F=Math.max(F,W),H=0,G+=q,i._height+=q,q=0),u.setTranslate(this,M[0]+h+H,M[1]+h+G+e/2+v),W=H+r+v,H+=n,q=Math.max(q,e)})),V?(i._width=H+d,i._height=q+y):(i._width=Math.max(F,W)+d,i._height+=q+y)}}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=k(t,i,g);c&&""!==a&&(s=T[a]);var h=X?g:A||s;l||f||(h+=v/2),u.setRect(e,0,-r/2,h,r)}))}(t,W,Y,h)},function(){var e,c,m,x,b=d._size,_=h.borderwidth,k="paper"===h.xref,M="paper"===h.yref;if(H.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=u.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,_),!T){var S,E;S=k?b.l+b.w*h.x-g[C(h)]*h._width:d.width*h.x-g[C(h)]*h._width,E=M?b.t+b.h*(1-h.y)-g[O(h)]*h._effHeight:d.height*(1-h.y)-g[O(h)]*h._effHeight;var L=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=C(o),l=O(o),u="paper"===o.xref,c="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(u&&c)return a.autoMargin(t,e,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});u?t._fullLayout._reservedMargin[e][f]=p[f]:c||"v"===o.orientation?t._fullLayout._reservedMargin[e][h]=p[h]:t._fullLayout._reservedMargin[e][f]=p[f]}(t,w,S,E);if(L)return;if(d.margin.autoexpand){var P=S,I=E;S=k?i.constrain(S,0,d.width-h._width):P,E=M?i.constrain(E,0,d.height-h._effHeight):I,S!==P&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==I&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(N,S,E)}if(G.on(".drag",null),N.on("wheel",null),T||h._height<=h._maxHeight||t._context.staticPlot){var D=h._effHeight;T&&(D=h._height),U.attr({width:h._width-_,height:D-_,x:_/2,y:_/2}),u.setTranslate(q,0,0),j.select("rect").attr({width:h._width-2*_,height:D-2*_,x:_,y:_}),u.setClipUrl(q,r,t),u.setRect(G,0,0,0,0),delete h._scrollY}else{var z,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}),u.setClipUrl(q,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;z="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,z,R),$(Z,B,X))}));G.call(K);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(z=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,z,R),$(Z,B,X))}));q.call(J)}function $(e,r,n){h._scrollY=t._fullLayout[w]._scrollY=e,u.setTranslate(q,0,-e),u.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=u.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;u.setTranslate(N,n,i),e=l.align(n,h._width,b.l,b.l+b.w,h.xanchor),c=l.align(i+h._height,-h._height,b.t+b.h,b.t,h.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==c){var r={};r[w+".x"]=e,r[w+".y"]=c,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&&A(t,N,n,e,r)}}))}],t)}}function k(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 A(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 u=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===u)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!==u&&h(r,t,n))}function M(t,e,r){var n,a,s=P(r),l=t.data()[0][0],c=l.trace,h=o.traceIs(c,"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:c.name,c._meta&&(n=i.templateString(n,c._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(u.font,a).text(d?S(n,v):n);var y=r.indentation+r.itemwidth+2*p.itemGap;f.positionText(g,y,0),d?g.call(f.makeEditable,{gd:e,text:n}).call(L,t,e,r).on("edit",(function(n){this.text(S(n,v)).call(L,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.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["+c.index+"].name",s.name):o.call("_guiRestyle",e,s,c.index)})):L(g,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(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTime<o?s+=1:(s=1,e._legendMouseDownTime=a)})),l.on("mouseup",(function(){if(!e._dragged&&!e._editing){var i=e._fullLayout[r];(new Date).getTime()-e._legendMouseDownTime>o&&(s=Math.max(s-1,1)),A(e,i,t,s,n.event)}})))}function L(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=P(r);r||(r=e._fullLayout[s]);var l,c,h=r.borderwidth,d=(n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*v;if(o){var g=u.bBox(o);l=g.height,c=g.width,n===_?u.setTranslate(a,h,h+.75*l):u.setTranslate(a,0,.25*l)}else{var y="."+s+(n===_?"title":"")+"text",m=t.select(y),x=f.lineCount(m),b=m.node();if(l=d*x,c=b?u.bBox(b).width:0,n===_)"left"===r.title.side&&(c+=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,c-=r.indentation+r.itemwidth),f.positionText(m,w,-d*((x-1)/2-.3))}}n===_?(r._titleWidth=c,r._titleHeight=l):(i.lineHeight=d,i.height=Math.max(l,16)+3,i.width=c)}else t.remove()}(e,r,n,i)}))}function C(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function O(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function P(t){return t._id||"legend"}t.exports=function(t,e){if(e)T(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;a<i.length;a++){var o=i[a];T(t,t._fullLayout[o])}}}},35456:function(t,e,r){"use strict";var n=r(24040),i=r(42451);t.exports=function(t,e,r){var a,o,s=e._inHover,l=i.isGrouped(e),u=i.isReversed(e),c={},f=[],h=!1,p={},d=0,v=0;function g(t,n,a){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===f.indexOf(n)?(f.push(n),h=!0,c[n]=[a]):c[n].push(a);else{var o="~~i"+d;f.push(o),c[o]=[a],d++}}for(a=0;a<t.length;a++){var y=t[a],m=y[0],x=m.trace,b=x.legend,_=x.legendgroup;if(s||x.visible&&x.showlegend)if(n.traceIs(x,"pie-like"))for(p[_]||(p[_]={}),o=0;o<y.length;o++){var w=y[o].label;p[_][w]||(g(b,_,{label:w,color:y[o].color,i:y[o].i,trace:x,pts:y[o].pts}),p[_][w]=!0,v=Math.max(v,(w||"").length))}else g(b,_,m),v=Math.max(v,(x.name||"").length)}if(!f.length)return[];var T=!h||!l,k=[];for(a=0;a<f.length;a++){var A=c[f[a]];T?k.push(A[0]):k.push(A)}for(T&&(k=[k]),a=0;a<k.length;a++){var M=1/0;for(o=0;o<k[a].length;o++){var S=k[a][o].trace.legendrank;M>S&&(M=S)}k[a][0]._groupMinRank=M,k[a][0]._preGroupSort=a}var E=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(k.forEach((function(t,e){t[0]._preGroupSort=e})),k.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;a<k.length;a++){k[a].forEach((function(t,e){t._preSort=e})),k[a].sort(E);var L=k[a][0].trace,C=null;for(o=0;o<k[a].length;o++){var O=k[a][o].trace.legendgrouptitle;if(O&&O.text){C=O,s&&(O.font=e._groupTitleFont);break}}if(u&&k[a].reverse(),C){var P=!1;for(o=0;o<k[a].length;o++)if(n.traceIs(k[a][o].trace,"pie-like")){P=!0;break}k[a].unshift({i:-1,groupTitle:C,noClick:P,trace:{showlegend:L.showlegend,legendgroup:L.legendgroup,visible:"toggleitem"===e.groupclick||L.visible}})}for(o=0;o<k[a].length;o++)k[a][o]=[k[a][o]]}return e._lgroupsLength=k.length,e._maxNameLength=v,k}},33048:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=i.pushUnique,o=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,u=s.legend.itemclick,c=s.legend.itemdoubleclick,f=s.legend.groupclick;if(1===r&&"toggle"===u&&"toggleothers"===c&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=u:2===r&&(l=c),l){var h="togglegroup"===f,p=s.hiddenlabels?s.hiddenlabels.slice():[],d=t.data()[0][0];if(!d.groupTitle||!d.noClick){var v=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),y=v.concat(g),m=d.trace;m._isShape&&(m=m._fullInput);var x,b,_,w,T,k=m.legendgroup,A={},M=[],S=[],E=[],L=(s.shapes||[]).map((function(t){return t._input})),C=!1,O=m.legend,P=m._fullInput;if(P&&P._isShape||!n.traceIs(m,"pie-like")){var I,D=k&&k.length,z=[];if(D)for(x=0;x<y.length;x++)(I=y[x]).visible&&I.legendgroup===k&&z.push(x);if("toggle"===l){var R;switch(m.visible){case!0:R="legendonly";break;case!1:R=!1;break;case"legendonly":R=!0}if(D)if(h)for(x=0;x<y.length;x++){var F=y[x];!1!==F.visible&&F.legendgroup===k&&tt(F,R)}else tt(m,R);else tt(m,R)}else if("toggleothers"===l){var B,N,j,U,V=!0;for(x=0;x<y.length;x++)if(B=(U=y[x])===m,N=!0!==U.showlegend,!(B||N||D&&U.legendgroup===k||U.legend!==O||!0!==U.visible||n.traceIs(U,"notLegendIsolatable"))){V=!1;break}for(x=0;x<y.length;x++)if(!1!==(U=y[x]).visible&&U.legend===O&&!n.traceIs(U,"notLegendIsolatable"))switch(m.visible){case"legendonly":tt(U,!0);break;case!0:j=!!V||"legendonly",B=U===m,N=!0!==U.showlegend&&!U.legendgroup,tt(U,!!(B||D&&U.legendgroup===k||N)||j)}}for(x=0;x<S.length;x++)if(_=S[x]){var q=_.constructUpdate(),H=Object.keys(q);for(b=0;b<H.length;b++)w=H[b],(A[w]=A[w]||[])[E[x]]=q[w]}for(T=Object.keys(A),x=0;x<T.length;x++)for(w=T[x],b=0;b<M.length;b++)A[w].hasOwnProperty(b)||(A[w][b]=void 0);C?n.call("_guiUpdate",e,A,{shapes:L},M):n.call("_guiRestyle",e,A,M)}else{var G=d.label,W=p.indexOf(G);if("toggle"===l)-1===W?p.push(G):p.splice(W,1);else if("toggleothers"===l){var Y=-1!==W,X=[];for(x=0;x<e.calcdata.length;x++){var Z=e.calcdata[x];for(b=0;b<Z.length;b++){var K=Z[b].label;O===Z[0].trace.legend&&G!==K&&(-1===p.indexOf(K)&&(Y=!0),a(p,K),X.push(K))}}if(!Y)for(var J=0;J<X.length;J++){var $=p.indexOf(X[J]);-1!==$&&p.splice($,1)}}n.call("_guiRelayout",e,"hiddenlabels",p)}}}}function Q(t,e){var r=M.indexOf(t),n=A.visible;return n||(n=A.visible=[]),-1===M.indexOf(t)&&(M.push(t),r=M.length-1),n[r]=e,r}function tt(t,e){if(!d.groupTitle||h){var r,a=t._fullInput||t,o=a._isShape,s=a.index;if(void 0===s&&(s=a._index),n.hasTransform(a,"groupby")){var l=S[s];if(!l){var u=n.getTransformIndices(a,"groupby"),c=u[u.length-1];l=i.keyedContainer(a,"transforms["+c+"].styles","target","value.visible"),S[s]=l}var f=l.get(t._group);void 0===f&&(f=!0),!1!==f&&l.set(t._group,e),E[s]=Q(s,!1!==a.visible)}else{var p=!1!==a.visible&&e;o?(r=p,L[s].visible=r,C=!0):Q(s,p)}}}}},42451:function(t,e){"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},2780:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(3800),supplyLayoutDefaults:r(77864),draw:r(31140),style:r(2012)}},2012:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=a.strTranslate,s=r(43616),l=r(76308),u=r(94288).extractOpts,c=r(43028),f=r(10528),h=r(69656).castOption,p=r(65196);function d(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function v(t){var e=t[0].trace,r=e.contours,n=c.hasLines(e),i=c.hasMarkers(e),a=e.visible&&e.fill&&"none"!==e.fill,o=!1,s=!1;if(r){var l=r.coloring;"lines"===l?o=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?a="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function g(t,e,r){return t&&a.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var y=e._fullLayout;r||(r=y.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 T(t,a,o){var c=t[0].trace,f=c.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?c.visible&&c.type===o:i.traceIs(c,"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=u(f),v=d.mid;void 0===v&&(v=(d.max+d.min)/2),p=s.tryColorscale(f,"")(v)}var y=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),T=m.fgopacity,k=g(m.size,8,10),A=g(m.solidity,.5,1),M="legend-"+c.uid;i.call(s.pattern,"legend",e,M,x,k,A,p,m.fillmode,b,_,T)}else i.call(l.fill,y);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,r,o){var s=t[0],l=s.trace,u=o?l.visible&&l.type===o:i.traceIs(l,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[t]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var p=l.marker||{},d=w(h(p.line.width,s.pts),p.line,5,2),v="pieLike",g=a.minExtend(l,{marker:{line:{width:d}}},v),y=a.minExtend(s,{trace:g},v);f(c,y,g,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,u=t[0].lineHeight,c=t[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(u-c+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 c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(t,o){var c,f=n.select(this),h=u(i),p=h.colorscale,v=h.reversescale;if(p){if(!r){var g=p.length;c=0===o?p[v?g-1:0][1]:1===o?p[v?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",t[0]),c?f.call(l.fill,c):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(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,T(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){T(t,this,"funnel")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){k(t,this,"funnelarea")})).each((function(t){k(t,this,"pie")})).each((function(t){var r,i,o=v(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,y=o.anyLine,m=t[0],b=m.trace,_=u(b),T=_.colorscale,k=_.reversescale,A=c.hasMarkers(b)||!g?"M5,0":y?"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",A+"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(k),T,"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 L=M.select(".legendlines").selectAll("path").data(f||h?[r]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",A+(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(k),T,"stroke")}})})).each((function(t){var r,i,o=v(t),l=o.anyFill,u=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,g=!h&&!u&&!l&&c.hasText(d);function y(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(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||g||f){var b={},w={};if(h){b.mc=y("marker.color",x),b.mx=y("marker.symbol",x),b.mo=y("marker.opacity",a.mean,[.2,1]),b.mlc=y("marker.line.color",x),b.mlw=y("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=y("textposition",x),b.ts=10,b.tc=y("textfont.color",x),b.tf=y("textfont.family",x),b.tw=y("textfont.weight",x),b.ty=y("textfont.style",x),b.tv=y("textfont.variant",x),b.tC=y("textfont.textcase",x),b.tE=y("textfont.lineposition",x),b.tS=y("textfont.shadow",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(h?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?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),u=l._,c=t.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=t._fullLayout,c={},f=a.list(t,null,!0),h=u._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,v=(1+d)/2,g=(1-d)/2;for(i=0;i<f.length;i++)if(!(r=f[i]).fixedrange)if(p=r._name,"auto"===l)c[p+".autorange"]=!0;else if("reset"===l)void 0===r._rangeInitial0&&void 0===r._rangeInitial1?c[p+".autorange"]=!0:void 0===r._rangeInitial0?(c[p+".autorange"]=r._autorangeInitial,c[p+".range"]=[null,r._rangeInitial1]):void 0===r._rangeInitial1?(c[p+".range"]=[r._rangeInitial0,null],c[p+".autorange"]=r._autorangeInitial):c[p+".range"]=[r._rangeInitial0,r._rangeInitial1],void 0!==r._showSpikeInitial&&(c[p+".showspikes"]=r._showSpikeInitial,"on"!==h||r._showSpikeInitial||(h="off"));else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],m=[v*y[0]+g*y[1],v*y[1]+g*y[0]];c[p+".range[0]"]=r.l2r(m[0]),c[p+".range[1]"]=r.l2r(m[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=u._isHoriz?"y":"x",o.setAttribute("data-val",l)),c[s]=l;u._cartesianSpikesEnabled=h,n.call("_guiRelayout",t,c)}function h(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split("."),u=0;u<o.length;u++)s[o[u]+"."+l[1]]=a;var c="pan"===a?a:"zoom";s.dragmode=c,n.call("_guiRelayout",t,s)}function p(t,e){for(var r=e.currentTarget.getAttribute("data-attr"),i="resetLastSave"===r,a="resetDefault"===r,o=t._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c,f=s[u],h=f+".camera",p=f+".aspectratio",d=f+".aspectmode",v=o[f]._scene;i?(l[h+".up"]=v.viewInitial.up,l[h+".eye"]=v.viewInitial.eye,l[h+".center"]=v.viewInitial.center,c=!0):a&&(l[h+".up"]=null,l[h+".eye"]=null,l[h+".center"]=null,c=!0),c&&(l[p+".x"]=v.viewInitial.aspectratio.x,l[p+".y"]=v.viewInitial.aspectratio.y,l[p+".z"]=v.viewInitial.aspectratio.z,l[d]=v.viewInitial.aspectmode)}n.call("_guiRelayout",t,l)}function d(t,e){var r=e.currentTarget,n=r._previousVal,i=t._fullLayout,a=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=i[c],h=c+".hovermode";s[h]=f.hovermode,l[h]=!1;for(var p=0;p<3;p++){var d=o[p],v=c+"."+d+".showspikes";l[v]=!1,s[v]=f[d].showspikes}}r._previousVal=s}return l}function v(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout,s=o._subplots.geo||[],l=0;l<s.length;l++){var u=s[l],c=o[u];if("zoom"===i){var f=c.projection.scale,h="in"===a?2*f:.5*f;n.call("_guiRelayout",t,u+".projection.scale",h)}}"reset"===i&&x(t,"geo")}function g(t){var e=t._fullLayout;return!e.hovermode&&(e._has("cartesian")?e._isHoriz?"y":"x":"closest")}function y(t){var e=g(t);n.call("_guiRelayout",t,"hovermode",e)}function m(t,e){for(var r=e.currentTarget.getAttribute("data-val"),i=t._fullLayout,a=i._subplots.mapbox||[],o={},s=0;s<a.length;s++){var l=a[s],u=i[l].zoom,c="in"===r?1.05*u:u/1.05;o[l+".zoom"]=c}n.call("_guiRelayout",t,o)}function x(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];a[s+"."+f]=l[f]}n.call("_guiRelayout",t,a)}c.toImage={name:"toImage",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||"png";return u(t,"png"===e?"Download plot as a png":"Download plot")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};l.notifier(u(t,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&l.isIE()&&(l.notifier(u(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call("downloadImage",t,r).then((function(e){l.notifier(u(t,"Snapshot succeeded")+" - "+e,"long")})).catch((function(){l.notifier(u(t,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},c.sendDataToCloud={name:"sendDataToCloud",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},c.editInChartStudio={name:"editInChartStudio",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},c.pan2d={name:"pan2d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},c.select2d={name:"select2d",_cat:"select",title:function(t){return u(t,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return u(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},c.drawclosedpath={name:"drawclosedpath",title:function(t){return u(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},c.drawopenpath={name:"drawopenpath",title:function(t){return u(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},c.drawline={name:"drawline",title:function(t){return u(t,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},c.drawrect={name:"drawrect",title:function(t){return u(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},c.drawcircle={name:"drawcircle",title:function(t){return u(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},c.eraseshape={name:"eraseshape",title:function(t){return u(t,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return u(t,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return u(t,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return u(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return u(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f},c.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:h},c.pan3d={name:"pan3d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:h},c.orbitRotation={name:"orbitRotation",title:function(t){return u(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:h},c.tableRotation={name:"tableRotation",title:function(t){return u(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:h},c.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return u(t,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:p},c.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return u(t,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:p},c.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);n.call("_guiRelayout",t,r)}},c.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:v},c.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:v},c.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return u(t,"Reset")},attr:"reset",val:null,icon:o.autoscale,click:v},c.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},c.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},c.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:y},c.resetViewSankey={name:"resetSankeyGroup",title:function(t){return u(t,"Reset view")},icon:o.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e["node.groups"].push(i.node.groups.slice()),e["node.x"].push(i.node.x.slice()),e["node.y"].push(i.node.y.slice())}n.call("restyle",t,e)}},c.toggleHover={name:"toggleHover",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);r.hovermode=g(t),n.call("_guiRelayout",t,r)}},c.resetViews={name:"resetViews",title:function(t){return u(t,"Reset views")},icon:o.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),f(t,e),r.setAttribute("data-attr","resetLastSave"),p(t,e),x(t,"geo"),x(t,"mapbox")}},c.toggleSpikelines={name:"toggleSpikelines",title:function(t){return u(t,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",t,function(t){for(var e="on"===t._fullLayout._cartesianSpikesEnabled,r=a.list(t,null,!0),n={},i=0;i<r.length;i++){var o=r[i];n[o._name+".showspikes"]=!!e||o._showSpikeInitial}return n}(t))}},c.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return u(t,"Reset view")},attr:"reset",icon:o.home,click:function(t){x(t,"mapbox")}},c.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:m},c.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m}},76052:function(t,e,r){"use strict";var n=r(44248),i=Object.keys(n),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),s=[];i.forEach((function(t){!function(t){if(-1===o.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},90824:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(31780),o=r(66540);t.exports=function(t,e){var r=t.modebar||{},s=a.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,o,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var u=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(u,.3)),l("activecolor",i.addOpacity(u,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45460:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(66540),supplyLayoutDefaults:r(90824),manage:r(18816)}},18816:function(t,e,r){"use strict";var n=r(79811),i=r(43028),a=r(24040),o=r(10624).isUnifiedHover,s=r(66400),l=r(44248),u=r(76052).DRAW_MODES,c=r(3400).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,f=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var h,p=r.modeBarButtons;h=Array.isArray(p)&&p.length?function(t){for(var e=c([],t),r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if("string"==typeof a){if(void 0===l[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[r][i]=l[a]}}return e}(p):!r.displayModeBar&&r.watermark?[]:function(t){var e=t._fullLayout,r=t._fullData,s=t._context;function c(t,e){if("string"==typeof e){if(e.toLowerCase()===t.toLowerCase())return!0}else{var r=e.name,n=e._cat||e.name;if(r===t||n===t.toLowerCase())return!0}return!1}var f=e.modebar.add;"string"==typeof f&&(f=[f]);var h=e.modebar.remove;"string"==typeof h&&(h=[h]);var p=s.modeBarButtonsToAdd.concat(f.filter((function(t){for(var e=0;e<s.modeBarButtonsToRemove.length;e++)if(c(t,s.modeBarButtonsToRemove[e]))return!1;return!0}))),d=s.modeBarButtonsToRemove.concat(h.filter((function(t){for(var e=0;e<s.modeBarButtonsToAdd.length;e++)if(c(t,s.modeBarButtonsToAdd[e]))return!1;return!0}))),v=e._has("cartesian"),g=e._has("gl3d"),y=e._has("geo"),m=e._has("pie"),x=e._has("funnelarea"),b=e._has("gl2d"),_=e._has("ternary"),w=e._has("mapbox"),T=e._has("polar"),k=e._has("smith"),A=e._has("sankey"),M=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(e),S=o(e.hovermode),E=[];function L(t){if(t.length){for(var e=[],r=0;r<t.length;r++){for(var n=t[r],i=l[n],a=i.name.toLowerCase(),o=(i._cat||i.name).toLowerCase(),s=!1,u=0;u<d.length;u++){var c=d[u].toLowerCase();if(c===a||c===o){s=!0;break}}s||e.push(l[n])}E.push(e)}}var C=["toImage"];s.showEditInChartStudio?C.push("editInChartStudio"):s.showSendToCloud&&C.push("sendDataToCloud"),L(C);var O=[],P=[],I=[],D=[];(v||b||m||x||_)+y+g+w+T+k>1?(P=["toggleHover"],I=["resetViews"]):y?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:m?P=["hoverClosestPie"]:A?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],v&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],"noHover"))return!1;return!0}(r)||S)&&(P=[]),!v&&!b||M||(O=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==I[0]&&(I=["resetScale2d"])),g?D=["zoom3d","pan3d","orbitRotation","tableRotation"]:(v||b)&&!M||_?D=["zoom2d","pan2d"]:w||y?D=["pan2d"]:T&&(D=["zoom2d"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,"scatter-like")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(e=!0))}return e}(r)&&D.push("select2d","lasso2d");var z=[],R=function(t){-1===z.indexOf(t)&&-1!==P.indexOf(t)&&z.push(t)};if(Array.isArray(p)){for(var F=[],B=0;B<p.length;B++){var N=p[B];"string"==typeof N?(N=N.toLowerCase(),-1!==u.indexOf(N)?(e._has("mapbox")||e._has("cartesian"))&&D.push(N):"togglespikelines"===N?R("toggleSpikelines"):"togglehover"===N?R("toggleHover"):"hovercompare"===N?R("hoverCompareCartesian"):"hoverclosest"===N?(R("hoverClosestCartesian"),R("hoverClosestGeo"),R("hoverClosest3d"),R("hoverClosestGl2d"),R("hoverClosestPie")):"v1hovermode"===N&&(R("hoverClosestCartesian"),R("hoverCompareCartesian"),R("hoverClosestGeo"),R("hoverClosest3d"),R("hoverClosestGl2d"),R("hoverClosestPie"))):F.push(N)}p=F}return L(D),L(O.concat(I)),L(z),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(E,p)}(t),f?f.update(t,h):e._modeBar=s(t,h)}else f&&(f.destroy(),delete e._modeBar)}},66400:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(9224),s=r(25788).version,l=new DOMParser;function u(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=u.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+o.bgcolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+o.color),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+o.activecolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(e),u=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(l||u||c)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},c.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},c.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var a=t.val;if(void 0!==a&&("function"==typeof a&&(a=a(this.graphInfo)),r.setAttribute("data-val",a)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",t.path),t.transform?a.setAttribute("transform",t.transform):void 0!==t.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(a)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,o=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)o===r&&l.classed("active",!l.classed("active"));else{var u=null===o?o:a.nestedProperty(e,o).get();l.classed("active",u===i)}}))},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",a._(this.graphInfo,"Produced with Plotly.js")+" (v"+s+")"),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(".modebar")),a.deleteRelatedStyleRule(this._uid)},t.exports=function(t,e){var r=t._fullLayout,i=new u({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},26680:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=(0,r(31780).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:a,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},85984:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},22148:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(31780),o=r(51272),s=r(26680),l=r(85984);function u(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o("visible")){var l=o("step");"all"!==l&&(!a||"gregorian"===a||"month"!==l&&"year"!==l?o("stepmode"):e.stepmode="backward",o("count")),o("label")}}t.exports=function(t,e,r,c,f){var h=t.rangeselector||{},p=a.newContainer(e,"rangeselector");function d(t,e){return n.coerce(h,p,s,t,e)}if(d("visible",o(h,p,{name:"buttons",handleItemDefaults:u,calendar:f}).length>0)){var v=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,c);d("x",v[0]),d("y",v[1]),n.noneOrAll(t,e,["x","y"]),d("xanchor"),d("yanchor"),n.coerceFont(d,"font",r.font);var g=d("bgcolor");d("activecolor",i.contrast(g,l.lightAmount,l.darkAmount)),d("bordercolor"),d("borderwidth")}}},50216:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(76308),s=r(43616),l=r(3400),u=l.strTranslate,c=r(72736),f=r(79811),h=r(84284),p=h.LINE_SPACING,d=h.FROM_TL,v=h.FROM_BR,g=r(85984),y=r(48040);function m(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function b(t,e,r,n){var i,a;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,a=n._fullLayout._meta,i.label?a?l.templateString(i.label,a):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){c.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=f.list(t,"x",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),m);e.enter().append("g").classed("rangeselector",!0),e.exit().remove(),e.style({cursor:"pointer","pointer-events":"all"}),e.each((function(e){var r=n.select(this),o=e,f=o.rangeselector,h=r.selectAll("g.button").data(l.filterVisible(f.buttons));h.enter().append("g").classed("button",!0),h.exit().remove(),h.each((function(e){var r=n.select(this),a=y(o,e);e._isActive=function(t,e,r){if("all"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,f,e),r.call(b,f,e,t),r.on("click",(function(){t._dragged||i.call("_guiRelayout",t,a)})),r.on("mouseover",(function(){e._isHovered=!0,r.call(x,f,e)})),r.on("mouseout",(function(){e._isHovered=!1,r.call(x,f,e)}))})),function(t,e,r,i,o){var f=0,h=0,y=r.borderwidth;e.each((function(){var t=n.select(this).select(".selector-text"),e=r.font.size*p,i=Math.max(e*c.lineCount(t),16)+3;h=Math.max(h,i)})),e.each((function(){var t=n.select(this),e=t.select(".selector-rect"),i=t.select(".selector-text"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*p,l=c.lineCount(i),d=Math.max(a+10,g.minButtonWidth);t.attr("transform",u(y+f,y)),e.attr({x:0,y:0,width:d,height:h}),c.positionText(i,d/2,h/2-(l-1)*o/2+3),f+=d+5}));var m=t._fullLayout._size,x=m.l+m.w*r.x,b=m.t+m.h*(1-r.y),_="left";l.isRightAnchor(r)&&(x-=f,_="right"),l.isCenterAnchor(r)&&(x-=f/2,_="center");var w="top";l.isBottomAnchor(r)&&(b-=h,w="bottom"),l.isMiddleAnchor(r)&&(b-=h/2,w="middle"),f=Math.ceil(f),h=Math.ceil(h),x=Math.round(x),b=Math.round(b),a.autoMargin(t,i+"-range-selector",{x:r.x,y:r.y,l:f*d[_],r:f*v[_],b:h*v[w],t:h*d[w]}),o.attr("transform",u(x,b))}(t,h,f,o._name,r)}))}},48040:function(t,e,r){"use strict";var n=r(73220),i=r(3400).titleCase;t.exports=function(t,e){var r=t._name,a={};if("all"===e.step)a[r+".autorange"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n["utc"+i(s)],u=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(o,-u));break;case"todate":var c=l.offset(o,-u);r=t.l2r(+l.ceil(c))}return[r,a[1]]}(t,e);a[r+".range[0]"]=o[0],a[r+".range[1]"]=o[1]}return a}},41152:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(26680)}}},layoutAttributes:r(26680),handleDefaults:r(22148),draw:r(50216)}},11200:function(t,e,r){"use strict";var n=r(22548);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},26652:function(t,e,r){"use strict";var n=r(79811).list,i=r(19280).getAutoRange,a=r(74636);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},74636:function(t){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},94040:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(79811),o=r(11200),s=r(10936);t.exports=function(t,e,r){var l=t[r],u=e[r];if(l.rangeslider||e._requestRangeslider[u._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var c,f,h=l.rangeslider,p=i.newContainer(u,"rangeslider");if(_("visible")){_("bgcolor",e.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!u.isValidRange(h.range)),_("range");var d=e._subplots;if(d)for(var v=d.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===a.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(v,a.id2name),y=0;y<g.length;y++){var m=g[y];c=h[m]||{},f=i.newContainer(p,m,"yaxis");var x,b=e[m];c.range&&b.isValidRange(c.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",b.range.slice())}p._input=h}}function _(t,e){return n.coerce(h,p,o,t,e)}function w(t,e){return n.coerce(c,f,s,t,e)}}},20060:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(43616),u=r(76308),c=r(81668),f=r(57952),h=r(79811),p=r(86476),d=r(93972),v=r(74636);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function y(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,c=-n._offsetShift,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function 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,u=e.calcdata,c=t.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(t){return v.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each((function(t,o){var l=n.select(this),c=0===o,p=h.getFromId(e,t,"y"),d=p._name,v=i[d],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[d]={type:p.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[d].rangebreaks=p.rangebreaks),a.supplyDefaults(g);var y=g._fullLayout.xaxis,m=g._fullLayout[d];y.clearCalc(),y.setScale(),m.clearCalc(),m.setScale();var x={id:t,plotgroup:l,xaxis:y,yaxis:m,isRangePlot:!0};c?s=x:(x.mainplot="xy",x.mainplotinfo=s),f.rangePlot(e,x,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(u,t))}))}function b(t,e,r,n,i){o.ensureSingle(t,"rect",v.maskMinClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),o.ensureSingle(t,"rect",v.maskMaxClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),"match"!==i.rangemode&&(o.ensureSingle(t,"rect",v.maskMinOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(u.fill,v.maskOppAxisColor),o.ensureSingle(t,"rect",v.maskMaxOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",v.maskOppBorder).call(u.fill,v.maskOppAxisColor))}function _(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,"rect",v.slideBoxClassName,(function(t){t.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:v.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,"g",v.grabberMinClassName),a=o.ensureSingle(t,"g",v.grabberMaxClassName),s={x:0,width:v.handleWidth,rx:v.handleRadius,fill:u.background,stroke:u.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,"rect",v.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,"rect",v.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var c={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:e._context.staticPlot?void 0:v.grabAreaCursor};o.ensureSingle(i,"rect",v.grabAreaMinClassName,(function(t){t.attr(c)})).attr("height",n._height),o.ensureSingle(a,"rect",v.grabAreaMaxClassName,(function(t){t.attr(c)})).attr("height",n._height)}t.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,a=0;a<r.length;a++){var l=r[a][v.name];l._clipId=l._id+"-"+e._uid}var u=e._infolayer.selectAll("g."+v.containerClassName).data(r,(function(t){return t._name}));u.exit().each((function(t){var r=t[v.name];e._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(u.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),u.each((function(r){var a=n.select(this),l=r[v.name],u=e[h.id2name(r.anchor)],f=l[h.id2name(r.anchor)];if(l.range){var T,k=o.simpleMap(l.range,r.r2l),A=o.simpleMap(r.range,r.r2l);T=A[0]<A[1]?[Math.min(k[0],A[0]),Math.max(k[1],A[1])]:[Math.max(k[0],A[0]),Math.min(k[1],A[1])],l.range=l._input.range=o.simpleMap(T,r.l2r)}r.cleanRange("rangeslider.range");var M=e._size,S=r.domain;l._width=M.w*(S[1]-S[0]);var E=Math.round(M.l+M.w*S[0]),L=Math.round(M.t+M.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+l._offsetShift+v.extraPad);a.attr("transform",s(E,L)),l._rl=o.simpleMap(l.range,r.r2l);var C=l._rl[0],O=l._rl[1],P=O-C;if(l.p2d=function(t){return t/l._width*P+C},l.d2p=function(t){return(t-C)/P*l._width},r.rangebreaks){var I=r.locateBreaks(C,O);if(I.length){var D,z,R=0;for(D=0;D<I.length;D++)R+=(z=I[D]).max-z.min;var F=l._width/(O-C-R),B=[-F*C];for(D=0;D<I.length;D++)z=I[D],B.push(B[B.length-1]-F*(z.max-z.min));for(l.d2p=function(t){for(var e=B[0],r=0;r<I.length;r++){var n=I[r];if(t>=n.max)e=B[r+1];else if(t<n.min)break}return e+F*t},D=0;D<I.length;D++)(z=I[D]).pmin=l.d2p(z.min),z.pmax=l.d2p(z.max);l.p2d=function(t){for(var e=B[0],r=0;r<I.length;r++){var n=I[r];if(t>=n.pmax)e=B[r+1];else if(t<n.pmin)break}return(t-e)/F}}}if("match"!==f.rangemode){var N=u.r2l(f.range[0]),j=u.r2l(f.range[1])-N;l.d2pOppAxis=function(t){return(t-N)/j*l._height}}a.call(y,t,r,l).call(m,t,r,l).call(x,t,r,l).call(b,t,r,l,f).call(_,t,r,l).call(w,t,r,l),function(t,e,r,a){if(!e._context.staticPlot){var s=t.select("rect."+v.slideBoxClassName).node(),l=t.select("rect."+v.grabAreaMinClassName).node(),u=t.select("rect."+v.grabAreaMaxClassName).node();t.on("mousedown",c),t.on("touchstart",c)}function c(){var c=n.event,f=c.target,h=g(c),v=h-t.node().getBoundingClientRect().left,y=a.d2p(r._rl[0]),m=a.d2p(r._rl[1]),x=p.coverSlip();function b(t){var c,p,b,_=+g(t)-h;switch(f){case s:if(b="ew-resize",y+_>r._length||m+_<0)return;c=y+_,p=m+_;break;case l:if(b="col-resize",y+_>r._length)return;c=y+_,p=m;break;case u:if(b="col-resize",m+_<0)return;c=y,p=m+_;break;default:b="ew-resize",c=v,p=v+_}if(p<c){var w=p;p=c,c=w}a._pixelMin=c,a._pixelMax=p,d(n.select(x),b),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",e,r._name+".range",[s,l])}))}(0,e,r,a)}function _(){x.removeEventListener("mousemove",b),x.removeEventListener("mouseup",_),this.removeEventListener("touchmove",b),this.removeEventListener("touchend",_),o.removeElement(x)}this.addEventListener("touchmove",b),this.addEventListener("touchend",_),x.addEventListener("mousemove",b),x.addEventListener("mouseup",_)}}(a,t,r,l),function(t,e,r,n,i,a){var l=v.handleWidth/2;function u(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function f(t){return o.constrain(t,-l,n._width+l)}var h=u(n.d2p(r._rl[0])),p=u(n.d2p(r._rl[1]));if(t.select("rect."+v.slideBoxClassName).attr("x",h).attr("width",p-h),t.select("rect."+v.maskMinClassName).attr("width",h),t.select("rect."+v.maskMaxClassName).attr("x",p).attr("width",n._width-p),"match"!==a.rangemode){var d=n._height-c(n.d2pOppAxis(i._rl[1])),g=n._height-c(n.d2pOppAxis(i._rl[0]));t.select("rect."+v.maskMinOppAxisClassName).attr("x",h).attr("height",d).attr("width",p-h),t.select("rect."+v.maskMaxOppAxisClassName).attr("x",h).attr("y",g).attr("height",n._height-g).attr("width",p-h),t.select("rect."+v.slideBoxClassName).attr("y",d).attr("height",g-d)}var y=.5,m=Math.round(f(h-l))-y,x=Math.round(f(p-l))+y;t.select("g."+v.grabberMinClassName).attr("transform",s(m,y)),t.select("g."+v.grabberMaxClassName).attr("transform",s(x,y))}(a,0,r,l,u,f),"bottom"===r.side&&c.draw(t,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:L+l._height+l._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},97944:function(t,e,r){"use strict";var n=r(79811),i=r(72736),a=r(74636),o=r(84284).LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var u=o[s];u._id=s+o._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=i},e.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),u=0,c=0;return"bottom"===e.side&&(u=e._depth,e.title.text!==r._dfltTitle[l]&&(c=1.5*e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2*n._offsetShift}}},49692:function(t,e,r){"use strict";var n=r(3400),i=r(11200),a=r(10936),o=r(97944);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(11200),handleDefaults:r(94040),calcAutorange:r(26652),draw:r(20060),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},10936:function(t){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},93956:function(t,e,r){"use strict";var n=r(13916),i=r(52904).line,a=r(98192).u,o=r(92880).extendFlat,s=r(67824).overrideAll,l=r(31780).templatedArray;r(36208),t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:"dot"})}}),"arraydraw","from-root")},83280:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},74224:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(93956),s=r(65152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var l=a("path"),u="path"!==a("type",l?"path":"rect");u&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var c=["x","y"],f=0;f<2;f++){var h,p,d,v=c[f],g={_fullLayout:r},y=i.coerceRef(t,e,g,v);if((h=i.getFromId(g,y))._selectionIndices.push(e._index),d=s.rangeToShapePosition(h),p=s.shapePositionToRange(h),u){var m=v+"0",x=v+"1",b=t[m],_=t[x];t[m]=p(t[m],!0),t[x]=p(t[x],!0),i.coercePosition(e,g,a,y,m),i.coercePosition(e,g,a,y,x);var w=e[m],T=e[x];void 0!==w&&void 0!==T&&(e[m]=d(w),e[x]=d(T),t[m]=b,t[x]=_)}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){a(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n<r.length;n++){var i=r[n];i&&void 0===i.path&&(void 0!==i.x0&&void 0!==i.x1&&void 0!==i.y0&&void 0!==i.y1||(e.selections[n]=null))}}},23640:function(t,e,r){"use strict";var n=r(9856).readPaths,i=r(55496),a=r(1936).clearOutlineControllers,o=r(76308),s=r(43616),l=r(31780).arrayEditor,u=r(65152),c=u.getPathString;function f(t){var e=t._fullLayout;for(var r in a(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)p(t,i)}function h(t){return t._context.editSelection}function p(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=u.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,p=r.plotinfo;a._input&&function(r){var u=c(t,a),g={"data-index":e,"fill-rule":"evenodd",d:u},y=a.opacity,m="rgba(0,0,0,0)",x=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),b=a.line.width,_=a.line.dash;b||(b=5,_="solid");var w=h(t)&&t._fullLayout._activeSelectionIndex===e;w&&(m=t._fullLayout.activeselection.fillcolor,y=t._fullLayout.activeselection.opacity);for(var T=[],k=1;k>=0;k--){var A=r.append("path").attr(g).style("opacity",k?.1:y).call(o.stroke,x).call(o.fill,m).call(s.dashLine,k?"solid":_,k?4+b:b);if(d(A,t,a),w){var M=l(t.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},E=n(u,t);i(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var L=T[0];T[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,L)}))}(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"),u=e.gd,c=u._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,p=f.yaxis,d=e.isActiveSelection,v=e.dragmode,g=(u.layout||{}).selections||[];if(!n(v)&&void 0!==d){var y=u._fullLayout._activeSelectionIndex;if(y<g.length)switch(u._fullLayout.selections[y].type){case"rect":v="select";break;case"path":v="lasso"}}var m,x=o(a,u,f,d),b={xref:h._id,yref:p._id,opacity:c.opacity,line:{color:c.line.color,width:c.line.width,dash:c.line.dash}};1===x.length&&(m=x[0]),m&&5===m.length&&"select"===v?(b.type="rect",b.x0=m[0][1],b.y0=m[0][2],b.x1=m[2][1],b.y1=m[2][2]):(b.type="path",h&&p&&l(x,h,p),b.path=s(x),m=null),i(u);for(var _=e.editHelpers,w=(_||{}).modifyItem,T=[],k=0;k<g.length;k++){var A=u._fullLayout.selections[k];if(A){if(T[k]=A._input,void 0!==d&&k===u._fullLayout._activeSelectionIndex){var M=b;switch(A.type){case"rect":w("x0",M.x0),w("x1",M.x1),w("y0",M.y0),w("y1",M.y1);break;case"path":w("path",M.path)}}}else T[k]=A}return void 0===d?(T.push(b),T):_?_.getUpdateObj():{}}}}},5840:function(t,e,r){"use strict";var n=r(3400).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},22676:function(t,e,r){"use strict";var n=r(23640),i=r(43156);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(93956),supplyLayoutDefaults:r(74224),supplyDrawNewSelectionDefaults:r(81004),includeBasePlot:r(36632)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},43156:function(t,e,r){"use strict";var n=r(14756),i=r(61456),a=r(24040),o=r(43616).dashStyle,s=r(76308),l=r(93024),u=r(10624).makeEventData,c=r(72760),f=c.freeMode,h=c.rectMode,p=c.drawMode,d=c.openMode,v=c.selectMode,g=r(65152),y=r(85448),m=r(55496),x=r(1936).clearOutline,b=r(9856),_=b.handleEllipse,w=b.readPaths,T=r(93940).newShapes,k=r(5968),A=r(23640).activateLastSelection,M=r(3400),S=M.sorterAsc,E=r(92065),L=r(91200),C=r(79811).getFromId,O=r(73696),P=r(39172).redrawReglTraces,I=r(83280),D=I.MINSELECT,z=E.filter,R=E.tester,F=r(5840),B=F.p2r,N=F.axValue,j=F.getTransform;function U(t){return void 0!==t.subplot}function V(t,e,r,n,i,a,o){var s,l,u,c,f,h,p,v,g,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){W(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(y,s=Z(e,r,n,i));if(_.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,_):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=J(_))){for(o&&o.remove(),g=0;g<s.length;g++)(l=s[g])._module.selectPoints(l,!1);$(e,s),Y(a),x&&ht(e)}else{for(p=t.shiftKey&&(void 0!==h?h:J(_)),u=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}(_.pointNumber,_.searchInfo,p),c=G(a.selectionDefs.concat([u])),g=0;g<s.length;g++)if(f=tt(s[g]._module.selectPoints(s[g],c),s[g]),b.length)for(var w=0;w<f.length;w++)b.push(f[w]);else b=f;if($(e,s,v={points:b}),u&&a&&a.selectionDefs.push(u),o){var T=a.mergedPolygons,k=d(a.dragmode);m(et(T,k),o,a)}x&&ft(e,v)}}}function q(t){return"pointNumber"in t&&"searchInfo"in t}function H(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function G(t){if(t.length){for(var e=[],r=q(t[0])?0:t[0][0][0],n=r,i=q(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(q(t[o]))e.push(H(t[o]));else{var s=R(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function W(t,e,r){var n=e._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(t.shiftKey||t.altKey)&&!(p(a)&&d(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||Y(r),o||(x(e),n._lastSelectedSubplot=i.id)}function Y(t,e){var r=t.dragmode,n=t.plotinfo,i=t.gd;(function(t){return t._fullLayout._activeShapeIndex>=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(u=T(f,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(t)&&(c=k(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){e&&A(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function X(t){return t._id}function Z(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(X),u=r.map(X);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!U({subplot:n})||a.subplot!==n&&a.geo!==n)if("splom"===a.type){if(a._xaxes[l[0]]&&a._yaxes[u[0]]){var c=K(a._module,i,e[0],r[0]);c.scene=t._fullLayout._splomScenes[a.uid],s.push(c)}}else if("sankey"===a.type){var f=K(a._module,i,e[0],r[0]);s.push(f)}else{if(!(-1!==l.indexOf(a.xaxis)||a._xA&&a._xA.overlaying))continue;if(!(-1!==u.indexOf(a.yaxis)||a._yA&&a._yA.overlaying))continue;s.push(K(a._module,i,C(t,a.xaxis),C(t,a.yaxis)))}else s.push(K(a._module,i,e[0],r[0]));return s}function K(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}function J(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function $(t,e,r){var n,i;for(n=0;n<e.length;n++){var o=e[n].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[o.uid]||{};void 0===s.selectedpoints&&(s.selectedpoints=o._input.selectedpoints||null)}if(r){var l=r.points||[];for(n=0;n<e.length;n++)(i=e[n].cd[0].trace)._input.selectedpoints=i._fullInput.selectedpoints=[],i._fullInput!==i&&(i.selectedpoints=[]);for(var u=0;u<l.length;u++){var c=l[u],f=c.data,h=c.fullData,p=c.pointIndex,d=c.pointIndices;d?([].push.apply(f.selectedpoints,d),i._fullInput!==i&&[].push.apply(h.selectedpoints,d)):(f.selectedpoints.push(p),i._fullInput!==i&&h.selectedpoints.push(p))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,"regl")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(O(t),P(t))}(t,e)}function Q(t,e,r){for(var i=(r?n.difference:n.union)({regions:t},{regions:[e]}).regions.reverse(),a=0;a<i.length;a++){var o=i[a];o.subtract=st(o,i.slice(0,a))}return i}function tt(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=u(t[i],n,r);return t}function et(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<t[n].length;i++){r[n][i]=[],r[n][i][0]=i?"L":"M";for(var a=0;a<t[n][i].length;a++)r[n][i].push(t[n][i][a])}e||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function rt(t,e){for(var r,n,i=[],a=[],o=0;o<e.length;o++){var s=e[o];n=s._module.selectPoints(s,t),a.push(n),r=tt(n,s),i=i.concat(r)}return i}function nt(t,e,r,n,i){var a,o,s,l=!!n;i&&(a=i.plotinfo,o=i.xaxes[0]._id,s=i.yaxes[0]._id);var u=[],c=[],f=ot(t),h=t._fullLayout;if(a){var d=h._zoomlayer,g=h.dragmode,y=p(g),m=v(g);if(y||m){var x=C(t,o,"x"),b=C(t,s,"y");if(x&&b){var _=d.selectAll(".select-outline-"+a.id);if(_&&t._fullLayout._outlining&&_.length){for(var T=_[0][0].getAttribute("d"),k=w(T,t,a),A=[],M=0;M<k.length;M++){for(var S=k[M],E=[],L=0;L<S.length;L++)E.push([lt(x,S[L][1]),lt(b,S[L][2])]);E.xref=o,E.yref=s,E.subtract=st(E,A),A.push(E)}f=f.concat(A)}}}}var O=o&&s?[o+s]:h._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var P={},I=0;I<O.length;I++){var D=O[I],z=D.indexOf("y"),R=D.slice(0,z),F=D.slice(z),B=o&&s?r:void 0;if(B=at(f,R,F,B)){var N=n;if(!l){var j=C(t,R,"x"),U=C(t,F,"y");N=Z(t,[j],[U],D);for(var V=0;V<N.length;V++){var q=N[V],H=q.cd[0],G=H.trace;if("scattergl"===q._module.name&&!H.t.xpx){var W=G.x,Y=G.y,X=G._length;H.t.xpx=[],H.t.ypx=[];for(var K=0;K<X;K++)H.t.xpx[K]=j.c2p(W[K]),H.t.ypx[K]=U.c2p(Y[K])}"splom"===q._module.name&&(P[G.uid]||(P[G.uid]=!0))}}var J=rt(B,N);u=u.concat(J),c=c.concat(N)}}var Q={points:u};$(t,c,Q);var tt=h.clickmode.indexOf("event")>-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ut(et);ct([C(t,nt,"x"),C(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<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1})(o=vt.xref,s=vt.yref,c)||it(t,o,s,n),tt&&(Q.points.length?ft(t,Q):ht(t)),h._deselect=!1}return{eventData:Q,selectionTesters:r}}function it(t,e,r,n){n=Z(t,[C(t,e,"x")],[C(t,r,"y")],e+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}$(t,n)}function at(t,e,r,n){for(var i,a=0;a<t.length;a++){var o=t[a];e===o.xref&&r===o.yref&&(i?n=G(i=Q(i,o,!!o.subtract)):(i=[o],n=R(o)))}return n}function ot(t,e){for(var r=[],n=t._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!e||o===n._activeSelectionIndex){var s=i[o];if(s){var l,u,c,f,h,p=s.xref,d=s.yref,v=C(t,p,"x"),m=C(t,d,"y");if("rect"===s.type){h=[];var x=lt(v,s.x0),b=lt(v,s.x1),_=lt(m,s.y0),w=lt(m,s.y1);h=[[x,_],[x,w],[b,w],[b,_]],l=Math.min(x,b),u=Math.max(x,b),c=Math.min(_,w),f=Math.max(_,w),h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=p,h.yref=d,h.subtract=!1,h.isRect=!0,r.push(h)}else if("path"===s.type)for(var T=s.path.split("Z"),k=[],A=0;A<T.length;A++){var M=T[A];if(M){M+="Z";var S=g.extractPathCoords(M,y.paramIsX,"raw"),E=g.extractPathCoords(M,y.paramIsY,"raw");l=1/0,u=-1/0,c=1/0,f=-1/0,h=[];for(var L=0;L<S.length;L++){var O=lt(v,S[L]),P=lt(m,E[L]);h.push([O,P]),l=Math.min(O,l),u=Math.max(O,u),c=Math.min(P,c),f=Math.max(P,f)}h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=p,h.yref=d,h.subtract=st(h,k),k.push(h),r.push(h)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return"date"===t.type&&(e=e.replace("_"," ")),"log"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ut(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ct(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+"min"],c=r[l+"max"];void 0!==u&&void 0!==c&&(n[s]=[B(o,u),B(o,c)].sort(S))}else i||(i={}),i[s]=r.map(N(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ft(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function ht(t){t.emit("plotly_deselect",null)}t.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var u=!U(n),c=f(i),g=h(i),y=d(i),x=p(i),b=v(i),w="drawcircle"===i,T="drawline"===i||w,k=n.gd,A=k._fullLayout,S=b&&"immediate"===A.newselection.mode&&u,E=A._zoomlayer,C=n.element.getBoundingClientRect(),O=n.plotinfo,P=j(O),F=e-C.left,B=r-C.top;A._calcInverseTransform(k);var N=M.apply3DTransform(A._invTransform)(F,B);F=N[0],B=N[1];var q,H,X,K,J,tt,at,ot=A._invScaleX,st=A._invScaleY,lt=F,pt=B,dt="M"+F+","+B,vt=n.xaxes[0],gt=n.yaxes[0],yt=vt._length,mt=gt._length,xt=t.altKey&&!(p(i)&&y);W(t,k,n),c&&(q=z([[F,B]],I.BENDPX));var bt=E.selectAll("path.select-outline-"+O.id).data([1]),_t=x?A.newshape:A.newselection;x&&(n.hasText=_t.label.text||_t.label.texttemplate);var wt=x&&!y?_t.fillcolor:"rgba(0,0,0,0)",Tt=_t.line.color||(u?s.contrast(k._fullLayout.plot_bgcolor):"#7f7f7f");bt.enter().append("path").attr("class","select-outline select-outline-"+O.id).style({opacity:x?_t.opacity/2:1,"stroke-dasharray":o(_t.line.dash,_t.line.width),"stroke-width":_t.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Tt).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",P).attr("d",dt+"Z");var kt=E.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",P).attr("d","M0,0Z");if(x&&n.hasText){var At=E.select(".label-temp");At.empty()&&(At=E.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Mt=A._uid+I.SELECTID,St=[],Et=Z(k,n.xaxes,n.yaxes,n.subplot);S&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(u){var t=vt._id,e=gt._id;it(k,t,e,Et);for(var r=(k.layout||{}).selections||[],n=[],i=!1,o=0;o<r.length;o++){var s=A.selections[o];s.xref!==t||s.yref!==e?n.push(r[o]):i=!0}i&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:n}))}});var Lt=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(yt,ot*t+F)),pt=Math.max(0,Math.min(mt,st*e+B));var r=Math.abs(lt-F),i=Math.abs(pt-B);if(g){var a,o,s;if(b){var l=A.selectdirection;switch(a="any"===l?i<Math.min(.6*r,D)?"h":r<Math.min(.6*i,D)?"v":"d":l){case"h":o=w?mt/2:0,s=mt;break;case"v":o=w?yt/2:0,s=yt}}if(x)switch(A.newshape.drawdirection){case"vertical":a="h",o=w?mt/2:0,s=mt;break;case"horizontal":a="v",o=w?yt/2:0,s=yt;break;case"ortho":r<i?(a="h",o=B,s=pt):(a="v",o=F,s=lt);break;default:a="d"}"h"===a?((K=T?_(w,[lt,o],[lt,s]):[[F,o],[F,s],[lt,s],[lt,o]]).xmin=T?lt:Math.min(F,lt),K.xmax=T?lt:Math.max(F,lt),K.ymin=Math.min(o,s),K.ymax=Math.max(o,s),kt.attr("d","M"+K.xmin+","+(B-D)+"h-4v"+2*D+"h4ZM"+(K.xmax-1)+","+(B-D)+"h4v"+2*D+"h-4Z")):"v"===a?((K=T?_(w,[o,pt],[s,pt]):[[o,B],[o,pt],[s,pt],[s,B]]).xmin=Math.min(o,s),K.xmax=Math.max(o,s),K.ymin=T?pt:Math.min(B,pt),K.ymax=T?pt:Math.max(B,pt),kt.attr("d","M"+(F-D)+","+K.ymin+"v-4h"+2*D+"v4ZM"+(F-D)+","+(K.ymax-1)+"v4h"+2*D+"v-4Z")):"d"===a&&((K=T?_(w,[F,B],[lt,pt]):[[F,B],[F,pt],[lt,pt],[lt,B]]).xmin=Math.min(F,lt),K.xmax=Math.max(F,lt),K.ymin=Math.min(B,pt),K.ymax=Math.max(B,pt),kt.attr("d","M0,0Z"))}else c&&(q.addPt([lt,pt]),K=q.filtered);if(n.selectionDefs&&n.selectionDefs.length?(X=Q(n.mergedPolygons,K,xt),K.subtract=xt,H=G(n.selectionDefs.concat([K]))):(X=[K],H=R(K)),m(et(X,y),bt,n),b){var u,f=nt(k,!1),h=f.eventData?f.eventData.points.slice():[];f=nt(k,!1,H,Et,n),H=f.selectionTesters,at=f.eventData,u=q?q.filtered:ut(X),L.throttle(Mt,I.SELECTDELAY,(function(){for(var t=(St=rt(H,Et)).slice(),e=0;e<h.length;e++){for(var r=h[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Lt(at,u),function(t,e){t.emit("plotly_selecting",e)}(k,at)}))}},n.clickFn=function(t,e){if(kt.remove(),k._fullLayout._activeShapeIndex>=0)k._fullLayout._deactivateShape(k);else if(!x){var r=A.clickmode;L.done(Mt).then((function(){if(L.clear(Mt),2===t){for(bt.remove(),J=0;J<Et.length;J++)(tt=Et[J])._module.selectPoints(tt,!1);if($(k,Et),Y(n),ht(k),Et.length){var i=Et[0].xaxis,o=Et[0].yaxis;if(i&&o){for(var s=[],u=k._fullLayout.selections,c=0;c<u.length;c++){var f=u[c];f&&(f.xref===i._id&&f.yref===o._id||s.push(f))}s.length<u.length&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:s}))}}}else r.indexOf("select")>-1&&V(e,k,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(k,void 0);l.click(k,e,O.id)})).catch(M.error)}},n.doneFn=function(){kt.remove(),L.done(Mt).then((function(){L.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(k,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,u=(r(36208),r(45464)),c=r(21776).ye,f=r(97728);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},u.legend,{editType:"calc+arraydraw"}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},u.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:c({},{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 u(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return u(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function u(t,e,r,i,s,l){var u=t/2,c=l;if("pixel"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+u:u,v=h>0?h+u:u;return{ppad:u,ppadplus:c?d:v,ppadminus:c?v:d}}return{ppad:u}}function c(t,e,r){var n,i,s="x"===t._id.charAt(0)?"x":"y",l="category"===t.type||"multicategory"===t.type,u=0,c=0,f=l?t.r2c:t.d2c;if("scaled"===e[s+"sizemode"]?(n=e[s+"0"],i=e[s+"1"],l&&(u=e[s+"0shift"],c=e[s+"1shift"])):(n=e[s+"anchor"],i=e[s+"anchor"]),void 0!==n)return[f(n)+u,f(i)+c];if(e.path){var h,p,d,v,g=1/0,y=-1/0,m=e.path.match(a.segmentRE);for("date"===t.type&&(f=o.decodeDate(f)),h=0;h<m.length;h++)void 0!==(p=r[m[h].charAt(0)].drawn)&&(!(d=m[h].substr(1).match(a.paramRE))||d.length<p||((v=f(d[p]))<g&&(g=v),v>y&&(y=v)));return y>=g?[g,y]: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<r.length;o++){var u,f,h=r[o];h._extremes={};var p=i.getRefType(h.xref),d=i.getRefType(h.yref);"paper"!==h.xref&&"domain"!==p&&(f=c(u=i.getFromId(t,h.xref),h,a.paramIsX))&&(h._extremes[u._id]=i.findExtremes(u,f,s(h))),"paper"!==h.yref&&"domain"!==d&&(f=c(u=i.getFromId(t,h.yref),h,a.paramIsY))&&(h._extremes[u._id]=i.findExtremes(u,f,l(h)))}}},85448:function(t){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(46056),s=r(65152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(e._isShape=!0,a("visible")){a("showlegend")&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),n.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),u=a("type",l?"path":"rect"),c="path"!==u;c&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),h=a("ysizemode"),p=["x","y"],d=0;d<2;d++){var v,g,y,m=p[d],x=m+"anchor",b="x"===m?f:h,_={_fullLayout:r},w=i.coerceRef(t,e,_,m,void 0,"paper");if("range"===i.getRefType(w)?((v=i.getFromId(_,w))._shapeIndices.push(e._index),y=s.rangeToShapePosition(v),g=s.shapePositionToRange(v),"category"!==v.type&&"multicategory"!==v.type||(a(m+"0shift"),a(m+"1shift"))):g=y=n.identity,c){var T=m+"0",k=m+"1",A=t[T],M=t[k];t[T]=g(t[T],!0),t[k]=g(t[k],!0),"pixel"===b?(a(T,0),a(k,10)):(i.coercePosition(e,_,a,w,T,.25),i.coercePosition(e,_,a,w,k,.75)),e[T]=y(e[T]),e[k]=y(e[k]),t[T]=A,t[k]=M}if("pixel"===b){var S=t[x];t[x]=g(t[x],!0),i.coercePosition(e,_,a,w,x,.25),e[x]=y(e[x]),t[x]=S}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var E,L,C="line"===u;if(c&&(E=a("label.texttemplate")),E||(L=a("label.text")),L||E){a("label.textangle");var O=a("label.textposition",C?"middle":"middle center");a("label.xanchor"),a("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(C,O)),a("label.padding"),n.coerceFont(a,"label.font",r.font)}}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},60728:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(72736),o=r(43616),s=r(9856).readPaths,l=r(65152),u=l.getPathString,c=r(97728),f=r(84284).FROM_TL;t.exports=function(t,e,r,h){if(h.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var p;if(r.label.texttemplate){var d={};if("path"!==r.type){var v=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var y in c){var m=c[y](r,v,g);void 0!==m&&(d[y]=m)}}p=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,d)}else p=r.label.text;var x,b,_,w,T={"data-index":e},k=r.label.font,A=h.append("g").attr(T).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(p);if(r.path){var M=u(t,r),S=s(M,t);x=1/0,_=1/0,b=-1/0,w=-1/0;for(var E=0;E<S.length;E++)for(var L=0;L<S[E].length;L++)for(var C=S[E][L],O=1;O<C.length;O+=2){var P=C[O],I=C[O+1];x=Math.min(x,P),b=Math.max(b,P),_=Math.min(_,I),w=Math.max(w,I)}}else{var D=i.getFromId(t,r.xref),z=r.x0shift,R=r.x1shift,F=i.getRefType(r.xref),B=i.getFromId(t,r.yref),N=r.y0shift,j=r.y1shift,U=i.getRefType(r.yref),V=function(e,r){return l.getDataToPixel(t,D,r,!1,F)(e)},q=function(e,r){return l.getDataToPixel(t,B,r,!0,U)(e)};x=V(r.x0,z),b=V(r.x1,R),_=q(r.y0,N),w=q(r.y1,j)}var H=r.label.textangle;"auto"===H&&(H="line"===r.type?function(t,e,r,n){var i,a;return a=Math.abs(r-t),i=r>=t?e-n:n-e,-180/Math.PI*Math.atan2(i,a)}(x,_,b,w):0),A.call((function(e){return e.call(o.font,k).attr({}),a.convertToTspans(e,t),e}));var G=function(t,e,r,n,i,a,o){var s,l,u,c,h=i.label.textposition,p=i.label.textangle,d=i.label.padding,v=i.type,g=Math.PI/180*a,y=Math.sin(g),m=Math.cos(g),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":r<t?"right":"center":r>t?"right":r<t?"left":"center":"end"===h?"auto"===p?r>t?"right":r<t?"left":"center":r>t?"left":r<t?"right":"center":"center");var _={bottom:-1,middle:0,top:1};if("auto"===p){var w=_[b];u=-d*y*w,c=d*m*w}else u=d*{left:1,center:0,right:-1}[x],c=d*_[b];s+=u,l+=c}else u=d+3,-1!==h.indexOf("right")?(s=Math.max(t,r)-u,"auto"===x&&(x="right")):-1!==h.indexOf("left")?(s=Math.min(t,r)+u,"auto"===x&&(x="left")):(s=(t+r)/2,"auto"===x&&(x="center")),l=-1!==h.indexOf("top")?Math.min(e,n):-1!==h.indexOf("bottom")?Math.max(e,n):(e+n)/2,c=d,"bottom"===b?l-=c:"top"===b&&(l+=c);var T=f[b],k=i.label.font.size,A=o.height;return{textx:s+(A*T-k)*y,texty:l+-(A*T-k)*m,xanchor:x}}(x,_,b,w,r,H,o.bBox(A.node())),W=G.textx,Y=G.texty,X=G.xanchor;A.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[X],y:Y,x:W,transform:"rotate("+H+","+W+","+Y+")"}).call(a.positionText,W,Y)}}},55496:function(t,e,r){"use strict";var n=r(3400).strTranslate,i=r(86476),a=r(72760),o=a.drawMode,s=a.selectMode,l=r(24040),u=r(76308),c=r(7e3),f=c.i000,h=c.i090,p=c.i180,d=c.i270,v=r(1936).clearOutlineControllers,g=r(9856),y=g.pointsOnRectangle,m=g.pointsOnEllipse,x=g.writePaths,b=r(93940).newShapes,_=r(93940).createShapeObj,w=r(5968),T=r(60728);function k(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,c){c||(c=0);var g=a.gd;function A(){t(e,r,a,c++),(m(e[0])||a.hasText)&&M({redrawing:!0})}function M(t){var e={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,e=b(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,e=w(r,a),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,E,L,C,O,P=g._fullLayout._zoomlayer,I=a.dragmode,D=o(I),z=s(I);if((D||z)&&(g._fullLayout._outlining=!0),v(g),r.attr("d",x(e)),c||!a.isActiveShape&&!a.isActiveSelection||(O=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){S=[];for(var r=0;r<e.length;r++){var o=e[r],s=y(o),l=!s&&m(o);S[r]=[];for(var c=o.length,v=0;v<c;v++)if("Z"!==o[v][0]&&(!l||v===f||v===h||v===p||v===d)){var x,b=s&&a.isActiveSelection;b&&(x=k(o,v));var _=o[v][1],w=o[v][2],T=t.append(b?"rect":"circle").attr("data-i",r).attr("data-j",v).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(b){var A=x[1]-_,M=x[2]-w,E=M?5:Math.max(Math.min(25,Math.abs(A)-5),5),L=A?5:Math.max(Math.min(25,Math.abs(M)-5),5);T.classed(M?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",E).attr("height",L).attr("x",_-E/2).attr("y",w-L/2).attr("transform",n(A/2,M/2))}else T.classed("cursor-grab",!0).attr("r",5).attr("cx",_).attr("cy",w);S[r][v]={element:T.node(),gd:g,prepFn:B,doneFn:j,clickFn:U},i.init(S[r][v])}}}(P.append("g").attr("class","outline-controllers")),function(){if(E=[],e.length){E[0]={element:r[0][0],gd:g,prepFn:q,doneFn:H,clickFn:G},i.init(E[0])}}()),D&&a.hasText){var R=P.select(".label-temp"),F=_(r,a,a.dragmode);T(g,"label-temp",F,R)}function B(t){L=+t.srcElement.getAttribute("data-i"),C=+t.srcElement.getAttribute("data-j"),S[L][C].moveFn=N}function N(t,r){if(e.length){var n=O[L][C][1],i=O[L][C][2],o=e[L],s=o.length;if(y(o)){var l=t,u=r;a.isActiveSelection&&(k(o,C)[1]===o[C][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==C){var f=o[c];f[1]===o[C][1]&&(f[1]=n+l),f[2]===o[C][2]&&(f[2]=i+u)}if(o[C][1]=n+l,o[C][2]=i+u,!y(o))for(var h=0;h<s;h++)for(var p=0;p<o[h].length;p++)o[h][p]=O[L][h][p]}else o[C][1]=n+t,o[C][2]=i+r;A()}}function j(){M()}function U(t,r){if(2===t){L=+r.srcElement.getAttribute("data-i"),C=+r.srcElement.getAttribute("data-j");var n=e[L];y(n)||m(n)||function(){if(e.length&&e[L]&&e[L].length){for(var t=[],r=0;r<e[L].length;r++)r!==C&&t.push(e[L][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===C&&(t[0][0]="M"),e[L]=t,A(),M())}}()}}function V(t,r){!function(t,r){if(e.length)for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)for(var a=0;a+2<e[n][i].length;a+=2)e[n][i][a+1]=O[n][i][a+1]+t,e[n][i][a+2]=O[n][i][a+2]+r}(t,r),A()}function q(t){(L=+t.srcElement.getAttribute("data-i"))||(L=0),E[L].moveFn=V}function H(){M()}function G(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){v(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call("_guiRelayout",t,{selections:n})}}}(g)}}},4016:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(54460),s=r(9856).readPaths,l=r(55496),u=r(60728),c=r(1936).clearOutlineControllers,f=r(76308),h=r(43616),p=r(31780).arrayEditor,d=r(86476),v=r(93972),g=r(85448),y=r(65152),m=y.getPathString;function x(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)!0===e.shapes[i].visible&&w(t,i)}function b(t){return!!t._fullLayout._outlining}function _(t){return!t._context.edits.shapePosition}function w(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=y.makeShapesOptionsAndPlotinfo(t,e),c=r.options,w=r.plotinfo;function M(r){var M=m(t,c),S={"data-index":e,"fill-rule":c.fillrule,d:M},E=c.opacity,L=c.fillcolor,C=c.line.width?c.line.color:"rgba(0,0,0,0)",O=c.line.width,P=c.line.dash;O||!0!==c.editable||(O=5,P="solid");var I="Z"!==M[M.length-1],D=_(t)&&c.editable&&t._fullLayout._activeShapeIndex===e;D&&(L=I?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,E=t._fullLayout.activeshape.opacity);var z,R=r.append("g").classed("shape-group",!0).attr({"data-index":e}),F=R.append("path").attr(S).style("opacity",E).call(f.stroke,C).call(f.fill,L).call(h.dashLine,P,O);if(T(R,t,c),u(t,e,c,R),(D||t._context.edits.shapePosition)&&(z=p(t.layout,"shapes",c)),D){F.style({cursor:"move"});var B={element:F.node(),plotinfo:w,gd:t,editHelpers:z,hasText:c.label.text||c.label.texttemplate,isActiveShape:!0},N=s(M,t);l(N,F,B)}else t._context.edits.shapePosition?function(t,e,r,s,l,c){var f,p,x,_,w,A,M,S,E,L,C,O,P,I,D,z,R=10,F=10,B="pixel"===r.xsizemode,N="pixel"===r.ysizemode,j="line"===r.type,U="path"===r.type,V=c.modifyItem,q=n.select(e.node().parentNode),H=o.getFromId(t,r.xref),G=o.getRefType(r.xref),W=o.getFromId(t,r.yref),Y=o.getRefType(r.yref),X=r.x0shift,Z=r.x1shift,K=r.y0shift,J=r.y1shift,$=function(e,r){return y.getDataToPixel(t,H,r,!1,G)(e)},Q=function(e,r){return y.getDataToPixel(t,W,r,!0,Y)(e)},tt=y.getPixelToData(t,H,!1,G),et=y.getPixelToData(t,W,!0,Y),rt=j?function(){var t=10,n=Math.max(r.line.width,t),i=l.append("g").attr("data-index",s).attr("drag-helper",!0);i.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var a={"fill-opacity":"0"},o=Math.max(n/2,t);return i.append("circle").attr({"data-line-point":"start-point",cx:B?$(r.xanchor)+r.x0:$(r.x0,X),cy:N?Q(r.yanchor)-r.y0:Q(r.y0,K),r:o}).style(a).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:B?$(r.xanchor)+r.x1:$(r.x1,Z),cy:N?Q(r.yanchor)-r.y1:Q(r.y1,J),r:o}).style(a).classed("cursor-grab",!0),i}():e,nt={element:rt.node(),gd:t,prepFn:function(n){b(t)||(B&&(w=$(r.xanchor)),N&&(A=Q(r.yanchor)),"path"===r.type?D=r.path:(f=B?r.x0:$(r.x0),p=N?r.y0:Q(r.y0),x=B?r.x1:$(r.x1),_=N?r.y1:Q(r.y1)),f<x?(E=f,P="x0",L=x,I="x1"):(E=x,P="x1",L=f,I="x0"),!N&&p<_||N&&p>_?(M=p,C="y0",S=_,O="y1"):(M=_,C="y1",S=p,O="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"===z?at:ot,nt.altKey=n.altKey)},doneFn:function(){b(t)||(v(e),lt(l),T(e,t,r),i.call("_guiRelayout",t,c.getUpdateObj()))},clickFn:function(){b(t)||lt(l)}};function it(r){if(b(t))z=null;else if(j)z="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),z=l.split("-")[0]}}function at(n,i){if("path"===r.type){var a=function(t){return t},o=a,c=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt($(t)+n)},H&&"date"===H.type&&(o=y.encodeDate(o))),N?V("yanchor",r.yanchor=et(A+i)):(c=function(t){return et(Q(t)+i)},W&&"date"===W.type&&(c=y.encodeDate(c))),V("path",r.path=k(D,o,c))}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(A+i)):(V("y0",r.y0=et(p+i)),V("y1",r.y1=et(_+i)));e.attr("d",m(t,r)),st(l,r),u(t,s,r,q)}function ot(n,i){if(U){var a=function(t){return t},o=a,c=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt($(t)+n)},H&&"date"===H.type&&(o=y.encodeDate(o))),N?V("yanchor",r.yanchor=et(A+i)):(c=function(t){return et(Q(t)+i)},W&&"date"===W.type&&(c=y.encodeDate(c))),V("path",r.path=k(D,o,c))}else if(j){if("resize-over-start-point"===z){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"===z){var v=x+n,g=N?_-i:_+i;V("x1",r.x1=B?v:tt(v)),V("y1",r.y1=N?g:et(g))}}else{var b=function(t){return-1!==z.indexOf(t)},T=b("n"),G=b("s"),Y=b("w"),X=b("e"),Z=T?M+i:M,K=G?S+i:S,J=Y?E+n:E,rt=X?L+n:L;N&&(T&&(Z=M-i),G&&(K=S-i)),(!N&&K-Z>F||N&&Z-K>F)&&(V(C,r[C]=N?Z:et(Z)),V(O,r[O]=N?K:et(K))),rt-J>R&&(V(P,r[P]=B?J:tt(J)),V(I,r[I]=B?rt:tt(rt)))}e.attr("d",m(t,r)),st(l,r),u(t,s,r,q)}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]:y.extractPathCoords(e.path,g.paramIsX))),o=Q(N?e.yanchor:a.midRange(r?[e.y0,e.y1]:y.extractPathCoords(e.path,g.paramIsY)));if(i=y.roundPositionForSharpStrokeRendering(i,1),o=y.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 u="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function lt(t){t.selectAll(".visual-cue").remove()}d.init(nt),rt.node().onmousemove=it}(t,F,c,e,r,z):!0===c.editable&&F.style("pointer-events",I||f.opacity(L)*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 A(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=A,x(t)}}}(t,F)}))}c._input&&!0===c.visible&&("above"===c.layer?M(t._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?M(t._fullLayout._shapeLowerLayer):"between"===c.layer?M(w.shapelayerBetween):w._hadPlotinfo?M((w.mainplotinfo||w).shapelayer):M(t._fullLayout._shapeLowerLayer))}function T(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 k(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function A(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(c(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(_(t)){c(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var n=[],a=0;a<r.length;a++)a!==e&&n.push(r[a]);return delete t._fullLayout._activeShapeIndex,i.call("_guiRelayout",t,{shapes:n})}}},drawLabel:u}},92872:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(45464),a=r(25376),o=r(98192).u,s=r(92880).extendFlat,l=r(21776).ye,u=r(97728);t.exports=n({newshape:{visible:s({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},i.legend,{}),legendgroup:s({},i.legendgroup,{}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({})},legendrank:s({},i.legendrank,{}),legendwidth:s({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:s({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),font:a({}),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"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(t){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},65144:function(t,e,r){"use strict";var n=r(76308),i=r(3400);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}var o="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var u=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(o,u)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},9856:function(t,e,r){"use strict";var n=r(21984),i=r(7e3),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(5840),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function p(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n<e;n++)for(var i=t[n].length,a=0;a<i;a++){var o=t[n][a][0];if("Z"===o)r+="Z";else for(var s=t[n][a].length,l=0;l<s;l++){var u=l;"Q"===o||"S"===o?u=f[l]:"C"===o&&(u=c[l]),r+=t[n][a][u],l>0&&l<s-1&&(r+=",")}}return r},e.readPaths=function(t,e,r,i){var o,s,c,f=n(t),h=[],p=-1,d=0,v=0,g=function(){s=d,c=v};g();for(var y=0;y<f.length;y++){var m,x,b,_,w=[],T=f[y][0],k=T;switch(T){case"M":h[++p]=[],d=+f[y][1],v=+f[y][2],w.push([k,d,v]),g();break;case"Q":case"S":m=+f[y][1],b=+f[y][2],d=+f[y][3],v=+f[y][4],w.push([k,d,v,m,b]);break;case"C":m=+f[y][1],b=+f[y][2],x=+f[y][3],_=+f[y][4],d=+f[y][5],v=+f[y][6],w.push([k,d,v,m,b,x,_]);break;case"T":case"L":d=+f[y][1],v=+f[y][2],w.push([k,d,v]);break;case"H":k="L",d=+f[y][1],w.push([k,d,v]);break;case"V":k="L",v=+f[y][1],w.push([k,d,v]);break;case"A":k="L";var A=+f[y][1],M=+f[y][2];+f[y][4]||(A=-A,M=-M);var S=d-A,E=v;for(o=1;o<=a/2;o++){var L=2*Math.PI*o/a;w.push([k,S+A*Math.cos(L),E+M*Math.sin(L)])}break;case"Z":d===s&&v===c||(d=s,v=c,w.push([k,d,v]))}for(var C=(r||{}).domain,O=e._fullLayout._size,P=r&&"pixel"===r.xsizemode,I=r&&"pixel"===r.ysizemode,D=!1===i,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var R=w[z][o+1],F=w[z][o+2];void 0!==R&&void 0!==F&&(d=R,v=F,r&&(r.xaxis&&r.xaxis.p2r?(D&&(R-=r.xaxis._offset),R=P?u(r.xaxis,r.xanchor)+R:l(r.xaxis,R)):(D&&(R-=O.l),C?R=C.x[0]+R/O.w:R/=O.w),r.yaxis&&r.yaxis.p2r?(D&&(F-=r.yaxis._offset),F=I?u(r.yaxis,r.yanchor)-F:l(r.yaxis,F)):(D&&(F-=O.t),F=C?C.y[1]-F/O.h:1-F/O.h)),w[z][o+1]=R,w[z][o+2]=F)}h[p].push(w[z].slice())}}return h},e.pointsOnRectangle=function(t){if(5!==t.length)return!1;for(var e=1;e<3;e++){if(!h(t[0][e]-t[1][e],t[3][e]-t[2][e]))return!1;if(!h(t[0][e]-t[3][e],t[1][e]-t[2][e]))return!1}return!(!h(t[0][1],t[1][1])&&!h(t[0][1],t[3][1])||!(p(t[0],t[1])*p(t[0],t[3])))},e.pointsOnEllipse=function(t){var e=t.length;if(e!==a+1)return!1;e=a;for(var r=0;r<e;r++){var n=(2*e-r)%e,i=(e/2+n)%e,o=(e/2+r)%e;if(!h(p(t[r],t[o]),p(t[n],t[i])))return!1}return!0},e.handleEllipse=function(t,r,n){if(!t)return[r,n];var i=e.ellipseOver({x0:r[0],y0:r[1],x1:n[0],y1:n[1]}),s=(i.x1+i.x0)/2,l=(i.y1+i.y0)/2,u=(i.x1-i.x0)/2,c=(i.y1-i.y0)/2;u||(u=c/=o),c||(c=u/=o);for(var f=[],h=0;h<a;h++){var p=2*h*Math.PI/a;f.push([s+u*Math.cos(p),l+c*Math.sin(p)])}return f},e.ellipseOver=function(t){var e=t.x0,r=t.y0,n=t.x1,i=t.y1,a=n-e,s=i-r,l=((e-=a)+n)/2,u=((r-=s)+i)/2;return{x0:l-(a*=o),y0:u-(s*=o),x1:l+a,y1:u+s}},e.fixDatesForPaths=function(t,e,r){var n="date"===e.type,i="date"===r.type;if(!n&&!i)return t;for(var a=0;a<t.length;a++)for(var o=0;o<t[a].length;o++)for(var s=0;s+2<t[a][o].length;s+=2)n&&(t[a][o][s+1]=t[a][o][s+1].replace(" ","_")),i&&(t[a][o][s+2]=t[a][o][s+2].replace(" ","_"));return t}},93940:function(t,e,r){"use strict";var n=r(72760),i=n.drawMode,a=n.openMode,o=r(7e3),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,h=o.sin45,p=r(5840),d=p.p2r,v=p.r2p,g=r(1936).clearOutline,y=r(9856),m=y.readPaths,x=y.writePaths,b=y.ellipseOver,_=y.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],o=e.gd,p=i.getAttribute("d"),g=o._fullLayout.newshape,y=e.plotinfo,w=e.isActiveShape,T=y.xaxis,k=y.yaxis,A=!!y.domain||!y.xaxis,M=!!y.domain||!y.yaxis,S=a(r),E=m(p,o,y,w),L={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:A?"paper":T._id,yref:M?"paper":k._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(L.fillcolor=g.fillcolor,L.fillrule=g.fillrule),1===E.length&&(n=E[0]),n&&5===n.length&&"drawrect"===r)L.type="rect",L.x0=n[0][1],L.y0=n[0][2],L.x1=n[2][1],L.y1=n[2][2];else if(n&&"drawline"===r)L.type="line",L.x0=n[0][1],L.y0=n[0][2],L.x1=n[1][1],L.y1=n[1][2];else if(n&&"drawcircle"===r){L.type="circle";var C=n[s][1],O=n[l][1],P=n[u][1],I=n[c][1],D=n[s][2],z=n[l][2],R=n[u][2],F=n[c][2],B=y.xaxis&&("date"===y.xaxis.type||"log"===y.xaxis.type),N=y.yaxis&&("date"===y.yaxis.type||"log"===y.yaxis.type);B&&(C=v(y.xaxis,C),O=v(y.xaxis,O),P=v(y.xaxis,P),I=v(y.xaxis,I)),N&&(D=v(y.yaxis,D),z=v(y.yaxis,z),R=v(y.yaxis,R),F=v(y.yaxis,F));var j=(O+I)/2,U=(D+R)/2,V=b({x0:j,y0:U,x1:j+(I-O+P-C)/2*f,y1:U+(F-z+R-D)/2*h});B&&(V.x0=d(y.xaxis,V.x0),V.x1=d(y.xaxis,V.x1)),N&&(V.y0=d(y.yaxis,V.y0),V.y1=d(y.yaxis,V.y1)),L.x0=V.x0,L.y0=V.y0,L.x1=V.x1,L.y1=V.y1}else L.type="path",T&&k&&_(E,T,k),L.path=x(E),n=null;return L}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,a=e.dragmode,o=(r.layout||{}).shapes||[];if(!i(a)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s<o.length)switch(r._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";a="Z"===l[l.length-1]?"drawclosedpath":"drawopenpath"}}var u=w(t,e,a);g(r);for(var c=e.editHelpers,f=(c||{}).modifyItem,h=[],p=0;p<o.length;p++){var d=r._fullLayout.shapes[p];if(h[p]=d._input,void 0!==n&&p===r._fullLayout._activeShapeIndex){var v=u;switch(d.type){case"line":case"rect":case"circle":f("x0",v.x0-(d.x0shift||0)),f("x1",v.x1-(d.x1shift||0)),f("y0",v.y0-(d.y0shift||0)),f("y1",v.y1-(d.y1shift||0));break;case"path":f("path",v.path)}}}return void 0===n?(h.push(u),h):c?c.getUpdateObj():{}}},createShapeObj:w}},1936:function(t){"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},65152:function(t,e,r){"use strict";var n=r(85448),i=r(3400),a=r(54460);function o(t,e){var r=0;return(e=e||0)&&t&&("category"===t.type||"multicategory"===t.type)&&(r=(t.r2p(1)-t.r2p(0))*e),r}e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var a=[];return t.match(n.segmentRE).forEach((function(t){var o=e[t.charAt(0)].drawn;if(void 0!==o){var s=t.substr(1).match(n.paramRE);if(s&&!(s.length<o)){var l=s[o],u=r?l:i.cleanNumber(l);a.push(u)}}})),a},e.getDataToPixel=function(t,r,n,i,a){var s,l=t._fullLayout._size;if(r)if("domain"===a)s=function(t){return r._length*(i?1-t:t)+r._offset};else{var u=e.shapePositionToRange(r);s=function(t){var e=o(r,n);return r._offset+r.r2p(u(t,!0))+e},"date"===r.type&&(s=e.decodeDate(s))}else s=i?function(t){return l.t+l.h*(1-t)}:function(t){return l.l+l.w*t};return s},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(t){var e=(t-r._offset)/r._length;return n?1-e:e};else{var s=e.rangeToShapePosition(r);a=function(t){return s(r.p2r(t-r._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.shapes[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.selections[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(t,r){var s,l,u,c,f,h,p,d,v=r.type,g=a.getRefType(r.xref),y=a.getRefType(r.yref),m=a.getFromId(t,r.xref),x=a.getFromId(t,r.yref),b=t._fullLayout._size,_=o(m,r.x0shift),w=o(m,r.x1shift),T=o(x,r.y0shift),k=o(x,r.y1shift);if(m?"domain"===g?l=function(t){return m._offset+m._length*t}:(s=e.shapePositionToRange(m),l=function(t){return m._offset+m.r2p(s(t,!0))}):l=function(t){return b.l+b.w*t},x?"domain"===y?c=function(t){return x._offset+x._length*(1-t)}:(u=e.shapePositionToRange(x),c=function(t){return x._offset+x.r2p(u(t,!0))}):c=function(t){return b.t+b.h*(1-t)},"path"===v)return m&&"date"===m.type&&(l=e.decodeDate(l)),x&&"date"===x.type&&(c=e.decodeDate(c)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,u=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,c=t.charAt(0),f=n.paramIsX[c],h=n.paramIsY[c],p=n.numParams[c],d=t.substr(1).replace(n.paramRE,(function(t){return f[a]?t="pixel"===o?e(l)+Number(t):e(t):h[a]&&(t="pixel"===s?r(u)-Number(t):r(t)),++a>p&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+d}))}(r,l,c);if("pixel"===r.xsizemode){var A=l(r.xanchor);f=A+r.x0+_,h=A+r.x1+w}else f=l(r.x0)+_,h=l(r.x1)+w;if("pixel"===r.ysizemode){var M=c(r.yanchor);p=M-r.y0+T,d=M-r.y1+k}else p=c(r.y0)+T,d=c(r.y1)+k;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,L=Math.abs(S-f),C=Math.abs(E-p),O="A"+L+","+C,P=S+L+","+E;return"M"+P+O+" 0 1,1 "+S+","+(E-C)+O+" 0 0,1 "+P+"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,u=r(60876),c=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},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:u}),l=0,c=0;c<s.length;c++)s[c].visible&&l++;if(l<2?e.visible=!1:o("visible")){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o("active")]||{}).visible||(e.active=f[0]._index),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",e.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if("skip"===t.method||Array.isArray(t.args)?r("visible"):e.visible=!1){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},79664:function(t,e,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=s.strTranslate,u=r(72736),c=r(31780).arrayEditor,f=r(60876),h=r(84284),p=h.LINE_SPACING,d=h.FROM_TL,v=h.FROM_BR;function g(t){return f.autoMarginIdRoot+t._index}function y(t){return t._index}function m(t,e){var r=o.tester.selectAll("g."+f.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(f.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var c=e._dims={};c.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;c.lx=h.l+h.w*e.x,c.ly=h.t+h.h*(1-e.y),"fraction"===e.lenmode?c.outerLength=Math.round(h.w*e.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var p=(c.inputAreaLength-2*f.stepInset)/(e._stepCount-1),y=a+f.labelPadding;if(c.labelStride=Math.max(1,Math.ceil(y/p)),c.labelHeight=l,c.currentValueMaxWidth=0,c.currentValueHeight=0,c.currentValueTotalHeight=0,c.currentValueMaxLines=1,e.currentvalue.visible){var m=o.tester.append("g");r.each((function(t){var r=x(m,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=u.lineCount(r);c.currentValueMaxWidth=Math.max(c.currentValueMaxWidth,Math.ceil(n.width)),c.currentValueHeight=Math.max(c.currentValueHeight,Math.ceil(n.height)),c.currentValueMaxLines=Math.max(c.currentValueMaxLines,i)})),c.currentValueTotalHeight=c.currentValueHeight+e.currentvalue.offset,m.remove()}c.height=c.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+c.labelHeight+e.pad.t+e.pad.b;var b="left";s.isRightAnchor(e)&&(c.lx-=c.outerLength,b="right"),s.isCenterAnchor(e)&&(c.lx-=c.outerLength/2,b="center");var w="top";s.isBottomAnchor(e)&&(c.ly-=c.height,w="bottom"),s.isMiddleAnchor(e)&&(c.ly-=c.height/2,w="middle"),c.outerLength=Math.ceil(c.outerLength),c.height=Math.ceil(c.height),c.lx=Math.round(c.lx),c.ly=Math.round(c.ly);var T={y:e.y,b:c.height*v[w],t:c.height*d[w]};"fraction"===e.lenmode?(T.l=0,T.xl=e.x-e.len*d[b],T.r=0,T.xr=e.x+e.len*v[b]):(T.x=e.x,T.l=c.outerLength*d[b],T.r=c.outerLength*v[b]),i.autoMargin(t,g(e),T)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case"right":n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i="left";break;case"center":n=.5*a.inputAreaLength,i="middle";break;default:n=f.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",f.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),c=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)c+=r;else{var h=e.steps[e.active].label,d=e._gd._fullLayout._meta;d&&(h=s.templateString(h,d)),c+=h}e.currentvalue.suffix&&(c+=e.currentvalue.suffix),l.call(o.font,e.currentvalue.font).text(c).call(u.convertToTspans,e._gd);var v=u.lineCount(l),g=(a.currentValueMaxLines+1-v)*e.currentvalue.font.size*p;return u.positionText(l,n,g),l}}function b(t,e,r){s.ensureSingle(t,"rect",f.gripRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")})).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(t,e,r){var n=s.ensureSingle(t,"text",f.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,a=r._gd._fullLayout._meta;return a&&(i=s.templateString(i,a)),n.call(o.font,r.font).text(i).call(u.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",f.labelsClass),i=e._dims,a=r.selectAll("g."+f.labelGroupClass).data(i.labelSteps);a.enter().append("g").classed(f.labelGroupClass,!0),a.exit().remove(),a.each((function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,E(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*p+f.labelOffset+i.currentValueTotalHeight)}))}function T(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&k(t,e,r,o,!0,i)}function k(t,e,r,n,a,o){var s=r.active;r.active=n,c(t.layout,f.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function A(t,e,r){if(!e._context.staticPlot){var i=r.node(),o=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var u=L(t,n.mouse(i)[0]);function c(){var t=s(),a=L(t,n.mouse(i)[0]);T(e,r,t,a,!1)}function h(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}T(e,r,t,u,!0),t._dragging=!0,o.on("mousemove",c),o.on("touchmove",c),o.on("mouseup",h),o.on("touchend",h)}}function M(t,e){var r=t.selectAll("rect."+f.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,E(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+f.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=E(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(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 C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(A,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 O(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;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(r,t),s=r._infolayer.selectAll("g."+f.containerClassName).data(a.length>0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(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 u=s.selectAll("g."+f.groupClassName).data(a,y);u.enter().append("g").classed(f.groupClassName,!0),u.exit().each(l).remove();for(var c=0;c<a.length;c++){var h=a[c];m(t,h)}u.each((function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,(function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||k(t,r,n,e.index,!1,!0))})),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(x,r).call(O,r).call(w,r).call(M,r).call(C,t,r).call(b,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)}))}}},97544:function(t,e,r){"use strict";var n=r(60876);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(89861),supplyLayoutDefaults:r(8132),draw:r(79664)}},81668: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,u=r(43616),c=r(76308),f=r(72736),h=r(13448),p=r(84284).OPPOSITE_SIDE,d=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var v,g=t._fullLayout,y=r.propContainer,m=r.propName,x=r.placeholder,b=r.traceIndex,_=r.avoid||{},w=r.attributes,T=r.transform,k=r.containerGroup,A=1,M=y.title,S=(M&&M.text?M.text:"").trim(),E=!1,L=M&&M.font?M.font:{},C=L.family,O=L.size,P=L.color,I=L.weight,D=L.style,z=L.variant,R=L.textcase,F=L.lineposition,B=L.shadow,N=!!r.subtitlePropName,j=r.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=U.text.trim(),q=!1,H=1,G=U.font,W=G.family,Y=G.size,X=G.color,Z=G.weight,K=G.style,J=G.variant,$=G.textcase,Q=G.lineposition,tt=G.shadow;"title.text"===m?v="titleText":-1!==m.indexOf("axis")?v="axisTitleText":m.indexOf(!0)&&(v="colorbarTitleText");var et=t._context.edits[v];function rt(t,e){return void 0!==t&&void 0!==e&&t.replace(d," % ")===e.replace(d," % ")}""===S?A=0:rt(S,x)&&(et||(S=""),A=.2,E=!0),N&&(""===V?H=0:rt(V,j)&&(et||(V=""),H=.2,q=!0)),r._meta?S=s.templateString(S,r._meta):g._meta&&(S=s.templateString(S,g._meta));var nt,it=S||V||et;k||(k=s.ensureSingle(g._infolayer,"g","g-"+e),nt=g._hColorbarMoveTitle);var at=k.selectAll("text."+e).data(it?[0]:[]);at.enter().append("text"),at.text(S).attr("class",e),at.exit().remove();var ot=null,st=e+"-subtitle",lt=V||et;if(N&&lt&&((ot=k.selectAll("text."+st).data(lt?[0]:[])).enter().append("text"),ot.text(V).attr("class",st),ot.exit().remove()),!it)return k;function ut(t,e){s.syncOrAsync([ct,ft],{title:t,subtitle:e})}function ct(r){var i,o=r.title,h=r.subtitle;if(!T&&nt&&(T={}),T?(i="",T.rotate&&(i+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||nt)&&(i+=l(0,(T.offset||0)-(nt||0)))):i=null,o.attr("transform",i),o.style("opacity",A*c.opacity(P)).call(u.font,{color:c.rgb(P),size:n.round(O,2),family:C,weight:I,style:D,variant:z,textcase:R,shadow:B,lineposition:F}).attr(w).call(f.convertToTspans,t,(function(t){if(t){var e=n.select(t.node().parentNode).select("."+st);if(!e.empty()){var r=t.node().getBBox();if(r.height){var i=r.y+r.height+1.6*Y;e.attr("y",i)}}}})),h){var p=k.select("."+e+"-math-group"),d=o.node().getBBox(),v=p.node()?p.node().getBBox():void 0,g=v?v.y+v.height+1.6*Y:d.y+d.height+1.6*Y,y=s.extendFlat({},w,{y:g});h.attr("transform",i),h.style("opacity",H*c.opacity(X)).call(u.font,{color:c.rgb(X),size:n.round(Y,2),family:W,weight:Z,style:K,variant:J,textcase:$,shadow:tt,lineposition:Q}).attr(y).call(f.convertToTspans,t)}return a.previousPromises(t)}function ft(e){var r=e.title,a=n.select(r.node().parentNode);if(_&&_.selection&&_.side&&S){a.attr("transform",null);var o=p[_.side],c="left"===_.side||"top"===_.side?-1:1,f=i(_.pad)?_.pad:2,h=u.bBox(a.node()),d={t:0,b:0,l:0,r:0},v=t._fullLayout._reservedMargin;for(var m in v)for(var x in v[m]){var b=v[m][x];d[x]=Math.max(d[x],b)}var w={left:d.l,top:d.t,right:g.width-d.r,bottom:g.height-d.b},T=_.maxShift||c*(w[_.side]-h[_.side]),k=0;if(T<0)k=T;else{var A=_.offsetLeft||0,M=_.offsetTop||0;h.left-=A,h.right-=A,h.top-=M,h.bottom-=M,_.selection.each((function(){var t=u.bBox(this);s.bBoxIntersect(h,t,f)&&(k=Math.max(k,c*(t[_.side]-h[o])+f))})),k=Math.min(T,k),y._titleScoot=Math.abs(k)}if(k>0||T<0){var E={left:[-k,0],right:[k,0],top:[0,-k],bottom:[0,k]}[_.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(ut,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(ut)})).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),q=!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(ut)})).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",q),k},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,u=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});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:u,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},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:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}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),u=r(31780).arrayEditor,c=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,u(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?y(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||y(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(m,i,c,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)),y(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),h=c.enter().append("g").classed(u,!0),p=c.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,g=0,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+f.gapButtonHeader:d=y.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-y.openWidth);var b={x:y.lx+d+o.pad.l,y:y.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(m,o,s,t).call(M,o,b),u.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}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(T,o),c.call(_,o)}))})),c.call(_,o),x?(k.w=Math.max(y.openWidth,y.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(y.openHeight,y.headerHeight)),k.direction=o.direction,a&&(c.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c="up"===u||"down"===u,h=i._dims,p=i.active;if(c)for(s=0,l=0;l<p;l++)s+=h.heights[l]+f.gapButton;else for(o=0,l=0;l<p;l++)o+=h.widths[l]+f.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,a,o,k):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,e||t.disable()}))}(a))}function m(t,e,r,n){t.call(x,e).call(b,e,r,n)}function x(t,e){s.ensureSingle(t,"rect",f.itemRectClassName,(function(t){t.attr({rx:f.rx,ry:f.ry,"shape-rendering":"crispEdges"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function b(t,e,r,n){var i=s.ensureSingle(t,"text",f.itemTextClassName,(function(t){t.attr({"text-anchor":"start","data-notex":1})})),a=r.label,u=n._fullLayout._meta;u&&(a=s.templateString(a,u)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function _(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select("rect."+f.itemRectClassName).call(a.fill,f.activeColor)}))}function w(t){t.select("rect."+f.itemRectClassName).call(a.fill,f.hoverColor)}function T(t,e){t.select("rect."+f.itemRectClassName).call(a.fill,e.bgcolor)}function k(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll("g."+f.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append("g").classed(f.dropdownButtonClassName,!0);var u=-1!==["up","down"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(m,e,i,t);var h=s.select("."+f.itemTextClassName),p=h.node()&&o.bBox(h.node()).width,d=Math.max(p+f.textPadX,f.minWidth),v=e.font.size*c,g=l.lineCount(h),y=Math.max(v*g,f.minHeight)+f.textOffsetY;y=Math.ceil(y),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=y,r.height1=Math.max(r.height1,y),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=y+f.gapButton,r.openHeight+=y+f.gapButton):(r.totalWidth+=d+f.gapButton,r.openWidth+=d+f.gapButton,r.totalHeight=Math.max(r.totalHeight,y),r.openHeight=r.totalHeight)})),u?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,"dropdown"===e.type&&(u?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),a.remove();var h=r.totalWidth+e.pad.l+e.pad.r,p=r.totalHeight+e.pad.t+e.pad.b,d=t._fullLayout._size;r.lx=d.l+d.w*e.x,r.ly=d.t+d.h*(1-e.y);var v="left";s.isRightAnchor(e)&&(r.lx-=h,v="right"),s.isCenterAnchor(e)&&(r.lx-=h/2,v="center");var g="top";s.isBottomAnchor(e)&&(r.ly-=p,g="bottom"),s.isMiddleAnchor(e)&&(r.ly-=p/2,g="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,A(e),{x:e.x,y:e.y,l:h*({right:1,center:.5}[v]||0),r:h*({left:1,center:.5}[v]||0),b:p*({top:1,middle:.5}[g]||0),t:p*({bottom:1,middle:.5}[g]||0)})}function A(t){return f.autoMarginIdRoot+t._index}function M(t,e,r,n){n=n||{};var i=t.select("."+f.itemRectClassName),a=t.select("."+f.itemTextClassName),s=e.borderwidth,u=r.index,h=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==["up","down"].indexOf(e.direction),d=n.height||(p?h.heights[u]:h.height1);i.attr({x:0,y:0,width:n.width||(p?h.width1:h.widths[u]),height:d});var v=e.font.size*c,g=(l.lineCount(a)-1)*v/2;l.positionText(a,f.textOffsetX,d/2-g+f.textOffsetY),p?r.y+=h.heights[u]+r.yPad:r.x+=h.widths[u]+r.xPad,r.index++}function S(t,e){t.attr(f.menuIndexAttrName,e||"-1").selectAll("g."+f.dropdownButtonClassName).remove()}t.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[f.name]);function a(e){i.autoMargin(t,A(e))}var o=e._menulayer.selectAll("g."+f.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,p);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),c=0;c<r.length;c++){var m=r[c];k(t,m)}var x="updatemenus"+e._uid,b=new h(t,u,x);l.enter().size()&&(u.node().parentNode.appendChild(u.node()),u.call(S)),l.exit().each((function(t){u.call(S),a(t)})).remove(),l.each((function(e){var r=n.select(this),a="dropdown"===e.type?u:null;i.manageCommandObserver(t,e,e.buttons,(function(n){v(t,e,e.buttons[n.index],r,a,b,n.index,!0)})),"dropdown"===e.type?(g(t,r,u,b,e),d(u,e)&&y(t,r,u,b,e)):y(t,r,null,null,e)}))}}},76908:function(t,e,r){"use strict";var n=r(73712);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(88444),supplyLayoutDefaults:r(91384),draw:r(14420)}},37400:function(t,e,r){"use strict";t.exports=s;var n=r(33428),i=r(76308),a=r(43616),o=r(3400);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,u=o.height;this.position=t;var c,f,h,p,d=this.position.l,v=this.position.w,g=this.position.t,y=this.position.h,m=this.position.direction,x="down"===m,b="left"===m,_="up"===m,w=v,T=y;x||b||"right"===m||_||(this.position.direction="down",x=!0),x||_?(f=(c=d)+w,x?(h=g,T=(p=Math.min(h+T,u))-h):T=(p=g+T)-(h=Math.max(p-T,0))):(p=(h=g)+T,b?w=(f=d+w)-(c=Math.max(f-w,0)):(c=d,w=(f=Math.min(c+w,l))-c)),this._box={l:c,t:h,w:w,h:T};var k=v>w,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=g+y;E+M>u&&(E=u-M);var L=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,O=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,I=d+v,D=g;I+O>l&&(I=l-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),C?(this.vbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:D,width:O,height:P}),this._vbarYMin=D+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=c-.5,B=C?f+O+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||C?(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:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||C){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 q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),C&&this.vbar.on(".drag",null).call(q)}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<o.length;s++){var l=o[s];"_"!==l.charAt(0)&&(e[l]=a[l]),i({moduleType:"apiMethod",name:l,fn:a[l]})}i(r(65875)),i([r(79180),r(56864),r(22676),r(41592),r(7402),r(76908),r(97544),r(49692),r(41152),r(12704),r(64968),r(8932),r(55080),r(2780),r(93024),r(45460)]),i([r(6580),r(11680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(9224);var u=r(93024),c=r(7316);e.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},e.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},e.Snapshot=r(78904),e.PlotSchema=r(73060)},9224:function(t){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},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 u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,p,d,v=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}v?(c=0,f=o,h=s):r<n?(c=r,h=n):(c=n,h=r),t<e?(p=t,d=e):(p=e,d=t);var y,m=Math.abs(h-c)<=o?0:1;function x(t,e,r){return"A"+[t,t]+" "+[0,m,r]+" "+g(t,e)}return v?y=null===p?"M"+g(d,c)+x(d,f,0)+x(d,h,0)+"Z":"M"+g(p,c)+x(p,f,0)+x(p,h,0)+"ZM"+g(d,c)+x(d,f,1)+x(d,h,1)+"Z":null===p?(y="M"+g(d,c)+x(d,h,0),u&&(y+="L0,0Z")):y="M"+g(p,c)+"L"+g(d,c)+x(d,h,0)+"L"+g(p,h)+x(p,c,1)+"Z",y}t.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:u,angleDist:function(t,e){return Math.abs(u(t,e))},isFullCircle:l,isAngleInsideSector:c,isPtInsideSector:function(t,e,r,n){return!!c(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},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 u(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=u,e.isArray1D=function(t){return!u(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};var c={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(u(t)){if(u(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}c.uint8c=c.u1c,c.uint8=c.u1,c.int8=c.i1,c.uint16=c.u2,c.int16=c.i2,c.uint32=c.u4,c.int32=c.i4,c.float32=c.f4,c.float64=c.f8,e.isArrayBuffer=f,e.decodeTypedArraySpec=function(t){var e=[],r=function(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}(t),i=r.dtype,a=c[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var o=a.BYTES_PER_ELEMENT,s=r.bdata;f(s)||(s=n(s));var l=void 0===r.shape?[s.byteLength/o]:(""+r.shape).split(",");l.reverse();var u,h,p=l.length,d=+l[0],v=o*d,g=0;if(1===p)e=new a(s);else if(2===p)for(u=+l[1],h=0;h<u;h++)e[h]=new a(s,g,d),g+=v;else{if(3!==p)throw new Error("ndim: "+p+'is not supported with the shape:"'+r.shape+'"');u=+l[1];for(var y=+l[2],m=0;m<y;m++)for(e[m]=[],h=0;h<u;h++)e[m][h]=new a(s,g,d),g+=v}return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e},e.isTypedArraySpec=function(t){return i(t)&&t.hasOwnProperty("dtype")&&"string"==typeof t.dtype&&t.hasOwnProperty("bdata")&&("string"==typeof t.bdata||f(t.bdata))&&(void 0===t.shape||t.hasOwnProperty("shape")&&("string"==typeof t.shape||"number"==typeof t.shape))},e.concat=function(){var t,e,r,n,i,o,s,l,u=[],c=!0,f=0;for(r=0;r<arguments.length;r++)(o=(n=arguments[r]).length)&&(e?u.push(n):(e=n,i=o),a(n)?t=!1:(c=!1,f?t!==n.constructor&&(t=!1):t=n.constructor),f+=o);if(!f)return[];if(!u.length)return e;if(c)return e.concat.apply(e,u);if(t){for((s=new t(f)).set(e),r=0;r<u.length;r++)n=u[r],s.set(n,i),i+=n.length;return s}for(s=new Array(f),l=0;l<e.length;l++)s[l]=e[l];for(r=0;r<u.length;r++){for(n=u[r],l=0;l<n.length;l++)s[i+l]=n[l];i+=l}return s},e.maxRowLength=function(t){return h(t,Math.max,0)},e.minRowLength=function(t){return h(t,Math.min,1/0)}},54037:function(t,e,r){"use strict";var n=r(38248),i=r(39032).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},73696:function(t){"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},75352:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},63064:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(92880).extendFlat,o=r(45464),s=r(88304),l=r(76308),u=r(13448).DESELECTDIM,c=r(22296),f=r(53756).counter,h=r(20435).modHalf,p=r(38116).isArrayOrTypedArray,d=r(38116).isTypedArraySpec,v=r(38116).decodeTypedArraySpec;function g(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&p(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,r),a!==i}e.valObjectMeta={data_array:{coerceFunction:function(t,e,r){e.set(p(t)?t:d(t)?v(t):r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){d(t)&&(t=v(t)),!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){-1===(i.extras||[]).indexOf(t)?(d(t)&&(t=v(t)),t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.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<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join("+")):e.set(r)}else e.set(r);else e.set(t)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(d(t)?v(t):t)}},info_array:{coerceFunction:function(t,r,n,i){function a(t,r,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=r.dflt),e.valObjectMeta[r.valType].coerceFunction(t,a,n,r),i}if(d(t)&&(t=v(t)),p(t)){var o,s,l,u,c,f,h=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(t)&&p(t[0]),g=i.items,y=[],m=Array.isArray(g),x=m&&h&&p(g[0]),b=h&&m&&!x,_=m&&!b?g.length:t.length;if(n=Array.isArray(n)?n:[],h)for(o=0;o<_;o++)for(y[o]=[],l=p(t[o])?t[o]:[],c=b?g.length:m?g[o].length:l.length,s=0;s<c;s++)u=b?g[s]:m?g[o][s]:g,void 0!==(f=a(l[s],u,(n[o]||[])[s]))&&(y[o][s]=f);else for(o=0;o<_;o++)void 0!==(f=a(t[o],m?g[o]:g,n[o]))&&(y[o]=f);r.set(y)}else r.set(n)},validateFunction:function(t,e){if(!p(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!p(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!g(t[a][o],n?r[a][o]:r))return!1}else if(!g(t[a],n?r[a]:r))return!1;return!0}}},e.coerce=function(t,r,n,i,a){var o=c(n,i).get(),s=c(t,i),l=c(r,i),u=s.get(),f=r._template;if(void 0===u&&f&&(u=c(f,i).get(),f=0),void 0===a&&(a=o.dflt),o.arrayOk){if(p(u))return l.set(u),u;if(d(u))return u=v(u),l.set(u),u}var h=e.valObjectMeta[o.valType].coerceFunction;h(u,l,a,o);var y=l.get();return f&&y===a&&!g(u,o)&&(h(u=c(f,i).get(),l,a,o),y=l.get()),y},e.coerce2=function(t,r,n,i,a){var o=c(t,i),s=e.coerce(t,r,n,i,a);return null!=o.get()&&s},e.coerceFont=function(t,e,r,n){n||(n={}),r=a({},r);var i={family:t(e+".family",(r=a(r,n.overrideDflt||{})).family),size:t(e+".size",r.size),color:t(e+".color",r.color),weight:t(e+".weight",r.weight),style:t(e+".style",r.style)};if(n.noFontVariant||(i.variant=t(e+".variant",r.variant)),n.noFontLineposition||(i.lineposition=t(e+".lineposition",r.lineposition)),n.noFontTextcase||(i.textcase=t(e+".textcase",r.textcase)),!n.noFontShadow){var o=r.shadow;"none"===o&&n.autoShadowDflt&&(o="auto"),i.shadow=t(e+".shadow",o)}return i},e.coercePattern=function(t,e,r,n){if(t(e+".shape")){t(e+".solidity"),t(e+".size");var i="overlay"===t(e+".fillmode");if(!n){var a=t(e+".bgcolor",i?r:void 0);t(e+".fgcolor",i?l.contrast(a):r)}t(e+".fgopacity",i?.5:1)}},e.coerceHoverinfo=function(t,r,n){var i,a=r._module.attributes,s=a.hoverinfo?a:o,l=s.hoverinfo;if(1===n._dataLength){var u="all"===l.dflt?l.flags.slice():l.dflt.split("+");u.splice(u.indexOf("name"),1),i=u.join("+")}return e.coerce(t,r,s,"hoverinfo",i)},e.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;void 0!==i&&(p(i)||t.selected||t.unselected||(r=i,n=u*i),e("selected.marker.opacity",r),e("unselected.marker.opacity",n))}},e.validate=g},67555:function(t,e,r){"use strict";var n,i,a=r(94336).Yn,o=r(38248),s=r(24248),l=r(20435).mod,u=r(39032),c=u.BADNUM,f=u.ONEDAY,h=u.ONEHOUR,p=u.ONEMIN,d=u.ONESEC,v=u.EPOCHJD,g=r(24040),y=r(94336).E9,m=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return _(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=f*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return _(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:c}if("string"!=typeof t&&"number"!=typeof t)return c;t=String(t);var u=_(r),y=t.charAt(0);!u||"G"!==y&&"g"!==y||(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),T=t.match(w?x:m);if(!T)return c;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(u){if(2===k.length)return c;var C;k=Number(k);try{var O=g.getComponentMethod("calendars","getCal")(r);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),C=O.newDate(k,O.toMonthIndex(k,A,P),M)}else C=O.newDate(k,Number(A),M)}catch(t){return c}return C?(C.toJD()-v)*f+S*h+E*p+L*d:c}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(k),I.getUTCMonth()!==A||I.getUTCDate()!==M?c:I.getTime()+L*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)!==c};var T=90*f,k=3*h,A=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 c;e||(e=0);var a,o,s,u,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=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=y("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<T?Math.floor(E/h):0,s=e<T?Math.floor(E%h/p):0,u=e<k?Math.floor(E%p/d):0,m=e<A?E%d*10+b:0}else x=new Date(w),a=y("%Y-%m-%d")(x),o=e<T?x.getUTCHours():0,s=e<T?x.getUTCMinutes():0,u=e<k?x.getUTCSeconds():0,m=e<A?10*x.getUTCMilliseconds()+b:0;return M(a,o,s,u,m)},e.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===c)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,L={1:"1",2:"1",3:"2",4:"2"};function C(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 L[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var O=[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),O[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return C(e,t,n,i)};var P=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=g.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 u=new Date(t+P);return u.setUTCMonth(u.getUTCMonth()+e)+n-P},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,u=_(e)&&g.getComponentMethod("calendars","getCal")(e),c=0;c<t.length;c++)if(n=t[c],o(n)){if(!(n%f))if(u)try{1===(r=u.fromJD(n/f+v)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var h=t.length-l;return{exactYears:i/h,exactMonths:a/h,exactDays:s/h}}},52200:function(t,e,r){"use strict";var n=r(33428),i=r(24248),a=r(52248),o=r(36524);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+"{"+r+"}",0):o.addRule?o.addRule(e,r,0):i.warn("addStyleRule failed")}function u(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function c(t){for(var e=[];f(t);)e.push(t),t=t.parentNode,"function"==typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host);return e}function f(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=c(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=u(t);if(e){var n=a.convertCssMatrix(e);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:u,getElementAndAncestors:c,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},95924:function(t,e,r){"use strict";var n=r(61252).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};t.exports=i},92880:function(t,e,r){"use strict";var n=r(63620),i=Array.isArray;function a(t,e,r,o){var s,l,u,c,f,h,p,d=t[0],v=t.length;if(2===v&&i(d)&&i(t[1])&&0===d.length){if(p=function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&"object"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],d),p)return d;d.splice(0,d.length)}for(var g=1;g<v;g++)for(l in s=t[g])u=d[l],c=s[l],o&&i(c)?d[l]=c:e&&c&&(n(c)||(f=i(c)))?(f?(f=!1,h=u&&i(u)?u:[]):h=u&&n(u)?u:{},d[l]=a([h,c],e,r,o)):(void 0!==c||r)&&(d[l]=c);return d}e.extendFlat=function(){return a(arguments,!1,!1,!1)},e.extendDeep=function(){return a(arguments,!0,!1,!1)},e.extendDeepAll=function(){return a(arguments,!0,!0,!1)},e.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},68944:function(t){"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},43880:function(t){"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),a=[],o=0;o<t.length;o++){var s=t[o];i(s)&&a.push(s)}return a}},27144:function(t,e,r){"use strict";var n=r(33428),i=r(36116),a=r(40440),o=r(77844),s=r(42428),l=r(35536),u=r(24248),c=r(63620),f=r(22296),h=r(92065),p=Object.keys(i),d={"ISO-3":l,"USA-states":l,"country names":function(t){for(var e=0;e<p.length;e++){var r=p[e];if(new RegExp(i[r]).test(t.trim().toLowerCase()))return r}return u.log("Unrecognized country name: "+t+"."),!1}};function v(t){var e=t.geojson,r=window.PlotlyGeoAssets||{},n="string"==typeof e?r[e]:e;return c(n)?n:(u.error("Oops ... something went wrong when fetching "+e),!1)}t.exports={locationToFeature:function(t,e,r){if(!e||"string"!=typeof e)return!1;var n,i,a,o=d[t](e);if(o){if("USA-states"===t)for(n=[],a=0;a<r.length;a++)(i=r[a]).properties&&i.properties.gu&&"USA"===i.properties.gu&&n.push(i);else n=r;for(a=0;a<n.length;a++)if((i=n[a]).id===o)return i;u.log(["Location with id",o,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(t){var e,r,n,i,a=t.geometry,o=a.coordinates,s=t.id,l=[];function u(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];l.push(h.tester(e))}:"ATA"===s?function(t){var e=u(t);if(null===e)return l.push(h.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;r<o.length;r++)for(n=0;n<o[r].length;n++)e(o[r][n]);break;case"Polygon":for(r=0;r<o.length;r++)e(o[r])}return l},getTraceGeojson:v,extractTraceFeature:function(t){var e=t[0].trace,r=v(e);if(!r)return!1;var n,i={},s=[];for(n=0;n<e._length;n++){var l=t[n];(l.loc||0===l.loc)&&(i[l.loc]=l)}function c(t){var r=f(t,e.featureidkey||"id").get(),n=i[r];if(n){var l=t.geometry;if("Polygon"===l.type||"MultiPolygon"===l.type){var c={type:"Feature",id:r,geometry:l,properties:{}};c.properties.ct=function(t){var e,r=t.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,i=0,s=0;s<n.length;s++){var l={type:"Polygon",coordinates:n[s]},u=a.default(l);u>i&&(i=u,e=l)}else e=r;return o.default(e).geometry.coordinates}(c),n.fIn=t,n.fOut=c,s.push(c)}else u.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(n=0;n<h.length;n++)c(h[n]);break;case"Feature":c(r);break;default:return u.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var p in i)u.log(["Location *"+p+"*","does not have a matching feature with id-key","*"+e.featureidkey+"*."].join(" "));return s},fetchTraceGeoData:function(t){var e=window.PlotlyGeoAssets||{},r=[];function i(t){return new Promise((function(r,i){n.json(t,(function(n,a){if(n){delete e[t];var o=404===n.status?'GeoJSON at URL "'+t+'" does not exist.':"Unexpected error while fetching from "+t;return i(new Error(o))}return e[t]=a,r(a)}))}))}function a(t){return new Promise((function(r,n){var i=0,a=setInterval((function(){return e[t]&&"pending"!==e[t]?(clearInterval(a),r(e[t])):i>100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o<t.length;o++){var s=t[o][0].trace.geojson;"string"==typeof s&&(e[s]?"pending"===e[s]&&r.push(a(s)):(e[s]="pending",r.push(i(s))))}return r},computeBbox:function(t){return s.default(t)}}},44808:function(t,e,r){"use strict";var n=r(39032).BADNUM;e.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},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;r<t.length;r++)e[r]=[t[r]];return{type:"MultiPolygon",coordinates:e}},e.makeBlank=function(){return{type:"Point",coordinates:[]}}},92348:function(t,e,r){"use strict";var n,i,a,o=r(20435).mod;function s(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,f=n-e,h=a-e,p=s-a,d=l*p-c*f;if(0===d)return null;var v=(u*p-c*h)/d,g=(u*f-l*h)/d;return g<0||g>1||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,u){if(s(t,e,r,n,i,a,o,u))return 0;var c=r-t,f=n-e,h=o-i,p=u-a,d=c*c+f*f,v=h*h+p*p,g=Math.min(l(c,f,d,i-t,a-e),l(c,f,d,o-t,u-e),l(h,p,v,t-i,e-a),l(h,p,v,r-i,n-a));return Math.sqrt(g)},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)),u=t.getPointAtLength(o(r+s/2,e)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=h,h},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,u=0,c=t.getTotalLength(),f=c;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.x<a?a-r.x:r.x>o?r.x-o:0,f=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var p=h(u);p;){if((u+=p+r)>f)return;p=h(u)}for(p=h(f);p;){if(u>(f-=p+r))return;p=h(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f<u;){if(i=(h+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;c*o>0?p=i:h=i,f++}return a}},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,u=a(s);function c(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return u;var e=a(t);return e.length?e:u}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,p,d,v,g=l(n),y=l(e),m=o.extractOpts(t),x=[];if(i=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):f,s=g?function(t,e){return void 0===t[e]?u:a(i(t[e]))}:f,p=y?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||y)for(var b=0;b<r;b++)d=s(n,b),v=p(e,b),x[b]=c(d,v);else x=c(a(n),e);return x},parseColorScale:function(t){var e=o.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=o.flipScale(e.colorscale)),r.map((function(t){var e=t[0],r=i(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,r.a]}}))}}},71688:function(t,e,r){"use strict";var n=r(35536);function i(t){return[t]}t.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},35536:function(t){"use strict";t.exports=function(t){return t}},1396:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},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,u=-l,c=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 g=r(67555);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(14952);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.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 T=r(92880);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(24248);f.log=k.log,f.warn=k.warn,f.error=k.error;var A=r(53756);f.counterRegex=A.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;i<n.length;i++)e[n[i]]=+r;return e}f.getGraphDiv=S.getGraphDiv,f.isPlotDiv=S.isPlotDiv,f.removeElement=S.removeElement,f.addStyleRule=S.addStyleRule,f.addRelatedStyleRule=S.addRelatedStyleRule,f.deleteRelatedStyleRule=S.deleteRelatedStyleRule,f.getFullTransformMatrix=S.getFullTransformMatrix,f.getElementTransformMatrix=S.getElementTransformMatrix,f.getElementAndAncestors=S.getElementAndAncestors,f.equalDomRects=S.equalDomRects,f.clearResponsive=r(75352),f.preserveDrawingBuffer=r(34296),f.makeTraceGroups=r(30988),f._=r(98356),f.notifier=r(41792),f.filterUnique=r(68944),f.filterVisible=r(43880),f.pushUnique=r(52416),f.increment=r(1396),f.cleanNumber=r(54037),f.ensureNumber=function(t){return o(t)?(t=Number(t))>l||t<u?c:t:c},f.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&o(t)&&t>=0&&t%1==0},f.noop=r(16628),f.identity=r(35536),f.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},f.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var i=0;i<e.length;i++){var a=e[i],o=f.nestedProperty(t,a.replace("?",r)),s=f.nestedProperty(t,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}},f.raiseToTop=function(t){t.parentNode.appendChild(t)},f.cancelTransition=function(t){return t.transition().duration(0)},f.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},f.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l="";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;u&&(o=Math.pow(n,u),l=Math.floor(Math.random()*o).toString(n)+l);var c=parseInt(l,n);return e&&e[l]||c!==1/0&&c>=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r<l;r++)u[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},f.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(f.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},f.mergeArrayCastPositive=function(t,e,r){return f.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},f.castOption=function(t,e,r,n){n=n||f.identity;var i=f.nestedProperty(t,r).get();return f.isArrayOrTypedArray(i)?Array.isArray(e)&&f.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},f.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=f.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},f.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=E(o));for(var s=0;s<a.length;s++){var l=a[s];if(f.isIndex(l)||f.isArrayOrTypedArray(l)&&f.isIndex(l[0])&&f.isIndex(l[1])){var u=n?n[l]:l,c=r?r[u]:u;void 0!==(i=c)&&i<t.length&&(t[c].selected=1)}}},f.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=E(r),i=[],a=0;a<e.length;a++){var o=e[a];if(f.isIndex(o)){var s=n[o];f.isIndex(s)&&i.push(s)}}return i}return e},f.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=f.nestedProperty(t,r).get();return!!f.isArrayOrTypedArray(n)&&n}return!!f.isArrayOrTypedArray(r)&&r},f.minExtend=function t(e,r,n){var i={};"object"!=typeof r&&(r={});var a,o,s,l="pieLike"===n?-1:3,u=Object.keys(e);for(a=0;a<u.length;a++)s=e[o=u[a]],"_"!==o.charAt(0)&&"function"!=typeof s&&("module"===o?i[o]=s:Array.isArray(s)?i[o]="colorscale"===o||-1===l?s.slice():s.slice(0,l):f.isTypedArray(s)?i[o]=-1===l?s.subarray():s.subarray(0,l):i[o]=s&&"object"==typeof s?t(e[o],r[o],n):s);for(u=Object.keys(r),a=0;a<u.length;a++)"object"==typeof(s=r[o=u[a]])&&o in i&&"object"==typeof i[o]||(i[o]=s);return i},f.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},f.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var L=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return L.test(window.navigator.userAgent)};var C=/iPad|iPhone|iPod/;f.isIOS=function(){return C.test(window.navigator.userAgent)};var O=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var t=O.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},f.isD3Selection=function(t){return t instanceof n.selection},f.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},f.ensureSingleById=function(t,e,r,n){var i=t.select(e+"#"+r);if(i.size())return i;var a=t.append(e).attr("id",r);return n&&a.call(n),a},f.objectFromPath=function(t,e){for(var r,n=t.split("."),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var P=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function D(t){return"__"===t.slice(0,2)}f.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if("object"==typeof t&&!Array.isArray(t))for(r in t)if(t.hasOwnProperty(r))if(e=r.match(P)){if(i=t[r],D(n=e[1]))continue;delete t[r],t[n]=f.extendDeepNoArrays(t[n]||{},f.objectFromPath(r,f.expandObjectPaths(i))[n])}else if(e=r.match(I)){if(i=t[r],D(n=e[1]))continue;if(a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],"."===e[3])s=e[4],o=t[n][a]=t[n][a]||{},f.extendDeepNoArrays(o,f.objectFromPath(s,f.expandObjectPaths(i)));else{if(D(n))continue;t[n][a]=f.expandObjectPaths(i)}}else{if(D(r))continue;t[r]=f.expandObjectPaths(t[r])}return t},f.numSeparate=function(t,e,r){if(r||(r=!1),"string"!=typeof e||0===e.length)throw new Error("Separator string required for formatting!");"number"==typeof t&&(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.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 u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,p="xother"===s||"yother"===s||u||h||c,d=s;(u||c)&&(d=d.substring(1)),(h||c)&&(d=d.substring(0,d.length-1));var v,g,y,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(y=3;y<a.length;y++)if(g=a[y]){if(g.hasOwnProperty(d)){v=g[d];break}if(z.test(d)||(v=f.nestedProperty(g,d).get(),(v=o[d]||f.nestedProperty(g,d).get())&&(o[d]=v)),void 0!==v)break}if(void 0!==v&&("*"===m&&(v*=x),"/"===m&&(v/=x)),void 0===v&&n)return n.count<n.max&&(f.warn("Variable '"+d+"' in "+n.name+" could not be found!"),v=t),n.count===n.max&&f.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,t;if(l){var _;if(":"===l[0]&&(_=r?r.numberFormat:f.numberFormat,""!==v&&(v=_(l.replace(j,""))(v))),"|"===l[0]){_=r?r.timeFormat:i;var w=f.dateTime2ms(v);v=f.formatDate(w,l.replace(j,""),!1,_)}}else{var T=d+"Label";e.hasOwnProperty(T)&&(v=e[T])}return p&&(v="("+v+")",(u||c)&&(v=" "+v),(h||c)&&(v+=" ")),v}))}f.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var 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;n<e;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},f.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||"none"===e},f.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""},f.strRotate=function(t){return t?"rotate("+t+")":""},f.strScale=function(t){return 1!==t?"scale("+t+")":""},f.getTextTransform=function(t){var e=t.noCenter,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.anchorX||0,s=t.anchorY||0,l=t.rotate,u=t.scale;return u?u>1&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var q=f.getFirefoxVersion(),H=null!==q&&q<86;f.getPositionFromD3Event=function(){return H?[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 u={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var c={};if(s)for(o=0;o<s.length;o++)c[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=c[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,c[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&&(i|=2);var p=s[o]=s[o]||{};return p[r]=t,f?p[a]=e:n(p,a).set(e),null!==e&&(i&=-5),u[o]=u[o]|i,h},get:function(t){if(s){var e=c[t];return void 0===e?void 0:f?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=c[t];return void 0===n||(u[n]=1|u[n],c[e]=n,delete c[t],s[n][r]=e),h},remove:function(t){var e=c[t];if(void 0===e)return h;var i=s[e];if(Object.keys(i).length>2)return u[e]=2|u[e],h.set(t,null);if(f){for(o=e;o<s.length;o++)u[o]=3|u[o];for(o=e;o<s.length;o++)c[s[o][r]]--;s.splice(e,1),delete c[t]}else n(i,a).set(null),u[e]=6|u[e];return h},constructUpdate:function(){for(var t,i,o={},l=Object.keys(u),c=0;c<l.length;c++)i=l[c],t=e+"["+i+"]",s[i]?(1&u[i]&&(o[t+"."+r]=s[i][r]),2&u[i]&&(o[t+"."+a]=f?4&u[i]?null:s[i][a]:4&u[i]?null:n(s[i],a).get())):o[t]=null;return o}};return h}},98356:function(t,e,r){"use strict";var n=r(24040);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var u=r.split("-")[0];if(u===r)break;r=u}return e}},24248:function(t,e,r){"use strict";var n=r(20556).dfltConfig,i=r(41792),a=t.exports={};a.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}}},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;n<t;n++)r[n]=new Array(e);return r},e.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},e.dot=function(t,r){if(!t.length||!r.length||t.length!==r.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=e.dot(t[i],r);else if(r[0].length){var o=e.transposeRagged(r);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=e.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*r[i];return n},e.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},e.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},e.rotationXYMatrix=function(t,r,n){return e.dot(e.dot(e.translationMatrix(r,n),e.rotationMatrix(t)),e.translationMatrix(-r,-n))},e.apply3DTransform=function(t){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return e.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},e.apply2DTransform=function(t){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return e.dot(t,[n[0],n[1],1]).slice(0,2)}},e.apply2DTransform2=function(t){var r=e.apply2DTransform(t);return function(t){return r(t.slice(0,2)).concat(r(t.slice(2,4)))}},e.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},20435:function(t){"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},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,u=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<u.length;l++)o[l]=a(u[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!i(u))return;if("object"!=typeof(u=u[r])||null===u)return}if("object"==typeof u&&null!==u&&null!==(o=u[e[s]]))return o}}t.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";var r,i,o,s,u=e.split(".");for(s=0;s<u.length;s++)if("__"===String(u[s]).slice(0,2))throw"bad property string";for(s=0;s<u.length;){if(r=String(u[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw"bad property string";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|\.)args\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,h="",p=[[t,h]],d=s(n,r);for(o=0;o<e.length-1;o++){if("number"==typeof(a=e[o])&&!i(l))throw"array index but container is not an array";if(-1===a){if(d=!c(l,e.slice(o+1),n,r))break;return}if(!f(l,a,e[o+1],d))break;if("object"!=typeof(l=l[a])||null===l)throw"container is not an object";h=u(h,a),p.push([l,h])}if(d){if(o===e.length-1&&(delete l[e[o]],Array.isArray(l)&&+e[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[e[o]]=n}}function u(t,e){var r=e;return n(e)?r="["+e+"]":t&&(r="."+e),t+r}function c(t,e,r,n){var a,o=i(r),u=!0,c=r,h=n.replace("-1",0),p=!o&&s(r,h),d=e[0];for(a=0;a<t.length;a++)h=n.replace("-1",a),o&&(p=s(c=r[a%r.length],h)),p&&(u=!1),f(t,a,d,p)&&l(t[a],e,n.replace("-1",a))(c);return u}function f(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]="number"==typeof r?[]:{}}return!0}},16628:function(t){"use strict";t.exports=function(){}},41792:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=[];t.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=t.split(/<br\s*\/?>/g),l=0;l<o.length;l++)l&&a.append("br"),a.append("span").text(o[l]);"stick"===e?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style("opacity",0).each("end",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},72213:function(t,e,r){"use strict";var n=r(93972),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr("class")||"").split(" "),o=0;o<a.length;o++){var s=a[o];0===s.indexOf("cursor-")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,"!!")}n(t,e)}else r&&(t.attr(i,null),"!!"===r?n(t):n(t,r))}},92065:function(t,e,r){"use strict";var n=r(52248).dot,i=r(39032).BADNUM,a=t.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,l=function(t){return t[1]===r[0][1]}));var c=!0,f=r[0];for(e=1;e<r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){c=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:u?function(t,e){var r=t[0],u=t[1];return!(r===i||r<n||r>a||u===i||u<o||u>s||e&&l(t))}:function(t,e){var l=t[0],u=t[1];if(l===i||l<n||l>a||u===i||u<o||u>s)return!1;var c,f,h,p,d,v=r.length,g=r[0][0],y=r[0][1],m=0;for(c=1;c<v;c++)if(f=g,h=y,g=r[c][0],y=r[c][1],!(l<(p=Math.min(f,g))||l>Math.max(f,g)||u>Math.max(h,y)))if(u<Math.min(h,y))l!==p&&m++;else{if(u===(d=g===f?u:h+(l-f)*(y-h)/(g-f)))return 1!==c||!e;u<=d&&l!==p&&m++}return m%2==1},isRect:u,degenerate:c}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],u=[t[r][0]-l[0],t[r][1]-l[1]],c=n(u,u),f=Math.sqrt(c),h=[-u[1]/f,u[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,u))<0||s>c||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u<t.length;u++)(u===t.length-1||a.isSegmentBent(t,l,u+1,e))&&(r.push(t[u]),r.length<s-2&&(n=u,i=r.length-1),l=u)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},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<a.length;o++)if(-1!==a[o].indexOf("Safari"))for(var s=o-1;s>-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},52416:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===r)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},94552:function(t,e,r){"use strict";var n=r(3400),i=r(20556).dfltConfig,a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},plotDo:function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)}};t.exports=a},53756:function(t,e){"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),a=!1===n?"":"^";return"xy"===t?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+t+"([2-9]|[1-9][0-9]+)?"+i)}},23193:function(t){"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},51528:function(t,e,r){"use strict";var n=r(38116).isArrayOrTypedArray,i=r(63620);t.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),u=0;u<l;u++)s[u]!==o[u]&&i(o[u])&&i(s[u])&&t(s[u],o[u])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},14952:function(t,e,r){"use strict";var n=r(38248),i=r(24248),a=r(35536),o=r(39032).BADNUM,s=1e-9;function l(t,e){return t<e}function u(t,e){return t<=e}function c(t,e){return t>e}function f(t,e){return t>=e}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:u:r?f:c,t+=v*s*(r?-1:1)*(v>=0?1:-1);h<p&&d++<100;)o(e[a=Math.floor((h+p)/2)],t)?h=a+1:p=a;return d>90&&i.log("Long binary search..."),h-1},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=[],u=0;u<=r;u++){var c=n[u],f=c-i;void 0===i?(l.push(c),i=c):f>s&&(a=Math.min(a,f),l.push(c),i=c)}return{vals:l,minDiff:a}},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,u=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=u((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},e.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},93972:function(t){"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},16576:function(t,e,r){"use strict";var n=r(76308),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",r.appendChild(a),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},95376:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},63084:function(t,e,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;e.aggNums=function(t,r,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=e.aggNums(t,r,a[s]);a=l}for(s=0;s<o;s++)n(r)?n(a[s])&&(r=t(+r,+a[s])):r=a[s];return r},e.len=function(t){return e.aggNums((function(t){return t+1}),0,t)},e.mean=function(t,r){return r||(r=e.len(t)),e.aggNums((function(t,e){return t+e}),0,t)/r},e.geometricMean=function(t,r){return r||(r=e.len(t)),Math.pow(e.aggNums((function(t,e){return t*e}),1,t),1/r)},e.midRange=function(t){if(void 0!==t&&0!==t.length)return(e.aggNums(Math.max,null,t)+e.aggNums(Math.min,null,t))/2},e.variance=function(t,r,i){return r||(r=e.len(t)),n(i)||(i=e.mean(t,r)),e.aggNums((function(t,e){return t+Math.pow(e-i,2)}),0,t)/r},e.stdev=function(t,r,n){return Math.sqrt(e.variance(t,r,n))},e.median=function(t){var r=t.slice().sort();return e.interp(r,.5)},e.interp=function(t,e){if(!n(e))throw"n should be a finite number";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},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,g){var S=t.text(),E=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),O=n.select(t.node().parentNode);if(!O.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-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(u,"\\lt ").replace(c,"\\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){O.selectAll("svg."+P).remove(),O.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void e();var l=O.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:P,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,v=p.height;(d>u||v>c)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,v=p.height);var y=+t.attr("x"),m=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,y,m]+")"+a(-d/2,x-v/2)});else if("l"===P[0])m=x-v/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))y=0,m=x;else{var b=t.attr("text-anchor");y-=d*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}s.attr({x:y,y:m}),g&&g.call(t,l),e(l)}))}))):I(),t}function I(){O.empty()||(P=t.attr("class")+"-math",O.select("svg."+P).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(y," ");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:u*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)f(i[a])}function f(t){var e,i=t.type,a={};if("a"===i){e="a";var s=t.target,u=t.href,c=t.popup;u&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":u},c&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+c+'");return false;'))}else e="tspan";t.style&&(a.style=t.style);var f=document.createElementNS(o.svg,e);if("sup"===i||"sub"===i){g(r,v),r.appendChild(f);var h=document.createElementNS(o.svg,"tspan");g(h,v),n.select(h).attr("dy",d[i]),a.dy=p[i],r.appendChild(f),r.appendChild(h)}else r.appendChild(f);n.select(f).attr(a),r=t.node=f,l.push(t)}function g(t,e){t.appendChild(document.createTextNode(e))}function S(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log("Start tag <"+n.type+"> doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag </"+t+">.",e)}b.test(e)?c():(r=t,l=[{node:t}]);for(var E=e.split(m),O=0;O<E.length;O++){var P=E[O],I=P.match(x),D=I&&I[2].toLowerCase(),z=h[D];if("br"===D)c();else if(void 0===z)g(r,L(P));else if(I[1])S(D);else{var R=I[4],F={type:D},B=A(R,_);if(B?(B=B.replace(M,"$1 fill:"),z&&(B+=";"+z)):z&&(B=z),B&&(F.style=B),"a"===D){a=!0;var N=A(R,w);if(N){var j=C(N);j&&(F.href=j,F.target=A(R,T)||"_blank",F.popup=A(R,k))}}f(F)}}return a}(t.node(),S);r&&t.style("pointer-events","all"),e.positionText(t),g&&g.call(t)}};var u=/(<|&lt;|&#60;)/g,c=/(>|&gt;|&#62;)/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="​",g=["http:","https:","mailto:","",void 0,":"],y=e.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;e.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&L(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;l<i.length;l++){var u=i[l],c=u.match(x),f=c&&c[2].toLowerCase();if(f)-1!==n.indexOf(f)&&(a.push(u),o=f);else{var h=u.length;if(s+h<r)a.push(u),s+=h;else if(s<r){var p=r-s;o&&("br"!==o||p<=3||h<=3)&&a.pop(),r>3?a.push(u.substr(0,p-3)+"..."):a.push(u.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 L(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 C(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!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function O(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=L,e.sanitizeHTML=function(t){t=t.replace(y," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(m),o=0;o<a.length;o++){var s=a[o],l=s.match(x),u=l&&l[2].toLowerCase();if(u in h)if(l[1])i.length&&(r=i.pop());else{var c=l[4],f=A(c,_),p=f?{style:f}:{};if("a"===u){var d=A(c,w);if(d){var v=C(d);if(v){p.href=v;var g=A(c,T);g&&(p.target=g)}}}var b=document.createElement(u);r.appendChild(b),n.select(b).attr(p),r=b,i.push(b)}else r.appendChild(document.createTextNode(L(s)))}return e.innerHTML},e.lineCount=function(t){return t.selectAll("tspan.line").size()||1},e.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i("x",e),o=i("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:a,y:o})}))};var P="1px ";e.makeTextShadow=function(t){return P+P+P+t+", -"+P+"-"+P+P+t+", "+P+"-"+P+P+t+", -"+P+P+P+t},e.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var i,s,u,c,f;i=n.select(r).select(".svg-container"),s=i.append("div"),u=t.node().style,c=parseFloat(u.fontSize||12),void 0===(f=e.text)&&(f=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":u.fontFamily||"Arial","font-size":c,color:e.fill||u.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(f).call(O(t,i,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(O(t,i,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var h,p=o.attr("class");(h=p?"."+p.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(h).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},91200:function(t,e){"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var a=r[t],o=Date.now();if(!a){for(var s in r)r[s].ts<o-6e4&&delete r[s];a=r[t]={ts:0,timer:null}}function l(){i(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}n(a),o>a.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;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||""}:{array:e,index:"",property:""}}},67824:function(t,e,r){"use strict";var n=r(92880).extendFlat,i=r(63620),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function c(t,e,r){var a=n({},t);for(var o in a){var s=a[o];i(s)&&(a[o]=f(s,e,0,o))}return"from-root"===r&&(a.editType=e),a}function f(t,e,r,i){if(t.valType){var a=n({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=f(t.items[o],e)}return a}return c(t,e,"_"===i.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:o,traceFlags:function(){return u(s)},layoutFlags:function(){return u(l)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:c}},93404:function(t,e,r){"use strict";var n=r(38248),i=r(61784),a=r(24040),o=r(3400),s=r(7316),l=r(79811),u=r(76308),c=l.cleanId,f=l.getFromTrace,h=a.traceIs;function p(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=c(r,n,!0))}function d(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function v(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function y(t){var e="middle",r="center";return"string"==typeof t&&(-1!==t.indexOf("top")?e="top":-1!==t.indexOf("bottom")&&(e="bottom"),-1!==t.indexOf("left")?r="left":-1!==t.indexOf("right")&&(r="right")),e+" "+r}function m(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}e.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&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;r<v.length;r++){var g=v[r];if(a&&a.test(g)){var y=t[g];y.anchor&&"free"!==y.anchor&&(y.anchor=c(y.anchor)),y.overlaying&&(y.overlaying=c(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":!1===y.isdate&&!1===y.islog&&(y.type="linear")),"withzero"!==y.autorange&&"tozero"!==y.autorange||(y.autorange=!0,y.rangemode="tozero"),y.insiderange&&delete y.range,delete y.islog,delete y.isdate,delete y.categories,m(y,"domain")&&delete y.domain,void 0!==y.autotick&&(void 0===y.tickmode&&(y.tickmode=y.autotick?"auto":"linear"),delete y.autotick),d(y)}else if(l&&l.test(g))d(t[g].radialaxis);else if(f&&f.test(g)){var x=t[g];d(x.aaxis),d(x.baxis),d(x.caxis)}else if(h&&h.test(g)){var b=t[g],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],T=_[1],k=_[2],A=i([],w),M=[];for(n=0;n<3;++n)M[n]=T[n]+k*A[2+4*n];b.camera={eye:{x:M[0],y:M[1],z:M[2]},center:{x:T[0],y:T[1],z:T[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}d(b.xaxis),d(b.yaxis),d(b.zaxis)}}var S=Array.isArray(t.annotations)?t.annotations.length:0;for(r=0;r<S;r++){var E=t.annotations[r];o.isPlainObject(E)&&(E.ref&&("paper"===E.ref?(E.xref="paper",E.yref="paper"):"data"===E.ref&&(E.xref="x",E.yref="y"),delete E.ref),p(E,"xref"),p(E,"yref"))}var L=Array.isArray(t.shapes)?t.shapes.length:0;for(r=0;r<L;r++){var C=t.shapes[r];o.isPlainObject(C)&&(p(C,"xref"),p(C,"yref"))}var O=Array.isArray(t.images)?t.images.length:0;for(r=0;r<O;r++){var P=t.images[r];o.isPlainObject(P)&&(p(P,"xref"),p(P,"yref"))}var I=t.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),u.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r<t.length;r++){var n,i=t[r];if("histogramy"===i.type&&"xbins"in i&&!("ybins"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&"opacity"in i.error_y){var l=u.defaults,f=i.error_y.color||(h(i,"bar")?u.defaultLine:l[r%l.length]);i.error_y.color=u.addOpacity(u.rgb(f),u.opacity(f)*i.error_y.opacity),delete i.error_y.opacity}if("bardir"in i&&("h"!==i.bardir||!h(i,"bar")&&"histogram"!==i.type.substr(0,9)||(i.orientation="h",e.swapXYData(i)),delete i.bardir),"histogramy"===i.type&&e.swapXYData(i),"histogramx"!==i.type&&"histogramy"!==i.type||(i.type="histogram"),"scl"in i&&!("colorscale"in i)&&(i.colorscale=i.scl,delete i.scl),"reversescl"in i&&!("reversescale"in i)&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=c(i.xaxis,"x")),i.yaxis&&(i.yaxis=c(i.yaxis,"y")),h(i,"gl3d")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!h(i,"pie-like")&&!h(i,"bar-like"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=y(i.textposition[n]);else i.textposition&&(i.textposition=y(i.textposition));var p=a.getModule(i);if(p&&p.colorbar){var x=p.colorbar.container,b=x?i[x]:i;b&&b.colorscale&&("YIGnBu"===b.colorscale&&(b.colorscale="YlGnBu"),"YIOrRd"===b.colorscale&&(b.colorscale="YlOrRd"))}if("surface"===i.type&&o.isPlainObject(i.contours)){var _=["x","y","z"];for(n=0;n<_.length;n++){var w=i.contours[_[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===i.type||"ohlc"===i.type){var T=!1!==(i.increasing||{}).showlegend,k=!1!==(i.decreasing||{}).showlegend,A=v(i.increasing),M=v(i.decreasing);if(!1!==A&&!1!==M){var S=g(A,M,T,k);S&&(i.name=S)}else!A&&!M||i.name||(i.name=A||M)}if(Array.isArray(i.transforms)){var E=i.transforms;for(n=0;n<E.length;n++){var L=E[n];if(o.isPlainObject(L))switch(L.type){case"filter":L.filtersrc&&(L.target=L.filtersrc,delete L.filtersrc),L.calendar&&(L.valuecalendar||(L.valuecalendar=L.calendar),delete L.calendar);break;case"groupby":if(L.styles=L.styles||L.style,L.styles&&!Array.isArray(L.styles)){var C=L.styles,O=Object.keys(C);L.styles=[];for(var P=0;P<O.length;P++)L.styles.push({target:O[P],value:C[O[P]]})}}}}m(i,"line")&&delete i.line,"marker"in i&&(m(i.marker,"line")&&delete i.marker.line,m(i,"marker")&&delete i.marker),u.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),d(i),i.colorbar&&d(i.colorbar),i.marker&&i.marker.colorbar&&d(i.marker.colorbar),i.line&&i.line.colorbar&&d(i.line.colorbar),i.aaxis&&d(i.aaxis),i.baxis&&d(i.baxis)}},e.swapXYData=function(t){var e;if(o.swapAttrs(t,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,["error_?.copy_ystyle"]),n&&o.swapAttrs(t,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof t.hoverinfo){var i=t.hoverinfo.split("+");for(e=0;e<i.length;e++)"x"===i[e]?i[e]="y":"y"===i[e]&&(i[e]="x");t.hoverinfo=i.join("+")}},e.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map((function(t,e){return e}));if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn("trace index (",e[i],") is not a number or is out of bounds");return r}return e},e.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],u=n(l);if(u&&null===e){var c=a.slice(0,s-1).join(".");o.nestedProperty(i,c).get().splice(l,1)}else u&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(t){var e=t.search(x);if(e>0)return t.substr(0,e)}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;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=f(t,i,_[a]);if(s&&"log"!==s.type){var l=s._name,u=s._id.substr(1);if("scene"===u.substr(0,5)){if(void 0!==r[u])continue;l=u+"."+l}var c=l+".type";void 0===r[l]&&void 0===r[c]&&o.nestedProperty(t.layout,c).set(null)}}}},22448:function(t,e,r){"use strict";var n=r(36424);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(52200).getGraphDiv,a=r(4016).eraseActiveShape;e.deleteActiveShape=function(t){return a(i(t))},e.toImage=r(67024),e.validate=r(21480),e.downloadImage=r(39792);var o=r(94828);e.makeTemplate=o.makeTemplate,e.validateTemplate=o.validateTemplate},17680:function(t,e,r){"use strict";var n=r(63620),i=r(16628),a=r(24248),o=r(14952).sorterAsc,s=r(24040);e.containerArrayMatch=r(69820);var l=e.isAddVal=function(t){return"add"===t||n(t)},u=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,c){var f=e.astr,h=s.getComponentMethod(f,"supplyLayoutDefaults"),p=s.getComponentMethod(f,"draw"),d=s.getComponentMethod(f,"drawOne"),v=n.replot||n.recalc||h===i||p===i,g=t.layout,y=t._fullLayout;if(r[""]){Object.keys(r).length>1&&a.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(u(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(g,y),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=c(y,f).get(),O=[],P=-1,I=L.length;for(x=0;x<S.length;x++)if(w=r[_=S[x]],T=Object.keys(w),k=w[""],A=l(k),_<0||_>L.length-(A?0:1))a.warn("index out of range",f,_);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(k)?O.push(_):A?("add"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,k),-1===P&&(P=_);else for(b=0;b<T.length;b++)M=f+"["+_+"].",c(L[_],T[b],M).set(w[T[b]]);for(x=O.length-1;x>=0;x--)L.splice(O[x],1),C&&C.splice(O[x],1);if(L.length?E||e.set(L):e.set(null),v)return!1;if(h(g,y),d!==i){var D;if(-1===P)D=S;else{for(I=Math.max(L.length,I),D=[],x=0;x<S.length&&!((_=S[x])>=P);x++)D.push(_);for(x=P;x<I;x++)D.push(x)}for(x=0;x<D.length;x++)d(t,D[x])}else p(t);return!0}},36424:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(52264),o=r(3400),s=o.nestedProperty,l=r(95924),u=r(94552),c=r(24040),f=r(73060),h=r(7316),p=r(54460),d=r(96312),v=r(94724),g=r(43616),y=r(76308),m=r(42464).initInteractions,x=r(9616),b=r(22676).clearOutline,_=r(20556).dfltConfig,w=r(17680),T=r(93404),k=r(39172),A=r(67824),M=r(33816).AX_NAME_PATTERN,S=0;function E(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function L(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function C(t,e){L(t,y.combine(e,"white"))}function O(t,e){if(!t._context){t._context=o.extendDeep({},_);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,u=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in u&&("setBackground"===l&&"opaque"===e[l]?u[l]=C:u[l]=e[l]);e.plot3dPixelRatio&&!u.plotGlPixelRatio&&(u.plotGlPixelRatio=u.plot3dPixelRatio);var c=e.editable;if(void 0!==c)for(u.editable=c,s=Object.keys(u.edits),i=0;i<s.length;i++)u.edits[s[i]]=c;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in u.edits&&(u.edits[l]=e.edits[l]);u._exportedPlot=e._exportedPlot}u.staticPlot&&(u.editable=!1,u.edits={},u.autosizable=!1,u.scrollZoom=!1,u.doubleClick=!1,u.showTips=!1,u.showLink=!1,u.displayModeBar=!1),"hover"!==u.displayModeBar||a||(u.displayModeBar=!0),"transparent"!==u.setBackground&&"function"==typeof u.setBackground||(u.setBackground=L),u._hasZeroHeight=u._hasZeroHeight||0===t.clientHeight,u._hasZeroWidth=u._hasZeroWidth||0===t.clientWidth;var f=u.scrollZoom,h=u._scrollZoom={};if(!0===f)h.cartesian=1,h.gl3d=1,h.geo=1,h.mapbox=1;else if("string"==typeof f){var p=f.split("+");for(i=0;i<p.length;i++)h[p[i]]=1}else!1!==f&&(h.gl3d=1,h.geo=1,h.mapbox=1)}function P(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function I(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error("all values in "+r+" must be integers");if(i>=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(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]),I(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function z(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 I(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,u,c,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var v=0;v<r.length;v++){if(a=t.data[r[v]],l=(u=s(a,d)).get(),c=e[d][v],!o.isArrayOrTypedArray(c))throw new Error("attribute: "+d+" index: "+v+" must be an array");if(!o.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+d);if(l.constructor!==c.constructor)throw new Error("cannot extend array with an array of a different type: "+d);f=h?n[d][v]:n,i(f)||(f=-1),p.push({prop:u,target:l,insert:c,maxp:Math.floor(f)})}return p}(t,e,r,n),u={},c={},f=0;f<l.length;f++){var h=l[f].prop,p=l[f].maxp,d=a(l[f].target,l[f].insert,p);h.set(d[0]),Array.isArray(u[h.astr])||(u[h.astr]=[]),u[h.astr].push(d[1]),Array.isArray(c[h.astr])||(c[h.astr]=[]),c[h.astr].push(l[f].target.length)}return{update:u,maxPoints:c}}function R(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function F(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var a={};if("string"==typeof r)a[r]=n;else{if(!o.isPlainObject(r))return o.warn("Restyle fail.",r,n,i),Promise.reject();a=o.extendFlat({},r),void 0===i&&(i=n)}Object.keys(a).length&&(t.changed=!0);var s=T.coerceTraceIndices(t,i),l=U(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&T.clearAxisTypes(t,s,{});var f=[];c.fullReplot?f.push(e._doPlot):(f.push(h.previousPromises),h.supplyDefaults(t),c.markerSize&&(h.doCalcdata(t),G(f)),c.style&&f.push(k.doTraceStyle),c.colorbars&&f.push(k.doColorBars),f.push(E)),f.push(h.rehover,h.redrag,h.reselect),u.add(t,F,[t,l.undoit,l.traces],F,[t,l.redoit,l.traces]);var p=o.syncOrAsync(f,t);return p&&p.then||(p=Promise.resolve()),p.then((function(){return t.emit("plotly_restyle",l.eventData),t}))}function B(t){return void 0===t?null:t}function N(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){j((n||"")+r,i.get(),e,t),a(e)},i}:s}function j(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)j(t+"["+l+"]",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var u=o.isPlainObject(e)?e:{},c=o.isPlainObject(r)?r:{},f=o.extendFlat({},u,c);for(var h in f)j(t+"."+h,u[h],c[h],n)}else void 0===n[t]&&(n[t]=B(e))}function U(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,d=N(i._preGUI,u),v=o.extendDeepAll({},e);V(e);var g,y=A.traceFlags(),m={},x={};function b(){return r.map((function(){}))}function _(t){var e=p.id2name(t);-1===g.indexOf(e)&&g.push(e)}function w(t){return"LAYOUT"+t+".autorange"}function k(t){return"LAYOUT"+t+".range"}function M(t){for(var e=t;e<a.length;e++)if(a[e]._input===l[t])return a[e]}function S(n,a,o){if(Array.isArray(n))n.forEach((function(t){S(t,a,o)}));else if(!(n in e)&&!T.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=d(t.layout,n.replace("LAYOUT",""));else{var c=r[o];s=N(i._tracePreGUI[M(c)._fullInput.uid],u)(l[c],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=B(s.get())),void 0!==a&&s.set(a)}}function E(t){return function(e){return a[e][t]}}function L(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var C in e){if(T.hasParent(e,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");var O,P,I,D,z,R,F=e[C];if("autobinx"!==C&&"autobiny"!==C||(C=C.charAt(C.length-1)+"bins",F=Array.isArray(F)?F.map(L(C)):!1===F?r.map(E(C)):null),m[C]=F,"LAYOUT"!==C.substr(0,6)){for(x[C]=b(),n=0;n<r.length;n++)if(O=l[r[n]],P=M(r[n]),D=(I=N(i._tracePreGUI[P._fullInput.uid],u)(O,C)).get(),void 0!==(z=Array.isArray(F)?F[n%F.length]:F)){var j=I.parts[I.parts.length-1],U=C.substr(0,C.length-j.length-1),q=U?U+".":"",H=U?s(P,U).get():P;if((R=f.getTraceValObject(P,I.parts))&&R.impliedEdits&&null!==z)for(var G in R.impliedEdits)S(o.relativeAttr(C,G),R.impliedEdits[G],n);else if("thicknessmode"!==j&&"lenmode"!==j||D===z||"fraction"!==z&&"pixels"!==z||!H){if("type"===C&&("pie"===z!=("pie"===D)||"funnelarea"===z!=("funnelarea"===D))){var W="x",Y="y";"bar"!==z&&"bar"!==D||"h"!==O.orientation||(W="y",Y="x"),o.swapAttrs(O,["?","?src"],"labels",W),o.swapAttrs(O,["d?","?0"],"label",W),o.swapAttrs(O,["?","?src"],"values",Y),"pie"===D||"funnelarea"===D?(s(O,"marker.color").set(s(O,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):c.traceIs(O,"cartesian")&&s(O,"marker.colors").set(s(O,"marker.color").get())}}else{var X=i._size,Z=H.orient,K="top"===Z||"bottom"===Z;if("thicknessmode"===j){var J=K?X.h:X.w;S(q+"thickness",H.thickness*("fraction"===z?1/J:J),n)}else{var $=K?X.w:X.h;S(q+"len",H.len*("fraction"===z?1/$:$),n)}}if(x[C][n]=B(D),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(C)){if("orientation"===C){I.set(z);var Q=O.x&&!O.y?"h":"v";if((I.get()||Q)===P.orientation)continue}else"orientationaxes"===C&&(O.orientation={v:"h",h:"v"}[P.orientation]);T.swapXYData(O),y.calc=y.clearAxisTypes=!0}else-1!==h.dataArrayContainers.indexOf(I.parts[0])?(T.manageArrayContainers(I,z,x),y.calc=!0):(R?R.arrayOk&&!c.traceIs(P,"regl")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(D))?y.calc=!0:A.update(y,R):y.calc=!0,I.set(z))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(C)&&p.swap(t,r),"orientationaxes"===C){var tt=s(t.layout,"hovermode"),et=tt.get();"x"===et?tt.set("y"):"y"===et?tt.set("x"):"x unified"===et?tt.set("y unified"):"y unified"===et&&tt.set("x unified")}if(-1!==["orientation","type"].indexOf(C)){for(g=[],n=0;n<r.length;n++){var rt=l[r[n]];c.traceIs(rt,"cartesian")&&(_(rt.xaxis||"x"),_(rt.yaxis||"y"))}S(g.map(w),!0,0),S(g.map(k),[0,1],0)}}else I=d(t.layout,C.replace("LAYOUT","")),x[C]=[B(I.get())],I.set(Array.isArray(F)?F[0]:F),y.calc=!0}return(y.calc||y.plot)&&(y.fullReplot=!0),{flags:y,undoit:x,redoit:m,traces:r,eventData:o.extendDeepNoArrays([],[v,r])}}function V(t){var e,r,n,i=o.counterRegex("axis",".title",!1,!1),a=/colorbar\.title$/,s=Object.keys(t);for(e=0;e<s.length;e++)r=s[e],n=t[r],"title"!==r&&!i.test(r)&&!a.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(E)),s.push(h.rehover,h.redrag,h.reselect),u.add(t,q,[t,i.undoit],q,[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 H(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)},u={};for(var c in r.rangesAltered){var f=p.id2name(c);if(n=t.layout[f],i=a[f],d(n,i,l,u),i._matchGroup)for(var h in i._matchGroup)if(h!==c){var g=a[p.id2name(h)];g.autorange=i.autorange,g.range=i.range.slice(),g._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,k.doAutoRangeAndConstraints,r,k.drawData,k.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,u=l._guiEditing,h=N(l._preGUI,u),d=Object.keys(e),v=p.list(t),g=o.extendDeepAll({},e),y={};for(V(e),d=Object.keys(e),n=0;n<d.length;n++)if(0===d[n].indexOf("allaxes")){for(i=0;i<v.length;i++){var m=v[i]._id.substr(1),x=-1!==m.indexOf("scene")?m+".":"",b=d[n].replace("allaxes",x+v[i]._name);e[b]||(e[b]=e[d[n]])}delete e[d[n]]}var _=A.layoutFlags(),k={},S={};function E(t,r){if(Array.isArray(t))t.forEach((function(t){E(t,r)}));else if(!(t in e)&&!T.hasParent(e,t)){var n=h(a,t);t in S||(S[t]=B(n.get())),void 0!==r&&n.set(r)}}var L,C={};function O(t){var e=p.name2id(t.split(".")[0]);return C[e]=1,e}for(var P in e){if(T.hasParent(e,P))throw new Error("cannot set "+P+" and a parent attribute simultaneously");for(var I=h(a,P),D=e[P],z=I.parts.length-1;z>0&&"string"!=typeof I.parts[z];)z--;var R=I.parts[z],F=I.parts[z-1]+"."+R,j=I.parts.slice(0,z).join("."),U=s(t.layout,j).get(),q=s(l,j).get(),H=I.get();if(void 0!==D){k[P]=D,S[P]="reverse"===R?D:B(H);var G=f.getLayoutValObject(l,I.parts);if(G&&G.impliedEdits&&null!==D)for(var Z in G.impliedEdits)E(o.relativeAttr(P,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(P))if(D){E("autosize",null);var J="height"===P?"width":"height";E(J,l[J])}else l[P]=t._initialAutoSize[P];else if("autosize"===P)E("width",D?null:l.width),E("height",D?null:l.height);else if(F.match(W))O(F),s(l,j+"._inputRange").set(null);else if(F.match(Y)){O(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){L=U;var Q="linear"===q.type&&"log"===D,tt="log"===q.type&&"linear"===D;if(Q||tt){if(L&&L.range)if(q.autorange)Q&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.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[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,q,D,E),c.getComponentMethod("images","convertCoords")(t,q,D,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,P).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,E),c.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=w.containerArrayMatch(P);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(D)?S[P]=null:w.isRemoveVal(D)?S[P]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,st),y[r]||(y[r]={});var lt=y[r][n];lt||(lt=y[r][n]={}),lt[ot]=D,delete e[P]}else"reverse"===R?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):("dragmode"===P&&(!1===D&&!1!==H||!1!==D&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,I.set(D))}}for(r in y)w.applyContainerArrayChanges(t,h(a,r),y[r],_,h)||(_.plot=!0);for(var ut in C){var ct=(L=p.getFromId(t,ut))&&L._constraintGroup;if(ct)for(var ft in _.calc=!0,ct)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}(K(t)||e.height||e.width)&&(_.plot=!0);var ht=l.shapes;for(n=0;n<ht.length;n++)if(ht[n].showlegend){_.calc=!0;break}return(_.plot||_.calc)&&(_.layoutReplot=!0),{flags:_,rangesAltered:C,undoit:S,redoit:k,eventData:g}}function K(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function J(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t),o.isPlainObject(r)||(r={}),o.isPlainObject(n)||(n={}),Object.keys(r).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=T.coerceTraceIndices(t,i),s=U(t,o.extendFlat({},r),a),l=s.flags,c=Z(t,o.extendFlat({},n)),f=c.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&T.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(k.layoutReplot):l.fullReplot?p.push(e._doPlot):(p.push(h.previousPromises),H(t,f,c)||h.supplyDefaults(t),l.style&&p.push(k.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(k.doColorBars),f.legend&&p.push(k.doLegend),f.layoutstyle&&p.push(k.layoutStyles),f.axrange&&G(p,c.rangesAltered),f.ticks&&p.push(k.doTicksRelayout),f.modebar&&p.push(k.doModeBar),f.camera&&p.push(k.doCamera),p.push(E)),p.push(h.rehover,h.redrag,h.reselect),u.add(t,J,[t,s.undoit,c.undoit,s.traces],J,[t,s.redoit,c.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:c.eventData}),t}))}function $(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var Q=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],tt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function et(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function rt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r<e.length;r++)if(e[r]._fullInput.uid===t)return r;return-1}function it(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function at(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function ot(t,e,r,n){var i,a,l,u=n.getValObject,c=n.flags,f=n.immutable,h=n.inArray,p=n.arrayIndex;function d(){var t=i.editType;h&&-1!==t.indexOf("arraydraw")?o.pushUnique(c.arrays[h],p):(A.update(c,i),"none"!==t&&c.nChanges++,n.transition&&i.anim&&c.nChangesAnim++,(W.test(l)||Y.test(l))&&(c.rangesAltered[r[0]]=1),X.test(l)&&s(e,"_inputDomain").set(null),"datarevision"===a&&(c.newDataRevision=1))}function v(t){return"data_array"===t.valType||t.arrayOk}for(a in t){if(c.calc&&!n.transition)return;var g=t[a],y=e[a],m=r.concat(a);if(l=m.join("."),"_"!==a.charAt(0)&&"function"!=typeof g&&g!==y){if(("tick0"===a||"dtick"===a)&&"geo"!==r[0]){var x=e.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==a||!e.autorange)&&("zmin"!==a&&"zmax"!==a||"contourcarpet"!==e.type)&&(i=u(m))&&(!i._compareAsJSON||JSON.stringify(g)!==JSON.stringify(y))){var b,_=i.valType,w=v(i),T=Array.isArray(g),k=Array.isArray(y);if(T&&k){var M="_input_"+a,S=t[M],E=e[M];if(Array.isArray(S)&&S===E)continue}if(void 0===y)w&&T?c.calc=!0:d();else if(i._isLinkedToArray){var L=[],C=!1;h||(c.arrays[a]=L);var O=Math.min(g.length,y.length),P=Math.max(g.length,y.length);if(O!==P){if("arraydraw"!==i.editType){d();continue}C=!0}for(b=0;b<O;b++)ot(g[b],y[b],m.concat(b),o.extendFlat({inArray:a,arrayIndex:b},n));if(C)for(b=O;b<P;b++)L.push(b)}else!_&&o.isPlainObject(g)?ot(g,y,m,n):w?T&&k?(f&&(c.calc=!0),(f||n.newDataRevision)&&d()):T!==k?c.calc=!0:d():T&&k&&g.length===y.length&&String(g)===String(y)||d()}}}for(a in e)if(!(a in t)&&"_"!==a.charAt(0)&&"function"!=typeof e[a]){if(v(i=u(r.concat(a)))&&Array.isArray(e[a]))return void(c.calc=!0);d()}}function st(t,e){var r;for(r in t)if("_"!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(st(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(st(n[a],i[a]))return!0}}}}function lt(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),e._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),e._lastBBox=r}}e.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=h.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function u(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function f(){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,T.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 g(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],m=null==e,x=Array.isArray(e);if(m||x||!o.isPlainObject(e)){if(m||-1!==["string","number"].indexOf(typeof e))for(p=0;p<n._frames.length;p++)(d=n._frames[p])&&(m||String(d.group)===String(e))&&y.push({type:"byname",name:String(d.name),data:g({name:d.name})});else if(x)for(p=0;p<e.length;p++){var b=e[p];-1!==["number","string"].indexOf(typeof b)?(b=String(b),y.push({type:"byname",name:b,data:g({name:b})})):o.isPlainObject(b)&&y.push({type:"object",data:g(o.extendFlat({},b))})}}else y.push({type:"object",data:g(o.extendFlat({},e))});for(p=0;p<y.length;p++)if("byname"===(d=y[p]).type&&!n._frameHash[d.data.name])return o.warn('animate failure: frame not found: "'+d.data.name+'"'),void c();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&y.reverse();var _=t._fullLayout._currentFrame;if(_&&r.fromcurrent){var w=-1;for(p=0;p<y.length;p++)if("byname"===(d=y[p]).type&&d.name===_){w=p;break}if(w>0&&w<y.length-1){var k=[];for(p=0;p<y.length;p++)d=y[p],("byname"!==y[p].type||p>w)&&k.push(d);y=k}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o="byname"===e[i].type?h.computeFrame(t,e[i].name):e[i].data;var p=l(i),d=s(i);d.duration=Math.min(d.duration,p.duration);var v={frame:o,name:e[i].name,frameOpts:p,transitionOpts:d};i===e.length-1&&(v.onComplete=u(a,2),v.onInterrupt=c),n._frameQueue.push(v)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||f()}}(y):(t.emit("plotly_animated"),a())}))},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var f=l.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,g=(c[v]||d[v]||{}).name,y=e[n].name,m=c[g]||d[g];g&&y&&"number"==typeof y&&m&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===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<e.index?1:0}));var x=[],b=[],_=l.length;for(n=p.length-1;n>=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+t._transitionData._counter++];);if(c[i.name]){for(a=0;a<l.length&&(l[a]||{}).name!==i.name;a++);x.push({type:"replace",index:a,value:i}),b.unshift({type:"replace",index:a,value:l[a]})}else s=Math.max(0,Math.min(p[n].index,_)),x.push({type:"insert",index:s,value:i}),b.unshift({type:"delete",index:s}),_++}var w=h.modifyFrames,T=h.modifyFrames,k=[t,b],A=[t,x];return u&&u.add(t,w,k,T,A),h.modifyFrames(t,x)},e.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],p=[t,a];return u&&u.add(t,l,f,c,p),h.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=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<e.length;n++)if("object"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(r,n,i),Array.isArray(n)||(n=[n]),n=n.map((function(t){return o.extendFlat({},t)})),T.cleanData(n),a=0;a<n.length;a++)r.data.push(n[a]);for(a=0;a<n.length;a++)l.push(-n.length+a);if(void 0===i)return s=e.redraw(r),u.add(r,c,h,f,p),s;Array.isArray(i)||(i=[i]);try{D(r,l,i)}catch(t){throw r.data.splice(r.data.length-n.length,n.length),t}return u.startSequence(r),u.add(r,c,h,f,p),s=e.moveTraces(r,l,i),u.stopSequence(r),s},e.deleteTraces=function t(r,n){r=o.getGraphDiv(r);var i,a,s=[],l=e.addTraces,c=t,f=[r,s,n],h=[r,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),I(r,n,"indices"),(n=P(n,r.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=r.data.splice(n[i],1)[0],s.push(a);var p=e.redraw(r);return u.add(r,l,f,c,h),p},e.extendTraces=function t(r,n,i,a){var s=z(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=R(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var u=r-e.length,c=t.length-u;n.set(t.subarray(c)),n.set(e,u),i.set(t.subarray(0,c))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.prependTraces,c,t,arguments),l},e.moveTraces=function t(r,n,i){var a,s=[],l=[],c=t,f=t,h=[r=o.getGraphDiv(r),i,n],p=[r,n,i];if(D(r,n,i),n=Array.isArray(n)?n:[n],void 0===i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=P(n,r.data.length-1),i=P(i,r.data.length-1),a=0;a<r.data.length;a++)-1===n.indexOf(a)&&s.push(r.data[a]);for(a=0;a<n.length;a++)l.push({newIndex:i[a],trace:r.data[n[a]]});for(l.sort((function(t,e){return t.newIndex-e.newIndex})),a=0;a<l.length;a+=1)s.splice(l[a].newIndex,0,l[a].trace);r.data=s;var d=e.redraw(r);return u.add(r,c,h,f,p),d},e.prependTraces=function t(r,n,i,a){var s=z(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=R(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var u=r-e.length;n.set(e),n.set(t.subarray(0,u),e.length),i.set(t.subarray(u))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.extendTraces,c,t,arguments),l},e.newPlot=function(t,r,n,i){return t=o.getGraphDiv(t),h.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),h.purge(t),e._doPlot(t,r,n,i)},e._doPlot=function(t,r,i,a){var s;if(t=o.getGraphDiv(t),l.init(t),o.isPlainObject(r)){var u=r;r=u.data,i=u.layout,a=u.config,s=u.frames}if(!1===l.triggerHandler(t,"plotly_beforeplot",[r,i,a]))return Promise.reject();r||i||o.isPlotDiv(t)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",t),O(t,a),i||(i={}),n.select(t).classed("js-plotly-plot",!0),g.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var f=0===(t.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(T.cleanData(r),f?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!f||(t.layout=T.cleanLayout(i)),h.supplyDefaults(t);var d=t._fullLayout,v=d._has("cartesian");d._replotting=!0,(f||d._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=lt,r._calcInverseTransform(t),r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};n.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(x.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),t.emit("plotly_framework")}(t),d._shouldCreateBgLayer&&delete d._shouldCreateBgLayer),g.initGradients(t),g.initPatterns(t),f&&p.saveShowSpikeInitial(t);var y=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;y&&h.doCalcdata(t);for(var b=0;b<t.calcdata.length;b++)t.calcdata[b][0].trace=t._fullData[b];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||h.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var _=o.extendFlat({},d._size),w=0;function A(){if(h.clearAutoMarginIds(t),k.drawMarginPushers(t),p.allowAutoMargin(t),t._fullLayout.title.text&&t._fullLayout.title.automargin&&h.allowAutoMargin(t,"title.automargin"),d._has("pie"))for(var e=t._fullData,r=0;r<e.length;r++){var n=e[r];"pie"===n.type&&n.automargin&&h.allowAutoMargin(t,"pie."+n.uid+".automargin")}return h.doAutoMargin(t),h.previousPromises(t)}function M(){t._transitioning||(k.doAutoRangeAndConstraints(t),f&&p.saveRangeInitial(t),c.getComponentMethod("rangeslider","calcAutorange")(t))}var S=[h.previousPromises,function(){if(s)return e.addFrames(t,s)},function e(){for(var r=d._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!d._glcanvas&&d._has("gl")&&(d._glcanvas=d._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(t){return t.key})),d._glcanvas.enter().append("canvas").attr("class",(function(t){return"gl-canvas gl-canvas-"+t.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var i=t._context.plotGlPixelRatio;if(d._glcanvas){d._glcanvas.attr("width",d.width*i).attr("height",d.height*i).style("width",d.width+"px").style("height",d.height+"px");var a=d._glcanvas.data()[0].regl;if(a&&(Math.floor(d.width*i)!==a._gl.drawingBufferWidth||Math.floor(d.height*i)!==a._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!w)return o.log(s+" Clearing graph and plotting again."),h.cleanPlot([],{},t._fullData,d),h.supplyDefaults(t),d=t._fullLayout,h.doCalcdata(t),w++,e();o.error(s)}}return"h"===d.modebar.orientation?d._modebardiv.style("height",null).style("width","100%"):d._modebardiv.style("width",null).style("height",d.height+"px"),h.previousPromises(t)},A,function(){if(h.didMarginChange(_,d._size))return o.syncOrAsync([A,k.layoutStyles],t)}];v&&S.push((function(){if(y)return o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),M],t);M()})),S.push(k.layoutStyles),v&&S.push((function(){return p.draw(t,f?"":"redraw")}),(function(t){var e=t._fullLayout._insideTickLabelsUpdaterange;if(e)return t._fullLayout._insideTickLabelsUpdaterange=void 0,q(t,e).then((function(){p.saveRangeInitial(t,!0)}))})),S.push(k.drawData,k.finalDraw,m,h.addLinks,h.rehover,h.redrag,h.reselect,h.doAutoMargin,h.previousPromises);var L=o.syncOrAsync(S,t);return L&&L.then||(L=Promise.resolve()),L.then((function(){return E(t),t}))},e.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return h.cleanPlot([],{},r,e),h.purge(t),l.purge(t),e._container&&e._container.remove(),delete t._context,t},e.react=function(t,r,n,i){var a,l;t=o.getGraphDiv(t),T.clearPromiseQueue(t);var u=t._fullData,p=t._fullLayout;if(o.isPlotDiv(t)&&u&&p){if(o.isPlainObject(r)){var d=r;r=d.data,n=d.layout,i=d.config,a=d.frames}var v=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,O(t,i),v=st(g,t._context)}t.data=r||[],T.cleanData(t.data),t.layout=n||{},T.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,u,c,f,h,p,d,v,g=n._preGUI,y=[],m={},x={};for(i in g){if(c=et(i,Q)){if(d=c.head,v=c.tail,a=c.attr||d+".uirevision",(u=(l=s(n,a).get())&&rt(a,e))&&u===l){if(null===(f=g[i])&&(f=void 0),at(p=(h=s(e,i)).get(),f)){void 0===p&&"autorange"===v&&y.push(d),h.set(B(s(n,i).get()));continue}if("autorange"===v||"range["===v.substr(0,6)){var b=g[d+".range[0]"],_=g[d+".range[1]"],w=g[d+".autorange"];if(w||null===w&&null===b&&null===_){if(!(d in m)){var T=s(e,d).get();m[d]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(m[d]){h.set(B(s(n,i).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+i);delete g[i],c&&"range["===c.tail.substr(0,6)&&(x[c.head]=1)}for(var k=0;k<y.length;k++){var A=y[k];if(x[A]){var M=s(e,A).get();M&&delete M.autorange}}var S=n._tracePreGUI;for(var E in S){var L,C=S[E],O=null;for(i in C){if(!O){var P=nt(E,r);if(P<0){delete S[E];break}var I=it(E,t,(L=r[P]._fullInput).index);if(I<0){delete S[E];break}O=t[I]}if(c=et(i,tt)){if(c.attr?u=(l=s(n,c.attr).get())&&rt(c.attr,e):(l=L.uirevision,void 0===(u=O.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(f=C[i])&&(f=void 0),at(p=(h=s(O,i)).get(),f))){h.set(B(s(L,i).get()));continue}}else o.warn("unrecognized GUI edit: "+i+" in trace uid "+E);delete C[i]}}}(t.data,t.layout,u,p),h.supplyDefaults(t,{skipUpdateCalc:!0});var y=t._fullData,m=t._fullLayout,x=void 0===m.datarevision,b=m.transition,_=function(t,e,r,n,i){var a=A.layoutFlags();return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,ot(e,r,[],{getValObject:function(t){return f.getLayoutValObject(r,t)},flags:a,immutable:n,transition:i,gd:t}),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}(t,p,m,x,b),w=_.newDataRevision,M=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,u=A.traceFlags();u.arrays={},u.nChanges=0,u.nChangesAnim=0;var c={getValObject:function(t){var e=f.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e},flags:u,immutable:n,transition:i,newDataRevision:a,gd:t},p={};for(s=0;s<e.length;s++)if(r[s]){if(l=r[s]._fullInput,h.hasMakesDataTransform(l)&&(l=r[s]),p[l.uid])continue;p[l.uid]=1,ot(e[s]._fullInput,l,[],c)}return(u.calc||u.plot)&&(u.fullReplot=!0),i&&u.nChanges&&u.nChangesAnim&&(u.anim=u.nChanges===u.nChangesAnim&&o?"all":"some"),u}(t,u,y,x,b,w);if(K(t)&&(_.layoutReplot=!0),M.calc||_.calc){t.calcdata=void 0;for(var S=Object.getOwnPropertyNames(m),L=0;L<S.length;L++){var C=S[L],P=C.substring(0,5);if("xaxis"===P||"yaxis"===P){var I=m[C]._emptyCategories;I&&I()}}}else h.supplyDefaultsUpdateCalc(t.calcdata,y);var D=[];if(a&&(t._transitionData={},h.createTransitionData(t),D.push((function(){return e.addFrames(t,a)}))),m.transition&&!v&&(M.anim||_.anim))_.ticks&&D.push(k.doTicksRelayout),h.doCalcdata(t),k.doAutoRangeAndConstraints(t),D.push((function(){return h.transitionFromReact(t,M,_,p)}));else if(M.fullReplot||_.layoutReplot||v)t._fullLayout._skipDefaults=!0,D.push(e._doPlot);else{for(var z in _.arrays){var R=_.arrays[z];if(R.length){var F=c.getComponentMethod(z,"drawOne");if(F!==o.noop)for(var N=0;N<R.length;N++)F(t,R[N]);else{var j=c.getComponentMethod(z,"draw");if(j===o.noop)throw new Error("cannot draw components: "+z);j(t)}}}D.push(h.previousPromises),M.style&&D.push(k.doTraceStyle),(M.colorbars||_.colorbars)&&D.push(k.doColorBars),_.legend&&D.push(k.doLegend),_.layoutstyle&&D.push(k.layoutStyles),_.axrange&&G(D),_.ticks&&D.push(k.doTicksRelayout),_.modebar&&D.push(k.doModeBar),_.camera&&D.push(k.doCamera),D.push(E)}D.push(h.rehover,h.redrag,h.reselect),(l=o.syncOrAsync(D,t))&&l.then||(l=Promise.resolve(t))}else l=e.newPlot(t,r,n,i);return l.then((function(){return t.emit("plotly_react",{data:r,layout:n}),t}))},e.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return T.cleanData(t.data),T.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=q,e.restyle=F,e.setPlotConfig=function(t){return o.extendFlat(_,t)},e.update=J,e._guiRelayout=$(q),e._guiRestyle=$(F),e._guiUpdate=$(J),e._storeDirectGUIEdit=function(t,e,r){for(var n in r)j(n,s(t,n).get(),r[n],e)}},20556:function(t){"use strict";var e={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},73060:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(45464),o=r(64859),s=r(16672),l=r(85656),u=r(20556).configAttributes,c=r(67824),f=i.extendDeepAll,h=i.isPlainObject,p=i.isArrayOrTypedArray,d=i.nestedProperty,v=i.valObjectMeta,g="_isSubplotObj",y="_isLinkedToArray",m="_deprecated",x=[g,y,"_arrayAttrRegexps",m];function b(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!h(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!_(e[++r]))return!1}else if("info_array"===t.valType){var i=e[++r];if(!_(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)k(r,e,e.attr[i]);else k(r,e,"subplot"===e.attr?e.name:e.attr);for(t in n.componentsRegistry){var a=(e=n.componentsRegistry[t]).schema;if(a&&(a.subplots||a.layout)){var s=a.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l];delete r.xaxis.shift,delete r.xaxis.autoshift}else"colorscale"===e.name?f(r,e.layoutAttributes):e.layoutAttributes&&A(r,e.layoutAttributes,e.name)}return{layoutAttributes:T(r)}}function T(t){return function(t){e.crawl(t,(function(t,r,n){e.isValObject(t)?!0!==t.arrayOk&&"data_array"!==t.valType||(n[r+"src"]={valType:"string",editType:"none"}):h(t)&&(t.role="object")}))}(t),function(t){e.crawl(t,(function(t,e,r){if(t){var n=t[y];n&&(delete t[y],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}))}(t),function(t){!function t(e){for(var r in e)if(h(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function k(t,e,r){var n=d(t,r),i=f({},e.layoutAttributes);i[g]=!0,n.set(i)}function A(t,e,r){var n=d(t,r);n.set(f(n.get()||{},e))}e.IS_SUBPLOT_OBJ=g,e.IS_LINKED_TO_ARRAY=y,e.DEPRECATED=m,e.UNDERSCORE_ATTRS=x,e.get=function(){var t={};n.allTypes.forEach((function(r){t[r]=function(t){var r,i;i=(r=n.modules[t]._module).basePlotModule;var o={type:null},s=f({},a),l=f({},r.attributes);e.crawl(l,(function(t,e,r,n,i){d(s,i).set(void 0),void 0===t&&d(l,i).set(void 0)})),f(o,s),n.traceIs(t,"noOpacity")&&delete o.opacity,n.traceIs(t,"showLegend")||(delete o.showlegend,delete o.legendgroup),n.traceIs(t,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel),r.selectPoints||delete o.selectedpoints,f(o,l),i.attributes&&f(o,i.attributes),o.type=t;var u={meta:r.meta||{},categories:r.categories||{},animatable:Boolean(r.animatable),type:t,attributes:T(o)};if(r.layoutAttributes){var c={};f(c,r.layoutAttributes),u.layoutAttributes=T(c)}return r.animatable||e.crawl(u,(function(t){e.isValObject(t)&&"anim"in t&&delete t.anim})),u}(r)}));var r,i={};return Object.keys(n.transformsRegistry).forEach((function(t){i[t]=function(t){var e=n.transformsRegistry[t],r=f({},e.attributes);return Object.keys(n.componentsRegistry).forEach((function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach((function(e){A(r,i.schema.transforms[t][e],e)}))})),{attributes:T(r)}}(t)})),{defs:{valObjects:v,metaKeys:x.concat(["description","role","editType","impliedEdits"]),editType:{traces:c.traces,layout:c.layout},impliedEdits:{}},traces:t,layout:w(),transforms:i,frames:(r={frames:f({},s)},T(r),r.frames),animation:T(l),config:T(u)}},e.crawl=function(t,r,n,i){var a=n||0;i=i||"",Object.keys(t).forEach((function(n){var o=t[n];if(-1===x.indexOf(n)){var s=(i?i+".":"")+n;r(o,n,t,a,s),e.isValObject(o)||h(o)&&"impliedEdits"!==n&&e.crawl(o,r,a+1,s)}}))},e.isValObject=function(t){return t&&void 0!==t.valType},e.findArrayAttributes=function(t){var r,n,i=[],o=[],s=[];function l(t,e,n,i){o=o.slice(0,i).concat([e]),s=s.slice(0,i).concat([t&&t._isLinkedToArray]),t&&("data_array"===t.valType||!0===t.arrayOk)&&("colorbar"!==o[i-1]||"ticktext"!==e&&"tickvals"!==e)&&u(r,0,"")}function u(t,e,r){var a=t[o[e]],l=r+o[e];if(e===o.length-1)p(a)&&i.push(n+l);else if(s[e]){if(Array.isArray(a))for(var c=0;c<a.length;c++)h(a[c])&&u(a[c],e+1,l+"["+c+"].")}else h(a)&&u(a,e+1,l+".")}r=t,n="",e.crawl(a,l),t._module&&t._module.attributes&&e.crawl(t._module.attributes,l);var c=t.transforms;if(c)for(var f=0;f<c.length;f++){var d=c[f],v=d._module;v&&(n="transforms["+f+"].",r=d,e.crawl(v.attributes,l))}return i},e.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if("transforms"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!_(u)||u>=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else{var c=t._module;if(c||(c=(n.modules[t.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var u;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!u&&a.layoutAttributes&&(u=a.layoutAttributes)}var c=a.baseLayoutAttrOverrides;if(c&&e in c)return c[e]}if(u)return u}var f=t._modules;if(f)for(r=0;r<f.length;r++)if((s=f[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry){if("colorscale"===(a=n.componentsRegistry[i]).name&&0===e.indexOf("coloraxis"))return a.layoutAttributes[e];if(!a.schema&&e===a.name)return a.layoutAttributes}return e in o&&o[e]}(t,e[0]);return b(r,e,1)}},31780:function(t,e,r){"use strict";var n=r(3400),i=r(45464),a="templateitemname",o={name:{valType:"string",editType:"none"}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}o[a]={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},e.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,"type"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var u={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var c=o[l];if(c.name===n)return u[n]=1,e._template=c,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!u[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),u[n]=1}}return t}}},e.arrayDefaultKey=l,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=e+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function f(t,e){s?n.nestedProperty(l[u],t).set(e):l[u+"."+t]=e}function h(){var t=l;return c(),t}return c(),{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),u=r(76308),c=r(43616),f=r(81668),h=r(45460),p=r(54460),d=r(84284),v=r(71888),g=v.enforce,y=v.clean,m=r(19280).doAutoRange,x="start",b=r(33816).zindexSeparator;function _(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}function w(t){var r,i,s,l,f,v,g=t._fullLayout,y=g._size,m=y.p,x=p.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!g._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:y.t+y.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:y.l+y.w*(t.position||0)+n%1}for(r=0;r<x.length;r++){var k=(l=x[r])._anchorAxis;l._linepositions={},l._lw=c.crispRound(t,l.linewidth,1),l._mainLinePosition=w(l,k,l.side),l._mainMirrorPosition=l.mirror&&k?w(l,k,d.OPPOSITE_SIDE[l.side]):null}var M=[],S=[],E=[],L=1===u.opacity(g.paper_bgcolor)&&1===u.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(i in g._plots)if((s=g._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,O=s.yaxis.domain,P=s.plotgroup;if(_(C,O,E)&&-1===i.indexOf(b)){var I=P.node(),D=s.bg=o.ensureSingle(P,"rect","bg");I.insertBefore(D.node(),I.childNodes[0]),S.push(i)}else P.select("rect.bg").remove(),E.push([C,O]),L||(M.push(i),S.push(i))}var z,R,F,B,N,j,U,V,q,H,G,W,Y,X=g._bgLayer.selectAll(".bg").data(M);for(X.enter().append("rect").classed("bg",!0),X.exit().remove(),X.each((function(t){g._plots[t].bg=n.select(this)})),r=0;r<S.length;r++)s=g._plots[S[r]],f=s.xaxis,v=s.yaxis,s.bg&&void 0!==f._offset&&void 0!==v._offset&&s.bg.call(c.setRect,f._offset-m,v._offset-m,f._length+2*m,v._length+2*m).call(u.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(i in g._plots){s=g._plots[i],f=s.xaxis,v=s.yaxis;var Z,K,J=s.clipId="clip"+g._uid+i+"plot",$=o.ensureSingleById(g._clips,"clipPath",J,(function(t){t.classed("plotclip",!0).append("rect")}));s.clipRect=$.select("rect").attr({width:f._length,height:v._length}),c.setTranslate(s.plot,f._offset,v._offset),s._hasClipOnAxisFalse?(Z=null,K=J):(Z=J,K=null),c.setClipUrl(s.plot,Z,t),s.layerClipId=K}function Q(t){return"M"+z+","+t+"H"+R}function tt(t){return"M"+f._offset+","+t+"h"+f._length}function et(t){return"M"+t+","+V+"V"+U}function rt(t){return void 0!==v._shift&&(t+=v._shift),"M"+t+","+v._offset+"v"+v._length}function nt(t,e,r){if(!t.showline||i!==t._mainSubplot)return"";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in g._plots){s=g._plots[i],f=s.xaxis,v=s.yaxis;var it="M0,0";T(f,i)&&(N=A(f,"left",v,x),z=f._offset-(N?m+N:0),j=A(f,"right",v,x),R=f._offset+f._length+(j?m+j:0),F=w(f,v,"bottom"),B=w(f,v,"top"),!(Y=!f._anchorAxis||i!==f._mainSubplot)||"allticks"!==f.mirror&&"all"!==f.mirror||(f._linepositions[i]=[F,B]),it=nt(f,Q,tt),Y&&f.showline&&("all"===f.mirror||"allticks"===f.mirror)&&(it+=Q(F)+Q(B)),s.xlines.style("stroke-width",f._lw+"px").call(u.stroke,f.showline?f.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",it);var at="M0,0";T(v,i)&&(G=A(v,"bottom",f,x),U=v._offset+v._length+(G?m:0),W=A(v,"top",f,x),V=v._offset-(W?m:0),q=w(v,f,"left"),H=w(v,f,"right"),!(Y=!v._anchorAxis||i!==v._mainSubplot)||"allticks"!==v.mirror&&"all"!==v.mirror||(v._linepositions[i]=[q,H]),at=nt(v,et,rt),Y&&v.showline&&("all"===v.mirror||"allticks"===v.mirror)&&(at+=et(q)+et(H)),s.ylines.style("stroke-width",v._lw+"px").call(u.stroke,v.showline?v.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",at)}return p.makeClipPaths(t),a.previousPromises(t)}function T(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||"all"===t.mirror||"allticks"===t.mirror)}function k(t,e,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=d.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function A(t,e,r,n){if(k(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&k(t,e,a))return a._lw}return 0}function M(t){return"top"===t?d.CAP_SHIFT+.3+"em":"bottom"===t?"-0.3em":d.MID_SHIFT+"em"}e.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,w],t)},e.drawMainTitle=function(t){var e=t._fullLayout.title,r=t._fullLayout,i=function(t){var e=t.title,r="middle";return o.isRightAnchor(e)?r="end":o.isLeftAnchor(e)&&(r=x),r}(r),l=function(t){var e=t.title,r="0em";return o.isTopAnchor(e)?r=d.CAP_SHIFT+"em":o.isMiddleAnchor(e)&&(r=d.MID_SHIFT+"em"),r}(r),u=function(t,e){var r=t.title,n=t._size,i=0;return"0em"!==e&&e?e===d.CAP_SHIFT+"em"&&(i=r.pad.t):i=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.h*r.y+i:t.height-t.height*r.y+i}(r,l),h=function(t,e){var r=t.title,n=t._size,i=0;return e===x?i=r.pad.l:"end"===e&&(i=-r.pad.r),"paper"===r.xref?n.l+n.w*r.x+i:t.width*r.x+i}(r,i);if(f.draw(t,"gtitle",{propContainer:r,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:h,y:u,"text-anchor":i,dy:l}}),e.text&&e.automargin){var p=n.selectAll(".gtitle"),v=c.bBox(n.selectAll(".g-gtitle").node()).height,g=function(t,e,r){var n=e.y,i=e.yanchor,a=n>.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(g>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",u={x:s.x,y:s.y,t:0,b:0},c={};"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)&&l<i}(t,s,l,e,n)?u[l]=r:"container"===s.yref&&(c[l]=r,t._fullLayout._reservedMargin[i]=c),a.allowAutoMargin(t,i),a.autoMargin(t,i,u)}(t,u,g,v),p.attr({x:h,y:u,"text-anchor":i,dy:M(e.yanchor)}).call(s.positionText,h,u);var y=(e.text.match(s.BR_TAG_ALL)||[]).length;if(y){var m=d.LINE_SPACING*y+d.MID_SHIFT;0===e.y&&(m=-m),p.selectAll(".line").each((function(){var t=+this.getAttribute("dy").slice(0,-2)-m+"em";this.setAttribute("dy",t)}))}var b=n.selectAll(".gtitle-subtitle");if(b.node()){var _=p.node().getBBox(),w=_.y+_.height+f.SUBTITLE_PADDING_EM*e.subtitle.font.size;b.attr({x:h,y:w,"text-anchor":i,dy:M(e.yanchor)}).call(s.positionText,h,w)}}}},e.doTraceStyle=function(t){var r,n=t.calcdata,o=[];for(r=0;r<n.length;r++){var s=n[r],u=s[0]||{},c=u.trace||{},f=c._module||{},h=f.arraysToCalcdata;h&&h(s,c);var p=f.editStyle;p&&o.push({fn:p,cd0:u})}if(o.length){for(r=0;r<o.length;r++){var d=o[r];d.fn(t,d.cd0)}l(t),e.redrawReglTraces(t)}return a.style(t),i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doColorBars=function(t){return i.getComponentMethod("colorbar","draw")(t),a.previousPromises(t)},e.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call("_doPlot",t,"",e)},e.doLegend=function(t){return i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doTicksRelayout=function(t){return p.draw(t,"redraw"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),l(t),e.redrawReglTraces(t)),e.drawMainTitle(t),a.previousPromises(t)},e.doModeBar=function(t){var e=t._fullLayout;h.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},e.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setViewport(i)}},e.drawData=function(t){var r=t._fullLayout;l(t);for(var n=r._basePlotModules,o=0;o<n.length;o++)n[o].plot(t);return e.redrawReglTraces(t),a.style(t),i.getComponentMethod("selections","draw")(t),i.getComponentMethod("shapes","draw")(t),i.getComponentMethod("annotations","draw")(t),i.getComponentMethod("images","draw")(t),r._replotting=!1,a.previousPromises(t)},e.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has("regl")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&0!==l._length&&("splom"===l.type?e._splomScenes[l.uid].draw():"scattergl"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},e.doAutoRangeAndConstraints=function(t){for(var e,r=p.list(t,"",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e._id]=1,y(t,e),m(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=p.getFromId(t,o);m(t,s,e.range),n[o]=1}}g(t)},e.finalDraw=function(t){i.getComponentMethod("rangeslider","draw")(t),i.getComponentMethod("rangeselector","draw")(t)},e.drawMarginPushers=function(t){i.getComponentMethod("legend","draw")(t),i.getComponentMethod("rangeselector","draw")(t),i.getComponentMethod("sliders","draw")(t),i.getComponentMethod("updatemenus","draw")(t),i.getComponentMethod("colorbar","draw")(t)}},94828:function(t,e,r){"use strict";var n=r(3400),i=n.isPlainObject,a=r(73060),o=r(7316),s=r(45464),l=r(31780),u=r(20556).dfltConfig;function c(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))c(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],u=o.newItem(s)._template;u&&c(u,s)}var f=o.defaultItems();for(a=0;a<f.length;a++)r.push(f[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var u=o[r],h=t[u];if(u in e?s(h,e[u],u):e[u]=h,f(u)===u)for(var p in e){var d=f(p);p===d||d!==u||p in t||s(h,e[p],u)}}}function f(t){return t.replace(/[0-9]+$/,"")}function h(t,e,r,a,o){var s=o&&r(o);for(var u in t){var c=t[u],p=v(t,u,a),d=v(t,u,o),g=r(d);if(!g){var y=f(u);y!==u&&(g=r(d=v(t,y,o)))}if(!(s&&s===g||!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(c)))if(!g.valType&&i(c))h(c,e,r,p,d);else if(g._isLinkedToArray&&Array.isArray(c))for(var m=!1,x=0,b={},_=0;_<c.length;_++){var w=c[_];if(i(w)){var T=w.name;if(T)b[T]||(h(w,e,r,v(c,x,p),v(c,x,d)),x++,b[T]=1);else if(!m){var k=v(t,l.arrayDefaultKey(u),a),A=v(c,x,p);h(w,e,r,A,v(c,x,d));var M=n.nestedProperty(e,A);n.nestedProperty(e,k).set(M.get()),M.set(null),m=!0}}}else n.nestedProperty(e,p).set(c)}}function p(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}function d(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}function v(t,e,r){return r?Array.isArray(t)?r+"["+e+"]":r+"."+e:e}function g(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function y(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":e=t.path?"There are no templates for item "+t.path+" with name "+t.templateitemname:"There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":e=t.path?"The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?"Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":"The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type."}return t.msg=e,t}e.makeTemplate=function(t){t=n.isPlainObject(t)?t:n.getGraphDiv(t),t=n.extendDeep({_context:u},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach((function(t){var e={};h(t,e,d.bind(null,t));var r=n.coerce(t,{},s,"type"),i=a.data[r];i||(i=a.data[r]=[]),i.push(e)})),h(r,a.layout,p.bind(null,r)),delete a.layout.template;var l=r.template;if(i(l)){var f,v,g,y,m,x,b=l.layout;i(b)&&c(b,a.layout);var _=l.data;if(i(_)){for(v in a.data)if(g=_[v],Array.isArray(g)){for(x=(m=a.data[v]).length,y=g.length,f=0;f<x;f++)c(g[f%y],m[f]);for(f=x;f<y;f++)m.push(n.extendDeep({},g[f]))}for(v in _)v in a.data||(a.data[v]=n.extendDeep([],_[v]))}}return a},e.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:u,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,c=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,p=r._fullData,d={};if(i(s)?(function t(e,r){for(var n in e)if("_"!==n.charAt(0)&&i(e[n])){var a,o=f(n),s=[];for(a=0;a<r.length;a++)s.push(v(e,n,r[a])),o!==n&&s.push(v(e,o,r[a]));for(a=0;a<s.length;a++)d[s[a]]=1;t(e[n],s)}}(h,["layout"]),function t(e,r){for(var n in e)if(-1===n.indexOf("defaults")&&i(e[n])){var a=v(e,n,r);d[a]?t(e[n],a):c.push({code:"unused",path:a})}}(s,"layout")):c.push({code:"layout"}),i(l)){for(var m,x={},b=0;b<p.length;b++){var _=p[b];x[m=_.type]=(x[m]||0)+1,_._fullInput._template||c.push({code:"missing",index:_._fullInput.index,traceType:m})}for(m in l){var w=l[m].length,T=x[m]||0;w>T?c.push({code:"unused",traceType:m,templateCount:w,dataCount:T}):T>w&&c.push({code:"reused",traceType:m,templateCount:w,dataCount:T})}}else c.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&&c.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&g(a)&&t(a,o)}}({data:p,layout:h},""),c.length)return c.map(y)}},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),u=r(63268),c=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 g={};function y(t,r){return o.coerce(e,g,f,t,r)}var m=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,m,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if("full-json"===m){var p=a.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=c,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),"svg"===m)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),u({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(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?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,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var g=f[h];if("transforms"!==g){var y=o.slice();y.push(g);var m=t[g],x=e[g],b=v(r,g),_=(b||{}).valType,w="info_array"===_,T="colorscale"===_,k=(b||{}).items;if(d(r,g))if(s(m)&&s(x)&&"any"!==_)c(m,x,b,i,a,y);else if(w&&l(m)){m.length>x.length&&i.push(p("unused",a,y.concat(x.length)));var A,M,S,E,L,C=x.length,O=Array.isArray(k);if(O&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;M<C;M++)if(l(m[M])){m[M].length>x[M].length&&i.push(p("unused",a,y.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(O?Math.min(P,k[M].length):P);A++)S=O?k[M][A]:k,E=m[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(p("dynamic",a,y.concat(M,A),E,L)):i.push(p("value",a,y.concat(M,A),E))}else i.push(p("array",a,y.concat(M),m[M]));else for(M=0;M<C;M++)S=O?k[M]:k,E=m[M],L=x[M],n.validate(E,S)?L!==E&&L!==+E&&i.push(p("dynamic",a,y.concat(M),E,L)):i.push(p("value",a,y.concat(M),E))}else if(b.items&&!w&&l(m)){var I,D,z=k[Object.keys(k)[0]],R=[];for(I=0;I<x.length;I++){var F=x[I]._index||I;if((D=y.slice()).push(F),s(m[F])&&s(x[I])){R.push(F);var B=m[F],N=x[I];s(B)&&!1!==B.visible&&!1===N.visible?i.push(p("invisible",a,D)):c(B,N,z,i,a,D)}}for(I=0;I<m.length;I++)(D=y.slice()).push(I),s(m[I])?-1===R.indexOf(I)&&i.push(p("unused",a,D)):i.push(p("object",a,D,m[I]))}else!s(m)&&s(x)?i.push(p("object",a,y,m)):u(m)||!u(x)||w||T?g in e?n.validate(m,b)?"enumerated"===b.valType&&(b.coerceNumber&&m!==+x||m!==x)&&i.push(p("dynamic",a,y,m,x)):i.push(p("value",a,y,m)):i.push(p("unused",a,y,m)):i.push(p("array",a,y,m));else i.push(p("schema",a,y))}}return i}t.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,u,f=a.get(),h=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],h.push(p("array","data"))),s(e)?(d.layout=n.extendDeep({},e),u=e):(d.layout={},u={},arguments.length>1&&h.push(p("object","layout"))),i.supplyDefaults(d);for(var v=d._fullData,g=r.length,y=0;y<g;y++){var m=r[y],x=["data",y];if(s(m)){var b=v[y],_=b.type,w=f.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==m.visible&&h.push(p("invisible",x)),c(m,b,w,h,x);var T=m.transforms,k=b.transforms;if(T){l(T)||h.push(p("array",x,["transforms"])),x.push("transforms");for(var A=0;A<T.length;A++){var M=["transforms",A],S=T[A].type;if(s(T[A])){var E=f.transforms[S]?f.transforms[S].attributes:{};E.type={valType:"enumerated",values:Object.keys(f.transforms)},c(T[A],k[A],E,h,x,M)}else h.push(p("object",x,M))}}}else h.push(p("object",x))}var L=d._fullLayout,C=function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(f,v);return c(u,L,C,h,"layout"),0===h.length?void 0:h};var f={object:function(t,e){return("layout"===t&&""===e?"The layout argument":"data"===t[0]&&""===e?"Trace "+t[1]+" in the data argument":h(t)+"key "+e)+" must be linked to an object container"},array:function(t,e){return("data"===t?"The data argument":h(t)+"key "+e)+" must be linked to an array container"},schema:function(t,e){return h(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var n=s(r)?"container":"key";return h(t)+n+" "+e+" did not get coerced"},dynamic:function(t,e,r,n){return[h(t)+"key",e,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?h(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[h(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function h(t){return l(t)?"In data trace "+t[1]+", ":"In "+t+", "}function p(t,e,r,i,a){var o,s;r=r||"",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var u=function(t){if(!l(t))return String(t);for(var e="",r=0;r<t.length;r++){var n=t[r];"number"==typeof n?e=e.substr(0,e.length-1)+"["+n+"]":e+=n,r<t.length-1&&(e+=".")}return e}(r),c=f[t](e,u,i,a);return n.log(c),{code:t,container:o,trace:s,path:r,astr:u,msg:c}}function d(t,e){var r=y(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function v(t,e){return e in t?t[e]:t[y(e).keyMinusId]}var g=n.counterRegex("([a-z]+)");function y(t){var e=t.match(g);return{keyMinusId:e&&e[1],id:e&&e[2]}}},85656:function(t){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},51272:function(t,e,r){"use strict";var n=r(3400),i=r(31780);t.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||"visible",u=e[s],c=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a<c.length;a++){var p=c[a];n.isPlainObject(p)?o=h.newItem(p):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(p,o,e,r),f.push(o)}var d=h.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=f.length,r.handleItemDefaults({},o,e,r,{}),f.push(o);if(n.isArrayOrTypedArray(u)){var v=Math.min(u.length,f.length);for(a=0;a<v;a++)n.relinkPrivateKeys(f[a],u[a])}return f}},45464:function(t,e,r){"use strict";var n=r(25376),i=r(55756);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},1220:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=i.dateTime2ms,o=i.incrementMonth,s=r(39032).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var u,c=t[r+"period"];if(n(c)){if((c=+c)<=0)return{vals:i}}else if("string"==typeof c&&"M"===c.charAt(0)){var f=+c.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:i};u=f}for(var h=e.calendar,p="start"===l,d="end"===l,v=t[r+"period0"],g=a(v,h)||0,y=[],m=[],x=[],b=i.length,_=0;_<b;_++){var w,T,k,A=i[_];if(u){for(w=Math.round((A-g)/(u*s)),k=o(g,u*w,h);k>A;)k=o(k,-u,h);for(;k<=A;)k=o(k,u,h);T=o(k,-u,h)}else{for(k=g+(w=Math.round((A-g)/c))*c;k>A;)k-=c;for(;k<=A;)k+=c;T=k-c}y[_]=p?T:d?k:(T+k)/2,m[_]=T,x[_]=k}return{vals:y,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),u=r(79811),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),u=g(t,e),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=c[0].val,v=f[0].val;for(r=1;r<c.length&&h===v;r++)h=Math.min(h,c[r].val);for(r=1;r<f.length&&h===v;r++)v=Math.max(v,f[r].val);var y=e.autorange,m="reversed"===y||"min reversed"===y||"max reversed"===y;if(!m&&e.range){var x=a.simpleMap(e.range,e.r2l);m=x[1]<x[0]}"reversed"===e.autorange&&(e.autorange=!0);var b,_,w,T,A,M,S=e.rangemode,E="tozero"===S,L="nonnegative"===S,C=e._length,O=C/10,P=0;for(r=0;r<c.length;r++)for(b=c[r],n=0;n<f.length;n++)(M=(_=f[n]).val-b.val-p(e,b.val,_.val))>0&&((A=C-s(b)-l(_))>O?M/A>P&&(w=b,T=_,P=M/A):M/C>P&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},P=M/C));if(h===v){var I=h-1,D=h+1;if(E)if(0===h)i=[0,1];else{var z=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),R=h/(1-Math.min(.5,z/C));i=h>0?[0,R]:[R,0]}else i=L?[Math.max(0,I),Math.max(1,D)]:[I,D]}else E?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):L&&(w.val-P*s(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-w.val-p(e,b.val,_.val))/(C-s(w)-l(T)),i=[w.val-P*s(w),T.val+P*l(T)];return i=k(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;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function d(t,e,r){var i=.05*e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var s=e.isReversed();if(!s){var u=a.simpleMap(e.range,e.r2l);s=u[1]<u[0]}s&&(r=!r)}var c=0;return f(t,e._id)||(c=function(t,e,r){var i=0,o="x"===e._id.charAt(0);for(var s in t._plots){var u=t._plots[s];if(e._id===u.xaxis._id||e._id===u.yaxis._id){var c=(o?u.yaxis:u.xaxis)||{};if(-1!==(c.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===c.side||"bottom"===c.side)||r&&("top"===c.side||"right"===c.side))){if(c._vals){var f=a.deg2rad(c._tickAngles[c._id+"tick"]||0),h=Math.abs(Math.cos(f)),p=Math.abs(Math.sin(f));if(!c._vals[0].bb){var d=c._id+"tick";c._selections[d].each((function(t){var e=n.select(this);e.select(".text-math-group").empty()&&(t.bb=l.bBox(e.node()))}))}for(var g=0;g<c._vals.length;g++){var y=c._vals[g].bb;if(y){var m=2*v+y.width,x=2*v+y.height;i=Math.max(i,o?Math.max(m*h,x*p):Math.max(x*h,m*p))}}}"inside"===c.ticks&&"inside"===c.ticklabelposition&&(i+=c.ticklen||0)}}}return i}(t,e,r)),i=Math.max(c,i),"domain"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:c)}}t.exports={applyAutorangeOptions:k,getAutoRange:h,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():h(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,s.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=h(t,e)),o._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var n,a,s,l,u,c,f,h,p,d=[],v=[],g=e.length,x=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,T=!1,k=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return T=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var M=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n<g;n++)(a=e[n])<h&&a>0&&(h=a),a>p&&a<o&&(p=a);else for(n=0;n<g;n++)(a=e[n])<h&&a>-o&&(h=a),a>p&&a<o&&(p=a);e=[h,p],g=2}var C={tozero:_,extrapad:x};function O(r){s=e[r],i(s)&&(c=M(r),f=S(r),k?(l=t.c2l(s)-L(r),u=t.c2l(s)+E(r)):(h=s-L(r),p=s+E(r),w&&h<p/10&&(h=p/10),l=t.c2l(h),u=t.c2l(p)),_&&(l=Math.min(0,l),u=Math.max(0,u)),b(l)&&y(d,l,f,C),b(u)&&m(v,u,c,C))}var P=Math.min(6,g);for(n=0;n<P;n++)O(n);for(n=g-1;n>=P;n--)O(n);return{min:d,max:v,opts:r}},concatExtremes:g};var v=3;function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,u=[],f=[];function h(t,e){for(n=0;n<e.length;n++){var r=t[e[n]],s=(r._extremes||{})[o];if(!0===r.visible&&s){for(i=0;i<s.min.length;i++)a=s.min[i],y(u,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],m(f,a.val,a.pad,{extrapad:a.extrapad})}}}if(h(s,e._traceIndices),h(l.annotations||[],e._annIndices||[]),h(l.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r)for(var p in e._matchGroup)if(p!==e._id){var d=c(t,p),v=g(t,d,!0),x=e._length/d._length;for(i=0;i<v.min.length;i++)a=v.min[i],y(u,a.val,a.pad*x,{extrapad:a.extrapad});for(i=0;i<v.max.length;i++)a=v.max[i],m(f,a.val,a.pad*x,{extrapad:a.extrapad})}return{min:u,max:f}}function y(t,e,r,n){x(t,e,r,n,_)}function m(t,e,r,n){x(t,e,r,n,w)}function x(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function b(t){return i(t)&&Math.abs(t)<o}function _(t,e){return t<=e}function w(t,e){return t>=e}function T(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<t.d2l(r)}function k(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],n=t[1],i=e.autorangeoptions.include;if(void 0!==i){var o=e.d2l(r),s=e.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var u=e.d2l(i[l]);o>=u&&(o=u,r=u),s<=u&&(s=u,n=u)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&T(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(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&&T(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(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,u=r(72736),c=r(81668),f=r(76308),h=r(43616),p=r(94724),d=r(98728),v=r(39032),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,k=v.ONEMINMONTH,A=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,L=v.ONEMIN,C=v.ONESEC,O=v.ONEMILLI,P=v.ONEMICROSEC,I=v.MINUS_SIGN,D=v.BADNUM,z={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,q=U.CAP_SHIFT,H=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"],u=n+"ref",c={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,c,u)},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 u=W.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.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),u={},c=0;c<e.length;c++)for(var f=r[W.id2name(e[c])][a],h=0;h<f.length;h++){var p=f[h];if(!u[p]&&(l(t,p),u[p]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var tt=W.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(s.isArrayOrTypedArray(a)){if(i={type:Y(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},W.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=W.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===a?{d2c:rt,c2d:rt}:{d2c:et,c2d:et}};function et(t){return+t}function rt(t){return String(t)}function nt(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function it(t,e){return Math.abs(t/e-1)<.001}function at(t){return+t.substring(1)}function ot(t,e){return t.rangebreaks&&(e=e.filter((function(e){return t.maskBreaks(e.x)!==D}))),e}function st(t){var e=t._mainAxis,r=[];if(e._vals)for(var n=0;n<e._vals.length;n++)if(!e._vals[n].noTick){var i=e.l2p(e._vals[n].x),a=t.p2l(i),o=W.tickText(t,a);e._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return ot(t,r)}function lt(t,e){var r=Q(s.simpleMap(t.range,t.r2l)),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if((void 0===e||!(e&&l||!1===e&&!l))&&(!l||t.minor)){var u=l?t.minor.tickvals:t.tickvals,c=l?[]:t.ticktext;if(u){s.isArrayOrTypedArray(c)||(c=[]);for(var f=0;f<u.length;f++){var h=a(u[f]);if(h>n&&h<i){var p=W.tickText(t,h,!1,String(c[f]));l&&(p.minor=!0,p.text=""),o.push(p)}}}}return ot(t,o)}W.getDataToCoordFunc=function(t,e,r,n){return tt(t,e,r,n).d2c},W.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},W.minDtick=function(t,e,r,n){-1===["log","category","multicategory"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},W.saveRangeInitial=function(t,e){for(var r=W.list(t,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial0&&void 0===a._rangeInitial1,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&!0!==l||e&&s)&&(a._rangeInitial0="min"===l||"max reversed"===l?void 0:a.range[0],a._rangeInitial1="max"===l||"min reversed"===l?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n},W.saveShowSpikeInitial=function(t,e){for(var r=W.list(t,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==i||o.showspikes||(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,n},W.autoBin=function(t,e,r,n,a,o){var l,u=s.aggNums(Math.min,null,t),c=s.aggNums(Math.max,null,t);if("category"===e.type||"multicategory"===e.type)return{start:u-.5,end:c+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:c-u};if(a||(a=e.calendar),l="log"===e.type?{type:"linear",range:[u,c]}:{type:e.type,range:s.simpleMap([u,c],e.c2r,0,a),calendar:a},W.setConvert(l),o=o&&d.dtick(o,l.type))l.dtick=o,l.tick0=d.tick0(void 0,l.type,a);else{var f;if(r)f=(c-u)/r;else{var h=s.distinctVals(t),p=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),v=p*s.roundUp(h.minDiff/p,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}W.autoTicks(l,f)}var g,y=l.dtick,m=W.tickIncrement(W.tickFirst(l),y,"reverse",a);if("number"==typeof y)m=function(t,e,r,n,a){var o=0,s=0,l=0,u=0;function c(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||u++,c(e[f])&&o++,c(e[f]+r.dtick/2)&&s++;var h=e.length-u;if(l===h&&"date"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||c(n)||c(a))){var p=r.dtick/2;t+=t+p<n?p:-p}return t}(m,t,l,u,c),g=m+(1+Math.floor((c-m)/y))*y;else for("M"===l.dtick.charAt(0)&&(m=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=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,y,u,a)),g=m;g<=c;)g=W.tickIncrement(g,y,!1,a);return{start:e.c2r(m,0,a),end:e.c2r(g,0,a),size:y,_dataSpan:c-u}},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 u=i(e.dtick),c=i(t.dtick),f=u?e.dtick:+e.dtick.substring(1),h=c?t.dtick:+t.dtick.substring(1);u&&c?nt(f,h)?f===2*A&&h===2*M&&(t.dtick=A):f===2*A&&h===3*M?t.dtick=A:f!==A||(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)?c?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.dtick<E&&(t.dtick=E)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=M,o&&!n&&t.dtick<M&&(t.dtick=M)):/%[UVW]/.test(a)?(e=A,o&&!n&&t.dtick<A&&(t.dtick=A)):/%[Bbm]/.test(a)?(e=T,o&&(n?at(t.dtick)<1:t.dtick<k)&&(t.dtick="M1")):/%[q]/.test(a)?(e=b,o&&(n?at(t.dtick)<3:t.dtick<_)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=y,o&&(n?at(t.dtick)<12:t.dtick<m)&&(t.dtick="M12")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),yt(t)},W.calcTicks=function(t,e){for(var r,n,a,o,l=t.type,u=t.calendar,c=t.ticklabelstep,f="period"===t.ticklabelmode,h=t.range[0]>t.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]<d[0],I=Math.min(d[0],d[1]),z=Math.max(d[0],d[1]),R=Math.max(1e3,t._length||0),F=[],B=[],N=[],j=[],U=[],V=t.minor&&(t.minor.ticks||t.minor.showgrid),q=1;q>=(V?0:1);q--){var H=!q;q?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var G=q?t:s.extendFlat({},t,t.minor);if(H?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(q){if(t._tmin=$,$<X!==v)break;"category"!==l&&"multicategory"!==l||(Z=v?Math.max(-.5,Z):Math.min(t._categories.length-.5,Z))}var tt,et,rt=null,nt=$;q&&(K?et=t.dtick:"date"===l?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(et=T*t.dtick.substring(1)):et=t._roughDTick,tt=Math.round((t.r2l(nt)-t.r2l(t.tick0))/et)-1);var it=G.dtick;for(G.rangebreaks&&G._tick0Init!==G.tick0&&(nt=Ft(nt,t),v||(nt=W.tickIncrement(nt,it,!v,u))),q&&f&&(nt=W.tickIncrement(nt,it,!v,u),tt--);v?nt>=Z:nt<=Z;nt=W.tickIncrement(nt,it,v,u)){if(q&&tt++,G.rangebreaks&&!v){if(nt<X)continue;if(G.maskBreaks(nt)===D&&Ft(nt,G)>=z)break}if(N.length>R||nt===rt)break;rt=nt;var at={value:nt};q?(J&&nt!==(0|nt)&&(at.simpleLabel=!0),c>1&&tt%c&&(at.skipLabel=!0),N.push(at)):(at.minor=!0,j.push(at))}}else N=[],F=st(t);else q?(N=[],F=lt(t,!H)):(j=[],B=lt(t,!H))}!j||j.length<2?p=!1:(r=(j[1].value-j[0].value)*(h?-1:1),n=t.tickformat,(/%f/.test(n)?r>=P:/%L/.test(n)?r>=O:/%[SX]/.test(n)?r>=C:/%M/.test(n)?r>=L:/%[HI]/.test(n)?r>=E:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=M:/%[UVW]/.test(n)?r>=A:/%[Bbm]/.test(n)?r>=k:/%[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&&r<ot.length&&s.pushUnique(U,ot[r])}))}))}else U=N;if(V&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var ut=N.map((function(t){return t.value})),ct=[],ft=0;ft<j.length;ft++){var ht=j[ft],pt=ht.value;if(-1===ut.indexOf(pt)){for(var dt=!1,vt=0;!dt&&vt<N.length;vt++)1e7+N[vt].value===1e7+pt&&(dt=!0);dt||ct.push(ht)}}j=ct}if(f&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),f=r||c,h=0;f>=m?h=c>=m&&c<=g?c:y:r===b&&f>=_?h=c>=_&&c<=x?c:b:f>=k?h=c>=k&&c<=w?c:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=c&&(h=c,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,v=0;v<84;v++){var L=(v+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==D&&d++}(h*=d/84)||(t[n].drop=!0),s&&c>A&&(h=c)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(U,t,t._definedDelta),t.rangebreaks){var gt="y"===t._id.charAt(0),yt=1;"auto"===t.tickmode&&(yt=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);(gt?mt>xt-yt:mt<xt+yt)?N.splice(v?a+1:a,1):mt=xt}}Rt(t)&&360===Math.abs(d[1]-d[0])&&N.pop(),t._tmax=(N[N.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var bt,_t=function(e){e.text="",t._prevDateHead=o};function wt(t,e){var r=W.tickText(t,e.value,!1,e.simpleLabel),n=e.periodX;return void 0!==n&&(r.periodX=n,(n>z||n<I)&&(n>z&&(r.periodX=z),n<I&&(r.periodX=I),_t(r))),r}for(N=N.concat(j),a=0;a<N.length;a++){var Tt=N[a].minor,kt=N[a].value;Tt?((bt=p&&-1!==U.indexOf(N[a])?wt(t,N[a]):{x:kt}).minor=!0,B.push(bt)):(o=t._prevDateHead,bt=wt(t,N[a]),(N[a].skipLabel||p&&-1===U.indexOf(N[a]))&&_t(bt),F.push(bt))}return F=F.concat(B),t._inCalcTicks=!1,f&&F.length&&(F[0].noTick=!0),F};var ut=[2,5,10],ct=[1,2,3,6,12],ft=[1,2,5,10,15,30],ht=[1,2,3,7,14],pt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],dt=[-.301,0,.301,.699,1],vt=[15,30,45,90,180];function gt(t,e,r){return e*s.roundUp(t/e,r)}function yt(t){var e=t.dtick;if(t._tickexponent=0,i(e)||"string"==typeof e||(e=1),"category"!==t.type&&"multicategory"!==t.type||(t._tickround=null),"date"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,""),a=n.length;if("M"===String(e).charAt(0))a>10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=L&&a<=16||e>=E)t._tickround="M";else if(e>=C&&a<=19||e>=L)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===t.minexponent?3:t.minexponent;Math.abs(u)>c&&(bt(t.exponentformat)&&!_t(u)?t._tickexponent=3*Math.round((u-1)/3):t._tickexponent=u)}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>y)e/=y,n=a(10),t.dtick="M"+12*gt(e,n,ut);else if(o>T)e/=T,t.dtick="M"+gt(e,1,ct);else if(o>M){if(t.dtick=gt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ht),!r){var l=W.getTickFormat(t),u="period"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=gt(e,E,ct):o>L?t.dtick=gt(e,L,ft):o>C?t.dtick=gt(e,C,ft):(n=a(10),t.dtick=gt(e,n,ut))}else if("log"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),t.dtick="L"+gt(e,n,ut)}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=gt(e,n,vt)):(t.tick0=0,n=a(10),t.dtick=gt(e,n,ut));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),u=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,u,a);if("L"===l)return Math.log(Math.pow(10,t)+u)/Math.LN10;if("D"===l){var c="D2"===e?dt:pt,f=t+.01*o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},W.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,u=Q(a)[0],c=t.dtick,f=r(t.tick0);if(i(c)){var h=l((u-f)/c)*c+f;return"category"!==t.type&&"multicategory"!==t.type||(h=s.constrain(h,0,t._categories.length-1)),h}var p=c.charAt(0),d=Number(c.substr(1));if("M"===p){for(var v,g,y,m=0,x=f;m<10;){if(((v=W.tickIncrement(x,c,o,t.calendar))-u)*(x-u)<=0)return o?Math.min(x,v):Math.max(x,v);g=(u-(x+v)/2)/(v-x),y=p+(Math.abs(Math.round(g))||1)*d,x=W.tickIncrement(x,y,g<0?!o:o,t.calendar),m++}return s.error("tickFirst did not converge",t),x}if("L"===p)return Math.log(l((Math.pow(10,u)-f)/d)*d+f)/Math.LN10;if("D"===p){var b="D2"===c?dt:pt,_=s.roundUp(s.mod(u,1),b,o);return Math.floor(u)+Math.log(n.round(Math.pow(10,_),1))/Math.LN10}throw"unrecognized dtick "+String(c)},W.tickText=function(t,e,r,n){var a,o=mt(t,e),l="array"===t.tickmode,u=r||l,c=t.type,f="category"===c?t.d2l_noadd:t.d2l,h=function(e){var r=t.l2p(e);return r>=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<t.ticktext.length&&!(Math.abs(e-f(t.tickvals[a]))<d);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o.xbnd=[h(o.x-.5),h(o.x+t.dtick-.5)],o}function v(n){if(void 0===n)return!0;if(r)return"none"===n;var i={first:t._tmin,last:t._tmax}[n];return"all"!==n&&e!==i}var g=r?"never":"none"!==t.exponentformat&&v(t.showexponent)?"hide":"";if("date"===c?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||W.getTickFormat(t);(n=!o&&n)&&(a=i(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var l,u=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),c=u.indexOf("\n");if(-1!==c&&(l=u.substr(c+1),u=u.substr(0,c)),n&&(void 0===l||"00:00:00"!==u&&"00:00"!==u?8===u.length&&(u=u.replace(/:00$/,"")):(u=l,l="")),l)if(r)"d"===a?u+=", "+l:u=l+(u?", "+u:"");else if(t._inCalcTicks&&t._prevDateHead===l){var f=Bt(t),h=t._trueSide||t.side;(!f&&"top"===h||f&&"bottom"===h)&&(u+="<br> ")}else t._prevDateHead=l,u+="<br>"+l;e.text=u}(t,o,r,u):"log"===c?function(t,e,r,n,a){var o=t.dtick,l=e.x,u=t.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)e.text=wt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||bt(p)&&_t(f)?(e.text=0===f?1:1===f?"10":"10<sup>"+(f>1?"":I)+h+"</sup>",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":I)+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"!==c)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,u,g):"category"===c?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===c?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):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=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=I+e.text)}}}}(t,o,r,u,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=wt(e.x,t,i,n)}(t,o,0,u,g),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 y=t.labelalias[o.text];"string"==typeof y&&(o.text=y)}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":I+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",u=e._tickexponent,c=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]};yt(h),o=(Number(h._tickround)||0)+4,u=h._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,I);var p,d=Math.pow(10,-o)/2;if("none"===l&&(u=0),(t=Math.abs(t))<d)t="0",a=!1;else{if(t+=d,u&&(t*=Math.pow(10,-u),o+=u),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var v=o;v<0;v++)t+="0"}else{var g=(t=String(t)).indexOf(".")+1;g&&(t=t.substr(0,g+o).replace(/\.?0+$/,""))}t=s.numSeparate(t,e._separators,f)}return u&&"hide"!==l&&(bt(l)&&_t(u)&&(l="power"),p=u<0?I+-u:"power"!==l?"+"+u:String(u),"e"===l||"E"===l?t+=l+p:"power"===l?t+="×10<sup>"+p+"</sup>":"B"===l&&9===u?t+="B":bt(l)&&(t+=xt[u/3+5])),a?I+t:t}function Tt(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 kt(t,e){for(var r=[],n={},i=0;i<e.length;i++){var a=e[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(mt(t,s.interp(n[o],.5),o));return r}function At(t){return void 0!==t.periodX?t.periodX:t.x}function Mt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function St(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?e*(q+r*H):r?e*(r+1)*H:e}function Et(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Lt(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function Ct(t){return t._id+".automargin"}function Ot(t){return Ct(t)+".mirror"}function Pt(t){return t._id+".rangeslider"}function It(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Dt(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(W.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(W.getFromId(t,r[n]));var u=Object.keys(p),c=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(n=0;n<u.length;n++){var h=u[n],d=a[0][h],v=o[0][h],g=!0,y=!1,m=!1;if("_"!==h.charAt(0)&&"function"!=typeof d&&-1===c.indexOf(h)){for(i=1;i<a.length&&g;i++){var x=a[i][h];"type"===h&&-1!==f.indexOf(d)&&-1!==f.indexOf(x)&&d!==x?y=!0:x!==d&&(g=!1)}for(i=1;i<o.length&&g;i++){var b=o[i][h];"type"===h&&-1!==f.indexOf(v)&&-1!==f.indexOf(b)&&v!==b?m=!0:o[i][h]!==v&&(g=!1)}g&&(y&&(l[a[0]._name].type="linear"),m&&(l[o[0]._name].type="linear"),zt(l,h,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&s.swapAttrs(l.annotations[n],["?"])}}function zt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),u=o(t[n[0]._name],e).get();for("title"===e&&(l&&l.text===i.x&&(l.text=i.y),u&&u.text===i.y&&(u.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+"."+e).set(u);for(a=0;a<n.length;a++)o(t,n[a]._name+"."+e).set(l)}function Rt(t){return"angularaxis"===t._id}function Ft(t,e){for(var r=e._rangebreaks.length,n=0;n<r;n++){var i=e._rangebreaks[n];if(t>=i.min&&t<i.max)return i.max}return t}function Bt(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Nt(t,e){Bt(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function jt(t,e,r,n){var i,a="free"===t.anchor||void 0!==t.overlaying&&!1!==t.overlaying?t.overlaying:t._id;i=n?"right"===t.side?e:-e:e,a in r||(r[a]={}),t.side in r[a]||(r[a][t.side]=0),r[a][t.side]+=i}W.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return"string"!=typeof t?t:Number(t.replace("M",""))*T}function c(t,e){var r=["L","D"];if(typeof t==typeof e){if("number"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,""))-Number(e.replace(/(L|D)/g,"")):n-i}return"number"==typeof t?1:-1}function f(t,e){var r=null===e[0],n=null===e[1],i=c(t,e[0])>=0,a=c(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,a=n.dtickrange,o=void 0,s=void 0,l=void 0,o=u||function(t){return t},s=a[0],l=a[1],(!s&&"number"!=typeof s||o(s)<=o(i))&&(!l&&"number"!=typeof l||o(l)>=o(i)))){r=n;break}break;case"log":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&f(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},W.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?W.findSubplotsWithAxis(n,e):n;return i.sort((function(t,e){var r=t.substr(1).split("y"),n=e.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),i},W.findSubplotsWithAxis=function(t,e){for(var r=new RegExp("x"===e._id.charAt(0)?"^"+e._id+"y":e._id+"$"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},W.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:""},o={_offset:0,_length:e.height,_id:""},s=W.list(t,"x",!0),l=W.list(t,"y",!0),u=[];for(r=0;r<s.length;r++)for(u.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&u.push({x:a,y:l[i]}),u.push({x:s[r],y:l[i]});var c=e._clips.selectAll(".axesclip").data(u,(function(t){return t.x._id+t.y._id}));c.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(t){return"clip"+e._uid+t.x._id+t.y._id})).append("rect"),c.exit().remove(),c.each((function(t){n.select(this).select("rect").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})}))}},W.draw=function(t,e,r){var n=t._fullLayout;"redraw"===e&&n._paper.selectAll("g.subplot").each((function(t){var e=t[0],r=n._plots[e];if(r){var i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll("."+i._id+"tick").remove(),r.yaxislayer.selectAll("."+a._id+"tick").remove(),r.xaxislayer.selectAll("."+i._id+"tick2").remove(),r.yaxislayer.selectAll("."+a._id+"tick2").remove(),r.xaxislayer.selectAll("."+i._id+"divider").remove(),r.yaxislayer.selectAll("."+a._id+"divider").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll("path").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+i._id+"title").remove(),n._infolayer.select(".g-"+a._id+"title").remove()}}));var i=e&&"redraw"!==e?e:W.listIds(t),a=W.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=W.getFromId(t,e);if("sync"===r.tickmode&&r.overlaying){var n=i.findIndex((function(t){return t===r.overlaying}));n>=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,g=e._id,y=g.charAt(0),m=W.counterLetter(g),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[y+"axislayer"],w=e._mainLinePosition,T=w+=e._shift,k=e._mainMirrorPosition,A=e._vals=W.calcTicks(e),M=[e.mirror,T,k].join("_");for(n=0;n<A.length;n++)A[n].axInfo=M;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var S={};if(e.visible){var E,L,C=W.makeTransTickFn(e),O=W.makeTransTickLabelFn(e),P="inside"===e.ticks,I="outside"===e.ticks;if("boundaries"===e.tickson){var D=function(t,e){var r,n=[],i=function(t,e){var r=t.xbnd[e];null!==r&&n.push(s.extendFlat({},t,{x:r}))};if(e.length){for(r=0;r<e.length;r++)i(e[r],0);i(e[r-1],1)}return n}(0,A);L=W.clipEnds(e,D),E=P?L:D}else L=W.clipEnds(e,A),E=P&&"period"!==e.ticklabelmode?L:A;var z,R=e._gridVals=L,F=function(t,e){var r,n,i=[],a=e.length&&e[e.length-1].x<e[0].x,o=function(t,e){var r=t.xbnd[e];null!==r&&i.push(s.extendFlat({},t,{x:r}))};if(t.showdividers&&e.length){for(r=0;r<e.length;r++){var l=e[r];l.text2!==n&&o(l,a?1:0),n=l.text2}o(e[r-1],a?0:1)}return i}(e,A);if(!v._hasOnlyLargeSploms){var B=e._subplotsWith,N={};for(n=0;n<B.length;n++){i=B[n];var j=(l=v._plots[i])[m+"axis"],U=j._mainAxis._id;if(!N[U]){N[U]=1;var Y="x"===y?"M0,"+j._offset+"v"+j._length:"M"+j._offset+",0h"+j._length;W.drawGrid(t,e,{vals:R,counterAxis:j,layer:l.gridlayer.select("."+g),minorLayer:l.minorGridlayer.select("."+g),path:Y,transFn:C}),W.drawZeroLine(t,e,{counterAxis:j,layer:l.zerolinelayer,path:Y,transFn:C})}}}var X=W.getTickSigns(e),Z=W.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var K,J,$,Q,tt=W.makeTickPath(e,T,X[2]),et=W.makeTickPath(e,T,Z[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(K=W.makeTickPath(e,k,X[3]),J=W.makeTickPath(e,k,Z[3],{minor:!0}),$=tt+K,Q=et+J):(K="",J="",$=tt,Q=et),e.showdividers&&I&&"boundaries"===e.tickson){var rt={};for(n=0;n<F.length;n++)rt[F[n].x]=1;z=function(t){return rt[t.x]?K:$}}else z=function(t){return t.minor?Q:$}}if(W.drawTicks(t,e,{vals:E,layer:_,path:z,transFn:C}),"allticks"===e.mirror){var nt=Object.keys(e._linepositions||{});for(n=0;n<nt.length;n++){i=nt[n],l=v._plots[i];var it=e._linepositions[i]||[],at=it[0],ot=it[1],st=it[2],lt=W.makeTickPath(e,at,st?X[0]:Z[0],{minor:st})+W.makeTickPath(e,ot,st?X[1]:Z[1],{minor:st});W.drawTicks(t,e,{vals:E,layer:l[y+"axislayer"],path:lt,transFn:C})}}var ut=[];if(ut.push((function(){return W.drawLabels(t,e,{vals:A,layer:_,plotinfo:l,transFn:O,labelFns:W.makeLabelFns(e,T)})})),"multicategory"===e.type){var ct={x:2,y:10}[y];ut.push((function(){var r={x:"height",y:"width"}[y],n=ht()[r]+ct+(e._tickAngles[g+"tick"]?e.tickfont.size*H:0);return W.drawLabels(t,e,{vals:kt(e,A),layer:_,cls:g+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:C,labelFns:W.makeLabelFns(e,T+n*X[4])})})),ut.push((function(){return e._depth=X[4]*(ht("tick2")[e.side]-T),function(t,e,r){var n=e._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Mt);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(f.stroke,e.dividercolor).style("stroke-width",h.crispRound(t,e.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}(t,e,{vals:F,layer:_,path:W.makeTickPath(e,T,X[4],{len:e._depth}),transFn:C})}))}else e.title.hasOwnProperty("standoff")&&ut.push((function(){e._depth=X[4]*(ht()[e.side]-T)}));var ft=o.getComponentMethod("rangeslider","isVisible")(e);return r.skipTitle||ft&&"bottom"===e.side||ut.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size,s=(e.title.text.match(u.BR_TAG_ALL)||[]).length;if(e.title.hasOwnProperty("standoff"))"bottom"===e.side||"right"===e.side?r=e._depth+e.title.standoff+o*q:"top"!==e.side&&"left"!==e.side||(r=e._depth+e.title.standoff+o*(V+s*H));else{var l=Bt(e);if("multicategory"===e.type)r=e._depth;else{var f=1.5*o;l&&(f=.5*o,"outside"===e.ticks&&(f+=e.ticklen)),r=10+f+(e.linewidth?e.linewidth-1:0)}l||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var p,d,v,g,y=W.getPxPosition(t,e);if("x"===a?(d=e._offset+e._length/2,v="top"===e.side?y-r:y+r):(v=e._offset+e._length/2,d="right"===e.side?y+r:y-r,p={rotate:"-90",offset:0}),"multicategory"!==e.type){var m=e._selections[e._id+"tick"];if(g={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var x=h.getTranslate(m.node().parentNode);g.offsetLeft=x.x,g.offsetTop=x.y}e.title.hasOwnProperty("standoff")&&(g.pad=0)}return e._titleStandoff=r,c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:g,transform:p,attributes:{x:d,y:v,"text-anchor":"middle"}})}(t,e)})),ut.push((function(){var r,n,i,s,l=e.side.charAt(0),u=G[e.side].charAt(0),c=W.getPxPosition(t,e),f=I?e.ticklen:0;(e.automargin||ft||e._shiftPusher)&&("multicategory"===e.type?r=ht("tick2"):(r=ht(),"x"===y&&"b"===l&&(e._depth=Math.max(r.width>0?r.bottom-c:0,f))));var h=0,p=0;if(e._shiftPusher&&(h=Math.max(f,r.height>0?"l"===l?c-r.left:r.right-c:0),e.title.text!==v._dfltTitle[y]&&(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],g="number"==typeof e._shift?e._shift:0;if("x"===y){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?c-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?c-r.left:0,f),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=e._depth+g,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[y]&&(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})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=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&&(Tt(n,e.automargin),Tt(i,e.automargin)),a.autoMargin(t,Ct(e),n),a.autoMargin(t,Ot(e),i),a.autoMargin(t,Pt(e),s)})),s.syncOrAsync(ut)}}function ht(t){var r=g+(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=Lt(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,T)),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 u=t.side,c=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=h*q,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h*(1-q)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[l?c: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"),u=!s;if(r&&(r*=o?-1:1),n){var c=t.side;n*=s&&("top"===c||"left"===c)||u&&("bottom"===c||"right"===c)?1:-1}return"x"===t._id.charAt(0)?function(e){return l(i+t._offset+t.l2p(At(e))+r,a+n)}:function(e){return l(a+n,i+t._offset+t.l2p(At(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"),u=a("right"),c=a("bottom")||l||o||u,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,v=h?t.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(p+=v,r)){var g=s.deg2rad(r);p=v*Math.cos(g)+1,d=v*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var y,m,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if("x"===A)b=(_=!f&&"bottom"===k||f&&"top"===k)?1:-1,f&&(b*=-1),y=d*b,m=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=V:x=-90===M&&"bottom"===k?q:90===M&&"top"===k?V:.5,T=V/2*(M/90)),w.xFn=function(t){return t.dx+y+T*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*x},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===k||f&&"right"===k)?1:-1,f&&(b*=-1),y=p,m=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===k||90===M&&"right"===k?q:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*q*b,x=0}}w.xFn=function(t){return t.dx+e-(y+t.fontSize*x)*b+T*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 u="array"===e.tickmode,c=0;c<s.length;c++){var p=s[c].x;if(u?!p:Math.abs(p)<e.dtick/100){if(s=s.slice(0,c).concat(s.slice(c+1)),!u)break;c--}}e._gw=h.crispRound(t,e.gridwidth,1);for(var d=a?h.crispRound(t,e.minor.gridwidth,1):0,v=r.layer,g=r.minorLayer,y=1;y>=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+i).data(y?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,[z])},W.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=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||{})[c],g=r.layer.selectAll("g."+c).data(e.showticklabels?f:[],Mt),y=[];function m(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),c=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=u.lineCount(o),v=H*t.fontSize,g=p.heightFn(t,i(a)?+a:0,(d-1)*v);if(g&&(f+=l(0,g)),s.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":c}),y.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var m=h.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(m,0))}}))}g.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.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(u.convertToTspans,t),t._promises[i]?y.push(t._promises.pop().then((function(){m(r,d)}))):m(r,d)})),Nt(e,[N]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(u.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,u=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(e.range,e.r2l);l=e.l2p(c[0])+e._offset,u=e.l2p(c[1])+e._offset}var f=Math.min(l,u),p=Math.max(l,u),d=e.side,v=1/0,y=-1/0;for(var m in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.left<f)&&(s=1):(a.bottom>p||a.top+(e.tickangle?0:t.fontSize/4)<f)&&(s=1);var l=r.select("text");s?i&&l.style("opacity",0):(l.style("opacity",1),v="bottom"===d||"right"===d?Math.min(v,o?a.top:a.left):-1/0,y="top"===d||"left"===d?Math.max(y,o?a.bottom:a.right):1/0)}})),a._plots){var x=a._plots[m];if(e._id===x.xaxis._id||e._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b["_visibleLabelMin_"+e._id]=v,b["_visibleLabelMax_"+e._id]=y)}}}},e._hideCounterAxisInsideTickLabels=function(t){var r="x"===e._id.charAt(0),i=[];for(var o in a._plots){var s=a._plots[o];e._id!==s.xaxis._id&&e._id!==s.yaxis._id||i.push(r?s.yaxis:s.xaxis)}i.forEach((function(r,i){r&&Bt(r)&&(t||[z,F,R,B,N]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===z.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===F.K?s.minorGridlayer.selectAll("."+e._id):t.K===R.K?s.gridlayer.selectAll("."+e._id):s[e._id.charAt(0)+"axislayer"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?At(a):a.x)+e._offset,l=n.select(this);s<e["_visibleLabelMax_"+r._id]&&s>e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},m(g,v+1?v:d);var x=null;e._selections&&(e._selections[c]=g);var b=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(g,v)}))):b.push((function(){if(m(g,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;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=Lt(this),s=h.bBox(o.node());a=Math.max(a,u.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,c=Math.abs((f[l-1].x-f[0].x)*e._m)/(l-1),p=o?c/2:c,v=o?e.ticklen:1.25*n*a,y=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))<=y}));void 0===_&&(_=b.reduce((function(t,e){return Math.abs(Math.cos(t))<Math.abs(Math.cos(e))?t:e}),b[0]));var w=_*(180/Math.PI);if(o){var T=2;for(e.ticks&&(T+=e.tickwidth/2),t=0;t<i.length;t++){var k=f[t].xbnd,A=i[t];if(null!==k[0]&&A.left-e.l2p(k[0])<T||null!==k[1]&&e.l2p(k[1])-A.right<T){x=w;break}}}else{var M=e.ticklabelposition||"",S=function(t){return-1!==M.indexOf(t)},E=S("top"),L=S("left"),C=S("right"),O=S("bottom")||L||E||C?(e.tickwidth||0)+6:0;for(t=0;t<i.length-1;t++)if(s.bBoxIntersect(i[t],i[t+1],O)){x=w;break}}x&&m(g,x)}})),e._tickAngles&&b.push((function(){e._tickAngles[c]=null===x?i(d)?d:0:x}));var _=function(){var t=0,r=0;return g.each((function(n,i){var a,o=Lt(this);o.select(".text-math-group").empty()&&(e._vals[i]&&(a=e._vals[i].bb||h.bBox(o.node()),e._vals[i].bb=a),t=Math.max(t,a.width),r=Math.max(r,a.height))})),{labelsMaxW:t,labelsMaxH:r}},w=e._anchorAxis;if(w&&(w.autorange||w.insiderange)&&Bt(e)&&!K(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),w.autorange&&(a._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,b.push(_)),w.insiderange)){var T=_(),k="y"===e._id.charAt(0)?T.labelsMaxW:T.labelsMaxH;k+=6,"inside"===e.ticklabelposition&&(k+=e.ticklen||0);var A="right"===e.side||"top"===e.side?1:-1,M=1===A?1:0,S=1===A?0:1,E=[];E[S]=w.range[S];var L=w.range,C=w.r2p(L[M]),O=w.r2p(L[S]),P=a._insideTickLabelsUpdaterange[w._name+".range"];if(P){var I=w.r2p(P[M]),D=w.r2p(P[S]),j=A*("y"===e._id.charAt(0)?1:-1);j*C<j*I&&(C=I,E[M]=L[M]=P[M]),j*O>j*D&&(O=D,E[S]=L[S]=P[S])}var U=Math.abs(O-C);U-k>0?k*=1+k/(U-=k):k=0,"y"!==e._id.charAt(0)&&(k=-k),E[M]=w.p2r(w.r2p(L[M])+A*k),"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)===D)&&(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])<Math.abs(n[1])==("x"===o)?0:e._length),u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return p(r);for(var c=W.list(t,s),f=0;f<c.length;f++){var h=c[f];if(h._mainAxis===i&&p(h))return!0}}function p(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return"number"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(t,e))},W.clipEnds=function(t,e){return e.filter((function(e){return Et(t,e.x)}))},W.allowAutoMargin=function(t){for(var e=W.list(t,"",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,Ct(n)),n.mirror&&a.allowAutoMargin(t,Ot(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&a.allowAutoMargin(t,Pt(n))}},W.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,u=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],It(u.x,l.x),It(u.y,l.y);It(u.x,[o]),It(u.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Dt(t,r[n].x,r[n].y)}},52976:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(39032).BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,u=Math.round;function c(t,e){return e?n(t):"number"==typeof t}function f(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,h=r.noMultiCategory;if(o(i)&&!i.length)return"-";if(!h&&function(t){return o(t[0])&&o(t[1])}(i))return"multicategory";if(h&&Array.isArray(i[0])){for(var p=[],d=0;d<i.length;d++)if(o(i[d]))for(var v=0;v<i[d].length;v++)p.push(i[d][v]);i=p}if(function(t,e){for(var r=t.length,i=f(r),a=0,o=0,l={},c=0;c<r;c+=i){var h=t[u(c)],p=String(h);l[p]||(l[p]=1,s(h,e)&&a++,n(h)&&o++)}return a>2*o}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},c=0;c<r;c+=n){var h=t[u(c)],p=String(h);if(!s[p]){s[p]=1;var d=typeof h;"boolean"===d?o++:(e?l(h)!==a:"number"===d)?i++:"string"===d&&o++}}return o>2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n<r;n++)if(c(t[n],e))return!0;return!1}(i,g)?"linear":"-"}},28336:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(3400),o=r(31780),s=r(51272),l=r(94724),u=r(26332),c=r(25404),f=r(95936),h=r(42568),p=r(22416),d=r(42136),v=r(96312),g=r(78344),y=r(33816).WEEKDAY_PATTERN,m=r(33816).HOUR_PATTERN;function x(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=_(o[s])){c=y;break}var f=i("pattern",c);if(f===y)for(s=0;s<2;s++)(u=_(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case y:if(!n(u))return void(e.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=u;break;case m:if(!n(u))return void(e.enabled=!1);if((u=+u)<0||u>24)return void(e.enabled=!1);e.bounds[s]=o[s]=u}if(!1===r.autorange){var h=r.range;if(h[0]<h[1]){if(o[0]<h[0]&&o[1]>h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]<h[1])return void(e.enabled=!1)}}else{var p=i("values");if(!p||!p.length)return void(e.enabled=!1);i("dvalue")}}}t.exports=function(t,e,r,n,m){var b,_=n.letter,w=n.font||{},T=n.splomStash||{},k=r("visible",!n.visibleDflt),A=e._template||{},M=e.type||A.type||"-";"date"===M&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(b=r("ticklabelmode"))),n.noTicklabelindex||"date"!==M&&"linear"!==M||r("ticklabelindex");var S="";n.noTicklabelposition&&"multicategory"!==M||(S=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===b?["outside","inside"]:"x"===_?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==S.indexOf("inside")?"hide past domain":"category"===M||"multicategory"===M?"allow":"hide past div"),g(e,m),v(t,e,r,n),p(t,e,r,n),"category"===M||n.noHover||r("hoverformat");var E=r("color"),L=E!==l.color.dflt?E:w.color,C=T.label||m._dfltTitle[_];if(h(t,e,r,M,n),!k)return e;r("title.text",C),a.coerceFont(r,"title.font",w,{overrideDflt:{size:a.bigFont(w.size),color:L}}),u(t,e,r,M);var O=n.hasMinor;if(O&&(o.newContainer(e,"minor"),u(t,e,r,M,{isMinor:!0})),f(t,e,r,M,n),c(t,e,r,n),O){var P=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=P}d(t,e,r,{dfltColor:E,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:O,attributes:l}),!O||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var I,D="multicategory"===M;if(n.noTickson||"category"!==M&&!D||!e.ticks&&!e.showgrid||(D&&(I="boundaries"),"boundaries"===r("tickson",I)&&delete e.ticklabelposition),D&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===M)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:x}),e.rangebreaks.length){for(var z=0;z<e.rangebreaks.length;z++)if(e.rangebreaks[z].pattern===y){e._hasDayOfWeekBreaks=!0;break}if(g(e,m),m._has("scattergl")||m._has("splom"))for(var R=0;R<n.data.length;R++){var F=n.data[R];"scattergl"!==F.type&&"splom"!==F.type||(F.visible=!1,a.warn(F.type+" traces do not work on axes with rangebreaks. Setting trace "+F.index+" to `visible: false`."))}}else delete e.rangebreaks;return e};var b={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(t){if("string"==typeof t)return b[t.substr(0,3).toLowerCase()]}},29736:function(t,e,r){"use strict";var n=r(26880),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return o(t,e)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?o:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},79811:function(t,e,r){"use strict";var n=r(24040),i=r(33816);function a(t,e){if(e&&e.length)for(var r=0;r<e.length;r++)if(e[r][t])return!0;return!1}e.id2name=function(t){if("string"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.split(" ")[0].substr(1);return"1"===e&&(e=""),t.charAt(0)+"axis"+e}},e.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return"1"===e&&(e=""),t.charAt(0)+e}},e.cleanId=function(t,e,r){var n=/( domain)$/.test(t);if("string"==typeof t&&t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)&&(!n||r)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===a&&(a=""),t.charAt(0)+a+(n&&r?" domain":"")}},e.list=function(t,r,n){var i=t._fullLayout;if(!i)return[];var a,o=e.listIds(t,r),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var u=i._subplots.gl3d||[];for(a=0;a<u.length;a++){var c=i[u[a]];r?s.push(c[r+"axis"]):s.push(c.xaxis,c.yaxis,c.zaxis)}}return s},e.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+"axis"]:n.xaxis.concat(n.yaxis)},e.getFromId=function(t,r,n){var i=t._fullLayout;return r=void 0===r||"string"!=typeof r?r:r.replace(" domain",""),"x"===n?r=r.replace(/y[0-9]*/,""):"y"===n&&(r=r.replace(/x[0-9]*/,"")),i[e.id2name(r)]},e.getFromTrace=function(t,r,i){var a=t._fullLayout,o=null;if(n.traceIs(r,"gl3d")){var s=r.scene;"scene"===s.substr(0,5)&&(o=a[s][i+"axis"])}else o=e.getFromId(t,r[i+"axis"]||i);return o},e.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},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,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=e.categoryorder="trace"),"trace"===u?e._initialCategories=[]:"array"===u?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;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,i).sort(),"category ascending"===u?e._initialCategories=l:"category descending"===u&&(e._initialCategories=l.reverse()))}}},98728:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(39032),o=a.ONEDAY,s=a.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,a="category"===e,s=i?o:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:a?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),u=t.substr(1);return(u=n(u)?Number(u):0)<=0||!(i&&"M"===l&&u===Math.round(u)||r&&"L"===l||r&&"D"===l&&(1===u||2===u))?s:t},e.tick0=function(t,e,r,a){return"date"===e?i.cleanDate(t,i.dateTick0(r,a%s==0?1:0)):"D1"!==a&&"D2"!==a?n(t)?Number(t):0:void 0}},33816:function(t,e,r){"use strict";var n=r(53756).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}},71888:function(t,e,r){"use strict";var n=r(3400),i=r(19280),a=r(79811).id2name,o=r(94724),s=r(21160),l=r(78344),u=r(39032).ALMOST_EQUAL,c=r(84284).FROM_BL;function f(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,u=s._axisConstraintGroups,c=s._axisMatchGroups,f=e._id,v=f.charAt(0),g=((s._splomAxes||{})[v]||{})[f]||{},y=e._id,m="x"===y.charAt(0);function x(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:m?["left","center","right"]:["bottom","middle","top"],dflt:m?"center":"middle"}},"constraintoward");var b,_,w=e.type,T=[];for(b=0;b<i.length;b++)(_=i[b])!==y&&s[a(_)].type===w&&T.push(_);var k=p(u,y);if(k){var A=[];for(b=0;b<T.length;b++)k[_=T[b]]||A.push(_);T=A}var M,S,E=T.length;E&&(t.matches||g.matches)&&(M=n.coerce(t,e,{matches:{valType:"enumerated",values:T,dflt:-1!==T.indexOf(g.matches)?g.matches:void 0}},"matches"));var L=l&&!m?e.anchor:void 0;if(E&&!M&&(t.scaleanchor||L)&&(S=n.coerce(t,e,{scaleanchor:{valType:"enumerated",values:T.concat([!1])}},"scaleanchor",L)),M){e._matchGroup=d(c,y,M,1);var C=s[a(M)],O=h(s,e)/h(s,C);m!==("x"===M.charAt(0))&&(O=(m?"x":"y")+O),d(u,y,M,O)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(S){var P=x("scaleratio");P||(P=e.scaleratio=1),d(u,y,S,P)}else t.scaleanchor&&-1!==i.indexOf(t.scaleanchor)&&n.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function h(t,e){var r=e.domain;return r||(r=t[a(e.overlaying)].domain),r[1]-r[0]}function p(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function d(t,e,r,n){var i,a,o,s,l,u=p(t,e);null===u?((u={})[e]=1,l=t.length,t.push(u)):l=t.indexOf(u);var c=Object.keys(u);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)o[s=c[a]]=v(f,v(n,u[s]));return void t.splice(l,1)}if(1!==n)for(a=0;a<c.length;a++){var h=c[a];u[h]=v(n,u[h])}u[r]=1}function v(t,e){var r,n,i="",a="";"string"==typeof t&&(r=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(r)),"string"==typeof e&&(n=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(n));var o=t*e;return r||n?r&&n&&i.charAt(0)!==a.charAt(0)?r===n?o:(r>n?i.substr(n):a.substr(r))+o:i+a+t*e:o}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],l=t[s];if("string"==typeof l){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.substr(c);for(var f="y"===u.charAt(0)?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}function y(t,e){var r=t._inputDomain,n=c[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}e.handleDefaults=function(t,e,r){var i,o,s,u,c,h,p,d,v=r.axIds,g=r.axHasImage,y=e._axisConstraintGroups=[],m=e._axisMatchGroups=[];for(i=0;i<v.length;i++)f(c=t[u=a(v[i])],h=e[u],{axIds:v,layoutOut:e,hasImage:g[u]});function x(t,r){for(i=0;i<t.length;i++)for(s in o=t[i])e[a(s)][r]=o}for(x(m,"_matchGroup"),i=0;i<y.length;i++)for(s in o=y[i])if((h=e[a(s)]).fixedrange){for(var b in o){var _=a(b);!1===(t[_]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}for(i=0;i<y.length;){for(s in o=y[i]){(h=e[a(s)])._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(o).length&&(y.splice(i,1),i--);break}i++}x(y,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],T=!1,k=!1;function A(){d=h[p],"rangebreaks"===p&&(k=h._hasDayOfWeekBreaks)}for(i=0;i<m.length;i++){o=m[i];for(var M=0;M<w.length;M++){var S;for(s in p=w[M],d=null,o)if(c=t[u=a(s)],h=e[u],p in h){if(!h.matches&&(S=h,p in c)){A();break}null===d&&p in c&&A()}if("range"===p&&d&&c.range&&2===c.range.length&&null!==c.range[0]&&null!==c.range[1]&&(T=!0),"autorange"===p&&null===d&&T&&(d=!1),null===d&&p in S&&(d=S[p]),null!==d)for(s in o)(h=e[a(s)])[p]="range"===p?d.slice():d,"rangebreaks"===p&&(h._hasDayOfWeekBreaks=k,l(h,e))}}},e.enforce=function(t){var e,r,n,o,l,c,f,h,p=t._fullLayout,d=p._axisConstraintGroups||[];for(e=0;e<d.length;e++){n=g(d[e],p);var v=Object.keys(n),m=1/0,x=0,b=1/0,_={},w={},T=!1;for(r=0;r<v.length;r++)w[o=v[r]]=l=p[a(o)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),_[o]=c=Math.abs(l._m)/n[o],m=Math.min(m,c),"domain"!==l.constrain&&l._constraintShrinkable||(b=Math.min(b,c)),delete l._constraintShrinkable,x=Math.max(x,c),"domain"===l.constrain&&(T=!0);if(!(m>u*x)||T)for(r=0;r<v.length;r++)if(c=_[o=v[r]],f=(l=w[o]).constrain,c!==b||"domain"===f)if(h=c/b,"range"===f)s(l,h);else{var k=l._inputDomain,A=(l.domain[1]-l.domain[0])/(k[1]-k[0]),M=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((h/=A)*M<1){l.domain=l._input.domain=k.slice(),s(l,h);continue}if(M<1&&(l.range=l._input.range=l._inputRange.slice(),h*=M),l.autorange){var S=l.r2l(l.range[0]),E=l.r2l(l.range[1]),L=(S+E)/2,C=L,O=L,P=Math.abs(E-L),I=L-P*h*1.0001,D=L+P*h*1.0001,z=i.makePadFn(p,l,0),R=i.makePadFn(p,l,1);y(l,h);var F,B,N=Math.abs(l._m),j=i.concatExtremes(t,l),U=j.min,V=j.max;for(B=0;B<U.length;B++)(F=U[B].val-z(U[B])/N)>I&&F<C&&(C=F);for(B=0;B<V.length;B++)(F=V[B].val+R(V[B])/N)<D&&F>O&&(O=F);h/=(O-C)/(2*P),C=l.l2r(C),O=l.l2r(O),l.range=l._input.range=S<E?[C,O]:[O,C]}y(l,h)}}},e.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n<r.length;n++)if(r[n][e])return"g"+n;return e},e.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&"domain"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},51184:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(49760),s=r(89184),l=r(24040),u=i.strTranslate,c=r(72736),f=r(76308),h=r(43616),p=r(93024),d=r(54460),v=r(93972),g=r(86476),y=r(72760),m=y.selectingOrDrawing,x=y.freeMode,b=r(84284).FROM_TL,_=r(73696),w=r(39172).redrawReglTraces,T=r(7316),k=r(79811).getFromId,A=r(22676).prepSelect,M=r(22676).clearOutline,S=r(22676).selectOnClick,E=r(21160),L=r(33816),C=L.MINDRAG,O=L.MINZOOM,P=!0;function I(t,e,r,n){var a=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return a.call(v,n),a.node()}function D(t,e,r,i,a,o,s){var l=I(t,"rect",e,r);return n.select(l).call(h.setRect,i,a,o,s),l}function z(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function R(t,e,r,n,i){for(var a=0;a<t.length;a++){var o=t[a];if(!o.fixedrange)if(o.rangebreaks){var s="y"===o._id.charAt(0),l=s?1-e:e,u=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+".range[0]"]=o.l2r(c+f*e),n[o._name+".range[1]"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(e+(1-r))/2;R(i,h,1-h,n,[])}}function F(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange){if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)];n.limitRange&&n.limitRange()}}}function B(t){return 1-(t>=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",u(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function q(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){P&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),P=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,O)/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,u,c=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,v=0;v<e.length;v++){var g=e[v];for(o in r)if(g[o]){for(l in g)a&&(p[l]||d[l])||("x"===l.charAt(0)?r:n)[l]||(f[l]=o);for(s in n)a&&(p[s]||d[s])||!g[s]||(c=!0)}for(s in n)if(g[s])for(u in g)a&&(p[u]||d[u])||("x"===u.charAt(0)?r:n)[u]||(h[u]=s)}c&&(i.extendFlat(f,h),h={});var y={},m=[];for(l in f){var x=k(t,l);m.push(x),y[x._id]=x}var b={},_=[];for(u in h){var w=k(t,u);_.push(w),b[w._id]=w}return{xaHash:y,yaHash:b,xaxes:m,yaxes:_,xLinks:f,yLinks:h,isSubplotConstrained:c}}function Y(t,e){if(s){var r=void 0!==t.onwheel?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}))}function X(t){var e=[];for(var r in t)e.push(t[r]);return e}t.exports={makeDragBox:function(t,e,r,s,u,f,v,y){var P,I,V,Z,K,J,$,Q,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ft,ht,pt,dt,vt=t._fullLayout._zoomlayer,gt=v+y==="nsew",yt=1===(v+y).length;function mt(){if(P=e.xaxis,I=e.yaxis,tt=P._length,et=I._length,$=P._offset,Q=I._offset,(V={})[P._id]=P,(Z={})[I._id]=I,v&&y)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;V[i._id]=i;var a=r[n].yaxis;Z[a._id]=a}K=X(V),J=X(Z),it=z(K,y),at=z(J,v),ot=!at&&!it,nt=W(t,t._fullLayout._axisMatchGroups,V,Z);var o=(rt=W(t,t._fullLayout._axisConstraintGroups,V,Z,nt)).isSubplotConstrained||nt.isSubplotConstrained;st=y||o,lt=v||o;var s=t._fullLayout;ut=s._has("scattergl"),ct=s._has("splom"),ft=s._has("svg")}r+=e.yaxis._shift,mt();var xt=function(t,e,r){return t?"nsew"===t?r?"":"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}(at+it,t._fullLayout.dragmode,gt),bt=D(e,v+y+"drag",xt,r,s,u,f);if(ot&&!gt)return bt.onmousedown=null,bt.style.pointerEvents="none",bt;var _t,wt,Tt,kt,At,Mt,St,Et,Lt,Ct,Ot={element:bt,gd:t,plotinfo:e};function Pt(){Ot.plotinfo.selection=!1,M(t)}function It(t,r){var i=Ot.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(q(i),2!==t||yt||Ht(),gt)o.indexOf("select")>-1&&S(r,i,K,J,e.id,Ot),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&yt){var s=v?I:P,u="s"===v||"w"===y?0:1,f=s._name+".range["+u+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),d="left",g="middle";if(s.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===s.side&&(d="right")):"e"===y&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,f,e)}))}}}function Dt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St="",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr("d","M0,0Z")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>O||o>O?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>O||o>O){St="xy";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),u=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=u*tt,Tt.b=(1-l)*et,Tt.t=(1-u)*et,Lt.attr("d",G(Tt))}else s();else!at||o<Math.min(Math.max(.6*a,C),O)?a<C||!it?s():(Tt.t=0,Tt.b=et,St="x",Lt.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-O-.5)+"h-3v"+(2*O+1)+"h3ZM"+(t.r+.5)+","+(e-O-.5)+"h3v"+(2*O+1)+"h-3Z"}(Tt,wt))):!it||a<Math.min(.6*o,O)?(Tt.l=0,Tt.r=tt,St="y",Lt.attr("d",function(t,e){return"M"+(e-O-.5)+","+(t.t-.5)+"v-3h"+(2*O+1)+"v3ZM"+(e-O-.5)+","+(t.b+.5)+"v3h"+(2*O+1)+"v-3Z"}(Tt,_t))):(St="xy",Lt.attr("d",G(Tt)));Tt.w=Tt.r-Tt.l,Tt.h=Tt.b-Tt.t,St&&(Ct=!0),t._dragged=Ct,U(Et,Lt,Tt,At,Mt,kt),zt(),t.emit("plotly_relayouting",ht),Mt=!0}function zt(){ht={},"xy"!==St&&"x"!==St||(R(K,Tt.l/tt,Tt.r/tt,ht,rt.xaxes),Vt("x",ht)),"xy"!==St&&"y"!==St||(R(J,(et-Tt.b)/et,(et-Tt.t)/et,ht,rt.yaxes),Vt("y",ht))}function Rt(){zt(),q(t),Gt(),H(t)}Ot.prepFn=function(e,r,n){var a=Ot.dragmode,s=t._fullLayout.dragmode;s!==a&&(Ot.dragmode=s),mt(),pt=t._fullLayout._invScaleX,dt=t._fullLayout._invScaleY,ot||(gt?e.shiftKey?"pan"===s?s="zoom":m(s)||(s="pan"):e.ctrlKey&&(s="pan"):s="pan"),x(s)?Ot.minDrag=1:Ot.minDrag=void 0,m(s)?(Ot.xaxes=K,Ot.yaxes=J,A(e,r,n,Ot,s)):(Ot.clickFn=It,m(a)&&Pt(),ot||("zoom"===s?(Ot.moveFn=Dt,Ot.doneFn=Rt,Ot.minDrag=1,function(e,r,n){var a=bt.getBoundingClientRect();_t=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(_t,wt);_t=s[0],wt=s[1],Tt={l:_t,r:_t,w:0,t:wt,b:wt,h:0},kt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),Mt=!1,St="xy",Ct=!1,Et=N(vt,kt,$,Q,At="M0,0H"+tt+"V"+et+"H0V0"),Lt=j(vt,$,Q)}(0,r,n)):"pan"===s&&(Ot.moveFn=Ut,Ot.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===bt){var r=t._fullLayout.dragmode;m(r)||(mt(),Wt([0,0,tt,et]),Ot.moveFn(e.dx,e.dy))}}},g.init(Ot);var Ft=[0,0,tt,et],Bt=null,Nt=L.REDRAWDELAY,jt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Ut(e,r){if(e*=pt,r*=dt,!t._transitioningWithDuration){if(t._fullLayout._replotting=!0,"ew"===it||"ns"===at){var n=it?-e:0,i=at?-r:0;if(nt.isSubplotConstrained){if(it&&at){var a=(e/tt-r/et)/2;n=-(e=a*tt),i=-(r=-a*et)}at?n=-i*tt/et:i=-n*et/tt}return it&&(F(K,e),Vt("x")),at&&(F(J,r),Vt("y")),Wt([n,i,tt,et]),qt(),void t.emit("plotly_relayouting",ht)}var o,s,l="w"===it==("n"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var u=(e/tt+l*r/et)/2;e=u*tt,r=l*u*et}if("w"===it?e=p(K,0,e):"e"===it?e=p(K,1,-e):it||(e=0),"n"===at?r=p(J,1,r):"s"===at?r=p(J,0,-r):at||(r=0),o="w"===it?e:0,s="n"===at?r:0,rt.isSubplotConstrained&&!nt.isSubplotConstrained||nt.isSubplotConstrained&&it&&at&&l>0){var c;if(nt.isSubplotConstrained||!it&&1===at.length){for(c=0;c<K.length;c++)K[c].range=K[c]._r.slice(),E(K[c],1-r/et);o=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(c=0;c<J.length;c++)J[c].range=J[c]._r.slice(),E(J[c],1-e/tt);s=(r=e*et/tt)/2}}nt.isSubplotConstrained&&at||Vt("x"),nt.isSubplotConstrained&&it||Vt("y");var f=tt-e,h=et-r;!nt.isSubplotConstrained||it&&at||(it?(s=o?0:e*et/tt,h=f*et/tt):(o=s?0:r*tt/et,f=h*tt/et)),Wt([o,s,f,h]),qt(),t.emit("plotly_relayouting",ht)}function p(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/B(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Vt(t,e){for(var r=nt.isSubplotConstrained?{x:J,y:K}[t]:nt[t+"axes"],n=nt.isSubplotConstrained?{x:K,y:J}[t]:[],i=0;i<r.length;i++){var a=r[i],o=a._id,s=nt.xLinks[o]||nt.yLinks[o],l=n[0]||V[s]||Z[s];l&&(e?(e[a._name+".range[0]"]=e[l._name+".range[0]"],e[a._name+".range[1]"]=e[l._name+".range[1]"]):a.range=l.range.slice())}}function qt(){var r,n=[];function i(t){for(r=0;r<t.length;r++)t[r].fixedrange||n.push(t[r]._id)}function a(t,e){for(r=0;r<t.length;r++){var i=t[r],a=i[e];i.fixedrange||"sync"!==a.tickmode||n.push(a._id)}}for(st&&(i(K),i(rt.xaxes),i(nt.xaxes),a(e.overlays,"xaxis")),lt&&(i(J),i(rt.yaxes),i(nt.yaxes),a(e.overlays,"yaxis")),ht={},r=0;r<n.length;r++){var o=n[r],s=k(t,o);d.drawOne(t,s,{skipTitle:!0}),ht[s._name+".range[0]"]=s.range[0],ht[s._name+".range[1]"]=s.range[1]}d.redrawComponents(t,n)}function Ht(){if(!t._transitioningWithDuration){var e=t._context.doubleClick,r=[];it&&(r=r.concat(K)),at&&(r=r.concat(J)),nt.xaxes&&(r=r.concat(nt.xaxes)),nt.yaxes&&(r=r.concat(nt.yaxes));var n,i,a={};if("reset+autosize"===e)for(e="autosize",i=0;i<r.length;i++){var o=(n=r[i])._rangeInitial0,s=n._rangeInitial1,u=void 0!==o||void 0!==s;if(u&&(void 0!==o&&o!==n.range[0]||void 0!==s&&s!==n.range[1])||!u&&!0!==n.autorange){e="reset";break}}if("autosize"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(a[n._name+".autorange"]=!0);else if("reset"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(J)):r=r.concat(K)),i=0;i<r.length;i++)if(!(n=r[i]).fixedrange){var c=n._name,f=n._autorangeInitial;void 0===n._rangeInitial0&&void 0===n._rangeInitial1?a[c+".autorange"]=!0:void 0===n._rangeInitial0?(a[c+".autorange"]=f,a[c+".range"]=[null,n._rangeInitial1]):void 0===n._rangeInitial1?(a[c+".range"]=[n._rangeInitial0,null],a[c+".autorange"]=f):a[c+".range"]=[n._rangeInitial0,n._rangeInitial1]}t.emit("plotly_doubleclick",null),l.call("_guiRelayout",t,a)}}function Gt(){Wt([0,0,tt,et]),i.syncOrAsync([T.previousPromises,function(){t._fullLayout._replotting=!1,l.call("_guiRelayout",t,ht)}],t)}function Wt(e){var r,n,a,o,s=t._fullLayout,u=s._plots,c=s._subplots.cartesian;if(ct&&l.subplotsRegistry.splom.drag(t),ut)for(r=0;r<c.length;r++)if(a=(n=u[c[r]]).xaxis,o=n.yaxis,n._scene){a.limitRange&&a.limitRange(),o.limitRange&&o.limitRange();var f=i.simpleMap(a.range,a.r2l),p=i.simpleMap(o.range,o.r2l);n._scene.update({range:[f[0],p[0],f[1],p[1]]})}if((ct||ut)&&(_(t),w(t)),ft){var d=e[2]/P._length,g=e[3]/I._length;for(r=0;r<c.length;r++){a=(n=u[c[r]]).xaxis,o=n.yaxis;var m,x,b,T,k=(st||nt.isSubplotConstrained)&&!a.fixedrange&&V[a._id],A=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&Z[o._id];if(k?(m=d,b=y||nt.isSubplotConstrained?e[0]:Zt(a,m)):nt.xaHash[a._id]?(m=d,b=e[0]*a._length/P._length):nt.yaHash[a._id]?(m=g,b="ns"===at?-e[1]*a._length/I._length:Zt(a,m,{n:"top",s:"bottom"}[at])):b=Xt(a,m=Yt(a,d,g)),m>1&&(void 0!==a.maxallowed&&st===(a.range[0]<a.range[1]?"e":"w")||void 0!==a.minallowed&&st===(a.range[0]<a.range[1]?"w":"e"))&&(m=1,b=0),A?(x=g,T=v||nt.isSubplotConstrained?e[1]:Zt(o,x)):nt.yaHash[o._id]?(x=g,T=e[1]*o._length/I._length):nt.xaHash[o._id]?(x=d,T="ew"===it?-e[0]*o._length/P._length:Zt(o,x,{e:"right",w:"left"}[it])):T=Xt(o,x=Yt(o,d,g)),x>1&&(void 0!==o.maxallowed&&lt===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&&lt===(o.range[0]<o.range[1]?"s":"n"))&&(x=1,T=0),m||x){m||(m=1),x||(x=1);var M=a._offset-b/m,S=o._offset-T/x;n.clipRect.call(h.setTranslate,b,T).call(h.setScale,m,x),n.plot.call(h.setTranslate,M,S).call(h.setScale,1/m,1/x),m===n.xScaleFactor&&x===n.yScaleFactor||(h.setPointGroupScale(n.zoomScalePts,m,x),h.setTextPointsScale(n.zoomScaleTxt,m,x)),h.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=m,n.yScaleFactor=x}}}}function Yt(t,e,r){return t.fixedrange?0:st&&rt.xaHash[t._id]?e:lt&&(rt.isSubplotConstrained?rt.xaHash:rt.yaHash)[t._id]?r:0}function Xt(t,e){return e?(t.range=t._r.slice(),E(t,e),Zt(t,e)):0}function Zt(t,e,r){return t._length*(1-e)*b[r||t.constraintoward||"middle"]}return v.length*y.length!=1&&Y(bt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Pt(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();mt(),clearTimeout(Bt);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=jt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(y||(s=.5),n=0;n<K.length;n++)u(K[n],s,a);Vt("x"),Ft[2]*=a,Ft[0]+=Ft[2]*s*(1/a-1)}if(lt){for(v||(l=.5),n=0;n<J.length;n++)u(J[n],l,a);Vt("y"),Ft[3]*=a,Ft[1]+=Ft[3]*(1-l)*(1/a-1)}Wt(Ft),qt(),t.emit("plotly_relayouting",ht),Bt=setTimeout((function(){t._fullLayout&&(Ft=[0,0,tt,et],Gt())}),Nt),e.preventDefault()}else i.log("Did not find wheel motion attributes: ",e)}function u(t,e,r){if(!t.fixedrange){var n=i.simpleMap(t.range,t.r2l),a=n[0]+(n[1]-n[0])*e;t.range=n.map((function(e){return t.l2r(a+(e-a)*r)}))}}})),bt},makeDragger:I,makeRectDragger:D,makeZoombox:N,makeCorners:j,updateZoombox:U,xyCorners:G,transitionZoombox:V,removeZoombox:q,showDoubleClickNotifier:H,attachWheelEventHandler:Y}},42464:function(t,e,r){"use strict";var n=r(33428),i=r(93024),a=r(86476),o=r(93972),s=r(51184).makeDragBox,l=r(33816).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(t,n,o._offset,u._offset,o._length,u._length,"ns","ew");c.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=c,t._fullLayout._hoversubplot=e},c.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,u._offset-l,l,l,"n","w"),s(t,n,o._offset+o._length,u._offset-l,l,l,"n","e"),s(t,n,o._offset-l,u._offset+u._length,l,l,"s","w"),s(t,n,o._offset+o._length,u._offset+u._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===o._mainSubplot){var f=o._mainLinePosition;"top"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,"","ew"),s(t,n,o._offset,f,.1*o._length,l,"","w"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,"","e")}if(e===u._mainSubplot){var h=u._mainLinePosition;"right"!==u.side&&(h-=l),s(t,n,h,u._offset+.1*u._length,l,.8*u._length,"ns",""),s(t,n,h,u._offset+.9*u._length,l,.1*u._length,"s",""),s(t,n,h,u._offset,l,.1*u._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";o(e._draggers,r)}},36632:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(79811);t.exports=function(t){return function(e,r){var o=e[t];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,u=r._subplots,c=u.xaxis,f=u.yaxis,h=u.cartesian,p=r._has("cartesian")||r._has("gl2d"),d=0;d<o.length;d++){var v=o[d];if(i.isPlainObject(v)){var g=a.cleanId(v.xref,"x",!1),y=a.cleanId(v.yref,"y",!1),m=l.x.test(g),x=l.y.test(y);if(m||x){p||i.pushUnique(r._basePlotModules,s);var b=!1;m&&-1===c.indexOf(g)&&(c.push(g),b=!0),x&&-1===f.indexOf(y)&&(f.push(y),b=!0),b&&m&&x&&h.push(g+y)}}}}}},57952:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(7316),s=r(43616),l=r(84888)._M,u=r(79811),c=r(33816),f=r(9616),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}var d=c.zindexSeparator;function v(t,e,r,a,o){for(var u,f,h,p=c.traceLayerClasses,d=t._fullLayout,v=d._zindices,g=d._modules,y=[],m=[],x=0;x<v.length;x++)for(var b=v[x],_=0;_<g.length;_++){var w=(u=g[_]).name,T=i.modules[w].categories;if(T.svg){var k=u.layerName||w+"layer",A=k+(x?Number(x)+1:""),M=u.plot;h=(f=l(r,M,b))[0],r=f[1],h.length&&y.push({i:p.indexOf(k),zorder:x,className:A,plotMethod:M,cdModule:h}),T.zoomScale&&m.push("."+A)}}y.sort((function(t,e){return(t.zorder||0)-(e.zorder||0)||t.i-e.i}));var S=e.plot.selectAll("g.mlayer").data(y,(function(t){return t.className}));if(S.enter().append("g").attr("class",(function(t){return t.className})).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),S.exit().remove(),S.order(),S.each((function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),-1===c.clipOnAxisFalseQuery.indexOf("."+l)&&s.setClipUrl(i,e.layerClipId,t)})),d._has("scattergl")&&(u=i.getModule("scattergl"),h=l(r,u)[0],u.plot(t,e,h)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(c.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),m.length)){var E=e.plot.selectAll(m.join(",")).selectAll(".trace");e.zoomScalePts=E.selectAll("path.point"),e.zoomScaleTxt=E.selectAll(".textpoint")}}function g(t,e){var r=e.plotgroup,n=e.id,i=-1!==n.indexOf(d),a=c.layerValue2layerClass[e.xaxis.layer],o=c.layerValue2layerClass[e.yaxis.layer],s=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var l=e.mainplotinfo,f=l.plotgroup,v=n+"-x",g=n+"-y";e.minorGridlayer=l.minorGridlayer,e.gridlayer=l.gridlayer,e.zerolinelayer=l.zerolinelayer,h(l.overlinesBelow,"path",v),h(l.overlinesBelow,"path",g),h(l.overaxesBelow,"g",v),h(l.overaxesBelow,"g",g),e.plot=h(l.overplot,"g",n),h(l.overlinesAbove,"path",v),h(l.overlinesAbove,"path",g),h(l.overaxesAbove,"g",v),h(l.overaxesAbove,"g",g),e.xlines=f.select(".overlines-"+a).select("."+v),e.ylines=f.select(".overlines-"+o).select("."+g),e.xaxislayer=f.select(".overaxes-"+a).select("."+v),e.yaxislayer=f.select(".overaxes-"+o).select("."+g)}else if(s)e.xlines=h(r,"path","xlines-above"),e.ylines=h(r,"path","ylines-above"),e.xaxislayer=h(r,"g","xaxislayer-above"),e.yaxislayer=h(r,"g","yaxislayer-above");else{if(!i){var y=h(r,"g","layer-subplot");e.shapelayer=h(y,"g","shapelayer"),e.imagelayer=h(y,"g","imagelayer"),e.minorGridlayer=h(r,"g","minor-gridlayer"),e.gridlayer=h(r,"g","gridlayer"),e.zerolinelayer=h(r,"g","zerolinelayer");var m=h(r,"g","layer-between");e.shapelayerBetween=h(m,"g","shapelayer"),e.imagelayerBetween=h(m,"g","imagelayer"),h(r,"path","xlines-below"),h(r,"path","ylines-below"),e.overlinesBelow=h(r,"g","overlines-below"),h(r,"g","xaxislayer-below"),h(r,"g","yaxislayer-below"),e.overaxesBelow=h(r,"g","overaxes-below")}e.overplot=h(r,"g","overplot"),e.plot=h(e.overplot,"g",n),i||(e.xlines=h(r,"path","xlines-above"),e.ylines=h(r,"path","ylines-above"),e.overlinesAbove=h(r,"g","overlines-above"),h(r,"g","xaxislayer-above"),h(r,"g","yaxislayer-above"),e.overaxesAbove=h(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+a),e.ylines=r.select(".ylines-"+o),e.xaxislayer=r.select(".xaxislayer-"+a),e.yaxislayer=r.select(".yaxislayer-"+o))}i||(s||(p(e.minorGridlayer,"g",e.xaxis._id),p(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort),p(e.gridlayer,"g",e.xaxis._id),p(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function y(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),m(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function m(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=c.idRegex,e.attrRegex=c.attrRegex,e.attributes=r(26720),e.layoutAttributes=r(94724),e.supplyLayoutDefaults=r(67352),e.transitionAxes=r(73736),e.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),p={},d={};for(r=0;r<h.length;r++){var v=h[r].split("y");p[v[0]]=1,d["y"+v[1]]=1}for(r=0;r<s.length;r++)p[n=s[r]]||(i=(t[u.id2name(n)]||{}).anchor,c.idRegex.y.test(i)||(i="y"),f.push(n+i),h.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[u.id2name(i)]||{}).anchor,c.idRegex.x.test(n)||(n="x"),f.push(n+i),h.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!h.length){for(var g in n="",i="",t)c.attrRegex.test(g)&&("x"===g.charAt(0)?(!n||+g.substr(5)<+n.substr(5))&&(n=g):(!i||+g.substr(5)<+i.substr(5))&&(i=g));n=n?u.name2id(n):"x",i=i?u.name2id(i):"y",s.push(n),l.push(i),f.push(n+i)}},e.plot=function(t,e,r,n){var i,o=t._fullLayout,s=o._subplots.cartesian,l=t.calcdata;if(!Array.isArray(e))for(e=[],i=0;i<l.length;i++)e.push(i);for(var u=o._zindices,c=0;c<u.length;c++){var f=u[c];for(i=0;i<s.length;i++){var h=s[i],p=o._plots[h];if(c>0){var g=p.id;if(-1!==g.indexOf(d))continue;g+=d+(c+1),p=a.extendFlat({},p,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,m=[],x=0;x<l.length;x++){var b=l[x],_=b[0].trace;f===(_.zorder||0)&&_.xaxis+_.yaxis===h&&((-1!==e.indexOf(_.index)||_.carpet)&&(y&&y[0].trace.xaxis+y[0].trace.yaxis===h&&-1!==["tonextx","tonexty","tonext"].indexOf(_.fill)&&-1===m.indexOf(y)&&m.push(y),m.push(b)),y=b)}v(t,p,m,r,n)}}},e.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},c=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var f=n._has&&n._has("gl"),h=e._has&&e._has("gl");if(f&&!h)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(c.xaxis&&c.yaxis){var p=u.listIds({_fullLayout:n});for(a=0;a<p.length;a++){var v=p[a];e[u.id2name(v)]||n._infolayer.selectAll(".g-"+v+"title").remove()}}var g=n._has&&n._has("cartesian"),x=e._has&&e._has("cartesian");if(g&&!x)y(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(c.cartesian)for(a=0;a<c.cartesian.length;a++){var b=c.cartesian[a];if(-1===b.indexOf(d)&&!l[b]){var _="."+b+",."+b+"-x,."+b+"-y";n._cartesianlayer.selectAll(_).remove(),m(b,n)}}},e.drawFramework=function(t){var e,r=t._fullLayout,i=t.calcdata,o={};for(e=0;e<i.length;e++){var s=i[e][0],l=s.trace.zorder||0;o[l]||(o[l]=[]),o[l].push(s)}var u=Object.keys(o).map(Number).sort(a.sorterAsc);u.length||(u=[0]),r._zindices=u;var c=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._zindices.length,u=s._subplots.cartesian,c=u.length,f=[],h=[];for(e=0;e<c;e++){n=u[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var p=a._mainAxis,v=o._mainAxis,g=p._id+v._id,y=s._plots[g];i.overlays=[],g!==n&&y?(i.mainplot=g,i.mainplotinfo=y,h.push(n)):(i.mainplot=void 0,i.mainplotinfo=void 0,f.push(n))}for(e=0;e<h.length;e++)n=h[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var m=f.concat(h),x=[];for(e=0;e<c;e++){n=m[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;for(var b=[],_=1;_<=l;_++){var w="";for(_>1&&(w+=d+_),b.push(n+w),r=0;r<i.overlays.length;r++)b.push(i.overlays[r].id+w)}b=b.concat([a.layer,o.layer,a.overlaying||"",o.overlaying||""]),x.push(b)}return x}(t),f=c.length,p=[];for(e=0;e<f;e++)p[e]=c[e].slice();for(var v=1;v<u.length;v++){var m=[];for(e=0;e<f;e++)m[e]=c[e].slice(),m[e][0]+=d+(v+1);p=p.concat(m)}var x=r._cartesianlayer.selectAll(".subplot").data(p,String);x.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),x.order(),x.exit().call(y,r),x.each((function(e){var i=e[0],o=i.indexOf(d),s=-1!==o,l=s?i.slice(0,o):i,u=r._plots[i];u||(u=a.extendFlat({},r._plots[l]))&&(u.id=i,r._plots[i]=u,r._subplots.cartesian.push(i)),u&&(u.plotgroup=n.select(this),g(t,u),s||(u.draglayer=h(r._draggers,"g",i)))}))},e.rangePlot=function(t,e,r){g(t,e),v(t,e,r),o.style(t)},e.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this,r=t.toDataURL("image/png");e.append("svg:image").attr({xmlns:f.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}))},e.updateFx=r(42464).updateFx},94724:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(98192).u,o=r(92880).extendFlat,s=r(31780).templatedArray,l=r(29736).descriptionWithDates,u=r(39032).ONEDAY,c=r(33816),f=c.HOUR_PATTERN,h=c.WEEKDAY_PATTERN,p={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},d=o({},p,{values:p.values.slice().concat(["sync"])});function v(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks"}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},m={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function b(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=5),e}function _(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks"},T={valType:"color",dflt:i.lightLine,editType:"ticks"};function k(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var A=o({},a,{editType:"ticks"}),M={valType:"boolean",editType:"ticks"};t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:i.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[h,f,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:u},editType:"calc"}),tickmode:d,nticks:v(),tick0:g,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:m,ticktext:{valType:"data_array",editType:"ticks"},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:b(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:M,gridcolor:T,gridwidth:k(),griddash:A,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},minor:{tickmode:p,nticks:v("minor"),tick0:g,dtick:y,tickvals:m,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:T,gridwidth:k("minor"),griddash:A,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},67352:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover,o=r(41008),s=r(31780),l=r(64859),u=r(94724),c=r(14944),f=r(28336),h=r(71888),p=r(37668),d=r(79811),v=d.id2name,g=d.name2id,y=r(33816).AX_ID_PATTERN,m=r(24040),x=m.traceIs,b=m.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var m,w,T=e.autotypenumbers,k={},A={},M={},S={},E={},L={},C={},O={},P={},I={};for(m=0;m<r.length;m++){var D=r[m];if(x(D,"cartesian")||x(D,"gl2d")){var z,R;if(D.xaxis)z=v(D.xaxis),_(k,z,D);else if(D.xaxes)for(w=0;w<D.xaxes.length;w++)_(k,v(D.xaxes[w]),D);if(D.yaxis)R=v(D.yaxis),_(k,R,D);else if(D.yaxes)for(w=0;w<D.yaxes.length;w++)_(k,v(D.yaxes[w]),D);"funnel"===D.type?"h"===D.orientation?(z&&(A[z]=!0),R&&(C[R]=!0)):R&&(M[R]=!0):"image"===D.type?(R&&(O[R]=!0),z&&(O[z]=!0)):(R&&(E[R]=!0,L[R]=!0),x(D,"carpet")&&("carpet"!==D.type||D._cheater)||z&&(S[z]=!0)),"carpet"===D.type&&D._cheater&&z&&(A[z]=!0),x(D,"2dMap")&&(P[z]=!0,P[R]=!0),x(D,"oriented")&&(I["h"===D.orientation?R:z]=!0)}}var F=e._subplots,B=F.xaxis,N=F.yaxis,j=n.simpleMap(B,v),U=n.simpleMap(N,v),V=j.concat(U),q=i.background;B.length&&N.length&&(q=n.coerce(t,e,l,"plot_bgcolor"));var H,G,W,Y,X,Z=i.combine(q,e.paper_bgcolor);function K(){var t=k[H]||[];X._traceIndices=t.map((function(t){return t._expandedIndex})),X._annIndices=[],X._shapeIndices=[],X._selectionIndices=[],X._imgIndices=[],X._subplotsWith=[],X._counterAxes=[],X._name=X._attr=H,X._id=G}function J(t,e){return n.coerce(Y,X,u,t,e)}function $(t,e){return n.coerce2(Y,X,u,t,e)}function Q(t){return"x"===t?N:B}function tt(e,r){for(var n="x"===e?j:U,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(g(o))}return i}var et={x:Q("x"),y:Q("y")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=Y.matches;y.test(t)&&-1===rt.indexOf(t)&&(nt[t]=Y.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(m=0;m<V.length;m++){H=V[m],G=g(H),W=H.charAt(0),n.isPlainObject(t[H])||(t[H]={}),Y=t[H],X=s.newContainer(e,H,W+"axis"),K();var lt="x"===W&&!S[H]&&A[H]||"y"===W&&!E[H]&&M[H],ut="y"===W&&(!L[H]&&C[H]||O[H]),ct={hasMinor:!0,letter:W,font:e.font,outerTicks:P[H],showGrid:!I[H],data:k[H]||[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[W]||{})[G],noAutotickangles:"y"===W};J("uirevision",e.uirevision),c(Y,X,J,ct),f(Y,X,J,ct,e);var ft=st&&W===ot.charAt(0),ht=$("spikecolor",st?X.color:void 0),pt=$("spikethickness",st?1.5:void 0),dt=$("spikedash",st?"dot":void 0),vt=$("spikemode",st?"across":void 0),gt=$("spikesnap");J("showspikes",!!(ft||ht||pt||dt||vt||gt))||(delete X.spikecolor,delete X.spikethickness,delete X.spikedash,delete X.spikemode,delete X.spikesnap);var yt=v(Y.overlaying),mt=[0,1];if(void 0!==e[yt]){var xt=v(e[yt].anchor);void 0!==e[xt]&&(mt=e[xt].domain)}p(Y,X,J,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,H),grid:e.grid,overlayingDomain:mt}),J("title.standoff"),at(),X._input=Y}for(m=0;m<it.length;){G=it[m++],W=(H=v(G)).charAt(0),n.isPlainObject(t[H])||(t[H]={}),Y=t[H],X=s.newContainer(e,H,W+"axis"),K();var bt={letter:W,font:e.font,outerTicks:P[H],showGrid:!I[H],data:[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[W]||{})[G]};J("uirevision",e.uirevision),X.type=nt[G]||"linear",f(Y,X,J,bt,e),p(Y,X,J,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,H),grid:e.grid}),J("fixedrange"),at(),X._input=Y}var _t=b("rangeslider","handleDefaults"),wt=b("rangeselector","handleDefaults");for(m=0;m<j.length;m++)H=j[m],Y=t[H],X=e[H],_t(t,e,H),"date"===X.type&&wt(Y,X,e,U,X.calendar),J("fixedrange");for(m=0;m<U.length;m++){H=U[m],Y=t[H],X=e[H];var Tt=e[v(X.anchor)];J("fixedrange",b("rangeslider","isVisible")(Tt))}h.handleDefaults(t,e,{axIds:rt.concat(it).sort(d.idSort),axHasImage:O})}},42136:function(t,e,r){"use strict";var n=r(49760).mix,i=r(22548),a=r(3400);t.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var u=l("linecolor",s),c=l("linewidth");r("showline",o.showLine||!!u||!!c)||(delete e.linecolor,delete e.linewidth);var f=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),h=l("gridwidth"),p=l("griddash");if(r("showgrid",o.showGrid||!!f||!!h||!!p)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),o.hasMinor){var d=l("minor.gridcolor",n(e.gridcolor,o.bgColor,67).toRgbString()),v=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!d||!!v||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!o.noZeroLine){var y=l("zerolinecolor",s),m=l("zerolinewidth");r("zeroline",o.showGrid||!!y||!!m)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},37668:function(t,e,r){"use strict";var n=r(38248),i=r(3400);t.exports=function(t,e,r,a){var o,s,l,u,c,f,h=a.counterAxes||[],p=a.overlayableAxes||[],d=a.letter,v=a.grid,g=a.overlayingDomain;v&&(s=v._domains[d][v._axisMap[e._id]],o=v._anchors[e._id],s&&(l=v[d+"side"].split(" ")[0],u=v.domain[d]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?"free":h[0]||"free"),l=l||("x"===d?"bottom":"left"),u=u||0,c=0,f=!1;var y=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(h),dflt:o}},"anchor"),m=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===d?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===y&&("y"===d&&(r("autoshift")&&(u="left"===m?g[0]:g[1],f=!e.automargin||e.automargin,c="left"===m?-3:3),r("shift",c)),r("position",u)),r("automargin",f);var x=!1;if(p.length&&(x=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(p),dflt:!1}},"overlaying")),!x){var b=r("domain",s);b[0]>b[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 u,c=e.getAutorangeDflt(l,i),f=r("autorange",c);!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,u=!0),u||(f=r("autorange",c=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,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=r(39032),d=p.FP_SAFE,v=p.BADNUM,g=p.LOG_CLIP,y=p.ONEWEEK,m=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=r(79811),T=r(33816),k=T.HOUR_PATTERN,A=T.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*g*Math.abs(n-i))}return v}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===v){if(!s(e))return v;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),u=Math.round(e-l/10);o=c(new Date(u))+l/10}return o}function C(e,r,n){return u(e,r,n||t.calendar)}function O(e){return t._categories[Math.round(e)]}function P(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 I(e){if(t._categoriesMap)return t._categoriesMap[e]}function D(t){var e=I(t);return void 0!==e?e:s(t)?+t:void 0}function z(t){return s(t)?+t:I(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var 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;l<r;l++){var u=i*t._rangebreaks[l].min,c=i*t._rangebreaks[l].max;if(a<u)break;if(!(a>c)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;i<r&&!(e<t._rangebreaks[i].pmin);i++)e>t._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?E:f,t.l2c="log"===t.type?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=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,v,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=P,t.r2d=t.c2d=t.l2d=O,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return O(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=O,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=I,t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return O(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 u in l)if(u!==r){var c=e[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;i<s.length;i++){var v=n[s[i]];if(p in v){var g=v[p],y=v._length||a.minRowLength(g);if(h(g[0])&&h(g[1]))for(o=0;o<y;o++){var m=g[0][o],x=g[1][o];S(m)&&S(x)&&(d.push([m,x]),m in f[0][1]||(f[0][1][m]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(d.sort((function(t,e){var r=f[0][1],n=r[t[0]]-r[e[0]];if(n)return n;var i=f[1][1];return i[t[1]]-i[e[1]]})),i=0;i<d.length;i++)P(d[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.limitRange=function(e){var r=t.minallowed,n=t.maxallowed;if(void 0!==r||void 0!==n){e||(e="range");var i=a.nestedProperty(t,e).get(),o=a.simpleMap(i,t.r2l),s=o[1]<o[0];s&&o.reverse();var l=a.simpleMap([r,n],t.r2l);if(void 0!==r&&o[0]<l[0]&&(i[s?1:0]=r),void 0!==n&&o[1]>l[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=t.l2r(r),c=t.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),i[s?1:0]=f}if(void 0!==n){var h=c+1;void 0!==r&&(h=Math.max(h,u)),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?T.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],u=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 c=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(c-1e3),o[1]=t.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||u||!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,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),f="y"===p;if(f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(u,c),Math.max(u,c)),t._rangebreaks.length)){for(s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._lBreaks+=Math.abs(l.max-l.min);var h=f;u>c&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(f?c:u)),s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._B.push(t._B[t._B.length-1]-d*t._m2*(l.max-l.min));for(s=0;s<t._rangebreaks.length;s++)(l=t._rangebreaks[s]).pmin=B(l.min),l.pmax=B(l.max)}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.maskBreaks=function(e){var r,n,i,o,s,u=t.rangebreaks||[];u._cachedPatterns||(u._cachedPatterns=u.map((function(e){return e.enabled&&e.bounds?a.simpleMap(e.bounds,e.pattern?l:t.d2c):null}))),u._cachedValues||(u._cachedValues=u.map((function(e){return e.enabled&&e.values?a.simpleMap(e.values,t.d2c).sort(a.sorterAsc):null})));for(var c=0;c<u.length;c++){var f=u[c];if(f.enabled)if(f.bounds){var h=f.pattern;switch(n=(r=u._cachedPatterns[c])[0],i=r[1],h){case A:o=(s=new Date(e)).getUTCDay(),n>i&&(i+=7,o<n&&(o+=7));break;case k:o=(s=new Date(e)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),n>i&&(i+=24,o<n&&(o+=24));break;case"":o=e}if(o>=n&&o<i)return v}else for(var p=u._cachedValues[c],d=0;d<p.length;d++)if(i=(n=p[d])+f.dvalue,e>=n&&e<i)return v}return e},t.locateBreaks=function(e,r){var n,i,o,s,u=[];if(!t.rangebreaks)return u;var c=t.rangebreaks.slice().sort((function(t,e){return t.pattern===A&&e.pattern===k?-1:e.pattern===A&&t.pattern===k?1:0})),f=function(t,n){if((t=a.constrain(t,e,r))!==(n=a.constrain(n,e,r))){for(var i=!0,o=0;o<u.length;o++){var s=u[o];t<s.max&&n>=s.min&&(t<s.min&&(s.min=t),n>s.max&&(s.max=n),i=!1)}i&&u.push({min:t,max:n})}};for(n=0;n<c.length;n++){var h=c[n];if(h.enabled)if(h.bounds){var p=e,d=r;h.pattern&&(p=Math.floor(p)),o=(i=a.simpleMap(h.bounds,h.pattern?l:t.r2l))[0],s=i[1];var v,g,w=new Date(p);switch(h.pattern){case A:g=y,v=(s-o+(s<o?7:0))*m,p+=o*m-(w.getUTCDay()*m+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case k:g=m,v=(s-o+(s<o?24:0))*x,p+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;default:p=Math.min(i[0],i[1]),v=g=(d=Math.max(i[0],i[1]))-p}for(var T=p;T<d;T+=g)f(T,T+v)}else for(var M=a.simpleMap(h.values,t.d2c),S=0;S<M.length;S++)f(o=M[S],s=o+h.dvalue)}return u.sort((function(t,e){return t.min-e.min})),u},t.makeCalcdata=function(e,r,n){var i,o,s,l,u=t.type,c="date"===u&&e[r+"calendar"];if(r in e){if(i=e[r],l=e._length||a.minRowLength(i),a.isTypedArray(i)&&("linear"===u||"log"===u)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if("multicategory"===u)return function(t,e){for(var r=new Array(e),n=0;n<e;n++){var i=(t[0]||[])[n],a=(t[1]||[])[n];r[n]=I([i,a])}return r}(i,l);for(o=new Array(l),s=0;s<l;s++)o[s]=t.d2c(i[s],0,c,n)}else{var f=r+"0"in e?t.d2c(e[r+"0"],0,c):0,h=e["d"+r]?Number(e["d"+r]):1;for(i=e[{x:"y",y:"x"}[r]],l=e._length||i.length,o=new Array(l),s=0;s<l;s++)o[s]=f+s*h}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e,r){return Array.isArray(e)&&2===e.length&&(r&&null===e[0]||s(t.r2l(e[0])))&&(r&&null===e[1]||s(t.r2l(e[1])))},t.getAutorangeDflt=function(e,r){var n=!t.isValidRange(e,"nullOk");return n&&r&&r.reverseDflt?n="reversed":e&&(null===e[0]&&null===e[1]?n=!0:null===e[0]&&null!==e[1]?n="min":null!==e[0]&&null===e[1]&&(n="max")),n},t.isReversed=function(){var e=t.autorange;return"reversed"===e||"min reversed"===e||"max reversed"===e},t.isPtWithinRange=function(e,r){var n=t.c2l(e[p],null,r),i=t.r2l(t.range[0]),a=t.r2l(t.range[1]);return i<a?i<=n&&n<=a:a<=n&&n<=i},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var r=t._matchGroup;if(r){var n=null,i=null;for(var a in r){var o=e[w.id2name(a)];if(o._categories){n=o._categories,i=o._categoriesMap;break}}n&&i?(t._categories=n,t._categoriesMap=i):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var s=0;s<t._initialCategories.length;s++)P(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)P(t._initialCategories[i]);n=n.concat(t._traceIndices);var a=t._matchGroup;for(var o in a)if(r!==o){var s=e[w.id2name(o)];s._categories=t._categories,s._categoriesMap=t._categoriesMap,n=n.concat(s._traceIndices)}return n};var U=e._d3locale;"date"===t.type&&(t._dateFormat=U?U.timeFormat:i,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=U?U.numberFormat:o,delete t._minDtick,delete t._forceTick0}},85024:function(t){"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},95936:function(t,e,r){"use strict";var n=r(3400),i=r(76308).contrast,a=r(94724),o=r(85024),s=r(51272);function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,u,c){c||(c={});var f=r("labelalias");n.isPlainObject(f)||delete e.labelalias;var h=o(t);if(r("showticklabels")){c.noTicklabelshift||r("ticklabelshift"),c.noTicklabelstandoff||r("ticklabelstandoff");var p=c.font||{},d=e.color,v=-1!==(e.ticklabelposition||"").indexOf("inside")?i(c.bgColor):d&&d!==a.color.dflt?d:p.color;if(n.coerceFont(r,"tickfont",p,{overrideDflt:{color:v}}),c.noTicklabelstep||"multicategory"===u||"log"===u||r("ticklabelstep"),!c.noAng){var g=r("tickangle");c.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==u){var y=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||y||"date"===u||(r("showexponent",h),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},25404:function(t,e,r){"use strict";var n=r(3400),i=r(94724);t.exports=function(t,e,r,a){var o=a.isMinor,s=o?t.minor||{}:t,l=o?e.minor:e,u=o?i.minor:i,c=o?"minor.":"",f=n.coerce2(s,l,u,"ticklen",o?.6*(e.ticklen||5):void 0),h=n.coerce2(s,l,u,"tickwidth",o?e.tickwidth||1:void 0),p=n.coerce2(s,l,u,"tickcolor",(o?e.tickcolor:void 0)||l.color);r(c+"ticks",!o&&a.outerTicks||f||h||p?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},26332:function(t,e,r){"use strict";var n=r(98728),i=r(3400).isArrayOrTypedArray,a=r(38116).isTypedArraySpec,o=r(38116).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var u=l.isMinor,c=u?t.minor||{}:t,f=u?e.minor:e,h=u?"minor.":"";function p(t){var e=c[t];return a(e)&&(e=o(e)),void 0!==e?e:(f._template||{})[t]}var d=p("tick0"),v=p("dtick"),g=p("tickvals"),y=r(h+"tickmode",i(g)?"array":v?"linear":"auto");if("auto"===y||"sync"===y)r(h+"nticks");else if("linear"===y){var m=f.dtick=n.dtick(v,s);f.tick0=n.tick0(d,s,e.calendar,m)}else"multicategory"!==s&&(void 0===r(h+"tickvals")?f.tickmode="auto":u||r("ticktext"))}},73736:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(43616),s=r(54460);t.exports=function(t,e,r,l){var u=t._fullLayout;if(0!==e.length){var c,f,h,p;l&&(c=l());var d=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr0&&(r[o._name+".range"]=a.xr0.slice()),a.yr0&&(r[s._name+".range"]=a.yr0.slice())}return i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)v(e[t].plotinfo)}))}()})),f=Date.now(),p=window.requestAnimationFrame((function n(){h=Date.now();for(var a=Math.min(1,(h-f)/r.duration),o=d(a),s=0;s<e.length;s++)g(e[s],o);h-f>r.duration?(function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr1&&(r[o._name+".range"]=a.xr1.slice()),a.yr1&&(r[s._name+".range"]=a.yr1.slice())}c&&c(),i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)v(e[t].plotinfo)}))}(),p=window.cancelAnimationFrame(n)):p=window.requestAnimationFrame(n)})),Promise.resolve()}function v(t){var e=t.xaxis,r=t.yaxis;u._defs.select("#"+t.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),v=a.simpleMap(e.xr1,i.r2l),g=d[1]-d[0],y=v[1]-v[0];p[0]=(d[0]*(1-r)+r*v[0]-d[0])/(d[1]-d[0])*u,p[2]=u*(1-r+r*y/g),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]=u;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])*c,p[3]=c*(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]=c;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?u/p[2]:1,T=h?c/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*u:0,S=h?p[1]/p[3]*c:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}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 u=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if("splom"===i.type&&i._length>0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(u)if("histogram"!==u.type||l!=={v:"y",h:"x"}[u.orientation||"v"]){var c=l+"calendar",f=u[c],h={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,o(u,l)){var p=a(u),d=[];for(r=0;r<e.length;r++){var v=e[r];n(v,"box-violin")&&(v[l+"axis"]||l)===s&&(void 0!==v[p]?d.push(v[p][0]):void 0!==v.name?d.push(v.name):d.push("text"),v[c]!==f&&(f=void 0))}t.type=i(d,f,h)}else if("splom"===u.type){var g=u.dimensions[u._axesDim[s]];g.visible&&(t.type=i(g.values,f,h))}else t.type=i(u[l]||[u[l+"0"]],f,h)}else t.type="linear"}}(e,s.data),"-"===e.type?e.type="linear":t.type=e.type)}},62460:function(t,e,r){"use strict";var n=r(24040),i=r(3400);function a(t,e,r){var n,a,o,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if("string"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},"string"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u<l;u++)a[u]=r?r[u]:u}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var c=o;o=[];for(var f=0;f<a.length;f++)o[f]=c}o.length=Math.min(a.length,o.length)}s.push({type:"data",prop:e,traces:a,value:o})}),"",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if("_"!==a[0]){var s=r+(n>0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f<c.length;f++)t._internalOn(c[f],s.check);s.remove=function(){for(var e=0;e<c.length;e++)t._removeInternalListener(c[e],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},r&&(r._commandObserver=s),s},e.hasSimpleAPICommandBindings=function(t,r,n){var i,a,o=r.length;for(i=0;i<o;i++){var s,l=r[i],u=l.method,c=l.args;if(Array.isArray(c)||(c=[]),!u)return!1;var f=e.computeAPICommandBindings(t,u,c);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var p=(s=f[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=i)}return a},e.executeAPICommand=function(t,e,r){if("skip"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch((function(t){return i.warn("API call to Plotly."+e+" rejected.",t),Promise.reject(t)}))},e.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case"restyle":n=s(t,r);break;case"relayout":n=o(0,r);break;case"update":n=s(t,[r[0],r[2]]).concat(o(0,[r[1]]));break;case"animate":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==["string","number"].indexOf(typeof e[0][0])?[{type:"layout",prop:"_currentFrame",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},86968:function(t,e,r){"use strict";var n=r(92880).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:t.editType},i.column={valType:"integer",min:0,dflt:0,editType:t.editType}),i},e.Q=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var u=r("domain.x",i),c=r("domain.y",a);u[0]<u[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=a.slice())}},25376:function(t){"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};t.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:t.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:t.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:t.noFontShadow?void 0:{editType:r,valType:"string",dflt:t.autoShadowDflt?"auto":"none"},editType:r};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,t.noFontVariant||(a.variant.arrayOk=!0),t.noFontTextcase||(a.textcase.arrayOk=!0),t.noFontLineposition||(a.lineposition.arrayOk=!0),t.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}},16672:function(t){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},79552:function(t,e){"use strict";e.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},e.axesNames=["lonaxis","lataxis"],e.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},e.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},e.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},e.clipPad=.001,e.precision=.1,e.landColor="#F0DC82",e.waterColor="#3399FF",e.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},e.sphereSVG={type:"Sphere"},e.fillLayers={ocean:1,land:1,lakes:1},e.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},e.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],e.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],e.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},43520:function(t,e,r){"use strict";var n=r(33428),i=r(83356),a=i.geoPath,o=i.geoDistance,s=r(87108),l=r(24040),u=r(3400),c=u.strTranslate,f=r(76308),h=r(43616),p=r(93024),d=r(7316),v=r(54460),g=r(19280).getAutoRange,y=r(86476),m=r(22676).prepSelect,x=r(22676).clearOutline,b=r(22676).selectOnClick,_=r(79248),w=r(79552),T=r(27144),k=r(59972),A=r(55712).NO;function M(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var S=M.prototype;function E(t,e){var r=w.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}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 u=!1,c=0;c<t.length;c++){var f=t[0][0].trace;f._geo=i,f.locationmode&&(s=!0);var h=f.marker;if(h){var p=h.angle,d=h.angleref;(p||"north"===d||"previous"===d)&&(u=!0)}}if(this._hasMarkerAngles=u,s){var v=k.getTopojsonName(a);null!==i.topojson&&v===i.topojsonName||(i.topojsonName=v,void 0===PlotlyGeoAssets.topojson[i.topojsonName]&&o.push(i.fetchTopojson()))}o=o.concat(T.fetchTraceGeoData(t)),r.push(new Promise((function(r,n){Promise.all(o).then((function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(t,e),r()})).catch(n)})))},S.fetchTopojson=function(){var t=this,e=k.getTopojsonPath(t.topojsonURL,t.topojsonName);return new Promise((function(r,i){n.json(e,(function(n,a){if(n)return 404===n.status?i(new Error(["plotly.js could not find topojson file at",e+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):i(new Error(["unexpected error while fetching topojson file at",e].join(" ")));PlotlyGeoAssets.topojson[t.topojsonName]=a,r()}))}))},S.update=function(t,e,r){var n=e[this.id];this.hasChoropleth=!1;for(var i=0;i<t.length;i++){var a=t[i],o=a[0].trace;"choropleth"===o.type&&(this.hasChoropleth=!0),!0===o.visible&&o._length>0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,c=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,v=p._ax,y=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n="geo"+u.titleCase(n);for(var l=(i[n]||s[n])(),c=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],h=function(t){return t?l:[]},p=0;p<f.length;p++){var d=f[p];"function"!=typeof l[d]&&(l[d]=h)}return l.isLonLatOverEdges=function(t){if(null===l(t))return!0;if(c){var e=l.rotate();return o(t,[-e[0],-e[1]])>c*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),c&&l.clipAngle(c-w.clipPad),l}(n),m=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=m[1][0]-m[0][0],v._length=m[1][1]-m[0][1],d.range=g(r,d),v.range=g(r,v);var k=(d.range[0]+d.range[1])/2,A=(v.range[0]+v.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}y.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);y.fitExtent(m,C);var O=this.bounds=y.getBounds(C),P=this.fitScale=y.scale(),I=y.translate();if(n.fitbounds){var D=y.getBounds(E(d.range,v.range)),z=Math.min((O[1][0]-O[0][0])/(D[1][0]-D[0][0]),(O[1][1]-O[0][1])/(D[1][1]-D[0][1]));isFinite(z)?y.scale(z*P):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(f.scale*P);var R=this.midPt=[(O[0][0]+O[1][0])/2,(O[0][1]+O[1][1])/2];if(y.translate([I[0]+(R[0]-I[0]),I[1]+(R[1]-I[1])]).clipExtent(O),n._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.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 u(t){return Boolean(w.fillLayers[t])}var c=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||u(t)?e["show"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(".layer").data(c,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append("g").attr("class",(function(t){return"layer "+t})).each((function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):u(t)&&(o[t]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||u(r)?n.datum(A(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 u=v.calcTicks(l);e.isScoped||"lonaxis"!==t||u.pop();for(var c=u.length,f=new Array(c),h=0;h<c;h++)for(var p=u[h].x,d=f[h]=[],g=i[0];g<i[1]+2.5;g+=2.5)d.push(a(p,g));return{type:"MultiLineString",coordinates:f}}(r,e,t)).call(f.stroke,e[r].gridcolor).call(h.dashLine,e[r].griddash,e[r].gridwidth),l(r)?n.call(f.stroke,e[a+"color"]).call(h.dashLine,"",e[a+"width"]):u(r)&&n.call(f.fill,e[a+"color"])}))},S.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;h.setRect(this.clipRect,i,a,o,s),this.bgRect.call(h.setRect,i,a,o,s).call(f.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s},S.updateFx=function(t,e){var r=this,i=r.graphDiv,a=r.bgRect,o=t.dragmode,s=t.clickmode;if(!r.isStatic){var c={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:function(t,e){e.isRect?(t.range={})[r.id]=[f([e.xmin,e.ymin]),f([e.xmax,e.ymax])]:(t.lassoPoints={})[r.id]=e.map(f)}},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(t){2===t&&x(i)}};"pan"===o?(a.node().onmousedown=null,a.call(_(r,e)),a.on("dblclick.zoom",(function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+"."+n]=t[n];l.call("_guiRelayout",i,e),i.emit("plotly_doubleclick",null)})),i._context._scrollZoom.geo||a.on("wheel.zoom",null)):"select"!==o&&"lasso"!==o||(a.on(".zoom",null),c.prepFn=function(t,e,r){m(t,e,r,c,o)},y.init(c)),a.on("mousemove",(function(){var t=r.projection.invert(u.getPositionFromD3Event());if(!t)return y.unhover(i,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},p.hover(i,n.event,r.id)})),a.on("mouseout",(function(){i._dragging||y.unhover(i,n.event)})),a.on("click",(function(){"select"!==o&&"lasso"!==o&&(s.indexOf("select")>-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf("event")>-1&&p.click(i,n.event))}))}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},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},u.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?c(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},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;s<i.length;s++){var l=i[s],u=n(r,o,l),c=e[l]._subplot;c||(c=a({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=c),c.plot(u,e,t._promises)}},updateFx:function(t){for(var e=t._fullLayout,r=e._subplots[o],n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}},clean:function(t,e,r,n){for(var i=n._subplots[o]||[],a=0;a<i.length;a++){var s=i[a],l=n[s]._subplot;!e[s]&&l&&(l.framework.remove(),l.clipDef.remove())}}}},40384:function(t,e,r){"use strict";var n=r(22548),i=r(86968).u,a=r(98192).u,o=r(79552),s=r(67824).overrideAll,l=r(95376),u={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:a};(t.exports=s({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:l(o.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:l(o.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:o.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:o.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:o.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:o.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n.background},lonaxis:u,lataxis:u},"plot","from-root")).uirevision={valType:"any",editType:"none"}},86920:function(t,e,r){"use strict";var n=r(3400),i=r(168),a=r(84888).op,o=r(79552),s=r(40384),l=o.axesNames;function u(t,e,r,i){var s=a(i.fullData,"geo",i.id).map((function(t){return t._expandedIndex})),u=r("resolution"),c=r("scope"),f=o.scopeDefaults[c],h=r("projection.type",f.projType),p=e._isAlbersUsa="albers usa"===h;p&&(c=e.scope="usa");var d=e._isScoped="world"!==c,v=e._isSatellite="satellite"===h,g=e._isConic=-1!==h.indexOf("conic")||"albers"===h,y=e._isClipped=!!o.lonaxisSpan[h];if(!1===t.visible){var m=n.extendDeep({},e._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),e._template=m}for(var x=r("visible"),b=0;b<l.length;b++){var _,w=l[b],T=[30,10][b];if(d)_=f[w+"Range"];else{var k=o[w+"Span"],A=(k[h]||k["*"])/2,M=r("projection.rotation."+w.substr(0,3),f.projRotate[b]);_=[M-A,M+A]}var S=r(w+".range",_);r(w+".tick0"),r(w+".dtick",T),r(w+".showgrid",!!x&&void 0)&&(r(w+".gridcolor"),r(w+".gridwidth"),r(w+".griddash")),e[w]._ax={type:"linear",_id:w.slice(0,3),_traceIndices:s,setScale:n.identity,c2l:n.identity,r2l:n.identity,autorange:!0,range:S.slice(),_m:1,_input:{}}}var E=e.lonaxis.range,L=e.lataxis.range,C=E[0],O=E[1];C>0&&O<0&&(O+=360);var P,I,D,z=(C+O)/2;if(!p){var R=d?f.projRotate:[z,0,0];P=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(I=-96.6,D=38.7):(I=d?z:P,D=(L[0]+L[1])/2),r("center.lon",I),r("center.lat",D),v&&(r("projection.tilt"),r("projection.distance")),g&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==c&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===u)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),d||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):y?(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:u,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"},u={cursor:"auto"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,u._preGUI,f);var r=i.nestedProperty(c,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(u),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,v,g=c(0,e);function y(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 g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)})).on("zoom",(function(){if(h=n.mouse(this),function(t){var r=y(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 g.scale(e.scale()),void g.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(h)&&(d=y(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=h),v=!0,t.render(!0);var l=e.rotate(),u=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":u[0],"geo.center.lat":u[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(u),v&&f(t,e,m)})),g}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=c(0,e),h=function(t){for(var e=0,r=arguments.length,i=[];++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(a,"zoomstart","zoom","zoomend"),p=0,d=a.on;function y(t){var r=e.rotate();t("projection.rotation.lon",-r[0]),t("projection.rotation.lat",-r[1])}return a.on("zoomstart",(function(){n.select(this).style(l);var t,u,c,f,y,b,_,w,T,k,A,M=n.mouse(this),S=e.rotate(),E=S,L=e.translate(),C=(u=.5*(t=S)[0]*o,c=.5*t[1]*o,f=.5*t[2]*o,y=Math.sin(u),b=Math.cos(u),_=Math.sin(c),w=Math.cos(c),T=Math.sin(f),[b*w*(k=Math.cos(f))+y*_*T,y*w*k-b*_*T,b*_*k+y*w*T,b*w*T-y*_*k]);r=v(e,M),d.call(a,"zoom",(function(){var t,a,o,l,u,c,f,p,d,y,b=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(v(e,b)){e.rotate(S).translate(L);var _=v(e,b),w=function(t,e){if(t&&e){var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(x(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,x(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}(r,_),T=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}((o=(t=C)[0],l=t[1],u=t[2],c=t[3],[o*(f=(a=w)[0])-l*(p=a[1])-u*(d=a[2])-c*(y=a[3]),o*p+l*f+u*y-c*d,o*d-l*y+u*f+c*p,o*y+l*d-u*p+c*f])),k=i.r=function(t,e,r){var n=m(e,2,t[0]);n=m(n,1,t[1]),n=m(n,0,t[2]-r[2]);var i,a,o=e[0],l=e[1],u=e[2],c=n[0],f=n[1],h=n[2],p=Math.atan2(l,o)*s,d=Math.sqrt(o*o+l*l);Math.abs(f)>d?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var v=180-a-2*p,y=(Math.atan2(h,c)-Math.atan2(u,i))*s,x=(Math.atan2(h,c)-Math.atan2(u,-i))*s;return g(r[0],r[1],a,y)<=g(r[0],r[1],v,x)?[a,y,r[2]]:[v,x,r[2]]}(T,r,E);isFinite(k[0])&&isFinite(k[1])&&isFinite(k[2])||(k=E),e.rotate(k),E=k}}else r=v(e,M=b);h.of(this,arguments)({type:"zoom"})})),A=h.of(this,arguments),p++||A({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(u),d.call(a,"zoom",null),r=h.of(this,arguments),--p||r({type:"zoomend"}),f(t,e,y)})).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 g(t,e,r,n){var i=y(r-t),a=y(n-e);return Math.sqrt(i*i+a*a)}function y(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),u=Math.sin(n);return i[a]=t[a]*l-t[s]*u,i[s]=t[s]*l+t[a]*u,i}function x(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}t.exports=function(t,e){var r=t.projection;return(e._isScoped?h:e._isClipped?d:p)(t,r)}},84888:function(t,e,r){"use strict";var n=r(24040),i=r(33816).SUBPLOT_PATTERN;e.KY=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},e._M=function(t,e,r){var i,a=[],o=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[a,t];for(var s=r,l=0;l<t.length;l++){var u=t[l],c=u[0].trace,f=void 0!==c.zorder;!0===c.visible&&0!==c._length&&(!c._module||c._module.plot!==i||f&&c.zorder!==s?o.push(u):a.push(u))}return[a,o]},e.op=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,u=[];if("gl2d"===e){var c=r.match(i);o="x"+c[1],s="y"+c[2]}for(var f=0;f<t.length;f++)a=t[f],"gl2d"===e&&n.traceIs(a,"gl2d")?a[l[0]]===o&&a[l[1]]===s&&u.push(a):a[l]===r&&u.push(a);return u}},2428:function(t,e,r){"use strict";var n=r(62644),i=r(97264),a=r(29128),o=r(33816),s=r(89184);function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}t.exports=function(t){var e=t.mouseContainer,r=t.glplot,u=new l(e,r);function c(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=u.lastPos[0],p=u.lastPos[1],d=o.MINDRAG*r.pixelRatio,v=o.MINZOOM*r.pixelRatio;function g(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,u.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case"zoom":if(e){var y=n/(f[2]-f[0])*(l[2]-l[0])+l[0],m=i/(f[3]-f[1])*(l[3]-l[1])+l[1];u.boxInited||(u.boxStart[0]=y,u.boxStart[1]=m,u.dragStart[0]=n,u.dragStart[1]=i),u.boxEnd[0]=y,u.boxEnd[1]=m,u.boxInited=!0,u.boxEnabled||u.boxStart[0]===u.boxEnd[0]&&u.boxStart[1]===u.boxEnd[1]||(u.boxEnabled=!0);var x=Math.abs(u.dragStart[0]-n)<v,b=Math.abs(u.dragStart[1]-i)<v;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(u.boxEnd[0]=u.boxStart[0]),b&&(u.boxEnd[1]=u.boxStart[1]);else{a=u.boxEnd[0]-u.boxStart[0],s=u.boxEnd[1]-u.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)>Math.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]<l[1]?(u.boxEnd[1]=l[1],u.boxEnd[0]=u.boxStart[0]+(l[1]-u.boxStart[1])/Math.abs(_)):u.boxEnd[1]>l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]<l[0]?(u.boxEnd[0]=l[0],u.boxEnd[1]=u.boxStart[1]+(l[0]-u.boxStart[0])*Math.abs(_)):u.boxEnd[0]>l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(g(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,e?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n)<d&&(n=u.dragStart[0]),Math.abs(u.dragStart[1]-i)<d&&(i=u.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),u.panning=!0,u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations()):u.panning&&(u.panning=!1,t.relayoutCallback())}u.lastPos[0]=n,u.lastPos[1]=i}return u.mouseListener=n(e,f),e.addEventListener("touchstart",(function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchmove",(function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchend",(function(t){f(0,u.lastPos[0],u.lastPos[1]),t.preventDefault()}),!!s&&{passive:!1}),u.wheelListener=i(e,(function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=u.lastPos[0],s=u.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),!0),u}},92568:function(t,e,r){"use strict";var n=r(54460),i=r(43080);function a(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var o=a.prototype,s=["xaxis","yaxis"];o.merge=function(t){var e,r,n,a,o,l,u,c,f,h,p;for(this.titleEnable=!1,this.backgroundColor=i(t.plot_bgcolor),h=0;h<2;++h){var d=(e=s[h]).charAt(0);for(n=(r=t[this.scene[e]._name]).title.text===this.scene.fullLayout._dfltTitle[d]?"":r.title.text,p=0;p<=2;p+=2)this.labelEnable[h+p]=!1,this.labels[h+p]=n,this.labelColor[h+p]=i(r.title.font.color),this.labelFont[h+p]=r.title.font.family,this.labelSize[h+p]=r.title.font.size,this.labelPad[h+p]=this.getLabelPad(e,r),this.tickEnable[h+p]=!1,this.tickColor[h+p]=i((r.tickfont||{}).color),this.tickAngle[h+p]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[h+p]=this.getTickPad(r),this.tickMarkLength[h+p]=0,this.tickMarkWidth[h+p]=r.tickwidth||0,this.tickMarkColor[h+p]=i(r.tickcolor),this.borderLineEnable[h+p]=!1,this.borderLineColor[h+p]=i(r.linecolor),this.borderLineWidth[h+p]=r.linewidth||0;u=this.hasSharedAxis(r),o=this.hasAxisInDfltPos(e,r)&&!u,l=this.hasAxisInAltrPos(e,r)&&!u,a=r.mirror||!1,c=u?-1!==String(a).indexOf("all"):!!a,f=u?"allticks"===a:-1!==String(a).indexOf("ticks"),o?this.labelEnable[h]=!0:l&&(this.labelEnable[h+2]=!0),o?this.tickEnable[h]=r.showticklabels:l&&(this.tickEnable[h+2]=r.showticklabels),(o||c)&&(this.borderLineEnable[h]=r.showline),(l||c)&&(this.borderLineEnable[h+2]=r.showline),(o||f)&&(this.tickMarkLength[h]=this.getTickMarkLength(r)),(l||f)&&(this.tickMarkLength[h+2]=this.getTickMarkLength(r)),this.gridLineEnable[h]=r.showgrid,this.gridLineColor[h]=i(r.gridcolor),this.gridLineWidth[h]=r.gridwidth,this.zeroLineEnable[h]=r.zeroline,this.zeroLineColor[h]=i(r.zerolinecolor),this.zeroLineWidth[h]=r.zerolinewidth}},o.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},o.hasAxisInDfltPos=function(t,e){var r=e.side;return"xaxis"===t?"bottom"===r:"yaxis"===t?"left"===r:void 0},o.hasAxisInAltrPos=function(t,e){var r=e.side;return"xaxis"===t?"top"===r:"yaxis"===t?"right"===r:void 0},o.getLabelPad=function(t,e){var r=1.5,n=e.title.font.size,i=e.showticklabels;return"xaxis"===t?"top"===e.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:"yaxis"===t?"right"===e.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},o.getTickPad=function(t){return"outside"===t.ticks?10+t.ticklen:15},o.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return"inside"===t.ticks?-e:e},t.exports=function(t){return new a(t)}},39952:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(17188),a=r(64859),o=r(9616),s=r(33816),l=r(57952),u=r(65460),c=r(84888).op;e.name="gl2d",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=s.idRegex,e.attrRegex=s.attrRegex,e.attributes=r(26720),e.supplyLayoutDefaults=function(t,e,r){e._has("cartesian")||l.supplyLayoutDefaults(t,e,r)},e.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),e.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:u.hoverlabel},"plot","nested"),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=c(r,"gl2d",o),u=s._scene2d;void 0===u&&(u=new i({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=u),u.plot(l,t.calcdata,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];s._scene2d&&0===c(t,"gl2d",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},e.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage("png");e._glimages.append("svg:image").attr({xmlns:o.svg,"xlink:href":a,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),i.destroy()}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++)e._plots[r[n]]._scene2d.updateFx(e.dragmode)}},17188:function(t,e,r){"use strict";var n,i,a=r(24040),o=r(54460),s=r(93024),l=r(67792).gl_plot2d,u=r(67792).gl_spikes2d,c=r(67792).gl_select_box,f=r(5408),h=r(92568),p=r(2428),d=r(16576),v=r(71888),g=v.enforce,y=v.clean,m=r(19280).doAutoRange,x=r(72760),b=x.drawMode,_=x.selectMode,w=["xaxis","yaxis"],T=r(33816).SUBPLOT_PATTERN;function k(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=u(this.glplot),this.selectBox=c(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}t.exports=k;var A=k.prototype;A.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement("canvas"),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(".gl-canvas-focus"),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return d(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style["pointer-events"]="none",this.updateSize(r);var a=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none";var o=this.mouseContainer=document.createElement("div");o.style.position="absolute",o.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),o.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},A.toImage=function(t){t||(t="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var u=0;u<4;++u){var c=a[4*(r*o+l)+u];a[4*(r*o+l)+u]=a[4*(r*s+l)+u],a[4*(r*s+l)+u]=c}var f=document.createElement("canvas");f.width=r,f.height=i;var h,p=f.getContext("2d",{willReadFrequently:!0}),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case"jpeg":h=f.toDataURL("image/jpeg");break;case"webp":h=f.toDataURL("image/webp");break;default:h=f.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(n),h},A.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},A.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=t[e][r].text+"";return t},A.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(T),r="xaxis"+e[1],n="yaxis"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},A.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout,i={},o=i[e._name+".range"]=e.range.slice(),s=i[r._name+".range"]=r.range.slice();i[e._name+".autorange"]=e.autorange,i[r._name+".autorange"]=r.autorange,a.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i);var l=n[e._name];l.range=o,l.autorange=e.autorange;var u=n[r._name];u.range=s,u.autorange=r.autorange,i.lastInputTime=this.camera.lastInputTime,t.emit("plotly_relayout",i)},A.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},A.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod("annotations","drawOne")(t,r)}},A.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map((function(e){t[e].dispose(),delete t[e]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},A.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:r._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:r._size}};y(s,this.xaxis),y(s,this.yaxis);var l,u,c=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[c.l+f[0]*c.w,c.b+h[0]*c.h,i-c.r-(1-f[1])*c.w,a-c.t-(1-h[1])*c.h],this.mouseContainer.style.width=c.w*(f[1]-f[0])+"px",this.mouseContainer.style.height=c.h*(h[1]-h[0])+"px",this.mouseContainer.height=c.h*(h[1]-h[0]),this.mouseContainer.style.left=c.l+f[0]*c.w+"px",this.mouseContainer.style.top=c.t+(1-h[1])*c.h+"px",u=0;u<2;++u)(l=this[w[u]])._length=o.viewBox[u+2]-o.viewBox[u],m(this.graphDiv,l),l.setScale();g(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},A.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},A.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},A.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],u=this.traces[i.uid];u?u.update(i,l):(u=i._module.plot(this,i,l),this.traces[i.uid]=u)}this.glplot.objects.sort((function(t,e){return t._trace.index-e._trace.index}))},A.updateFx=function(t){_(t)||b(t)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor="pan"===t?"move":"zoom"===t?"crosshair":null},A.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},A.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&"zoom"===i.dragmode){this.selectBox.enabled=!0;for(var u=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],c=0;c<2;c++)e.boxStart[c]===e.boxEnd[c]&&(u[c]=t.dataBox[c],u[c+2]=t.dataBox[c+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-p[1])*f.h)))&&a.object._trace.handlePick(a);if(d&&n&&this.emitPointAction(d,"plotly_click"),a&&"skip"!==a.object._trace.hoverinfo&&i.hovermode&&d&&(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var v=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),v.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,"plotly_hover");var g=this.fullData[v.trace.index]||{},y=v.pointIndex,m=s.castHoverinfo(g,i,y);if(m&&"all"!==m){var x=m.split("+");-1===x.indexOf("x")&&(v.traceCoord[0]=void 0),-1===x.indexOf("y")&&(v.traceCoord[1]=void 0),-1===x.indexOf("z")&&(v.traceCoord[2]=void 0),-1===x.indexOf("text")&&(v.textLabel=void 0),-1===x.indexOf("name")&&(v.name=void 0)}s.loneHover({x:v.screenCoord[0],y:v.screenCoord[1],xLabel:this.hoverFormatter("xaxis",v.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",v.traceCoord[1]),zLabel:v.traceCoord[2],text:v.textLabel,name:v.name,color:s.castHoverOption(g,y,"bgcolor")||v.color,borderColor:s.castHoverOption(g,y,"bordercolor"),fontFamily:s.castHoverOption(g,y,"font.family"),fontSize:s.castHoverOption(g,y,"font.size"),fontColor:s.castHoverOption(g,y,"font.color"),nameLength:s.castHoverOption(g,y,"namelength"),textAlign:s.castHoverOption(g,y,"align")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},A.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),s.loneUnhover(this.svgContainer))},A.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),"hover").text}}},12536:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(65460),a=r(98432),o=r(84888).op,s=r(3400),l=r(9616),u="gl3d",c="scene";e.name=u,e.attr=c,e.idRoot=c,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(6636),e.layoutAttributes=r(346),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(5208),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[u],i=0;i<n.length;i++){var s=n[i],l=o(r,u,s),c=e[s],f=c.camera,h=c._scene;h||(h=new a({id:s,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:f},e),c._scene=h),h.viewInitial||(h.viewInitial={up:{x:f.up.x,y:f.up.y,z:f.up.z},eye:{x:f.eye.x,y:f.eye.y,z:f.eye.z},center:{x:f.center.x,y:f.center.y,z:f.center.z}}),h.plot(l,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots[u]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[u],n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}},e.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return"1"===e&&(e=""),c+e}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[u],n=0;n<r.length;n++)e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}},6636:function(t){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},86140:function(t,e,r){"use strict";var n=r(76308),i=r(94724),a=r(92880).extendFlat,o=r(67824).overrideAll;t.exports=o({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:n.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:a({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},64380:function(t,e,r){"use strict";var n=r(49760).mix,i=r(3400),a=r(31780),o=r(86140),s=r(14944),l=r(28336),u=["xaxis","yaxis","zaxis"];t.exports=function(t,e,r){var c,f;function h(t,e){return i.coerce(c,f,o,t,e)}for(var p=0;p<u.length;p++){var d=u[p];c=t[d]||{},(f=a.newContainer(e,d))._id=d[0]+r.scene,f._name=d,s(c,f,h,r),l(c,f,h,{font:r.font,letter:d[0],data:r.data,showGrid:!0,noAutotickangles:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h("gridcolor",n(f.color,r.bgColor,72.72727272727273).toRgbString()),h("title.text",d[0]),f.setScale=i.noop,h("showspikes")&&(h("spikesides"),h("spikethickness"),h("spikecolor",f.color)),h("showaxeslabels"),h("showbackground")&&h("backgroundcolor")}}},44728:function(t,e,r){"use strict";var n=r(43080),i=r(3400),a=["xaxis","yaxis","zaxis"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t,e){for(var r=this,o=0;o<3;++o){var s=e[a[o]];s.visible?(r.labels[o]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[o]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[o]=s.title.font.family),s.title.font.size&&(r.labelSize[o]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[o]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[o]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[o]=s.title.font.variant)),"showline"in s&&(r.lineEnable[o]=s.showline),"linecolor"in s&&(r.lineColor[o]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[o]=s.linewidth),"showgrid"in s&&(r.gridEnable[o]=s.showgrid),"gridcolor"in s&&(r.gridColor[o]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[o]=s.gridwidth),"log"===s.type?r.zeroEnable[o]=!1:"zeroline"in s&&(r.zeroEnable[o]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[o]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[o]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[o]=!0:r.lineTickEnable[o]=!1,"ticklen"in s&&(r.lineTickLength[o]=r._defaultLineTickLength[o]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[o]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[o]=s.tickwidth),"tickangle"in s&&(r.tickAngle[o]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[o]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[o]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[o]=s.tickfont.family),s.tickfont.size&&(r.tickSize[o]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[o]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[o]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[o]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[o]=!0,r.lineMirror[o]=!0):!0===s.mirror?(r.lineTickMirror[o]=!1,r.lineMirror[o]=!0):(r.lineTickMirror[o]=!1,r.lineMirror[o]=!1):r.lineMirror[o]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[o]=!0,r.backgroundColor[o]=n(s.backgroundcolor)):r.backgroundEnable[o]=!1):(r.tickEnable[o]=!1,r.labelEnable[o]=!1,r.lineEnable[o]=!1,r.lineTickEnable[o]=!1,r.gridEnable[o]=!1,r.zeroEnable[o]=!1,r.backgroundEnable[o]=!1)}},t.exports=function(t,e){var r=new o;return r.merge(t,e),r}},5208:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(24040),o=r(168),s=r(64380),l=r(346),u=r(84888).op,c="gl3d";function f(t,e,r,n){for(var o=r("bgcolor"),l=i.combine(o,n.paper_bgcolor),f=["up","center","eye"],h=0;h<f.length;h++)r("camera."+f[h]+".x"),r("camera."+f[h]+".y"),r("camera."+f[h]+".z");r("camera.projection.type");var p=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),d=r("aspectmode",p?"manual":"auto");p||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},"manual"===d&&(e.aspectmode="auto"),t.aspectmode=e.aspectmode);var v=u(n.fullData,c,n.id);s(t,e,{font:n.font,scene:n.id,data:v,bgColor:l,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),a.getComponentMethod("annotations3d","handleDefaults")(t,e,n);var g=n.getDfltFromLayout("dragmode");if(!1!==g&&!g)if(g="orbit",t.camera&&t.camera.up){var y=t.camera.up.x,m=t.camera.up.y,x=t.camera.up.z;0!==x&&(y&&m&&x?x/Math.sqrt(y*y+m*m+x*x)>.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:c,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},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=[[],[],[]],u=0;u<3;++u){var c=s[a[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/t.dataScale[u],c.range[1]=r[u].hi/t.dataScale[u],c._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var h=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/h)}for(var p=n.calcTicks(c,{msUTC:!0}),d=0;d<p.length;++d)p[d].x=p[d].x*t.dataScale[u],"date"===c.type&&(p[d].text=p[d].text.replace(/\<br\>/g," "));l[u]=p,c.tickmode=f}}for(e.ticks=l,u=0;u<3;++u)for(o[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]),d=0;d<2;++d)e.bounds[d][u]=t.glplot.bounds[d][u];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(l)};var n=r(54460),i=r(3400),a=["xaxis","yaxis","zaxis"],o=[0,0,0]},94424:function(t){"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},98432:function(t,e,r){"use strict";var n,i,a=r(67792).gl_plot3d,o=a.createCamera,s=a.createScene,l=r(5408),u=r(89184),c=r(24040),f=r(3400),h=f.preserveDrawingBuffer(),p=r(54460),d=r(93024),v=r(43080),g=r(16576),y=r(94424),m=r(44728),x=r(9020),b=r(87152),_=r(19280).applyAutorangeOptions,w=!1;function T(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(e,e[this.id]),this.spikeOptions=x(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=T.prototype;k.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var A=!0;k.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!A||h)r=!1;else{f.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{h=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){h=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return A=!1,r},k.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=o(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){w=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!u&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},k.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,h=e.glplot.selection,v=0;v<u.length;++v)"skip"!==(t=e.traces[u[v]]).data.hoverinfo&&t.handlePick(h)&&(c=t),t.setContourLevels&&t.setContourLevels();function g(t,r,n){var i=e.fullSceneLayout[t+"axis"];return"log"!==i.type&&(r=i.d2l(r)),p.hoverLabelText(i,r,n)}if(null!==c){var m=y(e.glplot.cameraParams,h.dataCoordinate);t=c.data;var x,_=r._fullData[t.index],T=h.index,k={xLabel:g("x",h.traceCoordinate[0],t.xhoverformat),yLabel:g("y",h.traceCoordinate[1],t.yhoverformat),zLabel:g("z",h.traceCoordinate[2],t.zhoverformat)},A=d.castHoverinfo(_,e.fullLayout,T),M=(A||"").split("+"),S=A&&"all"===A;_.hovertemplate||S||(-1===M.indexOf("x")&&(k.xLabel=void 0),-1===M.indexOf("y")&&(k.yLabel=void 0),-1===M.indexOf("z")&&(k.zLabel=void 0),-1===M.indexOf("text")&&(h.textLabel=void 0),-1===M.indexOf("name")&&(c.name=void 0));var E=[];"cone"===t.type||"streamtube"===t.type?(k.uLabel=g("x",h.traceCoordinate[3],t.uhoverformat),(S||-1!==M.indexOf("u"))&&E.push("u: "+k.uLabel),k.vLabel=g("y",h.traceCoordinate[4],t.vhoverformat),(S||-1!==M.indexOf("v"))&&E.push("v: "+k.vLabel),k.wLabel=g("z",h.traceCoordinate[5],t.whoverformat),(S||-1!==M.indexOf("w"))&&E.push("w: "+k.wLabel),k.normLabel=h.traceCoordinate[6].toPrecision(3),(S||-1!==M.indexOf("norm"))&&E.push("norm: "+k.normLabel),"streamtube"===t.type&&(k.divergenceLabel=h.traceCoordinate[7].toPrecision(3),(S||-1!==M.indexOf("divergence"))&&E.push("divergence: "+k.divergenceLabel)),h.textLabel&&E.push(h.textLabel),x=E.join("<br>")):"isosurface"===t.type||"volume"===t.type?(k.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),E.push("value: "+k.valueLabel),h.textLabel&&E.push(h.textLabel),x=E.join("<br>")):x=h.textLabel;var L={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:T};d.appendArrayPointValue(L,_,T),t._module.eventData&&(L=_._module.eventData(L,h,_,{},T));var C={points:[L]};if(e.fullSceneLayout.hovermode){var O=[];d.loneHover({trace:_,x:(.5+.5*m[0]/m[3])*s,y:(.5-.5*m[1]/m[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:x,name:c.name,color:d.castHoverOption(_,T,"bgcolor")||c.color,borderColor:d.castHoverOption(_,T,"bordercolor"),fontFamily:d.castHoverOption(_,T,"font.family"),fontSize:d.castHoverOption(_,T,"font.size"),fontColor:d.castHoverOption(_,T,"font.color"),nameLength:d.castHoverOption(_,T,"namelength"),textAlign:d.castHoverOption(_,T,"align"),hovertemplate:f.castOption(_,T,"hovertemplate"),hovertemplateLabels:f.extendFlat({},L,k),eventData:[L]},{container:n,gd:r,inOut_bbox:O}),L.bbox=O[0]}h.distance<5&&(h.buttons||w)?r.emit("plotly_click",C):r.emit("plotly_hover",C),this.oldEventData=C}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},k.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],u=e[o+"calendar"],c=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(c||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1)}}k.plot=function(t,e,r){var n=this;if(n.plotArgs=[t,e,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=e[n.id],f=r[n.id];n.fullLayout=e,n.fullSceneLayout=c,n.axesOptions.merge(e,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(v(c.bgcolor)),n.setConvert(l),t?Array.isArray(t)||(t=[t]):t=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&S(this,i,h);!function(t,e){for(var r=t.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=M[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var u=n[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(e[0][i]=Math.min(e[0][i],c),e[1][i]=Math.max(e[1][i],c))}}}(this,h);var p=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?p[s]=1:p[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=p,n.convertAnnotations(this),o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&((a=n.traces[i.uid])?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var d=Object.keys(n.traces);t:for(o=0;o<d.length;++o){for(s=0;s<t.length;++s)if(t[s].uid===d[o]&&!0===t[s].visible&&0!==t[s]._length)continue t;(a=n.traces[d[o]]).dispose(),delete n.traces[d[o]]}n.glplot.objects.sort((function(t,e){return t._trace.data.index-e._trace.data.index}));var g,y=[[0,0,0],[0,0,0]],m=[],x={};for(o=0;o<3;++o){var b;if((u=(l=c[M[o]]).type)in x?(x[u].acc*=p[o],x[u].count+=1):x[u]={acc:p[o],count:1},l.autorange){y[0][o]=1/0,y[1][o]=-1/0;var w=n.glplot.objects,T=n.fullSceneLayout.annotations||[],k=l._name.charAt(0);for(s=0;s<w.length;s++){var A=w[s],E=A.bounds,L=A._trace.data._pad||0;"ErrorBars"===A.constructor.name&&l._lowerLogErrorBound?y[0][o]=Math.min(y[0][o],l._lowerLogErrorBound):y[0][o]=Math.min(y[0][o],E[0][o]/p[o]-L),y[1][o]=Math.max(y[1][o],E[1][o]/p[o]+L)}for(s=0;s<T.length;s++){var C=T[s];if(C.visible){var O=l.r2l(C[k]);y[0][o]=Math.min(y[0][o],O),y[1][o]=Math.max(y[1][o],O)}}if("rangemode"in l&&"tozero"===l.rangemode&&(y[0][o]=Math.min(y[0][o],0),y[1][o]=Math.max(y[1][o],0)),y[0][o]>y[1][o])y[0][o]=-1,y[1][o]=1;else{var P=y[1][o]-y[0][o];y[0][o]-=P/32,y[1][o]+=P/32}if(b=[y[0][o],y[1][o]],b=_(b,l),y[0][o]=b[0],y[1][o]=b[1],l.isReversed()){var I=y[0][o];y[0][o]=y[1][o],y[1][o]=I}}else b=l.range,y[0][o]=l.r2l(b[0]),y[1][o]=l.r2l(b[1]);y[0][o]===y[1][o]&&(y[0][o]-=1,y[1][o]+=1),m[o]=y[1][o]-y[0][o],l.range=[y[0][o],y[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var D=c.aspectmode;if("cube"===D)g=[1,1,1];else if("manual"===D){var z=c.aspectratio;g=[z.x,z.y,z.z]}else{if("auto"!==D&&"data"!==D)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[u=(l=c[M[o]]).type];R[o]=Math.pow(F.acc,1/F.count)/p[o]}g="data"===D||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}c.aspectratio.x=f.aspectratio.x=g[0],c.aspectratio.y=f.aspectratio.y=g[1],c.aspectratio.z=f.aspectratio.z=g[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var B=c.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()}},k.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)},k.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"}}},k.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())},k.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},k.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},k.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(t),h=s.isAspectChanged(t),p=u||h;if(p){var d={};u&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+".camera")).get(),d[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",t,l._preGUI,d),u&&(r.set(e),f.nestedProperty(l,s.id+".camera").set(e)),h&&(a.set(i),f.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},k.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var h=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[h]=p;var v=i.layout;c.call("_storeDirectGUIEdit",v,a._preGUI,d),o.up=p,f.nestedProperty(v,h).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},k.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<e;++a)for(var o=0;o<4;++o){var s=4*(e*n+a)+o,l=4*(e*i+a)+o,u=t[s];t[s]=t[l],t[l]=u}}(o,i,a),function(t,e,r){for(var n=0;n<r;++n)for(var i=0;i<e;++i){var a=4*(e*n+i),o=t[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,u=s.getContext("2d",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},k.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},k.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t._mockAxis,e)},t.exports=T},52094:function(t){"use strict";t.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a<n;a++)i[a]=[t[a],e[a],r[a]];return i}},64859:function(t,e,r){"use strict";var n=r(25376),i=r(85656),a=r(22548),o=r(92872),s=r(34200),l=r(66741),u=r(92880).extendFlat,c=n({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:u(l({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:u({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},47552:function(t,e,r){"use strict";var n=r(95376),i="1.13.4",a='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',o=['© <a target="_blank" href="https://carto.com/">Carto</a>',a].join(" "),s=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],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 <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),tiles:["https://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"}},u=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:u,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @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:",u.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},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,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s}return{anchor:u[0]&&u[1]?u.join("-"):u[0]?u[0]:u[1]?u[1]:"center",offset:c}}},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),u=r(33428),c=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;l<e.length;l++){var u=r[e[l]],c=u.accesstoken;v(u.style)&&(c?i.pushUnique(n,c):(v(u._input.style)&&(i.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),c&&i.pushUnique(a,c)}if(s){var f=o?d.noAccessTokenErrorMsg:d.missingStyleErrorMsg;throw i.error(f),new Error(f)}return n.length?(n.length>1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l<a.length;l++){var u=a[l],c=s(r,p,u),f=e[u],g=f._subplot;g||(g=new h(t,u),e[u]._subplot=g),g.viewInitial||(g.viewInitial={center:i.extendFlat({},f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch}),g.plot(c,e,t._promises)}},e.clean=function(t,e,r,n){for(var i=n._subplots[p]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=e._size,i=0;i<r.length;i++){var s=e[r[i]],h=s.domain,v=s._subplot.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":v,x:n.l+n.w*h.x[0],y:n.t+n.h*(1-h.y[1]),width:n.w*(h.x[1]-h.x[0]),height:n.h*(h.y[1]-h.y[0]),preserveAspectRatio:"none"});var g=u.select(s._subplot.div);if(null!==g.select(".mapboxgl-ctrl-logo").node().offsetParent){var y=e._glimages.append("g");y.attr("transform",a(n.l+n.w*h.x[0]+10,n.t+n.h*(1-h.y[0])-31)),y.append("path").attr("d",d.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),y.append("path").attr("d",d.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),y.append("path").attr("d",d.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),y.append("polygon").attr("points",d.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var m=g.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),x=e._glimages.append("g"),b=x.append("text");b.text(m).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":m});var _=c.bBox(b.node()),w=n.w*(h.x[1]-h.x[0]);if(_.width>w/2){var T=m.split("|").join("<br>");b.text(T).attr("data-unformatted",T).call(f.convertToTspans,t),_=c.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 k=1;_.width+6>w&&(k=w/(_.width+6));var A=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];x.attr("transform",a(A[0],A[1])+o(k))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},22360:function(t,e,r){"use strict";var n=r(3400),i=r(72736).sanitizeHTML,a=r(89032),o=r(47552);function s(t,e){this.subplot=t,this.uid=t.uid+"-"+e,this.index=e,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function u(t){if(!t.visible)return!1;var e=t.source;if(Array.isArray(e)&&e.length>0){for(var r=0;r<e.length;r++)if("string"!=typeof e[r]||0===e[r].length)return!1;return!0}return n.isPlainObject(e)||"string"==typeof e&&e.length>0}function c(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=u(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,u(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r<e.length;r++){var n=e[r].id;if("string"==typeof n&&0===n.indexOf(o.traceLayerPrefix)){t=n;break}}return t},l.updateLayer=function(t){var e=this.subplot,r=c(t),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),u(t)&&e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type,minzoom:t.minzoom,maxzoom:t.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=t.type,this.below=n},l.updateStyle=function(t){if(u(t)){var e=c(t);this.subplot.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",e.paint)}},l.removeLayer=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},l.dispose=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer),t.getSource(this.idSource)&&t.removeSource(this.idSource)},t.exports=function(t,e,r){var n=new s(t,e);return n.update(r),n}},5232:function(t,e,r){"use strict";var n=r(3400),i=r(76308).defaultLine,a=r(86968).u,o=r(25376),s=r(52904).textposition,l=r(67824).overrideAll,u=r(31780).templatedArray,c=r(47552),f=o({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});f.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:a({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:c.styleValuesMapbox.concat(c.styleValuesNonMapbox),dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:u("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:f,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},5976:function(t,e,r){"use strict";var n=r(3400),i=r(168),a=r(51272),o=r(5232);function s(t,e,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),u=r("bounds.north");void 0!==i&&void 0!==o&&void 0!==s&&void 0!==u||delete e.bounds,a(t,e,{name:"layers",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r("visible")){var i,a=r("sourcetype"),s="raster"===a||"image"===a;r("source"),r("sourceattribution"),"vector"===a&&r("sourcelayer"),"image"===a&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=e.type="raster",n.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(t,e,r){i(t,e,r,{type:"mapbox",attributes:o,handleDefaults:s,partition:"y",accessToken:e._mapboxAccessToken})}},14440:function(t,e,r){"use strict";var n=r(3480),i=r(3400),a=r(27144),o=r(24040),s=r(54460),l=r(86476),u=r(93024),c=r(72760),f=c.drawMode,h=c.selectMode,p=r(22676).prepSelect,d=r(22676).clearOutline,v=r(22676).clearSelectionsCache,g=r(22676).selectOnClick,y=r(47552),m=r(22360);function x(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var b=x.prototype;b.plot=function(t,e,r){var n,i=this,a=e[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},b.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style,e);o.accessToken=s.accesstoken;var u=s.bounds,c=u?[[u.west,u.south],[u.east,u.north]]:null,f=o.map=new n.Map({container:o.div,style:l.style,center:k(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:c,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));f._canvas.style.left="0px",f._canvas.style.top="0px",o.rejectOnError(i),o.isStatic||o.initFx(t,e);var h=[];h.push(new Promise((function(t){f.once("load",t)}))),h=h.concat(a.fetchTraceGeoData(t)),Promise.all(h).then((function(){o.fillBelowLookup(t,e),o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)})).catch(i)},b.updateMap=function(t,e,r,n){var i=this,o=i.map,s=e[this.id];i.rejectOnError(n);var l=[],u=w(s.style,e);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,o.setStyle(u.style),i.traceHash={},l.push(new Promise((function(t){o.once("styledata",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},b.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),a["trace-"+s.uid]=n||""}for(r=0;r<i.length;r++){var u=i[r];n="string"==typeof u.below?u.below:o?"traces":"",a["layout-"+r]=n}var c,f,h={};for(c in a)h[n=a[c]]?h[n].push(c):h[n]=[c];for(n in h){var p=h[n];if(p.length>1)for(r=0;r<p.length;r++)0===(c=p[r]).indexOf("trace-")?(f=c.split("trace-")[1],this.traceHash[f]&&(this.traceHash[f].below=null)):0===c.indexOf("layout-")&&(f=c.split("layout-")[1],this.layerList[f]&&(this.layerList[f].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(t,e){var r={};if(i.isPlainObject(t))r.id=t.id,r.style=t;else if("string"==typeof t)if(r.id=t,-1!==y.styleValuesMapbox.indexOf(t))r.style=T(t);else if(y.stylesNonMapbox[t]){r.style=y.stylesNonMapbox[t];var n=r.style.sources["plotly-"+t],a=n?n.tiles:void 0;a&&a[0]&&"?api_key="===a[0].slice(-9)&&(a[0]+=e._mapboxAccessToken)}else r.style=t;else r.id=y.styleValueDflt,r.style=T(y.styleValueDflt);return r.transition={duration:0,delay:0},r}function T(t){return y.styleUrlPrefix+t+"-"+y.styleUrlSuffix}function k(t){return[t.lon,t.lat]}b.updateData=function(t){var e,r,n,i,a=this.traceHash,o=t.slice().sort((function(t,e){return _[t[0].trace.type]-_[e[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(e=a[(r=s[0].trace).uid])&&(e.type===r.type?(e.update(s),l=!0):e.dispose()),!l&&r._module&&(a[r.uid]=r._module.plot(this,s))}var u=Object.keys(a);t:for(n=0;n<u.length;n++){var c=u[n];for(i=0;i<t.length;i++)if(c===(r=t[i][0].trace).uid)continue t;(e=a[c]).dispose(),delete a[c]}},b.updateLayout=function(t){var e=this.map,r=t[this.id];this.dragging||this.wheeling||(e.setCenter(k(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch)),this.updateLayers(t),this.updateFramework(t),this.updateFx(t),this.map.resize(),this.gd._context._scrollZoom.mapbox?e.scrollZoom.enable():e.scrollZoom.disable()},b.resolveOnRender=function(t){var e=this.map;e.on("render",(function r(){e.loaded()&&(e.off("render",r),setTimeout(t,10))}))},b.rejectOnError=function(t){var e=this.map;function r(){t(new Error(y.mapOnErrorMsg))}e.once("error",r),e.once("style.error",r),e.once("source.error",r),e.once("tile.error",r),e.once("layer.error",r)},b.createFramework=function(t){var e=this,r=e.div=document.createElement("div");r.id=e.uid,r.style.position="absolute",e.container.appendChild(r),e.xaxis={_id:"x",c2p:function(t){return e.project(t).x}},e.yaxis={_id:"y",c2p:function(t){return e.project(t).y}},e.updateFramework(t),e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},s.setConvert(e.mockAxis,t)},b.initFx=function(t,e){var r=this,n=r.gd,i=r.map;function a(){u.loneUnhover(e._hoverlayer)}function s(){var t=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(t))}i.on("moveend",(function(t){if(r.map){var e=n._fullLayout;if(t.originalEvent||r.wheeling){var i=e[r.id];o.call("_storeDirectGUIEdit",n.layout,e._preGUI,r.getViewEdits(i));var a=r.getView();i._input.center=i.center=a.center,i._input.zoom=i.zoom=a.zoom,i._input.bearing=i.bearing=a.bearing,i._input.pitch=i.pitch=a.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(a))}t.originalEvent&&"mouseup"===t.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),e._rehover&&e._rehover()}})),i.on("wheel",(function(){r.wheeling=!0})),i.on("mousemove",(function(t){var e=r.div.getBoundingClientRect(),a=[t.originalEvent.offsetX,t.originalEvent.offsetY];t.target.getBoundingClientRect=function(){return e},r.xaxis.p2c=function(){return i.unproject(a).lng},r.yaxis.p2c=function(){return i.unproject(a).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&u.hover(n,t,r.id)},u.hover(n,t,r.id),n._fullLayout._hoversubplot=r.id})),i.on("dragstart",(function(){r.dragging=!0,a()})),i.on("zoomstart",a),i.on("mouseout",(function(){n._fullLayout._hoversubplot=null})),i.on("drag",s),i.on("zoom",s),i.on("dblclick",(function(){var t=n._fullLayout[r.id];o.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(t));var e=r.viewInitial;i.setCenter(k(e.center)),i.setZoom(e.zoom),i.setBearing(e.bearing),i.setPitch(e.pitch);var a=r.getView();t._input.center=t.center=a.center,t._input.zoom=t.zoom=a.zoom,t._input.bearing=t.bearing=a.bearing,t._input.pitch=t.pitch=a.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(a))})),r.clearOutline=function(){v(r.dragOptions),d(r.dragOptions.gd)},r.onClickInPanFn=function(t){return function(e){var i=n._fullLayout.clickmode;i.indexOf("select")>-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&u.click(n,e.originalEvent)}}},b.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(u)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),h(o)||f(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},b.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e<n.length;e++)n[e].dispose();for(n=this.layerList=[],e=0;e<r.length;e++)n.push(m(this,e,r[e]))}else for(e=0;e<r.length;e++)n[e].update(r[e])},b.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},b.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},b.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},b.getMapLayers=function(){return this.map.getStyle().layers},b.addLayer=function(t,e){var r=this.map;if("string"==typeof e){if(""===e)return void r.addLayer(t,e);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(e===n[a].id)return void r.addLayer(t,e);i.warn(["Trying to add layer with *below* value",e,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(t)},b.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},b.getView=function(){var t=this.map,e=t.getCenter(),r={lon:e.lng,lat:e.lat},n=t.getCanvas(),i=parseInt(n.style.width),a=parseInt(n.style.height);return{center:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),_derived:{coordinates:[t.unproject([0,0]).toArray(),t.unproject([i,0]).toArray(),t.unproject([i,a]).toArray(),t.unproject([0,a]).toArray()]}}},b.getViewEdits=function(t){for(var e=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[e+"."+a]=t[a]}return n},b.getViewEditsWithDerived=function(t){var e=this.id,r=this.getViewEdits(t);return r[e+"._derived"]=t._derived,r},t.exports=x},66741:function(t){"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},7316:function(t,e,r){"use strict";var n=r(33428),i=r(94336).m_,a=r(57624).SO,o=r(38248),s=r(83160),l=r(24040),u=r(73060),c=r(31780),f=r(3400),h=r(76308),p=r(39032).BADNUM,d=r(79811),v=r(1936).clearOutline,g=r(55308),y=r(85656),m=r(16672),x=r(84888)._M,b=f.relinkPrivateKeys,_=f._,w=t.exports={};f.extendFlat(w,l),w.attributes=r(45464),w.attributes.type.values=w.allTypes,w.fontAttrs=r(25376),w.layoutAttributes=r(64859);var T=w.transformsRegistry,k=r(62460);w.executeAPICommand=k.executeAPICommand,w.computeAPICommandBindings=k.computeAPICommandBindings,w.manageCommandObserver=k.manageCommandObserver,w.hasSimpleAPICommandBindings=k.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=f.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=f.getGraphDiv(t);var r=new Promise((function(r,n){t&&!f.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||f.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=f.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:h.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){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 A=["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;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=t._context.locales,u=0;u<2;u++){var c=(s[r]||{}).format;if(c&&(a(c),n))break;s=l.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||a(l.localeRegistry.en.format),i}function E(t,e){var r={_fullLayout:e},n="x"===t._id.charAt(0),i=t._mainAxis._anchorAxis,a="",o="",s="";if(i&&(s=i._mainAxis._id,a=n?t._id+s:s+t._id),!a||!e._plots[a]){a="";for(var l=t._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?t._id+c:c+t._id;o||(o=f);var h=d.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}function L(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||T[n.type];if(i&&i.makesData)return!0}return!1}function C(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=T[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function O(t){return"string"==typeof t&&"px"===t.substr(t.length-2)&&parseFloat(t)}function P(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={}),t._reservedMargin||(t._reservedMargin={})}w.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,s=t._fullLayout={},u=t.layout||{},c=t._fullData||[],h=t._fullData=[],p=t.data||[],d=t.calcdata||[],g=t._context||{};t._transitionData||w.createTransitionData(t),s._dfltTitle={plot:_(t,"Click to enter Plot title"),subtitle:_(t,"Click to enter Plot subtitle"),x:_(t,"Click to enter X axis title"),y:_(t,"Click to enter Y axis title"),colorbar:_(t,"Click to enter Colorscale title"),annotation:_(t,"new text")},s._traceWord=_(t,"trace");var y=S(t,A);if(s._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var m=n.width,x=n.height;w.supplyLayoutGlobalDefaults(u,s,y),u.width||(s.width=m),u.height||(s.height=x),w.sanitizeMargins(s)}else{w.supplyLayoutGlobalDefaults(u,s,y);var T=!u.width||!u.height,k=s.autosize,E=g.autosizable;T&&(k||E)?w.plotAutoSize(t,u,s):T&&w.sanitizeMargins(s),!k&&T&&(u.width=s.width,u.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return e},timeFormat:i(t).utcFormat}}(y,s.separators),s._extraFormat=S(t,M),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var L=s._subplots=function(){var t,e,r=l.collectableSubplotTypes,n={};if(!r){r=[];var i=l.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)f.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),C=s._splomAxes={x:{},y:{}},O=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),u={};function c(t,e){l[e]=t,u[t]=1}function h(t,e){if(t&&"string"==typeof t&&!u[t])return c(t,e),!0}for(r=0;r<i;r++){var p=e[r].uid;"number"==typeof p&&(p=String(p)),h(p,r)||r<s&&h(a[r].uid,r)||c(f.randstr(u),r)}return l}(c,p),s._globalTransforms=(t._context||{}).globalTransforms,w.supplyDataDefaults(p,h,u,s);var I=Object.keys(C.x),D=Object.keys(C.y);if(I.length>1&&D.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o<I.length;o++)f.pushUnique(L.xaxis,I[o]);for(o=0;o<D.length;o++)f.pushUnique(L.yaxis,D[o]);for(var z in O)f.pushUnique(L.cartesian,z)}if(s._has=w._hasPlotType.bind(s),c.length===h.length)for(o=0;o<h.length;o++)b(h[o],c[o]);w.supplyLayoutModuleDefaults(u,s,h,t._transitionData);var R=s._visibleModules,F=[];for(o=0;o<R.length;o++){var B=R[o].crossTraceDefaults;B&&f.pushUnique(F,B)}for(o=0;o<F.length;o++)F[o](h,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&I.length>15&&D.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(h,s,c,n),w.cleanPlot(h,s,c,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;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a._meta={meta:a.meta}:e.meta&&(a._meta={meta:e.meta}),e.meta&&(a._meta.layout={meta:e.meta})}n.length&&(r||(r=e._meta={}),r.data=n)}(h,s),b(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(h,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var q,H=s._tracePreGUI,G={};for(q in H)G[q]="old";for(o=0;o<h.length;o++)G[q=h[o]._fullInput.uid]||(H[q]={}),G[q]="new";for(q in G)"old"===G[q]&&delete H[q];P(s),l.getComponentMethod("rangeslider","makeData")(s),r||d.length!==h.length||w.supplyDefaultsUpdateCalc(d,h)}},w.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,l,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],l=f.nestedProperty(a,s).get().slice(),f.nestedProperty(n,s).set(l)}i.trace=n}}},w.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},w._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=l.modules[i];if(a&&a.categories[t])return!0}return!1},w.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has("gl"),u=e._has&&e._has("gl");l&&!u&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var c=!!n._infolayer;t:for(i=0;i<r.length;i++){var f=r[i].uid;for(a=0;a<t.length;a++)if(f===t[a].uid)continue t;c&&n._infolayer.select(".cb"+f).remove()}},w.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},u=e._subplots,c={_fullData:t,_fullLayout:e},h=u.cartesian.concat(u.gl2d||[]);for(i=0;i<h.length;i++){var p,v=h[i],g=o[v],y=d.getFromId(c,v,"x"),m=d.getFromId(c,v,"y");for(g?p=s[v]=g:(p=s[v]={}).id=v,y._counterAxes.push(m._id),m._counterAxes.push(y._id),y._subplotsWith.push(v),m._subplotsWith.push(v),p.xaxis=y,p.yaxis=m,p._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===p.xaxis._id&&x.yaxis===p.yaxis._id&&!1===x.cliponaxis){p._hasClipOnAxisFalse=!0;break}}}var b,_=d.list(c,null,!0);for(i=0;i<_.length;i++){var w=null;(b=_[i]).overlaying&&(w=d.getFromId(c,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis="free"===b.anchor?null:d.getFromId(c,b.anchor)}for(i=0;i<_.length;i++)if((b=_[i])._counterAxes.sort(d.idSort),b._subplotsWith.sort(f.subplotSort),b._mainSubplot=E(b,e),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||l.getComponentMethod("rangeslider","isVisible")(b))){var T=1,k=0;for(a=0;a<b._counterAxes.length;a++){var A=d.getFromId(c,b._counterAxes[a]);T=Math.min(T,A.domain[0]),k=Math.max(k,A.domain[1])}T<k&&(b._counterDomainMin=T,b._counterDomainMax=k)}},w.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],u.crawl(t._module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,"color"===t.valType&&void 0===t.dflt&&e.push(r.join("."))}))),n=0;n<e.length;n++)f.nestedProperty(t,"_input."+e[n]).get()||f.nestedProperty(t,e[n]).set(null)},w.supplyDataDefaults=function(t,e,r,n){var i,a,o,s=n._modules,u=n._visibleModules,h=n._basePlotModules,p=0,d=0;function v(t){e.push(t);var r=t._module;r&&(f.pushUnique(s,r),!0===t.visible&&f.pushUnique(u,r),f.pushUnique(h,t._module.basePlotModule),p++,!1!==t._input.visible&&d++)}n._transformModules=[];var g={},y=[],m=(r.template||{}).data||{},x=c.traceTemplater(m);for(i=0;i<t.length;i++){if(o=t[i],(a=x.newTrace(o)).uid=n._traceUids[i],w.supplyTraceDefaults(o,a,d,n,i),a.index=i,a._input=o,a._expandedIndex=p,a.transforms&&a.transforms.length)for(var _=!1!==o.visible&&!1===a.visible,T=C(a,e,r,n),k=0;k<T.length;k++){var A=T[k],M={_template:a._template,type:a.type,uid:a.uid+k};_&&!1===A.visible&&delete A.visible,w.supplyTraceDefaults(A,M,p,n,i),b(M,A),M.index=i,M._input=o,M._fullInput=a,M._expandedIndex=p,M._expandedInput=A,v(M)}else a._fullInput=a,a._expandedInput=a,v(a);l.traceIs(a,"carpetAxis")&&(g[a.carpet]=a),l.traceIs(a,"carpetDependent")&&y.push(i)}for(i=0;i<y.length;i++)if((a=e[y[i]]).visible){var S=g[a.carpet];a._carpet=S,S&&S.visible?(a.xaxis=S.xaxis,a.yaxis=S.yaxis):a.visible=!1}},w.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return f.coerce(t||{},r,y,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=w.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=w.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=w.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=w.supplyAnimationTransitionDefaults(t.transition||{});return r},w.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,y.frame,r,n)}return r("duration"),r("redraw"),e},w.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,y.transition,r,n)}return r("duration"),r("easing"),e},w.supplyFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t,e,m,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},w.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||h.defaults,s=o[r%o.length];function u(r,n){return f.coerce(t,e,w.attributes,r,n)}var c=u("visible");u("type"),u("name",n._traceWord+" "+i),u("uirevision",n.uirevision);var p=w.getModule(e);if(e._module=p,p){var d=p.basePlotModule,v=d.attr,g=d.attributes;if(v&&g){var y=n._subplots,m="";if(c||"gl2d"!==d.name){if(Array.isArray(v))for(a=0;a<v.length;a++){var x=v[a],b=f.coerce(t,e,g,x);y[x]&&f.pushUnique(y[x],b),m+=b}else m=f.coerce(t,e,g,v);y[d.name]&&f.pushUnique(y[d.name],m)}}}if(c){if(u("customdata"),u("ids"),u("meta"),l.traceIs(e,"showLegend")?(f.coerce(t,e,p.attributes.showlegend?p.attributes:w.attributes,"showlegend"),u("legend"),u("legendwidth"),u("legendgroup"),u("legendgrouptitle.text"),u("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,p&&p.supplyDefaults(t,e,s,n),l.traceIs(e,"noOpacity")||u("opacity"),l.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),l.traceIs(e,"noHover")||(e.hovertemplate||f.coerceHoverinfo(t,e,n),"parcats"!==e.type&&l.getComponentMethod("fx","supplyDefaults")(t,e,s,n)),p&&p.selectPoints){var _=u("selectedpoints");f.isTypedArray(_)&&(e.selectedpoints=Array.from(_))}w.supplyTransformDefaults(t,e,n)}return e},w.hasMakesDataTransform=L,w.supplyTransformDefaults=function(t,e,r){if(e._length||L(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var u,c=o[l],h=c.type,p=T[h],d=!(c._module&&c._module===p),v=p&&"function"==typeof p.transform;p||f.warn("Unrecognized transform type "+h+"."),p&&p.supplyDefaults&&(d||v)?((u=p.supplyDefaults(c,e,r,t)).type=h,u._module=p,f.pushUnique(i,p)):u=f.extendFlat({},c),s.push(u)}}},w.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return f.coerce(t,e,w.layoutAttributes,r,n)}var i=t.template;f.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),n("autotypenumbers");var a=f.coerceFont(n,"font"),o=a.size;f.coerceFont(n,"title.font",a,{overrideDflt:{size:Math.round(1.4*o)}}),n("title.text",e._dfltTitle.plot),n("title.xref");var s=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var u=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),n("title.subtitle.text",e._dfltTitle.subtitle),f.coerceFont(n,"title.subtitle.font",a,{overrideDflt:{size:Math.round(.7*e.title.font.size)}}),u&&("paper"===s&&(0!==e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=0===e.title.y?"top":"bottom")),"container"===s&&("auto"===e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=e.title.y<.5?"bottom":"top"))),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(t.width&&t.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),t.width&&t.height&&w.sanitizeMargins(e),l.getComponentMethod("grid","sizeDefaults")(t,e),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var c=n("uirevision");n("editrevision",c),n("selectionrevision",c),l.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,n),l.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,n),n("meta"),f.isPlainObject(t.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),l.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),l.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,n),f.coerce(t,e,g,"scattermode")},w.plotAutoSize=function(t,e,r){var n,i,a=t._context||{},s=a.frameMargins,l=f.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(n=O(u.width)||O(u.maxWidth)||r.width,i=O(u.height)||O(u.maxHeight)||r.height,o(s)&&s>0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var h=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n<h&&(n=h),i<p&&(i=p);var d=!e.width&&Math.abs(r.width-n)>1,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,u=e._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in u.length||u.push(c),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),c.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(f.subplotSort);for(a=0;a<u.length;a++)(o=u[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var p=e._modules;for(a=0;a<p.length;a++)(o=p[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},w.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),f.clearThrottle(),f.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},w.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&f.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},w.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},w.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},w.autoMargin=function(t,e,r){var n=t._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=f.constrain(i-o.l-o.r,2,s),c=f.constrain(a-o.t-o.b,2,l),h=Math.max(0,i-u),p=Math.max(0,a-c),d=n._pushmargin,v=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var g=r.pad;if(void 0===g&&(g=Math.min(12,o.l,o.r,o.t,o.b)),h){var y=(r.l+r.r)/h;y>1&&(r.l/=y,r.r/=y)}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,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},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={}),P(e);var i=e._size,a=e.margin,s={t:0,b:0,l:0,r:0},u=f.extendFlat({},i),c=a.l,h=a.r,p=a.t,v=a.b,g=e._pushmargin,y=e._pushmarginIds,m=e.minreducedwidth,x=e.minreducedheight;if(!1!==a.autoexpand){for(var b in g)y[b]||delete g[b];var _=t._fullLayout._reservedMargin;for(var T in _)for(var k in _[T]){var A=_[T][k];s[k]=Math.max(s[k],A)}for(var M in g.base={l:{val:0,size:c},r:{val:1,size:h},t:{val:1,size:p},b:{val:0,size:v}},s){var S=0;for(var E in g)"base"!==E&&o(g[E][M].size)&&(S=g[E][M].size>S?g[E][M].size:S);var L=Math.max(0,a[M]-S);s[M]=Math.max(0,s[M]-L)}for(var C in g){var O=g[C].l||{},I=g[C].b||{},D=O.val,z=O.size,R=I.val,F=I.size,B=r-s.r-s.l,N=n-s.t-s.b;for(var j in g){if(o(z)&&g[j].r){var U=g[j].r.val,V=g[j].r.size;if(U>D){var q=(z*U+(V-B)*D)/(U-D),H=(V*(1-D)+(z-B)*(1-U))/(U-D);q+H>c+h&&(c=q,h=H)}}if(o(F)&&g[j].t){var G=g[j].t.val,W=g[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=(c+h)/J;Q>1&&(c/=Q,h/=Q)}if($){var tt=(v+p)/$;tt>1&&(v/=tt,p/=tt)}if(i.l=Math.round(c)+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(u,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(y).length);if(e._redrawFromAutoMarginCount<et)return l.call("_doPlot",t);e._size=u,f.warn("Too many auto-margin redraws.")}!function(t){var e=d.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var I=["l","r","t","b","p","w","h"];function D(t,e,r){var n=!1,i=[w.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,w.rehover,w.reselect,function(){return t.emit("plotly_transitioning",[]),new Promise((function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return 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;r<I.length;r++){var n=I[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)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,u=(t._transitionData||{})._frames;function c(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]=c(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 c({dtype:t.dtype,shape:t.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map((function(t){return c(t,e)})):o?f.simpleMap(t,f.identity):f.isJSDate(t)?f.ms2DateTimeLocal(+t):t}var h={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(h.layout=c(l),i)){var p=l._size;h.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return u&&(h.frames=c(u)),a&&(h.config=c(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<e.length;r++)switch((n=e[r]).type){case"replace":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case"insert":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case"delete":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},w.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error("computeFrame must be given a string frame name");var s=o[e.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===u.indexOf(s.name);)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=w.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(c.traces||(c.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=c.traces.indexOf(i))&&(a=c.data.length,c.traces[a]=i),c.data[a]=w.extendTrace(c.data[a],s.data[r]))}return c},w.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},w.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,u,c=f.extendDeepNoArrays({},e||{}),h=f.expandObjectPaths(c),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=f.nestedProperty(h,r[a])).get())?f.nestedProperty(p,r[a]).set(null):(n.set(null),f.nestedProperty(p,r[a]).set(i));if(t=f.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(l=f.nestedProperty(p,r[a]).get()){for(u=(s=f.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<l.length;o++){var d=l[o];u[o]=null===d?null:w.extendObjectWithContainers(u[o],d)}s.set(u)}return t},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=l.layoutArrayContainers,w.extendTrace=function(t,e){return w.extendObjectWithContainers(t,e,w.dataArrayContainers)},w.extendLayout=function(t,e){return w.extendObjectWithContainers(t,e,w.layoutArrayContainers)},w.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var u=a[o],c=t._fullData[u]._module;if(c){if(c.animatable){var h=c.basePlotModule.name;s[h]||(s[h]=[]),s[h].push(u)}t.data[a[o]]=w.extendTrace(t.data[a[o]],e[o])}}var p=f.expandObjectPaths(f.extendDeepNoArrays({},r)),d=/^[xy]axis[0-9]*$/;for(var v in p)d.test(v)&&delete p[v].range;w.extendLayout(t.layout,p),delete t.calcdata,w.supplyDefaults(t),w.doCalcdata(t);var g=f.expandObjectPaths(r);if(g){var y=t._fullLayout._plots;for(var m in y){var x=y[m],b=x.xaxis,_=x.yaxis,T=b.range.slice(),k=_.range.slice(),A=null,M=null,S=null,E=null;Array.isArray(g[b._name+".range"])?A=g[b._name+".range"].slice():Array.isArray((g[b._name]||{}).range)&&(A=g[b._name].range.slice()),Array.isArray(g[_._name+".range"])?M=g[_._name+".range"].slice():Array.isArray((g[_._name]||{}).range)&&(M=g[_._name].range.slice()),T&&A&&(b.r2l(T[0])!==b.r2l(A[0])||b.r2l(T[1])!==b.r2l(A[1]))&&(S={xr0:T,xr1:A}),k&&M&&(_.r2l(k[0])!==_.r2l(M[0])||_.r2l(k[1])!==_.r2l(M[1]))&&(E={yr0:k,yr1:M}),(S||E)&&l.push(f.extendFlat({plotinfo:x},S,E))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var c in u?((n=f.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var h=s[c];t._fullData[h[0]]._module.basePlotModule.plot(t,h,n,e)}},D(t,a,o)},w.transitionFromReact=function(t,e,r,n){var i=t._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i._plots;for(var a in o.redraw=!1,"some"===e.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),t){var l=t[a],u=l.xaxis,c=l.yaxis,h=n[u._name].range.slice(),p=n[c._name].range.slice(),d=u.range.slice(),v=c.range.slice();u.setScale(),c.setScale();var g=null,y=null;u.r2l(h[0])===u.r2l(d[0])&&u.r2l(h[1])===u.r2l(d[1])||(g={xr0:h,xr1:d}),c.r2l(p[0])===c.r2l(v[0])&&c.r2l(p[1])===c.r2l(v[1])||(y={yr0:p,yr1:v}),(g||y)&&s.push(f.extendFlat({plotinfo:l},g,y))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,u=t._fullLayout._basePlotModules,c=[],h=0;h<l.length;h++)c.push(h);function p(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].transitionAxes&&u[e].transitionAxes(t,s,n,r)}function d(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].plot(t,o,i,r)}s.length&&e.anim?"traces first"===a.ordering?(n=f.extendFlat({},a,{duration:0}),o=c,i=a,setTimeout(p,a.duration),d()):(n=a,o=null,i=f.extendFlat({},a,{duration:0}),setTimeout(d,n.duration),p()):s.length?(n=a,p()):e.anim&&(o=c,i=a,d())},D(t,a,o)},w.doCalcdata=function(t,e){var r,n,i,a,o=d.list(t),s=t._fullData,c=t._fullLayout,h=new Array(s.length),v=(t.calcdata||[]).slice();for(t.calcdata=h,c._numBoxes=0,c._numViolins=0,c._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,c._piecolormap={},c._sunburstcolormap={},c._treemapcolormap={},c._iciclecolormap={},c._funnelareacolormap={},i=0;i<s.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(h[i]=v[i]);for(i=0;i<s.length;i++)(r=s[i])._arrayAttrs=u.findArrayAttributes(r),r._extremes={};var g=c._subplots.polar||[];for(i=0;i<g.length;i++)o.push(c[g[i]].radialaxis,c[g[i]].angularaxis);for(var y in c._colorAxes){var m=c[y];!1!==m.cauto&&(delete m.cmin,delete m.cmax)}var x=!1;function b(e){if(r=s[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=T[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(t,r,o))}}}function _(e,i){if(r=s[e],!!(n=r._module).isContainer===i){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var l=r.transforms||[];for(a=l.length-1;a>=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,c),i=0;i<s.length;i++)_(i,!0);for(i=0;i<s.length;i++)b(i);for(x&&R(o,s,c),i=0;i<s.length;i++)_(i,!0);for(i=0;i<s.length;i++)_(i,!1);F(t);var w=function(t,e){var r,n,i,a,o,s=[];function u(t,r,n){var i=r._id.charAt(0);if("histogram2dcontour"===t){var a=r._counterAxes[0],o=d.getFromId(e,a),s="x"===i||"x"===a&&"category"===o.type,l="y"===i||"y"===a&&"category"===o.type;return function(t,e){return 0===t||0===e||s&&t===n[e].length-1||l&&e===n.length-1?-1:("y"===i?e:t)-1}}return function(t,e){return"y"===i?e:t}}var c={min:function(t){return f.aggNums(Math.min,null,t)},max:function(t){return f.aggNums(Math.max,null,t)},sum:function(t){return f.aggNums((function(t,e){return t+e}),null,t)},total:function(t){return f.aggNums((function(t,e){return t+e}),null,t)},mean:function(t){return f.mean(t)},"geometric mean":function(t){return f.geometricMean(t)},median:function(t){return f.median(t)}};function h(t,e){return t[1]-e[1]}function p(t,e){return e[1]-t[1]}for(r=0;r<t.length;r++){var v=t[r];if("category"===v.type){var g=v.categoryorder.match(z);if(g){var y=g[1],m=g[2],x=v._id.charAt(0),b="x"===x,_=[];for(n=0;n<v._categories.length;n++)_.push([v._categories[n],[]]);for(n=0;n<v._traceIndices.length;n++){var w=v._traceIndices[n],T=e._fullData[w];if(!0===T.visible){var k=T.type;l.traceIs(T,"histogram")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var A="splom"===k,M="scattergl"===k,S=e.calcdata[w];for(i=0;i<S.length;i++){var E,L,C=S[i];if(A){var O=T._axesDim[v._id];if(!b){var P=T._diag[O][0];P&&(v=e._fullLayout[d.id2name(P)])}var I=C.trace.dimensions[O].values;for(a=0;a<I.length;a++)for(E=v._categoriesMap[I[a]],o=0;o<C.trace.dimensions.length;o++)if(o!==O){var D=C.trace.dimensions[o];_[E][1].push(D.values[a])}}else if(M){for(a=0;a<C.t.x.length;a++)b?(E=C.t.x[a],L=C.t.y[a]):(E=C.t.y[a],L=C.t.x[a]),_[E][1].push(L);C.t&&C.t._scene&&delete C.t._scene.dirty}else if(C.hasOwnProperty("z")){L=C.z;var R=u(T.type,v,L);for(a=0;a<L.length;a++)for(o=0;o<L[a].length;o++)(E=R(o,a))+1&&_[E][1].push(L[a][o])}else for(void 0===(E=C.p)&&(E=C[x]),void 0===(L=C.s)&&(L=C.v),void 0===L&&(L=b?C.y:C.x),Array.isArray(L)||(L=void 0===L?[]:[L]),a=0;a<L.length;a++)_[E][1].push(L[a])}}}v._categoriesValue=_;var F=[];for(n=0;n<_.length;n++)F.push([_[n][0],c[y](_[n][1])]);F.sort("descending"===m?p:h),v._categoriesAggregatedValue=F,v._initialCategories=F.map((function(t){return t[0]})),s=s.concat(v.sortByInitialCategories())}}}return s}(o,t);if(w.length){for(c._numBoxes=0,c._numViolins=0,i=0;i<w.length;i++)_(w[i],!0);for(i=0;i<w.length;i++)_(w[i],!1);F(t)}l.getComponentMethod("fx","calc")(t),l.getComponentMethod("errorbars","calc")(t)};var z=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function R(t,e,r){var n={};function i(t){t.clearCalc(),"multicategory"===t.type&&t.setupMultiCategory(e),n[t._id]=1}f.simpleMap(t,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[d.id2name(s)])}function F(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;o[u]?f.pushUnique(o[u],l):o[u]=[l]}}for(n in o){var c=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e<h.length;e++){var p=h[e],d="cartesian"===n?i._plots[p]:i[p];for(r=0;r<c.length;r++)c[r](t,d,p)}else for(r=0;r<c.length;r++)c[r](t)}}w.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},w.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()},w.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,n=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(n);l.getComponentMethod("selections","reselect")(t,i)},w.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var u in a)if(!o[u]){var c=a[u][0];c[0].trace.visible=!1,o[u]=[c]}for(var h in o){var p=o[h];p[0][0].trace._module.plot(t,e,f.filterVisible(p),n)}e.traceHash=o},w.plotBasePlot=function(t,e,r,n,i){var a=l.getModule(t),o=x(e.calcdata,a)[0];a.plot(e,o,n,i)},w.cleanBasePlot=function(t,e,r,n,i){var a=i._has&&i._has(t),o=r._has&&r._has(t);a&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()}},39360:function(t){"use strict";t.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},57384:function(t,e,r){"use strict";var n=r(3400),i=r(92065).tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function u(t,e,r,n){var i,a,o=n[0],s=n[1],l=f(Math.sin(e)-Math.sin(t)),u=f(Math.cos(e)-Math.cos(t)),c=Math.tan(r),h=f(1/c),p=l/u,d=s-p*o;return h?l&&u?a=c*(i=d/(c-p)):u?(i=s*h,a=s):(i=o,a=o*c):l&&u?(i=0,a=d):u?(i=0,a=s):i=a=NaN,[i,a]}function c(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,c,f=i.length,h=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return u(t,e,r,p(t))}function v(t){return n.mod(t,f)}function g(t){return o(t,[e,r])}var y=a(i,(function(t){return g(t)?l(t,e):1/0})),m=d(i[y],i[v(y-1)],e);for(h.push(m),s=y,c=0;c<f;s++,c++){var x=i[v(s)];if(!g(x))break;h.push(p(x))}var b=a(i,(function(t){return g(t)?l(t,r):1/0})),_=d(i[b],i[v(b+1)],r);return h.push(_),h.push([0,0]),h.push(h[0].slice()),h}(t,e,r,i)}function f(t){return Math.abs(t)>1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a<n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}t.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var u=i(c(s,n[0],n[1],a)),f=i(c(l,n[0],n[1],a)),h=[t*Math.cos(e),t*Math.sin(e)];return f.contains(h)&&!u.contains(h)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=c(t,e,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,(function(e){var r=s(e,t);return r>0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:u,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,e*u+i+n],[c,e*c+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(c(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t<e?(s=t,l=e):(s=e,l=t);var u=h(c(s,r,n,i),a,o);return"M"+h(c(l,r,n,i),a,o).reverse().join("L")+"M"+u.join("L")}}},40872:function(t,e,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(62400),o=r(39360),s=o.attr,l=o.name,u=i(l),c={};c[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:u,attrRegex:u,attributes:c,layoutAttributes:r(95300),supplyLayoutDefaults:r(84380),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],u=n(r,l,s),c=e[s]._subplot;c||(c=a(t,s),e[s]._subplot=c),c.plot(u,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=n._has&&n._has("gl"),o=e._has&&e._has("gl"),s=a&&!o,u=0;u<i.length;u++){var c=i[u],f=n[c]._subplot;if(!e[c]&&f)for(var h in f.framework.remove(),f.layers["radial-axis-title"].remove(),f.clipPaths)f.clipPaths[h].remove();s&&f._scene&&(f._scene.destroy(),f._scene=null)}},toSVG:r(57952).toSVG}},95300:function(t,e,r){"use strict";var n=r(22548),i=r(94724),a=r(86968).u,o=r(3400).extendFlat,s=r(67824).overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),u=s({tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},"plot","from-root"),c={visible:o({},i.visible,{dflt:!0}),type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},autorange:o({},i.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:o({},i.minallowed,{editType:"plot"}),maxallowed:o({},i.maxallowed,{editType:"plot"}),range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:i.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:o({},i.title.text,{editType:"plot",dflt:""}),font:o({},i.title.font,{editType:"plot"}),editType:"plot"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};o(c,l,u);var f={visible:o({},i.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(f,l,u),t.exports={domain:a({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:n.background},radialaxis:c,angularaxis:f,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},84380:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(31780),o=r(168),s=r(84888).op,l=r(26332),u=r(25404),c=r(95936),f=r(42568),h=r(22416),p=r(42136),d=r(76808),v=r(52976),g=r(95300),y=r(57696),m=r(39360),x=m.axisNames;function b(t,e,r,o){var v=r("bgcolor");o.bgColor=i.combine(v,o.paper_bgcolor);var b=r("sector");r("hole");var w,T=s(o.fullData,m.name,o.id),k=o.layoutOut;function A(t,e){return r(w+"."+t,e)}for(var M=0;M<x.length;M++){w=x[M],n.isPlainObject(t[w])||(t[w]={});var S=t[w],E=a.newContainer(e,w);E._id=E._name=w,E._attr=o.id+"."+w,E._traceIndices=T.map((function(t){return t._expandedIndex}));var L=m.axisName2dataArray[w],C=_(S,E,A,T,L,o);h(S,E,A,{axData:T,dataAttr:L});var O=A("visible");switch(y(E,e,k),A("uirevision",e.uirevision),E._m=1,w){case"radialaxis":A("minallowed"),A("maxallowed");var P,I=A("range"),D=E.getAutorangeDflt(I),z=A("autorange",D);!I||(null!==I[0]||null!==I[1])&&(null!==I[0]&&null!==I[1]||"reversed"!==z&&!0!==z)&&(null===I[0]||"min"!==z&&"max reversed"!==z)&&(null===I[1]||"max"!==z&&"min reversed"!==z)||(I=void 0,delete E.range,E.autorange=!0,P=!0),P||(z=A("autorange",D=E.getAutorangeDflt(I))),S.autorange=z,z&&(d(A,z,I),"linear"!==C&&"-"!==C||A("rangemode"),E.isReversed()&&(E._m=-1)),E.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if("date"===C){n.log("Polar plots do not support date angular axes yet.");for(var R=0;R<T.length;R++)T[R].visible=!1;C=S.type=E.type="linear"}A("linear"===C?"thetaunit":"period");var F=A("direction");A("rotation",{counterclockwise:0,clockwise:90}[F])}if(f(S,E,A,E.type,{tickSuffixDflt:"degrees"===E.thetaunit?"°":void 0}),O){var B,N,j,U,V,q,H,G,W,Y,X=o.font||{};N=(B=A("color"))===S.color?B:X.color,j=X.size,U=X.family,V=X.weight,q=X.style,H=X.variant,G=X.textcase,W=X.lineposition,Y=X.shadow,l(S,E,A,E.type),c(S,E,A,E.type,{font:{weight:V,style:q,variant:H,textcase:G,lineposition:W,shadow:Y,color:N,size:j,family:U},noAutotickangles:"angularaxis"===w,noTicklabelshift:!0,noTicklabelstandoff:!0}),u(S,E,A,{outerTicks:!0}),p(S,E,A,{dfltColor:B,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:g[w]}),A("layer"),"radialaxis"===w&&(A("side"),A("angle",b[0]),A("title.text"),n.coerceFont(A,"title.font",{weight:V,style:q,variant:H,textcase:G,lineposition:W,shadow:Y,color:N,size:n.bigFont(j),family:U}))}"category"!==C&&A("hoverformat"),E._input=S}"category"===e.angularaxis.type&&r("gridshape")}function _(t,e,r,n,i,a){var o=r("autotypenumbers",a.autotypenumbersDflt);if("-"===r("type")){for(var s,l=0;l<n.length;l++)if(n[l].visible){s=n[l];break}s&&s[i]&&(e.type=v(s[i],"gregorian",{noMultiCategory:!0,autotypenumbers:o})),"-"===e.type?e.type="linear":t.type=e.type}return e.type}t.exports=function(t,e,r){o(t,e,r,{type:m.name,attributes:g,handleDefaults:b,font:e.font,autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},62400:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(24040),o=r(3400),s=o.strRotate,l=o.strTranslate,u=r(76308),c=r(43616),f=r(7316),h=r(54460),p=r(78344),d=r(57696),v=r(19280).doAutoRange,g=r(51184),y=r(86476),m=r(93024),x=r(81668),b=r(22676).prepSelect,_=r(22676).selectOnClick,w=r(22676).clearOutline,T=r(93972),k=r(73696),A=r(39172).redrawReglTraces,M=r(84284).MID_SHIFT,S=r(39360),E=r(57384),L=r(36416),C=L.smith,O=L.reactanceArc,P=L.resistanceArc,I=L.smithTransform,D=o._,z=o.mod,R=o.deg2rad,F=o.rad2deg;function B(t,e,r){this.isSmith=r||!1,this.id=e,this.gd=t,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=t._fullLayout,i="clip"+n._uid+e;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",e),this.getHole=function(t){return this.isSmith?0:t.hole},this.getSector=function(t){return this.isSmith?[0,360]:t.sector},this.getRadial=function(t){return this.isSmith?t.realaxis:t.radialaxis},this.getAngular=function(t){return this.isSmith?t.imaginaryaxis:t.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var N=B.prototype;function j(t){var e=t.ticks+String(t.ticklen)+String(t.showticklabels);return"side"in t&&(e+=t.side),e}function U(t,e){return e[o.findIndexOfMin(e,(function(e){return o.angleDist(t,e)}))]}function V(t,e,r){return e?(t.attr("display",null),t.attr(r)):t&&t.attr("display","none"),t}t.exports=function(t,e,r){return new B(t,e,r)},N.plot=function(t,e){for(var r=this,n=e[r.id],i=!1,a=0;a<t.length;a++)if(!1===t[a][0].trace.cliponaxis){i=!0;break}r._hasClipOnAxisFalse=i,r.updateLayers(e,n),r.updateLayout(e,n),f.generalUpdatePerTraceModule(r.gd,r,t,n),r.updateFx(e,n),r.isSmith&&(delete n.realaxis.range,delete n.imaginaryaxis.range)},N.updateLayers=function(t,e){var r=this,i=r.isSmith,a=r.layers,o=r.getRadial(e),s=r.getAngular(e),l=S.layerNames,u=l.indexOf("frontplot"),c=l.slice(0,u),f="below traces"===s.layer,h="below traces"===o.layer;f&&c.push("angular-line"),h&&c.push("radial-line"),f&&c.push("angular-axis"),h&&c.push("radial-axis"),c.push("frontplot"),f||c.push("angular-line"),h||c.push("radial-line"),f||c.push("angular-axis"),h||c.push("radial-axis");var p=(i?"smith":"polar")+"sublayer",d=r.framework.selectAll("."+p).data(c,String);d.enter().append("g").attr("class",(function(t){return p+" "+t})).each((function(t){var e=a[t]=n.select(this);switch(t){case"frontplot":i||e.append("g").classed("barlayer",!0),e.append("g").classed("scatterlayer",!0);break;case"backplot":e.append("g").classed("maplayer",!0);break;case"plotbg":a.bg=e.append("path");break;case"radial-grid":case"angular-grid":e.style("fill","none");break;case"radial-line":e.append("line").style("fill","none");break;case"angular-line":e.append("path").style("fill","none")}})),d.order()},N.updateLayout=function(t,e){var r=this,n=r.layers,i=t._size,a=r.getRadial(e),o=r.getAngular(e),s=e.domain.x,f=e.domain.y;r.xOffset=i.l+i.w*s[0],r.yOffset=i.t+i.h*(1-f[1]);var h=r.xLength=i.w*(s[1]-s[0]),p=r.yLength=i.h*(f[1]-f[0]),d=r.getSector(e);r.sectorInRad=d.map(R);var v,g,y,m,x,b=r.sectorBBox=function(t){var e,r=t[0],n=t[1]-r,i=z(r,360),a=i+n,o=Math.cos(R(i)),s=Math.sin(R(i)),l=Math.cos(R(a)),u=Math.sin(R(a));return e=i<=90&&a>=90||i>90&&a>=450?1:s<=0&&u<=0?0:Math.max(s,u),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&u>=0?0:Math.min(s,u),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),e]}(d),_=b[2]-b[0],w=b[3]-b[1],T=p/h,k=Math.abs(w/_);T>k?(v=h,x=(p-(g=h*k))/i.h/2,y=[s[0],s[1]],m=[f[0]+x,f[1]-x]):(g=p,x=(h-(v=p/k))/i.w/2,y=[s[0]+x,s[1]-x],m=[f[0],f[1]]),r.xLength2=v,r.yLength2=g,r.xDomain2=y,r.yDomain2=m;var A,M=r.xOffset2=i.l+i.w*y[0],S=r.yOffset2=i.t+i.h*(1-m[1]),E=r.radius=v/_,L=r.innerRadius=r.getHole(e)*E,C=r.cx=M-E*b[0],O=r.cy=S+E*b[3],P=r.cxx=C-M,I=r.cyy=O-S,D=a.side;"counterclockwise"===D?(A=D,D="top"):"clockwise"===D&&(A=D,D="bottom"),r.radialAxis=r.mockAxis(t,e,a,{_id:"x",side:D,_trueSide:A,domain:[L/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:y}),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(P,I)),n.frontplot.attr("transform",l(M,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",l(C,O)).call(u.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]<i._rl[1]?i._rl[1]=Math.min(i._rl[1],l):i._rl[0]=Math.min(i._rl[0],l)}},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),v=z(r.getSector(e)[0],360),g=r.radialAxis,y=c<a,m=r.isSmith;m||(r.fillViewInitialKey("radialaxis.angle",d.angle),r.fillViewInitialKey("radialaxis.range",g.range.slice()),g.setGeometry()),"auto"===g.tickangle&&v>90&&v<=270&&(g.tickangle=180);var x=m?function(t){var e=I(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(g.l2p(t.x)+c,0)},b=m?function(t){return P(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(g.r2p(t.x)+c)},_=j(d);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=m?(g.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g),k=m?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];m&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,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"],y&&(d.showticklabels||d.ticks),{transform:E}),V(i["radial-grid"],y&&d.showgrid,{transform:m?"":S}),V(i["radial-line"].select("line"),y&&d.showline,{x1:m?-a:c,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(u.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),u=n.id+"title",f=0;if(l.title){var h=c.bBox(n.layers["radial-axis"].node()).height,p=l.title.font.size,d=l.side;f="top"===d?p:"counterclockwise"===d?-(h+.4*p):h+.8*p}var v=void 0!==r?r:n.radialAxisAngle,g=R(v),y=Math.cos(g),m=Math.sin(g),b=o+a/2*y+f*m,_=s-a/2*m+f*y;n.layers["radial-axis-title"]=x.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:D(i,"Click to enter radial axis title"),attributes:{x:b,y:_,"text-anchor":"middle"},transform:{rotate:-v}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),v=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),v.setGeometry(),v.setScale());var y=g?function(t){var e=I(r,C([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=g?function(t){var e=I(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return m(y(t))},b=g?function(t){var e=I(r,C([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=y(t);return m(e)+s(-F(e))},_=g?function(t){return O(r,t.x,0,1/0)}:function(t){var e=y(t),r=Math.cos(e),n=Math.sin(e);return"M"+[f+c*r,p-c*n]+"L"+[f+a*r,p-a*n]},w=h.makeLabelFns(v,0).labelStandoff,T={xFn:function(t){var e=y(t);return Math.cos(e)*w},yFn:function(t){var e=y(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=y(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=y(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+v._id+"tick").remove(),r.angularTickLayout=k);var A,S=g?[1/0].concat(v.tickvals||[]).map((function(t){return h.tickText(v,t,!0,!1)})):h.calcTicks(v);if(g&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===e.gridshape?(A=S.map(y),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===v.type&&(S=S.filter((function(t){return o.isAngleInsideSector(y(t),r.sectorInRad)}))),v.visible){var E="inside"===v.ticks?-1:1,L=(v.linewidth||1)/2;h.drawTicks(n,v,{vals:S,layer:i["angular-axis"],path:"M"+E*L+",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:T})}V(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr("stroke-width",d.linewidth).call(u.stroke,d.linecolor)},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,u=s.isSmith,c=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,v=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,O=s.radialAxis,P=E.clampTiny,I=E.findXYatLength,D=E.findEnclosingVertexAngles,z=S.cornerHalfWidth,R=S.cornerLen/2,F=g.makeDragger(f,"path","maindrag",!1===t.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(T,k)),F.onmousemove=function(t){m.hover(c,t,s.id),c._fullLayout._lasthover=F,c._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){c._dragging||y.unhover(c,t)};var B,N,j,U,V,q,H,G,W,Y={element:F,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return X(t-A,e-M)}function K(t,e){return Math.atan2(M-e,t-A)}function J(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function $(t,e){if(0===t)return s.pathSector(2*z);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,v)),o=a-z,l=a+z;return"M"+J(o,n)+"A"+[o,o]+" 0,0,0 "+J(o,i)+"L"+J(l,i)+"A"+[l,l]+" 0,0,1 "+J(l,n)+"Z"}function Q(t,e,r){if(0===t)return s.pathSector(2*z);var n,i,a=J(t,e),o=J(t,r),l=P((a[0]+o[0])/2),u=P((a[1]+o[1])/2);if(l&&u){var c=u/l,f=-1/c,h=I(z,c,l,u);n=I(R,f,h[0][0],h[0][1]),i=I(R,f,h[1][0],h[1][1])}else{var p,d;u?(p=R,d=z):(p=z,d=R),n=[[l-p,u-d],[l+p,u-d]],i=[[l-p,u+d],[l+p,u+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function tt(t,e){return e=Math.max(Math.min(e,v),x),t<d?t=0:v-t<d?t=v:e<d?e=0:v-e<d&&(e=v),Math.abs(e-t)>p?(t<e?(j=t,U=e):(j=e,U=t),!0):(j=null,U=null,!1)}function et(t,e){t=t||V,e=e||"M0,0Z",G.attr("d",t),W.attr("d",e),g.transitionZoombox(G,W,q,H),q=!0;var r={};ot(r),c.emit("plotly_relayouting",r)}function rt(t,n){var i,a,o=B+(t*=e),l=N+(n*=r),u=Z(B,N),c=Math.min(Z(o,l),v),f=K(B,N);tt(u,c)&&(i=V+s.pathSector(U),j&&(i+=s.pathSector(j)),a=$(j,f)+$(U,f)),et(i,a)}function nt(t,e,r,n){var i=E.findIntersectionXY(r,n,r,[t-A,M-e]);return X(i[0],i[1])}function it(t,e){var r,n,i=B+t,a=N+e,o=K(B,N),l=K(i,a),u=D(o,C),c=D(l,C);tt(nt(B,N,u[0],u[1]),Math.min(nt(i,a,c[0],c[1]),v))&&(r=V+s.pathSector(U),j&&(r+=s.pathSector(j)),n=[Q(j,u[0],u[1]),Q(U,u[0],u[1])].join(" ")),et(r,n)}function at(){if(g.removeZoombox(c),null!==j&&null!==U){var t={};ot(t),g.showDoubleClickNotifier(c),a.call("_guiRelayout",c,t)}}function ot(t){var e=O._rl,r=(e[1]-e[0])/(1-x/v)/v,n=[e[0]+(j-x)*r,e[0]+(U-x)*r];t[s.id+".radialaxis.range"]=n}function st(t,e){var r=c._fullLayout.clickmode;if(g.removeZoombox(c),2===t){var n={};for(var i in s.viewInitial)n[s.id+"."+i]=s.viewInitial[i];c.emit("plotly_doubleclick",null),a.call("_guiRelayout",c,n)}r.indexOf("select")>-1&&1===t&&_(e,c,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf("event")>-1&&m.click(c,e,s.id)}Y.prepFn=function(t,n,a){var l=c._fullLayout.dragmode,f=F.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var p=c._fullLayout._invTransform;e=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var y=E.findPolygonOffset(v,L[0],L[1],C);B+=A+y[0],N+=M+y[1]}switch(l){case"zoom":Y.clickFn=st,u||(Y.moveFn=C?it:rt,Y.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),q=!1;var t=c._fullLayout[s.id];H=i(t.bgcolor).getLuminance(),(G=g.makeZoombox(h,H,T,k,V)).attr("fill-rule","evenodd"),W=g.makeCorners(h,T,k),w(c)}());break;case"select":case"lasso":b(t,n,a,Y,l)}},y.init(Y)},N.updateRadialDrag=function(t,e,r){var i=this,u=i.gd,c=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,v=i.radialAxis,m=S.radialDragBoxSize,x=m/2;if(v.visible){var b,_,T,M=R(i.radialAxisAngle),E=v._rl,L=E[0],C=E[1],O=E[r],P=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T="radialdrag"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T="radialdrag-inner");var I,D,z,B=g.makeRectDragger(c,T,"crosshair",-x,-x,m,m),N={element:B,gd:u};!1===t.dragmode&&(N.dragmode=!1),V(n.select(B),v.visible&&h<f,{transform:l(b,_)}),N.prepFn=function(){I=null,D=null,z=null,N.moveFn=j,N.doneFn=q,w(u)},N.clampFn=function(t,e){return Math.sqrt(t*t+e*e)<S.MINDRAG&&(t=0,e=0),[t,e]},y.init(N)}function j(t,e){if(I)I(t,e);else{var n=[t,-e],a=[Math.cos(M),Math.sin(M)],s=Math.abs(o.dot(n,a)/Math.sqrt(o.dot(n,n)));isNaN(s)||(I=s<.5?H:G)}var l={};!function(t){null!==D?t[i.id+".radialaxis.angle"]=D:null!==z&&(t[i.id+".radialaxis.range["+r+"]"]=z)}(l),u.emit("plotly_relayouting",l)}function q(){null!==D?a.call("_guiRelayout",u,i.id+".radialaxis.angle",D):null!==z&&a.call("_guiRelayout",u,i.id+".radialaxis.range["+r+"]",z)}function H(t,e){if(0!==r){var n=b+t,a=_+e;D=Math.atan2(d-a,n-p),i.vangles&&(D=U(D,i.vangles)),D=F(D);var o=l(p,d)+s(-D);c["radial-axis"].attr("transform",o),c["radial-line"].select("line").attr("transform",o);var u=i.gd._fullLayout,f=u[i.id];i.updateRadialAxisTitle(u,f,D)}}function G(t,e){var n=o.dot([t,-e],[Math.cos(M),Math.sin(M)]);if(z=O-P*n,P>0==(r?z>L:z<C)){var s=u._fullLayout,l=s[i.id];v.range[r]=z,v._rl[r]=z,i.updateRadialAxis(s,l),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale();var c=!1;for(var f in i.traceHash){var h=i.traceHash[f],p=o.filterVisible(h);h[0][0].trace._module.plot(u,i,p,l),a.traceIs(f,"gl")&&p.length&&(c=!0)}c&&(k(u),A(u))}else z=null}},N.updateAngularDrag=function(t){var e=this,r=e.gd,i=e.layers,u=e.radius,f=e.angularAxis,h=e.cx,p=e.cy,d=e.cxx,v=e.cyy,m=S.angularDragBoxSize,x=g.makeDragger(i,"path","angulardrag",!1===t.dragmode?"none":"move"),b={element:x,gd:r};function _(t,e){return Math.atan2(v+m-e,t-d-m)}!1===t.dragmode?b.dragmode=!1:n.select(x).attr("d",e.pathAnnulus(u,u+m)).attr("transform",l(h,p)).call(T,"move");var M,E,L,C,O,P,I=i.frontplot.select(".scatterlayer").selectAll(".trace"),D=I.selectAll(".point"),z=I.selectAll(".textpoint");function R(u,g){var y=e.gd._fullLayout,m=y[e.id],x=_(M+u*t._invScaleX,E+g*t._invScaleY),b=F(x-P);if(C=L+b,i.frontplot.attr("transform",l(e.xOffset2,e.yOffset2)+s([-b,d,v])),e.vangles){O=e.radialAxisAngle+b;var w=l(h,p)+s(-b),T=l(h,p)+s(-O);i.bg.attr("transform",w),i["radial-grid"].attr("transform",w),i["radial-axis"].attr("transform",T),i["radial-line"].select("line").attr("transform",T),e.updateRadialAxisTitle(y,m,O)}else e.clipPaths.forTraces.select("path").attr("transform",l(d,v)+s(b));D.each((function(){var t=n.select(this),e=c.getTranslate(t);t.attr("transform",l(e.x,e.y)+s([b]))})),z.each((function(){var t=n.select(this),e=t.select("text"),r=c.getTranslate(t);t.attr("transform",s([b,e.attr("x"),e.attr("y")])+l(r.x,r.y))})),f.rotation=o.modHalf(C,360),e.updateAngularAxis(y,m),e._hasClipOnAxisFalse&&!o.isFullCircle(e.sectorInRad)&&I.call(c.hideOutsideRangePoints,e);var S=!1;for(var R in e.traceHash)if(a.traceIs(R,"gl")){var N=e.traceHash[R],j=o.filterVisible(N);N[0][0].trace._module.plot(r,e,j,m),j.length&&(S=!0)}S&&(k(r),A(r));var U={};B(U),r.emit("plotly_relayouting",U)}function B(t){t[e.id+".angularaxis.rotation"]=C,e.vangles&&(t[e.id+".radialaxis.angle"]=O)}function N(){z.select("text").attr("transform",null);var t={};B(t),a.call("_guiRelayout",r,t)}b.prepFn=function(n,i,a){var s=t[e.id];L=s.angularaxis.rotation;var l=x.getBoundingClientRect();M=i-l.left,E=a-l.top,r._fullLayout._calcInverseTransform(r);var u=o.apply3DTransform(t._invTransform)(M,E);M=u[0],E=u[1],P=_(M,E),b.moveFn=R,b.doneFn=N,w(r)},e.vangles&&!o.isFullCircle(e.sectorInRad)&&(b.prepFn=o.noop,T(n.select(x),null)),y.init(b)},N.isPtInside=function(t){if(this.isSmith)return!0;var e=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(t.theta),i=this.radialAxis,a=i.c2l(t.r),s=i._rl;return(r?E.isPtInsidePolygon:o.isPtInsideSector)(a,n,s,e,r)},N.pathArc=function(t){var e=this.sectorInRad,r=this.vangles;return(r?E.pathPolygon:o.pathArc)(t,e[0],e[1],r)},N.pathSector=function(t){var e=this.sectorInRad,r=this.vangles;return(r?E.pathPolygon:o.pathSector)(t,e[0],e[1],r)},N.pathAnnulus=function(t,e){var r=this.sectorInRad,n=this.vangles;return(n?E.pathPolygonAnnulus:o.pathAnnulus)(t,e,r[0],r[1],n)},N.pathSubplot=function(){var t=this.innerRadius,e=this.radius;return t?this.pathAnnulus(t,e):this.pathSector(e)},N.fillViewInitialKey=function(t,e){t in this.viewInitial||(this.viewInitial[t]=e)}},57696:function(t,e,r){"use strict";var n=r(3400),i=r(78344),a=n.deg2rad,o=n.rad2deg;t.exports=function(t,e,r){switch(i(t,r),t._id){case"x":case"radialaxis":!function(t,e){var r=e._subplot;t.setGeometry=function(){var e=t._rl[0],n=t._rl[1],i=r.innerRadius,a=(r.radius-i)/(n-e),o=i/a,s=e>n?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!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;i<o;i++)n[i]=s(a[i]);else{var l=r+"0",u="d"+r,c=l in e?s(e[l]):0,f=e[u]?s(e[u]):(t.period||2*Math.PI)/o;for(n=new Array(o),i=0;i<o;i++)n[i]=c+i*f}return n},t.setGeometry=function(){var i,s,l,u,c=e.sector,f=c.map(a),h={clockwise:-1,counterclockwise:1}[t.direction],p=a(t.rotation),d=function(t){return h*t+p},v=function(t){return(t-p)/h};switch(r){case"linear":s=i=n.identity,u=a,l=o,t.range=n.isFullCircle(f)?[c[0],c[0]+360]:f.map(v).map(o);break;case"category":var g=t._categories.length,y=t.period?Math.max(t.period,g):g;0===y&&(y=1),s=u=function(t){return 2*t*Math.PI/y},i=l=function(t){return t*y/Math.PI/2},t.range=[0,y]}t.c2g=function(t){return d(s(t))},t.g2c=function(t){return i(v(t))},t.t2g=function(t){return d(u(t))},t.g2t=function(t){return l(v(t))}}}(t,e)}}},55012:function(t){"use strict";t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},36416:function(t){"use strict";function e(t){return t<0?-1:t>0?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],u=s[1],c=n(t,r([o,e])),f=c[0],h=c[1];if(0===e)return["M"+l+","+u,"L"+f+","+h].join(" ");var p=i(t,1/Math.abs(e));return["M"+l+","+u,"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)),u=n(t,r([a,o])),c=u[0],f=u[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"+c+","+f,"A"+l+","+l+" 0 0,"+(0<o?0:1)+" "+v[0]+","+v[1],"A"+l+","+l+" 0 0,"+(s<0?0:1)+p+","+d].join(" ")}return["M"+c+","+f,"A"+l+","+l+" 0 0,"+(s<o?0:1)+" "+p+","+d].join(" ")},smithTransform:n}},47788:function(t,e,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(62400),o=r(55012),s=o.attr,l=o.name,u=i(l),c={};c[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:u,attrRegex:u,attributes:c,layoutAttributes:r(6183),supplyLayoutDefaults:r(22836),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],u=n(r,l,s),c=e[s]._subplot;c||(c=a(t,s,!0),e[s]._subplot=c),c.plot(u,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;if(!e[o]&&s)for(var u in s.framework.remove(),s.clipPaths)s.clipPaths[u].remove()}},toSVG:r(57952).toSVG}},6183:function(t,e,r){"use strict";var n=r(22548),i=r(94724),a=r(86968).u,o=r(3400).extendFlat,s=r(67824).overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),u=s({ticklen:i.ticklen,tickwidth:o({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},"plot","from-root"),c=o({visible:o({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:o({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},l,u),f=o({visible:o({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:i.ticks,editType:"calc"},l,u);t.exports={domain:a({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:n.background},realaxis:c,imaginaryaxis:f,editType:"calc"}},22836:function(t,e,r){"use strict";var n,i,a,o=r(3400),s=r(76308),l=r(31780),u=r(168),c=r(84888).op,f=r(42568),h=r(95936),p=r(42136),d=r(78344),v=r(6183),g=r(55012),y=g.axisNames,m=(n=function(t){return o.isTypedArray(t)&&(t=Array.from(t)),t.slice().reverse().map((function(t){return-t})).concat([0]).concat(t)},i=String,a={},function(t){var e=i?i(t):t;if(e in a)return a[e];var r=n(t);return a[e]=r,r});function x(t,e,r,n){var i=r("bgcolor");n.bgColor=s.combine(i,n.paper_bgcolor);var a,u=c(n.fullData,g.name,n.id),x=n.layoutOut;function b(t,e){return r(a+"."+t,e)}for(var _=0;_<y.length;_++){a=y[_],o.isPlainObject(t[a])||(t[a]={});var w=t[a],T=l.newContainer(e,a);T._id=T._name=a,T._attr=n.id+"."+a,T._traceIndices=u.map((function(t){return t._expandedIndex}));var k=b("visible");if(T.type="linear",d(T,x),f(w,T,b,T.type),k){var A,M,S,E,L="realaxis"===a;L&&b("side"),L?b("tickvals"):b("tickvals",m(e.realaxis.tickvals||v.realaxis.tickvals.dflt)),o.isTypedArray(T.tickvals)&&(T.tickvals=Array.from(T.tickvals));var C=n.font||{};k&&(M=(A=b("color"))===w.color?A:C.color,S=C.size,E=C.family),h(w,T,b,T.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!L,noExp:!0,font:{color:M,size:S,family:E}}),o.coerce2(t,e,v,a+".ticklen"),o.coerce2(t,e,v,a+".tickwidth"),o.coerce2(t,e,v,a+".tickcolor",e.color),b("ticks")||(delete e[a].ticklen,delete e[a].tickwidth,delete e[a].tickcolor),p(w,T,b,{dfltColor:A,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v[a]}),b("layer")}b("hoverformat"),delete T.type,T._input=w}}t.exports=function(t,e,r){u(t,e,r,{noUirevision:!0,type:g.name,attributes:v,handleDefaults:x,font:e.font,paper_bgcolor:e.paper_bgcolor,fullData:r,layoutOut:e})}},168:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(86968).Q;t.exports=function(t,e,r,o){var s,l,u=o.type,c=o.attributes,f=o.handleDefaults,h=o.partition||"x",p=e._subplots[u],d=p.length,v=d&&p[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,c,t,e)}for(var y=0;y<d;y++){var m=p[y];s=t[m]?t[m]:t[m]={},l=i.newContainer(e,m,v),o.noUirevision||g("uirevision",e.uirevision);var x={};x[h]=[y/d,(y+1)/d],a(l,e,g,x),o.id=m,f(s,l,g,o)}}},21776:function(t,e,r){"use strict";var n=r(26880);function i(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]="`"+r[i]+"`";e+="Finally, the template string has access to ",e=1===r.length?e+"variable "+n[0]:e+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return e}n.FORMAT_LINK,n.DATE_FORMAT_LINK,e.Ks=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"none"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.Gw=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"calc"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.ye=function(t,e){return e=e||{},(t=t||{}).newshape,i(e),{valType:"string",dflt:"",editType:t.editType||"arraydraw"}}},19352:function(t,e,r){"use strict";var n=r(24696),i=r(84888).KY,a=r(3400).counterRegex,o="ternary";e.name=o;var s=e.attr="subplot";e.idRoot=o,e.idRegex=e.attrRegex=a(o),(e.attributes={})[s]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=r(86379),e.supplyLayoutDefaults=r(38536),e.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,a=e._subplots[o],s=0;s<a.length;s++){var l=a[s],u=i(r,o,l),c=e[l]._subplot;c||(c=new n({id:l,graphDiv:t,container:e._ternarylayer.node()},e),e[l]._subplot=c),c.plot(u,e,t._promises)}},e.clean=function(t,e,r,n){for(var i=n._subplots[o]||[],a=0;a<i.length;a++){var s=i[a],l=n[s]._subplot;!e[s]&&l&&(l.plotContainer.remove(),l.clipDef.remove(),l.clipDefRelative.remove(),l.layers["a-title"].remove(),l.layers["b-title"].remove(),l.layers["c-title"].remove())}}},86379:function(t,e,r){"use strict";var n=r(22548),i=r(86968).u,a=r(94724),o=r(67824).overrideAll,s=r(92880).extendFlat,l={title:{text:a.title.text,font:a.title.font},color:a.color,tickmode:a.minor.tickmode,nticks:s({},a.nticks,{dflt:6,min:1}),tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,labelalias:a.labelalias,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,minexponent:a.minexponent,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:s({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:s({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth,griddash:a.griddash,layer:a.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:a._deprecated.title,titlefont:a._deprecated.titlefont}},u=t.exports=o({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},"plot","from-root");u.uirevision={valType:"any",editType:"none"},u.aaxis.uirevision=u.baxis.uirevision=u.caxis.uirevision={valType:"any",editType:"none"}},38536:function(t,e,r){"use strict";var n=r(76308),i=r(31780),a=r(3400),o=r(168),s=r(95936),l=r(42568),u=r(25404),c=r(26332),f=r(42136),h=r(86379),p=["aaxis","baxis","caxis"];function d(t,e,r,a){var o,s,l,u=r("bgcolor"),c=r("sum");a.bgColor=n.combine(u,a.paper_bgcolor);for(var f=0;f<p.length;f++)s=t[o=p[f]]||{},(l=i.newContainer(e,o))._name=o,v(s,l,a,e);var h=e.aaxis,d=e.baxis,g=e.caxis;h.min+d.min+g.min>=c&&(h.min=0,d.min=0,g.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(),g="Component "+v,y=o("title.text",g);e._hovertitle=y===g?y:v,a.coerceFont(o,"title.font",r.font,{overrideDflt:{size:a.bigFont(r.font.size),color:d}}),o("min"),c(t,e,o,"linear"),l(t,e,o,"linear"),s(t,e,o,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),u(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._,u=r(76308),c=r(43616),f=r(78344),h=r(92880).extendFlat,p=r(7316),d=r(54460),v=r(86476),g=r(93024),y=r(72760),m=y.freeMode,x=y.rectMode,b=r(81668),_=r(22676).prepSelect,w=r(22676).selectOnClick,T=r(22676).clearOutline,k=r(22676).clearSelectionsCache,A=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;a<t.length;a++)if(!1===t[a][0].trace.cliponaxis){r._hasClipOnAxisFalse=!0;break}r.updateLayers(n),r.adjustLayout(n,i),p.generalUpdatePerTraceModule(r.graphDiv,r,t,n),r.layers.plotbg.select("path").call(u.fill,n.bgcolor)},S.makeFramework=function(t){var e=this,r=e.graphDiv,n=t[e.id],i=e.clipId="clip"+e.layoutId+e.id,a=e.clipIdRelative="clip-relative"+e.layoutId+e.id;e.clipDef=o.ensureSingleById(t._clips,"clipPath",i,(function(t){t.append("path").attr("d","M0,0Z")})),e.clipDefRelative=o.ensureSingleById(t._clips,"clipPath",a,(function(t){t.append("path").attr("d","M0,0Z")})),e.plotContainer=o.ensureSingle(e.container,"g",e.id),e.updateLayers(n),c.setClipUrl(e.layers.backplot,i,r),c.setClipUrl(e.layers.grids,i,r)},S.updateLayers=function(t){var e=this.layers,r=["draglayer","plotbg","backplot","grids"];"below traces"===t.aaxis.layer&&r.push("aaxis","aline"),"below traces"===t.baxis.layer&&r.push("baxis","bline"),"below traces"===t.caxis.layer&&r.push("caxis","cline"),r.push("frontplot"),"above traces"===t.aaxis.layer&&r.push("aaxis","aline"),"above traces"===t.baxis.layer&&r.push("baxis","bline"),"above traces"===t.caxis.layer&&r.push("caxis","cline");var i=this.plotContainer.selectAll("g.toplevel").data(r,String),a=["agrid","bgrid","cgrid"];i.enter().append("g").attr("class",(function(t){return"toplevel "+t})).each((function(t){var r=n.select(this);e[t]=r,"frontplot"===t?r.append("g").classed("scatterlayer",!0):"backplot"===t?r.append("g").classed("maplayer",!0):"plotbg"===t?r.append("path").attr("d","M0,0Z"):"aline"===t||"bline"===t||"cline"===t?r.append("path"):"grids"===t&&a.forEach((function(t){e[t]=r.append("g").classed("grid "+t,!0)}))})),i.order()};var E=Math.sqrt(4/3);S.adjustLayout=function(t,e){var r,n,i,a,o,l,p=this,d=t.domain,v=(d.x[0]+d.x[1])/2,g=(d.y[0]+d.y[1])/2,y=d.x[1]-d.x[0],m=d.y[1]-d.y[0],x=y*e.w,b=m*e.h,_=t.sum,w=t.aaxis.min,T=t.baxis.min,k=t.caxis.min;x>E*b?i=(a=b)*E:a=(i=x)/E,o=y*i/x,l=m*a/b,r=e.l+e.w*v-i/2,n=e.t+e.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*k-_,_-w-2*T],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,_-T-k],domain:[g-l/2,g+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+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-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var O="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",O);var P=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),p.clipDefRelative.select("path").attr("transform",null);var I=s(r-S._offset,n+a);p.layers.baxis.attr("transform",I),p.layers.bgrid.attr("transform",I);var D=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);p.layers.aaxis.attr("transform",D),p.layers.agrid.attr("transform",D);var z=s(r+i/2,n)+"rotate(-30)"+s(0,-L._offset);p.layers.caxis.attr("transform",z),p.layers.cgrid.attr("transform",z),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.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(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.layers,a=e.aaxis,o=e.baxis,s=e.caxis;if(e.drawAx(a),e.drawAx(o),e.drawAx(s),t){var u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:a,propName:e.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:e.x0+e.w/2,y:e.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:o,propName:e.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:e.x0-c,y:e.y0+e.h+.83*o.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:e.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:e.x0+e.w+c,y:e.y0+e.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(t){var e,r=this,n=r.graphDiv,i=t._name,a=i.charAt(0),s=t._id,l=r.layers[i],u=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);r[u]!==c&&(l.selectAll("."+s+"tick").remove(),r[u]=c),t.setScale();var f=d.calcTicks(t),h=d.clipEnds(t,f),p=d.makeTransTickFn(t),v=d.getTickSigns(t)[2],g=o.deg2rad(30),y=v*(t.linewidth||1)/2,m=v*t.ticklen,x=r.w,b=r.h,_="b"===a?"M0,"+y+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+y+",0l"+Math.cos(g)*m+","+-Math.sin(g)*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 L=A.MINZOOM/2+.87,C="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(.87*L+4.5)+"l2.6,1.5l-"+L/2+","+.87*L+"Z",O="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-2.6,1.5l"+L/2+","+.87*L+"Z",P="m0,1l"+L/2+","+.87*L+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-"+(L/2+2.6)+","+(.87*L+4.5)+"l2.6,1.5l"+L/2+",-"+.87*L+"Z",I=!0;function D(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,y,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),L=M.graphDiv,z=L._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=L._fullLayout.clickmode;D(L),2===t&&(L.emit("plotly_doubleclick",null),a.call("_guiRelayout",L,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(L,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))),u=Math.max(0,Math.min(1,N(r,n),N(o,s))),c=Math.max(0,Math.min(1,j(r,n),j(o,s))),v=(l/2+c)*M.w,g=(1-l/2-u)*M.w,m=(v+g)/2,x=g-v,_=(1-l)*M.h,w=_-x/E;x<A.MINZOOM?(p=f,T.attr("d",y),k.attr("d","M0,0Z")):(p={a:f.a+l*h,b:f.b+u*h,c:f.c+c*h},T.attr("d",y+"M"+v+","+_+"H"+g+"L"+m+","+w+"L"+v+","+_+"Z"),k.attr("d","M"+r+","+n+"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM"+v+","+_+C+"M"+g+","+_+O+"M"+m+","+w+P)),b||(T.transition().style("fill",d>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),L.emit("plotly_relayouting",R(p))}function V(){D(L),p!==f&&(a.call("_guiRelayout",L,R(p)),I&&L.data&&L._context.showTips&&(o.notifier(l(L,"Double-click to zoom back out"),"long"),I=!1))}function q(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),u=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[u]},e=(f.a-p.a)*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(c.hideOutsideRangePoints,M),L.emit("plotly_relayouting",R(p))}function H(){a.call("_guiRelayout",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var v=M.dragOptions.dragmode=L._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,L._fullLayout._calcInverseTransform(L);var c=L._fullLayout._invTransform,v=o.apply3DTransform(c)(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(),y="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=z.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",y),k=z.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(L)}(0,l,c)):"pan"===v?(M.dragOptions.moveFn=q,M.dragOptions.clickFn=F,M.dragOptions.doneFn=H,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearOutline(L)):(x(v)||m(v))&&_(a,l,c,M.dragOptions,v)}},S.onmousemove=function(t){g.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||v.unhover(L,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),u=r(45464),c=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 y(t),e.subplotsRegistry[r]=t,e.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l<i.length;l++)o[i[l]]=!0,e.allCategories[i[l]]=!0;for(var u in e.modules[r]={_module:t,categories:o},a&&Object.keys(a).length&&(e.modules[r].meta=a),e.allTypes.push(r),e.componentsRegistry)m(u,r);t.layoutAttributes&&f(e.traceLayoutAttributes,t.layoutAttributes);var c=t.basePlotModule,h=c.name;if("mapbox"===h){var p=c.constants.styleRules;for(var d in p)s(".js-plotly-plot .plotly .mapboxgl-"+d,p[d])}"geo"!==h&&"mapbox"!==h||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function d(t){if("string"!=typeof t.name)throw new Error("Component module *name* must be a string.");var r=t.name;for(var n in e.componentsRegistry[r]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(e.layoutArrayContainers,r),y(t)),e.modules)m(r,n);for(var i in e.subplotsRegistry)b(r,i);for(var o in e.transformsRegistry)x(r,o);t.schema&&t.schema.layout&&h(c,t.schema.layout)}function v(t){if("string"!=typeof t.name)throw new Error("Transform module *name* must be a string.");var r="Transform module "+t.name,i="function"==typeof t.transform,a="function"==typeof t.calcTransform;if(!i&&!a)throw new Error(r+" is missing a *transform* or *calcTransform* method.");for(var s in i&&a&&n.log([r+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(t.attributes)||n.log(r+" registered without an *attributes* object."),"function"!=typeof t.supplyDefaults&&n.log(r+" registered without a *supplyDefaults* method."),e.transformsRegistry[t.name]=t,e.componentsRegistry)x(s,t.name)}function g(t){var r=t.name,n=r.split("-")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=e.localeRegistry,u=l[r];if(u||(l[r]=u={}),n!==r){var c=l[n];c||(l[n]=c={}),o&&c.dictionary===u.dictionary&&(c.dictionary=i),s&&c.format===u.format&&(c.format=a)}o&&(u.dictionary=i),s&&(u.format=a)}function y(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n<r.length;n++)a(e.layoutArrayRegexes,r[n])}}function m(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[r];i&&h(e.modules[r]._module.attributes,i)}}function x(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[r];i&&h(e.transformsRegistry[r].attributes,i)}}function b(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.subplots){var i=e.subplotsRegistry[r],a=i.layoutAttributes,o="subplot"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&h(a,s)}}function _(t){return"object"==typeof t&&(t=t.type),t}e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.transformsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(t){if(e.collectableSubplotTypes=null,!t)throw new Error("No argument passed to Plotly.register.");t&&!Array.isArray(t)&&(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":p(n);break;case"transform":v(n);break;case"component":d(n);break;case"locale":g(n);break;case"apiMethod":var i=n.name;e.apiMethodRegistry[i]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},e.getModule=function(t){var r=e.modules[_(t)];return!!r&&r._module},e.traceIs=function(t,r){if("various"===(t=_(t)))return!1;var i=e.modules[t];return i||(t&&n.log("Unrecognized trace type "+t+"."),i=e.modules[u.type.dflt]),!!i.categories[r]},e.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},e.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},e.getComponentMethod=function(t,r){var n=e.componentsRegistry[t];return n&&n[r]||i},e.call=function(){var t=arguments[0],r=[].slice.call(arguments,1);return e.apiMethodRegistry[t].apply(null,r)}},91536:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=i.extendFlat,o=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,u=t.layout,c=o([],l),f=o({},u,s(e.tileClass)),h=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var p=Object.keys(f);for(r=0;r<p.length;r++)i=p[r],["xaxis","yaxis","zaxis"].indexOf(i.slice(0,5))>-1&&(f[p[r]].title={text:""});for(r=0;r<c.length;r++){var d=c[r];d.showscale=!1,d.marker&&(d.marker.showscale=!1),n.traceIs(d,"pie-like")&&(d.textposition="none")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)f.annotations.push(e.annotations[r]);var v=Object.keys(f).filter((function(t){return t.match(/^scene\d*$/)}));if(v.length){var g={};for("thumbnail"===e.tileClass&&(g={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<v.length;r++){var y=f[v[r]];y.xaxis||(y.xaxis={}),y.yaxis||(y.yaxis={}),y.zaxis||(y.zaxis={}),a(y.xaxis,g),a(y.yaxis,g),a(y.zaxis,g),y._scene=null}}var m=document.createElement("div");e.tileClass&&(m.className=e.tileClass);var x={gd:m,td:m,layout:f,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:h.mapboxAccessToken}};return"transparent"!==e.setBackground&&(x.config.setBackground=e.setBackground||"opaque"),x.gd.defaultLayout=s(e.tileClass),x}},39792:function(t,e,r){"use strict";var n=r(3400),i=r(67024),a=r(48616),o=r(81792);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var u=i(t,e),c=e.filename||t.fn||"newplot";c+="."+e.format.replace("-","."),u.then((function(t){return r&&(r._snapshotInProgress=!1),a(t,c,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},48616:function(t,e,r){"use strict";var n=r(3400),i=r(81792);t.exports=function(t,e,r){var a=document.createElement("a"),o="download"in a;return new Promise((function(s,l){var u,c;if(n.isIE())return u=i.createBlob(t,"svg"),window.navigator.msSaveBlob(u,e),u=null,s(e);if(o)return u=i.createBlob(t,r),c=i.createObjectURL(u),a.href=c,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),i.revokeObjectURL(c),u=null,s(e);if(n.isSafari()){var f="svg"===r?",":";base64,";return i.octetStream(f+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},81792:function(t,e,r){"use strict";var n=r(24040);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i<e;i++)n[i]=t.charCodeAt(i);return r}(window.atob(t));return new window.Blob([r],{type:"image/"+e})},e.octetStream=function(t){document.location.href="data:application/octet-stream"+t},e.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,e.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},78904:function(t,e,r){"use strict";var n=r(81792),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(91536),toSVG:r(37164),svgToImg:r(63268),toImage:r(61808),downloadImage:r(39792)};t.exports=i},63268:function(t,e,r){"use strict";var n=r(3400),i=r(61252).EventEmitter,a=r(81792);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,o){var s=window.Image,l=t.svg,u=t.format||"png";if(n.isIE()&&"svg"!==u){var c=new Error(a.MSG_IE_BAD_FORMAT);return o(c),t.promise?r:e.emit("error",c)}var f,h,p=t.canvas,d=t.scale||1,v=t.width||300,g=t.height||150,y=d*v,m=d*g,x=p.getContext("2d",{willReadFrequently:!0}),b=new s;"svg"===u||n.isSafari()?h=a.encodeSVG(l):(f=a.createBlob(l,"svg"),h=a.createObjectURL(f)),p.width=y,p.height=m,b.onload=function(){var r;switch(f=null,a.revokeObjectURL(h),"svg"!==u&&x.drawImage(b,0,0,y,m),u){case"jpeg":r=p.toDataURL("image/jpeg");break;case"png":r=p.toDataURL("image/png");break;case"webp":r=p.toDataURL("image/webp");break;case"svg":r=h;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},b.onerror=function(r){if(f=null,a.revokeObjectURL(h),o(r),!t.promise)return e.emit("error",r)},b.src=h}));return t.promise?r:e}},61808:function(t,e,r){"use strict";var n=r(61252).EventEmitter,i=r(24040),a=r(3400),o=r(81792),s=r(91536),l=r(37164),u=r(63268);t.exports=function(t,e){var r=new n,c=s(t,{format:"png"}),f=c.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call("_doPlot",f,c.data,c.layout,c.config).then(h).then((function(){var t=o.getDelay(f._fullLayout);setTimeout((function(){var t=l(f),n=document.createElement("canvas");n.id=a.randstr(),(r=u({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}}),t)})).catch((function(t){r.emit("error",t)})),r}},37164:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(76308),s=r(9616),l=/"/g,u="TOBESTRIPPED",c=new RegExp('("'+u+")|("+u+'")',"g");t.exports=function(t,e,r){var f,h=t._fullLayout,p=h._paper,d=h._toppaper,v=h.width,g=h.height;p.insert("rect",":first-child").call(a.setRect,0,0,v,g).call(o.fill,h.paper_bgcolor);var y=h._basePlotModules||[];for(f=0;f<y.length;f++){var m=y[f];m.toSVG&&m.toSVG(t)}if(d){var x=d.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&p.node().appendChild(_)}}h._draggers&&h._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var t=n.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('"')&&t.style("font-family",e.replace(l,u));var r=this.style.fontWeight;!r||"normal"!==r&&"400"!==r||t.style("font-weight",void 0);var i=this.style.fontStyle;i&&"normal"===i&&t.style("font-style",void 0);var a=this.style.fontVariant;a&&"normal"===a&&t.style("font-variant",void 0)}else t.remove()})),p.selectAll(".gradient_filled,.pattern_filled").each((function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,u));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,u))})),"pdf"!==e&&"eps"!==e||p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(s.xmlns,"xmlns",s.svg),p.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(p.attr("width",r*v),p.attr("height",r*g),p.attr("viewBox","0 0 "+v+" "+g));var w=(new window.XMLSerializer).serializeToString(p.node());return w=(w=(w=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,(function(t){return"&lt;"===t?"&#60;":"&rt;"===t?"&#62;":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(c,"'"),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;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx");var i=e.marker;if(i){n.mergeArray(i.opacity,t,"mo",!0),n.mergeArray(i.color,t,"mc");var a=i.line;a&&(n.mergeArray(a.color,t,"mlc"),n.mergeArrayCastPositive(a.width,t,"mlw"))}}},20832:function(t,e,r){"use strict";var n=r(52904),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(21776).Gw,s=r(49084),l=r(25376),u=r(78048),c=r(98192).c,f=r(92880).extendFlat,h=l({editType:"calc",arrayOk:!0,colorEditType:"style"}),p=f({},n.marker.line.width,{dflt:0}),d=f({width:p,editType:"calc"},s("marker.line")),v=f({line:d,editType:"calc"},s("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:c,cornerradius:{valType:"any",editType:"calc"}});t.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),text:n.text,texttemplate:o({editType:"plot"},{keys:u.eventDataKeys}),hovertext:n.hovertext,hovertemplate:a({},{keys:u.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:f({},h,{}),insidetextfont:f({},h,{}),outsidetextfont:f({},h,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:f({},n.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:v,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:"style"},textfont:n.selected.textfont,editType:"style"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:"style"},textfont:n.unselected.textfont,editType:"style"},zorder:n.zorder,_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},71820:function(t,e,r){"use strict";var n=r(54460),i=r(1220),a=r(94288).hasColorscale,o=r(47128),s=r(84664),l=r(4500);t.exports=function(t,e){var r,u,c,f,h,p,d=n.getFromId(t,e.xaxis||"x"),v=n.getFromId(t,e.yaxis||"y"),g={msUTC:!(!e.base&&0!==e.base)};"h"===e.orientation?(r=d.makeCalcdata(e,"x",g),c=v.makeCalcdata(e,"y"),f=i(e,v,"y",c),h=!!e.yperiodalignment,p="y"):(r=v.makeCalcdata(e,"y",g),c=d.makeCalcdata(e,"x"),f=i(e,d,"x",c),h=!!e.xperiodalignment,p="x"),u=f.vals;for(var y=Math.min(u.length,r.length),m=new Array(y),x=0;x<y;x++)m[x]={p:u[x],s:r[x]},h&&(m[x].orig_p=c[x],m[x][p+"End"]=f.ends[x],m[x][p+"Start"]=f.starts[x]),e.ids&&(m[x].id=String(e.ids[x]));return a(e,"marker")&&o(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),a(e,"marker.line")&&o(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}),s(m,e),l(m,e),m}},78048:function(t){"use strict";t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},96376:function(t,e,r){"use strict";var n=r(38248),i=r(3400).isArrayOrTypedArray,a=r(39032).BADNUM,o=r(24040),s=r(54460),l=r(71888).getAxisGroup,u=r(72592);function c(t,e,r,o,c){if(o.length){var b,_,w,T;switch(function(t,e){var r,a;for(r=0;r<e.length;r++){var o,s=e[r],l=s[0].trace,u="funnel"===l.type?l._base:l.base,c="h"===l.orientation?l.xcalendar:l.ycalendar,f="category"===t.type||"multicategory"===t.type?function(){return null}:t.d2c;if(i(u)){for(a=0;a<Math.min(u.length,s.length);a++)o=f(u[a],0,c),n(o)?(s[a].b=+o,s[a].hasB=1):s[a].b=0;for(;a<s.length;a++)s[a].b=0}else{o=f(u,0,c);var h=n(o);for(o=h?o:0,a=0;a<s.length;a++)s[a].b=o,h&&(s[a].hasB=1)}}}(r,o),c.mode){case"overlay":f(e,r,o,c);break;case"group":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.offset?_.push(T):b.push(T);_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});(function(t,e,r,n){for(var i=t._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,c=u.length,f=a.length!==o.length,h=s*(1-n.gap),g=l(i,e._id)+u[0][0].trace.orientation,y=i._alignmentOpts[g]||{},m=0;m<c;m++){var x,b,_=u[m],w=_[0].trace,T=y[w.alignmentgroup]||{},k=Object.keys(T.offsetGroups||{}).length,A=(x=k?h/k:f?h/c:h)*(1-(n.groupgap||0));b=k?((2*w._offsetIndex+1-k)*x-A)/2:f?((2*m+1-c)*x-A)/2:-A/2;var M=_[0].t;M.barwidth=A,M.poffset=b,M.bargroupwidth=h,M.bardelta=s}r.binWidth=u[0][0].t.barwidth/100,p(r),d(e,r),v(e,r,f)})(t,e,o,i),function(t,e){for(var r=t.traces,n=0;n<r.length;n++){var i=r[n];if(void 0===i[0].trace.base)for(var o=new u([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var l=i[s];if(l.p!==a){var c=o.put(l.p,l.b+l.s);c&&(l.b=c)}}}}(o,e),i.norm?(y(o),m(r,o,i)):g(r,o)}(t,e,r,_,c),b.length&&f(e,r,b,c);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.base?_.push(T):b.push(T);!function(t){if(!(t.length<2)){var e,r,i,a,o,s;for(e=0;e<t.length&&void 0===(a=(r=t[e][0].trace).marker?r.marker.cornerradius:void 0);e++);if(void 0!==a)for(o=n(a)?+a:+a.slice(0,-1),s=n(a)?"px":"%",e=0;e<t.length;e++)(i=t[e][0].t).cornerradiusvalue=o,i.cornerradiusform=s}}(_),_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:"relative"===i.mode,overlapNoMerge:!(i.norm||"stack"===i.mode||"relative"===i.mode)});h(e,o,i),function(t,e,r){var n,i,o,l,u,c,f=x(t),h=e.traces;for(l=0;l<h.length;l++)if("funnel"===(i=(n=h[l])[0].trace).type)for(u=0;u<n.length;u++)(c=n[u]).s!==a&&e.put(c.p,-.5*c.s);for(l=0;l<h.length;l++){o="funnel"===(i=(n=h[l])[0].trace).type;var p=[];for(u=0;u<n.length;u++)if((c=n[u]).s!==a){var d;d=o?c.s:c.s+c.b;var v=e.put(c.p,d),g=v+d;c.b=v,c[f]=g,r.norm||(p.push(g),c.hasB&&p.push(v))}r.norm||(i._extremes[t._id]=s.findExtremes(t,p,{tozero:!0,padded:!0}))}}(r,o,i);for(var l=0;l<n.length;l++)for(var c=n[l],f=0;f<c.length;f++){var p=c[f];p.s!==a&&p.b+p.s===o.get(p.p,p.s)&&(p._outmost=!0)}i.norm&&m(r,o,i)}(0,e,r,_,c),b.length&&f(e,r,b,c)}!function(t){var e,r,i,a,o,s,l;for(e=0;e<t.length;e++)i=(r=t[e])[0].trace,void 0===(a=r[0].t).cornerradiusvalue&&void 0!==(o=i.marker?i.marker.cornerradius:void 0)&&(s=n(o)?+o:+o.slice(0,-1),l=n(o)?"px":"%",a.cornerradiusvalue=s,a.cornerradiusform=l)}(o),function(t,e){var r,a,o,s=x(e),l={},u=1/0,c=-1/0;for(r=0;r<t.length;r++)for(o=t[r],a=0;a<o.length;a++){var f=o[a].p;n(f)&&(u=Math.min(u,f),c=Math.max(c,f))}var h=1e4/(c-u),p=l.round=function(t){return String(Math.round(h*(t-u)))},d={},v={},g=t.some((function(t){var e=t[0].trace;return"marker"in e&&e.marker.cornerradius}));for(r=0;r<t.length;r++){(o=t[r])[0].t.extents=l;var y=o[0].t.poffset,m=i(y);for(a=0;a<o.length;a++){var b=o[a],_=b[s]-b.w/2;if(n(_)){var w=b[s]+b.w/2,T=p(b.p);l[T]?l[T]=[Math.min(_,l[T][0]),Math.max(w,l[T][1])]:l[T]=[_,w]}if(b.p0=b.p+(m?y[a]:y),b.p1=b.p0+b.w,b.s0=b.b,b.s1=b.s0+b.s,g){var k=Math.min(b.s0,b.s1)||0,A=Math.max(b.s0,b.s1)||0,M=b[s];d[M]=M in d?Math.min(d[M],k):k,v[M]=M in v?Math.max(v[M],A):A}}}g&&function(t,e,r,n){for(var i=x(n),a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=e[u],l._sMax=r[u]}}(t,d,v,e)}(o,e)}}function f(t,e,r,n){for(var i=0;i<r.length;i++){var a=r[i],o=new u([a],{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});h(t,o,n),n.norm?(y(o),m(e,o,n)):g(e,o)}}function h(t,e,r){for(var n=e.minDiff,i=e.traces,a=n*(1-r.gap),o=a*(1-(r.groupgap||0)),s=-o/2,l=0;l<i.length;l++){var u=i[l][0].t;u.barwidth=o,u.poffset=s,u.bargroupwidth=a,u.bardelta=n}e.binWidth=i[0][0].t.barwidth/100,p(e),d(t,e),v(t,e)}function p(t){var e,r,a=t.traces;for(e=0;e<a.length;e++){var o,s=a[e],l=s[0],u=l.trace,c=l.t,f=u._offset||u.offset,h=c.poffset;if(i(f)){for(o=Array.prototype.slice.call(f,0,s.length),r=0;r<o.length;r++)n(o[r])||(o[r]=h);for(r=o.length;r<s.length;r++)o.push(h);c.poffset=o}else void 0!==f&&(c.poffset=f);var p=u._width||u.width,d=c.barwidth;if(i(p)){var v=Array.prototype.slice.call(p,0,s.length);for(r=0;r<v.length;r++)n(v[r])||(v[r]=d);for(r=v.length;r<s.length;r++)v.push(d);if(c.barwidth=v,void 0===f){for(o=[],r=0;r<s.length;r++)o.push(h+(d-v[r])/2);c.poffset=o}}else void 0!==p&&(c.barwidth=p,void 0===f&&(c.poffset=h+(d-p)/2))}}function d(t,e){for(var r=e.traces,n=x(t),a=0;a<r.length;a++)for(var o=r[a],s=o[0].t,l=s.poffset,u=i(l),c=s.barwidth,f=i(c),h=0;h<o.length;h++){var p=o[h],d=p.w=f?c[h]:c;void 0===p.p&&(p.p=p[n],p["orig_"+n]=p[n]);var v=(u?l[h]:l)+d/2;p[n]=p.p+v}}function v(t,e,r){var n=e.traces,a=e.minDiff/2;s.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<n.length;o++){var l,u,c,f,h=n[o],p=h[0],d=p.trace,v=[];for(f=0;f<h.length;f++)u=(l=h[f]).p-a,c=l.p+a,v.push(u,c);if(d.width||d.offset){var g=p.t,y=g.poffset,m=g.barwidth,x=i(y),b=i(m);for(f=0;f<h.length;f++){l=h[f];var _=x?y[f]:y,w=b?m[f]:m;c=(u=l.p+_)+w,v.push(u,c)}}d._extremes[t._id]=s.findExtremes(t,v,{padded:!1})}}function g(t,e){for(var r=e.traces,n=x(t),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,l="scatter"===o.type,u="v"===o.orientation,c=[],f=!1,h=0;h<a.length;h++){var p=a[h],d=l?0:p.b,v=l?u?p.y:p.x:d+p.s;p[n]=v,c.push(v),p.hasB&&c.push(d),p.hasB&&p.b||(f=!0)}o._extremes[t._id]=s.findExtremes(t,c,{tozero:f,padded:!0})}}function y(t){for(var e=t.traces,r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var o=n[i];o.s!==a&&t.put(o.p,o.b+o.s)}}function m(t,e,r){var i=e.traces,o=x(t),l="fraction"===r.norm?1:100,u=l/1e9,c=t.l2c(t.c2l(0)),f="stack"===r.mode?l:c;function h(e){return n(t.c2l(e))&&(e<c-u||e>f+u||!n(c))}for(var p=0;p<i.length;p++){for(var d=i[p],v=d[0].trace,g=[],y=!1,m=!1,b=0;b<d.length;b++){var _=d[b];if(_.s!==a){var w=Math.abs(l/e.get(_.p,_.s));_.b*=w,_.s*=w;var T=_.b,k=T+_.s;_[o]=k,g.push(k),m=m||h(k),_.hasB&&(g.push(T),m=m||h(T)),_.hasB&&_.b||(y=!0)}}v._extremes[t._id]=s.findExtremes(t,g,{tozero:y,padded:m})}}function x(t){return t._id.charAt(0)}t.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],u=[],f=0;f<a.length;f++){var h=a[f];if(!0===h.visible&&o.traceIs(h,"bar")&&h.xaxis===r._id&&h.yaxis===n._id&&("h"===h.orientation?l.push(s[f]):u.push(s[f]),h._computePh))for(var p=t.calcdata[f],d=0;d<p.length;d++)"function"==typeof p[d].ph0&&(p[d].ph0=p[d].ph0()),"function"==typeof p[d].ph1&&(p[d].ph1=p[d].ph1())}var v={xCat:"category"===r.type||"multicategory"===r.type,yCat:"category"===n.type||"multicategory"===n.type,mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};c(t,r,n,u,v),c(t,n,r,l,v)},setGroupPositions:c}},31508:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(76308),o=r(24040),s=r(43980),l=r(31147),u=r(55592),c=r(20011),f=r(20832),h=i.coerceFont;function p(t){if(n(t)){if((t=+t)>=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),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),d=!!o.hasPathbar,v=Array.isArray(a)||"auto"===a,g=v||"inside"===a,y=v||"outside"===a;if(g||y){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",_)}y&&h(n,"outsidetextfont",m),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),u&&n("constraintext"),c&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}g&&p&&n("insidetextanchor")}t.exports={supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,f,r,n)}if(s(t,e,n,c)){l(t,e,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",e.x&&!e.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var h=c("textposition");d(t,0,n,c,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(t,e,c,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,c)}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;o<t.length;o++)if("bar"===(n=t[o]).type){r=n._input;var s=a("marker.cornerradius",e.barcornerradius);n.marker&&(n.marker.cornerradius=p(s)),"group"===e.barmode&&c(r,n,e,a)}},handleText:d,validateCornerradius:p}},52160:function(t){"use strict";t.exports=function(t,e,r){return t.x="xVal"in e?e.xVal:e.x,t.y="yVal"in e?e.yVal:e.y,e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),"h"===r.orientation?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}},60444:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(3400).isArrayOrTypedArray;e.coerceString=function(t,e,r){if("string"==typeof e){if(e||!t.noBlank)return e}else if(("number"==typeof e||!0===e)&&!t.strict)return String(e);return void 0!==r?r:t.dflt},e.coerceNumber=function(t,e,r){if(n(e)){e=+e;var i=t.min,a=t.max;if(!(void 0!==i&&e<i||void 0!==a&&e>a))return e}return void 0!==r?r:t.dflt},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)?e<t.length&&(r=t[e]):r=t,r},e.getLineWidth=function(t,e){return 0<e.mlw?e.mlw:a(t.marker.line.width)?0:t.marker.line.width}},63400:function(t,e,r){"use strict";var n=r(93024),i=r(24040),a=r(76308),o=r(3400).fillText,s=r(60444).getLineWidth,l=r(54460).hoverLabelText,u=r(39032).BADNUM;function c(t,e,r,i,a){var s,c,f,h,p,d,v,g=t.cd,y=g[0].trace,m=g[0].t,x="closest"===i,b="waterfall"===y.type,_=t.maxHoverDistance,w=t.maxSpikeDistance;"h"===y.orientation?(s=r,c=e,f="y",h="x",p=D,d=P):(s=e,c=r,f="x",h="y",d=D,p=P);var T=y[f+"period"],k=x||T;function A(t){return S(t,-1)}function M(t){return S(t,1)}function S(t,e){var r=t.w;return t[f]+e*r/2}function E(t){return t[f+"End"]-t[f+"Start"]}var L=x?A:T?function(t){return t.p-E(t)/2}:function(t){return Math.min(A(t),t.p-m.bardelta/2)},C=x?M:T?function(t){return t.p+E(t)/2}:function(t){return Math.max(M(t),t.p+m.bardelta/2)};function O(t,e,r){return a.finiteRange&&(r=0),n.inbox(t-s,e-s,r+Math.min(1,Math.abs(e-t)/v)-1)}function P(t){return O(L(t),C(t),_)}function I(t){var e=t[h];if(b){var r=Math.abs(t.rawS)||0;c>0?e+=r:c<0&&(e-=r)}return e}function D(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var z=t[f+"a"],R=t[h+"a"];v=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(g,F,t),!1!==t.index&&g[t.index].p!==u){k||(L=function(t){return Math.min(A(t),t.p-m.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+m.bargroupwidth/2)});var B=g[t.index],N=y.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"]=z.c2p(x?L(B):j[0],!0),t[f+"1"]=z.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+"LabelVal"]=U?B.orig_p:B.p,t.labelLabel=l(z,t[f+"LabelVal"],y[f+"hoverformat"]),t.valueLabel=l(R,t[h+"LabelVal"],y[h+"hoverformat"]),t.baseLabel=l(R,B.b,y[h+"hoverformat"]),t.spikeDistance=(function(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return O(A(t),M(t),w)}(B))/2,t[f+"Spike"]=z.c2p(B.p,!0),o(B,y,t),t.hovertemplate=y.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=c(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod("errorbars","hoverInfo")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},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 u=!1,c=!1,f=!1,h={},p=l("barmode"),d=0;d<r.length;d++){var v=r[d];if(n.traceIs(v,"bar")&&v.visible){if(u=!0,"group"===p){var g=v.xaxis+v.yaxis;h[g]&&(f=!0),h[g]=!0}v.visible&&"histogram"===v.type&&"category"!==i.getFromId({_fullLayout:e},v["v"===v.orientation?"xaxis":"yaxis"]).type&&(c=!0)}}if(u){"overlay"!==p&&l("barnorm"),l("bargap",c&&!f?0:.2),l("bargroupgap");var y=l("barcornerradius");e.barcornerradius=s(y)}else delete e.barmode}},98184:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(72736),s=r(76308),l=r(43616),u=r(24040),c=r(54460).tickText,f=r(82744),h=f.recordMinTextSize,p=f.clearMinTextSize,d=r(60100),v=r(60444),g=r(78048),y=r(20832),m=y.text,x=y.textposition,b=r(10624).appendArrayPointValue,_=g.TEXTPAD;function w(t){return t.id}function T(t){if(t.ids)return w}function k(t){return(t>0)-(t<0)}function A(t,e){return t<e?1:-1}function M(t,e,r,n){var i;return!e.uniformtext.mode&&S(r)?(n&&(i=n()),t.transition().duration(r.duration).ease(r.easing).each("end",(function(){i&&i()})).each("interrupt",(function(){i&&i()}))):t}function S(t){return t&&t.duration>0}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 L(t){return"auto"===t?0:t}function C(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 O(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c="end"===u,f="start"===u,h=((a.leftToRight||0)+1)/2,p=1-h,d=a.hasB,v=a.r,g=a.overhead,y=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 T=L(l);"auto"!==l||y<=x&&m<=b||!(y>x||m>b)||(y>b||m>x)&&y<m==x<b||(T+=90);var k,M,S=C(i,T);if(v&&v-g>_){var E=function(t,e,r,n,i,a,o,s,l){var u,c,f,h,p=Math.max(0,Math.abs(e-t)-2*_),d=Math.max(0,Math.abs(n-r)-2*_),v=a-_,g=o?v-Math.sqrt(v*v-(v-o)*(v-o)):v,y=l?2*v:s?v-o:2*g,m=l?2*v:s?2*g:v-o;return i.y/i.x>=d/(p-y)?h=d/i.y:i.y/i.x<=(d-m)/p?h=p/i.x:!l&&s?(u=i.x*i.x+i.y*i.y/4,f=(p-v)*(p-v)+(d/2-v)*(d/2-v)-v*v,h=(-(c=-2*i.x*(p-v)-i.y*(d/2-v))+Math.sqrt(c*c-4*u*f))/(2*u)):l?(u=(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=(-(c=-i.x*(p/2-v)-i.y*(d/2-v))+Math.sqrt(c*c-4*u*f))/(2*u)):(u=i.x*i.x/4+i.y*i.y,f=(p/2-v)*(p/2-v)+(d-v)*(d-v)-v*v,h=(-(c=-i.x*(p/2-v)-2*i.y*(d-v))+Math.sqrt(c*c-4*u*f))/(2*u)),{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,g,o,d);k=E.scale,M=E.pad}else k=1,s&&(k=Math.min(1,x/S.x,b/S.y)),M=0;var O=i.left*p+i.right*h,P=(i.top+i.bottom)/2,I=(t+_)*p+(e-_)*h,D=(r+n)/2,z=0,R=0;if(f||c){var F=(o?S.x:S.y)/2;v&&(c||d)&&(w+=M);var B=o?A(t,e):A(r,n);o?f?(I=t+B*w,z=-B*F):(I=e-B*w,z=B*F):f?(D=r+B*w,R=-B*F):(D=n-B*w,R=B*F)}return{textX:O,textY:P,targetX:I,targetY:D,anchorX:z,anchorY:R,scale:k,rotate:T}}t.exports={plot:function(t,e,r,f,g,y){var w=e.xaxis,P=e.yaxis,I=t._fullLayout,D=t._context.staticPlot;g||(g={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},p("bar",I));var z=a.makeTraceGroups(f,r,"trace bars").each((function(r){var u=n.select(this),f=r[0].trace,p=r[0].t,z="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,B="bar"===f.type,N=B||R,j=0;z&&f.connector.visible&&"between"===f.connector.mode&&(j=f.connector.line.width/2);var U="h"===f.orientation,V=S(g),q=a.ensureSingle(u,"g","points"),H=T(f),G=q.selectAll("g.point").data(a.identity,H);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,T){var S,z,R=n.select(this),q=function(t,e,r,n){var i=[],a=[],o=n?e:r,s=n?r:e;return i[0]=o.c2p(t.s0,!0),a[0]=s.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),a[1]=s.c2p(t.p1,!0),n?[i,a]:[a,i]}(u,w,P,U),H=q[0][0],G=q[0][1],W=q[1][0],Y=q[1][1],X=0==(U?G-H:Y-W);if(X&&N&&v.getLineWidth(f,u)&&(X=!1),X||(X=!(i(H)&&i(G)&&i(W)&&i(Y))),u.isBlank=X,X&&(U?G=H:Y=W),j&&!X&&(U?(H-=A(H,G)*j,G+=A(H,G)*j):(W-=A(W,Y)*j,Y+=A(W,Y)*j)),"waterfall"===f.type){if(!X){var Z=f[u.dir].marker;S=Z.line.width,z=Z.color}}else S=v.getLineWidth(f,u),z=u.mc||f.marker.color;function K(t){var e=n.round(S/2%1,2);return 0===g.gap&&0===g.groupgap?n.round(Math.round(t)-e,2):t}var J=s.opacity(z)<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||(H=J(H,G,U),G=J(G,H,U),W=J(W,Y,!U),Y=J(Y,W,!U));var $,Q=U?w.c2p:P.c2p;$=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._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-H),i=U?Math.abs(G-H):Math.abs(Y-W),a=J(Math.abs(Q($,!0)-Q(0,!0))),o=u.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"+H+","+W+"V"+Y+"H"+G+"V"+W+"Z",it=0;if(rt&&u.s){var at=0===k(u.s0)||k(u.s)===k(u.s0)?u.s1:u.s0;if((it=J(u.hasB?0:Math.abs(Q($,!0)-Q(at,!0))))<rt){var ot=A(H,G),st=A(W,Y),lt=ot===-st?1:0;if(U)if(u.hasB)tt="M"+(H+rt*ot)+","+W+"A "+rt+","+rt+" 0 0 "+lt+" "+H+","+(W+rt*st)+"V"+(Y-rt*st)+"A "+rt+","+rt+" 0 0 "+lt+" "+(H+rt*ot)+","+Y+"H"+(G-rt*ot)+"A "+rt+","+rt+" 0 0 "+lt+" "+G+","+(Y-rt*st)+"V"+(W+rt*st)+"A "+rt+","+rt+" 0 0 "+lt+" "+(G-rt*ot)+","+W+"Z";else{var ut=(et=Math.abs(G-H)+it)<rt?rt-Math.sqrt(et*(2*rt-et)):0,ct=it>0?Math.sqrt(it*(2*rt-it)):0,ft=ot>0?Math.max:Math.min;tt="M"+H+","+W+"V"+(Y-ut*st)+"H"+ft(G-(rt-it)*ot,H)+"A "+rt+","+rt+" 0 0 "+lt+" "+G+","+(Y-rt*st-ct)+"V"+(W+rt*st+ct)+"A "+rt+","+rt+" 0 0 "+lt+" "+ft(G-(rt-it)*ot,H)+","+(W+ut*st)+"Z"}else if(u.hasB)tt="M"+(H+rt*ot)+","+W+"A "+rt+","+rt+" 0 0 "+lt+" "+H+","+(W+rt*st)+"V"+(Y-rt*st)+"A "+rt+","+rt+" 0 0 "+lt+" "+(H+rt*ot)+","+Y+"H"+(G-rt*ot)+"A "+rt+","+rt+" 0 0 "+lt+" "+G+","+(Y-rt*st)+"V"+(W+rt*st)+"A "+rt+","+rt+" 0 0 "+lt+" "+(G-rt*ot)+","+W+"Z";else{var ht=(et=Math.abs(Y-W)+it)<rt?rt-Math.sqrt(et*(2*rt-et)):0,pt=it>0?Math.sqrt(it*(2*rt-it)):0,dt=st>0?Math.max:Math.min;tt="M"+(H+ht*ot)+","+W+"V"+dt(Y-(rt-it)*st,W)+"A "+rt+","+rt+" 0 0 "+lt+" "+(H+rt*ot-pt)+","+Y+"H"+(G-rt*ot+pt)+"A "+rt+","+rt+" 0 0 "+lt+" "+(G-ht*ot)+","+dt(Y-(rt-it)*st,W)+"V"+W+"Z"}}else tt=nt}else tt=nt;var vt=M(a.ensureSingle(R,"path"),I,g,y);if(vt.style("vector-effect",D?"none":"non-scaling-stroke").attr("d",isNaN((G-H)*(Y-W))||X&&t._context.staticPlot?"M0,0Z":tt).call(l.setClipUrl,e.layerClipId,t),!I.uniformtext.mode&&V){var gt=l.makePointStyleFns(f);l.singlePointStyle(u,vt,f,gt,t)}!function(t,e,r,n,i,s,u,f,p,g,y,w,T){var k,S=e.xaxis,P=e.yaxis,I=t._fullLayout;function D(e,r,n){return a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+k,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var z=n[0].trace,R="h"===z.orientation,F=function(t,e,r,n,i){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,u,f,h,p="histogram"===o.type,d="waterfall"===o.type,v="funnel"===o.type,g="h"===o.orientation;function y(t){return c(h,h.c2l(t),!0).text}g?(l="y",u=i,f="x",h=n):(l="x",u=n,f="y",h=i);var m,x=e[r],_={};_.label=x.p,_.labelLabel=_[l+"Label"]=(m=x.p,c(u,u.c2l(m),!0).text);var w=a.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var T={};b(T,o,x.i),(p||void 0===T.x)&&(T.x=g?_.value:_.label),(p||void 0===T.y)&&(T.y=g?_.label:_.value),(p||void 0===T.xLabel)&&(T.xLabel=g?_.valueLabel:_.labelLabel),(p||void 0===T.yLabel)&&(T.yLabel=g?_.labelLabel:_.valueLabel),d&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var k=a.castOption(o,x.i,"customdata");return k&&(_.customdata=k),a.texttemplateString(s,_,t._d3locale,T,_,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function u(t){return c(o?r:n,+t,!0).text}var f,h,p=i.textinfo,d=t[e],v=p.split("+"),g=[],y=function(t){return-1!==v.indexOf(t)};if(y("label")&&g.push((h=t[e].p,c(o?n:r,h,!0).text)),y("text")&&(0===(f=a.castOption(i,d.i,"text"))||f)&&g.push(f),s){var m=+d.rawS||d.s,x=d.v,b=x-m;y("initial")&&g.push(u(b)),y("delta")&&g.push(u(m)),y("final")&&g.push(u(x))}if(l){y("value")&&g.push(u(d.s));var _=0;y("percent initial")&&_++,y("percent previous")&&_++,y("percent total")&&_++;var w=_>1;y("percent initial")&&(f=a.formatPercent(d.begR),w&&(f+=" of initial"),g.push(f)),y("percent previous")&&(f=a.formatPercent(d.difR),w&&(f+=" of previous"),g.push(f)),y("percent total")&&(f=a.formatPercent(d.sumR),w&&(f+=" of total"),g.push(f))}return g.join("<br>")}(e,r,n,i):v.getValue(s.text,r),v.coerceString(m,o)}(I,n,i,S,P);k=function(t,e){var r=v.getValue(t.textposition,e);return v.coerceEnumerated(x,r)}(z,i);var B="stack"===w.mode||"relative"===w.mode,N=n[i],j=!B||N._outmost,U=N.hasB,V=g&&g-y>_;if(F&&"none"!==k&&(!N.isBlank&&s!==u&&f!==p||"auto"!==k&&"inside"!==k)){var q=I.font,H=d.getBarColor(n[i],z),G=d.getInsideTextFont(z,i,q,H),W=d.getOutsideTextFont(z,i,q),Y=z.insidetextanchor||"end",X=r.datum();R?"log"===S.type&&X.s0<=0&&(s=S.range[0]<S.range[1]?0:S._length):"log"===P.type&&X.s0<=0&&(f=P.range[0]<P.range[1]?P._length:0);var Z,K,J,$,Q,tt=Math.abs(u-s),et=Math.abs(p-f),rt=tt-2*_,nt=et-2*_;if("outside"===k&&(j||N.hasB||(k="inside")),"auto"===k)if(j){k="inside",Z=D(r,F,Q=a.ensureUniformFontSize(t,G)),J=(K=l.bBox(Z.node())).width,$=K.height;var it,at=J>0&&$>0;it=V?U?E(rt-2*g,nt,J,$,R)||E(rt,nt-2*g,J,$,R):R?E(rt-(g-y),nt,J,$,R)||E(rt,nt-2*(g-y),J,$,R):E(rt,nt-(g-y),J,$,R)||E(rt-2*(g-y),nt,J,$,R):E(rt,nt,J,$,R),at&&it?k="inside":(k="outside",Z.remove(),Z=null)}else k="inside";if(!Z){var ot=(Z=D(r,F,Q=a.ensureUniformFontSize(t,"outside"===k?W:G))).attr("transform");if(Z.attr("transform",""),J=(K=l.bBox(Z.node())).width,$=K.height,Z.attr("transform",ot),J<=0||$<=0)return void Z.remove()}var st,lt=z.textangle;st="outside"===k?function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,u=a.angle||0,c=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/c));var v=L(u),g=C(i,v),y=(s?g.x:g.y)/2,m=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,k=0,M=s?A(e,t):A(r,n);return s?(b=e-M*o,T=M*y):(w=n+M*o,k=-M*y),{textX:m,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:k,scale:d,rotate:v}}(s,u,f,p,K,{isHorizontal:R,constrained:"both"===z.constraintext||"outside"===z.constraintext,angle:lt}):O(s,u,f,p,K,{isHorizontal:R,constrained:"both"===z.constraintext||"inside"===z.constraintext,angle:lt,anchor:Y,hasB:U,r:g,overhead:y}),st.fontSize=Q.size,h("histogram"===z.type?"bar":z.type,st,I),N.transform=st;var ut=M(Z,I,w,T);a.setTransormAndDisplay(ut,st)}else r.select("text").remove()}(t,e,R,r,T,H,G,W,Y,rt,it,g,y),e.layerClipId&&l.hideOutsideRangePoint(u,R.select("text"),w,P,f.xcalendar,f.ycalendar)}));var W=!1===f.cliponaxis;l.setClipUrl(u,W?null:e.layerClipId,t)}));u.getComponentMethod("errorbars","plot")(t,z,e,g)},toMoveInsideBar:O}},45784:function(t){"use strict";function e(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}t.exports=function(t,r){var n,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l="funnel"===s.type,u="h"===s.orientation,c=[];if(!1===r)for(n=0;n<i.length;n++)i[n].selected=0;else for(n=0;n<i.length;n++){var f=i[n],h="ct"in f?f.ct:e(f,a,o,u,l);r.contains(h,!1,n,t)?(c.push({pointNumber:n,x:a.c2d(f.x),y:o.c2d(f.y)}),f.selected=1):f.selected=0}return c}},72592:function(t,e,r){"use strict";t.exports=i;var n=r(3400).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),a=[],o=0;o<t.length;o++){for(var s=t[o],l=0;l<s.length;l++){var u=s[l],c=u.p;void 0===c&&(c=u[i]),void 0!==c&&a.push(c)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=a;var f=n(a);this.distinctPositions=f.vals,1===f.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(f.minDiff,r);var h=(e.posAxis||{}).type;"category"!==h&&"multicategory"!==h||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},i.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},i.prototype.getLabel=function(t,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?t:Math.round(t/this.binWidth))}},60100:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(43616),o=r(3400),s=r(24040),l=r(82744).resizeText,u=r(20832),c=u.textfont,f=u.insidetextfont,h=u.outsidetextfont,p=r(60444);function d(t,e,r){a.pointStyle(t.selectAll("path"),e,r),v(t,e,r)}function v(t,e,r){t.selectAll("text").each((function(t){var i=n.select(this),s=o.ensureUniformFontSize(r,g(i,t,e,r));a.font(i,s)}))}function g(t,e,r,n){var i=n._fullLayout.font,a=r.textfont;if(t.classed("bartext-inside")){var o=_(e,r);a=m(r,e.i,i,o)}else t.classed("bartext-outside")&&(a=x(r,e.i,i));return a}function y(t,e,r){return b(c,t.textfont,e,r)}function m(t,e,r,n){var a=y(t,e,r);return(void 0===t._input.textfont||void 0===t._input.textfont.color||Array.isArray(t.textfont.color)&&void 0===t.textfont.color[e])&&(a={color:i.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),b(f,t.insidetextfont,e,a)}function x(t,e,r){var n=y(t,e,r);return b(h,t.outsidetextfont,e,n)}function b(t,e,r,n){e=e||{};var i=p.getValue(e.family,r),a=p.getValue(e.size,r),o=p.getValue(e.color,r),s=p.getValue(e.weight,r),l=p.getValue(e.style,r),u=p.getValue(e.variant,r),c=p.getValue(e.textcase,r),f=p.getValue(e.lineposition,r),h=p.getValue(e.shadow,r);return{family:p.coerceString(t.family,i,n.family),size:p.coerceNumber(t.size,a,n.size),color:p.coerceColor(t.color,o,n.color),weight:p.coerceString(t.weight,s,n.weight),style:p.coerceString(t.style,l,n.style),variant:p.coerceString(t.variant,u,n.variant),textcase:p.coerceString(t.variant,c,n.textcase),lineposition:p.coerceString(t.variant,f,n.lineposition),shadow:p.coerceString(t.variant,h,n.shadow)}}function _(t,e){return"waterfall"===e.type?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}t.exports={style:function(t){var e=n.select(t).selectAll('g[class^="barlayer"]').selectAll("g.trace");l(t,e,"bar");var r=e.size(),i=t._fullLayout;e.style("opacity",(function(t){return t[0].trace.opacity})).each((function(t){("stack"===i.barmode&&r>1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:v,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:l}},55592:function(t,e,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(3400).coercePattern;t.exports=function(t,e,r,s,l){var u=r("marker.color",s),c=i(t,"marker");c&&a(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(t,e,r){"use strict";var n=r(33428),i=r(3400);function a(t){return"_"+t+"Text_minsize"}t.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=o<i,r[n]=r[n]||1/0,e.hide||(r[n]=Math.min(r[n],Math.max(o,i)))}},clearMinTextSize:function(t,e){e[a(t)]=void 0},resizeText:function(t,e,r){var a=t._fullLayout,o=a["_"+r+"Text_minsize"];if(o){var s,l="hide"===a.uniformtext.mode;switch(r){case"funnelarea":case"pie":case"sunburst":s="g.slice";break;case"treemap":case"icicle":s="g.slice, g.pathbar";break;default:s="g.points > g.point"}e.selectAll(s).each((function(t){var e=t.transform;if(e){e.scale=l&&e.hide?0:o/e.fontSize;var r=n.select(this).select("text");i.setTransormAndDisplay(r,e)}}))}}}},78100:function(t,e,r){"use strict";var n,i=r(21776).Ks,a=r(92880).extendFlat,o=r(8319),s=r(20832);t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(n=a({},s.marker),delete n.cornerradius,n),hoverinfo:o.hoverinfo,hovertemplate:i(),selected:s.selected,unselected:s.unselected}},47056:function(t,e,r){"use strict";var n=r(94288).hasColorscale,i=r(47128),a=r(3400).isArrayOrTypedArray,o=r(84664),s=r(96376).setGroupPositions,l=r(4500),u=r(24040).traceIs,c=r(3400).extendFlat;t.exports={calc:function(t,e){for(var r=t._fullLayout,s=e.subplot,u=r[s].radialaxis,c=r[s].angularaxis,f=u.makeCalcdata(e,"r"),h=c.makeCalcdata(e,"theta"),p=e._length,d=new Array(p),v=f,g=h,y=0;y<p;y++)d[y]={p:g[y],s:v[y]};function m(t){var r=e[t];void 0!==r&&(e["_"+t]=a(r)?c.makeCalcdata(e,t):c.d2c(r,e.thetaunit))}return"linear"===c.type&&(m("width"),m("offset")),n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}),o(d,e),l(d,e),d},crossTraceCalc:function(t,e,r){for(var n=t.calcdata,i=[],a=0;a<n.length;a++){var o=n[a],l=o[0].trace;!0===l.visible&&u(l,"bar")&&l.subplot===r&&i.push(o)}var f=c({},e.radialaxis,{_id:"x"}),h=e.angularaxis;s(t,h,f,i,{mode:e.barmode,norm:e.barnorm,gap:e.bargap,groupgap:e.bargroupgap})}}},70384:function(t,e,r){"use strict";var n=r(3400),i=r(85968).handleRThetaDefaults,a=r(55592),o=r(78100);t.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),a(t,e,l,r,s),n.coerceSelectionMarkerOpacity(e,l)):e.visible=!1}},68896:function(t,e,r){"use strict";var n=r(93024),i=r(3400),a=r(63400).getTraceColor,o=i.fillText,s=r(8504).makeHoverPointText,l=r(57384).isPtInsidePolygon;t.exports=function(t,e,r){var u=t.cd,c=u[0].trace,f=t.subplot,h=f.radialAxis,p=f.angularAxis,d=f.vangles,v=d?l:i.isPtInsideSector,g=t.maxHoverDistance,y=p._period||2*Math.PI,m=Math.abs(h.g2p(Math.sqrt(e*e+r*r))),x=Math.atan2(r,e);if(h.range[0]>h.range[1]&&(x+=Math.PI),n.getClosest(u,(function(t){return v(m,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?g+Math.min(1,Math.abs(t.thetag1-t.thetag0)/y)-1+(t.rp1-m)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=u[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,t),s(_,c,f,t),t.hovertemplate=c.hovertemplate,t.color=a(c,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},94456:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(40872),categories:["polar","bar","showLegend"],attributes:r(78100),layoutAttributes:r(9320),supplyDefaults:r(70384),supplyLayoutDefaults:r(89580),calc:r(47056).calc,crossTraceCalc:r(47056).crossTraceCalc,plot:r(42040),colorbar:r(5528),formatLabels:r(22852),style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(68896),selectPoints:r(45784),meta:{}}},9320:function(t){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(t,e,r){"use strict";var n=r(3400),i=r(9320);t.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l<r.length;l++){var u=r[l];"barpolar"===u.type&&!0===u.visible&&(o[a=u.subplot]||(s("barmode"),s("bargap"),o[a]=1))}}},42040:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(43616),s=r(57384);t.exports=function(t,e,r){var l=t._context.staticPlot,u=e.xaxis,c=e.yaxis,f=e.radialAxis,h=e.angularAxis,p=function(t){var e=t.cxx,r=t.cyy;return t.vangles?function(n,i,o,l){var u,c;a.angleDelta(o,l)>0?(u=o,c=l):(u=l,c=o);var f=[s.findEnclosingVertexAngles(u,t.vangles)[0],(u+c)/2,s.findEnclosingVertexAngles(c,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,u,c,f,e,r)}:function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),d=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(d,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=f.c2p(t.s0),s=t.rp1=f.c2p(t.s1),l=t.thetag0=h.c2g(t.p0),d=t.thetag1=h.c2g(t.p1);if(i(o)&&i(s)&&i(l)&&i(d)&&o!==s&&l!==d){var v=f.c2g(t.s1),g=(l+d)/2;t.ct=[u.c2p(v*Math.cos(g)),c.c2p(v*Math.sin(g))],e=p(o,s,l,d)}else e="M0,0Z";a.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},63188:function(t,e,r){"use strict";var n=r(98304),i=r(52904),a=r(20832),o=r(22548),s=r(29736).axisHoverFormat,l=r(21776).Ks,u=r(92880).extendFlat,c=i.marker,f=c.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:u({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:u({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:u({},c.angle,{arrayOk:!1,editType:"calc"}),size:u({},c.size,{arrayOk:!1,editType:"calc"}),color:u({},c.color,{arrayOk:!1,editType:"style"}),line:{color:u({},f.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:u({},f.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:i.selected.marker,editType:"style"},unselected:{marker:i.unselected.marker,editType:"style"},text:u({},i.text,{}),hovertext:u({},i.hovertext,{}),hovertemplate:l({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:i.zorder}},62555:function(t,e,r){"use strict";var n=r(38248),i=r(54460),a=r(1220),o=r(3400),s=r(39032).BADNUM,l=o._;t.exports=function(t,e){var r,u,m,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||"x"),A=i.getFromId(t,e.yaxis||"y"),M=[],S="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(m=k,x="x",b=A,_="y",w=!!e.yperiodalignment):(m=A,x="y",b=k,_="x",w=!!e.xperiodalignment);var E,L,C,O,P,I,D=function(t,e,r,i){var s,l=e+"0"in t;if(e in t||l&&"d"+e in t){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(t.name)&&"date"===r.type)?t.name:i;for(var c="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]),f=t._length,h=new Array(f),p=0;p<f;p++)h[p]=c;return[h]}(e,_,b,T[S]),z=D[0],R=D[1],F=o.distinctVals(z,b),B=F.vals,N=F.minDiff/2,j="all"===(e.boxpoints||e.points)?o.identity:function(t){return t.v<E.lf||t.v>E.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return m.d2c((e[t]||[])[r])},q=1/0,H=-1/0;for(r=0;r<e._length;r++){var G=z[r];if(n(G)){if((E={}).pos=E[_]=G,w&&R&&(E.orig_p=R[r]),E.q1=V("q1"),E.med=V("median"),E.q3=V("q3"),L=[],U&&o.isArrayOrTypedArray(U[r]))for(u=0;u<U[r].length;u++)(I=m.d2c(U[r][u]))!==s&&(c(P={v:I,i:[r,u]},e,[r,u]),L.push(P));if(E.pts=L.sort(f),O=(C=E[x]=L.map(h)).length,E.med!==s&&E.q1!==s&&E.q3!==s&&E.med>=E.q1&&E.q3>=E.med){var W=V("lowerfence");E.lf=W!==s&&W<=E.q1?W:p(E,C,O);var Y=V("upperfence");E.uf=Y!==s&&Y>=E.q3?Y:d(E,C,O);var X=V("mean");E.mean=X!==s?X:O?o.mean(C,O):(E.q1+E.q3)/2;var Z=V("sd");E.sd=X!==s&&Z>=0?Z:O?o.stdev(C,O,E.mean):E.q3-E.q1,E.lo=v(E),E.uo=g(E);var K=V("notchspan");K=K!==s&&K>0?K:y(E,O),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,$=E.uf;e.boxpoints&&C.length&&(J=Math.min(J,C[0]),$=Math.max($,C[O-1])),e.notched&&(J=Math.min(J,E.ln),$=Math.max($,E.un)),E.min=J,E.max=$}else{var Q;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[m._id]=i.findExtremes(m,[q,H],{padded:!0})}else{var tt=m.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i<r;i++)n[i]=t[i]-e;return n[r]=t[r-1]+e,n}(B,N),rt=B.length,nt=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=[];return e}(rt);for(r=0;r<e._length;r++)if(I=tt[r],n(I)){var it=o.findBin(z[r],et);it>=0&&it<rt&&(c(P={v:I,i:r},e,r),nt[it].push(P))}var at=1/0,ot=-1/0,st=e.quartilemethod,lt="exclusive"===st,ut="inclusive"===st;for(r=0;r<rt;r++)if(nt[r].length>0){var ct,ft;(E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),O=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[O-1],E.mean=o.mean(C,O),E.sd=o.stdev(C,O,E.mean)*e.sdmultiple,E.med=o.interp(C,.5),O%2&&(lt||ut)?(lt?(ct=C.slice(0,O/2),ft=C.slice(O/2+1)):ut&&(ct=C.slice(0,O/2+1),ft=C.slice(O/2)),E.q1=o.interp(ct,.5),E.q3=o.interp(ft,.5)):(E.q1=o.interp(C,.25),E.q3=o.interp(C,.75)),E.lf=p(E,C,O),E.uf=d(E,C,O),E.lo=v(E),E.uo=g(E);var ht=y(E,O);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e.notched&&o.isTypedArray(tt)&&(tt=Array.from(tt)),e._extremes[m._id]=i.findExtremes(m,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r<t.length;r++){for(var n=t[r].pts||[],i={},a=0;a<n.length;a++)i[n[a].i]=a;o.tagSelected(n,e,i)}}(M,e),M.length>0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,"median:"),min:l(t,"min:"),q1:l(t,"q1:"),q3:l(t,"q3:"),max:l(t,"max:"),mean:"sd"===e.boxmean||"sd"===e.sizemode?l(t,"mean ± σ:").replace("σ",1===e.sdmultiple?"σ":e.sdmultiple+"σ"):l(t,"mean:"),lf:l(t,"lower fence:"),uf:l(t,"upper fence:")}},T[S]++,M):[{t:{empty:!0}}]};var u={text:"tx",hovertext:"htx"};function c(t,e,r){for(var n in u)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[u[n]]=e[n][r[0]][r[1]]):t[u[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function v(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function y(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},96404:function(t,e,r){"use strict";var n=r(54460),i=r(3400),a=r(71888).getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,u,c=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],v=0;for(s=0;s<r.length;s++)for(u=c[r[s]],l=0;l<u.length;l++)d.push(o.c2l(u[l].pos,!0)),v+=(u[l].pts2||[]).length;if(d.length){var g=i.distinctVals(d);"category"!==o.type&&"multicategory"!==o.type||(g.minDiff=1);var y=g.minDiff/2;n.minDtick(o,g.minDiff,g.vals[0],!0);var m=f["violin"===t?"_numViolins":"_numBoxes"],x="group"===f[t+"mode"]&&m>1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s<r.length;s++){var w,T,k,A,M,S,E=(u=c[r[s]])[0].trace,L=u[0].t,C=E.width,O=E.side;if(C)w=T=A=C/2,k=0;else if(w=y,x){var P=a(f,o._id)+E.orientation,I=(f._alignmentOpts[P]||{})[E.alignmentgroup]||{},D=Object.keys(I.offsetGroups||{}).length,z=D||m;T=w*b*_/z,k=2*w*(((D?E._offsetIndex:L.num)+.5)/z-.5)*b,A=w*b/z}else T=w*b*_,k=0,A=w;L.dPos=w,L.bPos=k,L.bdPos=T,L.wHover=A;var R,F,B,N,j,U,V=k+T,q=Boolean(C);if("positive"===O?(M=w*(C?1:.5),R=V,S=R=k):"negative"===O?(M=R=k,S=w*(C?1:.5),F=V):(M=S=w,R=F=V),(E.boxpoints||E.points)&&v>0){var H=E.pointpos,G=E.jitter,W=E.marker.size/2,Y=0;H+G>=0&&((Y=V*(H+G))>M?(q=!0,j=W,B=Y):Y>R&&(j=W,B=M)),Y<=M&&(B=M);var X=0;H-G<=0&&((X=-V*(H-G))>S?(q=!0,U=W,N=X):X>F&&(U=W,N=S)),X<=S&&(N=S)}else B=M,N=S;var Z=new Array(u.length);for(l=0;l<u.length;l++)Z[l]=u[l].pos;E._extremes[h]=n.findExtremes(o,Z,{padded:q,vpadminus:N,vpadplus:B,vpadLinearized:!0,ppadminus:{x:U,y:j}[p],ppadplus:{x:j,y:U}[p]})}}}t.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,a=0;a<o.length;a++){for(var l=o[a],u="h"===l?i:n,c=[],f=0;f<r.length;f++){var h=r[f],p=h[0].t,d=h[0].trace;!0!==d.visible||"box"!==d.type&&"candlestick"!==d.type||p.empty||(d.orientation||"v")!==l||d.xaxis!==n._id||d.yaxis!==i._id||c.push(f)}s("box",t,c,u)}},setPositionOffset:s}},90624:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(76308),o=r(31147),s=r(20011),l=r(52976),u=r(63188);function c(t,e,r,a){function o(t){var e=0;return t&&t.length&&(e+=1,n.isArrayOrTypedArray(t[0])&&t[0].length&&(e+=1)),e}function s(e){return n.validate(t[e],u[e])}var c,f=r("y"),h=r("x");if("box"===e.type){var p=r("q1"),d=r("median"),v=r("q3");e._hasPreCompStats=p&&p.length&&d&&d.length&&v&&v.length,c=Math.min(n.minRowLength(p),n.minRowLength(d),n.minRowLength(v))}var g,y,m=o(f),x=o(h),b=m&&n.minRowLength(f),_=x&&n.minRowLength(h),w=a.calendar,T={autotypenumbers:a.autotypenumbers};if(e._hasPreCompStats)switch(String(x)+String(m)){case"00":var k=s("x0")||s("dx");g=!s("y0")&&!s("dy")||k?"v":"h",y=c;break;case"10":g="v",y=Math.min(c,_);break;case"20":g="h",y=Math.min(c,h.length);break;case"01":g="h",y=Math.min(c,b);break;case"02":g="v",y=Math.min(c,f.length);break;case"12":g="v",y=Math.min(c,_,f.length);break;case"21":g="h",y=Math.min(c,h.length,b);break;case"11":y=0;break;case"22":var A,M=!1;for(A=0;A<h.length;A++)if("category"===l(h[A],w,T)){M=!0;break}if(M)g="v",y=Math.min(c,_,f.length);else{for(A=0;A<f.length;A++)if("category"===l(f[A],w,T)){M=!0;break}M?(g="h",y=Math.min(c,h.length,b)):(g="v",y=Math.min(c,_,f.length))}}else m>0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(y){e._length=y;var S=r("orientation",g);e._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===m&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===m&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,u,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";e._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var c=r(a+"points",l);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",e.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}t.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,u,r,i)}if(c(t,e,s,i),!1!==e.visible){o(t,e,i,s),s("xhoverformat"),s("yhoverformat");var l=e._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(t.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s("mean"),d=s("sd");p&&p.length&&(h=!0,d&&d.length&&(h="sd"))}s("whiskerwidth");var v,g=s("sizemode");"quartiles"===g&&(v=s("boxmean",h)),s("showwhiskers","quartiles"===g),"sd"!==g&&"sd"!==v||s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(l){var m=s("notchspan");m&&m.length&&(y=!0)}else n.validate(t.notchwidth,u.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),f(t,e,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,u,t)}for(var o=0;o<t.length;o++){var l=(i=t[o]).type;"box"!==l&&"violin"!==l||(r=i._input,"group"===e[l+"mode"]&&s(r,i,e,a))}},handleSampleDefaults:c,handlePointsDefaults:f}},10392:function(t){"use strict";t.exports=function(t,e){return e.hoverOnBox&&(t.hoverOnBox=e.hoverOnBox),"xVal"in e&&(t.x=e.xVal),"yVal"in e&&(t.y=e.yVal),e.xa&&(t.xaxis=e.xa),e.ya&&(t.yaxis=e.ya),t}},27576:function(t,e,r){"use strict";var n=r(54460),i=r(3400),a=r(93024),o=r(76308),s=i.fillText;function l(t,e,r,s){var l,u,c,f,h,p,d,v,g,y,m,x,b,_,w=t.cd,T=t.xa,k=t.ya,A=w[0].trace,M=w[0].t,S="violin"===A.type,E=M.bdPos,L=M.wHover,C=function(t){return c.c2l(t.pos)+M.bPos-c.c2l(p)};S&&"both"!==A.side?("positive"===A.side&&(g=function(t){var e=C(t);return a.inbox(e,e+L,y)},x=E,b=0),"negative"===A.side&&(g=function(t){var e=C(t);return a.inbox(e-L,e,y)},x=0,b=E)):(g=function(t){var e=C(t);return a.inbox(e-L,e+L,y)},x=b=E),_=S?function(t){return a.inbox(t.span[0]-h,t.span[1]-h,y)}:function(t){return a.inbox(t.min-h,t.max-h,y)},"h"===A.orientation?(h=e,p=r,d=_,v=g,l="y",c=k,u="x",f=T):(h=r,p=e,d=g,v=_,l="x",c=T,u="y",f=k);var O=Math.min(1,E/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function P(t){return(d(t)+v(t))/2}y=t.maxHoverDistance-O,m=t.maxSpikeDistance-O;var I=a.getDistanceFunction(s,d,v,P);if(a.getClosest(w,I,t),!1===t.index)return[];var D=w[t.index],z=A.line.color,R=(A.marker||{}).color;o.opacity(z)&&A.line.width?t.color=z:o.opacity(R)&&A.boxpoints?t.color=R:t.color=A.fillcolor,t[l+"0"]=c.c2p(D.pos+M.bPos-b,!0),t[l+"1"]=c.c2p(D.pos+M.bPos+x,!0),t[l+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=l+"Spike";t.spikeDistance=P(D)*m/y,t[F]=c.c2p(D.pos,!0);var B=A.boxmean||"sd"===A.sizemode||(A.meanline||{}).visible,N=A.boxpoints||A.points,j=N&&B?["max","uf","q3","med","mean","q1","lf","min"]:N&&!B?["max","uf","q3","med","q1","lf","min"]:!N&&B?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=f.range[1]<f.range[0];A.orientation===(U?"v":"h")&&j.reverse();for(var V=t.spikeDistance,q=t[F],H=[],G=0;G<j.length;G++){var W=j[G];if(W in D){var Y=D[W],X=f.c2p(Y,!0),Z=i.extendFlat({},t);Z.attr=W,Z[u+"0"]=Z[u+"1"]=X,Z[u+"LabelVal"]=Y,Z[u+"Label"]=(M.labels?M.labels[W]+" ":"")+n.hoverLabelText(f,Y,A[u+"hoverformat"]),Z.hoverOnBox=!0,"mean"!==W||!("sd"in D)||"sd"!==A.boxmean&&"sd"!==A.sizemode||(Z[u+"err"]=D.sd),Z.hovertemplate=!1,H.push(Z)}}t.name="",t.spikeDistance=void 0,t[F]=void 0;for(var K=0;K<H.length;K++)"med"!==H[K].attr?(H[K].name="",H[K].spikeDistance=void 0,H[K][F]=void 0):(H[K].spikeDistance=V,H[K][F]=q);return H}function u(t,e,r){for(var n,o,l,u=t.cd,c=t.xa,f=t.ya,h=u[0].trace,p=c.c2p(e),d=f.c2p(r),v=a.quadrature((function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(c.c2p(t.x)-p)-e,1-3/e)}),(function(t){var e=Math.max(3,t.mrc||0);return Math.max(Math.abs(f.c2p(t.y)-d)-e,1-3/e)})),g=!1,y=0;y<u.length;y++){o=u[y];for(var m=0;m<(o.pts||[]).length;m++){var x=v(l=o.pts[m]);x<=t.distance&&(t.distance=x,g=[y,m])}}if(!g)return!1;l=(o=u[g[0]]).pts[g[1]];var b=c.c2p(l.x,!0),_=f.c2p(l.y,!0),w=l.mrc||1;n=i.extendFlat({},t,{index:l.i,color:(h.marker||{}).color,name:h.name,x0:b-w,x1:b+w,y0:_-w,y1:_+w,spikeDistance:t.distance,hovertemplate:h.hovertemplate});var T,k=o.orig_p,A=void 0!==k?k:o.pos;return"h"===h.orientation?(T=f,n.xLabelVal=l.x,n.yLabelVal=A):(T=c,n.xLabelVal=A,n.yLabelVal=l.y),n[T._id.charAt(0)+"Spike"]=T.c2p(o.pos,!0),s(l,h,n),n}t.exports={hoverPoints:function(t,e,r,n){var i,a=t.cd[0].trace.hoveron,o=[];return-1!==a.indexOf("boxes")&&(o=o.concat(l(t,e,r,n))),-1!==a.indexOf("points")&&(i=u(t,e,r)),"closest"===n?i?[i]:o:i?(o.push(i),o):o},hoverOnBoxes:l,hoverOnPoints:u}},67244:function(t,e,r){"use strict";t.exports={attributes:r(63188),layoutAttributes:r(16560),supplyDefaults:r(90624).supplyDefaults,crossTraceDefaults:r(90624).crossTraceDefaults,supplyLayoutDefaults:r(68832).supplyLayoutDefaults,calc:r(62555),crossTraceCalc:r(96404).crossTraceCalc,plot:r(18728).plot,style:r(25776).style,styleOnSelect:r(25776).styleOnSelect,hoverPoints:r(27576).hoverPoints,eventData:r(10392),selectPoints:r(8264),moduleType:"trace",name:"box",basePlotModule:r(57952),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},16560:function(t){"use strict";t.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},68832:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(16560);function o(t,e,r,i,a){for(var o=a+"Layout",s=!1,l=0;l<r.length;l++){var u=r[l];if(n.traceIs(u,o)){s=!0;break}}s&&(i(a+"mode"),i(a+"gap"),i(a+"groupgap"))}t.exports={supplyLayoutDefaults:function(t,e,r){o(0,0,r,(function(r,n){return i.coerce(t,e,a,r,n)}),"box")},_supply:o}},18728:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616);function o(t,e,r,a,o){var s,l,u="h"===r.orientation,c=e.val,f=e.pos,h=!!f.rangebreaks,p=a.bPos,d=a.wdPos||0,v=a.bPosPxOffset||0,g=r.whiskerwidth||0,y=!1!==r.showwhiskers,m=r.notched||!1,x=m?1-2*r.notchwidth:1;Array.isArray(a.bdPos)?(s=a.bdPos[0],l=a.bdPos[1]):(s=a.bdPos,l=a.bdPos);var b=t.selectAll("path.box").data("violin"!==r.type||r.box.visible?i.identity:[]);b.enter().append("path").style("vector-effect",o?"none":"non-scaling-stroke").attr("class","box"),b.exit().remove(),b.each((function(t){if(t.empty)return n.select(this).attr("d","M0,0Z");var e=f.c2l(t.pos+p,!0),a=f.l2p(e-s)+v,o=f.l2p(e+l)+v,b=h?(a+o)/2:f.l2p(e)+v,_=r.whiskerwidth,w=h?a*_+(1-_)*b:f.l2p(e-d)+v,T=h?o*_+(1-_)*b:f.l2p(e+d)+v,k=f.l2p(e-s*x)+v,A=f.l2p(e+l*x)+v,M="sd"===r.sizemode,S=c.c2p(M?t.mean-t.sd:t.q1,!0),E=M?c.c2p(t.mean+t.sd,!0):c.c2p(t.q3,!0),L=i.constrain(M?c.c2p(t.mean,!0):c.c2p(t.med,!0),Math.min(S,E)+1,Math.max(S,E)-1),C=void 0===t.lf||!1===r.boxpoints||M,O=c.c2p(C?t.min:t.lf,!0),P=c.c2p(C?t.max:t.uf,!0),I=c.c2p(t.ln,!0),D=c.c2p(t.un,!0);u?n.select(this).attr("d","M"+L+","+k+"V"+A+"M"+S+","+a+"V"+o+(m?"H"+I+"L"+L+","+A+"L"+D+","+o:"")+"H"+E+"V"+a+(m?"H"+D+"L"+L+","+k+"L"+I+","+a:"")+"Z"+(y?"M"+S+","+b+"H"+O+"M"+E+","+b+"H"+P+(0===g?"":"M"+O+","+w+"V"+T+"M"+P+","+w+"V"+T):"")):n.select(this).attr("d","M"+k+","+L+"H"+A+"M"+a+","+S+"H"+o+(m?"V"+I+"L"+A+","+L+"L"+o+","+D:"")+"V"+E+"H"+a+(m?"V"+D+"L"+k+","+L+"L"+a+","+I:"")+"Z"+(y?"M"+b+","+S+"V"+O+"M"+b+","+E+"V"+P+(0===g?"":"M"+w+","+O+"H"+T+"M"+w+","+P+"H"+T):""))}))}function s(t,e,r,n){var o=e.x,s=e.y,l=n.bdPos,u=n.bPos,c=r.boxpoints||r.points;i.seedPseudoRandom();var f=t.selectAll("g.points").data(c?function(t){return t.forEach((function(t){t.t=n,t.trace=r})),t}:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var h=f.selectAll("path").data((function(t){var e,n,a=t.pts2,o=Math.max((t.max-t.min)/10,t.q3-t.q1),s=1e-9*o,f=.01*o,h=[],p=0;if(r.jitter){if(0===o)for(p=1,h=new Array(a.length),e=0;e<a.length;e++)h[e]=1;else for(e=0;e<a.length;e++){var d=Math.max(0,e-5),v=a[d].v,g=Math.min(a.length-1,e+5),y=a[g].v;"all"!==c&&(a[e].v<t.lf?y=Math.min(y,t.lf):v=Math.max(v,t.uf));var m=Math.sqrt(f*(g-d)/(y-v+s))||0;m=i.constrain(Math.abs(m),0,1),h.push(m),p=Math.max(m,p)}n=2*r.jitter/(p||1)}for(e=0;e<a.length;e++){var x=a[e],b=x.v,_=r.jitter?n*h[e]*(i.pseudoRandom()-.5):0,w=t.pos+u+l*(r.pointpos+_);"h"===r.orientation?(x.y=w,x.x=b):(x.x=w,x.y=b),"suspectedoutliers"===c&&b<t.uo&&b>t.lo&&(x.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,u=e.pos,c=!!u.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(t){var e=u.c2l(t.pos+f,!0),i=u.l2p(e-o)+h,a=u.l2p(e+s)+h,d=c?(i+a)/2:u.l2p(e)+h,v=l.c2p(t.mean,!0),g=l.c2p(t.mean-t.sd,!0),y=l.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+v+","+i+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+v+","+i+"L"+y+","+d+"Z":"")):n.select(this).attr("d","M"+i+","+v+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+i+","+v+"L"+d+","+y+"Z":""))}))}t.exports={plot:function(t,e,r,a){var u=t._context.staticPlot,c=e.xaxis,f=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(t){var e,r,i=n.select(this),a=t[0],h=a.t,p=a.trace;h.wdPos=h.bdPos*p.whiskerwidth,!0!==p.visible||h.empty?i.remove():("h"===p.orientation?(e=f,r=c):(e=c,r=f),o(i,{pos:e,val:r},p,h,u),s(i,{x:c,y:f},p,h),l(i,{pos:e,val:r},p,h))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},8264:function(t){"use strict";t.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++)i[r].pts[n].selected=0;else for(r=0;r<i.length;r++)for(n=0;n<(i[r].pts||[]).length;n++){var l=i[r].pts[n],u=a.c2p(l.x),c=o.c2p(l.y);e.contains([u,c],null,l.i,t)?(s.push({pointNumber:l.i,x:a.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},25776:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(43616);t.exports={style:function(t,e,r){var o=r||n.select(t).selectAll("g.trace.boxes");o.style("opacity",(function(t){return t[0].trace.opacity})),o.each((function(e){var r=n.select(this),o=e[0].trace,s=o.line.width;function l(t,e,r,n){t.style("stroke-width",e+"px").call(i.stroke,r).call(i.fill,n)}var u=r.selectAll("path.box");if("candlestick"===o.type)u.each((function(t){if(!t.empty){var e=n.select(this),r=o[t.dir];l(e,r.line.width,r.line.color,r.fillcolor),e.style("opacity",o.selectedpoints&&!t.selected?.3:1)}}));else{l(u,s,o.line.color,o.fillcolor),r.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,o.line.color);var c=r.selectAll("path.point");a.pointStyle(c,o,t)}}))},styleOnSelect:function(t,e,r){var n=e[0].trace,i=r.selectAll("path.point");n.selectedpoints?a.selectedPointStyle(i,n):a.pointStyle(i,n,t)}}},64216:function(t,e,r){"use strict";var n=r(3400).extendFlat,i=r(29736).axisHoverFormat,a=r(20279),o=r(63188);function s(t){return{line:{color:n({},o.line.color,{dflt:t}),width:o.line.width,editType:"style"},fillcolor:o.fillcolor,editType:"style"}}t.exports={xperiod:a.xperiod,xperiod0:a.xperiod0,xperiodalignment:a.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:n({},o.line.width,{}),editType:"style"},increasing:s(a.increasing.line.color.dflt),decreasing:s(a.decreasing.line.color.dflt),text:a.text,hovertext:a.hovertext,whiskerwidth:n({},o.whiskerwidth,{dflt:0}),hoverlabel:a.hoverlabel,zorder:o.zorder}},46283:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(1220),o=r(42812).calcCommon;function s(t,e,r,n){return{min:r,q1:Math.min(t,n),med:n,q3:Math.max(t,n),max:e}}t.exports=function(t,e){var r=t._fullLayout,l=i.getFromId(t,e.xaxis),u=i.getFromId(t,e.yaxis),c=l.makeCalcdata(e,"x"),f=a(e,l,"x",c).vals,h=o(t,e,c,f,u,s);return h.length?(n.extendFlat(h[0].t,{num:r._numBoxes,dPos:n.distinctVals(f).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,h):[{t:{empty:!0}}]}},64588:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(52744),o=r(31147),s=r(64216);function l(t,e,r,n){var a=r(n+".line.color");r(n+".line.width",e.line.width),r(n+".fillcolor",i.addOpacity(a,.5))}t.exports=function(t,e,r,i){function u(r,i){return n.coerce(t,e,s,r,i)}a(t,e,u,i)?(o(t,e,i,u,{x:!0}),u("xhoverformat"),u("yhoverformat"),u("line.width"),l(0,e,u,"increasing"),l(0,e,u,"decreasing"),u("text"),u("hovertext"),u("whiskerwidth"),i._requestRangeslider[e.xaxis]=!0,u("zorder")):e.visible=!1}},61712:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"candlestick",basePlotModule:r(57952),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:r(64216),layoutAttributes:r(16560),supplyLayoutDefaults:r(68832).supplyLayoutDefaults,crossTraceCalc:r(96404).crossTraceCalc,supplyDefaults:r(64588),calc:r(46283),plot:r(18728).plot,layerName:"boxlayer",style:r(25776).style,hoverPoints:r(18720).hoverPoints,selectPoints:r(97384)}},93504:function(t,e,r){"use strict";var n=r(63856),i=r(31780);t.exports=function(t,e,r,a,o){a("a")||(a("da"),a("a0")),a("b")||(a("db"),a("b0")),function(t,e,r,a){["aaxis","baxis"].forEach((function(o){var s=o.charAt(0),l=t[o]||{},u=i.newContainer(e,o),c={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:e.font,name:o,data:t[s],calendar:e.calendar,dfltColor:a,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};n(l,u,c),u._categories=u._categories||[],t[o]||"-"===l.type||(t[o]={type:l.type})}))}(t,e,r,o)}},51676:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray;function i(t,e){if(!n(t)||e>=10)return null;for(var r=1/0,a=-1/0,o=t.length,s=0;s<o;s++){var l=t[s];if(n(l)){var u=i(l,e+1);u&&(r=Math.min(u[0],r),a=Math.max(u[1],a))}else r=Math.min(l,r),a=Math.max(l,a)}return[r,a]}t.exports=function(t){return i(t,0)}},85720:function(t,e,r){"use strict";var n=r(25376),i=r(98692),a=r(22548),o=n({editType:"calc"}),s=r(52904).zorder;o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=a.defaultLine,t.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:i,baxis:i,font:o,color:{valType:"color",dflt:a.defaultLine,editType:"plot"},transforms:void 0,zorder:s}},77712:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,v,g,y,m=n(r)?"a":"b",x=("a"===m?t.aaxis:t.baxis).smoothing,b="a"===m?t.a2i:t.b2j,_="a"===m?r:i,w="a"===m?i:r,T="a"===m?e.a.length:e.b.length,k="a"===m?e.b.length:e.a.length,A=Math.floor("a"===m?t.b2j(w):t.a2i(w)),M="a"===m?function(e){return t.evalxy([],e,A)}:function(e){return t.evalxy([],A,e)};x&&(s=Math.max(0,Math.min(k-2,A)),l=A-s,o="a"===m?function(e,r){return t.dxydi([],e,s,r,l)}:function(e,r){return t.dxydj([],s,e,l,r)});var S=b(_[0]),E=b(_[1]),L=S<E?1:-1,C=1e-8*(E-S),O=L>0?Math.floor:Math.ceil,P=L>0?Math.ceil:Math.floor,I=L>0?Math.min:Math.max,D=L>0?Math.max:Math.min,z=O(S+C),R=P(E-C),F=[[f=M(S)]];for(a=z;a*L<R*L;a+=L)u=[],v=D(S,a),y=(g=I(E,a+L))-v,c=Math.max(0,Math.min(T-2,Math.floor(.5*(v+g)))),h=M(g),x&&(p=o(c,v-c),d=o(c,g-c),u.push([f[0]+p[0]/3*y,f[1]+p[1]/3*y]),u.push([h[0]-d[0]/3*y,h[1]-d[1]/3*y])),u.push(h),F.push(u),f=h;return F}},98692:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(94724),o=r(29736).descriptionWithDates,s=r(67824).overrideAll,l=r(98192).u,u=r(92880).extendFlat;t.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:n({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:a.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:u({},a.labelalias,{editType:"calc"}),tickfont:n({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:o("tick label")},tickformatstops:s(a.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:u({},l,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:u({},l,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:i.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:n({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},63856:function(t,e,r){"use strict";var n=r(85720),i=r(76308).addOpacity,a=r(24040),o=r(3400),s=r(26332),l=r(95936),u=r(42568),c=r(22416),f=r(78344),h=r(52976);t.exports=function(t,e,r){var p=r.letter,d=r.font||{},v=n[p+"axis"];function g(r,n){return o.coerce(t,e,v,r,n)}function y(r,n){return o.coerce2(t,e,v,r,n)}r.name&&(e._name=r.name,e._id=r.name),g("autotypenumbers",r.autotypenumbersDflt);var m=g("type");"-"===m&&(r.data&&function(t,e){if("-"===t.type){var r=t._id.charAt(0),n=t[r+"calendar"];t.type=h(e,n,{autotypenumbers:t.autotypenumbers})}}(e,r.data),"-"===e.type?e.type="linear":m=t.type=e.type),g("smoothing"),g("cheatertype"),g("showticklabels"),g("labelprefix",p+" = "),g("labelsuffix"),g("showtickprefix"),g("showticksuffix"),g("separatethousands"),g("tickformat"),g("exponentformat"),g("minexponent"),g("showexponent"),g("categoryorder"),g("tickmode"),g("tickvals"),g("ticktext"),g("tick0"),g("dtick"),"array"===e.tickmode&&(g("arraytick0"),g("arraydtick")),g("labelpadding"),e._hovertitle=p,"date"===m&&a.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",r.calendar),f(e,r.fullLayout),e.c2p=o.identity;var x=g("color",r.dfltColor),b=x===t.color?x:d.color;g("title.text")&&(o.coerceFont(g,"title.font",d,{overrideDflt:{size:o.bigFont(d.size),color:b}}),g("title.offset")),g("tickangle"),g("autorange",!e.isValidRange(t.range))&&g("rangemode"),g("range"),e.cleanRange(),g("fixedrange"),s(t,e,g,m),u(t,e,g,m,r),l(t,e,g,m,r),c(t,e,g,{data:r.data,dataAttr:p});var _=y("gridcolor",i(x,.3)),w=y("gridwidth"),T=y("griddash"),k=g("showgrid");k||(delete e.gridcolor,delete e.gridwidth,delete e.griddash);var A=y("startlinecolor",x),M=y("startlinewidth",w);g("startline",e.showgrid||!!A||!!M)||(delete e.startlinecolor,delete e.startlinewidth);var S=y("endlinecolor",x),E=y("endlinewidth",w);return g("endline",e.showgrid||!!S||!!E)||(delete e.endlinecolor,delete e.endlinewidth),k?(g("minorgridcount"),g("minorgridwidth",w),g("minorgriddash",T),g("minorgridcolor",i(_,.06)),e.minorgridcount||(delete e.minorgridwidth,delete e.minorgriddash,delete e.minorgridcolor)):(delete e.gridcolor,delete e.gridwidth,delete e.griddash),"none"===e.showticklabels&&(delete e.tickfont,delete e.tickangle,delete e.showexponent,delete e.exponentformat,delete e.minexponent,delete e.tickformat,delete e.showticksuffix,delete e.showtickprefix),e.showticksuffix||delete e.ticksuffix,e.showtickprefix||delete e.tickprefix,g("tickmode"),e}},58744:function(t,e,r){"use strict";var n=r(54460),i=r(3400).isArray1D,a=r(60776),o=r(51676),s=r(19216),l=r(14724),u=r(24944),c=r(26136),f=r(51512),h=r(2872),p=r(81e3);t.exports=function(t,e){var r=n.getFromId(t,e.xaxis),d=n.getFromId(t,e.yaxis),v=e.aaxis,g=e.baxis,y=e.x,m=e.y,x=[];y&&i(y)&&x.push("x"),m&&i(m)&&x.push("y"),x.length&&h(e,v,g,"a","b",x);var b=e._a=e._a||e.a,_=e._b=e._b||e.b;y=e._x||e.x,m=e._y||e.y;var w={};if(e._cheater){var T="index"===v.cheatertype?b.length:b,k="index"===g.cheatertype?_.length:_;y=a(T,k,e.cheaterslope)}e._x=y=c(y),e._y=m=c(m),f(y,b,_),f(m,b,_),p(e),e.setScale();var A=o(y),M=o(m),S=.5*(A[1]-A[0]),E=.5*(A[1]+A[0]),L=.5*(M[1]-M[0]),C=.5*(M[1]+M[0]),O=1.3;return A=[E-S*O,E+S*O],M=[C-L*O,C+L*O],e._extremes[r._id]=n.findExtremes(r,A,{padded:!0}),e._extremes[d._id]=n.findExtremes(d,M,{padded:!0}),s(e,"a","b"),s(e,"b","a"),l(e,v),l(e,g),w.clipsegments=u(e._xctrl,e._yctrl,v,g),w.x=y,w.y=m,w.a=b,w.b=_,[w]}},24944:function(t){"use strict";t.exports=function(t,e,r,n){var i,a,o,s=[],l=!!r.smoothing,u=!!n.smoothing,c=t[0].length-1,f=t.length-1;for(i=0,a=[],o=[];i<=c;i++)a[i]=t[0][i],o[i]=e[0][i];for(s.push({x:a,y:o,bicubic:l}),i=0,a=[],o=[];i<=f;i++)a[i]=t[i][c],o[i]=e[i][c];for(s.push({x:a,y:o,bicubic:u}),i=c,a=[],o=[];i>=0;i--)a[c-i]=t[f][i],o[c-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},19216:function(t,e,r){"use strict";var n=r(54460),i=r(92880).extendFlat;t.exports=function(t,e,r){var a,o,s,l,u,c,f,h,p,d,v,g,y,m,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,O=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function I(n){var i,a,o,s,l,u,c,f,p,d,v,g,y=[],m=[],x={};if("b"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(O-2,a))),s=a-o,x.length=O,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i<C;i++)u=Math.min(C-2,i),c=i-u,f=t.evalxy([],i,a),A.smoothing&&i>0&&(p=t.dxydi([],i-1,o,0,s),y.push(l[0]+p[0]/3),m.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),y.push(f[0]-d[0]/3),m.push(f[1]-d[1]/3)),y.push(f[0]),m.push(f[1]),l=f;else for(i=t.a2i(n),u=Math.floor(Math.max(0,Math.min(C-2,i))),c=i-u,x.length=C,x.crossLength=O,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],u,e,c,r)},a=0;a<O;a++)o=Math.min(O-2,a),s=a-o,f=t.evalxy([],i,a),A.smoothing&&a>0&&(v=t.dxydj([],u,a-1,c,0),y.push(l[0]+v[0]/3),m.push(l[1]+v[1]/3),g=t.dxydj([],u,a-1,c,1),y.push(f[0]-g[0]/3),m.push(f[1]-g[1]/3)),y.push(f[0]),m.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=y,x.y=m,x.smoothing=A.smoothing,x}function D(n){var i,a,o,s,l,u=[],c=[],f={};if(f.length=x.length,f.crossLength=k.length,"b"===e)for(o=Math.max(0,Math.min(O-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;i<E;i++)u[i]=M[n*P][i],c[i]=S[n*P][i];else for(a=Math.max(0,Math.min(C-2,n)),s=Math.min(1,Math.max(0,n-a)),f.xy=function(e){return t.evalxy([],n,e)},f.dxy=function(e,r){return t.dxydj([],a,e,s,r)},i=0;i<L;i++)u[i]=M[i][n*P],c[i]=S[i][n*P];return f.axisLetter=e,f.axis=b,f.crossAxis=A,f.value=x[n],f.constvar=r,f.index=n,f.x=u,f.y=c,f.smoothing=A.smoothing,f}if("array"===b.tickmode){for(l=5e-15,c=(u=[Math.floor((x.length-1-b.arraytick0)/b.arraydtick*(1+l)),Math.ceil(-b.arraytick0/b.arraydtick/(1+l))].sort((function(t,e){return t-e})))[0]-1,f=u[1]+1,h=c;h<f;h++)(o=b.arraytick0+b.arraydtick*h)<0||o>x.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c;h<f;h++)if(s=b.arraytick0+b.arraydtick*h,v=Math.min(s+b.arraydtick,x.length-1),!(s<0||s>x.length-1||v<0||v>x.length-1))for(g=x[s],y=x[v],a=0;a<b.minorgridcount;a++)(m=v-s)<=0||(d=g+(y-g)*(a+1)/(b.minorgridcount+1)*(b.arraydtick/m))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=u[1],h=c;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c-1;h<f+1;h++)for(p=b.tick0+b.dtick*h,a=0;a<b.minorgridcount;a++)(d=p+b.dtick*(a+1)/(b.minorgridcount+1))<x[0]||d>x[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},14724:function(t,e,r){"use strict";var n=r(54460),i=r(92880).extendFlat;t.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;r<l.length;r++)o=l[r],-1!==["start","both"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a)),-1!==["end","both"].indexOf(e.showticklabels)&&(a=n.tickText(e,o.value),i(a,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(a))}},62284:function(t){"use strict";t.exports=function(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=u*(l+u)*3,p=l*(l+u)*3;return[[e[0]+(h&&c/h),e[1]+(h&&f/h)],[e[0]-(p&&c/p),e[1]-(p&&f/p)]]}},60776:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r){var i,a,o,s,l,u,c=[],f=n(t)?t.length:t,h=n(e)?e.length:e,p=n(t)?t:null,d=n(e)?e:null;p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var v=1/0,g=-1/0;for(a=0;a<h;a++)for(c[a]=[],l=d?(d[a]-d[0])*s:a/(h-1),i=0;i<f;i++)u=(p?(p[i]-p[0])*o:i/(f-1))-l*r,v=Math.min(u,v),g=Math.max(u,g),c[a][i]=u;var y=1/(g-v),m=-v*y;for(a=0;a<h;a++)for(i=0;i<f;i++)c[a][i]=y*c[a][i]+m;return c}},30180:function(t,e,r){"use strict";var n=r(62284),i=r(3400).ensureArray;function a(t,e,r){var n=-.5*r[0]+1.5*e[0],i=-.5*r[1]+1.5*e[1];return[(2*n+t[0])/3,(2*i+t[1])/3]}t.exports=function(t,e,r,o,s,l){var u,c,f,h,p,d,v,g,y,m,x=r[0].length,b=r.length,_=s?3*x-2:x,w=l?3*b-2:b;for(t=i(t,w),e=i(e,w),f=0;f<w;f++)t[f]=i(t[f],_),e[f]=i(e[f],_);for(c=0,h=0;c<b;c++,h+=l?3:1)for(p=t[h],d=e[h],v=r[c],g=o[c],u=0,f=0;u<x;u++,f+=s?3:1)p[f]=v[u],d[f]=g[u];if(s)for(c=0,h=0;c<b;c++,h+=l?3:1){for(u=1,f=3;u<x-1;u++,f+=3)y=n([r[c][u-1],o[c][u-1]],[r[c][u],o[c][u]],[r[c][u+1],o[c][u+1]],s),t[h][f-1]=y[0][0],e[h][f-1]=y[0][1],t[h][f+1]=y[1][0],e[h][f+1]=y[1][1];m=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=m[0],e[h][1]=m[1],m=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=m[0],e[h][_-2]=m[1]}if(l)for(f=0;f<_;f++){for(h=3;h<w-3;h+=3)y=n([t[h-3][f],e[h-3][f]],[t[h][f],e[h][f]],[t[h+3][f],e[h+3][f]],l),t[h-1][f]=y[0][0],e[h-1][f]=y[0][1],t[h+1][f]=y[1][0],e[h+1][f]=y[1][1];m=a([t[0][f],e[0][f]],[t[2][f],e[2][f]],[t[3][f],e[3][f]]),t[1][f]=m[0],e[1][f]=m[1],m=a([t[w-1][f],e[w-1][f]],[t[w-3][f],e[w-3][f]],[t[w-4][f],e[w-4][f]]),t[w-2][f]=m[0],e[w-2][f]=m[1]}if(s&&l)for(h=1;h<w;h+=(h+1)%3==0?2:1){for(f=3;f<_-3;f+=3)y=n([t[h][f-3],e[h][f-3]],[t[h][f],e[h][f]],[t[h][f+3],e[h][f+3]],s),t[h][f-1]=.5*(t[h][f-1]+y[0][0]),e[h][f-1]=.5*(e[h][f-1]+y[0][1]),t[h][f+1]=.5*(t[h][f+1]+y[1][0]),e[h][f+1]=.5*(e[h][f+1]+y[1][1]);m=a([t[h][0],e[h][0]],[t[h][2],e[h][2]],[t[h][3],e[h][3]]),t[h][1]=.5*(t[h][1]+m[0]),e[h][1]=.5*(e[h][1]+m[1]),m=a([t[h][_-1],e[h][_-1]],[t[h][_-3],e[h][_-3]],[t[h][_-4],e[h][_-4]]),t[h][_-2]=.5*(t[h][_-2]+m[0]),e[h][_-2]=.5*(e[h][_-2]+m[1])}return[t,e]}},24588:function(t){"use strict";t.exports={RELATIVE_CULL_TOLERANCE:1e-6}},26435:function(t){"use strict";t.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=1-i,d=p*p,v=p*i*2,g=-3*d,y=3*(d-v),m=3*(v-h),x=3*h,b=a*a,_=b*a,w=1-a,T=w*w,k=T*w;for(f=0;f<t.length;f++)o=g*(c=t[f])[n][r]+y*c[n][r+1]+m*c[n][r+2]+x*c[n][r+3],s=g*c[n+1][r]+y*c[n+1][r+1]+m*c[n+1][r+2]+x*c[n+1][r+3],l=g*c[n+2][r]+y*c[n+2][r+1]+m*c[n+2][r+2]+x*c[n+2][r+3],u=g*c[n+3][r]+y*c[n+3][r+1]+m*c[n+3][r+2]+x*c[n+3][r+3],e[f]=k*o+3*(T*a*s+w*b*l)+_*u;return e}:e?function(e,r,n,i,a){var o,s,l,u;e||(e=[]),r*=3;var c=i*i,f=1-i,h=f*f,p=f*i*2,d=-3*h,v=3*(h-p),g=3*(p-c),y=3*c,m=1-a;for(l=0;l<t.length;l++)o=d*(u=t[l])[n][r]+v*u[n][r+1]+g*u[n][r+2]+y*u[n][r+3],s=d*u[n+1][r]+v*u[n+1][r+1]+g*u[n+1][r+2]+y*u[n+1][r+3],e[l]=m*o+a*s;return e}:r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),n*=3;var h=a*a,p=h*a,d=1-a,v=d*d,g=v*d;for(c=0;c<t.length;c++)o=(f=t[c])[n][r+1]-f[n][r],s=f[n+1][r+1]-f[n+1][r],l=f[n+2][r+1]-f[n+2][r],u=f[n+3][r+1]-f[n+3][r],e[c]=g*o+3*(v*a*s+d*h*l)+p*u;return e}:function(e,r,n,i,a){var o,s,l,u;e||(e=[]);var c=1-a;for(l=0;l<t.length;l++)o=(u=t[l])[n][r+1]-u[n][r],s=u[n+1][r+1]-u[n+1][r],e[l]=c*o+a*s;return e}}},24464:function(t){"use strict";t.exports=function(t,e,r){return e&&r?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3,n*=3;var h=i*i,p=h*i,d=1-i,v=d*d,g=v*d,y=a*a,m=1-a,x=m*m,b=m*a*2,_=-3*x,w=3*(x-b),T=3*(b-y),k=3*y;for(f=0;f<t.length;f++)o=_*(c=t[f])[n][r]+w*c[n+1][r]+T*c[n+2][r]+k*c[n+3][r],s=_*c[n][r+1]+w*c[n+1][r+1]+T*c[n+2][r+1]+k*c[n+3][r+1],l=_*c[n][r+2]+w*c[n+1][r+2]+T*c[n+2][r+2]+k*c[n+3][r+2],u=_*c[n][r+3]+w*c[n+1][r+3]+T*c[n+2][r+3]+k*c[n+3][r+3],e[f]=g*o+3*(v*i*s+d*h*l)+p*u;return e}:e?function(e,r,n,i,a){var o,s,l,u,c,f;e||(e=[]),r*=3;var h=a*a,p=h*a,d=1-a,v=d*d,g=v*d;for(c=0;c<t.length;c++)o=(f=t[c])[n+1][r]-f[n][r],s=f[n+1][r+1]-f[n][r+1],l=f[n+1][r+2]-f[n][r+2],u=f[n+1][r+3]-f[n][r+3],e[c]=g*o+3*(v*a*s+d*h*l)+p*u;return e}:r?function(e,r,n,i,a){var o,s,l,u;e||(e=[]),n*=3;var c=1-i,f=a*a,h=1-a,p=h*h,d=h*a*2,v=-3*p,g=3*(p-d),y=3*(d-f),m=3*f;for(l=0;l<t.length;l++)o=v*(u=t[l])[n][r]+g*u[n+1][r]+y*u[n+2][r]+m*u[n+3][r],s=v*u[n][r+1]+g*u[n+1][r+1]+y*u[n+2][r+1]+m*u[n+3][r+1],e[l]=c*o+i*s;return e}:function(e,r,n,i,a){var o,s,l,u;e||(e=[]);var c=1-i;for(l=0;l<t.length;l++)o=(u=t[l])[n+1][r]-u[n][r],s=u[n+1][r+1]-u[n][r+1],e[l]=c*o+i*s;return e}}},29056:function(t){"use strict";t.exports=function(t,e,r,n,i){var a=e-2,o=r-2;return n&&i?function(e,r,n){var i,s,l,u,c,f;e||(e=[]);var h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),v=Math.max(0,Math.min(1,n-p));h*=3,p*=3;var g=d*d,y=g*d,m=1-d,x=m*m,b=x*m,_=v*v,w=_*v,T=1-v,k=T*T,A=k*T;for(f=0;f<t.length;f++)i=b*(c=t[f])[p][h]+3*(x*d*c[p][h+1]+m*g*c[p][h+2])+y*c[p][h+3],s=b*c[p+1][h]+3*(x*d*c[p+1][h+1]+m*g*c[p+1][h+2])+y*c[p+1][h+3],l=b*c[p+2][h]+3*(x*d*c[p+2][h+1]+m*g*c[p+2][h+2])+y*c[p+2][h+3],u=b*c[p+3][h]+3*(x*d*c[p+3][h+1]+m*g*c[p+3][h+2])+y*c[p+3][h+3],e[f]=A*i+3*(k*v*s+T*_*l)+w*u;return e}:n?function(e,r,n){e||(e=[]);var i,s,l,u,c,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),v=Math.max(0,Math.min(1,n-p));h*=3;var g=d*d,y=g*d,m=1-d,x=m*m,b=x*m,_=1-v;for(c=0;c<t.length;c++)i=_*(f=t[c])[p][h]+v*f[p+1][h],s=_*f[p][h+1]+v*f[p+1][h+1],l=_*f[p][h+2]+v*f[p+1][h+1],u=_*f[p][h+3]+v*f[p+1][h+1],e[c]=b*i+3*(x*d*s+m*g*l)+y*u;return e}:i?function(e,r,n){e||(e=[]);var i,s,l,u,c,f,h=Math.max(0,Math.min(Math.floor(r),a)),p=Math.max(0,Math.min(Math.floor(n),o)),d=Math.max(0,Math.min(1,r-h)),v=Math.max(0,Math.min(1,n-p));p*=3;var g=v*v,y=g*v,m=1-v,x=m*m,b=x*m,_=1-d;for(c=0;c<t.length;c++)i=_*(f=t[c])[p][h]+d*f[p][h+1],s=_*f[p+1][h]+d*f[p+1][h+1],l=_*f[p+2][h]+d*f[p+2][h+1],u=_*f[p+3][h]+d*f[p+3][h+1],e[c]=b*i+3*(x*v*s+m*g*l)+y*u;return e}:function(e,r,n){e||(e=[]);var i,s,l,u,c=Math.max(0,Math.min(Math.floor(r),a)),f=Math.max(0,Math.min(Math.floor(n),o)),h=Math.max(0,Math.min(1,r-c)),p=Math.max(0,Math.min(1,n-f)),d=1-p,v=1-h;for(l=0;l<t.length;l++)i=v*(u=t[l])[f][c]+h*u[f][c+1],s=v*u[f+1][c]+h*u[f+1][c+1],e[l]=d*i+p*s;return e}}},38356:function(t,e,r){"use strict";var n=r(3400),i=r(86411),a=r(93504),o=r(85720),s=r(22548);t.exports=function(t,e,r,l){function u(r,i){return n.coerce(t,e,o,r,i)}e._clipPathId="clip"+e.uid+"carpet";var c=u("color",s.defaultLine);n.coerceFont(u,"font",l.font),u("carpet"),a(t,e,l,u,c),e.a&&e.b?(e.a.length<3&&(e.aaxis.smoothing=0),e.b.length<3&&(e.baxis.smoothing=0),i(t,e,u)||(e.visible=!1),e._cheater&&u("cheaterslope"),u("zorder")):e.visible=!1}},95856:function(t,e,r){"use strict";t.exports={attributes:r(85720),supplyDefaults:r(38356),plot:r(164),calc:r(58744),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:r(57952),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},50948:function(t){"use strict";t.exports=function(t,e){for(var r,n=t._fullData.length,i=0;i<n;i++){var a=t._fullData[i];if(a.index!==e.index&&"carpet"===a.type&&(r||(r=a),a.carpet===e.carpet))return a}return r}},53416:function(t){"use strict";t.exports=function(t,e,r){if(0===t.length)return"";var n,i=[],a=r?3:1;for(n=0;n<t.length;n+=a)i.push(t[n]+","+e[n]),r&&n<t.length-a&&(i.push("C"),i.push([t[n+1]+","+e[n+1],t[n+2]+","+e[n+2]+" "].join(" ")));return i.join(r?"":"L")}},87072:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r){var i;for(n(t)?t.length>e.length&&(t=t.slice(0,e.length)):t=[],i=0;i<e.length;i++)t[i]=r(e[i]);return t}},15584:function(t){"use strict";t.exports=function(t,e,r,n,i,a){var o=i[0]*t.dpdx(e),s=i[1]*t.dpdy(r),l=1,u=1;if(a){var c=Math.sqrt(i[0]*i[0]+i[1]*i[1]),f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(i[0]*a[0]+i[1]*a[1])/c/f;u=Math.max(0,h)}var p=180*Math.atan2(s,o)/Math.PI;return p<-90?(p+=180,l=-l):p>90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},164:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(87072),o=r(53416),s=r(15584),l=r(72736),u=r(3400),c=u.strRotate,f=u.strTranslate,h=r(84284);function p(t,e,r,s,l,u,c){var f="const-"+l+"-lines",h=r.selectAll("."+f).data(u);h.enter().append("path").classed(f,!0).style("vector-effect",c?"none":"non-scaling-stroke"),h.each((function(r){var s=r,l=s.x,u=s.y,c=a([],l,t.c2p),f=a([],u,e.c2p),h="M"+o(c,f,s.smoothing);n.select(this).attr("d",h).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),h.exit().remove()}function d(t,e,r,a,o,u,h,p){var d=u.selectAll("text."+p).data(h);d.enter().append("text").classed(p,!0);var v=0,g={};return d.each((function(o,u){var h;if("auto"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}u||(g={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,y=n.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),m=i.bBox(this);y.attr("transform",f(h.p[0],h.p[1])+c(h.angle)+f(o.axis.labelpadding*d,.3*m.height)),v=Math.max(v,m.width+o.axis.labelpadding)})),d.exit().remove(),g.maxExtent=v,g}t.exports=function(t,e,r,i){var l=t._
@egberts
Copy link
Author

egberts commented Aug 23, 2024

Above generated using Plotly.Sankey and Pandas.

https://github.com/egberts/immigration/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment