advertools visualizations
Project description
adviz
Get startd quickly and see exmaples below
Install
pip install adviz
How to use
Count unique values in a list of items
import adviz
import pandas as pd
adviz.value_counts_plus(list('aaaaaaaaabbbbcccddddddddddeeeeeeeeeeeeffffggghhhiijjjjkkkllllmmmmmmmnnooop'))
<style type="text/css">
#T_16055_row0_col1, #T_16055_row0_col3 {
background-color: #cebc63;
color: #000000;
}
#T_16055_row0_col2, #T_16055_row0_col4, #T_16055_row8_col1, #T_16055_row8_col3, #T_16055_row9_col1, #T_16055_row9_col3 {
background-color: #00224e;
color: #f1f1f1;
}
#T_16055_row1_col1, #T_16055_row1_col3 {
background-color: #9d9576;
color: #f1f1f1;
}
#T_16055_row1_col2, #T_16055_row1_col4 {
background-color: #293f6e;
color: #f1f1f1;
}
#T_16055_row2_col1, #T_16055_row2_col3 {
background-color: #878478;
color: #f1f1f1;
}
#T_16055_row2_col2, #T_16055_row2_col4 {
background-color: #51586d;
color: #f1f1f1;
}
#T_16055_row3_col1, #T_16055_row3_col3 {
background-color: #5e636f;
color: #f1f1f1;
}
#T_16055_row3_col2, #T_16055_row3_col4 {
background-color: #6b6d72;
color: #f1f1f1;
}
#T_16055_row4_col1, #T_16055_row4_col3, #T_16055_row5_col1, #T_16055_row5_col3, #T_16055_row6_col1, #T_16055_row6_col3, #T_16055_row7_col1, #T_16055_row7_col3 {
background-color: #013271;
color: #f1f1f1;
}
#T_16055_row4_col2, #T_16055_row4_col4 {
background-color: #787877;
color: #f1f1f1;
}
#T_16055_row5_col2, #T_16055_row5_col4 {
background-color: #888578;
color: #f1f1f1;
}
#T_16055_row6_col2, #T_16055_row6_col4 {
background-color: #979177;
color: #f1f1f1;
}
#T_16055_row7_col2, #T_16055_row7_col4 {
background-color: #a89e73;
color: #f1f1f1;
}
#T_16055_row8_col2, #T_16055_row8_col4 {
background-color: #b5a86f;
color: #f1f1f1;
}
#T_16055_row9_col2, #T_16055_row9_col4 {
background-color: #c2b369;
color: #000000;
}
#T_16055_row10_col1, #T_16055_row10_col2, #T_16055_row10_col3, #T_16055_row10_col4 {
background-color: #fee838;
color: #000000;
}
</style>
data | count | cum_count | perc | cum_perc | |
---|---|---|---|---|---|
0 | e | 12 | 12 | 16.2% | 16.2% |
1 | d | 10 | 22 | 13.5% | 29.7% |
2 | a | 9 | 31 | 12.2% | 41.9% |
3 | m | 7 | 38 | 9.5% | 51.4% |
4 | b | 4 | 42 | 5.4% | 56.8% |
5 | f | 4 | 46 | 5.4% | 62.2% |
6 | j | 4 | 50 | 5.4% | 67.6% |
7 | l | 4 | 54 | 5.4% | 73.0% |
8 | c | 3 | 57 | 4.1% | 77.0% |
9 | g | 3 | 60 | 4.1% | 81.1% |
10 | Others: | 14 | 74 | 18.9% | 100.0% |
codes = pd.read_csv('data/status_codes.csv')
codes
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
status | |
---|---|
0 | 200 |
1 | 200 |
2 | 200 |
3 | 200 |
4 | 200 |
... | ... |
414398 | 200 |
414399 | 200 |
414400 | 200 |
414401 | 200 |
414402 | 200 |
414403 rows × 1 columns
adviz.status_codes(codes['status'])
<script type="text/javascript">
window.PlotlyConfig = {MathJaxConfig: 'local'};
if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}
if (typeof require !== 'undefined') {
require.undef("plotly");
define('plotly', function(require, exports, module) {
/**
- plotly.js v2.18.2
- Copyright 2012-2023, 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={98847:function(t,e,r){"use strict";var n=r(71828),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])}},98222:function(t,e,r){"use strict";t.exports=r(82887)},27206:function(t,e,r){"use strict";t.exports=r(60822)},59893:function(t,e,r){"use strict";t.exports=r(23381)},5224:function(t,e,r){"use strict";t.exports=r(83832)},59509:function(t,e,r){"use strict";t.exports=r(72201)},75557:function(t,e,r){"use strict";t.exports=r(91815)},40338:function(t,e,r){"use strict";t.exports=r(21462)},35080:function(t,e,r){"use strict";t.exports=r(51319)},61396:function(t,e,r){"use strict";t.exports=r(57516)},40549:function(t,e,r){"use strict";t.exports=r(98128)},49866:function(t,e,r){"use strict";t.exports=r(99442)},36089:function(t,e,r){"use strict";t.exports=r(93740)},19548:function(t,e,r){"use strict";t.exports=r(8729)},35831:function(t,e,r){"use strict";t.exports=r(93814)},61039:function(t,e,r){"use strict";t.exports=r(14382)},97040:function(t,e,r){"use strict";t.exports=r(51759)},77986:function(t,e,r){"use strict";t.exports=r(10421)},24296:function(t,e,r){"use strict";t.exports=r(43102)},58872:function(t,e,r){"use strict";t.exports=r(92165)},29626:function(t,e,r){"use strict";t.exports=r(3325)},65591:function(t,e,r){"use strict";t.exports=r(36071)},69738:function(t,e,r){"use strict";t.exports=r(43905)},92650:function(t,e,r){"use strict";t.exports=r(35902)},35630:function(t,e,r){"use strict";t.exports=r(69816)},73434:function(t,e,r){"use strict";t.exports=r(94507)},27909:function(t,e,r){"use strict";var n=r(19548);n.register([r(27206),r(5224),r(58872),r(65591),r(69738),r(92650),r(49866),r(25743),r(6197),r(97040),r(85461),r(73434),r(54201),r(81299),r(47645),r(35630),r(77986),r(83043),r(93005),r(96881),r(4534),r(50581),r(40549),r(77900),r(47582),r(35080),r(21641),r(17280),r(5861),r(29626),r(10021),r(65317),r(96268),r(61396),r(35831),r(16122),r(46163),r(40344),r(40338),r(48131),r(36089),r(55334),r(75557),r(19440),r(99488),r(59893),r(97393),r(98222),r(61039),r(24296),r(66398),r(59509)]),t.exports=n},46163:function(t,e,r){"use strict";t.exports=r(15154)},96881:function(t,e,r){"use strict";t.exports=r(64943)},50581:function(t,e,r){"use strict";t.exports=r(21164)},55334:function(t,e,r){"use strict";t.exports=r(54186)},65317:function(t,e,r){"use strict";t.exports=r(94873)},10021:function(t,e,r){"use strict";t.exports=r(67618)},54201:function(t,e,r){"use strict";t.exports=r(58810)},5861:function(t,e,r){"use strict";t.exports=r(20593)},16122:function(t,e,r){"use strict";t.exports=r(29396)},83043:function(t,e,r){"use strict";t.exports=r(13551)},48131:function(t,e,r){"use strict";t.exports=r(46858)},47582:function(t,e,r){"use strict";t.exports=r(17988)},21641:function(t,e,r){"use strict";t.exports=r(68868)},96268:function(t,e,r){"use strict";t.exports=r(20467)},19440:function(t,e,r){"use strict";t.exports=r(91271)},99488:function(t,e,r){"use strict";t.exports=r(21461)},97393:function(t,e,r){"use strict";t.exports=r(85956)},25743:function(t,e,r){"use strict";t.exports=r(52979)},66398:function(t,e,r){"use strict";t.exports=r(32275)},17280:function(t,e,r){"use strict";t.exports=r(6419)},77900:function(t,e,r){"use strict";t.exports=r(61510)},81299:function(t,e,r){"use strict";t.exports=r(87619)},93005:function(t,e,r){"use strict";t.exports=r(93601)},40344:function(t,e,r){"use strict";t.exports=r(96595)},47645:function(t,e,r){"use strict";t.exports=r(70954)},6197:function(t,e,r){"use strict";t.exports=r(47462)},4534:function(t,e,r){"use strict";t.exports=r(17659)},85461:function(t,e,r){"use strict";t.exports=r(19990)},82884: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}]},50215:function(t,e,r){"use strict";var n=r(82884),i=r(41940),a=r(85555),o=r(44467).templatedArray;r(24695),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"}}})},3749:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(92605).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=3t.arrowsizet.arrowwidth||0,d=p+h,v=p-h,g=3t.startarrowsizet.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)}},44317:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=r(44467).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)}}}},25625:function(t,e,r){"use strict";var n=r(71828),i=r(7901);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));n.coerceFont(a,"hoverlabel.font",{family:v.font.family,size:v.font.size,color:v.font.color||y})}a("captureevents",!!d)}},94128:function(t,e,r){"use strict";var n=r(92770),i=r(58163);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)}}},84046:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(85501),o=r(25625),s=r(50215);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})}},92605:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(74875),o=r(71828),s=o.strTranslate,l=r(89298),u=r(7901),c=r(91424),f=r(30211),h=r(63893),p=r(6964),d=r(28569),v=r(44467).arrayEditor,g=r(13011);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:{}},P=+e.textangle||0,O=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",e.opacity),I=O.append("g").classed("annotation-text-g",!0),D=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",Z(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();f.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){f.loneUnhover(w.hoverlayer.node())}));var F=e.borderwidth,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 H=e.font,q=w.meta?o.templateString(e.text,w.meta):e.text,G=R.append("text").classed("annotation-text",!0).text(q);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 Z(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,H).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),h.convertToTspans(r,t,W),r}function W(){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+2N),H=Math.round(z+2N);function q(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,W=["x","y"],X=0;X<W.length;X++){var J,K,$,Q,tt,et=W[X],rt=e[et+"ref"]||et,nt=e["a"+et+"ref"],it={x:y,y:x}[et],at=(P+("x"===et?0:-90))Math.PI/180,ot=BMath.cos(at),st=HMath.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),J=it.offset+it.r2p(e[et]),Q=.5}else{var dt="domain"===ht;"x"===et?($=e[et],J=dt?it.offset+it.length*$:J=T.l+T.w*$):($=1-e[et],J=dt?it.offset+it.length*$:J=T.t+T.h*$),Q=e.showarrow?.5:$}if(e.showarrow){ft.head=J;var vt=e["a"+et];if(tt=otq(.5,e.xanchor)-stq(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(vt=1-vt),ft.tail=it.offset+it.lengthvt):"paper"===gt?"y"===et?(vt=1-vt,ft.tail=T.t+T.hvt):ft.tail=T.l+T.wvt:ft.tail=it._offset+it.r2p(vt),K=tt}else ft.tail=J+vt,K=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 K=tt=ltq(Q,ut),ft.text=J+tt;ft.text+=ct,tt+=ct,K+=ct,e[""+et+"padplus"]=lt/2+K,e[""+et+"padminus"]=lt/2-K,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,H-F),R.call(c.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),I.attr({transform:"rotate("+P+","+C.x.text+","+C.y.text+")"});var kt,At=function(r,n){O.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(P,v,b),w=o.apply2DTransform(),A=o.apply2DTransform2(),L=+j.attr("width"),D=+j.attr("height"),z=v-.5L,F=z+L,B=b-.5D,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,H=e.arrowcolor,q=e.arrowside,G=O.append("g").style({opacity:u.opacity(H)}).classed("annotation-arrow-g",!0),Z=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(u.stroke,u.rgb(H));if(g(Z,q,e),k.annotationPosition&&Z.node().parentNode&&!a){var Y=l,W=f;if(e.standoff){var X=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));Y+=e.standoff*(h-l)/X,W+=e.standoff*(p-f)/X}var J,K,$=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(p-W),transform:s(Y,W)}).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);J=t.x,K=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(J,K),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("+P+","+i+","+a+")"})},doneFn:function(){i.call("guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&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",Z(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}},13011:function(t,e,r){"use strict";var n=r(39898),i=r(7901),a=r(82884),o=r(71828),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(ww+TT))return void D();if(b){if(bb>ww+TT)return void D();var k=bMath.cos(f),A=b*Math.sin(f);c.x+=k,c.y+=A,t.attr({x2:c.x,y2:c.y})}if(){if(*>ww+TT)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),P=p.getPointAtLength(.1);f=Math.atan2(C.y-P.y,C.x-P.x),o=p.getPointAtLength(Math.min(,E)),L="0px,"++"px,";var O=p.getPointAtLength(E),I=p.getPointAtLength(E-.1);h=Math.atan2(O.y-I.y,O.x-I.x),c=p.getPointAtLength(Math.max(0,E-b)),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(180o/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)}},32745:function(t,e,r){"use strict";var n=r(92605),i=r(44317);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(50215),supplyLayoutDefaults:r(84046),includeBasePlot:r(76325)("annotations"),calcAutorange:r(3749),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(94128)}},26997:function(t,e,r){"use strict";var n=r(50215),i=r(30962).overrideAll,a=r(44467).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")},5485:function(t,e,r){"use strict";var n=r(71828),i=r(89298);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()}},20226:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(85501),o=r(25625),s=r(26997);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})}},82188:function(t,e,r){"use strict";var n=r(92605).drawRaw,i=r(63538),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))}}},2468:function(t,e,r){"use strict";var n=r(73972),i=r(71828);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(26997)}}},layoutAttributes:r(26997),handleDefaults:r(20226),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(5485),draw:r(82188)}},7561:function(t,e,r){"use strict";t.exports=r(63489),r(94338),r(3961),r(38751),r(86825),r(37715),r(99384),r(43805),r(88874),r(83290),r(29108),r(55422),r(94320),r(31320),r(51367),r(21457)},72201:function(t,e,r){"use strict";var n=r(7561),i=r(71828),a=r(50606),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 forrange
andtick0
","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 globallayout.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 forvalue
, 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 fortarget
, if it is an","array of dates. Iftarget
is a string (eg x) we use the","corresponding trace attribute (egxcalendar
) if it exists,","even iftargetcalendar
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}}},22399: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},7901:function(t,e,r){"use strict";var n=r(84267),i=r(92770),a=r(73627).isTypedArray,o=t.exports={},s=r(22399);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(255n[0])+", "+Math.round(255n[1])+", "+Math.round(255n[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.ri.a,g:255(1-i.a)+i.gi.a,b:255(1-i.a)+i.bi.a},o={r:a.r(1-r.a)+r.rr.a,g:a.g(1-r.a)+r.gr.a,b:a.b(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},63583:function(t,e,r){"use strict";var n=r(13838),i=r(41940),a=r(1426).extendFlat,o=r(30962).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",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.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,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")},30939: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"}}},62499:function(t,e,r){"use strict";var n=r(71828),i=r(44467),a=r(26218),o=r(38701),s=r(96115),l=r(89426),u=r(63583);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),h("x",g?1.02:.5),h("xanchor",g?"left":"center"),h("xpad"),h("y",g?.5:1.02),h("yanchor",g?"middle":"bottom"),h("ypad"),n.noneOrAll(f,c,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var x=n.coerce(f,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values: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!==x.indexOf("inside")?"hide past domain":"hide past div"),a(f,c,h,"linear");var b=r.font,={outerTicks:!1,font:b};-1!==x.indexOf("inside")&&(.bgColor="black"),l(f,c,h,"linear",),s(f,c,h,"linear",),o(f,c,h,"linear",),h("title.text",r.dfltTitle.colorbar);var w=c.tickfont,T=n.extendFlat({},w,{color:b.color,size:n.bigFont(w.size)});n.coerceFont(h,"title.font",T),h("title.side",g?"top":"right")}},98981:function(t,e,r){"use strict";var n=r(39898),i=r(84267),a=r(74875),o=r(73972),s=r(89298),l=r(28569),u=r(71828),c=u.strTranslate,f=r(1426).extendFlat,h=r(6964),p=r(91424),d=r(7901),v=r(92998),g=r(63893),y=r(52075).flipScale,m=r(71453),x=r(52830),b=r(13838),=r(18783),w=.LINE_SPACING,T=.FROM_TL,k=.FROM_BR,A=r(30939).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],p=(n=h[0].trace)._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,P=e.xpad,O=e.ypad,I=e.x,D=o?e.y:1-e.y,z=r._fullLayout,R=z._size,F=e._fillcolor,B=e._line,N=e.title,j=N.side,U=e._zrange||n.extent(("function"==typeof F?F:B.color).domain()),V="function"==typeof B.color?B.color:function(){return B.color},H="function"==typeof F?F:function(){return F},q=e._levels,G=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,u=a.size,c=1.001r[0]-.001r[1],f=1.001r[1]-.001r[0];for(i=0;i<1e5&&(n=a.start+iu,!(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+iu,!(u>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&"string"==typeof e.fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,U),Z=G.fill,Y=G.line,W=Math.round(y*("fraction"===?o?R.w:R.h:1)),X=W/(o?R.w:R.h),J=Math.round(l*("fraction"===h?o?R.h:R.w:1)),K=J/(o?R.h:R.w),$=Math.round(o?IR.w+P:DR.h+O),Q={center:.5,right:1}[L]||0,tt={top:1,middle:.5}[C]||0,et=o?I-QX:D-ttX,rt=o?D-ttK:I-QK,nt=Math.round(o?R.h*(1-rt):R.wrt);e._lenFrac=K,e._thickFrac=X,e._uFrac=et,e._vFrac=rt;var it=e._axis=function(t,e,r){var n=t._fullLayout,i="v"===e.orientation,a={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+e._id},l={letter:o,font:n.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:n.calendar};function c(t,e){return u.coerce(a,s,b,t,e)}return m(a,s,c,l,n),x(a,s,c,l),s}(r,e,U);it.position=X+(o?I+P/R.w:D+O/R.h);var at=-1!==["top","bottom"].indexOf(j);if(o&&at&&(it.title.side=j,it.titlex=I+P/R.w,it.titley=rt+("top"===N.side?K-O/R.h:O/R.h)),o||at||(it.title.side=j,it.titley=D+O/R.h,it.titlex=rt+P/R.w),B.color&&"auto"===e.tickmode){it.tickmode="linear",it.tick0=q.start;var ot=q.size,st=u.constrain(J/50,4,15)+1,lt=(U[1]-U[0])/((e.nticks||st)ot);if(lt>1){var ut=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot=utu.roundUp(lt/ut,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+O/R.h,rt+K-O/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr("transform",c(Math.round(R.l),Math.round(R.t)));var ct,ft=t.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select("."+A.cbaxis),vt=0,gt=0;function yt(n,i){var a={propContainer:it,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:z._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&&at||!o&&!at)&&("top"===j&&(t=P+R.l+R.wI,e=O+R.t+R.h(1-rt-K)+3+.75pt),"bottom"===j&&(t=P+R.l+R.wI,e=O+R.t+R.h*(1-rt)-3-.25pt),"right"===j&&(e=O+R.t+R.hD+3+.75pt,t=P+R.l+R.wrt),yt(it._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select("."+A.cbtitle),f=l.select("text"),h=[-M/2,M/2],d=l.select(".h"+it._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)w),d?(a=p.bBox(d),gt=a.width,(vt=a.height)>v&&(h[1]-=(vt-v)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),gt=a.width,vt=a.height),o){if(vt){if(vt+=5,"top"===j)it.domain[1]-=vt/R.h,h[1]=-1;else{it.domain[0]+=vt/R.h;var y=g.lineCount(f);h[1]+=(1-y)v}l.attr("transform",c(h[0],h[1])),it.setScale()}}else gt&&("right"===j&&(it.domain[0]+=(gt+pt/2)/R.w),l.attr("transform",c(h[0],h[1])),it.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?c(0,Math.round(R.h(1-it.domain[1]))):c(Math.round(R.wit.domain[0]),0)),dt.attr("transform",o?c(0,Math.round(-R.t)):c(Math.round(-R.l),0));var m=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Z);m.enter().append("rect").classed(A.cbfill,!0).style("stroke","none"),m.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,a){var s=[0===a?U[0]:(Z[a]+Z[a-1])/2,a===Z.length-1?U[1]:(Z[a]+Z[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",$).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var c=H(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(B.color&&B.width?Y:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=$,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+W).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll("g."+it.id+"tick,path").remove();var =$+W+(M||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:"inside"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if("right"===j)i=s,t=R.l+R.wa+10+pt*(it.showticklabels?1:.5);else if(t=s,"bottom"===j&&(i=R.t+R.ha+10+(-1===ht.indexOf("inside")?it.tickfont.size:0)+("intside"!==it.ticks&&e.ticklen||0)),"top"===j){var l=N.text.split("
").length;i=R.t+R.ha+10-W-wptl}yt((o?"h":"v")+it._id+"title",{avoid:{selection:n.select(r).selectAll("g."+it._id+"tick"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?z.width:z.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=W+M/2;-1===ht.indexOf("inside")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ct=ft.select("text");var u=0,f=o&&"top"===j,v=!o&&"right"===j,g=0;if(ct.node()&&!ct.classed(A.jsPlaceholder)){var m,x=ft.select(".h"+it._id+"title-math-group").node();x&&(o&&at||!o&&!at)?(u=(n=p.bBox(x)).width,m=n.height):(u=(n=p.bBox(ft.node())).right-R.l-(o?$:nt),m=n.bottom-R.t-(o?nt:$),o||"top"!==j||(s+=n.height,g=n.height)),v&&(ct.attr("transform",c(u/2+pt/2,0)),u*=2),s=Math.max(s,o?u:m)}var b=2*(o?P:O)+s+S+M/2,w=0;!o&&N.text&&"bottom"===C&&D<=0&&(b+=w=b/2,g+=w),z.hColorbarMoveTitle=w,z.hColorbarMoveCBTitle=g;var F=S+M;t.select("."+A.cbbg).attr("x",(o?$:nt)-F/2-(o?P:0)).attr("y",(o?nt:$)-(o?J:O+g-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style("stroke-width",S);var B=v?Math.max(u-10,0):0;if(t.selectAll("."+A.cboutline).attr("x",(o?$:nt+P)+B).attr("y",(o?nt+O-J:$)+(f?vt:0)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(J-(o?2O+vt:2P+B),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M}),t.attr("transform",c(R.l-(o?Qb:0),R.t-(o?0:(1-tt)b-g))),!o&&(S||i(E).getAlpha()&&!i.equals(z.paper_bgcolor,E))){var U=dt.selectAll("text"),V=U[0].length,H=t.select("."+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-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=q.right+G.x+nt-S-2+I-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var Z={},Y=T[L],X=k[L],K=T[C],et=k[C],rt=b-W;o?("pixels"===h?(Z.y=D,Z.t=JK,Z.b=Jet):(Z.t=Z.b=0,Z.yt=D+lK,Z.yb=D-let),"pixels"===?(Z.x=I,Z.l=bY,Z.r=bX):(Z.l=rtY,Z.r=rtX,Z.xl=I-yY,Z.xr=I+yX)):("pixels"===h?(Z.x=I,Z.l=JY,Z.r=JX):(Z.l=Z.r=0,Z.xl=I+lY,Z.xr=I-lX),"pixels"===?(Z.y=1-D,Z.t=bK,Z.b=bet):(Z.t=rtK,Z.b=rtet,Z.yt=D-yK,Z.yb=D+yet)),a.autoMargin(r,e._id,Z)}],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()}}},76228:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t){return n.isPlainObject(t.colorbar)}},12311:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(63583),supplyDefaults:r(62499),draw:r(98981).draw,hasColorbar:r(76228)}},50693:function(t,e,r){"use strict";var n=r(63583),i=r(30587).counter,a=r(78607),o=r(63282).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}},78803:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(52075).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=pd<0?s.colorscale.diverging:p>=0?s.colorscale.sequential:s.colorscale.sequentialminus,f.sync("colorscale",o))}},33046:function(t,e,r){"use strict";var n=r(71828),i=r(52075).hasColorscale,a=r(52075).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"})}},1586:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(76228),o=r(62499),s=r(63282).isValid,l=r(73972).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)))}},52075:function(t,e,r){"use strict";var n=r(39898),i=r(84267),a=r(92770),o=r(71828),s=r(7901),l=r(63282).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"],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)}}},21081:function(t,e,r){"use strict";var n=r(63282),i=r(52075);t.exports={moduleType:"component",name:"colorscale",attributes:r(50693),layoutAttributes:r(72673),supplyLayoutDefaults:r(30959),handleDefaults:r(1586),crossTraceDefaults:r(33046),calc:r(78803),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}},72673:function(t,e,r){"use strict";var n=r(1426).extendFlat,i=r(50693),a=r(63282).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}))}},30959:function(t,e,r){"use strict";var n=r(71828),i=r(44467),a=r(72673),o=r(1586);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]}}}},63282:function(t,e,r){"use strict";var n=r(84267),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)}}},92807: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}},70461:function(t,e,r){"use strict";var n=r(71828),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(3t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3e),0,2),i[e][t]}},64505: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)}},28569:function(t,e,r){"use strict";var n=r(48956),i=r(57035),a=r(38520),o=r(71828).removeElement,s=r(85555),l=t.exports={};l.align=r(92807),l.getCursor=r(70461);var u=r(26041);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},26041:function(t,e,r){"use strict";var n=r(11086),i=r(79990),a=r(24401).getGraphDiv,o=r(26675),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}))}},79952:function(t,e){"use strict";e.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.u={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"}},91424:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.numberFormat,o=r(92770),s=r(84267),l=r(73972),u=r(7901),c=r(21081),f=i.strTranslate,h=r(63893),p=r(77922),d=r(18783).LINE_SPACING,v=r(37822).DESELECTDIM,g=r(34098),y=r(39984),m=r(23469).appendArrayPointValue,x=t.exports={};function b(t,e,r){var n=e.fillpattern,i=n&&x.getPatternAttr(n.shape,0,"");if(i){var a=x.getPatternAttr(n.bgcolor,0,null),o=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),c=x.getPatternAttr(n.solidity,0,.3),f=e.uid;x.pattern(t,"point",r,f,i,l,c,void 0,n.fillmode,a,o,s)}else e.fillcolor&&t.call(u.fill,e.fillcolor)}x.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e.hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(u).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t.context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3r+"px,"+3r+"px":"longdash"===t?t=5r+"px,"+5r+"px":"dashdot"===t?t=3r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5r+"px,"+2r+"px,"+r+"px,"+2r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());b(t,((r.data()[0]||[])[0]||{}).trace||{},e)},x.fillGroupStyle=function(t,e){t.style("stroke-width",0).each((function(t){var r=n.select(this);t[0].trace&&b(r,t[0].trace,e)}))};var =r(90998);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys().forEach((function(t){var e=[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(x.symbolNoFill[r]=!0)}));var w=x.symbolNames.length;function T(t,e,r,n){var i=t%100;return x.symbolFuncsi+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var k={x1:1,x2:0,y1:0,y2:0},A={x1:0,x2:0,y1:1,y2:0},M=a("~f"),S={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:k},horizontalreversed:{node:"linearGradient",attrs:k,reversed:!0},vertical:{node:"linearGradient",attrs:A},verticalreversed:{node:"linearGradient",attrs:A,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var c=o.length,f=S[a],h=new Array(c),p=0;p<c;p++)f.reversed?h[c-1-p]=[M(100*(1-o[p][0])),o[p][1]]:h[p]=[M(100o[p][0]),o[p][1]];var d=e._fullLayout,v="g"+d._uid+"-"+r,g=d.defs.select(".gradients").selectAll("#"+v).data([a+h.join(";")],i.identity);g.exit().remove(),g.enter().append(f.node).each((function(){var t=n.select(this);f.attrs&&t.attr(f.attrs),t.attr("id",v);var e=t.selectAll("stop").data(h);e.exit().remove(),e.enter().append("stop"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+"%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}))})),t.style(l,V(v,e)).style(l+"-opacity",null),t.classed("gradient_filled",!0)},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),P=vL.getAlpha();switch(o){case"/":y=lMath.sqrt(2),m=lMath.sqrt(2),w="path",E={d:x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/43+","+m/45+"l"+y/2+",-"+m/2,opacity:P,stroke:C,"stroke-width":(b=cl)+"px"};break;case"\":y=lMath.sqrt(2),m=lMath.sqrt(2),w="path",E={d:x="M"+y/43+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/43+"l"+y/2+","+m/2,opacity:P,stroke:C,"stroke-width":(b=cl)+"px"};break;case"x":y=lMath.sqrt(2),m=lMath.sqrt(2),x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/43+","+m/45+"l"+y/2+",-"+m/2+"M"+y/43+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/43+"l"+y/2+","+m/2,b=l-lMath.sqrt(1-c),w="path",E={d:x,opacity:P,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:P,stroke:C,"stroke-width":(b=cl)+"px"};break;case"-":w="path",w="path",E={d:x="M0,"+(m=l)/2+"L"+(y=l)+","+m/2,opacity:P,stroke:C,"stroke-width":(b=cl)+"px"};break;case"+":w="path",x="M"+(y=l)/2+",0L"+y/2+","+(m=l)+"M0,"+m/2+"L"+y+","+m/2,b=l-lMath.sqrt(1-c),w="path",E={d:x,opacity:P,stroke:C,"stroke-width":b+"px"};break;case".":y=l,m=l,c<Math.PI/4?=Math.sqrt(cll/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:P,fill:C}}var O=[o||"noSh",p||"noBg",d||"noFg",l,c].join(";"),I=M.defs.select(".patterns").selectAll("#"+S).data([O],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",V(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){if(t.size()){var i=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,i,r)}))}},x.singlePointStyle=function(t,e,r,n,a){var o=r.marker,s=o.line;if(e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?o.opacity:t.mo),n.ms2mrc){var l;l="various"===t.ms||"various"===o.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var c=x.symbolNumber(t.mx||o.symbol)||0;t.om=c%200>=100;var f=rt(t,r),h=G(t,r);e.attr("d",T(c,l,f,h))}var p,d,v,g=!1;if(t.so)v=s.outlierwidth,d=s.outliercolor,p=o.outliercolor;else{var y=(s||{}).width;v=(t.mlw+1||y+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,d="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(s.color)?u.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(p=u.defaultLine,g=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(u.stroke,p).style({"stroke-width":(v||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:v)+"px");var m=o.gradient,b=t.mgt;b?g=!0:b=m&&m.type,i.isArrayOrTypedArray(b)&&(b=b[0],S[b]||(b=0));var =o.pattern,w=&&x.getPatternAttr(.shape,t.i,"");if(b&&"none"!==b){var k=t.mgc;k?g=!0:k=m.color;var A=r.uid;g&&(A+="-"+t.i),x.gradient(e,a,A,b,[[0,k],[1,p]],"fill")}else if(w){var M=x.getPatternAttr(.bgcolor,t.i,null),E=x.getPatternAttr(.fgcolor,t.i,null),L=.fgopacity,C=x.getPatternAttr(.size,t.i,8),P=x.getPatternAttr(.solidity,t.i,.3),O=t.mcc||i.isArrayOrTypedArray(.shape)||i.isArrayOrTypedArray(.bgcolor)||i.isArrayOrTypedArray(.size)||i.isArrayOrTypedArray(.solidity),I=r.uid;O&&(I+="-"+t.i),x.pattern(e,"point",a,I,w,C,P,t.mcc,.fillmode,M,E,L)}else u.fill(e,p);v&&u.stroke(e,d)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=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",T(x.symbolNumber(a),o,rt(n,e),G(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)ar}))}},x.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r.colorAx)&&i.isArrayOrTypedArray(n))return c.makeColorScaleFuncFromTrace(r)}return i.identity};var E,L,C={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=C[l]u,v=.75r+C[s]u+(C[s]-1)cr/2;t.attr("text-anchor",l),a||o.attr("transform",f(p,v))}function O(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function I(t,e,r){return r&&(t=N(t)),e?z(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return E=e,e}function z(t){var e=n.round(t,2);return L=e,e}function R(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(ii+aa,.25),u=Math.pow(oo+ss,.25),c=(uui-llo)n,f=(uua-lls)n,h=3u(l+u),p=3l(l+u);return[[D(e[0]+(h&&c/h)),z(e[1]+(h&&f/h))],[D(e[0]-(p&&c/p)),z(e[1]-(p&&f/p))]]}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r.fullLayout;t.each((function(t){var o=n.select(this),u=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(u||0===u){if(s){var c=e.module.formatLabels,f=c?c(t,e,l):{},p={};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=O(t,e),y=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,g,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=O(t,e);u.fill(i,a);var c=l.traceIs(e,"bar-like");P(i,o,s,t.mrc2||t.mrc,c)}))}},x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(R(t[r-1],t[r],t[r+1],e));for(n+="Q"+i[0][0]+" "+t[1],r=2;r<t.length-1;r++)n+="C"+i[r-2][1]+" "+i[r-1][0]+" "+t[r];return n+"Q"+i[t.length-3][1]+" "+t[t.length-1]},x.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r,n="M"+t[0],i=t.length-1,a=[R(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(R(t[r-1],t[r],t[r+1],e));for(a.push(R(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+="C"+a[r-1][1]+" "+a[r][0]+" "+t[r];return n+"C"+a[i][1]+" "+a[0][0]+" "+t[0]+"Z"};var F={hv:function(t,e,r){return"H"+D(e[0])+"V"+I(e,1,r)},vh:function(t,e,r){return"V"+z(e[1])+"H"+I(e,0,r)},hvh:function(t,e,r){return"H"+D((t[0]+e[0])/2)+"V"+z(e[1])+"H"+I(e,0,r)},vhv:function(t,e,r){return"V"+z((t[1]+e[1])/2)+"H"+D(e[0])+"V"+I(e,1,r)}},B=function(t,e,r){return"L"+I(e,0,r)+","+I(e,1,r)};function N(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,u=e?e[0]:E||0,c=e?e[1]:L||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-gMath.cos(v),T=h-gMath.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=F[t]||B;return function(t){for(var r="M"+D(t[0][0])+","+z(t[0][1]),n=t.length,i=1;i<n;i++)r+=e(t[i-1],t[i],i===n-1);return r}},x.applyBackoff=N,x.makeTester=function(){var t=i.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(t){t.attr(p.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),e=i.ensureSingle(t,"path","js-reference-point",(function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));x.tester=t,x.testref=e},x.savedBBoxes={};var j=0;function U(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}function V(t,e){if(!t)return null;var r=e.context,n=r.exportedPlot?"":r.baseUrl||"";return n?"url('"+n+"#"+t+"')":"url(#"+t+")"}x.bBox=function(t,e,r){var a,o,s;if(r||(r=U(t)),r){if(a=x.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=U(l)){var u=+l.getAttribute("x")||0,c=+l.getAttribute("y")||0,f=l.getAttribute("transform");if(!f){var p=x.bBox(l,!1,r);return u&&(p.left+=u,p.right+=u),c&&(p.top+=c,p.bottom+=c),p}if(r+=""+u+""+c+""+f,a=x.savedBBoxes[r])return i.extendFlat({},a)}}e?o=t:(s=x.tester.node(),o=t.cloneNode(!0),s.appendChild(o)),n.select(o).attr("transform",null).call(h.positionText,0,0);var d=o.getBoundingClientRect(),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 j>=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=g),j++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",V(e,r))},x.getTranslate=function(t){var e=(tt.attr?"attr":"getAttribute"||"").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=tn||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate(.?);?)/,"").trim(),a=(a+=f(e,r)).trim(),ti,a},x.getScale=function(t){var e=(tt.attr?"attr":"getAttribute"||"").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=tn||"";return e=e||1,r=r||1,a=a.replace(/(\bscale(.?);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),ti,a};var H=/\ssc./;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var q=/translate([^)])\s$/;function G(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e.xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(q);t=1===e&&1===r?[]:[f(o,s),"scale("+e+","+r+")",f(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},x.getMarkerStandoff=G;var Z,Y,W,X,J,K,$=Math.atan2,Q=Math.cos,tt=Math.sin;function et(t,e){var r=e[0],n=e[1];return[rQ(t)-ntt(t),rtt(t)+nQ(t)]}function rt(t,e){var r,n,i=t.ma;void 0===i&&(i=e.marker.angle||0);var a=e.marker.angleref;if("previous"===a||"north"===a){if(e.geo){var s=e.geo.project(t.lonlat);r=s[0],n=s[1]}else{var l=e.xA,u=e.yA;if(!l||!u)return 90;r=l.c2p(t.x),n=u.c2p(t.y)}if(e.geo){var c,f=t.lonlat[0],h=t.lonlat[1],p=e.geo.project([f,h+1e-5]),d=e.geo.project([f+1e-5,h]),v=$(d[1]-n,d[0]-r),g=$(p[1]-n,p[0]-r);if("north"===a)c=i/180Math.PI;else if("previous"===a){var y=f/180Math.PI,m=h/180Math.PI,x=Z/180Math.PI,b=Y/180*Math.PI,=x-y,w=Q(b)*tt(),T=tt(b)*Q(m)-Q(b)*tt(m)*Q();c=-$(w,T)-Math.PI,Z=f,Y=h}var k=et(v,[Q(c),0]),A=et(g,[tt(c),0]);i=$(k[1]+A[1],k[0]+A[0])/Math.PI180,"previous"!==a||K===e.uid&&t.i===J+1||(i=null)}if("previous"===a&&!e._geo)if(K===e.uid&&t.i===J+1&&o(r)&&o(n)){var M=r-W,S=n-X,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(S=0),"v"===L&&(M=0),i+=$(S,M)/Math.PI180+90}else i=null}return W=r,X=n,J=t.i,K=e.uid,i}x.getMarkerAngle=rt},90998:function(t,e,r){"use strict";var n,i,a,o,s=r(95616),l=r(39898).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[an-oi,ai+on]}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.3t,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(.4t,2),i=l(1.2t,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(.8t/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(2t/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(2t/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(2t/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(2t/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(.6t,2),i=l(1.2t,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(.6t,2),i=l(1.2t,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(.6t,2),i=l(1.2t,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(.6t,2),i=l(1.2t,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(.951t,2),i=l(.588t,2),a=l(-t,2),o=l(-.309t,2);return g(e,r,"M"+n+","+o+"L"+i+","+l(.809t,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(tf/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(tf/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(.924t,2),i=l(.383t,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.4t,i=l(.225n,2),a=l(.951n,2),o=l(.363n,2),s=l(.588n,2),c=l(-n,2),f=l(-.309n,2),h=l(.118n,2),p=l(.809n,2);return g(e,r,"M"+i+","+f+"H"+a+"L"+o+","+h+"L"+s+","+p+"L0,"+l(.382n,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(.66t,2),i=l(.38t,2),a=l(.76t,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(tf.8,2),i=l(.8t,2),a=l(1.6t,2),o=l(4t,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(tf*.8,2),i=l(.8t,2),a=l(1.6t,2),o=l(4t,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.1t,2),i=l(2t,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.4t,2),i=l(1.9t,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(.7t,2),i=l(1.4t,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.4t,2),i=l(.7t,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.3t,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.3t,2),i=l(.65t,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.4t,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.2t,2),i=l(.85t,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.2t,2),i=l(1.6t,2),a=l(.8t,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.2t,2),i=l(1.6t,2),a=l(.8t,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.2t,2),i=l(1.6t,2),a=l(.8t,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.2t,2),i=l(1.6t,2),a=l(.8t,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.4t,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.4t,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(2t,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(2t,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(t,e,r){if(v(e))return u;var n=l(2t,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(2t,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(2t,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(2t,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(2t,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(2t,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=2tp(n),a=2td(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=2tp(n),a=2td(n);return g(e,r,"M0,0L"+-i+","+a+"A "+2t+","+2t+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}}},25673: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"}}}},84532:function(t,e,r){"use strict";var n=r(92770),i=r(73972),a=r(89298),o=r(71828),s=r(45827);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")}}}},45827:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(te/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)]}}},97587:function(t,e,r){"use strict";var n=r(92770),i=r(73972),a=r(71828),o=r(44467),s=r(25673);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))}}},37369:function(t,e,r){"use strict";var n=r(71828),i=r(30962).overrideAll,a=r(25673),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(97587),calc:r(84532),makeComputeError:r(45827),plot:r(19398),style:r(62662),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))}}},19398:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(91424),o=r(34098);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"+2h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2h),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"+2y+"m0,-"+y+"H"+r.xs,r.noXS||(a+="m0,-"+y+"v"+2y),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()}}))}}))}},62662:function(t,e,r){"use strict";var n=r(39898),i=r(7901);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)}))}},77914:function(t,e,r){"use strict";var n=r(41940),i=r(528).hoverlabel,a=r(1426).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"}}},30732:function(t,e,r){"use strict";var n=r(71828),i=r(73972);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.namelength,l,"hnl"),c(u.hoverlabel.align,l,"hta"))}}}},75914:function(t,e,r){"use strict";var n=r(73972),i=r(88335).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())}},26675:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},54268:function(t,e,r){"use strict";var n=r(71828),i=r(77914),a=r(38048);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)}},23469:function(t,e,r){"use strict";var n=r(71828);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 te<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(nn+ii)}},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]}},88335:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(84267),o=r(71828),s=o.strTranslate,l=o.strRotate,u=r(11086),c=r(63893),f=r(39918),h=r(91424),p=r(7901),d=r(28569),v=r(89298),g=r(73972),y=r(23469),m=r(26675),x=r(99017),b=r(43969),=m.YANGLE,w=Math.PI/180,T=1/Math.sin(w),k=Math.cos(w),A=Math.sin(w),M=m.HOVERARROWSIZE,S=m.HOVERTEXTPAD,E={box:!0,ohlc:!0,violin:!0,candlestick:!0},L={scatter:!0,scattergl:!0,splom:!0};function C(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 s=e.target;o.throttle(t._fullLayout._uid+m.HOVERID,m.HOVERMINTIME,(function(){!function(t,e,r,a,s){r||(r="xy");var l=Array.isArray(r)?r:[r],c=t._fullLayout,h=c.plots||[],v=h[r],m=c.has("cartesian");if(v){var x=v.overlays.map((function(t){return t.id}));l=l.concat(x)}for(var b=l.length,=new Array(b),w=new Array(b),k=!1,A=0;A<b;A++){var M=l[A];if(h[M])k=!0,[A]=h[M].xaxis,w[A]=h[M].yaxis;else{if(!c[M]||!c[M]._subplot)return void o.warn("Unrecognized subplot: "+M);var S=c[M].subplot;[A]=S.xaxis,w[A]=S.yaxis}}var P=e.hovermode||c.hovermode;if(P&&!k&&(P="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(P)||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return d.unhoverRaw(t,e);var I=c.hoverdistance;-1===I&&(I=1/0);var B=c.spikedistance;-1===B&&(B=1/0);var V,H,q,G,Z,Y,W,X,J,K,$,Q,tt,et=[],rt=[],nt={hLinePoint:null,vLinePoint:null},it=!1;if(Array.isArray(e))for(P="array",q=0;q<e.length;q++)(Z=t.calcdata[e[q].curveNumber||0])&&(Y=Z[0].trace,"skip"!==Z[0].trace.hoverinfo&&(rt.push(Z),"h"===Y.orientation&&(it=!0)));else{for(G=0;G<t.calcdata.length;G++)Z=t.calcdata[G],"skip"!==(Y=Z[0].trace).hoverinfo&&y.isTraceInSubplots(Y,l)&&(rt.push(Z),"h"===Y.orientation&&(it=!0));var at,ot;if(s){if(!1===u.triggerHandler(t,"plotly_beforehover",e))return;var st=s.getBoundingClientRect();at=e.clientX-st.left,ot=e.clientY-st.top,c._calcInverseTransform(t);var lt=o.apply3DTransform(c.invTransform)(at,ot);if(at=lt[0],ot=lt[1],at<0||at>[0]._length||ot<0||ot>w[0].length)return d.unhoverRaw(t,e)}else at="xpx"in e?e.xpx:[0]._length/2,ot="ypx"in e?e.ypx:w[0].length/2;if(e.pointerX=at+[0]._offset,e.pointerY=ot+w[0].offset,V="xval"in e?y.flat(l,e.xval):y.p2c(,at),H="yval"in e?y.flat(l,e.yval):y.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn("Fx.hover failed",e,t),d.unhoverRaw(t,e)}var ut=1/0;function ct(t,r){for(G=0;G<rt.length;G++)if((Z=rt[G])&&Z[0]&&Z[0].trace&&!0===(Y=Z[0].trace).visible&&0!==Y._length&&-1===["carpet","contourcarpet"].indexOf(Y.module.name)){if("splom"===Y.type?W=l[X=0]:(W=y.getSubplot(Y),X=l.indexOf(W)),J=P,y.isUnifiedHover(J)&&(J=J.charAt(0)),Q={cd:Z,trace:Y,xa:[X],ya:w[X],maxHoverDistance:I,maxSpikeDistance:B,index:!1,distance:Math.min(ut,I),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:Y.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},c[W]&&(Q.subplot=c[W]._subplot),c._splomScenes&&c._splomScenes[Y.uid]&&(Q.scene=c._splomScenes[Y.uid]),tt=et.length,"array"===J){var n=e[G];"pointNumber"in n?(Q.index=n.pointNumber,J="closest"):(J="","xval"in n&&(K=n.xval,J="x"),"yval"in n&&($=n.yval,J=J?"closest":"y"))}else void 0!==t&&void 0!==r?(K=t,$=r):(K=V[X],$=H[X]);if(0!==I)if(Y._module&&Y._module.hoverPoints){var a=Y._module.hoverPoints(Q,K,$,J,{finiteRange:!0,hoverLayer:c._hoverlayer});if(a)for(var s,u=0;u<a.length;u++)s=a[u],i(s.x0)&&i(s.y0)&&et.push(z(s,P))}else o.log("Unrecognized trace type in hover:",Y);if("closest"===P&&et.length>tt&&(et.splice(0,tt),ut=et[0].distance),m&&0!==B&&0===et.length){Q.distance=B,Q.index=!1;var f=Y._module.hoverPoints(Q,K,$,"closest",{hoverLayer:c._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var v=d[0];i(v.x0)&&i(v.y0)&&(h=ht(v),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var g=f.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o<t.length;o++)n=t[o].spikeDistance,r&&0===o&&(n=-1/0),n<=a&&n<=e&&(i=t[o],a=n);return i}function ht(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}ct();var pt={fullLayout:c,container:c._hoverlayer,event:e},dt=t._spikepoints,vt={vLinePoint:nt.vLinePoint,hLinePoint:nt.hLinePoint};t._spikepoints=vt;var gt=function(){et.sort((function(t,e){return t.distance-e.distance})),et=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];g.traceIs(s.trace,"bar-like")||g.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(et,P)};gt();var yt=P.charAt(0),mt=("x"===yt||"y"===yt)&&et[0]&&L[et[0].trace.type];if(m&&0!==B&&0!==et.length){var xt=ft(et.filter((function(t){return t.ya.showspikes})),B,mt);nt.hLinePoint=ht(xt);var bt=ft(et.filter((function(t){return t.xa.showspikes})),B,mt);nt.vLinePoint=ht(bt)}if(0===et.length){var _t=d.unhoverRaw(t,e);return!m||null===nt.hLinePoint&&null===nt.vLinePoint||F(dt)&&R(t,nt,pt),_t}if(m&&F(dt)&&R(t,nt,pt),y.isXYhover(J)&&0!==et[0].length&&"splom"!==et[0].trace.type){var wt=et[0],Tt=(et=E[wt.trace.type]?et.filter((function(t){return t.trace.index===wt.trace.index})):[wt]).length;ct(N("x",wt,c),N("y",wt,c));var kt,At=[],Mt={},St=0,Et=function(t){var e=E[t.trace.type]?C(t):t.trace.index;if(Mt[e]){var r=Mt[e]-1,n=At[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(At[r]=t)}else St++,Mt[e]=St,At.push(t)};for(kt=0;kt<Tt;kt++)Et(et[kt]);for(kt=et.length-1;kt>Tt-1;kt--)Et(et[kt]);et=At,gt()}var Lt=t._hoverdata,Ct=[],Pt=j(t),Ot=U(t);for(q=0;q<et.length;q++){var It=et[q],Dt=y.makeEventData(It,It.trace,It.cd);if(!1!==It.hovertemplate){var zt=!1;It.cd[It.index]&&It.cd[It.index].ht&&(zt=It.cd[It.index].ht),It.hovertemplate=zt||It.trace.hovertemplate||!1}if(It.xa&&It.ya){var Rt=It.x0+It.xa._offset,Ft=It.x1+It.xa._offset,Bt=It.y0+It.ya._offset,Nt=It.y1+It.ya._offset,jt=Math.min(Rt,Ft),Ut=Math.max(Rt,Ft),Vt=Math.min(Bt,Nt),Ht=Math.max(Bt,Nt);Dt.bbox={x0:jt+Ot,x1:Ut+Ot,y0:Vt+Pt,y1:Ht+Pt}}It.eventData=[Dt],Ct.push(Dt)}t._hoverdata=Ct;var qt="y"===P&&(rt.length>1||et.length>1)||"closest"===P&&it&&et.length>1,Gt=p.combine(c.plot_bgcolor||p.background,c.paper_bgcolor),Zt=O(et,{gd:t,hovermode:P,rotateLabels:qt,bgColor:Gt,container:c.hoverlayer,outerContainer:c.paper.node(),commonLabelOpts:c.hoverlabel,hoverdistance:c.hoverdistance});if(y.isUnifiedHover(P)||(function(t,e,r){var n,i,a,o,s,l,u,c=0,f=1,h=t.size(),p=new Array(h),d=0;function v(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;o<t.length;o++)(l=t[o]).pos+l.dp+l.size>e.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o<t.length&&!(u<=0);o++)if((l=t[o]).pos<e.pmin+1)for(l.del=!0,u--,a=2l.size,s=t.length-1;s>=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(t.each((function(t){var n=t[e],i="x"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!n&&c<=h;){for(c++,n=!0,o=0;o<p.length-1;){var g=p[o],y=p[o+1],m=g[g.length-1],x=y[0];if((i=m.pos+m.dp+m.size-x.pos-x.dp+x.size)>.01&&m.pmin===x.pmin&&m.pmax===x.pmax){for(s=y.length-1;s>=0;s--)y[s].dp+=i;for(g.push.apply(g,y),p.splice(o+1,1),u=0,s=g.length-1;s>=0;s--)u+=g[s].dp;for(a=u/g.length,s=g.length-1;s>=0;s--)g[s].dp-=a;n=!1}else o++}p.forEach(v)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var =b[s],w=.datum;w.offset=.dp,w.del=.del}}}(Zt,qt?"xa":"ya",c),D(Zt,qt,c._invScaleX,c._invScaleY)),s&&s.tagName){var Yt=g.getComponentMethod("annotations","hasClickToShow")(t,Ct);f(n.select(s),Yt?"pointer":"")}s&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Lt)&&(Lt&&t.emit("plotly_unhover",{event:e,points:Lt}),t.emit("plotly_hover",{event:e,points:t.hoverdata,xaxes:,yaxes:w,xvals:V,yvals:H}))}(t,e,r,a,s)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=O(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,u=t.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),v=t.trace;if(g.traceIs(v,"gl3d")){var y=i._fullLayout[v.scene]._scene.container,m=y.offsetLeft,x=y.offsetTop;c+=m,f+=m,h+=x,d+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(u=t.offset)})).each((function(t){t.offset-=u})),D(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var P=/([\s\S])</extra>/;function O(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,u=e.rotateLabels,f=e.bgColor,d=e.container,v=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||m.HOVERFONT,k=e.fontSize||m.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),O=P+"Label",D=A[O];if(void 0===D&&"multicategory"===E.type)for(var z=0;z<t.length&&void 0===(D=t[z][O]);z++);var R=V(r,v),F=R.top,B=R.width,N=R.height,j=void 0!==D&&A.distance<=e.hoverdistance&&("x"===a||"y"===a);if(j){var U,H,q=!0;for(U=0;U<t.length;U++)if(q&&void 0===t[U].zLabel&&(q=!1),H=t[U].hoverinfo||t[U].trace.hoverinfo){var G=Array.isArray(H)?H:H.split("+");if(-1===G.indexOf("all")&&-1===G.indexOf(a)){j=!1;break}}q&&(j=!1)}var Z=d.selectAll("g.axistext").data(j?[0]:[]);if(Z.enter().append("g").classed("axistext",!0),Z.exit().remove(),Z.each((function(){var t=n.select(this),e=o.ensureSingle(t,"path","",(function(t){t.style({"stroke-width":"1px"})})),l=o.ensureSingle(t,"text","",(function(t){t.attr("data-notex",1)})),u=w.bgcolor||p.defaultLine,f=w.bordercolor||p.contrast(u),d=p.contrast(u),v={family:w.font.family||T,size:w.font.size||k,color:w.font.color||d};e.style({fill:u,stroke:f}),l.text(D).call(h.font,v).call(c.positionText,0,0).call(c.convertToTspans,r),t.attr("transform","");var g,y,m=V(r,l.node());if("x"===a){var x="top"===E.side?"-":"";l.attr("text-anchor","middle").call(c.positionText,0,"top"===E.side?F-m.bottom-M-S:F-m.top+M+S),g=E._offset+(A.x0+A.x1)/2,y=L._offset+("top"===E.side?0:L._length);var b=m.width/2+S;g<b?(g=b,e.attr("d","M-"+(b-M)+",0L-"+(b-2M)+","+x+M+"H"+(S+m.width/2)+"v"+x+(2S+m.height)+"H-"+b+"V"+x+M+"Z")):g>i.width-b?(g=i.width-b,e.attr("d","M"+(b-M)+",0L"+b+","+x+M+"v"+x+(2S+m.height)+"H-"+b+"V"+x+M+"H"+(b-2M)+"Z")):e.attr("d","M0,0L"+M+","+x+M+"H"+(S+m.width/2)+"v"+x+(2S+m.height)+"H-"+(S+m.width/2)+"V"+x+M+"H-"+M+"Z")}else{var ,C,P;"right"===L.side?(="start",C=1,P="",g=E._offset+E.length):(="end",C=-1,P="-",g=E.offset),y=L.offset+(A.y0+A.y1)/2,l.attr("text-anchor",),e.attr("d","M0,0L"+P+M+","+M+"V"+(S+m.height/2)+"h"+P+(2S+m.width)+"V-"+(S+m.height/2)+"H"+P+M+"V-"+M+"Z");var O,I=m.height/2,z=F-m.top-I,R="clip"+i._uid+"commonlabel"+L._id;if(g<m.width+2S+M){O="M-"+(M+S)+"-"+I+"h-"+(m.width-S)+"V"+I+"h"+(m.width-S)+"Z";var B=m.width-g+S;c.positionText(l,B,z),"end"===&&l.selectAll("tspan").each((function(){var t=n.select(this),e=h.tester.append("text").text(t.text()).call(h.font,v),i=V(r,e.node());Math.round(i.width)<Math.round(m.width)&&t.attr("x",B-i.width),e.remove()}))}else c.positionText(l,C*(S+M),z),O=null;var N=i._topclips.selectAll("#"+R).data(O?[0]:[]);N.enter().append("clipPath").attr("id",R).append("path"),N.exit().remove(),N.select("path").attr("d",O),h.setClipUrl(l,O?R:null,r)}t.attr("transform",s(g,y))})),y.isUnifiedHover(a)){d.selectAll("g.hovertext").remove();var Y=t.filter((function(t){return"none"!==t.hoverinfo}));if(0===Y.length)return;var W=i.hoverlabel,X=W.font,J={showlegend:!0,legend:{title:{text:D,font:X},font:X,bgcolor:W.bgcolor,bordercolor:W.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},K={font:X};x(J,K,r._fullData);var $=K.legend;$.entries=[];for(var Q=0;Q<Y.length;Q++){var tt=Y[Q];if("none"!==tt.hoverinfo){var et=I(tt,!0,a,i,D),rt=et[0],nt=et[1];tt.name=nt,tt.text=""!==nt?nt+" : "+rt:rt;var it=tt.cd[tt.index];it&&(it.mc&&(tt.mc=it.mc),it.mcc&&(tt.mc=it.mcc),it.mlc&&(tt.mlc=it.mlc),it.mlcc&&(tt.mlc=it.mlcc),it.mlw&&(tt.mlw=it.mlw),it.mrc&&(tt.mrc=it.mrc),it.dir&&(tt.dir=it.dir)),tt._distinct=!0,$.entries.push([tt])}}$.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),$.layer=d,$._inHover=!0,$._groupTitleFont=W.grouptitlefont,b(r,$);var at,ot,st,lt,ut=d.select("g.legend"),ct=V(r,ut.node()),ft=ct.width+2S,ht=ct.height+2S,pt=Y[0],dt=(pt.x0+pt.x1)/2,vt=(pt.y0+pt.y1)/2,gt=!(g.traceIs(pt.trace,"bar-like")||g.traceIs(pt.trace,"box-violin"));"y"===P?gt?(ot=vt-S,at=vt+S):(ot=Math.min.apply(null,Y.map((function(t){return Math.min(t.y0,t.y1)}))),at=Math.max.apply(null,Y.map((function(t){return Math.max(t.y0,t.y1)})))):ot=at=o.mean(Y.map((function(t){return(t.y0+t.y1)/2})))-ht/2,"x"===P?gt?(st=dt+S,lt=dt-S):(st=Math.max.apply(null,Y.map((function(t){return Math.max(t.x0,t.x1)}))),lt=Math.min.apply(null,Y.map((function(t){return Math.min(t.x0,t.x1)})))):st=lt=o.mean(Y.map((function(t){return(t.x0+t.x1)/2})))-ft/2;var yt,mt,xt=E._offset,bt=L._offset;return lt+=xt-ft,ot+=bt-ht,yt=(st+=xt)+ft<B&&st>=0?st:lt+ft<B&<>=0?lt:xt+ft<B?xt:st-dt<dt-lt+ft?B-ft:0,yt+=S,mt=(at+=bt)+ht<N&&at>=0?at:ot+ht<N&&ot>=0?ot:bt+ht<N?bt:at-vt<vt-ot+ht?N-ht:0,mt+=S,ut.attr("transform",s(yt-1,mt-1)),ut}var _t=d.selectAll("g.hovertext").data(t,(function(t){return C(t)}));return _t.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(p.fill,p.addOpacity(f,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(h.font,T,k)})),_t.exit().remove(),_t.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var d=t.bgcolor||o,v=p.combine(p.opacity(d)?d:p.defaultLine,f),g=p.combine(p.opacity(o)?o:p.defaultLine,f),y=t.borderColor||p.contrast(v),m=I(t,j,a,i,D,e),x=m[0],b=m[1],w=e.select("text.nums").call(h.font,t.fontFamily||T,t.fontSize||k,t.fontColor||y).text(x).attr("data-notex",1).call(c.positionText,0,0).call(c.convertToTspans,r),A=e.select("text.name"),E=0,L=0;if(b&&b!==x){A.call(h.font,t.fontFamily||T,t.fontSize||k,g).text(b).attr("data-notex",1).call(c.positionText,0,0).call(c.convertToTspans,r);var C=V(r,A.node());E=C.width+2S,L=C.height+2S}else A.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:y});var P=t.xa._offset+(t.x0+t.x1)/2,O=t.ya._offset+(t.y0+t.y1)/2,z=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),U=V(r,w.node()),H=U.width/i._invScaleX,q=U.height/i._invScaleY;t.ty0=(F-U.top)/i._invScaleY,t.bx=H+2S,t.by=Math.max(q+2S,L),t.anchor="start",t.txwidth=H,t.tx2width=E,t.offset=0;var G,Z,Y=(H+M+S+E)i.invScaleX;if(u)t.pos=P,G=O+R/2+Y<=N,Z=O-R/2-Y>=0,"top"!==t.idealAlign&&G||!Z?G?(O+=R/2,t.anchor="start"):t.anchor="middle":(O-=R/2,t.anchor="end");else if(t.pos=O,G=P+z/2+Y<=B,Z=P-z/2-Y>=0,"left"!==t.idealAlign&&G||!Z)if(G)P+=z/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=P+W-B,J=P-W;X>0&&(P-=X),J<0&&(P+=-J)}else P-=z/2,t.anchor="end";w.attr("text-anchor",t.anchor),E&&A.attr("text-anchor",t.anchor),e.attr("transform",s(P,O)+(u?l():""))})),_t}function I(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+""+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(65487),f.keyedContainer=r(66636),f.relativeAttr=r(6962),f.isPlainObject=r(41965),f.toLogRange=r(58163),f.relinkPrivateKeys=r(51332);var p=r(73627);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(64872);f.mod=d.mod,f.modHalf=d.modHalf;var v=r(96554);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(41631);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(65888);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(78607);var m=r(80038);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(35657);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(26348);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(99863);f.isLeftAnchor=.isLeftAnchor,f.isCenterAnchor=.isCenterAnchor,f.isRightAnchor=.isRightAnchor,f.isTopAnchor=.isTopAnchor,f.isMiddleAnchor=.isMiddleAnchor,f.isBottomAnchor=.isBottomAnchor;var w=r(87642);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(1426);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(47769);f.log=k.log,f.warn=k.warn,f.error=k.error;var A=r(30587);f.counterRegex=A.counter;var M=r(79990);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(24401);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(86367),f.preserveDrawingBuffer=r(45142),f.makeTraceGroups=r(77310),f.=r(15867),f.notifier=r(75046),f.filterUnique=r(75744),f.filterVisible=r(76756),f.pushUnique=r(75138),f.increment=r(39240),f.cleanNumber=r(95218),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(64213),f.identity=r(23389),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=2o,l=2e-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))/(2e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=sMath.round(i/s):i>=s&&(i-=sMath.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},f.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(f.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},f.mergeArrayCastPositive=function(t,e,r){return f.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},f.castOption=function(t,e,r,n){n=n||f.identity;var i=f.nestedProperty(t,r).get();return f.isArrayOrTypedArray(i)?Array.isArray(e)&&f.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},f.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=f.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},f.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=E(o));for(var s=0;s<a.length;s++){var l=a[s];if(f.isIndex(l)||f.isArrayOrTypedArray(l)&&f.isIndex(l[0])&&f.isIndex(l[1])){var u=n?n[l]:l,c=r?r[u]:u;void 0!==(i=c)&&i<t.length&&(t[c].selected=1)}}},f.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t.indexToPoints;if(r){for(var n=E(r),i=[],a=0;a<e.length;a++){var o=e[a];if(f.isIndex(o)){var s=n[o];f.isIndex(s)&&i.push(s)}}return i}return e},f.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=f.nestedProperty(t,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},f.minExtend=function(t,e){var r={};"object"!=typeof e&&(e={});var n,i,a,o=Object.keys(t);for(n=0;n<o.length;n++)a=t[i=o[n]],""!==i.charAt(0)&&"function"!=typeof a&&("module"===i?r[i]=a:Array.isArray(a)?r[i]="colorscale"===i?a.slice():a.slice(0,3):f.isTypedArray(a)?r[i]=a.subarray(0,3):r[i]=a&&"object"==typeof a?f.minExtend(t[i],e[i]):a);for(o=Object.keys(e),n=0;n<o.length;n++)"object"==typeof(a=e[i=o[n]])&&i in r&&"object"==typeof r[i]||(r[i]=a);return r},f.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},f.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var 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 P=/Firefox/(\d+).\d+/;f.getFirefoxVersion=function(){var t=P.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},f.isD3Selection=function(t){return t instanceof n.selection},f.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},f.ensureSingleById=function(t,e,r,n){var i=t.select(e+"#"+r);if(i.size())return i;var a=t.append(e).attr("id",r);return n&&a.call(n),a},f.objectFromPath=function(t,e){for(var r,n=t.split("."),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.)[([0-9]+)]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var O=/^([^[.]+).(.+)?/,I=/^([^.]+)[([0-9]+)](.)?(.+)?/;f.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if("object"==typeof t&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(O))?(i=t[r],n=e[1],delete t[r],t[n]=f.extendDeepNoArrays(t[n]||{},f.objectFromPath(r,f.expandObjectPaths(i))[n])):(e=r.match(I))?(i=t[r],n=e[1],a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],"."===e[3]?(s=e[4],o=t[n][a]=t[n][a]||{},f.extendDeepNoArrays(o,f.objectFromPath(s,f.expandObjectPaths(i)))):t[n][a]=f.expandObjectPaths(i)):t[r]=f.expandObjectPaths(t[r]));return t},f.numSeparate=function(t,e,r){if(r||(r=!1),"string"!=typeof e||0===e.length)throw new Error("Separator string required for formatting!");"number"==typeof t&&(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:])([:||][^}])?}/g;var D=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=rn),f.isValidTextValue(i)?i:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return B.apply(z,arguments)};var R={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:||]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var u,c,h,p="xother"===s||"yother"===s,d="xother"===s||"yother"===s,v="xother"===s||"yother"===s,g="xother"===s||"yother"===s||p||v||d,y=s;if((p||d)&&(y=y.substring(1)),(v||d)&&(y=y.substring(0,y.length-1)),g){if(void 0===(u=e[y]))return""}else for(h=3;h<a.length;h++)if(c=a[h]){if(c.hasOwnProperty(y)){u=c[y];break}if(D.test(y)||(u=f.nestedProperty(c,y).get(),(u=o[y]||f.nestedProperty(c,y).get())&&(o[y]=u)),void 0!==u)break}if(void 0===u&&n)return n.count<n.max&&(f.warn("Variable '"+y+"' in "+n.name+" could not be found!"),u=t),n.count===n.max&&f.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,t;if(l){var m;if(":"===l[0]&&(u=(m=r?r.numberFormat:f.numberFormat)(l.replace(F,""))(u)),"|"===l[0]){m=r?r.timeFormat:i;var x=f.dateTime2ms(u);u=f.formatDate(x,l.replace(F,""),!1,m)}}else{var b=y+"Label";e.hasOwnProperty(b)&&(u=e[b])}return g&&(u="("+u+")",(p||d)&&(u=" "+u),(v||d)&&(u+=" ")),u}))}f.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10n+o-48),u&&(i=10i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/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(100tMath.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.2t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},41965: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")}},66636:function(t,e,r){"use strict";var n=r(65487),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}},15867:function(t,e,r){"use strict";var n=r(73972);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}},47769:function(t,e,r){"use strict";var n=r(72075).dfltConfig,i=r(75046),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("
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"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?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[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(P,(function(e,r){return s=B(r,t.nameLength),""}))}return[l,s]}function D(t,e,r,i){var a=function(t){return tr},o=function(t){return ti};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),s=t.anchor,l="end"===s?-1:1,u={start:1,end:-1,middle:0}[s],f=u(M+S),p=f+u*(t.txwidth+S),d=0,v=t.offset,g="middle"===s;g&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(v*=-A,d=t.offsetk),r.select("path").attr("d",g?"M-"+a(t.bx/2+t.tx2width/2)+","+o(v-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(lM+d)+","+o(M+v)+"v"+o(t.by/2-M)+"h"+a(lt.bx)+"v-"+o(t.by)+"H"+a(lM+d)+"V"+o(v-M)+"Z");var y=d+f,m=v+t.ty0-t.by/2+S,x=t.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==s?(i.attr("text-anchor","start"),y=g?-t.bx/2-t.tx2width/2+S:-t.bx-S):"right"===x&&"end"!==s&&(i.attr("text-anchor","end"),y=g?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(c.positionText,a(y),o(m)),t.tx2width&&(r.select("text.name").call(c.positionText,a(p+uS+d),o(v+t.ty0-t.by/2+S)),r.select("rect").call(h.setRect,a(p+(u-1)t.tx2width/2+d),o(v-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function z(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:v.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:v.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=v.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+v.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=v.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+v.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 R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var g,y,m=e.hLinePoint;n=m&&m.xa,"cursor"===(i=m&&m.ya).spikesnap?(g=u.pointerX,y=u.pointerY):(g=n.offset+m.x,y=i.offset+m.y);var x,b,=a.readability(m.color,d)<1.5?p.contrast(d):m.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||,A=v.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=g),-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+Ml.w,b=l.l+Sl.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":h.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:d}).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 P,O,I=a.readability(C.color,d)<1.5?p.contrast(d):C.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=v.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(P=F,O=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)),P=l.t+(1-N)l.h,O=l.t+(1-B)l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":z,stroke:R,"stroke-dasharray":h.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":z+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?z:-z),r:z,fill:R}).classed("spikeline",!0)}}}function F(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function B(t,e){return c.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function N(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 j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(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)}}},38048:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(23469).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"),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)}},98212:function(t,e,r){"use strict";var n=r(71828),i=r(528);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("hovermode")}},30211:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(28569),o=r(23469),s=r(528),l=r(88335);t.exports={moduleType:"component",name:"fx",constants:r(26675),schema:{layout:s},attributes:r(77914),layoutAttributes:s,supplyLayoutGlobalDefaults:r(22774),supplyDefaults:r(54268),supplyLayoutDefaults:r(34938),calc:r(30732),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(75914)}},528:function(t,e,r){"use strict";var n=r(26675),i=r(41940),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"},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"}}},34938:function(t,e,r){"use strict";var n=r(71828),i=r(528),a=r(98212),o=r(38048);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)}},22774:function(t,e,r){"use strict";var n=r(71828),i=r(38048),a=r(528);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},83312:function(t,e,r){"use strict";var n=r(71828),i=r(30587).counter,a=r(27670).Y,o=r(85555).idRegex,s=r(44467),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+ch;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(ym>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,P=S.charAt(0),O=r[P+"side"];if(O.length<8)A[S]="free";else if("x"===P){if("t"===O.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"===O.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}}}}}},69819:function(t,e,r){"use strict";var n=r(85555),i=r(44467).templatedArray;r(24695),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"})},75378:function(t,e,r){"use strict";var n=r(92770),i=r(58163);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=2Math.log(y+Math.sqrt(1+yy))/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)}}},81603:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(85501),o=r(69819);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})}},80750:function(t,e,r){"use strict";var n=r(39898),i=r(91424),a=r(89298),o=r(41675),s=r(77922);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._lengthe.sizex:Math.abs(u.l2p(e.sizex)-u.l2p(0)):e.sizexp.w,o=void 0!==c?"string"==typeof e.yref&&h?c._lengthe.sizey:Math.abs(c.l2p(e.sizey)-c.l2p(0)):e.sizeyp.h;var g,y,m=rd[e.xanchor].offset,x=ov[e.yanchor].offset,b=d[e.xanchor].sizing+v[e.yanchor].sizing;switch(g=void 0!==u?"string"==typeof e.xref&&f?u._lengthe.x+u._offset:u.r2p(e.x)+u._offset:e.xp.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.yp.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)}))}}}},68804:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(69819),supplyLayoutDefaults:r(81603),includeBasePlot:r(76325)("images"),draw:r(80750),convertCoords:r(75378)}},33030:function(t,e,r){"use strict";var n=r(41940),i=r(22399);t.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},14928: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}},99017:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(44467),o=r(9012),s=r(33030),l=r(10820),u=r(10130);t.exports=function(t,e,r){var c,f=t.legend||{},h=a.newContainer(e,"legend");function p(t,e){return i.coerce(f,h,s,t,e)}for(var d=function(t,e){var r=c._input,n=c;return i.coerce(r,n,o,t,e)},v=e.font||{},g=i.coerceFont(p,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1v.size)})),y=0,m=!1,x="normal",b=0;b<r.length;b++)(c=r[b]).visible&&((c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&!1===c.module.attributes.showlegend.dflt))&&(y++,c.showlegend&&(m=!0,(n.traceIs(c,"pie-like")||!0===c.input.showlegend)&&y++),i.coerceFont(d,"legendgrouptitle.font",g)),(n.traceIs(c,"bar")&&"stack"===e.barmode||-1!==["tonextx","tonexty"].indexOf(c.fill))&&(x=u.isGrouped({traceorder:x})?"grouped+reversed":"reversed"),void 0!==c.legendgroup&&""!==c.legendgroup&&(x=u.isReversed({traceorder:x})?"reversed+grouped":"grouped"));var =i.coerce(t,e,l,"showlegend",m&&y>1);if(!1===&&(e.legend=void 0),(!1!==||f.uirevision)&&(p("uirevision",e.uirevision),!1!==)){p("bgcolor",e.paper_bgcolor),p("bordercolor"),p("borderwidth");var w,T,k,A=i.coerceFont(p,"font",e.font),M="h"===p("orientation");if(M?(w=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(T=1.1,k="bottom"):(T=-.1,k="top")):(w=1.02,T=1,k="auto"),p("traceorder",x),u.isGrouped(e.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",w),p("xanchor"),p("y",T),p("yanchor",k),p("valign"),i.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",M?"left":"top");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,"title.font",S)}}}},43969:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(74875),o=r(73972),s=r(11086),l=r(28569),u=r(91424),c=r(7901),f=r(63893),h=r(85167),p=r(14928),d=r(18783),v=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,m=r(82424),x=r(53630),b=r(10130);function _(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidtho:r+(o||i)}function w(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l)&&(1===n?e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay):2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&h(r,t,n)))}function T(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,c=o.traceIs(l,"pie-like"),h=!r._inHover&&e._context.edits.legendText&&!c,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=c?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var v=i.ensureSingle(t,"text","legendtext");v.attr("text-anchor","start").call(u.font,a).text(h?k(n,d):n);var g=r.itemwidth+2p.itemGap;f.positionText(v,g,0),h?v.call(f.makeEditable,{gd:e,text:n}).call(M,t,e,r).on("edit",(function(n){this.text(k(n,d)).call(M,t,e,r);var a=s.trace._fullInput||{},u={};if(o.hasTransform(a,"groupby")){var c=o.getTransformIndices(a,"groupby"),f=c[c.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(s.trace._group,n),u=h.constructUpdate()}else u.name=n;return o.call("_guiRestyle",e,u,l.index)})):M(v,t,e,r)}function k(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function A(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTime<a?o+=1:(o=1,e._legendMouseDownTime=r)})),s.on("mouseup",(function(){if(!e._dragged&&!e._editing){var r=e._fullLayout.legend;(new Date).getTime()-e._legendMouseDownTime>a&&(o=Math.max(o-1,1)),w(e,r,t,o,n.event)}})))}function M(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node();r||(r=e._fullLayout.legend);var s,l,c=r.borderwidth,h=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).sizev;if(o){var d=u.bBox(o);s=d.height,l=d.width,1===n?u.setTranslate(a,c,c+.75s):u.setTranslate(a,0,.25s)}else{var g=t.select(1===n?".legendtitletext":".legendtext"),y=f.lineCount(g),m=g.node();if(s=hy,l=m?u.bBox(m).width:0,1===n)"left"===r.title.side&&(l+=2p.itemGap),f.positionText(g,c+p.titlePad,c+h);else{var x=2p.itemGap+r.itemwidth;i.groupTitle&&(x=p.itemGap,l-=r.itemwidth),f.positionText(g,x,-h*((y-1)/2-.3))}}1===n?(r._titleWidth=l,r._titleHeight=s):(i.lineHeight=h,i.height=Math.max(s,16)+3,i.width=l)}else t.remove()}(e,r,n,i)}))}function S(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function E(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}t.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h="legend"+f._uid,d=e._inHover;if(d?(r=e.layer,h+="-hover"):r=f._infolayer,r){if(t._legendMouseDownTime||(t._legendMouseDownTime=0),d){if(!e.entries)return;s=m(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&m(t.calcdata,e)}var v=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(".legend").remove(),f._topdefs.select("#"+h).remove(),a.autoMargin(t,"legend");var k=i.ensureSingle(r,"g","legend",(function(t){d||t.attr("pointer-events","all")})),L=i.ensureSingleById(f._topdefs,"clipPath",h,(function(t){t.append("rect")})),C=i.ensureSingle(k,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));C.call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var P=i.ensureSingle(k,"g","scrollbox"),O=e.title;if(e._titleWidth=0,e._titleHeight=0,O.text){var I=i.ensureSingle(P,"text","legendtitletext");I.attr("text-anchor","start").call(u.font,O.font).text(O.text),M(I,P,t,e,1)}else P.selectAll(".legendtitletext").remove();var D=i.ensureSingle(k,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),z=P.selectAll("g.groups").data(s);z.enter().append("g").attr("class","groups"),z.exit().remove();var R=z.selectAll("g.traces").data(i.identity);R.enter().append("g").attr("class","traces"),R.exit().remove(),R.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==v.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(A,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),c="fraction"===i.entrywidthmode,f=i.borderwidth,h=2f,d=p.itemGap,v=i.itemwidth+2d,g=2*(f+d),y=E(i),m=i.y<0||0===i.y&&"top"===y,x=i.y>1||1===i.y&&"bottom"===y,w=i.tracegroupgap,T={};i._maxHeight=Math.max(m||x?a.height/2:o.h,30);var k=0;i._width=0,i._height=0;var A=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;u.setTranslate(this,f+A[0],f+A[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),k=v+i._width,i._width+=d+v+h,i._height+=g,l&&(e.each((function(t,e){u.setTranslate(this,0,ei.tracegroupgap)})),i.height+=(i.lgroupsLength-1)i.tracegroupgap);else{var M=S(i),L=i.x<0||0===i.x&&"right"===M,C=i.x>1||1===i.x&&"left"===M,P=x||m,O=a.width/2;i._maxWidth=Math.max(L?P&&"left"===M?o.l+o.w:O:C?P&&"right"===M?o.r+o.w:O:o.w,2v);var I=0,D=0;r.each((function(t){var e=(t,i,v);I=Math.max(I,e),D+=e})),k=null;var z=0;if(l){var R=0,F=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=(r,i,v),a=r[0].height;u.setTranslate(this,A[0],A[1]+f+d+a/2+e),e+=a,t=Math.max(t,n),T[r[0].trace.legendgroup]=t}));var r=t+d;F>0&&r+f+F>i._maxWidth?(z=Math.max(z,F),F=0,B+=R+w,R=e):R=Math.max(R,e),u.setTranslate(this,F,B),F+=r})),i._width=Math.max(z,F)+f,i._height=B+R+g}else{var N=r.size(),j=D+h+(N-1)d<i.maxWidth,U=0,V=0,H=0,q=0;r.each((function(t){var e=t[0].height,r=(t,i,v),n=j?r:I;c||(n+=d),n+f+V-d>=i._maxWidth&&(z=Math.max(z,q),V=0,H+=U,i._height+=U,U=0),u.setTranslate(this,A[0]+f+V,A[1]+f+H+e/2+d),q=V+r+d,V+=n,U=Math.max(U,e)})),j?(i._width=V+h,i._height=U+g):(i._width=Math.max(z,q)+h,i._height+=U+g)}}i._width=Math.ceil(Math.max(i._width+A[0],i._titleWidth+2(f+p.titlePad))),i._height=Math.ceil(Math.max(i._height+A[1],i._titleHeight+2(f+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var G=t.context.edits,Z=G.legendText||G.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=t[0].trace.legendgroup,o=(t,i,v);l&&""!==a&&(o=T[a]);var f=Z?v:k||o;s||c||(f+=d/2),u.setRect(e,0,-r/2,f,r)}))}(t,z,R,e)},function(){var s,c,v,m,x=f._size,b=e.borderwidth;if(!d){var _=function(t){var e=t.fullLayout.legend,r=S(e),n=E(e);return a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e.widthg[r],r:e._widthy[r],b:e.effHeighty[n],t:e._effHeightg[n]})}(t);if()return;var T=x.l+x.we.x-g[S(e)]e._width,A=x.t+x.h(1-e.y)-g[E(e)]e._effHeight;if(f.margin.autoexpand){var M=T,O=A;T=i.constrain(T,0,f.width-e._width),A=i.constrain(A,0,f.height-e._effHeight),T!==M&&i.log("Constrain legend.x to make legend fit inside graph"),A!==O&&i.log("Constrain legend.y to make legend fit inside graph")}u.setTranslate(k,T,A)}if(D.on(".drag",null),k.on("wheel",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),C.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),u.setTranslate(P,0,0),L.select("rect").attr({width:e._width-2b,height:I-2b,x:b,y:b}),u.setClipUrl(P,h,t),u.setRect(D,0,0,0,0),delete e.scrollY}else{var z,R,F,B=Math.max(p.scrollBarMinHeight,e.effHeighte._effHeight/e._height),N=e._effHeight-B-2p.scrollBarMargin,j=e.height-e.effHeight,U=N/j,V=Math.min(e.scrollY||0,j);C.attr({width:e.width-2b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),L.select("rect").attr({width:e._width-2b+p.scrollBarWidth+p.scrollBarMargin,height:e.effHeight-2b,x:b,y:b+V}),u.setClipUrl(P,h,t),G(V,B,U),k.on("wheel",(function(){G(V=i.constrain(e._scrollY+n.event.deltaY/Nj,0,j),B,U),0!==V&&V!==j&&n.event.preventDefault()}));var H=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;z="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=V})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,G(V=function(t,e,r){var n=(r-e)/U+t;return i.constrain(n,0,j)}(F,z,R),B,U))}));D.call(H);var q=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(z=t.changedTouches[0].clientY,F=V)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,G(V=function(t,e,r){var n=(e-r)/U+t;return i.constrain(n,0,j)}(F,z,R),B,U))}));P.call(q)}function G(r,n,i){e.scrollY=t.fullLayout.legend.scrollY=r,u.setTranslate(P,0,-r),u.setRect(D,e.width,p.scrollBarMargin+ri,p.scrollBarWidth,n),L.select("rect").attr("y",b+r)}t._context.edits.legendPosition&&(k.classed("cursor-move",!0),l.init({element:k.node(),gd:t,prepFn:function(){var t=u.getTranslate(k);v=t.x,m=t.y},moveFn:function(t,r){var n=v+t,i=m+r;u.setTranslate(k,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),c=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==c&&o.call("_guiRelayout",t,{"legend.x":s,"legend.y":c})},clickFn:function(e,n){var i=r.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));i.size()>0&&w(t,k,i,e,n)}}))}],t)}}(t,e)}},82424:function(t,e,r){"use strict";var n=r(73972),i=r(10130);t.exports=function(t,e){var r,a,o=e.inHover,s=i.isGrouped(e),l=i.isReversed(e),u={},c=[],f=!1,h={},p=0,d=0;function v(t,r){if(""!==t&&i.isGrouped(e))-1===c.indexOf(t)?(c.push(t),f=!0,u[t]=[r]):u[t].push(r);else{var n="~~i"+p;c.push(n),u[n]=[r],p++}}for(r=0;r<t.length;r++){var g=t[r],y=g[0],m=y.trace,x=m.legendgroup;if(o||m.visible&&m.showlegend)if(n.traceIs(m,"pie-like"))for(h[x]||(h[x]={}),a=0;a<g.length;a++){var b=g[a].label;h[x][b]||(v(x,{label:b,color:g[a].color,i:g[a].i,trace:m,pts:g[a].pts}),h[x][b]=!0,d=Math.max(d,(b||"").length))}else v(x,y),d=Math.max(d,(m.name||"").length)}if(!c.length)return[];var =!f||!s,w=[];for(r=0;r<c.length;r++){var T=u[c[r]];?w.push(T[0]):w.push(T)}for(&&(w=[w]),r=0;r<w.length;r++){var k=1/0;for(a=0;a<w[r].length;a++){var A=w[r][a].trace.legendrank;k>A&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;r<w.length;r++){w[r].forEach((function(t,e){t._preSort=e})),w[r].sort(M);var S=w[r][0].trace,E=null;for(a=0;a<w[r].length;a++){var L=w[r][a].trace.legendgrouptitle;if(L&&L.text){E=L,o&&(L.font=e._groupTitleFont);break}}if(l&&w[r].reverse(),E){var C=!1;for(a=0;a<w[r].length;a++)if(n.traceIs(w[r][a].trace,"pie-like")){C=!0;break}w[r].unshift({i:-1,groupTitle:E,noClick:C,trace:{showlegend:S.showlegend,legendgroup:S.legendgroup,visible:"toggleitem"===e.groupclick||S.visible}})}for(a=0;a<w[r].length;a++)w[r][a]=[w[r][a]]}return e._lgroupsLength=w.length,e._maxNameLength=d,w}},85167:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=!0;t.exports=function(t,e,r){var o=e.fullLayout;if(!e.dragged&&!e.editing){var s,l=o.legend.itemclick,u=o.legend.itemdoubleclick,c=o.legend.groupclick;if(1===r&&"toggle"===l&&"toggleothers"===u&&a&&e.data&&e.context.showTips?(n.notifier(n.(e,"Double-click on legend to isolate one trace"),"long"),a=!1):a=!1,1===r?s=l:2===r&&(s=u),s){var f="togglegroup"===c,h=o.hiddenlabels?o.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var d,v,g,y,m,x=e.fullData,b=p.trace,=b.legendgroup,w={},T=[],k=[],A=[];if(i.traceIs(b,"pie-like")){var M=p.label,S=h.indexOf(M);"toggle"===s?-1===S?h.push(M):h.splice(S,1):"toggleothers"===s&&(h=[],e.calcdata[0].forEach((function(t){M!==t.label&&h.push(t.label)})),e.fullLayout.hiddenlabels&&e.fullLayout.hiddenlabels.length===h.length&&-1===S&&(h=[])),i.call("guiRelayout",e,"hiddenlabels",h)}else{var E,L=&&.length,C=[];if(L)for(d=0;d<x.length;d++)(E=x[d]).visible&&E.legendgroup===&&C.push(d);if("toggle"===s){var P;switch(b.visible){case!0:P="legendonly";break;case!1:P=!1;break;case"legendonly":P=!0}if(L)if(f)for(d=0;d<x.length;d++)!1!==x[d].visible&&x[d].legendgroup===&&j(x[d],P);else j(b,P);else j(b,P)}else if("toggleothers"===s){var O,I,D,z,R=!0;for(d=0;d<x.length;d++)if(O=x[d]===b,D=!0!==x[d].showlegend,!(O||D||(I=L&&x[d].legendgroup===)||!0!==x[d].visible||i.traceIs(x[d],"notLegendIsolatable"))){R=!1;break}for(d=0;d<x.length;d++)if(!1!==x[d].visible&&!i.traceIs(x[d],"notLegendIsolatable"))switch(b.visible){case"legendonly":j(x[d],!0);break;case!0:z=!!R||"legendonly",O=x[d]===b,D=!0!==x[d].showlegend&&!x[d].legendgroup,I=O||L&&x[d].legendgroup===,j(x[d],!(!I&&!D)||z)}}for(d=0;d<k.length;d++)if(g=k[d]){var F=g.constructUpdate(),B=Object.keys(F);for(v=0;v<B.length;v++)y=B[v],(w[y]=w[y]||[])[A[d]]=F[y]}for(m=Object.keys(w),d=0;d<m.length;d++)for(y=m[d],v=0;v<T.length;v++)w[y].hasOwnProperty(v)||(w[y][v]=void 0);i.call("_guiRestyle",e,w,T)}}}}function N(t,e,r){var n=T.indexOf(t),i=w[e];return i||(i=w[e]=[]),-1===T.indexOf(t)&&(T.push(t),n=T.length-1),i[n]=r,n}function j(t,e){if(!p.groupTitle||f){var r=t._fullInput;if(i.hasTransform(r,"groupby")){var a=k[r.index];if(!a){var o=i.getTransformIndices(r,"groupby"),s=o[o.length-1];a=n.keyedContainer(r,"transforms["+s+"].styles","target","value.visible"),k[r.index]=a}var l=a.get(t._group);void 0===l&&(l=!0),!1!==l&&a.set(t._group,e),A[r.index]=N(r.index,"visible",!1!==r.visible)}else{var u=!1!==r.visible&&e;N(r.index,"visible",u)}}}}},10130: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")}},2199:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(33030),supplyLayoutDefaults:r(99017),draw:r(43969),style:r(53630)}},53630:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(71828),o=a.strTranslate,s=r(91424),l=r(7901),u=r(52075).extractOpts,c=r(34098),f=r(63463),h=r(53581).castOption,p=r(14928);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+2p.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=o?c.visible&&c.type===o:i.traceIs(c,"bar"),d=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[t]:[]);d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r.inHover&&"mc"in a){var d=u(f),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,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",),u.exit().remove(),u.size()){var c=(s.marker||{}).line,p=w(h(c.width,o.pts),c,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=c.color;var v=a.minExtend(o,{trace:d});f(u,v,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,u=t[0].height;if("middle"!==s&&l&&u){var c={top:1,bottom:-1}[s](.5(l-u+3));i.attr("transform",o(0,c))}else i.attr("transform",null);i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(t,o){var c,f=n.select(this),h=u(i),p=h.colorscale,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);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)),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)}))}))}},42068:function(t,e,r){"use strict";r(93348),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"}}},26023:function(t,e,r){"use strict";var n=r(73972),i=r(74875),a=r(41675),o=r(24255),s=r(34031).eraseActiveShape,l=r(71828),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){if(void 0===r._rangeInitial)c[p+".autorange"]=!0;else{var y=r._rangeInitial.slice();c[p+".range[0]"]=y[0],c[p+".range[1]"]=y[1]}void 0!==r._showSpikeInitial&&(c[p+".showspikes"]=r._showSpikeInitial,"on"!==h||r._showSpikeInitial||(h="off"))}else{var m=[r.r2l(r.range[0]),r.r2l(r.range[1])],x=[vm[0]+gm[1],vm[1]+gm[0]];c[p+".range[0]"]=r.l2r(x[0]),c[p+".range[1]"]=r.l2r(x[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=u._isHoriz?"y":"x",o.setAttribute("data-val",l)),c[s]=l;u._cartesianSpikesEnabled=h,n.call("_guiRelayout",t,c)}function h(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split("."),u=0;u<o.length;u++)s[o[u]+"."+l[1]]=a;var c="pan"===a?a:"zoom";s.dragmode=c,n.call("_guiRelayout",t,s)}function p(t,e){for(var r=e.currentTarget.getAttribute("data-attr"),i="resetLastSave"===r,a="resetDefault"===r,o=t._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c,f=s[u],h=f+".camera",p=f+".aspectratio",d=f+".aspectmode",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?2f:.5f;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.05u: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}},93348:function(t,e,r){"use strict";var n=r(26023),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}},35750:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(44467),o=r(42068);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")}},64168:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(42068),supplyLayoutDefaults:r(35750),manage:r(14192)}},14192:function(t,e,r){"use strict";var n=r(41675),i=r(34098),a=r(73972),o=r(23469).isUnifiedHover,s=r(37676),l=r(26023),u=r(93348).DRAW_MODES,c=r(71828).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 P=[],O=[],I=[],D=[];(v||b||m||x||)+y+g+w+T+k>1?(O=["toggleHover"],I=["resetViews"]):y?(P=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],I=["resetGeo"]):g?(O=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],I=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:m?O=["hoverClosestPie"]:A?(O=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):O=["toggleHover"],v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],"noHover"))return!1;return!0}(r)||S)&&(O=[]),!v&&!b||M||(P=["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!==O.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("toggleHover"),R("hoverClosestCartesian"),R("hoverCompareCartesian"),R("hoverClosestGeo"),R("hoverClosest3d"),R("hoverClosestGl2d"),R("hoverClosestPie"))):F.push(N)}p=F}return L(D),L(P.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)}},37676:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(71828),o=r(24255),s=r(11506).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}},37113:function(t,e,r){"use strict";var n=r(41940),i=r(22399),a=(0,r(44467).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"}},89573:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},28674:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(44467),o=r(85501),s=r(37113),l=r(89573);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")}}},21598:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(74875),o=r(7901),s=r(91424),l=r(71828),u=l.strTranslate,c=r(63893),f=r(41675),h=r(18783),p=h.LINE_SPACING,d=h.FROM_TL,v=h.FROM_BR,g=r(89573),y=r(70565);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.sizep,i=Math.max(ec.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.sizep,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.wr.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:hv[w],t:hd[w]}),o.attr("transform",u(x,b))}(t,h,f,o.name,r)}))}},70565:function(t,e,r){"use strict";var n=r(81041),i=r(71828).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}},97218:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(37113)}}},layoutAttributes:r(37113),handleDefaults:r(28674),draw:r(21598)}},75148:function(t,e,r){"use strict";var n=r(22399);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"}},88443:function(t,e,r){"use strict";var n=r(41675).list,i=r(71739).getAutoRange,a=r(73251);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))}}},73251: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}},26377:function(t,e,r){"use strict";var n=r(71828),i=r(44467),a=r(41675),o=r(75148),s=r(47850);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)}}},72413:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(74875),o=r(71828),s=o.strTranslate,l=r(91424),u=r(7901),c=r(92998),f=r(93612),h=r(41675),p=r(28569),d=r(6964),v=r(73251);function g(t,e,r,n){var i=o.ensureSingle(t,"rect",v.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function y(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function m(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 x(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 b(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 _(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 w,T=o.simpleMap(l.range,r.r2l),k=o.simpleMap(r.range,r.r2l);w=k[0]<k[1]?[Math.min(T[0],k[0]),Math.max(T[1],k[1])]:[Math.max(T[0],k[0]),Math.min(T[1],k[1])],l.range=l._input.range=o.simpleMap(w,r.l2r)}r.cleanRange("rangeslider.range");var A=e._size,M=r.domain;l._width=A.w*(M[1]-M[0]);var S=Math.round(A.l+A.wM[0]),E=Math.round(A.t+A.h(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+l._offsetShift+v.extraPad);a.attr("transform",s(S,E)),l._rl=o.simpleMap(l.range,r.r2l);var L=l._rl[0],C=l._rl[1],P=C-L;if(l.p2d=function(t){return t/l._widthP+L},l.d2p=function(t){return(t-L)/Pl._width},r.rangebreaks){var O=r.locateBreaks(L,C);if(O.length){var I,D,z=0;for(I=0;I<O.length;I++)z+=(D=O[I]).max-D.min;var R=l._width/(C-L-z),F=[-RL];for(I=0;I<O.length;I++)D=O[I],F.push(F[F.length-1]-R(D.max-D.min));for(l.d2p=function(t){for(var e=F[0],r=0;r<O.length;r++){var n=O[r];if(t>=n.max)e=F[r+1];else if(t<n.min)break}return e+Rt},I=0;I<O.length;I++)(D=O[I]).pmin=l.d2p(D.min),D.pmax=l.d2p(D.max);l.p2d=function(t){for(var e=F[0],r=0;r<O.length;r++){var n=O[r];if(t>=n.pmax)e=F[r+1];else if(t<n.pmin)break}return(t-e)/R}}}if("match"!==f.rangemode){var B=u.r2l(f.range[0]),N=u.r2l(f.range[1])-B;l.d2pOppAxis=function(t){return(t-B)/Nl.height}}a.call(g,t,r,l).call(y,t,r,l).call(m,t,r,l).call(x,t,r,l,f).call(b,t,r,l).call(,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=c.clientX||c.touches[0].clientX,v=h-t.node().getBoundingClientRect().left,g=a.d2p(r._rl[0]),y=a.d2p(r._rl[1]),m=p.coverSlip();function x(t){var c,p,x,b=+(t.clientX||t.touches[0].clientX)-h;switch(f){case s:x="ew-resize",c=g+b,p=y+b;break;case l:x="col-resize",c=g+b,p=y;break;case u:x="col-resize",c=g,p=y+b;break;default:x="ew-resize",c=v,p=v+b}if(p<c){var =p;p=c,c=}a._pixelMin=c,a._pixelMax=p,d(n.select(m),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",e,r._name+".range",[s,l])}))}(0,e,r,a)}function b(){m.removeEventListener("mousemove",x),m.removeEventListener("mouseup",b),this.removeEventListener("touchmove",x),this.removeEventListener("touchend",b),o.removeElement(m)}this.addEventListener("touchmove",x),this.addEventListener("touchend",b),m.addEventListener("mousemove",x),m.addEventListener("mouseup",b)}}(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:E+l._height+l._offsetShift+10+1.5r.title.font.size,"text-anchor":"middle"}})})))}},549:function(t,e,r){"use strict";var n=r(41675),i=r(63893),a=r(73251),o=r(18783).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.5e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).lengthe.title.font.sizeo)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2n._offsetShift}}},13137:function(t,e,r){"use strict";var n=r(71828),i=r(75148),a=r(47850),o=r(549);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(75148),handleDefaults:r(26377),calcAutorange:r(88443),draw:r(72413),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},47850: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"}},8389:function(t,e,r){"use strict";var n=r(50215),i=r(82196).line,a=r(79952).P,o=r(1426).extendFlat,s=r(30962).overrideAll,l=r(44467).templatedArray;r(24695),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")},34122:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},59402:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(85501),o=r(8389),s=r(30477);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))}}},32485:function(t,e,r){"use strict";var n=r(60165).readPaths,i=r(42359),a=r(51873).clearOutlineControllers,o=r(7901),s=r(91424),l=r(44467).arrayEditor,u=r(30477),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)}}}},53777:function(t,e,r){"use strict";var n=r(79952).P,i=r(1426).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"}}},90849: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")}},35855:function(t,e,r){"use strict";var n=r(64505).selectMode,i=r(51873).clearOutline,a=r(60165),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():{}}}}},75549:function(t,e,r){"use strict";var n=r(71828).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)}}},47322:function(t,e,r){"use strict";var n=r(32485),i=r(3937);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(8389),supplyLayoutDefaults:r(59402),supplyDrawNewSelectionDefaults:r(90849),includeBasePlot:r(76325)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},3937:function(t,e,r){"use strict";var n=r(52142),i=r(38258),a=r(73972),o=r(91424).dashStyle,s=r(7901),l=r(30211),u=r(23469).makeEventData,c=r(64505),f=c.freeMode,h=c.rectMode,p=c.drawMode,d=c.openMode,v=c.selectMode,g=r(30477),y=r(21459),m=r(42359),x=r(51873).clearOutline,b=r(60165),=b.handleEllipse,w=b.readPaths,T=r(90551),k=r(35855),A=r(32485).activateLastSelection,M=r(71828),S=M.sorterAsc,E=r(61082),L=r(79990),C=r(41675).getFromId,P=r(33306),O=r(61549).redrawReglTraces,I=r(34122),D=I.MINSELECT,z=E.filter,R=E.tester,F=r(75549),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)){Z(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=X(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=K())){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:K()),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 H(t){return"pointNumber"in t&&"searchInfo"in t}function q(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function G(t){if(t.length){for(var e=[],r=H(t[0])?0:t[0][0][0],n=r,i=H(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(H(t[o]))e.push(q(t[o]));else{var s=R(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function Z(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 W(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(W),u=r.map(W);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=J(a._module,i,e[0],r[0]);c.scene=t._fullLayout._splomScenes[a.uid],s.push(c)}}else if("sankey"===a.type){var f=J(a._module,i,e[0],r[0]);s.push(f)}else{if(-1===l.indexOf(a.xaxis))continue;if(-1===u.indexOf(a.yaxis))continue;s.push(J(a._module,i,C(t,a.xaxis),C(t,a.yaxis)))}else s.push(J(a._module,i,e[0],r[0]));return s}function J(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}function K(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function $(t,e,r){var n,i;for(n=0;n<e.length;n++){var o=e[n].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[o.uid]||{};void 0===s.selectedpoints&&(s.selectedpoints=o._input.selectedpoints||null)}if(r){var l=r.points||[];for(n=0;n<e.length;n++)(i=e[n].cd[0].trace)._input.selectedpoints=i._fullInput.selectedpoints=[],i._fullInput!==i&&(i.selectedpoints=[]);for(var u=0;u<l.length;u++){var c=l[u],f=c.data,h=c.fullData,p=c.pointIndex,d=c.pointIndices;d?([].push.apply(f.selectedpoints,d),i._fullInput!==i&&[].push.apply(h.selectedpoints,d)):(f.selectedpoints.push(p),i._fullInput!==i&&h.selectedpoints.push(p))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,"regl")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(P(t),O(t))}(t,e)}function Q(t,e,r){for(var i=(r?n.difference:n.union)({regions:t},{regions:[e]}).regions.reverse(),a=0;a<i.length;a++){var o=i[a];o.subtract=st(o,i.slice(0,a))}return i}function tt(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=u(t[i],n,r);return t}function et(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<t[n].length;i++){r[n][i]=[],r[n][i][0]=i?"L":"M";for(var a=0;a<t[n][i].length;a++)r[n][i].push(t[n][i][a])}e||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function rt(t,e){for(var r,n,i=[],a=[],o=0;o<e.length;o++){var s=e[o];n=s._module.selectPoints(s,t),a.push(n),r=tt(n,s),i=i.concat(r)}return i}function nt(t,e,r,n,i){var a,o,s,l=!!n;i&&(a=i.plotinfo,o=i.xaxes[0]._id,s=i.yaxes[0]._id);var u=[],c=[],f=ot(t),h=t._fullLayout;if(a){var d=h._zoomlayer,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 P=o&&s?[o+s]:h._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var O={},I=0;I<P.length;I++){var D=P[I],z=D.indexOf("y"),R=D.slice(0,z),F=D.slice(z),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=X(t,[j],[U],D);for(var V=0;V<N.length;V++){var H=N[V],q=H.cd[0],G=q.trace;if("scattergl"===H._module.name&&!q.t.xpx){var Z=G.x,Y=G.y,W=G._length;q.t.xpx=[],q.t.ypx=[];for(var J=0;J<W;J++)q.t.xpx[J]=j.c2p(Z[J]),q.t.ypx[J]=U.c2p(Y[J])}"splom"===H._module.name&&(O[G.uid]||(O[G.uid]=!0))}}var K=rt(B,N);u=u.concat(K),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=X(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 P=lt(v,S[L]),O=lt(m,E[L]);h.push([P,O]),l=Math.min(P,l),u=Math.max(P,u),c=Math.min(O,c),f=Math.max(O,f)}h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=p,h.yref=d,h.subtract=st(h,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(),P=n.plotinfo,O=j(P),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 H,q,W,J,K,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);Z(t,k,n),c&&(H=z([[F,B]],I.BENDPX));var bt=E.selectAll("path.select-outline-"+P.id).data([1]),_t=x?A.newshape:A.newselection,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-"+P.id).style({opacity:x?_t.opacity/2:1,"stroke-dasharray":o(_t.line.dash,_t.line.width),"stroke-width":_t.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Tt).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",O).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",O).attr("d","M0,0Z"),At=A._uid+I.SELECTID,Mt=[],St=X(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,St);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 Et=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n.clearSubplotSelections&&(n.clearSubplotSelections(),n.clearSubplotSelections=void 0),lt=Math.max(0,Math.min(yt,ott+F)),pt=Math.max(0,Math.min(mt,ste+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(.6r,D)?"h":r<Math.min(.6i,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?((J=T?(w,[lt,o],[lt,s]):[[F,o],[F,s],[lt,s],[lt,o]]).xmin=T?lt:Math.min(F,lt),J.xmax=T?lt:Math.max(F,lt),J.ymin=Math.min(o,s),J.ymax=Math.max(o,s),kt.attr("d","M"+J.xmin+","+(B-D)+"h-4v"+2D+"h4ZM"+(J.xmax-1)+","+(B-D)+"h4v"+2D+"h-4Z")):"v"===a?((J=T?(w,[o,pt],[s,pt]):[[o,B],[o,pt],[s,pt],[s,B]]).xmin=Math.min(o,s),J.xmax=Math.max(o,s),J.ymin=T?pt:Math.min(B,pt),J.ymax=T?pt:Math.max(B,pt),kt.attr("d","M"+(F-D)+","+J.ymin+"v-4h"+2D+"v4ZM"+(F-D)+","+(J.ymax-1)+"v4h"+2D+"v-4Z")):"d"===a&&((J=T?(w,[F,B],[lt,pt]):[[F,B],[F,pt],[lt,pt],[lt,B]]).xmin=Math.min(F,lt),J.xmax=Math.max(F,lt),J.ymin=Math.min(B,pt),J.ymax=Math.max(B,pt),kt.attr("d","M0,0Z"))}else c&&(H.addPt([lt,pt]),J=H.filtered);if(n.selectionDefs&&n.selectionDefs.length?(W=Q(n.mergedPolygons,J,xt),J.subtract=xt,q=G(n.selectionDefs.concat([J]))):(W=[J],q=R(J)),m(et(W,y),bt,n),b){var u,f=nt(k,!1),h=f.eventData?f.eventData.points.slice():[];f=nt(k,!1,q,St,n),q=f.selectionTesters,at=f.eventData,u=H?H.filtered:ut(W),L.throttle(At,I.SELECTDELAY,(function(){for(var t=(Mt=rt(q,St)).slice(),e=0;e<h.length;e++){for(var r=h[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Et(at,u),function(t,e){t.emit("plotly_selecting",e)}(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(At).then((function(){if(L.clear(At),2===t){for(bt.remove(),K=0;K<St.length;K++)(tt=St[K])._module.selectPoints(tt,!1);if($(k,St),Y(n),ht(k),St.length){var i=St[0].xaxis,o=St[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)})).catch(M.error)}},n.doneFn=function(){kt.remove(),L.done(At).then((function(){L.clear(At),!S&&J&&n.selectionDefs&&(J.subtract=xt,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(S||x)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(Mt),b&&ft(k,at)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:V}},89827:function(t,e,r){"use strict";var n=r(50215),i=r(82196).line,a=r(79952).P,o=r(1426).extendFlat,s=r(44467).templatedArray;r(24695),t.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:o({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},i.color,{editType:"arraydraw"}),width:o({},i.width,{editType:"calc+arraydraw"}),dash:o({},a,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},5627:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(21459),o=r(30477);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,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,u,c,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;l<d.length;l++)void 0!==(u=i[d[l].charAt(0)].drawn)&&(!(c=d[l].substr(1).match(a.paramRE))||c.length<u||((f=s(c[u]))<h&&(h=f),f>p&&(p=f)));return p>=h?[h,p]:void 0}}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);if("paper"!==h.xref&&"domain"!==p){var v="pixel"===h.xsizemode?h.xanchor:h.x0,g="pixel"===h.xsizemode?h.xanchor:h.x1;(f=c(u=i.getFromId(t,h.xref),v,g,h.path,a.paramIsX))&&(h.extremes[u.id]=i.findExtremes(u,f,s(h)))}if("paper"!==h.yref&&"domain"!==d){var y="pixel"===h.ysizemode?h.yanchor:h.y0,m="pixel"===h.ysizemode?h.yanchor:h.y1;(f=c(u=i.getFromId(t,h.yref),y,m,h.path,a.paramIsY))&&(h.extremes[u.id]=i.findExtremes(u,f,l(h)))}}}},21459: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}}},84726:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(85501),o=r(89827),s=r(30477);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(a("visible")){var l=a("path"),u="path"!==a("type",l?"path":"rect");u&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),f=a("ysizemode"),h=["x","y"],p=0;p<2;p++){var d,v,g,y=h[p],m=y+"anchor",x="x"===y?c:f,b={fullLayout:r},=i.coerceRef(t,e,b,y,void 0,"paper");if("range"===i.getRefType()?((d=i.getFromId(b,)).shapeIndices.push(e.index),g=s.rangeToShapePosition(d),v=s.shapePositionToRange(d)):v=g=n.identity,u){var w=y+"0",T=y+"1",k=t[w],A=t[T];t[w]=v(t[w],!0),t[T]=v(t[T],!0),"pixel"===x?(a(w,0),a(T,10)):(i.coercePosition(e,b,a,,w,.25),i.coercePosition(e,b,a,,T,.75)),e[w]=g(e[w]),e[T]=g(e[T]),t[w]=k,t[T]=A}if("pixel"===x){var M=t[m];t[m]=v(t[m],!0),i.coercePosition(e,b,a,,m,.25),e[m]=g(e[m]),t[m]=M}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},42359:function(t,e,r){"use strict";var n=r(71828).strTranslate,i=r(28569),a=r(64505),o=a.drawMode,s=a.selectMode,l=r(73972),u=r(7901),c=r(89995),f=c.i000,h=c.i090,p=c.i180,d=c.i270,v=r(51873).clearOutlineControllers,g=r(60165),y=g.pointsOnRectangle,m=g.pointsOnEllipse,x=g.writePaths,b=r(90551),=r(35855);function w(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,c){c||(c=0);var g=a.gd;function T(){t(e,r,a,c++),m(e[0])&&k({redrawing:!0})}function k(t){var e={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,e=b(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,e=(r,a),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var A,M,S,E,L,C=g._fullLayout._zoomlayer,P=a.dragmode,O=o(P),I=s(P);function D(t){S=+t.srcElement.getAttribute("data-i"),E=+t.srcElement.getAttribute("data-j"),A[S][E].moveFn=z}function z(t,r){if(e.length){var n=L[S][E][1],i=L[S][E][2],o=e[S],s=o.length;if(y(o)){var l=t,u=r;a.isActiveSelection&&(w(o,E)[1]===o[E][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==E){var f=o[c];f[1]===o[E][1]&&(f[1]=n+l),f[2]===o[E][2]&&(f[2]=i+u)}if(o[E][1]=n+l,o[E][2]=i+u,!y(o))for(var h=0;h<s;h++)for(var p=0;p<o[h].length;p++)o[h][p]=L[S][h][p]}else o[E][1]=n+t,o[E][2]=i+r;T()}}function R(){k()}function F(t,r){if(2===t){S=+r.srcElement.getAttribute("data-i"),E=+r.srcElement.getAttribute("data-j");var n=e[S];y(n)||m(n)||function(){if(e.length&&e[S]&&e[S].length){for(var t=[],r=0;r<e[S].length;r++)r!==E&&t.push(e[S][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===E&&(t[0][0]="M"),e[S]=t,T(),k())}}()}}function B(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]=L[n][i][a+1]+t,e[n][i][a+2]=L[n][i][a+2]+r}(t,r),T()}function N(t){(S=+t.srcElement.getAttribute("data-i"))||(S=0),M[S].moveFn=B}function j(){k()}function U(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)}(O||I)&&(g.fullLayout.outlining=!0),v(g),r.attr("d",x(e)),c||!a.isActiveShape&&!a.isActiveSelection||(L=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){A=[];for(var r=0;r<e.length;r++){var o=e[r],s=y(o),l=!s&&m(o);A[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=w(o,v));var =o[v][1],T=o[v][2],k=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 M=x[1]-,S=x[2]-T,E=S?5:Math.max(Math.min(25,Math.abs(M)-5),5),L=M?5:Math.max(Math.min(25,Math.abs(S)-5),5);k.classed(S?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",E).attr("height",L).attr("x",-E/2).attr("y",T-L/2).attr("transform",n(M/2,S/2))}else k.classed("cursor-grab",!0).attr("r",5).attr("cx",).attr("cy",T);A[r][v]={element:k.node(),gd:g,prepFn:D,doneFn:R,clickFn:F},i.init(A[r][v])}}}(C.append("g").attr("class","outline-controllers")),function(){if(M=[],e.length){M[0]={element:r[0][0],gd:g,prepFn:N,doneFn:j,clickFn:U},i.init(M[0])}}())}},34031:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(89298),o=r(60165).readPaths,s=r(42359),l=r(51873).clearOutlineControllers,u=r(7901),c=r(91424),f=r(44467).arrayEditor,h=r(28569),p=r(6964),d=r(21459),v=r(30477),g=v.getPathString;function y(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&b(t,i)}function m(t){return!!t._fullLayout._outlining}function x(t){return!t._context.edits.shapePosition}function b(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=v.makeShapesOptionsAndPlotinfo(t,e),l=r.options,b=r.plotinfo;function k(r){var k=g(t,l),A={"data-index":e,"fill-rule":l.fillrule,d:k},M=l.opacity,S=l.fillcolor,E=l.line.width?l.line.color:"rgba(0,0,0,0)",L=l.line.width,C=l.line.dash;L||!0!==l.editable||(L=5,C="solid");var P="Z"!==k[k.length-1],O=x(t)&&l.editable&&t._fullLayout.activeShapeIndex===e;O&&(S=P?"rgba(0,0,0,0)":t.fullLayout.activeshape.fillcolor,M=t.fullLayout.activeshape.opacity);var I,D=r.append("path").attr(A).style("opacity",M).call(u.stroke,E).call(u.fill,S).call(c.dashLine,C,L);if((D,t,l),(O||t.context.edits.shapePosition)&&(I=f(t.layout,"shapes",l)),O){D.style({cursor:"move"});var z={element:D.node(),plotinfo:b,gd:t,editHelpers:I,isActiveShape:!0},R=o(k,t);s(R,D,z)}else t.context.edits.shapePosition?function(t,e,r,o,s,l){var u,f,y,x,b,T,k,A,M,S,E,L,C,P,O,I,D="pixel"===r.xsizemode,z="pixel"===r.ysizemode,R="line"===r.type,F="path"===r.type,B=l.modifyItem,N=a.getFromId(t,r.xref),j=a.getRefType(r.xref),U=a.getFromId(t,r.yref),V=a.getRefType(r.yref),H=v.getDataToPixel(t,N,!1,j),q=v.getDataToPixel(t,U,!0,V),G=v.getPixelToData(t,N,!1,j),Z=v.getPixelToData(t,U,!0,V),Y=R?function(){var t=10,n=Math.max(r.line.width,t),i=s.append("g").attr("data-index",o);i.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var a={"fill-opacity":"0"},l=Math.max(n/2,t);return i.append("circle").attr({"data-line-point":"start-point",cx:D?H(r.xanchor)+r.x0:H(r.x0),cy:z?q(r.yanchor)-r.y0:q(r.y0),r:l}).style(a).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:D?H(r.xanchor)+r.x1:H(r.x1),cy:z?q(r.yanchor)-r.y1:q(r.y1),r:l}).style(a).classed("cursor-grab",!0),i}():e,W={element:Y.node(),gd:t,prepFn:function(n){m(t)||(D&&(b=H(r.xanchor)),z&&(T=q(r.yanchor)),"path"===r.type?O=r.path:(u=D?r.x0:H(r.x0),f=z?r.y0:q(r.y0),y=D?r.x1:H(r.x1),x=z?r.y1:q(r.y1)),u<y?(M=u,C="x0",S=y,P="x1"):(M=y,C="x1",S=u,P="x0"),!z&&f<x||z&&f>x?(k=f,E="y0",A=x,L="y1"):(k=x,E="y1",A=f,L="y0"),X(n),$(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),c.setClipUrl(t,l?"clip"+r.fullLayout.uid+l:null,r)}(e,r,t),W.moveFn="move"===I?J:K,W.altKey=n.altKey)},doneFn:function(){m(t)||(p(e),Q(s),(e,t,r),n.call("guiRelayout",t,l.getUpdateObj()))},clickFn:function(){m(t)||Q(s)}};function X(r){if(m(t))I=null;else if(R)I="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=W.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):"move";p(e,l),I=l.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,l=a;D?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=v.encodeDate(o))),z?B("yanchor",r.yanchor=Z(T+i)):(l=function(t){return Z(q(t)+i)},U&&"date"===U.type&&(l=v.encodeDate(l))),B("path",r.path=w(O,o,l))}else D?B("xanchor",r.xanchor=G(b+n)):(B("x0",r.x0=G(u+n)),B("x1",r.x1=G(y+n))),z?B("yanchor",r.yanchor=Z(T+i)):(B("y0",r.y0=Z(f+i)),B("y1",r.y1=Z(x+i)));e.attr("d",g(t,r)),$(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;D?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=v.encodeDate(o))),z?B("yanchor",r.yanchor=Z(T+i)):(l=function(t){return Z(q(t)+i)},U&&"date"===U.type&&(l=v.encodeDate(l))),B("path",r.path=w(O,o,l))}else if(R){if("resize-over-start-point"===I){var c=u+n,h=z?f-i:f+i;B("x0",r.x0=D?c:G(c)),B("y0",r.y0=z?h:Z(h))}else if("resize-over-end-point"===I){var p=y+n,d=z?x-i:x+i;B("x1",r.x1=D?p:G(p)),B("y1",r.y1=z?d:Z(d))}}else{var m=function(t){return-1!==I.indexOf(t)},=m("n"),j=m("s"),V=m("w"),Y=m("e"),W=?k+i:k,X=j?A+i:A,J=V?M+n:M,K=Y?S+n:S;z&&(&&(W=k-i),j&&(X=A-i)),(!z&&X-W>10||z&&W-X>10)&&(B(E,r[E]=z?W:Z(W)),B(L,r[L]=z?X:Z(X))),K-J>10&&(B(C,r[C]=D?J:G(J)),B(P,r[P]=D?K:G(K)))}e.attr("d",g(t,r)),$(s,r)}function $(t,e){(D||z)&&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 a=H(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,d.paramIsX))),o=q(z?e.yanchor:i.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,d.paramIsY)));if(a=v.roundPositionForSharpStrokeRendering(a,1),o=v.roundPositionForSharpStrokeRendering(o,1),D&&z){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function Q(t){t.selectAll(".visual-cue").remove()}h.init(W),Y.node().onmousemove=X}(t,D,l,e,r,I):!0===l.editable&&D.style("pointer-events",P||u.opacity(S)M<=.5?"stroke":"all");D.node().addEventListener("click",(function(){return function(t,e){if(x(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,y(t)}}}(t,D)}))}l._input&&!1!==l.visible&&("below"!==l.layer?k(t._fullLayout._shapeUpperLayer):"paper"===l.xref||"paper"===l.yref?k(t._fullLayout._shapeLowerLayer):b._hadPlotinfo?k((b.mainplotinfo||b).shapelayer):k(t._fullLayout._shapeLowerLayer))}function _(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9] domain/g,"");c.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){x(t)&&t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:b,eraseActiveShape:function(t){if(x(t)){l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var i=[],a=0;a<r.length;a++)a!==e&&i.push(r[a]);delete t._fullLayout._activeShapeIndex,n.call("_guiRelayout",t,{shapes:i})}}}}},29241:function(t,e,r){"use strict";var n=r(79952).P,i=r(1426).extendFlat;t.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:i({},n,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},89995: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)}},45547:function(t,e,r){"use strict";var n=r(7901);t.exports=function(t,e,r){if(r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var i=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(i)),r("newshape.line.dash")}r("activeshape.fillcolor"),r("activeshape.opacity")}},60165:function(t,e,r){"use strict";var n=r(95616),i=r(89995),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(75549),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(rr+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=2Math.PIo/a;w.push([k,S+AMath.cos(L),E+MMath.sin(L)])}break;case"Z":d===s&&v===c||(d=s,v=c,w.push([k,d,v]))}for(var C=(r||{}).domain,P=e._fullLayout.size,O=r&&"pixel"===r.xsizemode,I=r&&"pixel"===r.ysizemode,D=!1===i,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var R=w[z][o+1],F=w[z][o+2];void 0!==R&&void 0!==F&&(d=R,v=F,r&&(r.xaxis&&r.xaxis.p2r?(D&&(R-=r.xaxis.offset),R=O?u(r.xaxis,r.xanchor)+R:l(r.xaxis,R)):(D&&(R-=P.l),C?R=C.x[0]+R/P.w:R/=P.w),r.yaxis&&r.yaxis.p2r?(D&&(F-=r.yaxis.offset),F=I?u(r.yaxis,r.yanchor)-F:l(r.yaxis,F)):(D&&(F-=P.t),F=C?C.y[1]-F/P.h:1-F/P.h)),w[z][o+1]=R,w[z][o+2]=F)}h[p].push(w[z].slice())}}return h},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=(2e-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=2hMath.PI/a;f.push([s+uMath.cos(p),l+cMath.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}},90551:function(t,e,r){"use strict";var n=r(64505),i=n.drawMode,a=n.openMode,o=r(89995),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,h=o.sin45,p=r(75549),d=p.p2r,v=p.r2p,g=r(51873).clearOutline,y=r(60165),m=y.readPaths,x=y.writePaths,b=y.ellipseOver,=y.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var n=r.getAttribute("d"),o=e.gd,p=o._fullLayout.newshape,y=e.plotinfo,w=y.xaxis,T=y.yaxis,k=!!y.domain||!y.xaxis,A=!!y.domain||!y.yaxis,M=e.isActiveShape,S=e.dragmode,E=(o.layout||{}).shapes||[];if(!i(S)&&void 0!==M){var L=o._fullLayout._activeShapeIndex;if(L<E.length)switch(o._fullLayout.shapes[L].type){case"rect":S="drawrect";break;case"circle":S="drawcircle";break;case"line":S="drawline";break;case"path":var C=E[L].path||"";S="Z"===C[C.length-1]?"drawclosedpath":"drawopenpath"}}var P,O=a(S),I=m(n,o,y,M),D={editable:!0,xref:k?"paper":w._id,yref:A?"paper":T.id,layer:p.layer,opacity:p.opacity,line:{color:p.line.color,width:p.line.width,dash:p.line.dash}};if(O||(D.fillcolor=p.fillcolor,D.fillrule=p.fillrule),1===I.length&&(P=I[0]),P&&5===P.length&&"drawrect"===S)D.type="rect",D.x0=P[0][1],D.y0=P[0][2],D.x1=P[2][1],D.y1=P[2][2];else if(P&&"drawline"===S)D.type="line",D.x0=P[0][1],D.y0=P[0][2],D.x1=P[1][1],D.y1=P[1][2];else if(P&&"drawcircle"===S){D.type="circle";var z=P[s][1],R=P[l][1],F=P[u][1],B=P[c][1],N=P[s][2],j=P[l][2],U=P[u][2],V=P[c][2],H=y.xaxis&&("date"===y.xaxis.type||"log"===y.xaxis.type),q=y.yaxis&&("date"===y.yaxis.type||"log"===y.yaxis.type);H&&(z=v(y.xaxis,z),R=v(y.xaxis,R),F=v(y.xaxis,F),B=v(y.xaxis,B)),q&&(N=v(y.yaxis,N),j=v(y.yaxis,j),U=v(y.yaxis,U),V=v(y.yaxis,V));var G=(R+B)/2,Z=(N+U)/2,Y=b({x0:G,y0:Z,x1:G+(B-R+F-z)/2f,y1:Z+(V-j+U-N)/2h});H&&(Y.x0=d(y.xaxis,Y.x0),Y.x1=d(y.xaxis,Y.x1)),q&&(Y.y0=d(y.yaxis,Y.y0),Y.y1=d(y.yaxis,Y.y1)),D.x0=Y.x0,D.y0=Y.y0,D.x1=Y.x1,D.y1=Y.y1}else D.type="path",w&&T&&(I,w,T),D.path=x(I),P=null;g(o);for(var W=e.editHelpers,X=(W||{}).modifyItem,J=[],K=0;K<E.length;K++){var $=o._fullLayout.shapes[K];if(J[K]=$._input,void 0!==M&&K===o._fullLayout._activeShapeIndex){var Q=D;switch($.type){case"line":case"rect":case"circle":X("x0",Q.x0),X("x1",Q.x1),X("y0",Q.y0),X("y1",Q.y1);break;case"path":X("path",Q.path)}}}return void 0===M?(J.push(D),J):W?W.getUpdateObj():{}}}}},51873: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}}},30477:function(t,e,r){"use strict";var n=r(21459),i=r(71828),a=r(89298);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){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(t){return r._length*(n?1-t:t)+r._offset};else{var s=e.shapePositionToRange(r);a=function(t){return r._offset+r.r2p(s(t,!0))},"date"===r.type&&(a=e.decodeDate(a))}else a=n?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.wt};return a},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 o,s,l,u,c,f,h,p,d=r.type,v=a.getRefType(r.xref),g=a.getRefType(r.yref),y=a.getFromId(t,r.xref),m=a.getFromId(t,r.yref),x=t._fullLayout._size;if(y?"domain"===v?s=function(t){return y._offset+y._lengtht}:(o=e.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.l+x.wt},m?"domain"===g?u=function(t){return m._offset+m._length(1-t)}:(l=e.shapePositionToRange(m),u=function(t){return m.offset+m.r2p(l(t,!0))}):u=function(t){return x.t+x.h*(1-t)},"path"===d)return y&&"date"===y.type&&(s=e.decodeDate(s)),m&&"date"===m.type&&(u=e.decodeDate(u)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,u=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,c=t.charAt(0),f=n.paramIsX[c],h=n.paramIsY[c],p=n.numParams[c],d=t.substr(1).replace(n.paramRE,(function(t){return f[a]?t="pixel"===o?e(l)+Number(t):e(t):h[a]&&(t="pixel"===s?r(u)-Number(t):r(t)),++a>p&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]X./,""),i.log("Ignoring extra params in segment "+t)),c+d}))}(r,s,u);if("pixel"===r.xsizemode){var b=s(r.xanchor);c=b+r.x0,f=b+r.x1}else c=s(r.x0),f=s(r.x1);if("pixel"===r.ysizemode){var =u(r.yanchor);h=-r.y0,p=-r.y1}else h=u(r.y0),p=u(r.y1);if("line"===d)return"M"+c+","+h+"L"+f+","+p;if("rect"===d)return"M"+c+","+h+"H"+f+"V"+p+"H"+c+"Z";var w=(c+f)/2,T=(h+p)/2,k=Math.abs(w-c),A=Math.abs(T-h),M="A"+k+","+A,S=w+k+","+T;return"M"+S+M+" 0 1,1 "+w+","+(T-A)+M+" 0 0,1 "+S+"Z"}},89853:function(t,e,r){"use strict";var n=r(34031);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(89827),supplyLayoutDefaults:r(84726),supplyDrawNewShapeDefaults:r(45547),includeBasePlot:r(76325)("shapes"),calcAutorange:r(5627),draw:n.draw,drawOne:n.drawOne}},75067:function(t,e,r){"use strict";var n=r(41940),i=r(35025),a=r(1426).extendDeepAll,o=r(30962).overrideAll,s=r(85594),l=r(44467).templatedArray,u=r(98292),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")},98292: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}},12343:function(t,e,r){"use strict";var n=r(71828),i=r(85501),a=r(75067),o=r(98292).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})}},44504:function(t,e,r){"use strict";var n=r(39898),i=r(74875),a=r(7901),o=r(91424),s=r(71828),l=s.strTranslate,u=r(63893),c=r(44467).arrayEditor,f=r(98292),h=r(18783),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.we.x,c.ly=h.t+h.h(1-e.y),"fraction"===e.lenmode?c.outerLength=Math.round(h.we.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var p=(c.inputAreaLength-2f.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.heightv[w],t:c.heightd[w]};"fraction"===e.lenmode?(T.l=0,T.xl=e.x-e.lend[b],T.r=0,T.xr=e.x+e.lenv[b]):(T.x=e.x,T.l=c.outerLengthd[b],T.r=c.outerLengthv[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=.5a.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.sizep;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.sizep+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))-.5e.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-.5f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2f.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-2f.stepInset-2r.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 P(t,e){var r=e._dims,n=r.inputAreaLength-2f.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(P,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)}))}}},23243:function(t,e,r){"use strict";var n=r(98292);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(75067),supplyLayoutDefaults:r(12343),draw:r(44504)}},92998:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(74875),o=r(73972),s=r(71828),l=s.strTranslate,u=r(91424),c=r(7901),f=r(63893),h=r(37822),p=r(18783).OPPOSITE_SIDE,d=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var v,g=r.propContainer,y=r.propName,m=r.placeholder,x=r.traceIndex,b=r.avoid||{},=r.attributes,w=r.transform,T=r.containerGroup,k=t._fullLayout,A=1,M=!1,S=g.title,E=(S&&S.text?S.text:"").trim(),L=S&&S.font?S.font:{},C=L.family,P=L.size,O=L.color;"title.text"===y?v="titleText":-1!==y.indexOf("axis")?v="axisTitleText":y.indexOf(!0)&&(v="colorbarTitleText");var I=t._context.edits[v];""===E?A=0:E.replace(d," % ")===m.replace(d," % ")&&(A=.2,M=!0,I||(E="")),r._meta?E=s.templateString(E,r._meta):k._meta&&(E=s.templateString(E,k.meta));var D,z=E||I;T||(T=s.ensureSingle(k.infolayer,"g","g-"+e),D=k.hColorbarMoveTitle);var R=T.selectAll("text").data(z?[0]:[]);if(R.enter().append("text"),R.text(E).attr("class",e),R.exit().remove(),!z)return T;function F(t){s.syncOrAsync([B,N],t)}function B(e){var r;return!w&&D&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,.x,.y]+")"),(w.offset||D)&&(r+=l(0,(w.offset||0)-(D||0)))):r=null,e.attr("transform",r),e.style({"font-family":C,"font-size":n.round(P,2)+"px",fill:c.rgb(O),opacity:A*c.opacity(O),"font-weight":a.fontWeight}).attr().call(f.convertToTspans,t),a.previousPromises(t)}function N(t){var e=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&E){e.attr("transform",null);var r=p[b.side],a="left"===b.side||"top"===b.side?-1:1,o=i(b.pad)?b.pad:2,c=u.bBox(e.node()),f={left:0,top:0,right:k.width,bottom:k.height},h=b.maxShift||a*(f[b.side]-c[b.side]),d=0;if(h<0)d=h;else{var v=b.offsetLeft||0,y=b.offsetTop||0;c.left-=v,c.right-=v,c.top-=y,c.bottom-=y,b.selection.each((function(){var t=u.bBox(this);s.bBoxIntersect(c,t,o)&&(d=Math.max(d,a*(t[b.side]-c[r])+o))})),d=Math.min(h,d),g._titleScoot=Math.abs(d)}if(d>0||h<0){var m={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr("transform",l(m[0],m[1]))}}}return R.call(F),I&&(E?R.on(".opacity",null):(A=0,M=!0,R.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),R.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("guiRestyle",t,y,e,x):o.call("guiRelayout",t,y,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(t){this.text(t||" ").call(f.positionText,.x,.y)}))),R.classed("js-placeholder",M),T}}},7163:function(t,e,r){"use strict";var n=r(41940),i=r(22399),a=r(1426).extendFlat,o=r(30962).overrideAll,s=r(35025),l=r(44467).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")},75909: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:"▼"}}},64897:function(t,e,r){"use strict";var n=r(71828),i=r(85501),a=r(7163),o=r(75909).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})}},13689:function(t,e,r){"use strict";var n=r(39898),i=r(74875),a=r(7901),o=r(91424),s=r(71828),l=r(63893),u=r(44467).arrayEditor,c=r(18783).LINE_SPACING,f=r(75909),h=r(25849);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.sizec,g=l.lineCount(h),y=Math.max(vg,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.we.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.sizec,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)}))}}},20763:function(t,e,r){"use strict";var n=r(75909);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(7163),supplyLayoutDefaults:r(64897),draw:r(13689)}},25849:function(t,e,r){"use strict";t.exports=s;var n=r(39898),i=r(7901),a=r(91424),o=r(71828);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+2s.barPad,M=s.barWidth+2s.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,P=s.barWidth+2s.barPad,O=s.barLength+2s.barPad,I=d+v,D=g;I+P>l&&(I=l-P);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:P,height:O}),this._vbarYMin=D+O/2,this._vbarTranslateMax=T-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=c-.5,B=C?f+P+.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 H=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(H),C&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this.box.l-this.position.l-t,this.box.t-this.position.t-e),this.clipRect&&this.clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+ithis._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+sthis.vbarTranslateMax)}}},18783: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"}}},24695: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(" ")}}},22372:function(t){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562: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"}},74808:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","]",")(","["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"]","[":"]["}}},29659: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]}},87381:function(t){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606: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,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},77922: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}},8729:function(t,e,r){"use strict";e.version=r(11506).version,r(7417),r(98847);for(var n=r(73972),i=e.register=n.register,a=r(10641),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(67368)),i([r(2199),r(30211),r(32745),r(2468),r(47322),r(89853),r(68804),r(20763),r(23243),r(13137),r(97218),r(83312),r(37369),r(21081),r(12311),r(64168)]),i([r(92177),r(37815)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(24255);var u=r(30211),c=r(74875);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(44511),e.PlotSchema=r(86281)},24255: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:["",""," <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>",""," <title>plotly-logomark</title>"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863: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}},26348:function(t,e,r){"use strict";var n=r(64872),i=n.mod,a=n.modHalf,o=Math.PI,s=2o;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[tMath.cos(e)+i,a-tMath.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/180o},rad2deg:function(t){return t/o180},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)}}},73627:function(t,e){"use strict";var r=Array.isArray,n=ArrayBuffer,i=DataView;function a(t){return n.isView(t)&&!(t instanceof i)}function o(t){return r(t)||a(t)}function s(t,e,r){if(o(t)){if(o(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}e.isTypedArray=a,e.isArrayOrTypedArray=o,e.isArray1D=function(t){return!o(t[0])},e.ensureArray=function(t,e){return r(t)||(t=[]),t.length=e,t},e.concat=function(){var t,e,n,i,a,o,s,l,u=[],c=!0,f=0;for(n=0;n<arguments.length;n++)(o=(i=arguments[n]).length)&&(e?u.push(i):(e=i,a=o),r(i)?t=!1:(c=!1,f?t!==i.constructor&&(t=!1):t=i.constructor),f+=o);if(!f)return[];if(!u.length)return e;if(c)return e.concat.apply(e,u);if(t){for((s=new t(f)).set(e),n=0;n<u.length;n++)i=u[n],s.set(i,a),a+=i.length;return s}for(s=new Array(f),l=0;l<e.length;l++)s[l]=e[l];for(n=0;n<u.length;n++){for(i=u[n],l=0;l<i.length;l++)s[a+l]=i[l];a+=l}return s},e.maxRowLength=function(t){return s(t,Math.max,0)},e.minRowLength=function(t){return s(t,Math.min,1/0)}},95218:function(t,e,r){"use strict";var n=r(92770),i=r(50606).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},33306: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})}))}},86367:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},96554:function(t,e,r){"use strict";var n=r(92770),i=r(84267),a=r(9012),o=r(63282),s=r(7901),l=r(37822).DESELECTDIM,u=r(65487),c=r(30587).counter,f=r(64872).modHalf,h=r(73627).isArrayOrTypedArray;function p(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&h(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){h(t)?e.set(t):void 0!==r&&e.set(r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join("+")):e.set(r)}else e.set(r);else e.set(t)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(t)}},info_array:{coerceFunction:function(t,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}var o=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(t)&&Array.isArray(t[0]);if(Array.isArray(t)){var s,l,u,c,f,h,p=i.items,d=[],v=Array.isArray(p),g=v&&o&&Array.isArray(p[0]),y=o&&v&&!g,m=v&&!y?p.length:t.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s<m;s++)for(d[s]=[],u=Array.isArray(t[s])?t[s]:[],f=y?p.length:v?p[s].length:u.length,l=0;l<f;l++)c=y?p[l]:v?p[s][l]:p,void 0!==(h=a(u[l],c,(n[s]||[])[l]))&&(d[s][l]=h);else for(s=0;s<m;s++)void 0!==(h=a(t[s],v?p[s]:p,n[s]))&&(d[s]=h);r.set(d)}else r.set(n)},validateFunction:function(t,e){if(!Array.isArray(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!Array.isArray(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!p(t[a][o],n?r[a][o]:r))return!1}else if(!p(t[a],n?r[a]:r))return!1;return!0}}},e.coerce=function(t,r,n,i,a){var o=u(n,i).get(),s=u(t,i),l=u(r,i),c=s.get(),f=r._template;if(void 0===c&&f&&(c=u(f,i).get(),f=0),void 0===a&&(a=o.dflt),o.arrayOk&&h(c))return l.set(c),c;var d=e.valObjectMeta[o.valType].coerceFunction;d(c,l,a,o);var v=l.get();return f&&v===a&&!p(c,o)&&(d(c=u(f,i).get(),l,a,o),v=l.get()),v},e.coerce2=function(t,r,n,i,a){var o=u(t,i),s=e.coerce(t,r,n,i,a);return null!=o.get()&&s},e.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+".family",r.family),n.size=t(e+".size",r.size),n.color=t(e+".color",r.color),n},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?s.contrast(a):r)}t(e+".fgopacity",i?.5:1)}},e.coerceHoverinfo=function(t,r,n){var i,o=r._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var u="all"===l.dflt?l.flags.slice():l.dflt.split("+");u.splice(u.indexOf("name"),1),i=u.join("+")}return 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&&(h(i)||t.selected||t.unselected||(r=i,n=li),e("selected.marker.opacity",r),e("unselected.marker.opacity",n))}},e.validate=p},41631:function(t,e,r){"use strict";var n,i,a=r(84096).i$,o=r(92770),s=r(47769),l=r(64872).mod,u=r(50606),c=u.BADNUM,f=u.ONEDAY,h=u.ONEHOUR,p=u.ONEMIN,d=u.ONESEC,v=u.EPOCHJD,g=r(73972),y=r(84096).g0,m=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)( Tt(:([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(:([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=3p;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 P=g.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,O),M)}else C=P.newDate(k,Number(A),M)}catch(t){return c}return C?(C.toJD()-v)f+Sh+Ep+Ld: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()+Ld},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=90f,k=3h,A=5p;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%d10+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?10x.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(10l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10r.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 P=[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),P[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 O=3*f;e.incrementMonth=function(t,e,r){r=(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+v,a=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+O);return u.setUTCMonth(u.getUTCMonth()+e)+n-O},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}}},24401:function(t,e,r){"use strict";var n=r(39898),i=r(47769),a=r(35657),o=r(79576);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+"{"+r+"}",0):o.addRule?o.addRule(e,r,0):i.warn("addStyleRule failed")}function u(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function c(t){for(var e=[];f(t);)e.push(t),t=t.parentNode;return e}function f(t){return t&&(t instanceof Element||t instanceof HTMLElement)}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}}},11086:function(t,e,r){"use strict";var n=r(15398).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},1426:function(t,e,r){"use strict";var n=r(41965),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)}},75744: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}},76756: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}},41327:function(t,e,r){"use strict";var n=r(39898),i=r(24138),a=r(30774),o=r(29261),s=r(85268),l=r(23389),u=r(47769),c=r(41965),f=r(65487),h=r(61082),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=dt;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)}}},18214:function(t,e,r){"use strict";var n=r(50606).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:[]}}},87642:function(t,e,r){"use strict";var n,i,a,o=r(64872).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=lp-cf;if(0===d)return null;var v=(up-ch)/d,g=(uf-lh)/d;return g<0||g>1||v<0||v>1?null:{x:t+lv,y:e+fv}}function l(t,e,r,n,i){var a=nt+ie;if(a<0)return nn+ii;if(a>r){var o=n-t,s=i-e;return oo+ss}var l=ne-it;return ll/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=cc+ff,v=hh+pp,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:(4f.x+l.x+u.x)/6,y:(4f.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(uu+ff)}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;co>0?p=i:h=i,f++}return a}},81697:function(t,e,r){"use strict";var n=r(92770),i=r(84267),a=r(25075),o=r(21081),s=r(22399).defaultLine,l=r(73627).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,i,s,p,d,v=t.color,g=l(v),y=l(e),m=o.extractOpts(t),x=[];if(n=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=g?function(t,e){return void 0===t[e]?u:a(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||y)for(var b=0;b<r;b++)p=i(v,b),d=s(e,b),x[b]=c(p,d);else x=c(a(v),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]}}))}}},28984:function(t,e,r){"use strict";var n=r(23389);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]}}},23389:function(t){"use strict";t.exports=function(t){return t}},39240:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(rt+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}},71828:function(t,e,r){"use strict";var n=r(39898),i=r(84096).g0,a=r(60721).WU,o=r(92770),s=r(50606),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)?"
"),"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("
"),"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("
"),"stick")}}},77310:function(t,e,r){"use strict";var n=r(39898);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}},35657:function(t,e,r){"use strict";var n=r(79576);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=tMath.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]]]}},64872: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}}},65487:function(t,e,r){"use strict";var n=r(92770),i=r(73627).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";for(var r,i,o,s=0,u=e.split(".");s<u.length;){if(r=String(u[s]).match(/^([^[]])(([-?[0-9]])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw"bad property string";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|.)args[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,h="",p=[[t,h]],d=s(n,r);for(o=0;o<e.length-1;o++){if("number"==typeof(a=e[o])&&!i(l))throw"array index but container is not an array";if(-1===a){if(d=!c(l,e.slice(o+1),n,r))break;return}if(!f(l,a,e[o+1],d))break;if("object"!=typeof(l=l[a])||null===l)throw"container is not an object";h=u(h,a),p.push([l,h])}if(d){if(o===e.length-1&&(delete l[e[o]],Array.isArray(l)&&+e[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[e[o]]=n}}function u(t,e){var r=e;return n(e)?r="["+e+"]":t&&(r="."+e),t+r}function c(t,e,r,n){var a,o=i(r),u=!0,c=r,h=n.replace("-1",0),p=!o&&s(r,h),d=e[0];for(a=0;a<t.length;a++)h=n.replace("-1",a),o&&(p=s(c=r[a%r.length],h)),p&&(u=!1),f(t,a,d,p)&&l(t[a],e,n.replace("-1",a))(c);return u}function f(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]="number"==typeof r?[]:{}}return!0}},64213:function(t){"use strict";t.exports=function(){}},75046:function(t,e,r){"use strict";var n=r(39898),i=r(92770),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("×").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()}))}}},39918:function(t,e,r){"use strict";var n=r(6964),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))}},61082:function(t,e,r){"use strict";var n=r(35657).dot,i=r(50606).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}}},79749:function(t,e,r){"use strict";var n=r(58617),i=r(98580);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}},45142:function(t,e,r){"use strict";var n=r(92770),i=r(35791);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}},75138: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}},10847:function(t,e,r){"use strict";var n=r(71828),i=r(72075).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},30587: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)}},6962: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}},51332:function(t,e,r){"use strict";var n=r(73627).isArrayOrTypedArray,i=r(41965);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])}}},65888:function(t,e,r){"use strict";var n=r(92770),i=r(47769),a=r(23389),o=r(50606).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+=vs(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}},6964: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)}},58617:function(t,e,r){"use strict";var n=r(7901),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}},78607:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},80038:function(t,e,r){"use strict";var n=r(92770),i=r(73627).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.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=et.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return rt[Math.ceil(e)]+(1-r)t[Math.floor(e)]}},78614:function(t,e,r){"use strict";var n=r(25075);t.exports=function(t){return t?n(t):[0,0,0,1]}},63893:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.strTranslate,o=r(77922),s=r(18783).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),P=n.select(t.node().parentNode);if(!P.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(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){P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void e();var l=P.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,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"===O[0])l.attr({transform:"rotate("+[-90,y,m]+")"+a(-d/2,x-v/2)});else if("l"===O[0])m=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))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(){P.empty()||(O=t.attr("class")+"-math",P.select("svg."+O).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),P=0;P<E.length;P++){var O=E[P],I=O.match(x),D=I&&I[2].toLowerCase(),z=h[D];if("br"===D)c();else if(void 0===z)g(r,L(O));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=/(<|<|<)/g,c=/(>|>|>)/g,f=[["$","$"],["\(","\)"]],h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},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=/(^|;)\scolor:/;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="...".length,a=t.split(m),o=[],s="",l=0,u=0;u<a.length;u++){var c=a[u],f=c.match(x),h=f&&f[2].toLowerCase();if(h)-1!==n.indexOf(h)&&(o.push(c),s=h);else{var p=c.length;if(l+p<r)o.push(c),l+=p;else if(l<r){var d=r-l;s&&("br"!==s||d<=i||p<=i)&&o.pop(),r>i?o.push(c.substr(0,d-i)+"..."):o.push(c.substr(0,d));break}s=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function 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 P(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout.invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}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 O="1px ";e.makeTextShadow=function(t){return"1px 1px 1px "+t+", -"+"1px -"+O+O+t+", "+"1px -"+O+O+t+", -"+O+O+O+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(P(t,i,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)})).on("focus",(function(){var t=this;r.editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r.editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(P(t,i,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var h,p=o.attr("class");(h=p?"."+p.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(h).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},79990: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)}},58163:function(t,e,r){"use strict";var n=r(92770);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}},90973:function(t,e,r){"use strict";var n=t.exports={},i=r(78776).locationmodeToLayer,a=r(96892).zL;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}},37815: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"}}},92177: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"}}},14458:function(t,e,r){"use strict";var n=r(73972);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:""}}},30962:function(t,e,r){"use strict";var n=r(71828),i=n.extendFlat,a=n.isPlainObject,o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},s={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},l=o.flags.slice().concat(["fullReplot"]),u=s.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function f(t,e,r){var n=i({},t);for(var o in n){var s=n[o];a(s)&&(n[o]=h(s,e,0,o))}return"from-root"===r&&(n.editType=e),n}function h(t,e,r,n){if(t.valType){var a=i({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e)}return a}return f(t,e,""===n.charAt(0)?"nested":"from-root")}t.exports={traces:o,layout:s,traceFlags:function(){return c(l)},layoutFlags:function(){return c(u)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:f}},58377:function(t,e,r){"use strict";var n=r(92770),i=r(27812),a=r(73972),o=r(71828),s=r(74875),l=r(41675),u=r(7901),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"),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]+kA[2+4n];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 P=Array.isArray(t.images)?t.images.length:0;for(r=0;r<P;r++){var O=t.images[r];o.isPlainObject(O)&&(p(O,"xref"),p(O,"yref"))}var I=t.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),u.clean(t),t.template&&t.template.layout&&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,P=Object.keys(C);L.styles=[];for(var O=0;O<P.length;O++)L.styles.push({target:P[O],value:C[P[O]]})}}}}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)}}}},10641:function(t,e,r){"use strict";var n=r(72391);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,e.toImage=r(403),e.validate=r(84936),e.downloadImage=r(7239);var i=r(96318);e.makeTemplate=i.makeTemplate,e.validateTemplate=i.validateTemplate},6611:function(t,e,r){"use strict";var n=r(41965),i=r(64213),a=r(47769),o=r(65888).sorterAsc,s=r(73972);e.containerArrayMatch=r(14458);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(),P=[],O=-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)?P.push():A?("add"===k&&(k={}),L.splice(,0,k),C&&C.splice(,0,{})):a.warn("Unrecognized full object edit value",f,,k),-1===O&&(O=);else for(b=0;b<T.length;b++)M=f+"["++"].",c(L[],T[b],M).set(w[T[b]]);for(x=P.length-1;x>=0;x--)L.splice(P[x],1),C&&C.splice(P[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===O)D=S;else{for(I=Math.max(L.length,I),D=[],x=0;x<S.length&&!((=S[x])>=O);x++)D.push();for(x=O;x<I;x++)D.push(x)}for(x=0;x<D.length;x++)d(t,D[x])}else p(t);return!0}},72391:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(57035),o=r(71828),s=o.nestedProperty,l=r(11086),u=r(10847),c=r(73972),f=r(86281),h=r(74875),p=r(89298),d=r(91424),v=r(7901),g=r(4305).initInteractions,y=r(77922),m=r(47322).clearOutline,x=r(72075).dfltConfig,b=r(6611),=r(58377),w=r(61549),T=r(30962),k=r(85555).AX_NAME_PATTERN,A=0;function M(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function S(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function E(t,e){S(t,v.combine(e,"white"))}function L(t,e){if(!t._context){t._context=o.extendDeep({},x);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,u=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in u&&("setBackground"===l&&"opaque"===e[l]?u[l]=E:u[l]=e[l]);e.plot3dPixelRatio&&!u.plotGlPixelRatio&&(u.plotGlPixelRatio=u.plot3dPixelRatio);var c=e.editable;if(void 0!==c)for(u.editable=c,s=Object.keys(u.edits),i=0;i<s.length;i++)u.edits[s[i]]=c;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in u.edits&&(u.edits[l]=e.edits[l]);u._exportedPlot=e._exportedPlot}u.staticPlot&&(u.editable=!1,u.edits={},u.autosizable=!1,u.scrollZoom=!1,u.doubleClick=!1,u.showTips=!1,u.showLink=!1,u.displayModeBar=!1),"hover"!==u.displayModeBar||a||(u.displayModeBar=!0),"transparent"!==u.setBackground&&"function"==typeof u.setBackground||(u.setBackground=S),u._hasZeroHeight=u._hasZeroHeight||0===t.clientHeight,u.hasZeroWidth=u.hasZeroWidth||0===t.clientWidth;var f=u.scrollZoom,h=u.scrollZoom={};if(!0===f)h.cartesian=1,h.gl3d=1,h.geo=1,h.mapbox=1;else if("string"==typeof f){var p=f.split("+");for(i=0;i<p.length;i++)h[p[i]]=1}else!1!==f&&(h.gl3d=1,h.geo=1,h.mapbox=1)}function C(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function P(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error("all values in "+r+" must be integers");if(i>=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),P(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function I(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var a in P(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,u,c,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(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 D(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function z(t,r,n,i){t=o.getGraphDiv(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=.coerceTraceIndices(t,i),l=N(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&.clearAxisTypes(t,s,{});var f=[];c.fullReplot?f.push(e._doPlot):(f.push(h.previousPromises),h.supplyDefaults(t),c.markerSize&&(h.doCalcdata(t),H(f)),c.style&&f.push(w.doTraceStyle),c.colorbars&&f.push(w.doColorBars),f.push(M)),f.push(h.rehover,h.redrag,h.reselect),u.add(t,z,[t,l.undoit,l.traces],z,[t,l.redoit,l.traces]);var p=o.syncOrAsync(f,t);return p&&p.then||(p=Promise.resolve()),p.then((function(){return t.emit("plotly_restyle",l.eventData),t}))}function R(t){return void 0===t?null:t}function F(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){B((n||"")+r,i.get(),e,t),a(e)},i}:s}function B(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++)B(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)B(t+"."+h,u[h],c[h],n)}else void 0===n[t]&&(n[t]=R(e))}function N(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,d=F(i._preGUI,u),v=o.extendDeepAll({},e);j(e);var g,y=T.traceFlags(),m={},x={};function b(){return r.map((function(){}))}function w(t){var e=p.id2name(t);-1===g.indexOf(e)&&g.push(e)}function k(t){return"LAYOUT"+t+".autorange"}function A(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)&&!.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=d(t.layout,n.replace("LAYOUT",""));else{var c=r[o];s=F(i._tracePreGUI[M(c).fullInput.uid],u)(l[c],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=R(s.get())),void 0!==a&&s.set(a)}}function E(t){return function(e){return a[e][t]}}function L(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var C in e){if(.hasParent(e,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");var P,O,I,D,z,B,N=e[C];if("autobinx"!==C&&"autobiny"!==C||(C=C.charAt(C.length-1)+"bins",N=Array.isArray(N)?N.map(L(C)):!1===N?r.map(E(C)):null),m[C]=N,"LAYOUT"!==C.substr(0,6)){for(x[C]=b(),n=0;n<r.length;n++)if(P=l[r[n]],O=M(r[n]),D=(I=F(i._tracePreGUI[O.fullInput.uid],u)(P,C)).get(),void 0!==(z=Array.isArray(N)?N[n%N.length]:N)){var U=I.parts[I.parts.length-1],V=C.substr(0,C.length-U.length-1),H=V?V+".":"",q=V?s(O,V).get():O;if((B=f.getTraceValObject(O,I.parts))&&B.impliedEdits&&null!==z)for(var G in B.impliedEdits)S(o.relativeAttr(C,G),B.impliedEdits[G],n);else if("thicknessmode"!==U&&"lenmode"!==U||D===z||"fraction"!==z&&"pixels"!==z||!q){if("type"===C&&("pie"===z!=("pie"===D)||"funnelarea"===z!=("funnelarea"===D))){var Z="x",Y="y";"bar"!==z&&"bar"!==D||"h"!==P.orientation||(Z="y",Y="x"),o.swapAttrs(P,["?","?src"],"labels",Z),o.swapAttrs(P,["d?","?0"],"label",Z),o.swapAttrs(P,["?","?src"],"values",Y),"pie"===D||"funnelarea"===D?(s(P,"marker.color").set(s(P,"marker.colors").get()),i.pielayer.selectAll("g.trace").remove()):c.traceIs(P,"cartesian")&&s(P,"marker.colors").set(s(P,"marker.color").get())}}else{var W=i.size,X=q.orient,J="top"===X||"bottom"===X;if("thicknessmode"===U){var K=J?W.h:W.w;S(H+"thickness",q.thickness*("fraction"===z?1/K:K),n)}else{var $=J?W.w:W.h;S(H+"len",q.len*("fraction"===z?1/$:$),n)}}if(x[C][n]=R(D),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(C)){if("orientation"===C){I.set(z);var Q=P.x&&!P.y?"h":"v";if((I.get()||Q)===O.orientation)continue}else"orientationaxes"===C&&(P.orientation={v:"h",h:"v"}[O.orientation]);.swapXYData(P),y.calc=y.clearAxisTypes=!0}else-1!==h.dataArrayContainers.indexOf(I.parts[0])?(.manageArrayContainers(I,z,x),y.calc=!0):(B?B.arrayOk&&!c.traceIs(O,"regl")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(D))?y.calc=!0:T.update(y,B):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")&&(w(rt.xaxis||"x"),w(rt.yaxis||"y"))}S(g.map(k),!0,0),S(g.map(A),[0,1],0)}}else I=d(t.layout,C.replace("LAYOUT","")),x[C]=[R(I.get())],I.set(Array.isArray(N)?N[0]:N),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 j(t){var e,r,n,i=o.counterRegex("axis",".title",!1,!1),a=/colorbar.title$/,s=Object.keys(t);for(e=0;e<s.length;e++)r=s[e],n=t[r],"title"!==r&&!i.test(r)&&!a.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Y(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag,h.reselect),u.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if("axrange"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var u in l._matchGroup)if(u!==a){var c=n[p.id2name(u)];c.autorange=l.autorange,c.range=l.range.slice(),c._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i.matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(m,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9].range([[0|1]])?$/,G=/^[xyz]axis[0-9].autorange$/,Z=/^[xyz]axis[0-9].domain([[0|1]])?$/;function Y(t,e){var r,n,i,a=t.layout,l=t._fullLayout,u=l._guiEditing,h=F(l._preGUI,u),d=Object.keys(e),v=p.list(t),g=o.extendDeepAll({},e),y={};for(j(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+".":"",w=d[n].replace("allaxes",x+v[i].name);e[w]||(e[w]=e[d[n]])}delete e[d[n]]}var A=T.layoutFlags(),M={},S={};function E(t,r){if(Array.isArray(t))t.forEach((function(t){E(t,r)}));else if(!(t in e)&&!.hasParent(e,t)){var n=h(a,t);t in S||(S[t]=R(n.get())),void 0!==r&&n.set(r)}}var L,C={};function P(t){var e=p.name2id(t.split(".")[0]);return C[e]=1,e}for(var O in e){if(.hasParent(e,O))throw new Error("cannot set "+O+" and a parent attribute simultaneously");for(var I=h(a,O),D=e[O],z=I.parts.length-1;z>0&&"string"!=typeof I.parts[z];)z--;var B=I.parts[z],N=I.parts[z-1]+"."+B,U=I.parts.slice(0,z).join("."),V=s(t.layout,U).get(),H=s(l,U).get(),Y=I.get();if(void 0!==D){M[O]=D,S[O]="reverse"===B?D:R(Y);var X=f.getLayoutValObject(l,I.parts);if(X&&X.impliedEdits&&null!==D)for(var J in X.impliedEdits)E(o.relativeAttr(O,J),X.impliedEdits[J]);if(-1!==["width","height"].indexOf(O))if(D){E("autosize",null);var K="height"===O?"width":"height";E(K,l[K])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",D?null:l.width),E("height",D?null:l.height);else if(N.match(q))P(N),s(l,U+"._inputRange").set(null);else if(N.match(G)){P(N),s(l,U+"._inputRange").set(null);var $=s(l,U).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else N.match(Z)&&s(l,U+"._inputDomain").set(null);if("type"===B){L=V;var Q="linear"===H.type&&"log"===D,tt="log"===H.type&&"linear"===D;if(Q||tt){if(L&&L.range)if(H.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(U+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(rt)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,rt)))}else E(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,H,D,E),c.getComponentMethod("images","convertCoords")(t,H,D,E)}else E(U+".autorange",!0),E(U+".range",null);s(l,U+"._inputRange").set(null)}else if(B.match(k)){var nt=s(l,O).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,E),c.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=b.containerArrayMatch(O);if(at){r=at.array,n=at.index;var ot=at.property,st=X||{editType:"calc"};""!==n&&""===ot&&(b.isAddVal(D)?S[O]=null:b.isRemoveVal(D)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),T.update(A,st),y[r]||(y[r]={});var lt=y[r][n];lt||(lt=y[r][n]={}),lt[ot]=D,delete e[O]}else"reverse"===B?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):("dragmode"===O&&(!1===D&&!1!==Y||!1!==D&&!1===Y)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===D||"select"===D)&&"lasso"!==Y&&"select"!==Y||l._has("gl2d")?A.plot=!0:X?T.update(A,X):A.calc=!0,I.set(D))}}for(r in y)b.applyContainerArrayChanges(t,h(a,r),y[r],A,h)||(A.plot=!0);for(var ut in C){var ct=(L=p.getFromId(t,ut))&&L.constraintGroup;if(ct)for(var ft in A.calc=!0,ct)C[ft]||(p.getFromId(t,ft).constraintShrinkable=!0)}return(W(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:g}}function W(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 X(t,r,n,i){t=o.getGraphDiv(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=.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},r),a),l=s.flags,c=Y(t,o.extendFlat({},n)),f=c.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(e._doPlot):(p.push(h.previousPromises),V(t,f,c)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,c.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag,h.reselect),u.add(t,X,[t,s.undoit,c.undoit,s.traces],X,[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 J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d).((auto)?range|title.text)/},{pattern:/axis\d*.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*).camera/},{pattern:/^(geo\d*).(projection|center|fitbounds)/},{pattern:/^(ternary\d*.[abc]axis).(min|title.text)$/},{pattern:/^(polar\d*.radialaxis).((auto)?range|angle|title.text)/},{pattern:/^(polar\d*.angularaxis).rotation/},{pattern:/^(mapbox\d*).(center|zoom|bearing|pitch)/},{pattern:/^legend.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title.text$/,attr:"editrevision"}],$=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions[\d+].constraintrange/},{pattern:/^node.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value.)name$/},{pattern:/colorbar.title.text$/},{pattern:/colorbar.(x|y)$/,attr:"editrevision"}];function Q(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function tt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r<e.length;r++)if(e[r].fullInput.uid===t)return r;return-1}function rt(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function nt(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function it(t,e,r,n){var i,a,l,u=n.getValObject,c=n.flags,f=n.immutable,h=n.inArray,p=n.arrayIndex;function d(){var t=i.editType;h&&-1!==t.indexOf("arraydraw")?o.pushUnique(c.arrays[h],p):(T.update(c,i),"none"!==t&&c.nChanges++,n.transition&&i.anim&&c.nChangesAnim++,(q.test(l)||G.test(l))&&(c.rangesAltered[r[0]]=1),Z.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),k=Array.isArray(g),A=Array.isArray(y);if(k&&A){var M="input"+a,S=t[M],E=e[M];if(Array.isArray(S)&&S===E)continue}if(void 0===y)w&&k?c.calc=!0:d();else if(i.isLinkedToArray){var L=[],C=!1;h||(c.arrays[a]=L);var P=Math.min(g.length,y.length),O=Math.max(g.length,y.length);if(P!==O){if("arraydraw"!==i.editType){d();continue}C=!0}for(b=0;b<P;b++)it(g[b],y[b],m.concat(b),o.extendFlat({inArray:a,arrayIndex:b},n));if(C)for(b=P;b<O;b++)L.push(b)}else!&&o.isPlainObject(g)?it(g,y,m,n):w?k&&A?(f&&(c.calc=!0),(f||n.newDataRevision)&&d()):k!==A?c.calc=!0:d():k&&A&&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 at(t,e){var r;for(r in t)if(""!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(at(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(at(n[a],i[a]))return!0}}}}function ot(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]n[0][0]+n[0][1]n[0][1]+n[0][2]n[0][2]),e.invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]n[1][2]),e._lastBBox=r}}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,.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 w=t._fullLayout._currentFrame;if(w&&r.fromcurrent){var T=-1;for(p=0;p<y.length;p++)if("byname"===(d=y[p]).type&&d.name===w){T=p;break}if(T>0&&T<y.length-1){var k=[];for(p=0;p<y.length;p++)d=y[p],("byname"!==y[p].type||p>T)&&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+2e.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&&A<5&&(A++,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===A&&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],M=[t,x];return u&&u.add(t,w,k,T,M),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)})),.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{O(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]),P(r,n,"indices"),(n=C(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){function s(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=D(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var u=r-e.length,c=t.length-u;n.set(t.subarray(c)),n.set(e,u),i.set(t.subarray(0,c))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]}var l=I(r=o.getGraphDiv(r),n,i,a,s),c=e.redraw(r),f=[r,l.update,i,l.maxPoints];return u.add(r,e.prependTraces,f,t,arguments),c},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(O(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=C(n,r.data.length-1),i=C(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){function s(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=D(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var u=r-e.length;n.set(e),n.set(t.subarray(0,u),e.length),i.set(t.subarray(u))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]}var l=I(r=o.getGraphDiv(r),n,i,a,s),c=e.redraw(r),f=[r,l.update,i,l.maxPoints];return u.add(r,e.extendTraces,f,t,arguments),c},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),L(t,a),i||(i={}),n.select(t).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(t.promises)||(t.promises=[]);var f=0===(t.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(.cleanData(r),f?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!f||(t.layout=.cleanLayout(i)),h.supplyDefaults(t);var v=t._fullLayout,m=v._has("cartesian");v._replotting=!0,(f||v._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=ot,r._calcInverseTransform(t),r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};n.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(y.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),v._shouldCreateBgLayer&&delete v._shouldCreateBgLayer),d.initGradients(t),d.initPatterns(t),f&&p.saveShowSpikeInitial(t);var x=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;x&&h.doCalcdata(t);for(var b=0;b<t.calcdata.length;b++)t.calcdata[b][0].trace=t._fullData[b];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||h.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var T=o.extendFlat({},v._size),k=0;function A(){if(h.clearAutoMarginIds(t),w.drawMarginPushers(t),p.allowAutoMargin(t),v._has("pie"))for(var e=t._fullData,r=0;r<e.length;r++){var n=e[r];"pie"===n.type&&n.automargin&&h.allowAutoMargin(t,"pie."+n.uid+".automargin")}return h.doAutoMargin(t),h.previousPromises(t)}function S(){t._transitioning||(w.doAutoRangeAndConstraints(t),f&&p.saveRangeInitial(t),c.getComponentMethod("rangeslider","calcAutorange")(t))}var E=[h.previousPromises,function(){if(s)return e.addFrames(t,s)},function e(){for(var r=v._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!v._glcanvas&&v._has("gl")&&(v._glcanvas=v._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})),v._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(v._glcanvas){v._glcanvas.attr("width",v.widthi).attr("height",v.heighti).style("width",v.width+"px").style("height",v.height+"px");var a=v._glcanvas.data()[0].regl;if(a&&(Math.floor(v.widthi)!==a._gl.drawingBufferWidth||Math.floor(v.heighti)!==a._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!k)return o.log(s+" Clearing graph and plotting again."),h.cleanPlot([],{},t._fullData,v),h.supplyDefaults(t),v=t._fullLayout,h.doCalcdata(t),k++,e();o.error(s)}}return"h"===v.modebar.orientation?v._modebardiv.style("height",null).style("width","100%"):v._modebardiv.style("width",null).style("height",v.height+"px"),h.previousPromises(t)},A,function(){if(h.didMarginChange(T,v._size))return o.syncOrAsync([A,w.layoutStyles],t)}];m&&E.push((function(){if(x)return o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),S],t);S()})),E.push(w.layoutStyles),m&&E.push((function(){return p.draw(t,f?"":"redraw")}),(function(t){t._fullLayout._insideTickLabelsAutorange&&U(t,t._fullLayout._insideTickLabelsAutorange).then((function(){t._fullLayout._insideTickLabelsAutorange=void 0}))})),E.push(w.drawData,w.finalDraw,g,h.addLinks,h.rehover,h.redrag,h.reselect,h.doAutoMargin,(function(t){t._fullLayout._insideTickLabelsAutorange&&f&&p.saveRangeInitial(t,!0)}),h.previousPromises);var C=o.syncOrAsync(E,t);return C&&C.then||(C=Promise.resolve()),C.then((function(){return M(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),.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,L(t,i),v=at(g,t.context)}t.data=r||[],.cleanData(t.data),t.layout=n||{},.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=Q(i,K)){if(d=c.head,v=c.tail,a=c.attr||d+".uirevision",(u=(l=s(n,a).get())&&tt(a,e))&&u===l){if(null===(f=g[i])&&(f=void 0),nt(p=(h=s(e,i)).get(),f)){void 0===p&&"autorange"===v&&y.push(d),h.set(R(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(R(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],P=null;for(i in C){if(!P){var O=et(E,r);if(O<0){delete S[E];break}var I=rt(E,t,(L=r[O]._fullInput).index);if(I<0){delete S[E];break}P=t[I]}if(c=Q(i,$)){if(c.attr?u=(l=s(n,c.attr).get())&&tt(c.attr,e):(l=L.uirevision,void 0===(u=P.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(f=C[i])&&(f=void 0),nt(p=(h=s(P,i)).get(),f))){h.set(R(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,k=function(t,e,r,n,i){var a=T.layoutFlags();return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,it(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),A=k.newDataRevision,S=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,u=T.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,it(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,A);if(W(t)&&(k.layoutReplot=!0),S.calc||k.calc){t.calcdata=void 0;for(var E=Object.getOwnPropertyNames(m),C=0;C<E.length;C++){var P=E[C],O=P.substring(0,5);if("xaxis"===O||"yaxis"===O){var I=m[P]._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&&(S.anim||k.anim))k.ticks&&D.push(w.doTicksRelayout),h.doCalcdata(t),w.doAutoRangeAndConstraints(t),D.push((function(){return h.transitionFromReact(t,S,k,p)}));else if(S.fullReplot||k.layoutReplot||v)t._fullLayout._skipDefaults=!0,D.push(e._doPlot);else{for(var z in k.arrays){var F=k.arrays[z];if(F.length){var B=c.getComponentMethod(z,"drawOne");if(B!==o.noop)for(var N=0;N<F.length;N++)B(t,F[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),S.style&&D.push(w.doTraceStyle),(S.colorbars||k.colorbars)&&D.push(w.doColorBars),k.legend&&D.push(w.doLegend),k.layoutstyle&&D.push(w.layoutStyles),k.axrange&&H(D),k.ticks&&D.push(w.doTicksRelayout),k.modebar&&D.push(w.doModeBar),k.camera&&D.push(w.doCamera),D.push(M)}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 .cleanData(t.data),.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=U,e.restyle=z,e.setPlotConfig=function(t){return o.extendFlat(x,t)},e.update=X,e._guiRelayout=J(U),e._guiRestyle=J(z),e._guiUpdate=J(X),e._storeDirectGUIEdit=function(t,e,r){for(var n in r)B(n,s(t,n).get(),r[n],e)}},72075: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}},86281:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(9012),o=r(10820),s=r(31391),l=r(85594),u=r(72075).configAttributes,c=r(30962),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._isLinkedToArray;n&&(delete t._isLinkedToArray,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._isSubplotObj=!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)}},44467:function(t,e,r){"use strict";var n=r(71828),i=r(9012),a={name:{valType:"string",editType:"none"}};function o(t){return t&&"string"==typeof t}function s(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}a.templateitemname={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=a.name,e.templateitemname=a.templateitemname,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[s(e)],a=n&&n[e];Array.isArray(a)&&a.length||(a=[]);var l={};return{newItem:function(t){var e={name:t.name,_input:t},n=e.templateitemname=t.templateitemname;if(!o(n))return e._template=i,e;for(var s=0;s<a.length;s++){var u=a[s];if(u.name===n)return l[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<a.length;e++){var r=a[e],n=r.name;if(o(n)&&!l[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i.templateitemname=r.templateitemname,t.push(i),l[n]=1}}return t}}},e.arrayDefaultKey=s,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,a=r._index,o=a>=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+"["+a+"]";function u(){s={},o&&(s[l]={},s[l].templateitemname=o)}function c(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return u(),t}return u(),{modifyBase:function(t,e){s[t]=e},modifyItem:c,getUpdateObj:f,applyUpdate:function(e,r){e&&c(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},61549:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(74875),o=r(71828),s=r(33306),l=r(7901),u=r(91424),c=r(92998),f=r(64168),h=r(89298),p=r(18783),d=r(99082),v=d.enforce,g=d.clean,y=r(71739).doAutoRange,m="start";function x(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}function b(t){var r,i,s,c,d,v,g=t._fullLayout,y=g._size,m=y.p,b=h.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(u.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),f.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<b.length;r++){var k=(c=b[r])._anchorAxis;c._linepositions={},c._lw=u.crispRound(t,c.linewidth,1),c._mainLinePosition=w(c,k,c.side),c._mainMirrorPosition=c.mirror&&k?w(c,k,p.OPPOSITE_SIDE[c.side]):null}var A=[],M=[],S=[],E=1===l.opacity(g.paper_bgcolor)&&1===l.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 L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(x(L,C,S)){var O=P.node(),I=s.bg=o.ensureSingle(P,"rect","bg");O.insertBefore(I.node(),O.childNodes[0]),M.push(i)}else P.select("rect.bg").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var D,z,R,F,B,N,j,U,V,H,q,G,Z,Y=g._bgLayer.selectAll(".bg").data(A);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each((function(t){g._plots[t].bg=n.select(this)})),r=0;r<M.length;r++)s=g._plots[M[r]],d=s.xaxis,v=s.yaxis,s.bg&&void 0!==d._offset&&void 0!==v._offset&&s.bg.call(u.setRect,d._offset-m,v._offset-m,d._length+2m,v._length+2m).call(l.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(i in g._plots){s=g._plots[i],d=s.xaxis,v=s.yaxis;var W,X,J=s.clipId="clip"+g._uid+i+"plot",K=o.ensureSingleById(g._clips,"clipPath",J,(function(t){t.classed("plotclip",!0).append("rect")}));s.clipRect=K.select("rect").attr({width:d._length,height:v._length}),u.setTranslate(s.plot,d._offset,v._offset),s._hasClipOnAxisFalse?(W=null,X=J):(W=J,X=null),u.setClipUrl(s.plot,W,t),s.layerClipId=X}function $(t){return"M"+D+","+t+"H"+z}function Q(t){return"M"+d._offset+","+t+"h"+d._length}function tt(t){return"M"+t+","+U+"V"+j}function et(t){return void 0!==v._shift&&(t+=v._shift),"M"+t+","+v._offset+"v"+v._length}function rt(t,e,r){if(!t.showline||i!==t._mainSubplot)return"";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in g._plots){s=g.plots[i],d=s.xaxis,v=s.yaxis;var nt="M0,0";(d,i)&&(B=T(d,"left",v,b),D=d._offset-(B?m+B:0),N=T(d,"right",v,b),z=d._offset+d._length+(N?m+N:0),R=w(d,v,"bottom"),F=w(d,v,"top"),!(Z=!d._anchorAxis||i!==d._mainSubplot)||"allticks"!==d.mirror&&"all"!==d.mirror||(d._linepositions[i]=[R,F]),nt=rt(d,$,Q),Z&&d.showline&&("all"===d.mirror||"allticks"===d.mirror)&&(nt+=$(R)+$(F)),s.xlines.style("stroke-width",d.lw+"px").call(l.stroke,d.showline?d.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",nt);var it="M0,0";(v,i)&&(q=T(v,"bottom",d,b),j=v._offset+v._length+(q?m:0),G=T(v,"top",d,b),U=v._offset-(G?m:0),V=w(v,d,"left"),H=w(v,d,"right"),!(Z=!v._anchorAxis||i!==v._mainSubplot)||"allticks"!==v.mirror&&"all"!==v.mirror||(v._linepositions[i]=[V,H]),it=rt(v,tt,et),Z&&v.showline&&("all"===v.mirror||"allticks"===v.mirror)&&(it+=tt(V)+tt(H)),s.ylines.style("stroke-width",v._lw+"px").call(l.stroke,v.showline?v.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",it)}return h.makeClipPaths(t),a.previousPromises(t)}function _(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||"all"===t.mirror||"allticks"===t.mirror)}function w(t,e,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=p.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function T(t,e,r,n){if(w(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&w(t,e,a))return a._lw}return 0}function k(t,e){var r=t.title,n=t._size,i=0;return e===m?i=r.pad.l:"end"===e&&(i=-r.pad.r),"paper"===r.xref?n.l+n.wr.x+i:t.widthr.x+i}function A(t,e){var r=t.title,n=t._size,i=0;return"0em"!==e&&e?e===p.CAP_SHIFT+"em"&&(i=r.pad.t):i=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.hr.y+i:t.height-t.heightr.y+i}e.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,b],t)},e.drawMainTitle=function(t){var e=t._fullLayout,r=function(t){var e=t.title,r="middle";return o.isRightAnchor(e)?r="end":o.isLeftAnchor(e)&&(r=m),r}(e),n=function(t){var e=t.title,r="0em";return o.isTopAnchor(e)?r=p.CAP_SHIFT+"em":o.isMiddleAnchor(e)&&(r=p.MID_SHIFT+"em"),r}(e);c.draw(t,"gtitle",{propContainer:e,propName:"title.text",placeholder:e._dfltTitle.plot,attributes:{x:k(e,r),y:A(e,n),"text-anchor":r,dy:n}})},e.doTraceStyle=function(t){var r,n=t.calcdata,o=[];for(r=0;r<n.length;r++){var l=n[r],u=l[0]||{},c=u.trace||{},f=c._module||{},h=f.arraysToCalcdata;h&&h(l,c);var p=f.editStyle;p&&o.push({fn:p,cd0:u})}if(o.length){for(r=0;r<o.length;r++){var d=o[r];d.fn(t,d.cd0)}s(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 h.draw(t,"redraw"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),s(t),e.redrawReglTraces(t)),e.drawMainTitle(t),a.previousPromises(t)},e.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},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;s(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=h.list(t,"",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e.id]=1,g(t,e),y(t,e);var a=e.matchGroup;if(a)for(var o in a){var s=h.getFromId(t,o);y(t,s,e.range),n[o]=1}}v(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)}},96318:function(t,e,r){"use strict";var n=r(71828),i=n.isPlainObject,a=r(86281),o=r(74875),s=r(9012),l=r(44467),u=r(72075).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)}},403:function(t,e,r){"use strict";var n=r(92770),i=r(72391),a=r(74875),o=r(71828),s=r(25095),l=r(5900),u=r(70942),c=r(11506).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)}))}))}},84936:function(t,e,r){"use strict";var n=r(71828),i=r(74875),a=r(86281),o=r(72075).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var p=f[h];if("transforms"!==p){var y=o.slice();y.push(p);var m=t[p],x=e[p],b=g(r,p),=(b||{}).valType,w="info_array"===,T="colorscale"===,k=(b||{}).items;if(v(r,p))if(s(m)&&s(x)&&"any"!==)c(m,x,b,i,a,y);else if(w&&l(m)){m.length>x.length&&i.push(d("unused",a,y.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(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(d("unused",a,y.concat(M,x[M].length)));var O=x[M].length;for(A=0;A<(P?Math.min(O,k[M].length):O);A++)S=P?k[M][A]:k,E=m[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d("dynamic",a,y.concat(M,A),E,L)):i.push(d("value",a,y.concat(M,A),E))}else i.push(d("array",a,y.concat(M),m[M]));else for(M=0;M<C;M++)S=P?k[M]:k,E=m[M],L=x[M],n.validate(E,S)?L!==E&&L!==+E&&i.push(d("dynamic",a,y.concat(M),E,L)):i.push(d("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(d("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(d("unused",a,D)):i.push(d("object",a,D,m[I]))}else!s(m)&&s(x)?i.push(d("object",a,y,m)):u(m)||!u(x)||w||T?p in e?n.validate(m,b)?"enumerated"===b.valType&&(b.coerceNumber&&m!==+x||m!==x)&&i.push(d("dynamic",a,y,m,x)):i.push(d("value",a,y,m)):i.push(d("unused",a,y,m)):i.push(d("array",a,y,m));else i.push(d("schema",a,y))}}return i}function f(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}t.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,u,h=a.get(),p=[],v={context:n.extendFlat({},o)};l(t)?(v.data=n.extendDeep([],t),r=t):(v.data=[],r=[],p.push(d("array","data"))),s(e)?(v.layout=n.extendDeep({},e),u=e):(v.layout={},u={},arguments.length>1&&p.push(d("object","layout"))),i.supplyDefaults(v);for(var g=v.fullData,y=r.length,m=0;m<y;m++){var x=r[m],b=["data",m];if(s(x)){var =g[m],w=.type,T=h.traces[w].attributes;T.type={valType:"enumerated",values:[w]},!1===.visible&&!1!==x.visible&&p.push(d("invisible",b)),c(x,,T,p,b);var k=x.transforms,A=.transforms;if(k){l(k)||p.push(d("array",b,["transforms"])),b.push("transforms");for(var M=0;M<k.length;M++){var S=["transforms",M],E=k[M].type;if(s(k[M])){var L=h.transforms[E]?h.transforms[E].attributes:{};L.type={valType:"enumerated",values:Object.keys(h.transforms)},c(k[M],A[M],L,p,b,S)}else p.push(d("object",b,S))}}}else p.push(d("object",b))}var C=v.fullLayout,P=f(h,g);return c(u,C,P,p,"layout"),0===p.length?void 0:p};var h={object:function(t,e){return("layout"===t&&""===e?"The layout argument":"data"===t[0]&&""===e?"Trace "+t[1]+" in the data argument":p(t)+"key "+e)+" must be linked to an object container"},array:function(t,e){return("data"===t?"The data argument":p(t)+"key "+e)+" must be linked to an array container"},schema:function(t,e){return p(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var n=s(r)?"container":"key";return p(t)+n+" "+e+" did not get coerced"},dynamic:function(t,e,r,n){return[p(t)+"key",e,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?p(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[p(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function p(t){return l(t)?"In data trace "+t[1]+", ":"In "+t+", "}function d(t,e,r,i,a){var o,s;r=r||"",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var u=function(t){if(!l(t))return String(t);for(var e="",r=0;r<t.length;r++){var n=t[r];"number"==typeof n?e=e.substr(0,e.length-1)+"["+n+"]":e+=n,r<t.length-1&&(e+=".")}return e}(r),c=ht;return n.log(c),{code:t,container:o,trace:s,path:r,astr:u,msg:c}}function v(t,e){var r=m(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n].isSubplotObj&&i)||e in t}function g(t,e){return e in t?t[e]:t[m(e).keyMinusId]}var y=n.counterRegex("([a-z]+)");function m(t){var e=t.match(y);return{keyMinusId:e&&e[1],id:e&&e[2]}}},85594: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"}}}},85501:function(t,e,r){"use strict";var n=r(71828),i=r(44467);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}},9012:function(t,e,r){"use strict";var n=r(41940),i=r(77914);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"},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"}}},42973:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=i.dateTime2ms,o=i.incrementMonth,s=r(50606).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)/(us)),k=o(g,uw,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}}},89502:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(71828),o=r(50606).FP_SAFE,s=r(73972),l=r(91424),u=r(41675),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=v(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,g=f[0].val;for(r=1;r<c.length&&h===g;r++)h=Math.min(h,c[r].val);for(r=1;r<f.length&&h===g;r++)g=Math.max(g,f[r].val);var y=!1;if(e.range){var m=a.simpleMap(e.range,e.r2l);y=m[1]<m[0]}"reversed"===e.autorange&&(y=!0,e.autorange=!0);var x,b,,w,T,k,A=e.rangemode,M="tozero"===A,S="nonnegative"===A,E=e.length,L=E/10,C=0;for(r=0;r<c.length;r++)for(x=c[r],n=0;n<f.length;n++)(k=(b=f[n]).val-x.val-p(e,x.val,b.val))>0&&((T=E-s(x)-l(b))>L?k/T>C&&(=x,w=b,C=k/T):k/E>C&&(={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===g){var P=h-1,O=h+1;if(M)if(0===h)i=[0,1];else{var I=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),D=h/(1-Math.min(.5,I/E));i=h>0?[0,D]:[D,0]}else i=S?[Math.max(0,P),Math.max(1,O)]:[P,O]}else M?(.val>=0&&(={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(.val-C*s()<0&&(={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-.val-p(e,x.val,b.val))/(E-s()-l(w)),i=[.val-C*s(),w.val+Cl(w)];return y&&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=.05e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var s="reversed"===e.autorange;if(!s){var u=a.simpleMap(e.range,e.r2l);s=u[1]<u[0]}s&&(r=!r)}var c=0;return f(t,e._id)||(c=function(t,e,r){var i=0,o="x"===e._id.charAt(0);for(var s in t._plots){var u=t._plots[s];if(e._id===u.xaxis._id||e._id===u.yaxis._id){var c=(o?u.yaxis:u.xaxis)||{};if(-1!==(c.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===c.side||"bottom"===c.side)||r&&("top"===c.side||"right"===c.side))){if(c._vals){var f=a.deg2rad(c._tickAngles[c._id+"tick"]||0),h=Math.abs(Math.cos(f)),p=Math.abs(Math.sin(f));if(!c._vals[0].bb){var d=c._id+"tick";c._selections[d].each((function(t){var e=n.select(this);e.select(".text-math-group").empty()&&(t.bb=l.bBox(e.node()))}))}for(var v=0;v<c._vals.length;v++){var g=c._vals[v].bb;if(g){var y=6+g.width,m=6+g.height;i=Math.max(i,o?Math.max(yh,mp):Math.max(mh,yp))}}}"inside"===c.ticks&&"inside"===c.ticklabelposition&&(i+=c.ticklen||0)}}}return i}(t,e,r)),i=Math.max(c,i),"domain"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:c)}}function v(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],g(u,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],y(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),m=v(t,d,!0),x=e._length/d.length;for(i=0;i<m.min.length;i++)a=m.min[i],g(u,a.val,a.padx,{extrapad:a.extrapad});for(i=0;i<m.max.length;i++)a=m.max[i],y(f,a.val,a.padx,{extrapad:a.extrapad})}return{min:u,max:f}}function g(t,e,r,n){m(t,e,r,n,b)}function y(t,e,r,n){m(t,e,r,n,)}function m(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function x(t){return i(t)&&Math.abs(t)<o}function b(t,e){return t<=e}function _(t,e){return t>=e}t.exports={getAutoRange:h,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():h(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,s.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=h(t,e)),o._input.rangeslider[e.name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t.m||t.setScale();var n,a,s,l,u,c,f,h,p,d=[],v=[],m=e.length,b=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<m;n++)(a=e[n])<h&&a>0&&(h=a),a>p&&a<o&&(p=a);else for(n=0;n<m;n++)(a=e[n])<h&&a>-o&&(h=a),a>p&&a<o&&(p=a);e=[h,p],m=2}var C={tozero:,extrapad:b};function P(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)),x(l)&&g(d,l,f,C),x(u)&&y(v,u,c,C))}var O=Math.min(6,m);for(n=0;n<O;n++)P(n);for(n=m-1;n>=O;n--)P(n);return{min:d,max:v,opts:r}},concatExtremes:v}},89298:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(74875),o=r(73972),s=r(71828),l=s.strTranslate,u=r(63893),c=r(92998),f=r(7901),h=r(91424),p=r(13838),d=r(66287),v=r(50606),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,P=v.MINUS_SIGN,O=v.BADNUM,I={K:"zeroline"},D={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},R={K:"tick",L:"path"},F={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=r(18783),j=N.MID_SHIFT,U=N.CAP_SHIFT,V=N.LINE_SPACING,H=N.OPPOSITE_SIDE,q=t.exports={};q.setConvert=r(21994);var G=r(4322),Z=r(41675),Y=Z.idSort,W=Z.isLinked;q.id2name=Z.id2name,q.name2id=Z.name2id,q.cleanId=Z.cleanId,q.list=Z.list,q.listIds=Z.listIds,q.getFromId=Z.getFromId,q.getFromTrace=Z.getFromTrace;var X=r(71739);function J(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.getAutoRange=X.getAutoRange,q.findExtremes=X.findExtremes,q.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,c,u)},q.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},q.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==q.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=q.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},q.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;c<e.length;c++)for(var f=r[q.id2name(e[c])][a],h=0;h<f.length;h++){var p=f[h];if(!u[p]&&(l(t,p),u[p]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var K=q.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(Array.isArray(a)){if(i={type:G(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},q.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=q.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===a?{d2c:Q,c2d:Q}:{d2c:$,c2d:$}};function $(t){return+t}function Q(t){return String(t)}function tt(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function et(t,e){return Math.abs(t/e-1)<.001}function rt(t){return+t.substring(1)}function nt(t,e){return t.rangebreaks&&(e=e.filter((function(e){return t.maskBreaks(e.x)!==O}))),e}function it(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=q.tickText(t,a);e._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return nt(t,r)}function at(t){var e=J(s.simpleMap(t.range,t.r2l)),r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]),i="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var a=[],o=0;o<=1;o++)if(!o||t.minor){var l=o?t.minor.tickvals:t.tickvals,u=o?[]:t.ticktext;if(l){Array.isArray(u)||(u=[]);for(var c=0;c<l.length;c++){var f=i(l[c]);if(f>r&&f<n){var h=void 0===u[c]?q.tickText(t,f):vt(t,f,String(u[c]));o&&(h.minor=!0,h.text=""),a.push(h)}}}}return nt(t,a)}q.getDataToCoordFunc=function(t,e,r,n){return K(t,e,r,n).d2c},q.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},q.minDtick=function(t,e,r,n){-1===["log","category","multicategory"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial,s=o||!(a.range[0]===a._rangeInitial[0]&&a.range[1]===a._rangeInitial[1]);(o&&!1===a.autorange||e&&s)&&(a._rangeInitial=a.range.slice(),n=!0)}return n},q.saveShowSpikeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==i||o.showspikes||(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,n},q.autoBin=function(t,e,r,n,a,o){var l,u=s.aggNums(Math.min,null,t),c=s.aggNums(Math.max,null,t);if("category"===e.type||"multicategory"===e.type)return{start:u-.5,end:c+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:c-u};if(a||(a=e.calendar),l="log"===e.type?{type:"linear",range:[u,c]}:{type:e.type,range:s.simpleMap([u,c],e.c2r,0,a),calendar:a},q.setConvert(l),o=o&&d.dtick(o,l.type))l.dtick=o,l.tick0=d.tick0(void 0,l.type,a);else{var f;if(r)f=(c-u)/r;else{var h=s.distinctVals(t),p=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),v=ps.roundUp(h.minDiff/p,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}q.autoTicks(l,f)}var g,y=l.dtick,m=q.tickIncrement(q.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-.5r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1h&&(o>.3h||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=q.tickIncrement(t,"M6","reverse")+1.5M:a.exactMonths>.8?t=q.tickIncrement(t,"M1","reverse")+15.5M:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(m,t,y,u,a)),g=m;g<=c;)g=q.tickIncrement(g,y,!1,a);return{start:e.c2r(m,0,a),end:e.c2r(g,0,a),size:y,_dataSpan:c-u}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99o+.01e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8l[0]+.2l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),a){var u=i(e.dtick),c=i(t.dtick),f=u?e.dtick:+e.dtick.substring(1),h=c?t.dtick:+t.dtick.substring(1);u&&c?tt(f,h)?f===2A&&h===2M&&(t.dtick=A):f===2A&&h===3M?t.dtick=A:f!==A||(e._input.minor||{}).nticks?et(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=M:"M"===String(e.dtick).charAt(0)?c?t.dtick="M1":tt(f,h)?f>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?tt(f,h)||(t.dtick=et(f/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=q.getTickFormat(t);if(a){var o=t.dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick<E&&(t.dtick=E)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=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?rt(t.dtick)<1:t.dtick<k)&&(t.dtick="M1")):/%[q]/.test(a)?(e=b,o&&(n?rt(t.dtick)<3:t.dtick<)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=y,o&&(n?rt(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),dt(t)},q.calcTicks=function(t,e){for(var r,n,a=t.type,o=t.calendar,l=t.ticklabelstep,u="period"===t.ticklabelmode,c=s.simpleMap(t.range,t.r2l,void 0,void 0,e),f=c[1]<c[0],h=Math.min(c[0],c[1]),p=Math.max(c[0],c[1]),d=Math.max(1e3,t._length||0),v=[],L=[],C=[],P=[],I=t.minor&&(t.minor.ticks||t.minor.showgrid),D=1;D>=(I?0:1);D--){var z=!D;D?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var R=D?t:s.extendFlat({},t,t.minor);if(z?q.prepMinorTicks(R,t,e):q.prepTicks(R,e),"array"!==R.tickmode)if("sync"!==R.tickmode){var F=J(c),B=F[0],N=F[1],j=i(R.dtick),U="log"===a&&!(j||"L"===R.dtick.charAt(0)),V=q.tickFirst(R,e);if(D){if(t._tmin=V,V<B!==f)break;"category"!==a&&"multicategory"!==a||(N=f?Math.max(-.5,N):Math.min(t._categories.length-.5,N))}var H,G,Z=null,Y=V;D&&(j?G=t.dtick:"date"===a?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(G=Tt.dtick.substring(1)):G=t.roughDTick,H=Math.round((t.r2l(Y)-t.r2l(t.tick0))/G)-1);var W=R.dtick;for(R.rangebreaks&&R.tick0Init!==R.tick0&&(Y=Dt(Y,t),f||(Y=q.tickIncrement(Y,W,!f,o))),D&&u&&(Y=q.tickIncrement(Y,W,!f,o),H--);f?Y>=N:Y<=N;Y=q.tickIncrement(Y,W,f,o)){if(D&&H++,R.rangebreaks&&!f){if(Y<B)continue;if(R.maskBreaks(Y)===O&&Dt(Y,R)>=p)break}if(C.length>d||Y===Z)break;Z=Y;var X={value:Y};D?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&H%l&&(X.skipLabel=!0),C.push(X)):(X.minor=!0,P.push(X))}}else C=[],v=it(t);else D?(C=[],v=at(t)):(P=[],L=at(t))}if(I&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var K=C.map((function(t){return t.value})),$=[],Q=0;Q<P.length;Q++){var tt=P[Q],et=tt.value;if(-1===K.indexOf(et)){for(var rt=!1,nt=0;!rt&&nt<C.length;nt++)1e7+C[nt].value===1e7+et&&(rt=!0);rt||$.push(tt)}}P=$}if(u&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),f=r||c,h=0;f>=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)+Lp)!==O&&d++}(h=d/84)||(t[n].drop=!0),s&&c>A&&(h=c)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(C,t,t._definedDelta),t.rangebreaks){var ot="y"===t._id.charAt(0),st=1;"auto"===t.tickmode&&(st=t.tickfont?t.tickfont.size:12);var lt=NaN;for(r=C.length-1;r>-1;r--)if(C[r].drop)C.splice(r,1);else{C[r].value=Dt(C[r].value,t);var ut=t.c2p(C[r].value);(ot?lt>ut-st:lt<ut+st)?C.splice(f?r+1:r,1):lt=ut}}It(t)&&360===Math.abs(c[1]-c[0])&&C.pop(),t._tmax=(C[C.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var ct,ft,ht=function(e){e.text="",t._prevDateHead=n};for(C=C.concat(P),r=0;r<C.length;r++){var pt=C[r].minor,dt=C[r].value;pt?L.push({x:dt,minor:!0}):(n=t._prevDateHead,ct=q.tickText(t,dt,!1,C[r].simpleLabel),void 0!==(ft=C[r].periodX)&&(ct.periodX=ft,(ft>p||ft<h)&&(ft>p&&(ct.periodX=p),ft<h&&(ct.periodX=h),ht(ct))),C[r].skipLabel&&ht(ct),v.push(ct))}return v=v.concat(L),t._inCalcTicks=!1,u&&v.length&&(v[0].noTick=!0),v};var ot=[2,5,10],st=[1,2,3,6,12],lt=[1,2,5,10,15,30],ut=[1,2,3,7,14],ct=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],ft=[-.301,0,.301,.699,1],ht=[15,30,45,90,180];function pt(t,e,r){return es.roundUp(t/e,r)}function dt(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>=15M)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&&(yt(t.exponentformat)&&!mt(u)?t.tickexponent=3Math.round((u-1)/3):t._tickexponent=u)}else t._tickround=null}function vt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}q.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2e;if(o>y)e/=y,n=a(10),t.dtick="M"+12pt(e,n,ot);else if(o>T)e/=T,t.dtick="M"+pt(e,1,st);else if(o>M){if(t.dtick=pt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ut),!r){var l=q.getTickFormat(t),u="period"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=pt(e,E,st):o>L?t.dtick=pt(e,L,lt):o>C?t.dtick=pt(e,C,lt):(n=a(10),t.dtick=pt(e,n,ot))}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.5Math.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"+pt(e,n,ot)}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))):It(t)?(t.tick0=0,n=1,t.dtick=pt(e,n,ht)):(t.tick0=0,n=a(10),t.dtick=pt(e,n,ot));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},q.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,oe);var l=e.charAt(0),u=oNumber(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?ft:ct,f=t+.01o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,u=J(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=q.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=q.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?ft:ct,=s.roundUp(s.mod(u,1),b,o);return Math.floor(u)+Math.log(n.round(Math.pow(10,),1))/Math.LN10}throw"unrecognized dtick "+String(c)},q.tickText=function(t,e,r,n){var a,o=vt(t,e),l="array"===t.tickmode,u=r||l,c=t.type,f="category"===c?t.d2l_noadd:t.d2l;if(l&&Array.isArray(t.ticktext)){var h=s.simpleMap(t.range,t.r2l),p=(Math.abs(h[1]-h[0])-(t._lBreaks||0))/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-f(t.tickvals[a]))<p);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o}function d(n){if(void 0===n)return!0;if(r)return"none"===n;var i={first:t._tmin,last:t._tmax}[n];return"all"!==n&&e!==i}var v=r?"never":"none"!==t.exponentformat&&d(t.showexponent)?"hide":"";if("date"===c?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||q.getTickFormat(t);n&&(a=i(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var l,u=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),c=u.indexOf("\n");if(-1!==c&&(l=u.substr(c+1),u=u.substr(0,c)),n&&("00:00:00"===u||"00:00"===u?(u=l,l=""):8===u.length&&(u=u.replace(/:00$/,""))),l)if(r)"d"===a?u+=", "+l:u=l+(u?", "+u:"");else if(t._inCalcTicks&&t._prevDateHead===l){var f=zt(t),h=t._trueSide||t.side;(!f&&"top"===h||f&&"bottom"===h)&&(u+="
")}else t._prevDateHead=l,u+="
"+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=xt(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||yt(p)&&mt(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":P)+h:(e.text=xt(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,v):"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):It(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=xt(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(tr)/r,t);)r=10;return r}(t),n=tr,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=xt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=P+e.text)}}}}(t,o,r,u,v):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=xt(e.x,t,i,n)}(t,o,0,u,v),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var g=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[g(o.x-.5),g(o.x+t.dtick-.5)]}return o},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+" - "+q.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=q.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var gt=["f","p","n","μ","m","","k","M","G","T"];function yt(t){return"SI"===t||"B"===t}function mt(t){return t>14||t<-15}function xt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",u=e._tickexponent,c=q.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};dt(h),o=(Number(h._tickround)||0)+4,u=h._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if("none"===l&&(u=0),(t=Math.abs(t))<d)t="0",a=!1;else{if(t+=d,u&&(t=Math.pow(10,-u),o+=u),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var 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&&(yt(l)&&mt(u)&&(l="power"),p=u<0?P+-u:"power"!==l?"+"+u:String(u),"e"===l||"E"===l?t+=l+p:"power"===l?t+="×10"+p+"":"B"===l&&9===u?t+="B":yt(l)&&(t+=gt[u/3+5])),a?P+t:t}function bt(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[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 t(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(vt(t,s.interp(n[o],.5),o));return r}function wt(t){return void 0!==t.periodX?t.periodX:t.x}function Tt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("")}function kt(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(U+rV):eU:r?e*(r+1)V:e}function At(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Mt(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function St(t){return t._id+".automargin"}function Et(t){return St(t)+".mirror"}function Lt(t){return t.id+".rangeslider"}function Ct(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Pt(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(q.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(q.getFromId(t,r[n]));var u=Object.keys(p),c=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(n=0;n<u.length;n++){var h=u[n],d=a[0][h],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"),Ot(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 Ot(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 It(t){return"angularaxis"===t._id}function Dt(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 zt(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Rt(t,e){zt(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Ft(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}q.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return"string"!=typeof t?t:Number(t.replace("M",""))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},q.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?q.findSubplotsWithAxis(n,e):n;return i.sort((function(t,e){var r=t.substr(1).split("y"),n=e.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),i},q.findSubplotsWithAxis=function(t,e){for(var r=new RegExp("x"===e._id.charAt(0)?"^"+e._id+"y":e._id+"$"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},q.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:""},o={_offset:0,_length:e.height,_id:""},s=q.list(t,"x",!0),l=q.list(t,"y",!0),u=[];for(r=0;r<s.length;r++)for(u.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&u.push({x:a,y:l[i]}),u.push({x:s[r],y:l[i]});var c=e._clips.selectAll(".axesclip").data(u,(function(t){return t.x._id+t.y._id}));c.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(t){return"clip"+e._uid+t.x._id+t.y._id})).append("rect"),c.exit().remove(),c.each((function(t){n.select(this).select("rect").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})}))}},q.draw=function(t,e,r){var n=t._fullLayout;"redraw"===e&&n._paper.selectAll("g.subplot").each((function(t){var e=t[0],r=n._plots[e];if(r){var i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll("."+i._id+"tick").remove(),r.yaxislayer.selectAll("."+a._id+"tick").remove(),r.xaxislayer.selectAll("."+i._id+"tick2").remove(),r.yaxislayer.selectAll("."+a._id+"tick2").remove(),r.xaxislayer.selectAll("."+i._id+"divider").remove(),r.yaxislayer.selectAll("."+a._id+"divider").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll("path").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+i._id+"title").remove(),n._infolayer.select(".g-"+a._id+"title").remove()}}));var i=e&&"redraw"!==e?e:q.listIds(t),a=q.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=q.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=q.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=q.drawOne(t,n,r);return n._shiftPusher&&Ft(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},q.drawOne=function(t,e,r){var n,i,l,u=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];e.setScale();var d=t._fullLayout,v=e._id,g=v.charAt(0),y=q.counterLetter(v),m=d._plots[e._mainSubplot];if(m){if(e._shiftPusher=e.autoshift||-1!==p.indexOf(e._id)||-1!==p.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),Ft(e,x,u,!0),Ft(e,e.shift||0,u,!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,u));var b=m[g+"axislayer"],=e.mainLinePosition,w=+=e._shift,T=e._mainMirrorPosition,k=e.vals=q.calcTicks(e),A=[e.mirror,w,T].join("");for(n=0;n<k.length;n++)k[n].axInfo=A;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var M={};if(e.visible){var S,E,L=q.makeTransTickFn(e),C=q.makeTransTickLabelFn(e),P="inside"===e.ticks,O="outside"===e.ticks;if("boundaries"===e.tickson){var I=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,k);E=q.clipEnds(e,I),S=P?E:I}else E=q.clipEnds(e,k),S=P&&"period"!==e.ticklabelmode?E:k;var D,z=e._gridVals=E,R=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,k);if(!d._hasOnlyLargeSploms){var F=e._subplotsWith,B={};for(n=0;n<F.length;n++){i=F[n];var N=(l=d._plots[i])[y+"axis"],j=N._mainAxis._id;if(!B[j]){B[j]=1;var U="x"===g?"M0,"+N._offset+"v"+N._length:"M"+N._offset+",0h"+N._length;q.drawGrid(t,e,{vals:z,counterAxis:N,layer:l.gridlayer.select("."+v),minorLayer:l.minorGridlayer.select("."+v),path:U,transFn:L}),q.drawZeroLine(t,e,{counterAxis:N,layer:l.zerolinelayer,path:U,transFn:L})}}}var G=q.getTickSigns(e),Z=q.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var Y,W,X,J,K=q.makeTickPath(e,w,G[2]),$=q.makeTickPath(e,w,Z[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(Y=q.makeTickPath(e,T,G[3]),W=q.makeTickPath(e,T,Z[3],{minor:!0}),X=K+Y,J=$+W):(Y="",W="",X=K,J=$),e.showdividers&&O&&"boundaries"===e.tickson){var Q={};for(n=0;n<R.length;n++)Q[R[n].x]=1;D=function(t){return Q[t.x]?Y:X}}else D=function(t){return t.minor?J:X}}if(q.drawTicks(t,e,{vals:S,layer:b,path:D,transFn:L}),"allticks"===e.mirror){var tt=Object.keys(e._linepositions||{});for(n=0;n<tt.length;n++){i=tt[n],l=d._plots[i];var et=e._linepositions[i]||[],rt=et[0],nt=et[1],it=et[2],at=q.makeTickPath(e,rt,it?G[0]:Z[0],{minor:it})+q.makeTickPath(e,nt,it?G[1]:Z[1],{minor:it});q.drawTicks(t,e,{vals:S,layer:l[g+"axislayer"],path:at,transFn:L})}}var ot=[];if(ot.push((function(){return q.drawLabels(t,e,{vals:k,layer:b,plotinfo:l,transFn:C,labelFns:q.makeLabelFns(e,w)})})),"multicategory"===e.type){var st={x:2,y:10}[g];ot.push((function(){var r={x:"height",y:"width"}[g],n=ut()[r]+st+(e._tickAngles[v+"tick"]?e.tickfont.sizeV:0);return q.drawLabels(t,e,{vals:_t(e,k),layer:b,cls:v+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:L,labelFns:q.makeLabelFns(e,w+nG[4])})})),ot.push((function(){return e._depth=G[4](ut("tick2")[e.side]-w),function(t,e,r){var n=e._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Tt);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:R,layer:b,path:q.makeTickPath(e,w,G[4],{len:e._depth}),transFn:L})}))}else e.title.hasOwnProperty("standoff")&&ot.push((function(){e._depth=G[4](ut()[e.side]-w)}));var lt=o.getComponentMethod("rangeslider","isVisible")(e);return r.skipTitle||lt&&"bottom"===e.side||ot.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty("standoff"))r=e._depth+e.title.standoff+kt(e);else{var s=zt(e);if("multicategory"===e.type)r=e._depth;else{var l=1.5o;s&&(l=.5o,"outside"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var u,f,p,d,v=q.getPxPosition(t,e);if("x"===a?(f=e._offset+e._length/2,p="top"===e.side?v-r:v+r):(p=e._offset+e._length/2,f="right"===e.side?v+r:v-r,u={rotate:"-90",offset:0}),"multicategory"!==e.type){var g=e._selections[e._id+"tick"];if(d={selection:g,side:e.side},g&&g.node()&&g.node().parentNode){var y=h.getTranslate(g.node().parentNode);d.offsetLeft=y.x,d.offsetTop=y.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return e._titleStandoff=r,c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:d,transform:u,attributes:{x:f,y:p,"text-anchor":"middle"}})}(t,e)})),ot.push((function(){var r,n,i,s,l=e.side.charAt(0),u=H[e.side].charAt(0),c=q.getPxPosition(t,e),f=O?e.ticklen:0;(e.automargin||lt||e._shiftPusher)&&("multicategory"===e.type?r=ut("tick2"):(r=ut(),"x"===g&&"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!==d._dfltTitle[g]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(p+=kt(e))),e._fullDepth=Math.max(h,p)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var v=[0,1],m="number"==typeof e._shift?e._shift:0;if("x"===g){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?c-r.top:0,f),v.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-m):(e._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=e._depth+m,v.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[y]="free"===e.anchor?e.position:e._anchorAxis.domain[v[0]],e.title.text!==d._dfltTitle[g]&&(n[l]+=kt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=f),!0===e.mirror||"ticks"===e.mirror?i[y]=e._anchorAxis.domain[v[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[y]=[e._counterDomainMin,e._counterDomainMax][v[1]]))}lt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(bt(n,e.automargin),bt(i,e.automargin)),a.autoMargin(t,St(e),n),a.autoMargin(t,Et(e),i),a.autoMargin(t,Lt(e),s)})),s.syncOrAsync(ot)}}function ut(t){var r=v+(t||"tick");return M[r]||(M[r]=function(t,e){var r,n,i,a;return t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=Mt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0),{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),M[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},q.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=t.side,c=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=hU,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h(1-U)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[l?c:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t.id.charAt(0)?function(e){return l(r+t.offset+t.l2p(wt(e)),n)}:function(e){return l(n,r+t.offset+t.l2p(wt(e)))}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t.id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+sr)+"v"+ar:"M"+(e+sr)+",0h"+ar},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),u=a("right"),c=a("bottom")||l||o||u,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,v=h?t.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(p+=v,r)){var g=s.deg2rad(r);p=vMath.cos(g)+1,d=vMath.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=db,m=e+pb,x=?1:-.2,90===Math.abs(M)&&(f?x+=j:x=-90===M&&"bottom"===k?U:90===M&&"top"===k?j:.5,T=j/2*(M/90)),w.xFn=function(t){return t.dx+y+Tt.fontSize},w.yFn=function(t){return t.dy+m+t.fontSizex},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?eb<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5n:"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=db,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===k||90===M&&"right"===k?U:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))Ub,x=0}}w.xFn=function(t){return t.dx+e-(y+t.fontSizex)b+Tt.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5n:0}}return w},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Tt);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),Rt(e,[R]),o.attr("transform",r.transFn)},q.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&&q.shouldShowZeroLine(t,e,l))for(var u="array"===e.tickmode,c=0;c<s.length;c++){var p=s[c].x;if(u?!p:Math.abs(p)<e.dtick/100){if(s=s.slice(0,c).concat(s.slice(c+1)),!u)break;c--}}e._gw=h.crispRound(t,e.gridwidth,1);for(var d=a?h.crispRound(t,e.minor.gridwidth,1):0,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,Tt);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)}}Rt(e,[D,z])}},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=q.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Y(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),Rt(e,[I])},q.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=o.charAt(0),f=r.cls||o+"tick",p=r.vals.filter((function(t){return t.text})),d=r.labelFns,v=r.secondary?0:e.tickangle,g=(e._prevTickAngles||{})[f],y=r.layer.selectAll("g."+f).data(e.showticklabels?p:[],Tt),m=[];function x(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),c=d.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+d.xFn(t)+","+(d.yFn(t)-t.fontSize/2)+")":""),p=u.lineCount(o),v=Vt.fontSize,g=d.heightFn(t,i(a)?+a:0,(p-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))}}))}y.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,d.xFn(e),d.yFn(e)).call(h.font,e.font,e.fontSize,e.fontColor).text(e.text).call(u.convertToTspans,t),t._promises[i]?m.push(t._promises.pop().then((function(){x(r,v)}))):x(r,v)})),Rt(e,[F]),y.exit().remove(),r.repositionOnUpdate&&y.each((function(t){n.select(this).select("text").call(u.positionText,d.xFn(t),d.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,u=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(e.range,e.r2l);l=e.l2p(c[0])+e._offset,u=e.l2p(c[1])+e._offset}var f=Math.min(l,u),p=Math.max(l,u),d=e.side,v=1/0,g=-1/0;for(var m in y.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.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,g="top"===d||"left"===d?Math.max(g,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]=g)}}}},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&&zt(r)&&(t||[I,z,D,R,F]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===I.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===z.K?s.minorGridlayer.selectAll("."+e._id):t.K===D.K?s.gridlayer.selectAll("."+e._id):s[e._id.charAt(0)+"axislayer"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?wt(a):a.x)+e._offset,l=n.select(this);s<e["visibleLabelMax"+r._id]&&s>e["visibleLabelMin"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},x(y,g+1?g:v);var b=null;e._selections&&(e._selections[f]=y);var =[function(){return m.length&&Promise.all(m)}];e.automargin&&a.redrawFromAutoMarginCount&&90===g?(b=90,.push((function(){x(y,g)}))):.push((function(){if(x(y,v),p.length&&"x"===c&&!i(v)&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(y.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=Mt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)e.m)/(o-1),u=e.ticklabelposition||"",f=function(t){return-1!==u.indexOf(t)},d=f("top"),g=f("left"),m=f("right"),=f("bottom")||g||d||m?(e.tickwidth||0)+6:0,w=l<2.5n||"multicategory"===e.type||"realaxis"===e.name;for(t=0;t<a.length-1;t++)if(s.bBoxIntersect(a[t],a[t+1],)){b=w?90:30;break}}else{var T=2;for(e.ticks&&(T+=e.tickwidth/2),t=0;t<a.length;t++){var k=p[t].xbnd,A=a[t];if(null!==k[0]&&A.left-e.l2p(k[0])<T||null!==k[1]&&e.l2p(k[1])-A.right<T){b=90;break}}}b&&x(y,b)}})),e.tickAngles&&.push((function(){e._tickAngles[f]=null===b?i(v)?v:0:b}));var w=e._anchorAxis;w&&w.autorange&&zt(e)&&!W(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[w.name+".autorange"]=w.autorange,.push((function(){y.each((function(t,r){var n=Mt(this);n.select(".text-math-group").empty()&&(e.vals[r].bb=h.bBox(n.node()))}))})));var T=s.syncOrAsync();return T&&T.then&&t._promises.push(T),T},q.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))n.h,length:0}:"y"===i&&(r={offset:n.l+(e.position||0)n.w+e._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},q.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===O)&&(At(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=q.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:e._length),u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return p(r);for(var c=q.list(t,s),f=0;f<c.length;f++){var h=c[f];if(h._mainAxis===i&&p(h))return!0}}function p(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return"number"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(t,e))},q.clipEnds=function(t,e){return e.filter((function(e){return At(t,e.x)}))},q.allowAutoMargin=function(t){for(var e=q.list(t,"",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,St(n)),n.mirror&&a.allowAutoMargin(t,Et(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&a.allowAutoMargin(t,Lt(n))}},q.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,u=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],Ct(u.x,l.x),Ct(u.y,l.y);Ct(u.x,[o]),Ct(u.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Pt(t,r[n].x,r[n].y)}},4322:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(50606).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>2o}(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>2i}(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":"-"}},71453:function(t,e,r){"use strict";var n=r(92770),i=r(73972),a=r(71828),o=r(44467),s=r(85501),l=r(13838),u=r(26218),c=r(38701),f=r(96115),h=r(89426),p=r(15258),d=r(92128),v=r(21994),g=r(85555).WEEKDAY_PATTERN,y=r(85555).HOUR_PATTERN;function m(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=b(o[s])){c=g;break}var f=i("pattern",c);if(f===g)for(s=0;s<2;s++)(u=b(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case g: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 y: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,y){var x,b=n.letter,=n.font||{},w=n.splomStash||{},T=r("visible",!n.visibleDflt),k=e.template||{},A=e.type||k.type||"-";"date"===A&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(x=r("ticklabelmode")));var M="";n.noTicklabelposition&&"multicategory"!==A||(M=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===x?["outside","inside"]:"x"===b?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==M.indexOf("inside")?"hide past domain":"category"===A||"multicategory"===A?"allow":"hide past div"),v(e,y);var S=!e.isValidRange(t.range);S&&n.reverseDflt&&(S="reversed"),!r("autorange",S)||"linear"!==A&&"-"!==A||r("rangemode"),r("range"),e.cleanRange(),p(t,e,r,n),"category"===A||n.noHover||r("hoverformat");var E=r("color"),L=E!==l.color.dflt?E:.color,C=w.label||y.dfltTitle[b];if(h(t,e,r,A,n),!T)return e;r("title.text",C),a.coerceFont(r,"title.font",{family:.family,size:a.bigFont(.size),color:L}),u(t,e,r,A);var P=n.hasMinor;if(P&&(o.newContainer(e,"minor"),u(t,e,r,A,{isMinor:!0})),f(t,e,r,A,n),c(t,e,r,n),P){var O=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=O}d(t,e,r,{dfltColor:E,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:P,attributes:l}),!P||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var I,D="multicategory"===A;if(n.noTickson||"category"!==A&&!D||!e.ticks&&!e.showgrid||(D&&(I="boundaries"),"boundaries"===r("tickson",I)&&delete e.ticklabelposition),D&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===A)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:m}),e.rangebreaks.length){for(var z=0;z<e.rangebreaks.length;z++)if(e.rangebreaks[z].pattern===g){e._hasDayOfWeekBreaks=!0;break}if(v(e,y),y._has("scattergl")||y._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+" tovisible: false
."))}}else delete e.rangebreaks;return e};var x={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(t){if("string"==typeof t)return x[t.substr(0,3).toLowerCase()]}},12663:function(t,e,r){"use strict";var n=r(31562),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 091523.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}},41675:function(t,e,r){"use strict";var n=r(73972),i=r(85555);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)}},15258:function(t){"use strict";t.exports=function(t,e,r,n){if("category"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,n).sort(),"category ascending"===l?e._initialCategories=s:"category descending"===l&&(e._initialCategories=s.reverse()))}}},66287:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(50606),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}},85555:function(t,e,r){"use strict";var n=r(30587).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"}}},99082:function(t,e,r){"use strict";var n=r(71828),i=r(71739),a=r(41675).id2name,o=r(13838),s=r(42449),l=r(21994),u=r(50606).ALMOST_EQUAL,c=r(18783).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}},"scaleanchor",L)),M){e._matchGroup=d(c,y,M,1);var C=s[a(M)],P=h(s,e)/h(s,C);m!==("x"===M.charAt(0))&&(P=(m?"x":"y")+P),d(u,y,M,P)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(S){var O=x("scaleratio");O||(O=e.scaleratio=1),d(u,y,S,O)}else t.scaleanchor&&-1!==i.indexOf(t.scaleanchor)&&n.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a matches constraint.')}function h(t,e){var r=e.domain;return r||(r=t[a(e.overlaying)].domain),r[1]-r[0]}function p(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function d(t,e,r,n){var i,a,o,s,l,u=p(t,e);null===u?((u={})[e]=1,l=t.length,t.push(u)):l=t.indexOf(u);var c=Object.keys(u);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)o[s=c[a]]=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=te;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+te: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&&(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>ux)||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,P=L,O=Math.abs(E-L),I=L-Oh1.0001,D=L+Oh1.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>P&&(P=F);h/=(P-C)/(2O),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S<E?[C,P]:[P,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)}}},29323:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.numberFormat,o=r(84267),s=r(38520),l=r(73972),u=i.strTranslate,c=r(63893),f=r(7901),h=r(91424),p=r(30211),d=r(89298),v=r(6964),g=r(28569),y=r(64505),m=y.selectingOrDrawing,x=y.freeMode,b=r(18783).FROM_TL,=r(33306),w=r(61549).redrawReglTraces,T=r(74875),k=r(41675).getFromId,A=r(47322).prepSelect,M=r(47322).clearOutline,S=r(47322).selectOnClick,E=r(42449),L=r(85555),C=L.MINDRAG,P=L.MINZOOM,O=!0;function I(t,e,r,n){var a=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return a.call(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(lo._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(uo._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+".range[0]"]=o.l2r(c+fe),n[o._name+".range[1]"]=o.l2r(c+fr)}}if(i&&i.length){var h=(e+(1-r))/2;R(i,h,1-h,n,[])}}function F(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange)if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n.m)]}}function 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 H(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){O&&t.data&&t.context.showTips&&(i.notifier(i.(t,"Double-click to zoom back out"),"long"),O=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Z(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 W(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 O,I,V,X,J,K,$,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(O=e.xaxis,I=e.yaxis,tt=O._length,et=I._length,$=O._offset,Q=I._offset,(V={})[O._id]=O,(X={})[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;X[a._id]=a}J=W(V),K=W(X),it=z(J,y),at=z(K,v),ot=!at&&!it,nt=Z(t,t._fullLayout._axisMatchGroups,V,X);var o=(rt=Z(t,t._fullLayout._axisConstraintGroups,V,X,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,Pt={element:bt,gd:t,plotinfo:e};function Ot(){Pt.plotinfo.selection=!1,M(t)}function It(t,r){var i=Pt.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||yt||qt(),gt)o.indexOf("select")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&yt){var s=v?I:O,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,pte+_t)),i=Math.max(0,Math.min(et,dtr+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>P||o>P?(St="xy",a/tt>o/et?(o=aet/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=ott/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){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=ltt,Tt.r=utt,Tt.b=(1-l)et,Tt.t=(1-u)et,Lt.attr("d",G(Tt))}else s();else!at||o<Math.min(Math.max(.6a,C),P)?a<C||!it?s():(Tt.t=0,Tt.b=et,St="x",Lt.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-P-.5)+"h-3v"+(2P+1)+"h3ZM"+(t.r+.5)+","+(e-P-.5)+"h3v"+(2P+1)+"h-3Z"}(Tt,wt))):!it||a<Math.min(.6o,P)?(Tt.l=0,Tt.r=tt,St="y",Lt.attr("d",function(t,e){return"M"+(e-P-.5)+","+(t.t-.5)+"v-3h"+(2P+1)+"v3ZM"+(e-P-.5)+","+(t.b+.5)+"v3h"+(2P+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(J,Tt.l/tt,Tt.r/tt,ht,rt.xaxes),Vt("x",ht)),"xy"!==St&&"y"!==St||(R(K,(et-Tt.b)/et,(et-Tt.t)/et,ht,rt.yaxes),Vt("y",ht))}function Rt(){zt(),H(t),Gt(),q(t)}Pt.prepFn=function(e,r,n){var a=Pt.dragmode,s=t._fullLayout.dragmode;s!==a&&(Pt.dragmode=s),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)?Pt.minDrag=1:Pt.minDrag=void 0,m(s)?(Pt.xaxes=J,Pt.yaxes=K,A(e,r,n,Pt,s)):(Pt.clickFn=It,m(a)&&Ot(),ot||("zoom"===s?(Pt.moveFn=Dt,Pt.doneFn=Rt,Pt.minDrag=1,function(e,r,n){var a=bt.getBoundingClientRect();_t=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(_t,wt);_t=s[0],wt=s[1],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&&(Pt.moveFn=Ut,Pt.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===bt){var r=t._fullLayout.dragmode;m(r)||(mt(),Zt([0,0,tt,et]),Pt.moveFn(e.dx,e.dy))}}},g.init(Pt);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=att),i=-(r=-aet)}at?n=-itt/et:i=-net/tt}return it&&(F(J,e),Vt("x")),at&&(F(K,r),Vt("y")),Zt([n,i,tt,et]),Ht(),void t.emit("plotly_relayouting",ht)}var o,s,l="w"===it==("n"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var u=(e/tt+lr/et)/2;e=utt,r=luet}if("w"===it?e=p(J,0,e):"e"===it?e=p(J,1,-e):it||(e=0),"n"===at?r=p(K,1,r):"s"===at?r=p(K,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<J.length;c++)J[c].range=J[c]._r.slice(),E(J[c],1-r/et);o=(e=rtt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(c=0;c<K.length;c++)K[c].range=K[c]._r.slice(),E(K[c],1-e/tt);s=(r=eet/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:eet/tt,h=fet/tt):(o=s?0:rtt/et,f=htt/et)),Zt([o,s,f,h]),Ht(),t.emit("plotly_relayouting",ht)}function p(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/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:K,y:J}[t]:nt[t+"axes"],n=nt.isSubplotConstrained?{x:J,y:K}[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]||X[s];l&&(e?(e[a._name+".range[0]"]=e[l._name+".range[0]"],e[a._name+".range[1]"]=e[l._name+".range[1]"]):a.range=l.range.slice())}}function Ht(){var 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(J),i(rt.xaxes),i(nt.xaxes),a(e.overlays,"xaxis")),lt&&(i(K),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 qt(){if(!t._transitioningWithDuration){var e=t._context.doubleClick,r=[];it&&(r=r.concat(J)),at&&(r=r.concat(K)),nt.xaxes&&(r=r.concat(nt.xaxes)),nt.yaxes&&(r=r.concat(nt.yaxes));var n,i,a,o={};if("reset+autosize"===e)for(e="autosize",i=0;i<r.length;i++)if((n=r[i])._rangeInitial&&(n.range[0]!==n._rangeInitial[0]||n.range[1]!==n._rangeInitial[1])||!n._rangeInitial&&!n.autorange){e="reset";break}if("autosize"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(o[n._name+".autorange"]=!0);else if("reset"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(K)):r=r.concat(J)),i=0;i<r.length;i++)(n=r[i]).fixedrange||(n._rangeInitial?(a=n._rangeInitial,o[n._name+".range[0]"]=a[0],o[n._name+".range[1]"]=a[1]):o[n._name+".autorange"]=!0);t.emit("plotly_doubleclick",null),l.call("_guiRelayout",t,o)}}function Gt(){Zt([0,0,tt,et]),i.syncOrAsync([T.previousPromises,function(){t._fullLayout._replotting=!1,l.call("_guiRelayout",t,ht)}],t)}function Zt(e){var r,n,a,o,s=t._fullLayout,u=s._plots,c=s._subplots.cartesian;if(ct&&l.subplotsRegistry.splom.drag(t),ut)for(r=0;r<c.length;r++)if(a=(n=u[c[r]]).xaxis,o=n.yaxis,n._scene){var f=i.simpleMap(a.range,a.r2l),p=i.simpleMap(o.range,o.r2l);n.scene.update({range:[f[0],p[0],f[1],p[1]]})}if((ct||ut)&&((t),w(t)),ft){var d=e[2]/O._length,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&&X[o._id];if(k?(m=d,b=y||nt.isSubplotConstrained?e[0]:Xt(a,m)):nt.xaHash[a._id]?(m=d,b=e[0]a._length/O._length):nt.yaHash[a._id]?(m=g,b="ns"===at?-e[1]a._length/I._length:Xt(a,m,{n:"top",s:"bottom"}[at])):b=Wt(a,m=Yt(a,d,g)),A?(x=g,T=v||nt.isSubplotConstrained?e[1]:Xt(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/O._length:Xt(o,x,{e:"right",w:"left"}[it])):T=Wt(o,x=Yt(o,d,g)),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 Wt(t,e){return e?(t.range=t._r.slice(),E(t,e),Xt(t,e)):0}function Xt(t,e,r){return t._length(1-e)b[r||t.constraintoward||"middle"]}return v.lengthy.length!=1&&Y(bt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Ot(),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<J.length;n++)u(J[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<K.length;n++)u(K[n],l,a);Vt("y"),Ft[3]=a,Ft[1]+=Ft[3](1-l)(1/a-1)}Zt(Ft),Ht(),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:H,showDoubleClickNotifier:q,attachWheelEventHandler:Y}},4305:function(t,e,r){"use strict";var n=r(39898),i=r(30211),a=r(28569),o=r(6964),s=r(29323).makeDragBox,l=r(85555).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+.1o._length,f,.8o._length,l,"","ew"),s(t,n,o._offset,f,.1o._length,l,"","w"),s(t,n,o._offset+.9o._length,f,.1o._length,l,"","e")}if(e===u._mainSubplot){var h=u._mainLinePosition;"right"!==u.side&&(h-=l),s(t,n,h,u._offset+.1u._length,l,.8u._length,"ns",""),s(t,n,h,u._offset+.9u._length,l,.1u._length,"s",""),s(t,n,h,u._offset,l,.1u._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)}},76325:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(41675);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)}}}}}},93612:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(71828),o=r(74875),s=r(91424),l=r(27659).a0,u=r(41675),c=r(85555),f=r(77922),h=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function d(t,e,r,a,o){for(var u,f,h,p=c.traceLayerClasses,d=t.fullLayout,v=d.modules,g=[],y=[],m=0;m<v.length;m++){var x=(u=v[m]).name,b=i.modules[x].categories;if(b.svg){var =u.layerName||x+"layer",w=u.plot;h=(f=l(r,w))[0],r=f[1],h.length&&g.push({i:p.indexOf(),className:,plotMethod:w,cdModule:h}),b.zoomScale&&y.push("."+)}}g.sort((function(t,e){return t.i-e.i}));var T=e.plot.selectAll("g.mlayer").data(g,(function(t){return t.className}));if(T.enter().append("g").attr("class",(function(t){return t.className})).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),T.exit().remove(),T.order(),T.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")),y.length)){var k=e.plot.selectAll(y.join(",")).selectAll(".trace");e.zoomScalePts=k.selectAll("path.point"),e.zoomScaleTxt=k.selectAll(".textpoint")}}function v(t,e){var r=e.plotgroup,n=e.id,i=c.layerValue2layerClass[e.xaxis.layer],a=c.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,f=n+"-x",d=n+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,"path",f),h(s.overlinesBelow,"path",d),h(s.overaxesBelow,"g",f),h(s.overaxesBelow,"g",d),e.plot=h(s.overplot,"g",n),h(s.overlinesAbove,"path",f),h(s.overlinesAbove,"path",d),h(s.overaxesAbove,"g",f),h(s.overaxesAbove,"g",d),e.xlines=l.select(".overlines-"+i).select("."+f),e.ylines=l.select(".overlines-"+a).select("."+d),e.xaxislayer=l.select(".overaxes-"+i).select("."+f),e.yaxislayer=l.select(".overaxes-"+a).select("."+d)}else if(o)e.xlines=h(r,"path","xlines-above"),e.ylines=h(r,"path","ylines-above"),e.xaxislayer=h(r,"g","xaxislayer-above"),e.yaxislayer=h(r,"g","yaxislayer-above");else{var v=h(r,"g","layer-subplot");e.shapelayer=h(v,"g","shapelayer"),e.imagelayer=h(v,"g","imagelayer"),e.minorGridlayer=h(r,"g","minor-gridlayer"),e.gridlayer=h(r,"g","gridlayer"),e.zerolinelayer=h(r,"g","zerolinelayer"),h(r,"path","xlines-below"),h(r,"path","ylines-below"),e.overlinesBelow=h(r,"g","overlines-below"),h(r,"g","xaxislayer-below"),h(r,"g","yaxislayer-below"),e.overaxesBelow=h(r,"g","overaxes-below"),e.plot=h(r,"g","plot"),e.overplot=h(r,"g","overplot"),e.xlines=h(r,"path","xlines-above"),e.ylines=h(r,"path","ylines-above"),e.overlinesAbove=h(r,"g","overlines-above"),h(r,"g","xaxislayer-above"),h(r,"g","yaxislayer-above"),e.overaxesAbove=h(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+a),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+a)}o||(p(e.minorGridlayer,"g",e.xaxis._id),p(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort),p(e.gridlayer,"g",e.xaxis._id),p(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function g(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),y(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 y(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(89502),e.layoutAttributes=r(13838),e.supplyLayoutDefaults=r(86763),e.transitionAxes=r(66847),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,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(!Array.isArray(e))for(e=[],i=0;i<s.length;i++)e.push(i);for(i=0;i<o.length;i++){for(var l,u=o[i],c=a._plots[u],f=[],h=0;h<s.length;h++){var p=s[h],v=p[0].trace;v.xaxis+v.yaxis===u&&((-1!==e.indexOf(v.index)||v.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===u&&-1!==["tonextx","tonexty","tonext"].indexOf(v.fill)&&-1===f.indexOf(l)&&f.push(l),f.push(p)),l=p)}d(t,c,f,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 d=p[a];e[u.id2name(d)]||n._infolayer.selectAll(".g-"+d+"title").remove()}}var v=n._has&&n._has("cartesian"),m=e._has&&e._has("cartesian");if(v&&!m)g(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(c.cartesian)for(a=0;a<c.cartesian.length;a++){var x=c.cartesian[a];if(!l[x]){var b="."+x+",."+x+"-x,."+x+"-y";n._cartesianlayer.selectAll(b).remove(),y(x,n)}}},e.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,u=l.length,c=[],f=[];for(e=0;e<u;e++){n=l[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var h=a._mainAxis,p=o._mainAxis,d=h._id+p._id,v=s._plots[d];i.overlays=[],d!==n&&v?(i.mainplot=d,i.mainplotinfo=v,f.push(n)):(i.mainplot=void 0,i.mainplotinfo=void 0,c.push(n))}for(e=0;e<f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var g=c.concat(f),y=new Array(u);for(e=0;e<u;e++){n=g[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var m=[n,a.layer,o.layer,a.overlaying||"",o.overlaying||""];for(r=0;r<i.overlays.length;r++)m.push(i.overlays[r].id);y[e]=m}return y}(t),i=e._cartesianlayer.selectAll(".subplot").data(r,String);i.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),i.order(),i.exit().call(g,e),i.each((function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),v(t,a),a.draglayer=h(e._draggers,"g",i)}))},e.rangePlot=function(t,e,r){v(t,e),d(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(4305).updateFx},13838:function(t,e,r){"use strict";var n=r(41940),i=r(22399),a=r(79952).P,o=r(1426).extendFlat,s=r(44467).templatedArray,l=r(12663).descriptionWithDates,u=r(50606).ONEDAY,c=r(85555),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"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[h,f,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:u},editType:"calc"}),tickmode: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"},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"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:M,gridcolor: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","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"})}}},86763:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(23469).isUnifiedHover,o=r(98212),s=r(44467),l=r(10820),u=r(13838),c=r(951),f=r(71453),h=r(99082),p=r(52830),d=r(41675),v=d.id2name,g=d.name2id,y=r(85555).AX_ID_PATTERN,m=r(73972),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={},P={},O={},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&&(P[R]=!0),z&&(P[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")&&(O[z]=!0,O[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),H=i.background;B.length&&N.length&&(H=n.coerce(t,e,l,"plot_bgcolor"));var q,G,Z,Y,W,X=i.combine(H,e.paper_bgcolor);function J(){var t=k[q]||[];W._traceIndices=t.map((function(t){return t._expandedIndex})),W._annIndices=[],W._shapeIndices=[],W._selectionIndices=[],W._imgIndices=[],W._subplotsWith=[],W._counterAxes=[],W._name=W._attr=q,W._id=G}function K(t,e){return n.coerce(Y,W,u,t,e)}function $(t,e){return n.coerce2(Y,W,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++){q=V[m],G=g(q),Z=q.charAt(0),n.isPlainObject(t[q])||(t[q]={}),Y=t[q],W=s.newContainer(e,q,Z+"axis"),J();var lt="x"===Z&&!S[q]&&A[q]||"y"===Z&&!E[q]&&M[q],ut="y"===Z&&(!L[q]&&C[q]||P[q]),ct={hasMinor:!0,letter:Z,font:e.font,outerTicks:O[q],showGrid:!I[q],data:k[q]||[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G]};K("uirevision",e.uirevision),c(Y,W,K,ct),f(Y,W,K,ct,e);var ft=st&&Z===ot.charAt(0),ht=$("spikecolor",st?W.color:void 0),pt=$("spikethickness",st?1.5:void 0),dt=$("spikedash",st?"dot":void 0),vt=$("spikemode",st?"across":void 0),gt=$("spikesnap");K("showspikes",!!(ft||ht||pt||dt||vt||gt))||(delete W.spikecolor,delete W.spikethickness,delete W.spikedash,delete W.spikemode,delete W.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,W,K,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,q),grid:e.grid,overlayingDomain:mt}),K("title.standoff"),at(),W._input=Y}for(m=0;m<it.length;){G=it[m++],Z=(q=v(G)).charAt(0),n.isPlainObject(t[q])||(t[q]={}),Y=t[q],W=s.newContainer(e,q,Z+"axis"),J();var bt={letter:Z,font:e.font,outerTicks:O[q],showGrid:!I[q],data:[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G]};K("uirevision",e.uirevision),W.type=nt[G]||"linear",f(Y,W,K,bt,e),p(Y,W,K,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,q),grid:e.grid}),K("fixedrange"),at(),W._input=Y}var _t=b("rangeslider","handleDefaults"),wt=b("rangeselector","handleDefaults");for(m=0;m<j.length;m++)q=j[m],Y=t[q],W=e[q],_t(t,e,q),"date"===W.type&&wt(Y,W,e,U,W.calendar),K("fixedrange");for(m=0;m<U.length;m++){q=U[m],Y=t[q],W=e[q];var Tt=e[v(W.anchor)];K("fixedrange",b("rangeslider","isVisible")(Tt))}h.handleDefaults(t,e,{axIds:rt.concat(it).sort(d.idSort),axHasImage:P})}},92128:function(t,e,r){"use strict";var n=r(84267).mix,i=r(22399),a=r(71828);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)}}},52830:function(t,e,r){"use strict";var n=r(92770),i=r(71828);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}},89426:function(t,e,r){"use strict";var n=r(59652);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)}},42449:function(t,e,r){"use strict";var n=r(18783).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()}},21994:function(t,e,r){"use strict";var n=r(39898),i=r(84096).g0,a=r(71828),o=a.numberFormat,s=r(92770),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=r(50606),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(41675),T=r(85555),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-2gMath.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(10a.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 P(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return 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+et,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=ie,o=0,l=0;l<r;l++){var u=it._rangebreaks[l].min,c=it._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=O,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(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=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=I,t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(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++)O(d[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===p?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)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 l=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(l-1e3),o[1]=t.l2r(l+1e3);break}}else{if(!s(o[n])){if(!s(o[1-n])){t[e]=i;break}o[n]=o[1-n](n?10:.1)}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var u=Math.max(1,Math.abs(1e-6o[0]));o[0]-=u,o[1]+=u}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),f="y"===p;if(f?(t._offset=n.t+(1-t.domain[1])n.h,t._length=n.h(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._mc):(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._mu),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=dt._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]-dt._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+=om-(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+=ox-(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+sh}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e){return Array.isArray(e)&&2===e.length&&s(t.r2l(e[0]))&&s(t.r2l(e[1]))},t.isPtWithinRange=function(e,r){var n=t.c2l(e[p],null,r),i=t.r2l(t.range[0]),a=t.r2l(t.range[1]);return i<a?i<=n&&n<=a:a<=n&&n<=i},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var r=t._matchGroup;if(r){var n=null,i=null;for(var a in r){var o=e[w.id2name(a)];if(o._categories){n=o._categories,i=o._categoriesMap;break}}n&&i?(t._categories=n,t._categoriesMap=i):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var s=0;s<t._initialCategories.length;s++)O(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)O(t._initialCategories[i]);n=n.concat(t._traceIndices);var a=t._matchGroup;for(var o in a)if(r!==o){var s=e[w.id2name(o)];s._categories=t._categories,s._categoriesMap=t._categoriesMap,n=n.concat(s._traceIndices)}return n};var U=e._d3locale;"date"===t.type&&(t._dateFormat=U?U.timeFormat:i,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=U?U.numberFormat:o,delete t._minDtick,delete t._forceTick0}},59652: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]]}},96115:function(t,e,r){"use strict";var n=r(71828),i=r(7901).contrast,a=r(13838),o=r(59652),s=r(85501);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=o(t);if(r("showticklabels")){var h=c.font||{},p=e.color,d=-1!==(e.ticklabelposition||"").indexOf("inside")?i(c.bgColor):p&&p!==a.color.dflt?p:h.color;if(n.coerceFont(r,"tickfont",{family:h.family,size:h.size,color:d}),c.noTicklabelstep||"multicategory"===u||"log"===u||r("ticklabelstep"),c.noAng||r("tickangle"),"category"!==u){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||v||"date"===u||(r("showexponent",f),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},38701:function(t,e,r){"use strict";var n=r(71828),i=r(13838);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)}},26218:function(t,e,r){"use strict";var n=r(66287),i=r(71828).isArrayOrTypedArray;t.exports=function(t,e,r,a,o){o||(o={});var s=o.isMinor,l=s?t.minor||{}:t,u=s?e.minor:e,c=s?"minor.":"";function f(t){var e=l[t];return void 0!==e?e:(u._template||{})[t]}var h=f("tick0"),p=f("dtick"),d=f("tickvals"),v=r(c+"tickmode",i(d)?"array":p?"linear":"auto");if("auto"===v||"sync"===v)r(c+"nticks");else if("linear"===v){var g=u.dtick=n.dtick(p,a);u.tick0=n.tick0(h,a,e.calendar,g)}else"multicategory"!==a&&(void 0===r(c+"tickvals")?u.tickmode="auto":s||r("ticktext"))}},66847:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(71828),o=r(91424),s=r(89298);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)+rv[0]-d[0])/(d[1]-d[0])u,p[2]=u(1-r+ry/g),i.range[0]=i.l2r(d[0](1-r)+rv[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)+rx[1]-m[1])/(m[0]-m[1])c,p[3]=c(1-r+r*/b),l.range[0]=i.l2r(m[0](1-r)+rx[0]),l.range[1]=l.l2r(m[1](1-r)+rx[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)}},951:function(t,e,r){"use strict";var n=r(73972).traceIs,i=r(4322);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)}},31137:function(t,e,r){"use strict";var n=r(73972),i=r(71828);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}},27670:function(t,e,r){"use strict";var n=r(1426).extendFlat;e.Y=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.c=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())}},41940:function(t){"use strict";t.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e};return t.autoSize&&(n.size.dflt="auto"),t.autoColor&&(n.color.dflt="auto"),t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},31391: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"}}},78776: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",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"}},69082:function(t,e,r){"use strict";var n=r(39898),i=r(27362),a=i.geoPath,o=i.geoDistance,s=r(65704),l=r(73972),u=r(71828),c=u.strTranslate,f=r(7901),h=r(91424),p=r(30211),d=r(74875),v=r(89298),g=r(71739).getAutoRange,y=r(28569),m=r(47322).prepSelect,x=r(47322).clearOutline,b=r(47322).selectOnClick,=r(74455),w=r(78776),T=r(41327),k=r(90973),A=r(96892).zL;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+2s,o],[n+3s,o],[i,o],[i,a],[i-s,a],[i-2s,a],[i-3s,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?180Math.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]])>cMath.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.wc.x[0],l.t+l.h(1-c.y[1])],[l.l+l.wc.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 P=this.bounds=y.getBounds(C),O=this.fitScale=y.scale(),I=y.translate();if(n.fitbounds){var D=y.getBounds(E(d.range,v.range)),z=Math.min((P[1][0]-P[0][0])/(D[1][0]-D[0][0]),(P[1][1]-P[0][1])/(D[1][1]-D[0][1]));isFinite(z)?y.scale(zO):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(f.scaleO);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(y.translate([I[0]+(R[0]-I[0]),I[1]+(R[1]-I[1])]).clipExtent(P),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)}},44622:function(t,e,r){"use strict";var n=r(27659).AU,i=r(71828).counterRegex,a=r(69082),o="geo",s=i(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(77519),supplyLayoutDefaults:r(82161),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s<i.length;s++){var l=i[s],u=n(r,o,l),c=e[l]._subplot;c||(c=a({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=c),c.plot(u,e,t._promises)}},updateFx:function(t){for(var e=t._fullLayout,r=e._subplots.geo,n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}},clean:function(t,e,r,n){for(var i=n._subplots.geo||[],a=0;a<i.length;a++){var o=i[a],s=n[o]._subplot;!e[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}}},77519:function(t,e,r){"use strict";var n=r(22399),i=r(27670).Y,a=r(79952).P,o=r(78776),s=r(30962).overrideAll,l=r(78607),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"}},82161:function(t,e,r){"use strict";var n=r(71828),i=r(49119),a=r(27659).NG,o=r(78776),s=r(77519),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],P=E[1];C>0&&P<0&&(P+=360);var O,I,D,z=(C+P)/2;if(!p){var R=d?f.projRotate:[z,0,0];O=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(I=-96.6,D=38.7):(I=d?z:O,D=(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"})}},74455:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(73972),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),o=function(t){for(var e=0,r=arguments.length,i=[];++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(a,"zoomstart","zoom","zoomend"),s=0,h=a.on;function p(t){s++||t({type:"zoomstart"})}function d(t){t({type:"zoom"})}function b(t){--s||t({type:"zoomend"})}function (t){var r=e.rotate();t("projection.rotation.lon",-r[0]),t("projection.rotation.lat",-r[1])}return a.on("zoomstart",(function(){n.select(this).style(l);var t=n.mouse(this),s=e.rotate(),u=s,c=e.translate(),f=g(s);r=v(e,t),h.call(a,"zoom",(function(){var a=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(v(e,a)){e.rotate(s).translate(c);var l=v(e,a),h=m(r,l),p=T(y(f,h)),g=i.r=x(p,r,u);isFinite(g[0])&&isFinite(g[1])&&isFinite(g[2])||(g=u),e.rotate(g),u=g}}else r=v(e,t=a);d(o.of(this,arguments))})),p(o.of(this,arguments))})).on("zoomend",(function(){n.select(this).style(u),h.call(a,"zoom",null),b(o.of(this,arguments)),f(t,e,)})).on("zoom.redraw",(function(){t.render(!0);var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(a,o,"on")}function 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[nMath.cos(e),nMath.sin(e),Math.sin(r)]}(r)}function g(t){var e=.5t[0]o,r=.5t[1]o,n=.5t[2]o,i=Math.sin(e),a=Math.cos(e),s=Math.sin(r),l=Math.cos(r),u=Math.sin(n),c=Math.cos(n);return[alc+isu,ilc-asu,asc+ilu,alu-isc]}function y(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],o=e[0],s=e[1],l=e[2],u=e[3];return[ro-ns-il-au,rs+no+iu-al,rl-nu+io+as,ru+nl-is+ao]}function m(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(k(r,r)),i=.5Math.acos(Math.max(-1,Math.min(1,k(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]a,-r[1]a,r[0]a]}}function x(t,e,r){var n=w(e,2,t[0]);n=w(n,1,t[1]),n=w(n,0,t[2]-r[2]);var i,a,o=e[0],l=e[1],u=e[2],c=n[0],f=n[1],h=n[2],p=Math.atan2(l,o)s,d=Math.sqrt(oo+ll);Math.abs(f)>d?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)s-p,i=Math.sqrt(dd-ff));var v=180-a-2p,g=(Math.atan2(h,c)-Math.atan2(u,i))*s,y=(Math.atan2(h,c)-Math.atan2(u,-i))*s;return b(r[0],r[1],a,g)<=b(r[0],r[1],v,y)?[a,g,r[2]]:[v,y,r[2]]}function b(t,e,r,n){var i=(r-t),a=(n-e);return Math.sqrt(ii+aa)}function (t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),u=Math.sin(n);return i[a]=t[a]*l-t[s]*u,i[s]=t[s]*l+t[a]u,i}function T(t){return[Math.atan2(2(t[0]*t[1]+t[2]t[3]),1-2(t[1]*t[1]+t[2]*t[2]))s,Math.asin(Math.max(-1,Math.min(1,2(t[0]t[2]-t[3]t[1]))))s,Math.atan2(2(t[0]t[3]+t[1]t[2]),1-2(t[2]t[2]+t[3]t[3]))s]}function k(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)}},27659:function(t,e,r){"use strict";var n=r(73972),i=r(85555).SUBPLOT_PATTERN;e.AU=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.a0=function(t,e){var r,i=[],a=[];if(!(r="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[i,t];for(var o=0;o<t.length;o++){var s=t[o],l=s[0].trace;!0===l.visible&&0!==l._length&&(l._module.plot===r?i.push(s):a.push(s))}return[i,a]},e.NG=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}},75071:function(t,e,r){"use strict";var n=r(16825),i=r(1195),a=r(48956),o=r(85555),s=r(38520);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.MINDRAGr.pixelRatio,v=o.MINZOOMr.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(5n/(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}},82961:function(t,e,r){"use strict";var n=r(89298),i=r(78614);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,3Math.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)}},4796:function(t,e,r){"use strict";var n=r(30962).overrideAll,i=r(92918),a=r(10820),o=r(77922),s=r(85555),l=r(93612),u=r(528),c=r(27659).NG;e.name="gl2d",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=s.idRegex,e.attrRegex=s.attrRegex,e.attributes=r(89502),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];if(s._scene2d){var u=c(t,"gl2d",o);0===u.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)}},92918:function(t,e,r){"use strict";var n,i,a=r(73972),o=r(89298),s=r(30211),l=r(9330).gl_plot2d,u=r(9330).gl_spikes2d,c=r(9330).gl_select_box,f=r(40372),h=r(82961),p=r(75071),d=r(58617),v=r(99082),g=v.enforce,y=v.clean,m=r(71739).doAutoRange,x=r(64505),b=x.drawMode,=x.selectMode,w=["xaxis","yaxis"],T=r(85555).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(ri4);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*(ro+l)+u];a[4(ro+l)+u]=a[4(rs+l)+u],a[4(rs+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(en),o=0|Math.ceil(ei);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.xt.pixelRatio,l=this.canvas.height-t.pixelRatior.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}}},58547:function(t,e,r){"use strict";var n=r(30962).overrideAll,i=r(528),a=r(33539),o=r(27659).NG,s=r(71828),l=r(77922),u="gl3d",c="scene";e.name=u,e.attr=c,e.idRoot=c,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(59084),e.layoutAttributes=r(65500),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(24682),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl3d,i=0;i<n.length;i++){var s=n[i],l=o(r,u,s),c=e[s],f=c.camera,h=c._scene;h||(h=new a({id:s,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:f},e),c._scene=h),h.viewInitial||(h.viewInitial={up:{x:f.up.x,y:f.up.y,z:f.up.z},eye:{x:f.eye.x,y:f.eye.y,z:f.eye.z},center:{x:f.center.x,y:f.center.y,z:f.center.z}}),h.plot(l,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots.gl3d||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,u=s.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":u,x:n.l+n.wo.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.gl3d,n=0;n<r.length;n++)e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}},59084:function(t){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},77894:function(t,e,r){"use strict";var n=r(7901),i=r(13838),a=r(1426).extendFlat,o=r(30962).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,rangemode:i.rangemode,range:a({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.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,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")},3277:function(t,e,r){"use strict";var n=r(84267).mix,i=r(71828),a=r(44467),o=r(77894),s=r(951),l=r(71453),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,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h("gridcolor",n(f.color,r.bgColor,72.72727272727273).toRgbString()),h("title.text",d[0]),f.setScale=i.noop,h("showspikes")&&(h("spikesides"),h("spikethickness"),h("spikecolor",f.color)),h("showaxeslabels"),h("showbackground")&&h("backgroundcolor")}}},30422:function(t,e,r){"use strict";var n=r(78614),i=r(71828),a=["xaxis","yaxis","zaxis"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t,e){for(var r=this,o=0;o<3;++o){var s=e[a[o]];s.visible?(r.labels[o]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[o]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[o]=s.title.font.family),s.title.font.size&&(r.labelSize[o]=s.title.font.size)),"showline"in s&&(r.lineEnable[o]=s.showline),"linecolor"in s&&(r.lineColor[o]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[o]=s.linewidth),"showgrid"in s&&(r.gridEnable[o]=s.showgrid),"gridcolor"in s&&(r.gridColor[o]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[o]=s.gridwidth),"log"===s.type?r.zeroEnable[o]=!1:"zeroline"in s&&(r.zeroEnable[o]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[o]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[o]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[o]=!0:r.lineTickEnable[o]=!1,"ticklen"in s&&(r.lineTickLength[o]=r._defaultLineTickLength[o]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[o]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[o]=s.tickwidth),"tickangle"in s&&(r.tickAngle[o]="auto"===s.tickangle?-3600:Math.PI-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[o]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[o]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[o]=s.tickfont.family),s.tickfont.size&&(r.tickSize[o]=s.tickfont.size)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[o]=!0,r.lineMirror[o]=!0):!0===s.mirror?(r.lineTickMirror[o]=!1,r.lineMirror[o]=!0):(r.lineTickMirror[o]=!1,r.lineMirror[o]=!1):r.lineMirror[o]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[o]=!0,r.backgroundColor[o]=n(s.backgroundcolor)):r.backgroundEnable[o]=!1):(r.tickEnable[o]=!1,r.labelEnable[o]=!1,r.lineEnable[o]=!1,r.lineTickEnable[o]=!1,r.gridEnable[o]=!1,r.zeroEnable[o]=!1,r.backgroundEnable[o]=!1)}},t.exports=function(t,e){var r=new o;return r.merge(t,e),r}},24682:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(73972),o=r(49119),s=r(3277),l=r(65500),u=r(27659).NG,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(yy+mm+xx)>.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})}},65500:function(t,e,r){"use strict";var n=r(77894),i=r(27670).Y,a=r(1426).extendFlat,o=r(71828).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"}}}},13133:function(t,e,r){"use strict";var n=r(78614),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}},96085: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].xt.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(89298),i=r(71828),a=["xaxis","yaxis","zaxis"],o=[0,0,0]},63538: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[4r+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])))}},33539:function(t,e,r){"use strict";var n,i,a=r(9330).gl_plot3d,o=a.createCamera,s=a.createScene,l=r(40372),u=r(38520),c=r(73972),f=r(71828),h=f.preserveDrawingBuffer(),p=r(89298),d=r(30211),v=r(78614),g=r(58617),y=r(63538),m=r(30422),x=r(13133),b=r(96085);function (t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=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 w=.prototype;w.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var T=!0;w.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!T||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 T=!1,r},w.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=o(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},w.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return 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("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:na.x,y:na.y,z:na.z})}i(t)}}),!!u&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r.fullLayout.calcInverseTransform(r);var a=r.fullLayout.invScaleX,o=r.fullLayout.invScaleY,s=i.widtha,l=i.heighto;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],w=h.index,T={xLabel:g("x",h.traceCoordinate[0],t.xhoverformat),yLabel:g("y",h.traceCoordinate[1],t.yhoverformat),zLabel:g("z",h.traceCoordinate[2],t.zhoverformat)},k=d.castHoverinfo(,e.fullLayout,w),A=(k||"").split("+"),M=k&&"all"===k;.hovertemplate||M||(-1===A.indexOf("x")&&(T.xLabel=void 0),-1===A.indexOf("y")&&(T.yLabel=void 0),-1===A.indexOf("z")&&(T.zLabel=void 0),-1===A.indexOf("text")&&(h.textLabel=void 0),-1===A.indexOf("name")&&(c.name=void 0));var S=[];"cone"===t.type||"streamtube"===t.type?(T.uLabel=g("x",h.traceCoordinate[3],t.uhoverformat),(M||-1!==A.indexOf("u"))&&S.push("u: "+T.uLabel),T.vLabel=g("y",h.traceCoordinate[4],t.vhoverformat),(M||-1!==A.indexOf("v"))&&S.push("v: "+T.vLabel),T.wLabel=g("z",h.traceCoordinate[5],t.whoverformat),(M||-1!==A.indexOf("w"))&&S.push("w: "+T.wLabel),T.normLabel=h.traceCoordinate[6].toPrecision(3),(M||-1!==A.indexOf("norm"))&&S.push("norm: "+T.normLabel),"streamtube"===t.type&&(T.divergenceLabel=h.traceCoordinate[7].toPrecision(3),(M||-1!==A.indexOf("divergence"))&&S.push("divergence: "+T.divergenceLabel)),h.textLabel&&S.push(h.textLabel),x=S.join("
")):"isosurface"===t.type||"volume"===t.type?(T.valueLabel=p.hoverLabelText(e.mockAxis,e.mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push("value: "+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join("
")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:.input,fullData:,curveNumber:.index,pointNumber:w};d.appendArrayPointValue(E,,w),t.module.eventData&&(E=.module.eventData(E,h,,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:,x:(.5+.5*m[0]/m[3])s,y:(.5-.5m[1]/m[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:c.name,color:d.castHoverOption(,w,"bgcolor")||c.color,borderColor:d.castHoverOption(,w,"bordercolor"),fontFamily:d.castHoverOption(,w,"font.family"),fontSize:d.castHoverOption(,w,"font.size"),fontColor:d.castHoverOption(,w,"font.color"),nameLength:d.castHoverOption(,w,"namelength"),textAlign:d.castHoverOption(,w,"align"),hovertemplate:f.castOption(,w,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var k=["xaxis","yaxis","zaxis"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+"calendar"],c=e[""+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(c||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)h=s.d2l(l[p][d],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else h=s.d2l(l[p],0,u),!isNaN(h)&&isFinite(h)&&(r[0][i]=Math.min(r[0][i],h),r[1][i]=Math.max(r[1][i],h));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1)}}w.plot=function(t,e,r){var n=this;if(n.plotArgs=[t,e,r],!n.glplot.contextLost){var i,a,o,s,l,u,c=e[n.id],f=r[n.id];n.fullLayout=e,n.fullSceneLayout=c,n.axesOptions.merge(e,c),n.spikeOptions.merge(c),n.setViewport(c),n.updateFx(c.dragmode,c.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(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&&A(this,i,h);!function(t,e){for(var r=t.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=k[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){if((u=(l=c[k[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 b=n.glplot.objects,=n.fullSceneLayout.annotations||[],w=l._name.charAt(0);for(s=0;s<b.length;s++){var T=b[s],M=T.bounds,S=T._trace.data._pad||0;"ErrorBars"===T.constructor.name&&l.lowerLogErrorBound?y[0][o]=Math.min(y[0][o],l.lowerLogErrorBound):y[0][o]=Math.min(y[0][o],M[0][o]/p[o]-S),y[1][o]=Math.max(y[1][o],M[1][o]/p[o]+S)}for(s=0;s<.length;s++){var E=[s];if(E.visible){var L=l.r2l(E[w]);y[0][o]=Math.min(y[0][o],L),y[1][o]=Math.max(y[1][o],L)}}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 C=y[1][o]-y[0][o];y[0][o]-=C/32,y[1][o]+=C/32}if("reversed"===l.autorange){var P=y[0][o];y[0][o]=y[1][o],y[1][o]=P}}else{var O=l.range;y[0][o]=l.r2l(O[0]),y[1][o]=l.r2l(O[1])}y[0][o]===y[1][o]&&(y[0][o]-=1,y[1][o]+=1),m[o]=y[1][o]-y[0][o],n.glplot.setBounds(o,{min:y[0][o]p[o],max:y[1][o]p[o]})}var I=c.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var D=c.aspectratio;g=[D.x,D.y,D.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=[1,1,1];for(o=0;o<3;++o){var R=x[u=(l=c[k[o]]).type];z[o]=Math.pow(R.acc,1/R.count)/p[o]}g="data"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[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 F=c.domain||null,B=e._size||null;if(F&&B){var N=n.container.style;N.position="absolute",N.left=B.l+F.x[0]B.w+"px",N.top=B.t+(1-F.y[1])B.h+"px",N.width=B.w(F.x[1]-F.x[0])+"px",N.height=B.h(F.y[1]-F.y[0])+"px"}n.glplot.redraw()}},w.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},w.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},w.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(t),h=s.isAspectChanged(t),p=u||h;if(p){var d={};u&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+".camera")).get(),d[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",t,l._preGUI,d),u&&(r.set(e),f.nestedProperty(l,s.id+".camera").set(e)),h&&(a.set(i),f.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},w.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(ss+ll+uu)<.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},w.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(ia4);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(en+a)+o,l=4(ei+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(en+i),o=t[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(st[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,u=s.getContext("2d",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t.mockAxis,e)},t.exports=},90060: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}},10820:function(t,e,r){"use strict";var n=r(41940),i=r(85594),a=r(22399),o=r(29241),s=r(53777),l=r(35025),u=r(1426).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"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:u(l({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:u({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},77734:function(t,e,r){"use strict";var n=r(78607),i='© OpenStreetMap contributors',a=['© Carto',i].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),s={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},l=n(s);t.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please setmapbox.style
to one of:",l.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')'}}},13056:function(t,e,r){"use strict";var n=r(71828);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}}},50101:function(t,e,r){"use strict";var n=r(44517),i=r(71828),a=i.strTranslate,o=i.strScale,s=r(27659).AU,l=r(77922),u=r(39898),c=r(91424),f=r(63893),h=r(10481),p="mapbox",d=e.constants=r(77734);function v(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}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(23585),e.supplyLayoutDefaults=r(77882),e.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l<e.length;l++){var u=r[e[l]],c=u.accesstoken;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.mapbox||[],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.mapbox,n=e._size,i=0;i<r.length;i++){var s=e[r[i]],h=s.domain,p=s._subplot.toImage("png");e.glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":p,x:n.l+n.wh.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 v=u.select(s.subplot.div);if(null!==v.select(".mapboxgl-ctrl-logo").node().offsetParent){var g=e.glimages.append("g");g.attr("transform",a(n.l+n.wh.x[0]+10,n.t+n.h(1-h.y[0])-31)),g.append("path").attr("d",d.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),g.append("path").attr("d",d.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),g.append("path").attr("d",d.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),g.append("polygon").attr("points",d.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var y=v.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),m=e.glimages.append("g"),x=m.append("text");x.text(y).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":y});var b=c.bBox(x.node()),=n.w*(h.x[1]-h.x[0]);if(b.width>/2){var w=y.split("|").join("
");x.text(w).attr("data-unformatted",w).call(f.convertToTspans,t),b=c.bBox(x.node())}x.attr("transform",a(-3,8-b.height)),m.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var T=1;b.width+6>&&(T=/(b.width+6));var k=[n.l+n.wh.x[1],n.t+n.h(1-h.y[0])];m.attr("transform",a(k[0],k[1])+o(T))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},67911:function(t,e,r){"use strict";var n=r(71828),i=r(63893).sanitizeHTML,a=r(13056),o=r(77734);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}},23585:function(t,e,r){"use strict";var n=r(71828),i=r(7901).defaultLine,a=r(27670).Y,o=r(41940),s=r(82196).textposition,l=r(30962).overrideAll,u=r(44467).templatedArray,c=r(77734),f=o({});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"}},77882:function(t,e,r){"use strict";var n=r(71828),i=r(49119),a=r(85501),o=r(23585);function s(t,e,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),u=r("bounds.north");void 0!==i&&void 0!==o&&void 0!==s&&void 0!==u||delete e.bounds,a(t,e,{name:"layers",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r("visible")){var i,a=r("sourcetype"),s="raster"===a||"image"===a;r("source"),r("sourceattribution"),"vector"===a&&r("sourcelayer"),"image"===a&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=e.type="raster",n.log("Source types raster and image must drawn raster layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(t,e,r){i(t,e,r,{type:"mapbox",attributes:o,handleDefaults:s,partition:"y",accessToken:e._mapboxAccessToken})}},10481:function(t,e,r){"use strict";var n=r(44517),i=r(71828),a=r(41327),o=r(73972),s=r(89298),l=r(28569),u=r(30211),c=r(64505),f=c.drawMode,h=c.selectMode,p=r(47322).prepSelect,d=r(47322).clearOutline,v=r(47322).clearSelectionsCache,g=r(47322).selectOnClick,y=r(77734),m=r(67911);function x(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var b=x.prototype;b.plot=function(t,e,r){var n,i=this,a=e[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},b.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style);o.accessToken=s.accesstoken;var u=s.bounds,c=u?[[u.west,u.south],[u.east,u.north]]:null,f=o.map=new n.Map({container:o.div,style:l.style,center: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);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,o.setStyle(u.style),i.traceHash={},l.push(new Promise((function(t){o.once("styledata",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},b.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),a["trace-"+s.uid]=n||""}for(r=0;r<i.length;r++){var u=i[r];n="string"==typeof u.below?u.below:o?"traces":"",a["layout-"+r]=n}var c,f,h={};for(c in a)h[n=a[c]]?h[n].push(c):h[n]=[c];for(n in h){var p=h[n];if(p.length>1)for(r=0;r<p.length;r++)0===(c=p[r]).indexOf("trace-")?(f=c.split("trace-")[1],this.traceHash[f]&&(this.traceHash[f].below=null)):0===c.indexOf("layout-")&&(f=c.split("layout-")[1],this.layerList[f]&&(this.layerList[f].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(t){var e={};return i.isPlainObject(t)?(e.id=t.id,e.style=t):"string"==typeof t?(e.id=t,-1!==y.styleValuesMapbox.indexOf(t)?e.style=T(t):y.stylesNonMapbox[t]?e.style=y.stylesNonMapbox[t]:e.style=t):(e.id=y.styleValueDflt,e.style=T(y.styleValueDflt)),e.transition={duration:0,delay:0},e}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.mape},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},35025: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}}},74875:function(t,e,r){"use strict";var n=r(39898),i=r(84096).Dq,a=r(60721).FF,o=r(92770),s=r(73972),l=r(86281),u=r(44467),c=r(71828),f=r(7901),h=r(50606).BADNUM,p=r(41675),d=r(51873).clearOutline,v=r(21479),g=r(85594),y=r(31391),m=r(27659).a0,x=c.relinkPrivateKeys,b=c.,=t.exports={};c.extendFlat(,s),.attributes=r(9012),.attributes.type.values=.allTypes,.fontAttrs=r(41940),.layoutAttributes=r(10820),.fontWeight="normal";var w=.transformsRegistry,T=r(31137);.executeAPICommand=T.executeAPICommand,.computeAPICommandBindings=T.computeAPICommandBindings,.manageCommandObserver=T.manageCommandObserver,.hasSimpleAPICommandBindings=T.hasSimpleAPICommandBindings,.redrawText=function(t){return t=c.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t.fullLayout&&(s.getComponentMethod("annotations","draw")(t),s.getComponentMethod("legend","draw")(t),s.getComponentMethod("colorbar","draw")(t),e(.previousPromises(t)))}),300)}))},.resize=function(t){var e;t=c.getGraphDiv(t);var r=new Promise((function(r,n){t&&!c.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t.redrawTimer&&clearTimeout(t.redrawTimer),t.resolveResize&&(e=t.resolveResize),t.resolveResize=r,t.redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||c.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,s.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t.resolveResize===r&&(delete t.resolveResize,r(t))}))}}),100)}));return e&&e(r),r},.previousPromises=function(t){if((t.promises||[]).length)return Promise.all(t.promises).then((function(){t.promises=[]}))},.addLinks=function(t){if(t.context.showLink||t.context.showSources){var e=t.fullLayout,r=c.ensureSingle(e.paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:f.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:e.paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e.paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t.context.showSources&&t.context.showSources(t),t.context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t.context.linkText+" "+String.fromCharCode(187));if(t.context.sendData)r.on("click",(function(){.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()?" - ":"")}},.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=.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function M(t,e){var r=t.context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var l=t.context.locales,u=0;u<2;u++){var c=(l[r]||{}).format;if(c&&(a(c),n))break;l=s.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||a(s.localeRegistry.en.format),i}function S(t,e){var r={fullLayout:e},n="x"===t.id.charAt(0),i=t.mainAxis.anchorAxis,a="",o="",s="";if(i&&(s=i.mainAxis.id,a=n?t.id+s:s+t.id),!a||!e.plots[a]){a="";for(var l=t.counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?t.id+c:c+t.id;o||(o=f);var h=p.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}function E(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||w[n.type];if(i&&i.makesData)return!0}return!1}function L(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=w[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function C(t){return"string"==typeof t&&"px"===t.substr(t.length-2)&&parseFloat(t)}function 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={})}.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t.fullLayout||{};if(n.skipDefaults)delete n.skipDefaults;else{var o,l=t.fullLayout={},u=t.layout||{},f=t.fullData||[],h=t.fullData=[],p=t.data||[],v=t.calcdata||[],g=t.context||{};t.transitionData||.createTransitionData(t),l.dfltTitle={plot:b(t,"Click to enter Plot title"),x:b(t,"Click to enter X axis title"),y:b(t,"Click to enter Y axis title"),colorbar:b(t,"Click to enter Colorscale title"),annotation:b(t,"new text")},l.traceWord=b(t,"trace");var y=M(t,k);if(l.mapboxAccessToken=g.mapboxAccessToken,n.initialAutoSizeIsDone){var m=n.width,w=n.height;.supplyLayoutGlobalDefaults(u,l,y),u.width||(l.width=m),u.height||(l.height=w),.sanitizeMargins(l)}else{.supplyLayoutGlobalDefaults(u,l,y);var T=!u.width||!u.height,S=l.autosize,E=g.autosizable;T&&(S||E)?.plotAutoSize(t,u,l):T&&.sanitizeMargins(l),!S&&T&&(u.width=l.width,u.height=l.height)}l.d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(c.adjustFormat(e))}catch(t){return c.warnBadFormat(e),c.noFormat}return e},timeFormat:i(t).utcFormat}}(y,l.separators),l.extraFormat=M(t,A),l.initialAutoSizeIsDone=!0,l.dataLength=p.length,l.modules=[],l.visibleModules=[],l.basePlotModules=[];var L=l.subplots=function(){var t,e,r=s.collectableSubplotTypes,n={};if(!r){r=[];var i=s.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)c.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),C=l.splomAxes={x:{},y:{}},O=l.splomSubplots={};l.splomGridDflt={},l.scatterStackOpts={},l.firstScatter={},l.alignmentOpts={},l.colorAxes={},l.requestRangeslider={},l.traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r].fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),u={};function f(t,e){l[e]=t,u[t]=1}function h(t,e){if(t&&"string"==typeof t&&!u[t])return f(t,e),!0}for(r=0;r<i;r++){var p=e[r].uid;"number"==typeof p&&(p=String(p)),h(p,r)||r<s&&h(a[r].uid,r)||f(c.randstr(u),r)}return l}(f,p),l.globalTransforms=(t.context||{}).globalTransforms,.supplyDataDefaults(p,h,u,l);var I=Object.keys(C.x),D=Object.keys(C.y);if(I.length>1&&D.length>1){for(s.getComponentMethod("grid","sizeDefaults")(u,l),o=0;o<I.length;o++)c.pushUnique(L.xaxis,I[o]);for(o=0;o<D.length;o++)c.pushUnique(L.yaxis,D[o]);for(var z in O)c.pushUnique(L.cartesian,z)}if(l.has=.hasPlotType.bind(l),f.length===h.length)for(o=0;o<h.length;o++)x(h[o],f[o]);.supplyLayoutModuleDefaults(u,l,h,t.transitionData);var R=l.visibleModules,F=[];for(o=0;o<R.length;o++){var B=R[o].crossTraceDefaults;B&&c.pushUnique(F,B)}for(o=0;o<F.length;o++)Fo;l.hasOnlyLargeSploms=1===l.basePlotModules.length&&"splom"===l.basePlotModules[0].name&&I.length>15&&D.length>15&&0===l.shapes.length&&0===l.images.length,.linkSubplots(h,l,f,n),.cleanPlot(h,l,f,n);var N=!(!n.has||!n.has("gl2d")),j=!(!l.has||!l.has("gl2d")),U=!(!n.has||!n.has("cartesian"))||N,V=!(!l.has||!l.has("cartesian"))||j;U&&!V?n.bgLayer.remove():V&&!U&&(l.shouldCreateBgLayer=!0),n.zoomlayer&&!t.dragging&&d({fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e.meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a.meta={meta:a.meta}:e.meta&&(a.meta={meta:e.meta}),e.meta&&(a.meta.layout={meta:e.meta})}n.length&&(r||(r=e.meta={}),r.data=n)}(h,l),x(l,n),s.getComponentMethod("colorscale","crossTraceDefaults")(h,l),l.preGUI||(l.preGUI={}),l.tracePreGUI||(l.tracePreGUI={});var H,q=l.tracePreGUI,G={};for(H in q)G[H]="old";for(o=0;o<h.length;o++)G[H=h[o].fullInput.uid]||(q[H]={}),G[H]="new";for(H in G)"old"===G[H]&&delete q[H];P(l),s.getComponentMethod("rangeslider","makeData")(l),r||v.length!==h.length||.supplyDefaultsUpdateCalc(v,h)}},.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a.hasCalcTransform){var o,s,l,u=a.arrayAttrs;for(o=0;o<u.length;o++)s=u[o],l=c.nestedProperty(a,s).get().slice(),c.nestedProperty(n,s).set(l)}i.trace=n}}},.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=[])},.hasPlotType=function(t){var e,r=this.basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this.modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=s.modules[i];if(a&&a.categories[t])return!0}return!1},.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()}},.linkSubplots=function(t,e,r,n){var i,a,o=n.plots||{},l=e.plots={},u=e.subplots,f={fullData:t,fullLayout:e},h=u.cartesian.concat(u.gl2d||[]);for(i=0;i<h.length;i++){var d,v=h[i],g=o[v],y=p.getFromId(f,v,"x"),m=p.getFromId(f,v,"y");for(g?d=l[v]=g:(d=l[v]={}).id=v,y.counterAxes.push(m.id),m.counterAxes.push(y.id),y.subplotsWith.push(v),m.subplotsWith.push(v),d.xaxis=y,d.yaxis=m,d.hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===d.xaxis.id&&x.yaxis===d.yaxis.id&&!1===x.cliponaxis){d.hasClipOnAxisFalse=!0;break}}}var b,=p.list(f,null,!0);for(i=0;i<.length;i++){var w=null;(b=[i]).overlaying&&(w=p.getFromId(f,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b.mainAxis=w||b,w&&(b.domain=w.domain.slice()),b.anchorAxis="free"===b.anchor?null:p.getFromId(f,b.anchor)}for(i=0;i<.length;i++)if((b=[i]).counterAxes.sort(p.idSort),b.subplotsWith.sort(c.subplotSort),b.mainSubplot=S(b,e),b.counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||s.getComponentMethod("rangeslider","isVisible")(b))){var T=1,k=0;for(a=0;a<b.counterAxes.length;a++){var A=p.getFromId(f,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)}},.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t.module.colorAttrs)||(t.module.colorAttrs=e=[],l.crawl(t.module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,"color"===t.valType&&void 0===t.dflt&&e.push(r.join("."))}))),n=0;n<e.length;n++)c.nestedProperty(t,"input."+e[n]).get()||c.nestedProperty(t,e[n]).set(null)},.supplyDataDefaults=function(t,e,r,n){var i,a,o,l=n.modules,f=n.visibleModules,h=n.basePlotModules,p=0,d=0;function v(t){e.push(t);var r=t.module;r&&(c.pushUnique(l,r),!0===t.visible&&c.pushUnique(f,r),c.pushUnique(h,t.module.basePlotModule),p++,!1!==t.input.visible&&d++)}n.transformModules=[];var g={},y=[],m=(r.template||{}).data||{},b=u.traceTemplater(m);for(i=0;i<t.length;i++){if(o=t[i],(a=b.newTrace(o)).uid=n.traceUids[i],.supplyTraceDefaults(o,a,d,n,i),a.index=i,a.input=o,a.expandedIndex=p,a.transforms&&a.transforms.length)for(var w=!1!==o.visible&&!1===a.visible,T=L(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};w&&!1===A.visible&&delete A.visible,.supplyTraceDefaults(A,M,p,n,i),x(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);s.traceIs(a,"carpetAxis")&&(g[a.carpet]=a),s.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}},.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return c.coerce(t||{},r,g,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=.supplyAnimationTransitionDefaults(t.transition||{});return r},.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return c.coerce(t||{},e,g.frame,r,n)}return r("duration"),r("redraw"),e},.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return c.coerce(t||{},e,g.transition,r,n)}return r("duration"),r("easing"),e},.supplyFrameDefaults=function(t){var e={};function r(r,n){return c.coerce(t,e,y,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||f.defaults,l=o[r%o.length];function u(r,n){return c.coerce(t,e,.attributes,r,n)}var h=u("visible");u("type"),u("name",n.traceWord+" "+i),u("uirevision",n.uirevision);var p=.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(h||"gl2d"!==d.name){if(Array.isArray(v))for(a=0;a<v.length;a++){var x=v[a],b=c.coerce(t,e,g,x);y[x]&&c.pushUnique(y[x],b),m+=b}else m=c.coerce(t,e,g,v);y[d.name]&&c.pushUnique(y[d.name],m)}}}return h&&(u("customdata"),u("ids"),u("meta"),s.traceIs(e,"showLegend")?(c.coerce(t,e,p.attributes.showlegend?p.attributes:.attributes,"showlegend"),u("legendwidth"),u("legendgroup"),u("legendgrouptitle.text"),u("legendrank"),e.dfltShowLegend=!0):e.dfltShowLegend=!1,p&&p.supplyDefaults(t,e,l,n),s.traceIs(e,"noOpacity")||u("opacity"),s.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),s.traceIs(e,"noHover")||(e.hovertemplate||c.coerceHoverinfo(t,e,n),"parcats"!==e.type&&s.getComponentMethod("fx","supplyDefaults")(t,e,l,n)),p&&p.selectPoints&&u("selectedpoints"),.supplyTransformDefaults(t,e,n)),e},.hasMakesDataTransform=E,.supplyTransformDefaults=function(t,e,r){if(e.length||E(t)){var n=r.globalTransforms||[],i=r.transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var u,f=o[l],h=f.type,p=w[h],d=!(f.module&&f.module===p),v=p&&"function"==typeof p.transform;p||c.warn("Unrecognized transform type "+h+"."),p&&p.supplyDefaults&&(d||v)?((u=p.supplyDefaults(f,e,r,t)).type=h,u.module=p,c.pushUnique(i,p)):u=c.extendFlat({},f),s.push(u)}}},.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return c.coerce(t,e,.layoutAttributes,r,n)}var i=t.template;c.isPlainObject(i)&&(e.template=i,e.template=i.layout,e.dataTemplate=i.data),n("autotypenumbers");var a=c.coerceFont(n,"font"),o=a.size;c.coerceFont(n,"title.font",c.extendFlat({},a,{size:Math.round(1.4*o)})),n("title.text",e.dfltTitle.plot),n("title.xref"),n("title.yref"),n("title.x"),n("title.y"),n("title.xanchor"),n("title.yanchor"),n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l"),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(t.width&&t.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),t.width&&t.height&&.sanitizeMargins(e),s.getComponentMethod("grid","sizeDefaults")(t,e),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var l=n("uirevision");n("editrevision",l),n("selectionrevision",l),s.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),s.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,n),s.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,n),n("meta"),c.isPlainObject(t.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),s.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),s.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,n),c.coerce(t,e,v,"scattermode")},.plotAutoSize=function(t,e,r){var n,i,a=t.context||{},s=a.frameMargins,l=c.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(n=C(u.width)||C(u.maxWidth)||r.width,i=C(u.height)||C(u.maxHeight)||r.height,o(s)&&s>0){var f=1-2s;n=Math.round(fn),i=Math.round(f*i)}}var h=.layoutAttributes.width.min,p=.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}),.sanitizeMargins(r)},.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,u=e.basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in u.length||u.push(f),e.has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e.subplots)e.subplots[h].sort(c.subplotSort);for(a=0;a<u.length;a++)(o=u[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var p=e.modules;for(a=0;a<p.length;a++)(o=p[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e.transformModules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in l)(o=l[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},.purge=function(t){var e=t.fullLayout||{};void 0!==e.glcontainer&&(e.glcontainer.selectAll(".gl-canvas").remove(),e.glcontainer.remove(),e.glcanvas=null),e.modeBar&&e.modeBar.destroy(),t.transitionData&&(t.transitionData.interruptCallbacks&&(t.transitionData.interruptCallbacks.length=0),t.transitionData.animationRaf&&window.cancelAnimationFrame(t.transitionData.animationRaf)),c.clearThrottle(),c.clearResponsive(t),delete t.data,delete t.layout,delete t.fullData,delete t.fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t.promises,delete t.redrawTimer,delete t.hmlumcount,delete t.hmpixcount,delete t.transitionData,delete t.transitioning,delete t.initialAutoSize,delete t.transitioningWithDuration,delete t.dragging,delete t.dragged,delete t.dragdata,delete t.hoverdata,delete t.snapshotInProgress,delete t.editing,delete t.mouseDownTime,delete t.legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},.style=function(t){var e,r=t.fullLayout.visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&c.pushUnique(n,i.style)}for(e=0;e<n.length;e++)ne},.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(ei.l),i.r=Math.floor(ei.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(ei.t),i.b=Math.floor(ei.b))}},.clearAutoMarginIds=function(t){t.fullLayout.pushmarginIds={}},.allowAutoMargin=function(t,e){t.fullLayout.pushmarginIds[e]=1},.autoMargin=function(t,e,r){var n=t.fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=c.constrain(i-o.l-o.r,2,s),f=c.constrain(a-o.t-o.b,2,l),h=Math.max(0,i-u),p=Math.max(0,a-f),d=n.pushmargin,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,w=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:w,size:r.t+g}},v[e]=1}else delete d[e],delete v[e];if(!n.replotting)return .doAutoMargin(t)}},.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,l=c.extendFlat({},i),u=a.l,f=a.r,h=a.t,d=a.b,v=e.pushmargin,g=e.pushmarginIds,y=e.minreducedwidth,m=e.minreducedheight;if(!1!==e.margin.autoexpand){for(var x in v)g[x]||delete v[x];for(var b in v.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},v){var w=v[b].l||{},T=v[b].b||{},k=w.val,A=w.size,M=T.val,S=T.size;for(var E in v){if(o(A)&&v[E].r){var L=v[E].r.val,C=v[E].r.size;if(L>k){var O=(AL+(C-r)k)/(L-k),I=(C(1-k)+(A-r)(1-L))/(L-k);O+I>u+f&&(u=O,f=I)}}if(o(S)&&v[E].t){var D=v[E].t.val,z=v[E].t.size;if(D>M){var R=(SD+(z-n)M)/(D-M),F=(z(1-M)+(S-n)(1-D))/(D-M);R+F>d+h&&(d=R,h=F)}}}}}var B=c.constrain(r-a.l-a.r,2,y),N=c.constrain(n-a.t-a.b,2,m),j=Math.max(0,r-B),U=Math.max(0,n-N);if(j){var V=(u+f)/j;V>1&&(u/=V,f/=V)}if(U){var H=(d+h)/U;H>1&&(d/=H,h/=H)}if(i.l=Math.round(u),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e.replotting&&(.didMarginChange(l,i)||function(t){if("redrawFromAutoMarginCount"in t.fullLayout)return!1;var e=p.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 q=3*(1+Object.keys(g).length);if(e.redrawFromAutoMarginCount<q)return s.call("doPlot",t);e.size=l,c.warn("Too many auto-margin redraws.")}!function(t){var e=p.list(t,"",!0);["adjustTickLabelsOverflow","hideCounterAxisInsideTickLabels"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var O=["l","r","t","b","p","w","h"];function I(t,e,r){var n=!1,i=[.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,.rehover,.reselect,function(){return t.emit("plotly_transitioning",[]),new Promise((function(i){t.transitioning=!0,e.duration>0&&(t.transitioningWithDuration=!0),t.transitionData.interruptCallbacks.push((function(){n=!0})),r.redraw&&t.transitionData.interruptCallbacks.push((function(){return s.call("redraw",t)})),t.transitionData.interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){var e;o++,n||o!==a||(e=i,t.transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t.transitionData.interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",t)})).then((function(){t.transitioning=!1,t.transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(l),setTimeout(l())}))}],a=c.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}.didMarginChange=function(t,e){for(var r=0;r<O.length;r++){var n=O[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)return!0}return!1},.graphJson=function(t,e,r,n,i,a){(i&&e&&!t.fullData||i&&!e&&!t.fullLayout)&&.supplyDefaults(t);var o=i?t.fullData:t.data,s=i?t.fullLayout:t.layout,l=(t.transitionData||{}).frames;function u(t,e){if("function"==typeof t)return e?"function":null;if(c.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=u(t[a],e)}else e&&(i[a]="function")})),i}return Array.isArray(t)?t.map((function(t){return u(t,e)})):c.isTypedArray(t)?c.simpleMap(t,c.identity):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(s),i)){var h=s.size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=u(l)),a&&(f.config=u(t.context,!0)),"object"===n?f:JSON.stringify(f)},.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()},.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=.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]=.extendTrace(c.data[a],s.data[r]))}return c},.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)}},.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,u,f=c.extendDeepNoArrays({},e||{}),h=c.expandObjectPaths(f),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=c.nestedProperty(h,r[a])).get())?c.nestedProperty(p,r[a]).set(null):(n.set(null),c.nestedProperty(p,r[a]).set(i));if(t=c.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(l=c.nestedProperty(p,r[a]).get()){for(u=(s=c.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<l.length;o++){var d=l[o];u[o]=null===d?null:.extendObjectWithContainers(u[o],d)}s.set(u)}return t},.dataArrayContainers=["transforms","dimensions"],.layoutArrayContainers=s.layoutArrayContainers,.extendTrace=function(t,e){return .extendObjectWithContainers(t,e,.dataArrayContainers)},.extendLayout=function(t,e){return .extendObjectWithContainers(t,e,.layoutArrayContainers)},.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var u=a[o],f=t.fullData[u].module;if(f){if(f.animatable){var h=f.basePlotModule.name;s[h]||(s[h]=[]),s[h].push(u)}t.data[a[o]]=.extendTrace(t.data[a[o]],e[o])}}var p=c.expandObjectPaths(c.extendDeepNoArrays({},r)),d=/^[xy]axis[0-9]*$/;for(var v in p)d.test(v)&&delete p[v].range;.extendLayout(t.layout,p),delete t.calcdata,.supplyDefaults(t),.doCalcdata(t);var g=c.expandObjectPaths(r);if(g){var y=t.fullLayout.plots;for(var m in y){var x=y[m],b=x.xaxis,w=x.yaxis,T=b.range.slice(),k=w.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[w.name+".range"])?M=g[w.name+".range"].slice():Array.isArray((g[w.name]||{}).range)&&(M=g[w.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&&(w.r2l(k[0])!==w.r2l(M[0])||w.r2l(k[1])!==w.r2l(M[1]))&&(E={yr0:k,yr1:M}),(S||E)&&l.push(c.extendFlat({plotinfo:x},S,E))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t.fullLayout.basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var f in u?((n=c.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var h=s[f];t.fullData[h[0]].module.basePlotModule.plot(t,h,n,e)}},I(t,a,o)},.transitionFromReact=function(t,e,r,n){var i=t.fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i.