nopaque/app/static/libraries/plotly.js/js/plotly-gl3d.min.js
2024-04-11 11:08:37 +02:00

8 lines
1.5 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* plotly.js (gl3d - minified) v2.31.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly-gl3d.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={9288:function(t,e,r){"use strict";var n=r(3400),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},6712:function(t,e,r){"use strict";t.exports=r(1843)},6144:function(t,e,r){"use strict";t.exports=r(5396)},4680:function(t,e,r){"use strict";t.exports=r(6048)},2016:function(t,e,r){"use strict";t.exports=r(4884)},5556:function(t,e,r){"use strict";t.exports=r(6744)},6489:function(t,e,r){"use strict";t.exports=r(2028)},7988:function(t,e,r){"use strict";var n=r(2016);n.register([r(8824),r(9904),r(5120),r(3752),r(4340),r(4680),r(9800),r(6712),r(5556),r(6489),r(7312),r(6144)]),t.exports=n},5120:function(t,e,r){"use strict";t.exports=r(6296)},4340:function(t,e,r){"use strict";t.exports=r(2640)},8824:function(t,e,r){"use strict";t.exports=r(3296)},7312:function(t,e,r){"use strict";t.exports=r(6272)},9800:function(t,e,r){"use strict";t.exports=r(5436)},9904:function(t,e,r){"use strict";t.exports=r(1304)},3752:function(t,e,r){"use strict";t.exports=r(7776)},2196: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}]},3916:function(t,e,r){"use strict";var n=r(2196),i=r(5376),a=r(3816),o=r(1780).templatedArray;r(6208),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"}}})},272:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(6196).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"],d=3*t.arrowsize*t.arrowwidth||0,p=d+h,v=d-h,g=3*t.startarrowsize*t.arrowwidth||0,m=g+h,y=g-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:p,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,m),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else m=s?m+s:m,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,p,m),ppadminus:Math.max(f,v,y)});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)}},2300:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(1780).arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,f=[],h=[],d=[],p=(e||[]).length;for(r=0;r<c.length;r++)if(a=(i=c[r]).clicktoshow){for(n=0;n<p;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:d:f).push(r);break}n===p&&i.visible&&"onout"===a&&h.push(r)}return{on:f,off:h,explicitOff:d}}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)}}}},7192:function(t,e,r){"use strict";var n=r(3400),i=r(6308);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,d=a("arrowside");-1!==d.indexOf("end")&&(f=a("arrowhead"),h=a("arrowsize")),-1!==d.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 p=a("hovertext"),v=r.hoverlabel||{};if(p){var g=a("hoverlabel.bgcolor",v.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),m=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||m})}a("captureevents",!!p)}},9208:function(t,e,r){"use strict";var n=r(8248),i=r(6896);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&&d(f),l["a"+f+"ref"]===e._id&&d("a"+f);function d(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)}}},5216:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(7192),s=r(3916);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],d={_fullLayout:r},p=0;p<2;p++){var v=f[p],g=i.coerceRef(t,e,d,v,"","paper");if("paper"!==g&&i.getFromId(d,g)._annIndices.push(e._index),i.coercePosition(e,d,a,g,v,.5),c){var m="a"+v,y=i.coerceRef(t,e,d,m,"pixel",["pixel","paper"]);"pixel"!==y&&y!==g&&(y=e[m]="pixel");var x="pixel"===y?h[p]:.4;i.coercePosition(e,d,a,y,m,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,d,e.xref),e._yclick=void 0===_?e.y:i.cleanPosition(_,d,e.yref)}}}t.exports=function(t,e){a(t,e,{name:"annotations",handleItemDefaults:l})}},6196:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(4460),u=r(6308),c=r(3616),f=r(3024),h=r(2736),d=r(3972),p=r(6476),v=r(1780).arrayEditor,g=r(3652);function m(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),x(t,r,e,!1,n,i)}function y(t,e,r,n,i){var a=i[r],o=i[r+"ref"],s=-1!==r.indexOf("y"),u="domain"===l.getRefType(o),c=s?n.h:n.w;return t?u?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/c}function x(t,e,r,a,m,x){var b,_,w=t._fullLayout,M=t._fullLayout._size,T=t._context.edits;a?(b="annotation-"+a,_=a+".annotations"):(b="annotation",_="annotations");var A=v(t.layout,_,e),k=A.modifyBase,L=A.modifyItem,S=A.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var E="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var C={x:{},y:{}},O=+e.textangle||0,R=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",e.opacity),P=R.append("g").classed("annotation-text-g",!0),D=T[e.showarrow?"annotationTail":"annotationPosition"],I=e.captureevents||T.annotationText||D,z=P.append("g").style("pointer-events",I?"all":null).call(d,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",W(n.event))}));e.hovertext&&z.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 N=e.borderwidth,F=e.borderpad,B=N+F,j=z.append("rect").attr("class","bg").style("stroke-width",N+"px").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),U=e.width||e.height,H=w._topclips.selectAll("#"+E).data(U?[0]:[]);H.enter().append("clipPath").classed("annclip",!0).attr("id",E).append("rect"),H.exit().remove();var V=e.font,Y=w._meta?o.templateString(e.text,w._meta):e.text,G=z.append("text").classed("annotation-text",!0).text(Y);T.annotationText?G.call(h.makeEditable,{delegate:z,gd:t}).call(q).on("edit",(function(r){e.text=r,this.call(q),L("text",r),m&&m.autorange&&k(m._name+".autorange",!0),x&&x.autorange&&k(x._name+".autorange",!0),i.call("_guiRelayout",t,S())})):G.call(q)}else n.selectAll("#"+E).remove();function W(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return a&&(n.subplotId=a),n}function q(r){return r.call(c.font,V).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),h.convertToTspans(r,t,X),r}function X(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&z.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=z.select(".annotation-text-math-group"),f=!n.empty(),v=c.bBox((f?n:G).node()),b=v.width,_=v.height,A=e.width||b,I=e.height||_,F=Math.round(A+2*B),V=Math.round(I+2*B);function Y(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 q=!1,X=["x","y"],Z=0;Z<X.length;Z++){var J,K,Q,$,tt,et=X[Z],rt=e[et+"ref"]||et,nt=e["a"+et+"ref"],it={x:m,y:x}[et],at=(O+("x"===et?0:-90))*Math.PI/180,ot=F*Math.cos(at),st=V*Math.sin(at),lt=Math.abs(ot)+Math.abs(st),ut=e[et+"anchor"],ct=e[et+"shift"]*("x"===et?1:-1),ft=C[et],ht=l.getRefType(rt);if(it&&"domain"!==ht){var dt=it.r2fraction(e[et]);(dt<0||dt>1)&&(nt===rt?((dt=it.r2fraction(e["a"+et]))<0||dt>1)&&(q=!0):q=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var pt="domain"===ht;"x"===et?(Q=e[et],J=pt?it._offset+it._length*Q:J=M.l+M.w*Q):(Q=1-e[et],J=pt?it._offset+it._length*Q:J=M.t+M.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var vt=e["a"+et];if(tt=ot*Y(.5,e.xanchor)-st*Y(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(vt=1-vt),ft.tail=it._offset+it._length*vt):"paper"===gt?"y"===et?(vt=1-vt,ft.tail=M.t+M.h*vt):ft.tail=M.l+M.w*vt:ft.tail=it._offset+it.r2p(vt),K=tt}else ft.tail=J+vt,K=tt+vt;ft.text=ft.tail+tt;var mt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,mt-1)),"pixel"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-mt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ct,ft.head+=ct}else K=tt=lt*Y($,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(q)z.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(A-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(I-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:B+bt-1,y:B+_t}).call(c.setClipUrl,U?E:null,t);else{var wt=B+_t-v.top,Mt=B+bt-v.left;G.call(h.positionText,Mt,wt).call(c.setClipUrl,U?E:null,t)}H.select("rect").call(c.setRect,B,B,A,I),j.call(c.setRect,N/2,N/2,F-N,V-N),z.call(c.setTranslate,Math.round(C.x.text-F/2),Math.round(C.y.text-V/2)),P.attr({transform:"rotate("+O+","+C.x.text+","+C.y.text+")"});var Tt,At=function(r,n){R.selectAll(".annotation-arrow-g").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,d=C.y.tail+n,v=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(O,v,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),E=+j.attr("width"),D=+j.attr("height"),I=v-.5*E,N=I+E,F=b-.5*D,B=F+D,U=[[I,F,I,B],[I,B,N,B],[N,B,N,F],[N,F,I,F]].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,d,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,d=e.y)}));var H=e.arrowwidth,V=e.arrowcolor,Y=e.arrowside,G=R.append("g").style({opacity:u.opacity(V)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+d+"L"+l+","+f).style("stroke-width",H+"px").call(u.stroke,u.rgb(V));if(g(W,Y,e),T.annotationPosition&&W.node().parentNode&&!a){var q=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-d,2));q+=e.standoff*(h-l)/Z,X+=e.standoff*(d-f)/Z}var J,K,Q=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-q)+","+(d-X),transform:s(q,X)}).style("stroke-width",H+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");p.init({element:Q.node(),gd:t,prepFn:function(){var t=c.getTranslate(z);J=t.x,K=t.y,m&&m.autorange&&k(m._name+".autorange",!0),x&&x.autorange&&k(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;z.call(c.setTranslate,i,a),L("x",y(m,t,"x",M,e)),L("y",y(x,r,"y",M,e)),e.axref===e.xref&&L("ax",y(m,t,"ax",M,e)),e.ayref===e.yref&&L("ay",y(x,r,"ay",M,e)),G.attr("transform",s(t,r)),P.attr({transform:"rotate("+O+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,S());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&At(0,0),D&&p.init({element:z.node(),gd:t,prepFn:function(){Tt=P.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?L("ax",y(m,t,"ax",M,e)):L("ax",e.ax+t),e.ayref===e.yref?L("ay",y(x,r,"ay",M.w,e)):L("ay",e.ay+r),At(t,r);else{if(a)return;var i,o;if(m)i=y(m,t,"x",M,e);else{var l=e._xsize/M.w,u=e.x+(e._xshift-e.xshift)/M.w-l/2;i=p.align(u+t/M.w,l,0,1,e.xanchor)}if(x)o=y(x,r,"y",M,e);else{var c=e._ysize/M.h,f=e.y-(e._yshift+e.yshift)/M.h-c/2;o=p.align(f-r/M.h,c,0,1,e.yanchor)}L("x",i),L("y",o),m&&x||(n=p.getCursor(m?.5:i,x?.5:o,e.xanchor,e.yanchor))}P.attr({transform:s(t,r)+Tt}),d(z,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",W(n))},doneFn:function(){d(z),i.call("_guiRelayout",t,S());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&&m(t,r);return a.previousPromises(t)},drawOne:m,drawRaw:x}},3652:function(t,e,r){"use strict";var n=r(3428),i=r(6308),a=r(2196),o=r(3400),s=o.strScale,l=o.strRotate,u=o.strTranslate;t.exports=function(t,e,r){var o,c,f,h,d=t.node(),p=a[r.arrowhead||0],v=a[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),m=(r.arrowwidth||1)*(r.startarrowsize||1),y=e.indexOf("start")>=0,x=e.indexOf("end")>=0,b=p.backoff*g+r.standoff,_=v.backoff*m+r.startstandoff;if("line"===d.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,M=o.y-c.y;if(h=(f=Math.atan2(M,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+M*M))return void D();if(b){if(b*b>w*w+M*M)return void D();var T=b*Math.cos(f),A=b*Math.sin(f);c.x+=T,c.y+=A,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+M*M)return void D();var k=_*Math.cos(f),L=_*Math.sin(f);o.x-=k,o.y-=L,t.attr({x1:o.x,y1:o.y})}}else if("path"===d.nodeName){var S=d.getTotalLength(),E="";if(S<b+_)return void D();var C=d.getPointAtLength(0),O=d.getPointAtLength(.1);f=Math.atan2(C.y-O.y,C.x-O.x),o=d.getPointAtLength(Math.min(_,S)),E="0px,"+_+"px,";var R=d.getPointAtLength(S),P=d.getPointAtLength(S-.1);h=Math.atan2(R.y-P.y,R.x-P.x),c=d.getPointAtLength(Math.max(0,S-b)),E+=S-(E?_+b:b)+"px,"+S+"px",t.style("stroke-dasharray",E)}function D(){t.style("stroke-dasharray","0px,100px")}function I(e,a,o,c){e.path&&(e.noRotate&&(o=0),n.select(d.parentNode).append("path").attr({class:t.attr("class"),d:e.path,transform:u(a.x,a.y)+l(180*o/Math.PI)+s(c)}).style({fill:i.rgb(r.arrowcolor),"stroke-width":0}))}y&&I(v,o,f,m),x&&I(p,c,h,g)}},9180:function(t,e,r){"use strict";var n=r(6196),i=r(2300);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(3916),supplyLayoutDefaults:r(5216),includeBasePlot:r(6632)("annotations"),calcAutorange:r(272),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(9208)}},5899:function(t,e,r){"use strict";var n=r(3916),i=r(7824).overrideAll,a=r(1780).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")},76:function(t,e,r){"use strict";var n=r(3400),i=r(4460);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()}},2808:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(7192),s=r(5899);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})}},1836:function(t,e,r){"use strict";var n=r(6196).drawRaw,i=r(4424),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],d=e[f+"axis"].r2fraction(h);if(d<0||d>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))}}},6864:function(t,e,r){"use strict";var n=r(4040),i=r(3400);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(5899)}}},layoutAttributes:r(5899),handleDefaults:r(2808),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(76),draw:r(1836)}},4976:function(t,e,r){"use strict";t.exports=r(8700),r(5168),r(7020),r(7411),r(3288),r(2787),r(2084),r(6368),r(4747),r(5616),r(632),r(5420),r(1104),r(9075),r(4592),r(5348)},5396:function(t,e,r){"use strict";var n=r(4976),i=r(3400),a=r(9032),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 d(t){var e=h[t];return e||(h[t]=n.instance(t))}function p(t){return i.extendFlat({},l,{description:t})}function v(t){return"Sets the calendar system to use with `"+t+"` date data."}var g={xcalendar:p(v("x"))},m=i.extendFlat({},g,{ycalendar:p(v("y"))}),y=i.extendFlat({},m,{zcalendar:p(v("z"))}),x=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:y,surface:y,mesh3d:y,scattergl:m,ohlc:g,candlestick:g},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults: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:d,worldCalFmt:function(t,e,r){for(var n,i,a,l,u,h=Math.floor((e+.05)/s)+o,p=d(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:p.formatDate(l[n]),t=t.substr(0,v)+u+t.substr(v+a),v+=u.length):v+=a;return t}}},2548: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},6308:function(t,e,r){"use strict";var n=r(9760),i=r(8248),a=r(8116).isTypedArray,o=t.exports={},s=r(2548);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},616:function(t,e,r){"use strict";var n=r(4724),i=r(5376),a=r(2880).extendFlat,o=r(7824).overrideAll;t.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},3964: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"}}},4013:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(6332),o=r(5404),s=r(5936),l=r(2568),u=r(616);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 d=r.margin||{t:0,b:0,l:0,r:0},p=r.width-d.l-d.r,v=r.height-d.t-d.b,g="v"===h("orientation"),m=h("thicknessmode");h("thickness","fraction"===m?30/(g?p:v):30);var y=h("lenmode");h("len","fraction"===y?1:g?v:p);var x,b,_,w="paper"===h("yref"),M="paper"===h("xref"),T="left";g?(_="middle",T=M?"left":"right",x=M?1.02:1,b=.5):(_=w?"bottom":"top",T="center",x=.5,b=w?1.02:1),n.coerce(f,c,{x:{valType:"number",min:M?-2:0,max:M?3:1,dflt:x}},"x"),n.coerce(f,c,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:b}},"y"),h("xanchor",T),h("xpad"),h("yanchor",_),h("ypad"),n.noneOrAll(f,c,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var A=n.coerce(f,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",-1!==A.indexOf("inside")?"hide past domain":"hide past div"),a(f,c,h,"linear");var k=r.font,L={noAutotickangles:!0,outerTicks:!1,font:k};-1!==A.indexOf("inside")&&(L.bgColor="black"),l(f,c,h,"linear",L),s(f,c,h,"linear",L),o(f,c,h,"linear",L),h("title.text",r._dfltTitle.colorbar);var S=c.showticklabels?c.tickfont:k,E=n.extendFlat({},S,{color:k.color,size:n.bigFont(S.size)});n.coerceFont(h,"title.font",E),h("title.side",g?"top":"right")}},7848:function(t,e,r){"use strict";var n=r(3428),i=r(9760),a=r(7316),o=r(4040),s=r(4460),l=r(6476),u=r(3400),c=u.strTranslate,f=r(2880).extendFlat,h=r(3972),d=r(3616),p=r(6308),v=r(1668),g=r(2736),m=r(4288).flipScale,y=r(5955),x=r(7668),b=r(4724),_=r(4284),w=_.LINE_SPACING,M=_.FROM_TL,T=_.FROM_BR,A=r(3964).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?m(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var c=0;c<o.length;c++){var h=o[c];if((n=h[0].trace)._module){var d=n._module.colorbar;if(!0===n.visible&&d)for(var p=Array.isArray(d),v=p?d:[d],g=0;g<v.length;g++){var y=(i=v[g]).container;(r=y?n[y]:n)&&r.showscale&&((e=l(r.colorbar))._id="cb"+n.uid+(p&&y?"-"+y:""),e._traceIndex=n.index,e._propPrefix=(y?y+".":"")+"colorbar.",e._meta=n._meta,u(),s.push(e))}}}for(var x in a._colorAxes)if((r=a[x]).showscale){var b=a._colorAxes[x];(e=l(r.colorbar))._id="cb"+x,e._propPrefix=x+".colorbar.",e._meta=a._meta,i={min:"cmin",max:"cmax"},"heatmap"!==b[0]&&(n=b[1],i.calc=n._module.colorbar.calc),u(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append("g").attr("class",(function(t){return t._id})).classed(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 m=function(t,e,r){var o="v"===e.orientation,l=e.len,h=e.lenmode,m=e.thickness,_=e.thicknessmode,k=e.outlinewidth,L=e.borderwidth,S=e.bgcolor,E=e.xanchor,C=e.yanchor,O=e.xpad,R=e.ypad,P=e.x,D=o?e.y:1-e.y,I="paper"===e.yref,z="paper"===e.xref,N=r._fullLayout,F=N._size,B=e._fillcolor,j=e._line,U=e.title,H=U.side,V=e._zrange||n.extent(("function"==typeof B?B:j.color).domain()),Y="function"==typeof j.color?j.color:function(){return j.color},G="function"==typeof B?B:function(){return B},W=e._levels,q=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,u=a.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(i=0;i<1e5&&(n=a.start+i*u,!(u>0?n>=l:n<=l));i++)n>c&&n<f&&o.push(n);if(e._fillgradient)s=[0];else if("function"==typeof e._fillcolor){var h=e._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,i=0;i<1e5&&(n=h.start+i*u,!(u>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&"string"==typeof e._fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,V),X=q.fill,Z=q.line,J=Math.round(m*("fraction"===_?o?F.w:F.h:1)),K=J/(o?F.w:F.h),Q=Math.round(l*("fraction"===h?o?F.h:F.w:1)),$=Q/(o?F.h:F.w),tt=z?F.w:r._fullLayout.width,et=I?F.h:r._fullLayout.height,rt=Math.round(o?P*tt+O:D*et+R),nt={center:.5,right:1}[E]||0,it={top:1,middle:.5}[C]||0,at=o?P-nt*K:D-it*K,ot=o?D-it*$:P-nt*$,st=Math.round(o?et*(1-ot):tt*ot);e._lenFrac=$,e._thickFrac=K,e._uFrac=at,e._vFrac=ot;var lt=e._axis=function(t,e,r){var n=t._fullLayout,i="v"===e.orientation,a={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,labelalias:e.labelalias,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+e._id},l={letter:o,font:n.font,noAutotickangles:"y"===o,noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function c(t,e){return u.coerce(a,s,b,t,e)}return y(a,s,c,l,n),x(a,s,c,l),s}(r,e,V);lt.position=K+(o?P+O/F.w:D+R/F.h);var ut=-1!==["top","bottom"].indexOf(H);if(o&&ut&&(lt.title.side=H,lt.titlex=P+O/F.w,lt.titley=ot+("top"===U.side?$-R/F.h:R/F.h)),o||ut||(lt.title.side=H,lt.titley=D+R/F.h,lt.titlex=ot+O/F.w),j.color&&"auto"===e.tickmode){lt.tickmode="linear",lt.tick0=W.start;var ct=W.size,ft=u.constrain(Q/50,4,15)+1,ht=(V[1]-V[0])/((e.nticks||ft)*ct);if(ht>1){var dt=Math.pow(10,Math.floor(Math.log(ht)/Math.LN10));ct*=dt*u.roundUp(ht/dt,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ct}lt.domain=o?[ot+R/F.h,ot+$-R/F.h]:[ot+O/F.w,ot+$-O/F.w],lt.setScale(),t.attr("transform",c(Math.round(F.l),Math.round(F.t)));var pt,vt=t.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(F.l),-Math.round(F.t))),gt=lt.ticklabelposition,mt=lt.title.font.size,yt=t.select("."+A.cbaxis),xt=0,bt=0;function _t(n,i){var a={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:N._dfltTitle.colorbar,containerGroup:t.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(a,i||{}))}return u.syncOrAsync([a.previousPromises,function(){var t,e;(o&&ut||!o&&!ut)&&("top"===H&&(t=O+F.l+tt*P,e=R+F.t+et*(1-ot-$)+3+.75*mt),"bottom"===H&&(t=O+F.l+tt*P,e=R+F.t+et*(1-ot)-3-.25*mt),"right"===H&&(e=R+F.t+et*D+3+.75*mt,t=O+F.l+tt*ot),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ut||o&&ut){var a,l=t.select("."+A.cbtitle),f=l.select("text"),h=[-k/2,k/2],p=l.select(".h"+lt._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),p?(a=d.bBox(p),bt=a.width,(xt=a.height)>v&&(h[1]-=(xt-v)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=d.bBox(f.node()),bt=a.width,xt=a.height),o){if(xt){if(xt+=5,"top"===H)lt.domain[1]-=xt/F.h,h[1]*=-1;else{lt.domain[0]+=xt/F.h;var m=g.lineCount(f);h[1]+=(1-m)*v}l.attr("transform",c(h[0],h[1])),lt.setScale()}}else bt&&("right"===H&&(lt.domain[0]+=(bt+mt/2)/F.w),l.attr("transform",c(h[0],h[1])),lt.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?c(0,Math.round(F.h*(1-lt.domain[1]))):c(Math.round(F.w*lt.domain[0]),0)),yt.attr("transform",o?c(0,Math.round(-F.t)):c(Math.round(-F.l),0));var y=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(X);y.enter().append("rect").classed(A.cbfill,!0).attr("style",""),y.exit().remove();var x=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?V[0]:(X[a]+X[a-1])/2,a===X.length-1?V[1]:(X[a]+X[a+1])/2].map(lt.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",rt).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)d.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var c=G(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(j.color&&j.width?Z:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+j.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+J).call(d.lineGroupStyle,j.width,Y(t),j.dash)})),yt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+J+(k||0)/2-("outside"===e.ticks?1:0),M=s.calcTicks(lt),T=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,M):M,layer:yt,path:s.makeTickPath(lt,_,T),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:M,layer:yt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(o&&!ut||!o&&ut){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===H)i=s,t=F.l+tt*a+10+mt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===H&&(i=F.t+et*a+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===H){var l=U.text.split("<br>").length;i=F.t+et*a+10-J-w*mt*l}_t((o?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:H,offsetTop:o?0:F.t,offsetLeft:o?F.l:0,maxShift:o?N.width:N.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=J+k/2;-1===gt.indexOf("inside")&&(n=d.bBox(yt.node()),s+=o?n.width:n.height),pt=vt.select("text");var u=0,f=o&&"top"===H,v=!o&&"right"===H,g=0;if(pt.node()&&!pt.classed(A.jsPlaceholder)){var y,x=vt.select(".h"+lt._id+"title-math-group").node();x&&(o&&ut||!o&&!ut)?(u=(n=d.bBox(x)).width,y=n.height):(u=(n=d.bBox(vt.node())).right-F.l-(o?rt:st),y=n.bottom-F.t-(o?st:rt),o||"top"!==H||(s+=n.height,g=n.height)),v&&(pt.attr("transform",c(u/2+mt/2,0)),u*=2),s=Math.max(s,o?u:y)}var b=2*(o?O:R)+s+L+k/2,w=0;!o&&U.text&&"bottom"===C&&D<=0&&(b+=w=b/2,g+=w),N._hColorbarMoveTitle=w,N._hColorbarMoveCBTitle=g;var B=L+k,j=(o?rt:st)-B/2-(o?O:0),V=(o?st:rt)-(o?Q:R+g-w);t.select("."+A.cbbg).attr("x",j).attr("y",V).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(Q+B,2)).call(p.fill,S).call(p.stroke,e.bordercolor).style("stroke-width",L);var Y=v?Math.max(u-10,0):0;t.selectAll("."+A.cboutline).attr("x",(o?rt:st+O)+Y).attr("y",(o?st+R-Q:rt)+(f?xt:0)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(Q-(o?2*R+xt:2*O+Y),2)).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":k});var G=o?nt*b:0,W=o?0:(1-it)*b-g;if(G=z?F.l-G:-G,W=I?F.t-W:-W,t.attr("transform",c(G,W)),!o&&(L||i(S).getAlpha()&&!i.equals(N.paper_bgcolor,S))){var q=yt.selectAll("text"),X=q[0].length,Z=t.select("."+A.cbbg).node(),K=d.bBox(Z),$=d.getTranslate(t);q.each((function(t,e){var r=X-1;if(0===e||e===r){var n,i=d.bBox(this),a=d.getTranslate(this);if(e===r){var o=i.right+a.x;(n=K.right+$.x+st-L-2+P-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=K.left+$.x+st+L+2-s)<0&&(n=0)}n&&(X<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=M[E],at=T[E],ot=M[C],ct=T[C],ft=b-J;o?("pixels"===h?(tt.y=D,tt.t=Q*ot,tt.b=Q*ct):(tt.t=tt.b=0,tt.yt=D+l*ot,tt.yb=D-l*ct),"pixels"===_?(tt.x=P,tt.l=b*et,tt.r=b*at):(tt.l=ft*et,tt.r=ft*at,tt.xl=P-m*et,tt.xr=P+m*at)):("pixels"===h?(tt.x=P,tt.l=Q*et,tt.r=Q*at):(tt.l=tt.r=0,tt.xl=P+l*et,tt.xr=P-l*at),"pixels"===_?(tt.y=1-D,tt.t=b*ot,tt.b=b*ct):(tt.t=ft*ot,tt.b=ft*ct,tt.yt=D-m*ot,tt.yb=D+m*ct));var ht=e.y<.5?"b":"t",dt=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var bt={r:N.width-j-G,l:j+tt.r,b:N.height-V-W,t:V+tt.b};z&&I?a.autoMargin(r,e._id,tt):z?r._fullLayout._reservedMargin[e._id][ht]=bt[ht]:I||o?r._fullLayout._reservedMargin[e._id][dt]=bt[dt]:r._fullLayout._reservedMargin[e._id][ht]=bt[ht]}],r)}(r,e,t);m&&m.then&&(t._promises||[]).push(m),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},553:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t){return n.isPlainObject(t.colorbar)}},5080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(616),supplyDefaults:r(4013),draw:r(7848).draw,hasColorbar:r(553)}},9084:function(t,e,r){"use strict";var n=r(616),i=r(3756).counter,a=r(2996),o=r(8304).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 d=a+"auto",p=a+"min",v=a+"max",g=a+"mid",m=(s(h+d),s(h+p),s(h+v),{});m[p]=m[v]=void 0;var y={};y[d]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:m},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:m},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},7128:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(4288).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,d=f.min,p=f.max,v=f.mid,g=function(){return i.aggNums(Math.min,null,l)},m=function(){return i.aggNums(Math.max,null,l)};void 0===d?d=g():h&&(d=c._colorAx&&n(d)?Math.min(d,g()):g()),void 0===p?p=m():h&&(p=c._colorAx&&n(p)?Math.max(p,m()):m()),h&&void 0!==v&&(p-v>v-d?d=v-(p-v):p-v<v-d&&(p=v+(v-d))),d===p&&(d-=.5,p+=.5),f._sync("min",d),f._sync("max",p),f.autocolorscale&&(o=d*p<0?s.colorscale.diverging:d>=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},5504:function(t,e,r){"use strict";var n=r(3400),i=r(4288).hasColorscale,a=r(4288).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"})}},7260:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(553),o=r(4013),s=r(8304).isValid,l=r(4040).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 d=h.prefix,p=h.cLetter,v="_module"in r,g=u(e,d),m=u(r,d),y=u(r._template||{},d)||{},x=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,c,f,h)};if(v){var b=c._colorAxes||{},_=f(d+"coloraxis");if(_){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",M=b[_];return void(M?(M[2].push(x),M[0]!==w&&(M[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var T=g[p+"min"],A=g[p+"max"],k=n(T)&&n(A)&&T<A;f(d+p+"auto",!k)?f(d+p+"mid"):(f(d+p+"min"),f(d+p+"max"));var L,S,E=g.colorscale,C=y.colorscale;void 0!==E&&(L=!s(E)),void 0!==C&&(L=!s(C)),f(d+"autocolorscale",L),f(d+"colorscale"),f(d+"reversescale"),"marker.line."!==d&&(d&&v&&(S=a(g)),f(d+"showscale",S)&&(d&&y&&(m._template=y),o(g,m,c)))}},4288:function(t,e,r){"use strict";var n=r(3428),i=r(9760),a=r(8248),o=r(3400),s=r(6308),l=r(8304).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?d(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 d(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 p(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,d=n.scale.linear().domain(r).range(u).clamp(!0),p=e.noNumericCheck,g=e.returnArray;return(h=p&&g?d:p?function(t){return v(d(t))}:g?function(t){return a(t)?d(t):i(t).isValid()?t:s.defaultLine}:function(t){return a(t)?v(d(t)):i(t).isValid()?t:s.defaultLine}).domain=d.domain,h.range=function(){return o},h}function v(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}t.exports={hasColorscale:function(t,e,r){var n=e?o.nestedProperty(t,e).get()||{}:t,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var s=!1;if(o.isArrayOrTypedArray(i))for(var u=0;u<i.length;u++)if(a(i[u])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||a(n.cmin)&&a(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:f,extractScale:h,flipScale:d,makeColorScaleFunc:p,makeColorScaleFuncFromTrace:function(t,e){return p(h(t),e)}}},8932:function(t,e,r){"use strict";var n=r(8304),i=r(4288);t.exports={moduleType:"component",name:"colorscale",attributes:r(9084),layoutAttributes:r(2332),supplyLayoutDefaults:r(1608),handleDefaults:r(7260),crossTraceDefaults:r(5504),calc:r(7128),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}},2332:function(t,e,r){"use strict";var n=r(2880).extendFlat,i=r(9084),a=r(8304).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}))}},1608:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(2332),o=r(7260);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 d=0;d<h[2].length;d++)h[2][d]();delete e._colorAxes[f]}}}},8304:function(t,e,r){"use strict";var n=r(9760),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)}}},8316: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}},7416:function(t,e,r){"use strict";var n=r(3400),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},2760: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)}},6476:function(t,e,r){"use strict";var n=r(9128),i=r(2264),a=r(9184),o=r(3400).removeElement,s=r(3816),l=t.exports={};l.align=r(8316),l.getCursor=r(7416);var u=r(2616);function c(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,h,d,p,v,g=t.gd,m=1,y=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],p=a.target,d=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<y?m+=1:(m=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",M),document.addEventListener("touchend",M),!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 M(e){if(delete g._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),i?o(h):u&&(h.documentElement.style.cursor=u,u=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>y&&(m=Math.max(m-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(m,d),!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)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=c},2616:function(t,e,r){"use strict";var n=r(5924),i=r(1200),a=r(2200).getGraphDiv,o=r(2456),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}))}},8192:function(t,e){"use strict";e.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},3616:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.numberFormat,o=r(8248),s=r(9760),l=r(4040),u=r(6308),c=r(8932),f=i.strTranslate,h=r(2736),d=r(9616),p=r(4284).LINE_SPACING,v=r(3448).DESELECTDIM,g=r(3028),m=r(7152),y=r(624).appendArrayPointValue,x=t.exports={};function b(t,e,r,n){var i=e.fillpattern,a=e.fillgradient,o=i&&x.getPatternAttr(i.shape,0,"");if(o){var s=x.getPatternAttr(i.bgcolor,0,null),l=x.getPatternAttr(i.fgcolor,0,null),c=i.fgopacity,f=x.getPatternAttr(i.size,0,8),h=x.getPatternAttr(i.solidity,0,.3),d=e.uid;x.pattern(t,"point",r,d,o,f,h,void 0,i.fillmode,s,l,c)}else if(a&&"none"!==a.type){var p,v,g=a.type,m="scatterfill-"+e.uid;n&&(m="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===g&&(g+="reversed"),t.call(x.gradient,r,m,g,a.colorscale,"fill")):("horizontal"===g?(p={x:a.start,y:0},v={x:a.stop,y:0}):"vertical"===g&&(p={x:0,y:a.start},v={x:0,y:a.stop}),p.x=e._xA.c2p(void 0===p.x?e._extremes.x.min[0].val:p.x,!0),p.y=e._yA.c2p(void 0===p.y?e._extremes.y.min[0].val:p.y,!0),v.x=e._xA.c2p(void 0===v.x?e._extremes.x.max[0].val:v.x,!0),v.y=e._yA.c2p(void 0===v.y?e._extremes.y.max[0].val:v.y,!0),t.call(k,r,m,"linear",a.colorscale,"fill",p,v,!0,!1))}else e.fillcolor&&t.call(u.fill,e.fillcolor)}x.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(u).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());b(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},x.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&b(i,t[0].trace,e,r)}))};var _=r(1984);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 M(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var T=a("~f"),A={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function k(t,e,r,a,o,l,c,f,h,d){var p,v=o.length;"linear"===a?p={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:f.x,y2:f.y,gradientUnits:h?"userSpaceOnUse":"objectBoundingBox"},reversed:d}:"radial"===a&&(p={node:"radialGradient",reversed:d});for(var g=new Array(v),m=0;m<v;m++)p.reversed?g[v-1-m]=[T(100*(1-o[m][0])),o[m][1]]:g[m]=[T(100*o[m][0]),o[m][1]];var y=e._fullLayout,x="g"+y._uid+"-"+r,b=y._defs.select(".gradients").selectAll("#"+x).data([a+g.join(";")],i.identity);b.exit().remove(),b.enter().append(p.node).each((function(){var t=n.select(this);p.attrs&&t.attr(p.attrs),t.attr("id",x);var e=t.selectAll("stop").data(g);e.exit().remove(),e.enter().append("stop"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+"%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}))})),t.style(l,U(x,e)).style(l+"-opacity",null),t.classed("gradient_filled",!0)}x.gradient=function(t,e,r,n,i,a){var o=A[n];return k(t,e,r,o.type,i,a,o.start,o.stop,!1,o.reversed)},x.pattern=function(t,e,r,a,o,l,c,f,h,d,p,v){var g="legend"===e;f&&("overlay"===h?(d=f,p=u.contrast(d)):(d=void 0,p=f));var m,y,x,b,_,w,M,T,A,k=r._fullLayout,L="p"+k._uid+"-"+a,S={},E=s(p),C=u.tinyRGB(E),O=v*E.getAlpha();switch(o){case"/":m=l*Math.sqrt(2),y=l*Math.sqrt(2),w="path",S={d:x="M-"+m/4+","+y/4+"l"+m/2+",-"+y/2+"M0,"+y+"L"+m+",0M"+m/4*3+","+y/4*5+"l"+m/2+",-"+y/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"\\":m=l*Math.sqrt(2),y=l*Math.sqrt(2),w="path",S={d:x="M"+m/4*3+",-"+y/4+"l"+m/2+","+y/2+"M0,0L"+m+","+y+"M-"+m/4+","+y/4*3+"l"+m/2+","+y/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"x":m=l*Math.sqrt(2),y=l*Math.sqrt(2),x="M-"+m/4+","+y/4+"l"+m/2+",-"+y/2+"M0,"+y+"L"+m+",0M"+m/4*3+","+y/4*5+"l"+m/2+",-"+y/2+"M"+m/4*3+",-"+y/4+"l"+m/2+","+y/2+"M0,0L"+m+","+y+"M-"+m/4+","+y/4*3+"l"+m/2+","+y/2,b=l-l*Math.sqrt(1-c),w="path",S={d:x,opacity:O,stroke:C,"stroke-width":b+"px"};break;case"|":w="path",w="path",S={d:x="M"+(m=l)/2+",0L"+m/2+","+(y=l),opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"-":w="path",w="path",S={d:x="M0,"+(y=l)/2+"L"+(m=l)+","+y/2,opacity:O,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"+":w="path",x="M"+(m=l)/2+",0L"+m/2+","+(y=l)+"M0,"+y/2+"L"+m+","+y/2,b=l-l*Math.sqrt(1-c),w="path",S={d:x,opacity:O,stroke:C,"stroke-width":b+"px"};break;case".":m=l,y=l,c<Math.PI/4?_=Math.sqrt(c*l*l/Math.PI):(M=c,T=Math.PI/4,1,_=(A=l/2)+(l/Math.sqrt(2)-A)*(M-T)/(1-T)),w="circle",S={cx:m/2,cy:y/2,r:_,opacity:O,fill:C}}var R=[o||"noSh",d||"noBg",p||"noFg",l,c].join(";"),P=k._defs.select(".patterns").selectAll("#"+L).data([R],i.identity);P.exit().remove(),P.enter().append("pattern").each((function(){var t=n.select(this);if(t.attr({id:L,width:m+"px",height:y+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),d){var e=s(d),r=u.tinyRGB(e),i=e.getAlpha(),a=t.selectAll("rect").data([0]);a.exit().remove(),a.enter().append("rect").attr({width:m+"px",height:y+"px",fill:r,"fill-opacity":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(S)})),t.style("fill",U(L,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","patterns").selectAll("pattern").remove(),n.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},x.pointStyle=function(t,e,r,i){if(t.size()){var a=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,a,r,i)}))}},x.singlePointStyle=function(t,e,r,n,a,o){var s=r.marker,l=s.line;if(o&&o.i>=0&&void 0===t.i&&(t.i=o.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var c;c="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=c,n.selectedSizeFn&&(c=t.mrc=n.selectedSizeFn(t));var f=x.symbolNumber(t.mx||s.symbol)||0;t.om=f%200>=100;var h=et(t,r),d=Y(t,r);e.attr("d",M(f,c,h,d))}var p,v,g,m=!1;if(t.so)g=l.outlierwidth,v=l.outliercolor,p=s.outliercolor;else{var y=(l||{}).width;g=(t.mlw+1||y+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=u.defaultLine,m=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(u.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var b=s.gradient,_=t.mgt;_?m=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],A[_]||(_=0));var w=s.pattern,T=w&&x.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var k=t.mgc;k?m=!0:k=b.color;var L=r.uid;m&&(L+="-"+t.i),x.gradient(e,a,L,_,[[0,k],[1,p]],"fill")}else if(T){var S=!1,E=w.fgcolor;!E&&o&&o.color&&(E=o.color,S=!0);var C=x.getPatternAttr(E,t.i,o&&o.color||null),O=x.getPatternAttr(w.bgcolor,t.i,null),R=w.fgopacity,P=x.getPatternAttr(w.size,t.i,8),D=x.getPatternAttr(w.solidity,t.i,.3);S=S||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var I=r.uid;S&&(I+="-"+t.i),x.pattern(e,"point",a,I,T,P,D,t.mcc,w.fillmode,O,C,R)}else i.isArrayOrTypedArray(p)?u.fill(e,p[t.i]):u.fill(e,p);g&&u.stroke(e,v)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?m(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,h=void 0!==c,d=void 0!==f;(i.isArrayOrTypedArray(u)||h||d)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?c:e:d?f:v*e});var p=a.color,g=o.color,m=s.color;(g||m)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?g||e:m||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.addOpacity(e,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",M(x.symbolNumber(a),o,et(n,e),Y(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)}))}},x.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&i.isArrayOrTypedArray(n))return c.makeColorScaleFuncFromTrace(r)}return i.identity};var L,S,E={start:1,end:-1,middle:0,bottom:1,top:-1};function C(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)*p+1,d=E[l]*u,v=.75*r+E[s]*u+(E[s]-1)*c*r/2;t.attr("text-anchor",l),a||o.attr("transform",f(d,v))}function O(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function R(t,e,r){return r&&(t=F(t)),e?D(t[1]):P(t[0])}function P(t){var e=n.round(t,2);return L=e,e}function D(t){var e=n.round(t,2);return S=e,e}function I(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),d=3*l*(l+u);return[[P(e[0]+(h&&c/h)),D(e[1]+(h&&f/h))],[P(e[0]-(d&&c/d)),D(e[1]-(d&&f/d))]]}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):{},d={};y(d,e,t.i);var p=e._meta||{};u=i.texttemplateString(u,f,l._d3locale,d,t,p)}var v=t.tp||e.textposition,g=O(t,e),m=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,g,m).text(u).call(h.convertToTspans,r).call(C,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");C(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(I(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=[I(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(I(t[r-1],t[r],t[r+1],e));for(a.push(I(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 z={hv:function(t,e,r){return"H"+P(e[0])+"V"+R(e,1,r)},vh:function(t,e,r){return"V"+D(e[1])+"H"+R(e,0,r)},hvh:function(t,e,r){return"H"+P((t[0]+e[0])/2)+"V"+D(e[1])+"H"+R(e,0,r)},vhv:function(t,e,r){return"V"+D((t[1]+e[1])/2)+"H"+P(e[0])+"V"+R(e,1,r)}},N=function(t,e,r){return"L"+R(e,0,r)+","+R(e,1,r)};function F(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,u=e?e[0]:L||0,c=e?e[1]:S||0,f=l[0],h=l[1],d=f-u,p=h-c,v=Math.atan2(p,d),g=s?r[o]:r;if("auto"===g){var m=l.i;"scatter"===n.type&&m--;var y=l.marker,b=y.symbol;i.isArrayOrTypedArray(b)&&(b=b[m]);var _=y.size;i.isArrayOrTypedArray(_)&&(_=_[m]),g=y?x.symbolBackOffs[x.symbolNumber(b)]*_:0,g+=x.getMarkerStandoff(a[m],n)||0}var w=f-g*Math.cos(v),M=h-g*Math.sin(v);(w<=f&&w>=u||w>=f&&w<=u)&&(M<=h&&M>=c||M>=h&&M<=c)&&(t=[w,M])}return t}x.steps=function(t){var e=z[t]||N;return function(t){for(var r="M"+P(t[0][0])+","+D(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=F,x.makeTester=function(){var t=i.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(t){t.attr(d.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 B=0;function j(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}function U(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=j(t)),r){if(a=x.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=j(l)){var u=+l.getAttribute("x")||0,c=+l.getAttribute("y")||0,f=l.getAttribute("transform");if(!f){var d=x.bBox(l,!1,r);return u&&(d.left+=u,d.right+=u),c&&(d.top+=c,d.bottom+=c),d}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 p=o.getBoundingClientRect(),v=x.testref.node().getBoundingClientRect();e||s.removeChild(o);var g={height:p.height,width:p.width,left:p.left-v.left,top:p.top-v.top,right:p.right-v.left,bottom:p.bottom-v.top};return B>=1e4&&(x.savedBBoxes={},B=0),r&&(x.savedBBoxes[r]=g),B++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",U(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var V=/translate\([^)]*\)\s*$/;function Y(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(V);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=Y;var G,W,q,X,Z,J,K=Math.atan2,Q=Math.cos,$=Math.sin;function tt(t,e){var r=e[0],n=e[1];return[r*Q(t)-n*$(t),r*$(t)+n*Q(t)]}function et(t,e){var r,n,a=t.ma;void 0===a&&((a=e.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var u=e._xA,c=e._yA;if(!u||!c)return 90;r=u.c2p(t.x),n=c.c2p(t.y)}if(e._geo){var f,h=t.lonlat[0],d=t.lonlat[1],p=e._geo.project([h,d+1e-5]),v=e._geo.project([h+1e-5,d]),g=K(v[1]-n,v[0]-r),m=K(p[1]-n,p[0]-r);if("north"===s)f=a/180*Math.PI;else if("previous"===s){var y=h/180*Math.PI,x=d/180*Math.PI,b=G/180*Math.PI,_=W/180*Math.PI,w=b-y,M=Q(_)*$(w),T=$(_)*Q(x)-Q(_)*$(x)*Q(w);f=-K(M,T)-Math.PI,G=h,W=d}var A=tt(g,[Q(f),0]),k=tt(m,[$(f),0]);a=K(A[1]+k[1],A[0]+k[0])/Math.PI*180,"previous"!==s||J===e.uid&&t.i===Z+1||(a=null)}if("previous"===s&&!e._geo)if(J===e.uid&&t.i===Z+1&&o(r)&&o(n)){var L=r-q,S=n-X,E=e.line&&e.line.shape||"",C=E.slice(E.length-1);"h"===C&&(S=0),"v"===C&&(L=0),a+=K(S,L)/Math.PI*180+90}else a=null}return q=r,X=n,Z=t.i,J=e.uid,a}x.getMarkerAngle=et},1984:function(t,e,r){"use strict";var n,i,a,o,s=r(9604),l=r(3428).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,d=Math.cos,p=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=d(t),i=p(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*h,c=0,f=0,v=s(r),g="",m=0;m<v.length;m++){var y=v[m],x=y[0],b=c,_=f;if("M"===x||"L"===x)c=+y[1],f=+y[2];else if("m"===x||"l"===x)c+=+y[1],f+=+y[2];else if("H"===x)c=+y[1];else if("h"===x)c+=+y[1];else if("V"===x)f=+y[1];else if("v"===x)f+=+y[1];else if("A"===x){c=+y[1],f=+y[2];var w=l(u,[+y[6],+y[7]]);y[6]=w[0],y[7]=w[1],y[3]=+y[3]+t}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(c-=b,f-=_);var M=l(u,[c,f]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(y[1]=M[0],y[2]=M[1]),y[0]=x,g+=y[0]+y.slice(1).join(",")}return i=g,g}t.exports={circle:{n:0,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?g(e,r,i):i}},square:{n:1,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(t,e,r){if(v(e))return u;var n=l(.4*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(t,e,r){if(v(e))return u;var n=l(.8*t/c,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return g(e,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+","+l(t/2,2)+"H"+n+"L0,-"+l(t,2)+"Z")}},"triangle-down":{n:6,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+",-"+l(t/2,2)+"H"+n+"L0,"+l(t,2)+"Z")}},"triangle-left":{n:7,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M"+l(t/2,2)+",-"+n+"V"+n+"L-"+l(t,2)+",0Z")}},"triangle-right":{n:8,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+l(t/2,2)+",-"+n+"V"+n+"L"+l(t,2)+",0Z")}},"triangle-ne":{n:9,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(t,e,r){if(v(e))return u;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return g(e,r,"M"+n+","+o+"L"+i+","+l(.809*t,2)+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(t,e,r){if(v(e))return u;var n=l(.924*t,2),i=l(.383*t,2);return g(e,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(t,e,r){if(v(e))return u;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),c=l(-n,2),f=l(-.309*n,2),h=l(.118*n,2),d=l(.809*n,2);return g(e,r,"M"+i+","+f+"H"+a+"L"+o+","+h+"L"+s+","+d+"L0,"+l(.382*n,2)+"L-"+s+","+d+"L-"+o+","+h+"L-"+a+","+f+"H-"+i+"L0,"+c+"Z")}},hexagram:{n:18,f:function(t,e,r){if(v(e))return u;var n=l(.66*t,2),i=l(.38*t,2),a=l(.76*t,2);return g(e,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(t,e,r){if(v(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(t,e,r){if(v(e))return u;var n=l(t*f*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(t,e,r){if(v(e))return u;var n=l(1.1*t,2),i=l(2*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2),i=l(1.9*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(t,e,r){if(v(e))return u;var n=l(.7*t,2),i=l(1.4*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2),i=l(.7*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/c,2);return g(e,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2),i=l(.65*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(.85*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t,e,r){if(v(e))return u;var n=l(t/2,2),i=l(t,2);return g(e,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t,e,r){if(v(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t,e,r){if(v(e))return u;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(t,e,r){if(v(e))return u;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(t,e,r){if(v(e))return u;var n=h/2.5,i=2*t*d(n),a=2*t*p(n);return g(e,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(t,e,r){if(v(e))return u;var n=h/4,i=2*t*d(n),a=2*t*p(n);return g(e,r,"M0,0L"+-i+","+a+"A "+2*t+","+2*t+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}}},7644: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"}}}},4880:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(4460),o=r(3400),s=r(3792);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],d=h.i;if(void 0===d)d=f;else if(null===d)continue;var p=h[i];if(n(r.c2l(p))){var v=c(p,d);if(n(v[0])&&n(v[1])){var g=h[i+"s"]=p-v[0],m=h[i+"h"]=p+v[1];u.push(g,m)}}}var y=r._id,x=e._extremes[y],b=a.findExtremes(r,u,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}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")}}}},3792:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},5200:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(3400),o=r(1780),s=r(7644);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 d=h("type","array"in f?"data":"percent"),p=!0;"sqrt"!==d&&(p=h("symmetric",!(("data"===d?"arrayminus":"valueminus")in f))),"data"===d?(h("array"),h("traceref"),p||(h("arrayminus"),h("tracerefminus"))):"percent"!==d&&"constant"!==d||(h("value"),p||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))}}},4968:function(t,e,r){"use strict";var n=r(3400),i=r(7824).overrideAll,a=r(7644),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(5200),calc:r(4880),makeComputeError:r(3792),plot:r(8512),style:r(2036),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))}}},8512:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3616),o=r(3028);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,d=e[0].trace,p=d.error_x||{},v=d.error_y||{};d.ids&&(h=function(t){return t.id});var g=o.hasMarkers(d)&&d.marker.maxdisplayed>0;v.visible||p.visible||(e=[]);var m=n.select(this).selectAll("g.errorbar").data(e,h);if(m.exit().remove(),e.length){p.visible||m.selectAll("path.xerror").remove(),v.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var y=m.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!g||t.vis){var a,o=e.select("path.yerror");if(v.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var h=v.width;a="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2*h),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var d=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?v:p).width;a="M"+r.xh+","+(r.y-m)+"v"+2*m+"m0,-"+m+"H"+r.xs,r.noXS||(a+="m0,-"+m+"v"+2*m),d.size()?c&&(d=d.transition().duration(s.duration).ease(s.easing)):d=e.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),d.attr("d",a)}else d.remove()}}))}}))}},2036:function(t,e,r){"use strict";var n=r(3428),i=r(6308);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)}))}},5756:function(t,e,r){"use strict";var n=r(5376),i=r(5460).hoverlabel,a=r(2880).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"}}},5056:function(t,e,r){"use strict";var n=r(3400),i=r(4040);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"))}}}},2376:function(t,e,r){"use strict";var n=r(4040),i=r(3292).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())}},2456:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},5448:function(t,e,r){"use strict";var n=r(3400),i=r(5756),a=r(6132);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)}},624:function(t,e,r){"use strict";var n=r(3400);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==r.indexOf(n[a]+i[o]))return!0;return!1}return-1!==r.indexOf(e.getSubplot(t))},e.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},e.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},e.getDistanceFunction=function(t,r,n,i){return"closest"===t?i||e.quadrature(r,n):"x"===t.charAt(0)?r:n},e.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},e.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},e.makeEventData=function(t,r,n){var i="index"in t?t.index:t.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:i};if(r._indexToPoints){var o=r._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return r._module.eventData?a=r._module.eventData(a,t,r,n,i):("xVal"in t?a.x=t.xVal:"x"in t&&(a.x=t.x),"yVal"in t?a.y=t.yVal:"y"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),e.appendArrayPointValue(a,r,i),a},e.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){var c=o(n.nestedProperty(e,l).get(),r);void 0!==c&&(t[u]=c)}}},e.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){for(var c=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(c,r[h]);t[u]=f}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};e.isUnifiedHover=function(t){return"string"==typeof t&&!!l[t]},e.isXYhover=function(t){return"string"==typeof t&&!!s[t]}},3292:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(9760),o=r(3400),s=o.pushUnique,l=o.strTranslate,u=o.strRotate,c=r(5924),f=r(2736),h=r(2213),d=r(3616),p=r(6308),v=r(6476),g=r(4460),m=r(4040),y=r(624),x=r(2456),b=r(7864),_=r(1140),w=x.YANGLE,M=Math.PI*w/180,T=1/Math.sin(M),A=Math.cos(M),k=Math.sin(M),L=x.HOVERARROWSIZE,S=x.HOVERTEXTPAD,E={box:!0,ohlc:!0,violin:!0,candlestick:!0},C={scatter:!0,scattergl:!0,splom:!0};function O(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,a){t=o.getGraphDiv(t);var l=e.target;o.throttle(t._fullLayout._uid+x.HOVERID,x.HOVERMINTIME,(function(){!function(t,e,r,a,l){r||(r="xy");var u,f=Array.isArray(r)?r:[r],d=t._fullLayout,x=d.hoversubplots,b=d._plots||[],_=b[r],w=d._has("cartesian"),M=e.hovermode||d.hovermode,A="x"===(M||"").charAt(0),k="y"===(M||"").charAt(0);if(w&&(A||k)&&"axis"===x)for(var S=f.length,R=0;R<S;R++)if(b[u=f[R]]){var D=g.getFromId(t,u,A?"x":"y")._subplotsWith;if(D&&D.length)for(var j=0;j<D.length;j++)s(f,D[j])}if(_&&"single"!==x){var Y=_.overlays.map((function(t){return t.id}));f=f.concat(Y)}for(var G=f.length,W=new Array(G),q=new Array(G),X=!1,Z=0;Z<G;Z++)if(b[u=f[Z]])X=!0,W[Z]=b[u].xaxis,q[Z]=b[u].yaxis;else{if(!d[u]||!d[u]._subplot)return void o.warn("Unrecognized subplot: "+u);var J=d[u]._subplot;W[Z]=J.xaxis,q[Z]=J.yaxis}if(M&&!X&&(M="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(M)||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return v.unhoverRaw(t,e);var K=d.hoverdistance;-1===K&&(K=1/0);var Q=d.spikedistance;-1===Q&&(Q=1/0);var $,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ft,ht=[],dt=[],pt={hLinePoint:null,vLinePoint:null},vt=!1;if(Array.isArray(e))for(M="array",et=0;et<e.length;et++)(nt=t.calcdata[e[et].curveNumber||0])&&(it=nt[0].trace,"skip"!==nt[0].trace.hoverinfo&&(dt.push(nt),"h"===it.orientation&&(vt=!0)));else{var gt,mt,yt=t.calcdata.slice();for(yt.sort((function(t,e){return(t[0].trace.zorder||0)-(e[0].trace.zorder||0)})),rt=0;rt<yt.length;rt++)nt=yt[rt],"skip"!==(it=nt[0].trace).hoverinfo&&y.isTraceInSubplots(it,f)&&(dt.push(nt),"h"===it.orientation&&(vt=!0));if(l){if(!1===c.triggerHandler(t,"plotly_beforehover",e))return;var xt=l.getBoundingClientRect();gt=e.clientX-xt.left,mt=e.clientY-xt.top,d._calcInverseTransform(t);var bt=o.apply3DTransform(d._invTransform)(gt,mt);if(gt=bt[0],mt=bt[1],gt<0||gt>W[0]._length||mt<0||mt>q[0]._length)return v.unhoverRaw(t,e)}else gt="xpx"in e?e.xpx:W[0]._length/2,mt="ypx"in e?e.ypx:q[0]._length/2;if(e.pointerX=gt+W[0]._offset,e.pointerY=mt+q[0]._offset,$="xval"in e?y.flat(f,e.xval):y.p2c(W,gt),tt="yval"in e?y.flat(f,e.yval):y.p2c(q,mt),!i($[0])||!i(tt[0]))return o.warn("Fx.hover failed",e,t),v.unhoverRaw(t,e)}var _t=1/0;function wt(r,n){for(rt=0;rt<dt.length;rt++)if((nt=dt[rt])&&nt[0]&&nt[0].trace&&!0===(it=nt[0].trace).visible&&0!==it._length&&-1===["carpet","contourcarpet"].indexOf(it._module.name)){if(st=M,y.isUnifiedHover(st)&&(st=st.charAt(0)),"splom"===it.type?at=f[ot=0]:(at=y.getSubplot(it),ot=f.indexOf(at)),ct={cd:nt,trace:it,xa:W[ot],ya:q[ot],maxHoverDistance:K,maxSpikeDistance:Q,index:!1,distance:Math.min(_t,K),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:it.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},d[at]&&(ct.subplot=d[at]._subplot),d._splomScenes&&d._splomScenes[it.uid]&&(ct.scene=d._splomScenes[it.uid]),"array"===st){var a=e[rt];"pointNumber"in a?(ct.index=a.pointNumber,st="closest"):(st="","xval"in a&&(lt=a.xval,st="x"),"yval"in a&&(ut=a.yval,st=st?"closest":"y"))}else void 0!==r&&void 0!==n?(lt=r,ut=n):(lt=$[ot],ut=tt[ot]);if(ft=ht.length,0!==K)if(it._module&&it._module.hoverPoints){var s=it._module.hoverPoints(ct,lt,ut,st,{finiteRange:!0,hoverLayer:d._hoverlayer,hoversubplots:x,gd:t});if(s)for(var l,u=0;u<s.length;u++)l=s[u],i(l.x0)&&i(l.y0)&&ht.push(N(l,M))}else o.log("Unrecognized trace type in hover:",it);if("closest"===M&&ht.length>ft&&(ht.splice(0,ft),_t=ht[0].distance),w&&0!==Q&&0===ht.length){ct.distance=Q,ct.index=!1;var c=it._module.hoverPoints(ct,lt,ut,"closest",{hoverLayer:d._hoverlayer});if(c&&(c=c.filter((function(t){return t.spikeDistance<=Q}))),c&&c.length){var h,v=c.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(v.length){var g=v[0];i(g.x0)&&i(g.y0)&&(h=Tt(g),(!pt.vLinePoint||pt.vLinePoint.spikeDistance>h.spikeDistance)&&(pt.vLinePoint=h))}var m=c.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var b=m[0];i(b.x0)&&i(b.y0)&&(h=Tt(b),(!pt.hLinePoint||pt.hLinePoint.spikeDistance>h.spikeDistance)&&(pt.hLinePoint=h))}}}}}function Mt(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 Tt(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}wt();var At={fullLayout:d,container:d._hoverlayer,event:e},kt=t._spikepoints,Lt={vLinePoint:pt.vLinePoint,hLinePoint:pt.hLinePoint};t._spikepoints=Lt;var St=function(){"axis"!==x&&ht.sort((function(t,e){return t.distance-e.distance})),ht=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];m.traceIs(s.trace,"bar-like")||m.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(ht,M)};St();var Et=M.charAt(0),Ct=("x"===Et||"y"===Et)&&ht[0]&&C[ht[0].trace.type];if(w&&0!==Q&&0!==ht.length){var Ot=Mt(ht.filter((function(t){return t.ya.showspikes})),Q,Ct);pt.hLinePoint=Tt(Ot);var Rt=Mt(ht.filter((function(t){return t.xa.showspikes})),Q,Ct);pt.vLinePoint=Tt(Rt)}if(0===ht.length){var Pt=v.unhoverRaw(t,e);return!w||null===pt.hLinePoint&&null===pt.vLinePoint||B(kt)&&F(t,pt,At),Pt}if(w&&B(kt)&&F(t,pt,At),y.isXYhover(st)&&0!==ht[0].length&&"splom"!==ht[0].trace.type){var Dt=ht[0],It=(ht=E[Dt.trace.type]?ht.filter((function(t){return t.trace.index===Dt.trace.index})):[Dt]).length;wt(U("x",Dt,d),U("y",Dt,d));var zt,Nt=[],Ft={},Bt=0,jt=function(t){var e=E[t.trace.type]?O(t):t.trace.index;if(Ft[e]){var r=Ft[e]-1,n=Nt[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Nt[r]=t)}else Bt++,Ft[e]=Bt,Nt.push(t)};for(zt=0;zt<It;zt++)jt(ht[zt]);for(zt=ht.length-1;zt>It-1;zt--)jt(ht[zt]);ht=Nt,St()}var Ut=t._hoverdata,Ht=[],Vt=H(t),Yt=V(t);for(et=0;et<ht.length;et++){var Gt=ht[et],Wt=y.makeEventData(Gt,Gt.trace,Gt.cd);if(!1!==Gt.hovertemplate){var qt=!1;Gt.cd[Gt.index]&&Gt.cd[Gt.index].ht&&(qt=Gt.cd[Gt.index].ht),Gt.hovertemplate=qt||Gt.trace.hovertemplate||!1}if(Gt.xa&&Gt.ya){var Xt=Gt.x0+Gt.xa._offset,Zt=Gt.x1+Gt.xa._offset,Jt=Gt.y0+Gt.ya._offset,Kt=Gt.y1+Gt.ya._offset,Qt=Math.min(Xt,Zt),$t=Math.max(Xt,Zt),te=Math.min(Jt,Kt),ee=Math.max(Jt,Kt);Wt.bbox={x0:Qt+Yt,x1:$t+Yt,y0:te+Vt,y1:ee+Vt}}Gt.eventData=[Wt],Ht.push(Wt)}t._hoverdata=Ht;var re="y"===M&&(dt.length>1||ht.length>1)||"closest"===M&&vt&&ht.length>1,ne=p.combine(d.plot_bgcolor||p.background,d.paper_bgcolor),ie=P(ht,{gd:t,hovermode:M,rotateLabels:re,bgColor:ne,container:d._hoverlayer,outerContainer:d._paper.node(),commonLabelOpts:d.hoverlabel,hoverdistance:d.hoverdistance}),ae=ie.hoverLabels;if(y.isUnifiedHover(M)||(function(t,e,r,n){var i,a,o,s,l,u,c,f=e?"xa":"ya",h=e?"ya":"xa",d=0,p=1,v=t.size(),g=new Array(v),m=0,y=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},M=function(t){return t*r._invScaleY};function A(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(u=t[s]).pos+u.dp+u.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos>e.pmax-1&&(u.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((u=t[s]).pos<e.pmin+1)for(u.del=!0,n--,o=2*u.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos+u.dp+u.size>e.pmax&&(u.del=!0,n--)}}}for(t.each((function(t){var n=t[f],i=t[h],a="x"===n._id.charAt(0),o=n.range;0===m&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,d=I(t,e),v=t.anchor,A="end"===v?-1:1;if("middle"===v)c=(u=t.crossPos+(a?M(d.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?M(t.by):w(t.bx));else if(a)c=(u=t.crossPos+M(L+d.y)-M(t.by/2-L))+M(t.by);else{var k=w(A*L+d.x),S=k+w(A*t.bx);u=t.crossPos+Math.min(k,S),c=t.crossPos+Math.max(k,S)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(c,x)-Math.max(u,y)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[m++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?T:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||p*(e[0].traceIndex-t[0].traceIndex)}));!i&&d<=v;){for(d++,i=!0,s=0;s<g.length-1;){var k=g[s],S=g[s+1],E=k[k.length-1],C=S[0];if((a=E.pos+E.dp+E.size-C.pos-C.dp+C.size)>.01&&E.pmin===C.pmin&&E.pmax===C.pmax){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(k.push.apply(k,S),g.splice(s+1,1),c=0,l=k.length-1;l>=0;l--)c+=k[l].dp;for(o=c/k.length,l=k.length-1;l>=0;l--)k[l].dp-=o;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var O=g[s];for(l=O.length-1;l>=0;l--){var R=O[l],P=R.datum;P.offset=R.dp,P.del=R.del}}}(ae,re,d,ie.commonLabelBoundingBox),z(ae,re,d._invScaleX,d._invScaleY)),l&&l.tagName){var oe=m.getComponentMethod("annotations","hasClickToShow")(t,Ht);h(n.select(l),oe?"pointer":"")}l&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Ut)&&(Ut&&t.emit("plotly_unhover",{event:e,points:Ut}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:W,yaxes:q,xvals:$,yvals:tt}))}(t,e,r,a,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=H(i),o=V(i),s=P(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(m.traceIs(v,"gl3d")){var g=i._fullLayout[v.scene]._scene.container,y=g.offsetLeft,x=g.offsetTop;c+=y,f+=y,h+=x,d+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(u=t.offset)})).each((function(t){t.offset-=u})),z(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var R=/<extra>([\s\S]*)<\/extra>/;function P(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,h=e.container,v=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var M=e.fontFamily||x.HOVERFONT,T=e.fontSize||x.HOVERFONTSIZE,A=t[0],k=A.xa,E=A.ya,C=a.charAt(0),R=C+"Label",P=A[R];if(void 0===P&&"multicategory"===k.type)for(var I=0;I<t.length&&void 0===(P=t[I][R]);I++);var z=Y(r,v),N=z.top,F=z.width,B=z.height,j=void 0!==P&&A.distance<=e.hoverdistance&&("x"===a||"y"===a);if(j){var U,H,V=!0;for(U=0;U<t.length;U++)if(V&&void 0===t[U].zLabel&&(V=!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}}V&&(j=!1)}var W=h.selectAll("g.axistext").data(j?[0]:[]);W.enter().append("g").classed("axistext",!0),W.exit().remove();var q={minX:0,maxX:0,minY:0,maxY:0};if(W.each((function(){var t=n.select(this),e=o.ensureSingle(t,"path","",(function(t){t.style({"stroke-width":"1px"})})),s=o.ensureSingle(t,"text","",(function(t){t.attr("data-notex",1)})),u=g.bgcolor||p.defaultLine,c=g.bordercolor||p.contrast(u),h=p.contrast(u),v={family:g.font.family||M,size:g.font.size||T,color:g.font.color||h};e.style({fill:u,stroke:c}),s.text(P).call(d.font,v).call(f.positionText,0,0).call(f.convertToTspans,r),t.attr("transform","");var m,y,x=Y(r,s.node());if("x"===a){var b="top"===k.side?"-":"";s.attr("text-anchor","middle").call(f.positionText,0,"top"===k.side?N-x.bottom-L-S:N-x.top+L+S),m=k._offset+(A.x0+A.x1)/2,y=E._offset+("top"===k.side?0:E._length);var _=x.width/2+S,w=m;m<_?w=_:m>i.width-_&&(w=i.width-_),e.attr("d","M"+(m-w)+",0L"+(m-w+L)+","+b+L+"H"+_+"v"+b+(2*S+x.height)+"H"+-_+"V"+b+L+"H"+(m-w-L)+"Z"),m=w,q.minX=m-_,q.maxX=m+_,"top"===k.side?(q.minY=y-(2*S+x.height),q.maxY=y-S):(q.minY=y+S,q.maxY=y+(2*S+x.height))}else{var C,O,R;"right"===E.side?(C="start",O=1,R="",m=k._offset+k._length):(C="end",O=-1,R="-",m=k._offset),y=E._offset+(A.y0+A.y1)/2,s.attr("text-anchor",C),e.attr("d","M0,0L"+R+L+","+L+"V"+(S+x.height/2)+"h"+R+(2*S+x.width)+"V-"+(S+x.height/2)+"H"+R+L+"V-"+L+"Z"),q.minY=y-(S+x.height/2),q.maxY=y+(S+x.height/2),"right"===E.side?(q.minX=m+L,q.maxX=m+L+(2*S+x.width)):(q.minX=m-L-(2*S+x.width),q.maxX=m-L);var D,I=x.height/2,z=N-x.top-I,F="clip"+i._uid+"commonlabel"+E._id;if(m<x.width+2*S+L){D="M-"+(L+S)+"-"+I+"h-"+(x.width-S)+"V"+I+"h"+(x.width-S)+"Z";var B=x.width-m+S;f.positionText(s,B,z),"end"===C&&s.selectAll("tspan").each((function(){var t=n.select(this),e=d.tester.append("text").text(t.text()).call(d.font,v),i=Y(r,e.node());Math.round(i.width)<Math.round(x.width)&&t.attr("x",B-i.width),e.remove()}))}else f.positionText(s,O*(S+L),z),D=null;var j=i._topclips.selectAll("#"+F).data(D?[0]:[]);j.enter().append("clipPath").attr("id",F).append("path"),j.exit().remove(),j.select("path").attr("d",D),d.setClipUrl(s,D?F:null,r)}t.attr("transform",l(m,y))})),y.isUnifiedHover(a)){h.selectAll("g.hovertext").remove();var X=t.filter((function(t){return"none"!==t.hoverinfo}));if(0===X.length)return[];var Z=i.hoverlabel,J=Z.font,K={showlegend:!0,legend:{title:{text:P,font:J},font:J,bgcolor:Z.bgcolor,bordercolor:Z.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},Q={font:J};b(K,Q,r._fullData);var $=Q.legend;$.entries=[];for(var tt=0;tt<X.length;tt++){var et=X[tt];if("none"!==et.hoverinfo){var rt=D(et,!0,a,i,P),nt=rt[0],it=rt[1];et.name=it,et.text=""!==it?it+" : "+nt:nt;var at=et.cd[et.index];at&&(at.mc&&(et.mc=at.mc),at.mcc&&(et.mc=at.mcc),at.mlc&&(et.mlc=at.mlc),at.mlcc&&(et.mlc=at.mlcc),at.mlw&&(et.mlw=at.mlw),at.mrc&&(et.mrc=at.mrc),at.dir&&(et.dir=at.dir)),et._distinct=!0,$.entries.push([et])}}$.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),$.layer=h,$._inHover=!0,$._groupTitleFont=Z.grouptitlefont,_(r,$);var ot,st,lt,ut,ct=h.select("g.legend"),ft=Y(r,ct.node()),ht=ft.width+2*S,dt=ft.height+2*S,pt=X[0],vt=(pt.x0+pt.x1)/2,gt=(pt.y0+pt.y1)/2,mt=!(m.traceIs(pt.trace,"bar-like")||m.traceIs(pt.trace,"box-violin"));"y"===C?mt?(st=gt-S,ot=gt+S):(st=Math.min.apply(null,X.map((function(t){return Math.min(t.y0,t.y1)}))),ot=Math.max.apply(null,X.map((function(t){return Math.max(t.y0,t.y1)})))):st=ot=o.mean(X.map((function(t){return(t.y0+t.y1)/2})))-dt/2,"x"===C?mt?(lt=vt+S,ut=vt-S):(lt=Math.max.apply(null,X.map((function(t){return Math.max(t.x0,t.x1)}))),ut=Math.min.apply(null,X.map((function(t){return Math.min(t.x0,t.x1)})))):lt=ut=o.mean(X.map((function(t){return(t.x0+t.x1)/2})))-ht/2;var yt,xt,bt=k._offset,_t=E._offset;return ut+=bt-ht,st+=_t-dt,yt=(lt+=bt)+ht<F&&lt>=0?lt:ut+ht<F&&ut>=0?ut:bt+ht<F?bt:lt-vt<vt-ut+ht?F-ht:0,yt+=S,xt=(ot+=_t)+dt<B&&ot>=0?ot:st+dt<B&&st>=0?st:_t+dt<B?_t:ot-gt<gt-st+dt?B-dt:0,xt+=S,ct.attr("transform",l(yt-1,xt-1)),ct}var wt=h.selectAll("g.hovertext").data(t,(function(t){return O(t)}));return wt.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(p.fill,p.addOpacity(c,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(d.font,M,T)})),wt.exit().remove(),wt.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var h=t.bgcolor||o,v=p.combine(p.opacity(h)?h:p.defaultLine,c),g=p.combine(p.opacity(o)?o:p.defaultLine,c),m=t.borderColor||p.contrast(v),y=D(t,j,a,i,P,e),x=y[0],b=y[1],_=e.select("text.nums").call(d.font,t.fontFamily||M,t.fontSize||T,t.fontColor||m).text(x).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r),A=e.select("text.name"),k=0,E=0;if(b&&b!==x){A.call(d.font,t.fontFamily||M,t.fontSize||T,g).text(b).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r);var C=Y(r,A.node());k=C.width+2*S,E=C.height+2*S}else A.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:m});var O=t.xa._offset+(t.x0+t.x1)/2,R=t.ya._offset+(t.y0+t.y1)/2,I=Math.abs(t.x1-t.x0),z=Math.abs(t.y1-t.y0),U=Y(r,_.node()),H=U.width/i._invScaleX,V=U.height/i._invScaleY;t.ty0=(N-U.top)/i._invScaleY,t.bx=H+2*S,t.by=Math.max(V+2*S,E),t.anchor="start",t.txwidth=H,t.tx2width=k,t.offset=0;var G,W,q=(H+L+S+k)*i._invScaleX;if(s)t.pos=O,G=R+z/2+q<=B,W=R-z/2-q>=0,"top"!==t.idealAlign&&G||!W?G?(R+=z/2,t.anchor="start"):t.anchor="middle":(R-=z/2,t.anchor="end"),t.crossPos=R;else{if(t.pos=R,G=O+I/2+q<=F,W=O-I/2-q>=0,"left"!==t.idealAlign&&G||!W)if(G)O+=I/2,t.anchor="start";else{t.anchor="middle";var X=q/2,Z=O+X-F,J=O-X;Z>0&&(O-=Z),J<0&&(O+=-J)}else O-=I/2,t.anchor="end";t.crossPos=O}_.attr("text-anchor",t.anchor),k&&A.attr("text-anchor",t.anchor),e.attr("transform",l(O,R)+(s?u(w):""))})),{hoverLabels:wt,commonLabelBoundingBox:q}}function D(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=j(t.name,t.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"<br>"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"<br>"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[u+"Label"]===i?l=t[c+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"<br>":"")+t.text),void 0!==t.extraText&&(l+=(l?"<br>":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[u+"Label"]!==i&&(h[u+"other"]=h[u+"Val"],h[u+"otherLabel"]=h[u+"Label"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(R,(function(e,r){return s=j(r,t.nameLength),""}))}return[l,s]}function I(t,e){var r=0,n=t.offset;return e&&(n*=-k,r=t.offset*A),{x:r,y:n}}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,u,c=r.select("text.nums"),h=t.anchor,p="end"===h?-1:1,v=(u=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(L+S))+s*(i.txwidth+S),"middle"===i.anchor&&(l-=i.tx2width/2,u+=i.txwidth/2+S),{alignShift:s,textShiftX:l,text2ShiftX:u}),g=I(t,e),m=g.x,y=g.y,x="middle"===h;r.select("path").attr("d",x?"M-"+a(t.bx/2+t.tx2width/2)+","+o(y-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(p*L+m)+","+o(L+y)+"v"+o(t.by/2-L)+"h"+a(p*t.bx)+"v-"+o(t.by)+"H"+a(p*L+m)+"V"+o(y-L)+"Z");var b=m+v.textShiftX,_=y+t.ty0-t.by/2+S,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==h?(c.attr("text-anchor","start"),b=x?-t.bx/2-t.tx2width/2+S:-t.bx-S):"right"===w&&"end"!==h&&(c.attr("text-anchor","end"),b=x?t.bx/2-t.tx2width/2-S:t.bx+S)),c.call(f.positionText,a(b),o(_)),t.tx2width&&(r.select("text.name").call(f.positionText,a(v.text2ShiftX+v.alignShift*S+m),o(y+t.ty0-t.by/2+S)),r.select("rect").call(d.setRect,a(v.text2ShiftX+(v.alignShift-1)*t.tx2width/2+m),o(y-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var d=t.hoverinfo||t.trace.hoverinfo;return d&&"all"!==d&&(-1===(d=Array.isArray(d)?d:d.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===d.indexOf("y")&&(t.yLabel=void 0),-1===d.indexOf("z")&&(t.zLabel=void 0),-1===d.indexOf("text")&&(t.text=void 0),-1===d.indexOf("name")&&(t.name=void 0)),t}function F(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var h=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var v,m,y=e.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(v=u.pointerX,m=u.pointerY):(v=n._offset+y.x,m=i._offset+y.y);var x,b,_=a.readability(y.color,h)<1.5?p.contrast(h):y.color,w=i.spikemode,M=i.spikethickness,T=i.spikecolor||_,A=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=v),-1!==w.indexOf("across")){var k=i._counterDomainMin,L=i._counterDomainMax;"free"===i.anchor&&(k=Math.min(k,i.position),L=Math.max(L,i.position)),x=l.l+k*l.w,b=l.l+L*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":M,stroke:T,"stroke-dasharray":d.dashStyle(i.spikedash,M)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:m,y2:m,"stroke-width":M+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?M:-M),cy:m,r:M,fill:T}).classed("spikeline",!0)}if(f){var S,E,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(S=u.pointerX,E=u.pointerY):(S=n._offset+C.x,E=i._offset+C.y);var O,R,P=a.readability(C.color,h)<1.5?p.contrast(h):C.color,D=n.spikemode,I=n.spikethickness,z=n.spikecolor||P,N=g.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(O=N,R=E),-1!==D.indexOf("across")){var F=n._counterDomainMin,B=n._counterDomainMax;"free"===n.anchor&&(F=Math.min(F,n.position),B=Math.max(B,n.position)),O=l.t+(1-B)*l.h,R=l.t+(1-F)*l.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:R,"stroke-width":I,stroke:z,"stroke-dasharray":d.dashStyle(n.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:R,"stroke-width":I+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:N-("top"!==n.side?I:-I),r:I,fill:z}).classed("spikeline",!0)}}}function B(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function j(t,e){return f.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function U(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var u=s[t+"End"];void 0===u&&(u=s[t]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function H(t){return t.offsetTop+t.clientTop}function V(t){return t.offsetLeft+t.clientLeft}function Y(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],d=c[0],p=c[1];return{x:f,y:h,width:d-f,height:p-h,top:Math.min(h,p),left:Math.min(f,d),right:Math.max(f,d),bottom:Math.max(h,p)}}},6132:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(624).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)}},1008:function(t,e,r){"use strict";var n=r(3400),i=r(5460);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},3024:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(6476),o=r(624),s=r(5460),l=r(3292);t.exports={moduleType:"component",name:"fx",constants:r(2456),schema:{layout:s},attributes:r(5756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(1976),supplyDefaults:r(5448),supplyLayoutDefaults:r(8336),calc:r(5056),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(2376)}},5460:function(t,e,r){"use strict";var n=r(2456),i=r(5376),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},8336:function(t,e,r){"use strict";var n=r(3400),i=r(5460),a=r(1008),o=r(6132);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)}},1976:function(t,e,r){"use strict";var n=r(3400),i=r(6132),a=r(5460);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},2704:function(t,e,r){"use strict";var n=r(3400),i=r(3756).counter,a=r(6968).u,o=r(3816).idRegex,s=r(1780),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 d=u+c*h;l[a?i-1-h:h]=[d,d+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]),d=Array.isArray(i),p=Array.isArray(a),v=d&&i!==r.xaxes&&p&&a!==r.yaxes;h?(o=r.subplots.length,f=r.subplots[0].length):(p&&(o=a.length),d&&(f=i.length));var g=s.newContainer(e,"grid"),m=T("rows",o),y=T("columns",f);if(m*y>1){h||d||p||"independent"===T("pattern")&&(h=!0),g._hasSubplotGrid=h;var x,b,_="top to bottom"===T("roworder"),w=h?.2:.1,M=h?.3:.1;v&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),g._domains={x:c("x",T,w,x,y),y:c("y",T,M,b,m,_)}}else delete e.grid}function T(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||{},d=e._subplots,p=r._hasSubplotGrid,v=r.rows,g=r.columns,m="independent"===r.pattern,y=r._axisMap={};if(p){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(m?(s=1===b?"xy":"x"+b+"y"+b,b++):s=w[i],_[i]="",-1!==d.cartesian.indexOf(s)){if(c=s.indexOf("y"),a=s.slice(0,c),o=s.slice(c),void 0!==y[a]&&y[a]!==i||void 0!==y[o]&&y[o]!==n)continue;_[i]=s,y[a]=i,y[o]=n}}}else{var M=u(e,h,"x"),T=u(e,h,"y");r.xaxes=f(M,d.xaxis,g,y,"x"),r.yaxes=f(T,d.yaxis,v,y,"y")}var A=r._anchors={},k="top to bottom"===r.roworder;for(var L in y){var S,E,C,O=L.charAt(0),R=r[O+"side"];if(R.length<8)A[L]="free";else if("x"===O){if("t"===R.charAt(0)===k?(S=0,E=1,C=v):(S=v-1,E=-1,C=-1),p){var P=y[L];for(n=S;n!==C;n+=E)if((s=l[n][P])&&(c=s.indexOf("y"),s.slice(0,c)===L)){A[L]=s.slice(c);break}}else for(n=S;n!==C;n+=E)if(o=r.yaxes[n],-1!==d.cartesian.indexOf(L+o)){A[L]=o;break}}else if("l"===R.charAt(0)?(S=0,E=1,C=g):(S=g-1,E=-1,C=-1),p){var D=y[L];for(n=S;n!==C;n+=E)if((s=l[D][n])&&(c=s.indexOf("y"),s.slice(c)===L)){A[L]=s.slice(0,c);break}}else for(n=S;n!==C;n+=E)if(a=r.xaxes[n],-1!==d.cartesian.indexOf(a+L)){A[L]=a;break}}}}}},5760:function(t,e,r){"use strict";var n=r(3816),i=r(1780).templatedArray;r(6208),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"})},3556:function(t,e,r){"use strict";var n=r(8248),i=r(6896);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 d=l[f],p=l["size"+f],v=null,g=null;if(o){v=i(d,e.range);var m=p/Math.pow(10,v)/2;g=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else g=(v=Math.pow(10,d))*(Math.pow(10,p/2)-Math.pow(10,-p/2));n(v)?n(g)||(g=null):(v=null,g=null),a(u+f,v),a(u+"size"+f,g)}}},7404:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(5760);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})}},963:function(t,e,r){"use strict";var n=r(3428),i=r(3616),a=r(4460),o=r(9811),s=r(9616);t.exports=function(t){var e,r,l=t._fullLayout,u=[],c={},f=[];for(r=0;r<l.images.length;r++){var h=l.images[r];if(h.visible)if("below"===h.layer&&"paper"!==h.xref&&"paper"!==h.yref){e=o.ref2id(h.xref)+o.ref2id(h.yref);var d=l._plots[e];if(!d){f.push(h);continue}d.mainplot&&(e=d.mainplot.id),c[e]||(c[e]=[]),c[e].push(h)}else"above"===h.layer?u.push(h):f.push(h)}var p={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 m(e){var r,o,s=n.select(this),u=a.getFromId(t,e.xref),c=a.getFromId(t,e.yref),f="domain"===a.getRefType(e.xref),h="domain"===a.getRefType(e.yref),d=l._size;r=void 0!==u?"string"==typeof e.xref&&f?u._length*e.sizex:Math.abs(u.l2p(e.sizex)-u.l2p(0)):e.sizex*d.w,o=void 0!==c?"string"==typeof e.yref&&h?c._length*e.sizey:Math.abs(c.l2p(e.sizey)-c.l2p(0)):e.sizey*d.h;var g,m,y=r*p[e.xanchor].offset,x=o*v[e.yanchor].offset,b=p[e.xanchor].sizing+v[e.yanchor].sizing;switch(g=void 0!==u?"string"==typeof e.xref&&f?u._length*e.x+u._offset:u.r2p(e.x)+u._offset:e.x*d.w+d.l,g+=y,m=void 0!==c?"string"==typeof e.yref&&h?c._length*(1-e.y)+c._offset:c.r2p(e.y)+c._offset:d.h-e.y*d.h+d.t,m+=x,e.sizing){case"fill":b+=" slice";break;case"stretch":b="none"}s.attr({x:g,y:m,width:r,height:o,preserveAspectRatio:b,opacity:e.opacity});var _=(u&&"domain"!==a.getRefType(e.xref)?u._id:"")+(c&&"domain"!==a.getRefType(e.yref)?c._id:"");i.setClipUrl(s,_?"clip"+l._uid+_:null,t)}var y=l._imageLowerLayer.selectAll("image").data(f),x=l._imageUpperLayer.selectAll("image").data(u);y.enter().append("image"),x.enter().append("image"),y.exit().remove(),x.exit().remove(),y.each((function(t){g.bind(this)(t),m.bind(this)(t)})),x.each((function(t){g.bind(this)(t),m.bind(this)(t)}));var b=Object.keys(l._plots);for(r=0;r<b.length;r++){e=b[r];var _=l._plots[e];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(c[e]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(t){g.bind(this)(t),m.bind(this)(t)}))}}}},7402:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(5760),supplyLayoutDefaults:r(7404),includeBasePlot:r(6632)("images"),draw:r(963),convertCoords:r(3556)}},3800:function(t,e,r){"use strict";var n=r(5376),i=r(2548);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},5196: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}},7864:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(1780),o=r(5464),s=r(3800),l=r(4859),u=r(2451);function c(t,e,r,c){var f=e[t]||{},h=a.newContainer(r,t);function d(t,e){return i.coerce(f,h,s,t,e)}var p=i.coerceFont(d,"font",r.font);if(d("bgcolor",r.paper_bgcolor),d("bordercolor"),d("visible")){for(var v,g=function(t,e){var r=v._input,n=v;return i.coerce(r,n,o,t,e)},m=r.font||{},y=i.coerceFont(d,"grouptitlefont",i.extendFlat({},m,{size:Math.round(1.1*m.size)})),x=0,b=!1,_="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),M=c.concat(w).filter((function(e){return t===(e.legend||"legend")})),T=0;T<M.length;T++)if((v=M[T]).visible){var A=v._isShape;(v.showlegend||v._dfltShowLegend&&!(v._module&&v._module.attributes&&v._module.attributes.showlegend&&!1===v._module.attributes.showlegend.dflt))&&(x++,v.showlegend&&(b=!0,(!A&&n.traceIs(v,"pie-like")||!0===v._input.showlegend)&&x++),i.coerceFont(g,"legendgrouptitle.font",y)),(!A&&n.traceIs(v,"bar")&&"stack"===r.barmode||-1!==["tonextx","tonexty"].indexOf(v.fill))&&(_=u.isGrouped({traceorder:_})?"grouped+reversed":"reversed"),void 0!==v.legendgroup&&""!==v.legendgroup&&(_=u.isReversed({traceorder:_})?"reversed+grouped":"grouped")}var k=i.coerce(e,r,l,"showlegend",b&&x>("legend"===t?1:0));if(!1===k&&(r[t]=void 0),(!1!==k||f.uirevision)&&(d("uirevision",r.uirevision),!1!==k)){d("borderwidth");var L,S,E,C="h"===d("orientation"),O="paper"===d("yref"),R="paper"===d("xref"),P="left";if(C?(L=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?O?(S=1.1,E="bottom"):(S=1,E="top"):O?(S=-.1,E="top"):(S=0,E="bottom")):(S=1,E="auto",R?L=1.02:(L=1,P="right")),i.coerce(f,h,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:L}},"x"),i.coerce(f,h,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"y"),d("traceorder",_),u.isGrouped(r[t])&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("indentation"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",P),d("yanchor",E),d("valign"),i.noneOrAll(f,h,["x","y"]),d("title.text")){d("title.side",C?"left":"top");var D=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(d,"title.font",D)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(n=0;n<a.length;n++)i.pushUnique(u,a[n].legend);for(e._legends=[],n=0;n<u.length;n++){var f=u[n];c(f,t,e,a),e[f]&&e[f].visible&&(e[f]._id=f),e._legends.push(f)}}},1140:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(7316),o=r(4040),s=r(5924),l=r(6476),u=r(3616),c=r(6308),f=r(2736),h=r(3048),d=r(5196),p=r(4284),v=p.LINE_SPACING,g=p.FROM_TL,m=p.FROM_BR,y=r(3076),x=r(2012),b=r(2451),_=1,w=/^legend[0-9]*$/;function M(t,e){var r,s,h=e||{},p=t._fullLayout,w=R(h),M=h._inHover;if(M?(s=h.layer,r="hover"):(s=p._infolayer,r=w),s){var L;if(r+=p._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),M){if(!h.entries)return;L=y(h.entries,h)}else{for(var P=(t.calcdata||[]).slice(),D=p.shapes,I=0;I<D.length;I++){var z=D[I];if(z.showlegend){var N={_isShape:!0,_fullInput:z,index:z._index,name:z.name||z.label.text||"shape "+z._index,legend:z.legend,legendgroup:z.legendgroup,legendgrouptitle:z.legendgrouptitle,legendrank:z.legendrank,legendwidth:z.legendwidth,showlegend:z.showlegend,visible:z.visible,opacity:z.opacity,mode:"line"===z.type?"lines":"markers",line:z.line,marker:{line:z.line,color:z.fillcolor,size:12,symbol:"rect"===z.type?"square":"circle"===z.type?"circle":"hexagon2"}};P.push([{trace:N}])}}L=p.showlegend&&y(P,h,p._legends.length>1)}var F=p.hiddenlabels||[];if(!(M||p.showlegend&&L.length))return s.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),a.autoMargin(t,w);var B=i.ensureSingle(s,"g",w,(function(t){M||t.attr("pointer-events","all")})),j=i.ensureSingleById(p._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(B,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));U.call(c.stroke,h.bordercolor).call(c.fill,h.bgcolor).style("stroke-width",h.borderwidth+"px");var H,V=i.ensureSingle(B,"g","scrollbox"),Y=h.title;h._titleWidth=0,h._titleHeight=0,Y.text?((H=i.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(u.font,Y.font).text(Y.text),E(H,V,t,h,_)):V.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(B,"rect","scrollbar",(function(t){t.attr(d.scrollBarEnterAttrs).call(c.fill,d.scrollBarColor)})),W=V.selectAll("g.groups").data(L);W.enter().append("g").attr("class","groups"),W.exit().remove();var q=W.selectAll("g.traces").data(i.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==F.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(k,t,h)})).call(x,t,h).each((function(){M||n.select(this).call(S,t,w)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout,o=R(i);i||(i=a[o]);var s=a._size,l=b.isVertical(i),c=b.isGrouped(i),f="fraction"===i.entrywidthmode,h=i.borderwidth,p=2*h,v=d.itemGap,g=i.indentation+i.itemwidth+2*v,m=2*(h+v),y=O(i),x=i.y<0||0===i.y&&"top"===y,_=i.y>1||1===i.y&&"bottom"===y,w=i.tracegroupgap,M={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var A=0;i._width=0,i._height=0;var k=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;u.setTranslate(this,h+k[0],h+k[1]+i._height+e/2+v),i._height+=e,i._width=Math.max(i._width,t[0].width)})),A=g+i._width,i._width+=v+g+p,i._height+=m,c&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var L=C(i),S=i.x<0||0===i.x&&"right"===L,E=i.x>1||1===i.x&&"left"===L,P=_||x,D=a.width/2;i._maxWidth=Math.max(S?P&&"left"===L?s.l+s.w:D:E?P&&"right"===L?s.r+s.w:D:s.w,2*g);var I=0,z=0;r.each((function(t){var e=T(t,i,g);I=Math.max(I,e),z+=e})),A=null;var N=0;if(c){var F=0,B=0,j=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=T(r,i,g),a=r[0].height;u.setTranslate(this,k[0],k[1]+h+v+a/2+e),e+=a,t=Math.max(t,n),M[r[0].trace.legendgroup]=t}));var r=t+v;B>0&&r+h+B>i._maxWidth?(N=Math.max(N,B),B=0,j+=F+w,F=e):F=Math.max(F,e),u.setTranslate(this,B,j),B+=r})),i._width=Math.max(N,B)+h,i._height=j+F+m}else{var U=r.size(),H=z+p+(U-1)*v<i._maxWidth,V=0,Y=0,G=0,W=0;r.each((function(t){var e=t[0].height,r=T(t,i,g),n=H?r:I;f||(n+=v),n+h+Y-v>=i._maxWidth&&(N=Math.max(N,W),Y=0,G+=V,i._height+=V,V=0),u.setTranslate(this,k[0]+h+Y,k[1]+h+G+e/2+v),W=Y+r+v,Y+=n,V=Math.max(V,e)})),H?(i._width=Y+p,i._height=V+m):(i._width=Math.max(N,W)+p,i._height+=V+m)}}i._width=Math.ceil(Math.max(i._width+k[0],i._titleWidth+2*(h+d.titlePad))),i._height=Math.ceil(Math.max(i._height+k[1],i._titleHeight+2*(h+d.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var q=t._context.edits,X=q.legendText||q.legendPosition;r.each((function(t){var e=n.select(this).select("."+o+"toggle"),r=t[0].height,a=t[0].trace.legendgroup,s=T(t,i,g);c&&""!==a&&(s=M[a]);var h=X?g:A||s;l||f||(h+=v/2),u.setRect(e,0,-r/2,h,r)}))}(t,W,q,h)},function(){var e,c,y,x,b=p._size,_=h.borderwidth,T="paper"===h.xref,k="paper"===h.yref;if(Y.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*v,i=0,a=t.node(),o=u.bBox(a).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*d.titlePad-o):"top right"===e.title.side&&(i=e._width-2*r-2*d.titlePad-o),f.positionText(t,r+d.titlePad+i,r+n)}}(H,h,_),!M){var L,S;L=T?b.l+b.w*h.x-g[C(h)]*h._width:p.width*h.x-g[C(h)]*h._width,S=k?b.t+b.h*(1-h.y)-g[O(h)]*h._effHeight:p.height*(1-h.y)-g[O(h)]*h._effHeight;var E=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=C(o),l=O(o),u="paper"===o.xref,c="paper"===o.yref;t._fullLayout._reservedMargin[e]={};var f=o.y<.5?"b":"t",h=o.x<.5?"l":"r",d={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(u&&c)return a.autoMargin(t,e,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*m[s],b:o._effHeight*m[l],t:o._effHeight*g[l]});u?t._fullLayout._reservedMargin[e][f]=d[f]:c||"v"===o.orientation?t._fullLayout._reservedMargin[e][h]=d[h]:t._fullLayout._reservedMargin[e][f]=d[f]}(t,w,L,S);if(E)return;if(p.margin.autoexpand){var R=L,P=S;L=T?i.constrain(L,0,p.width-h._width):R,S=k?i.constrain(S,0,p.height-h._effHeight):P,L!==R&&i.log("Constrain "+w+".x to make legend fit inside graph"),S!==P&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(B,L,S)}if(G.on(".drag",null),B.on("wheel",null),M||h._height<=h._maxHeight||t._context.staticPlot){var D=h._effHeight;M&&(D=h._height),U.attr({width:h._width-_,height:D-_,x:_/2,y:_/2}),u.setTranslate(V,0,0),j.select("rect").attr({width:h._width-2*_,height:D-2*_,x:_,y:_}),u.setClipUrl(V,r,t),u.setRect(G,0,0,0,0),delete h._scrollY}else{var I,z,N,F=Math.max(d.scrollBarMinHeight,h._effHeight*h._effHeight/h._height),W=h._effHeight-F-2*d.scrollBarMargin,q=h._height-h._effHeight,X=W/q,Z=Math.min(h._scrollY||0,q);U.attr({width:h._width-2*_+d.scrollBarWidth+d.scrollBarMargin,height:h._effHeight-_,x:_/2,y:_/2}),j.select("rect").attr({width:h._width-2*_+d.scrollBarWidth+d.scrollBarMargin,height:h._effHeight-2*_,x:_,y:_+Z}),u.setClipUrl(V,r,t),Q(Z,F,X),B.on("wheel",(function(){Q(Z=i.constrain(h._scrollY+n.event.deltaY/W*q,0,q),F,X),0!==Z&&Z!==q&&n.event.preventDefault()}));var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;I="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,N=Z})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(z="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,Z=function(t,e,r){var n=(r-e)/X+t;return i.constrain(n,0,q)}(N,I,z),Q(Z,F,X))}));G.call(J);var K=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(I=t.changedTouches[0].clientY,N=Z)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(z=t.changedTouches[0].clientY,Z=function(t,e,r){var n=(e-r)/X+t;return i.constrain(n,0,q)}(N,I,z),Q(Z,F,X))}));V.call(K)}function Q(e,r,n){h._scrollY=t._fullLayout[w]._scrollY=e,u.setTranslate(V,0,-e),u.setRect(G,h._width,d.scrollBarMargin+e*n,d.scrollBarWidth,r),j.select("rect").attr("y",_+e)}t._context.edits.legendPosition&&(B.classed("cursor-move",!0),l.init({element:B.node(),gd:t,prepFn:function(){var t=u.getTranslate(B);y=t.x,x=t.y},moveFn:function(t,r){var n=y+t,i=x+r;u.setTranslate(B,n,i),e=l.align(n,h._width,b.l,b.l+b.w,h.xanchor),c=l.align(i+h._height,-h._height,b.t+b.h,b.t,h.yanchor)},doneFn:function(){if(void 0!==e&&void 0!==c){var r={};r[w+".x"]=e,r[w+".y"]=c,o.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&A(t,B,n,e,r)}}))}],t)}}function T(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function A(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var u=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===u)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==u&&h(r,t,n))}function k(t,e,r){var n,a,s=R(r),l=t.data()[0][0],c=l.trace,h=o.traceIs(c,"pie-like"),p=!r._inHover&&e._context.edits.legendText&&!h,v=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=h?l.label:c.name,c._meta&&(n=i.templateString(n,c._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(u.font,a).text(p?L(n,v):n);var m=r.indentation+r.itemwidth+2*d.itemGap;f.positionText(g,m,0),p?g.call(f.makeEditable,{gd:e,text:n}).call(E,t,e,r).on("edit",(function(n){this.text(L(n,v)).call(E,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(l.trace._group,n),s=h.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",e,"shapes["+c.index+"].name",s.name):o.call("_guiRestyle",e,s,c.index)})):E(g,t,e,r)}function L(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 S(t,e,r){var a,o=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTime<o?s+=1:(s=1,e._legendMouseDownTime=a)})),l.on("mouseup",(function(){if(!e._dragged&&!e._editing){var i=e._fullLayout[r];(new Date).getTime()-e._legendMouseDownTime>o&&(s=Math.max(s-1,1)),A(e,i,t,s,n.event)}})))}function E(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node(),s=R(r);r||(r=e._fullLayout[s]);var l,c,h=r.borderwidth,p=(n===_?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*v;if(o){var g=u.bBox(o);l=g.height,c=g.width,n===_?u.setTranslate(a,h,h+.75*l):u.setTranslate(a,0,.25*l)}else{var m="."+s+(n===_?"title":"")+"text",y=t.select(m),x=f.lineCount(y),b=y.node();if(l=p*x,c=b?u.bBox(b).width:0,n===_)"left"===r.title.side&&(c+=2*d.itemGap),f.positionText(y,h+d.titlePad,h+p);else{var w=2*d.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=d.itemGap,c-=r.indentation+r.itemwidth),f.positionText(y,w,-p*((x-1)/2-.3))}}n===_?(r._titleWidth=c,r._titleHeight=l):(i.lineHeight=p,i.height=Math.max(l,16)+3,i.width=c)}else t.remove()}(e,r,n,i)}))}function C(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function O(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function R(t){return t._id||"legend"}t.exports=function(t,e){if(e)M(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var a=0;a<i.length;a++){var o=i[a];M(t,t._fullLayout[o])}}}},3076:function(t,e,r){"use strict";var n=r(4040),i=r(2451);t.exports=function(t,e,r){var a,o,s=e._inHover,l=i.isGrouped(e),u=i.isReversed(e),c={},f=[],h=!1,d={},p=0,v=0;function g(t,n,a){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===f.indexOf(n)?(f.push(n),h=!0,c[n]=[a]):c[n].push(a);else{var o="~~i"+p;f.push(o),c[o]=[a],p++}}for(a=0;a<t.length;a++){var m=t[a],y=m[0],x=y.trace,b=x.legend,_=x.legendgroup;if(s||x.visible&&x.showlegend)if(n.traceIs(x,"pie-like"))for(d[_]||(d[_]={}),o=0;o<m.length;o++){var w=m[o].label;d[_][w]||(g(b,_,{label:w,color:m[o].color,i:m[o].i,trace:x,pts:m[o].pts}),d[_][w]=!0,v=Math.max(v,(w||"").length))}else g(b,_,y),v=Math.max(v,(x.name||"").length)}if(!f.length)return[];var M=!h||!l,T=[];for(a=0;a<f.length;a++){var A=c[f[a]];M?T.push(A[0]):T.push(A)}for(M&&(T=[T]),a=0;a<T.length;a++){var k=1/0;for(o=0;o<T[a].length;o++){var L=T[a][o].trace.legendrank;k>L&&(k=L)}T[a][0]._groupMinRank=k,T[a][0]._preGroupSort=a}var S=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(T.forEach((function(t,e){t[0]._preGroupSort=e})),T.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;a<T.length;a++){T[a].forEach((function(t,e){t._preSort=e})),T[a].sort(S);var E=T[a][0].trace,C=null;for(o=0;o<T[a].length;o++){var O=T[a][o].trace.legendgrouptitle;if(O&&O.text){C=O,s&&(O.font=e._groupTitleFont);break}}if(u&&T[a].reverse(),C){var R=!1;for(o=0;o<T[a].length;o++)if(n.traceIs(T[a][o].trace,"pie-like")){R=!0;break}T[a].unshift({i:-1,groupTitle:C,noClick:R,trace:{showlegend:E.showlegend,legendgroup:E.legendgroup,visible:"toggleitem"===e.groupclick||E.visible}})}for(o=0;o<T[a].length;o++)T[a][o]=[T[a][o]]}return e._lgroupsLength=T.length,e._maxNameLength=v,T}},3048:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=i.pushUnique,o=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,u=s.legend.itemclick,c=s.legend.itemdoubleclick,f=s.legend.groupclick;if(1===r&&"toggle"===u&&"toggleothers"===c&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=u:2===r&&(l=c),l){var h="togglegroup"===f,d=s.hiddenlabels?s.hiddenlabels.slice():[],p=t.data()[0][0];if(!p.groupTitle||!p.noClick){var v=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),m=v.concat(g),y=p.trace;y._isShape&&(y=y._fullInput);var x,b,_,w,M,T=y.legendgroup,A={},k=[],L=[],S=[],E=(s.shapes||[]).map((function(t){return t._input})),C=!1,O=y.legend,R=y._fullInput;if(R&&R._isShape||!n.traceIs(y,"pie-like")){var P,D=T&&T.length,I=[];if(D)for(x=0;x<m.length;x++)(P=m[x]).visible&&P.legendgroup===T&&I.push(x);if("toggle"===l){var z;switch(y.visible){case!0:z="legendonly";break;case!1:z=!1;break;case"legendonly":z=!0}if(D)if(h)for(x=0;x<m.length;x++){var N=m[x];!1!==N.visible&&N.legendgroup===T&&tt(N,z)}else tt(y,z);else tt(y,z)}else if("toggleothers"===l){var F,B,j,U,H=!0;for(x=0;x<m.length;x++)if(F=(U=m[x])===y,B=!0!==U.showlegend,!(F||B||D&&U.legendgroup===T||U.legend!==O||!0!==U.visible||n.traceIs(U,"notLegendIsolatable"))){H=!1;break}for(x=0;x<m.length;x++)if(!1!==(U=m[x]).visible&&U.legend===O&&!n.traceIs(U,"notLegendIsolatable"))switch(y.visible){case"legendonly":tt(U,!0);break;case!0:j=!!H||"legendonly",F=U===y,B=!0!==U.showlegend&&!U.legendgroup,tt(U,!!(F||D&&U.legendgroup===T||B)||j)}}for(x=0;x<L.length;x++)if(_=L[x]){var V=_.constructUpdate(),Y=Object.keys(V);for(b=0;b<Y.length;b++)w=Y[b],(A[w]=A[w]||[])[S[x]]=V[w]}for(M=Object.keys(A),x=0;x<M.length;x++)for(w=M[x],b=0;b<k.length;b++)A[w].hasOwnProperty(b)||(A[w][b]=void 0);C?n.call("_guiUpdate",e,A,{shapes:E},k):n.call("_guiRestyle",e,A,k)}else{var G=p.label,W=d.indexOf(G);if("toggle"===l)-1===W?d.push(G):d.splice(W,1);else if("toggleothers"===l){var q=-1!==W,X=[];for(x=0;x<e.calcdata.length;x++){var Z=e.calcdata[x];for(b=0;b<Z.length;b++){var J=Z[b].label;O===Z[0].trace.legend&&G!==J&&(-1===d.indexOf(J)&&(q=!0),a(d,J),X.push(J))}}if(!q)for(var K=0;K<X.length;K++){var Q=d.indexOf(X[K]);-1!==Q&&d.splice(Q,1)}}n.call("_guiRelayout",e,"hiddenlabels",d)}}}}function $(t,e){var r=k.indexOf(t),n=A.visible;return n||(n=A.visible=[]),-1===k.indexOf(t)&&(k.push(t),r=k.length-1),n[r]=e,r}function tt(t,e){if(!p.groupTitle||h){var r,a=t._fullInput||t,o=a._isShape,s=a.index;if(void 0===s&&(s=a._index),n.hasTransform(a,"groupby")){var l=L[s];if(!l){var u=n.getTransformIndices(a,"groupby"),c=u[u.length-1];l=i.keyedContainer(a,"transforms["+c+"].styles","target","value.visible"),L[s]=l}var f=l.get(t._group);void 0===f&&(f=!0),!1!==f&&l.set(t._group,e),S[s]=$(s,!1!==a.visible)}else{var d=!1!==a.visible&&e;o?(r=d,E[s].visible=r,C=!0):$(s,d)}}}}},2451:function(t,e){"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},2780:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(3800),supplyLayoutDefaults:r(7864),draw:r(1140),style:r(2012)}},2012:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=a.strTranslate,s=r(3616),l=r(6308),u=r(4288).extractOpts,c=r(3028),f=r(528),h=r(9656).castOption,d=r(5196);function p(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 m=e._fullLayout;r||(r=m.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*d.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function M(t,a,o){var c=t[0].trace,f=c.marker||{},h=f.line||{},d=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?c.visible&&c.type===o:i.traceIs(c,"bar"),v=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[t]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",d).attr("transform",_),v.exit().remove(),v.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var d=a.mcc;if(!r._inHover&&"mc"in a){var p=u(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),d=s.tryColorscale(f,"")(v)}var m=d||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),M=y.fgopacity,T=g(y.size,8,10),A=g(y.solidity,.5,1),k="legend-"+c.uid;i.call(s.pattern,"legend",e,k,x,T,A,d,y.fillmode,b,_,M)}else i.call(l.fill,m);o&&l.stroke(i,a.mlc||h.color)}))}function T(t,r,o){var s=t[0],l=s.trace,u=o?l.visible&&l.type===o:i.traceIs(l,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[t]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var d=l.marker||{},p=w(h(d.line.width,s.pts),d.line,5,2),v="pieLike",g=a.minExtend(l,{marker:{line:{width:p}}},v),m=a.minExtend(s,{trace:g},v);f(c,m,g,e)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,u=t[0].lineHeight,c=t[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(u-c+3))||0,h=r.indentation;i.attr("transform",o(h,f))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var d=i.selectAll("g.legendsymbols").data([t]);d.enter().append("g").classed("legendsymbols",!0),d.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),d=h.colorscale,v=h.reversescale;if(d){if(!r){var g=d.length;c=0===o?d[v?g-1:0][1]:1===o?d[v?0:g-1][1]:d[Math.floor((g-1)/2)][1]}}else{var m=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(m)?m[o]||m[0]:m}f.attr("d",t[0]),c?f.call(l.fill,c):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,p(v,"radial"===r),d,"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,M(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){M(t,this,"funnel")})).each((function(t){M(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){T(t,this,"funnelarea")})).each((function(t){T(t,this,"pie")})).each((function(t){var r,i,o=v(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,d=o.showGradientFill,g=o.anyFill,m=o.anyLine,y=t[0],b=y.trace,_=u(b),M=_.colorscale,T=_.reversescale,A=c.hasMarkers(b)||!g?"M5,0":m?"M5,-2":"M5,-3",k=n.select(this),L=k.select(".legendfill").selectAll("path").data(l||d?[t]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+b.uid;s.gradient(t,e,r,p(T),M,"fill")}})),f||h){var S=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:S}}),r=[a.minExtend(y,{trace:i})]}var E=k.select(".legendlines").selectAll("path").data(f||h?[r]:[]);E.enter().append("path").classed("js-line",!0),E.exit().remove(),E.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,p(T),M,"stroke")}})})).each((function(t){var r,i,o=v(t),l=o.anyFill,u=o.anyLine,f=o.showLine,h=o.showMarker,d=t[0],p=d.trace,g=!h&&!u&&!l&&c.hasText(p);function m(t,e,r,n){var i=a.nestedProperty(p,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(t){return d._distinct&&d.index&&t[d.index]?t[d.index]:t[0]}if(h||g||f){var b={},w={};if(h){b.mc=m("marker.color",x),b.mx=m("marker.symbol",x),b.mo=m("marker.opacity",a.mean,[.2,1]),b.mlc=m("marker.line.color",x),b.mlw=m("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var M=m("marker.size",a.mean,[2,16],12);b.ms=M,w.marker.size=M}f&&(w.line={width:m("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=m("textposition",x),b.ts=10,b.tc=m("textfont.color",x),b.tf=m("textfont.family",x)),r=[a.minExtend(d,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var T=n.select(this).select("g.legendpoints"),A=T.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 k=T.selectAll("g.pointtext").data(g?r:[]);k.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),k.exit().remove(),k.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)}))}))}},6540:function(t,e,r){"use strict";r(6052),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"}}},1868:function(t,e,r){"use strict";var n=r(4040),i=r(7316),a=r(9811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),u=l._,c=t.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=t._fullLayout,c={},f=a.list(t,null,!0),h=u._cartesianSpikesEnabled;if("zoom"===s){var d,p="in"===l?.5:2,v=(1+p)/2,g=(1-p)/2;for(i=0;i<f.length;i++)if(!(r=f[i]).fixedrange)if(d=r._name,"auto"===l)c[d+".autorange"]=!0;else if("reset"===l)void 0===r._rangeInitial0&&void 0===r._rangeInitial1?c[d+".autorange"]=!0:void 0===r._rangeInitial0?(c[d+".autorange"]=r._autorangeInitial,c[d+".range"]=[null,r._rangeInitial1]):void 0===r._rangeInitial1?(c[d+".range"]=[r._rangeInitial0,null],c[d+".autorange"]=r._autorangeInitial):c[d+".range"]=[r._rangeInitial0,r._rangeInitial1],void 0!==r._showSpikeInitial&&(c[d+".showspikes"]=r._showSpikeInitial,"on"!==h||r._showSpikeInitial||(h="off"));else{var m=[r.r2l(r.range[0]),r.r2l(r.range[1])],y=[v*m[0]+g*m[1],v*m[1]+g*m[0]];c[d+".range[0]"]=r.l2r(y[0]),c[d+".range[1]"]=r.l2r(y[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 d(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",d=f+".aspectratio",p=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[d+".x"]=v.viewInitial.aspectratio.x,l[d+".y"]=v.viewInitial.aspectratio.y,l[d+".z"]=v.viewInitial.aspectratio.z,l[p]=v.viewInitial.aspectmode)}n.call("_guiRelayout",t,l)}function p(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 d=0;d<3;d++){var p=o[d],v=c+"."+p+".showspikes";l[v]=!1,s[v]=f[p].showspikes}}r._previousVal=s}return l}function v(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout,s=o._subplots.geo||[],l=0;l<s.length;l++){var u=s[l],c=o[u];if("zoom"===i){var f=c.projection.scale,h="in"===a?2*f:.5*f;n.call("_guiRelayout",t,u+".projection.scale",h)}}"reset"===i&&x(t,"geo")}function g(t){var e=t._fullLayout;return!e.hovermode&&(e._has("cartesian")?e._isHoriz?"y":"x":"closest")}function m(t){var e=g(t);n.call("_guiRelayout",t,"hovermode",e)}function y(t,e){for(var r=e.currentTarget.getAttribute("data-val"),i=t._fullLayout,a=i._subplots.mapbox||[],o={},s=0;s<a.length;s++){var l=a[s],u=i[l].zoom,c="in"===r?1.05*u:u/1.05;o[l+".zoom"]=c}n.call("_guiRelayout",t,o)}function x(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];a[s+"."+f]=l[f]}n.call("_guiRelayout",t,a)}c.toImage={name:"toImage",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||"png";return u(t,"png"===e?"Download plot as a png":"Download plot")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};l.notifier(u(t,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&l.isIE()&&(l.notifier(u(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call("downloadImage",t,r).then((function(e){l.notifier(u(t,"Snapshot succeeded")+" - "+e,"long")})).catch((function(){l.notifier(u(t,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},c.sendDataToCloud={name:"sendDataToCloud",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},c.editInChartStudio={name:"editInChartStudio",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},c.pan2d={name:"pan2d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},c.select2d={name:"select2d",_cat:"select",title:function(t){return u(t,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return u(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},c.drawclosedpath={name:"drawclosedpath",title:function(t){return u(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},c.drawopenpath={name:"drawopenpath",title:function(t){return u(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},c.drawline={name:"drawline",title:function(t){return u(t,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},c.drawrect={name:"drawrect",title:function(t){return u(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},c.drawcircle={name:"drawcircle",title:function(t){return u(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},c.eraseshape={name:"eraseshape",title:function(t){return u(t,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return u(t,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return u(t,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return u(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return u(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f},c.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:h},c.pan3d={name:"pan3d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:h},c.orbitRotation={name:"orbitRotation",title:function(t){return u(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:h},c.tableRotation={name:"tableRotation",title:function(t){return u(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:h},c.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return u(t,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:d},c.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return u(t,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:d},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=p(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:m},c.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:m},c.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:m},c.resetViewSankey={name:"resetSankeyGroup",title:function(t){return u(t,"Reset view")},icon:o.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e["node.groups"].push(i.node.groups.slice()),e["node.x"].push(i.node.x.slice()),e["node.y"].push(i.node.y.slice())}n.call("restyle",t,e)}},c.toggleHover={name:"toggleHover",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=p(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"),d(t,e),x(t,"geo"),x(t,"mapbox")}},c.toggleSpikelines={name:"toggleSpikelines",title:function(t){return u(t,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",t,function(t){for(var e="on"===t._fullLayout._cartesianSpikesEnabled,r=a.list(t,null,!0),n={},i=0;i<r.length;i++){var o=r[i];n[o._name+".showspikes"]=!!e||o._showSpikeInitial}return n}(t))}},c.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return u(t,"Reset view")},attr:"reset",icon:o.home,click:function(t){x(t,"mapbox")}},c.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:y},c.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:y}},6052:function(t,e,r){"use strict";var n=r(1868),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}},824:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(1780),o=r(6540);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")}},3080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(6540),supplyLayoutDefaults:r(824),manage:r(8816)}},8816:function(t,e,r){"use strict";var n=r(9811),i=r(3028),a=r(4040),o=r(624).isUnifiedHover,s=r(6400),l=r(1868),u=r(6052).DRAW_MODES,c=r(3400).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,f=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var h,d=r.modeBarButtons;h=Array.isArray(d)&&d.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}(d):!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 d=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}))),p=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"),m=e._has("geo"),y=e._has("pie"),x=e._has("funnelarea"),b=e._has("gl2d"),_=e._has("ternary"),w=e._has("mapbox"),M=e._has("polar"),T=e._has("smith"),A=e._has("sankey"),k=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),L=o(e.hovermode),S=[];function E(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<p.length;u++){var c=p[u].toLowerCase();if(c===a||c===o){s=!0;break}}s||e.push(l[n])}S.push(e)}}var C=["toImage"];s.showEditInChartStudio?C.push("editInChartStudio"):s.showSendToCloud&&C.push("sendDataToCloud"),E(C);var O=[],R=[],P=[],D=[];(v||b||y||x||_)+m+g+w+M+T>1?(R=["toggleHover"],P=["resetViews"]):m?(O=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],P=["resetGeo"]):g?(R=["hoverClosest3d"],P=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],P=["resetViewMapbox"]):b?R=["hoverClosestGl2d"]:y?R=["hoverClosestPie"]:A?(R=["hoverClosestCartesian","hoverCompareCartesian"],P=["resetViewSankey"]):R=["toggleHover"],v&&(R=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],"noHover"))return!1;return!0}(r)||L)&&(R=[]),!v&&!b||k||(O=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==P[0]&&(P=["resetScale2d"])),g?D=["zoom3d","pan3d","orbitRotation","tableRotation"]:(v||b)&&!k||_?D=["zoom2d","pan2d"]:w||m?D=["pan2d"]:M&&(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 I=[],z=function(t){-1===I.indexOf(t)&&-1!==R.indexOf(t)&&I.push(t)};if(Array.isArray(d)){for(var N=[],F=0;F<d.length;F++){var B=d[F];"string"==typeof B?(B=B.toLowerCase(),-1!==u.indexOf(B)?(e._has("mapbox")||e._has("cartesian"))&&D.push(B):"togglespikelines"===B?z("toggleSpikelines"):"togglehover"===B?z("toggleHover"):"hovercompare"===B?z("hoverCompareCartesian"):"hoverclosest"===B?(z("hoverClosestCartesian"),z("hoverClosestGeo"),z("hoverClosest3d"),z("hoverClosestGl2d"),z("hoverClosestPie")):"v1hovermode"===B&&(z("toggleHover"),z("hoverClosestCartesian"),z("hoverCompareCartesian"),z("hoverClosestGeo"),z("hoverClosest3d"),z("hoverClosestGl2d"),z("hoverClosestPie"))):N.push(B)}d=N}return E(D),E(O.concat(P)),E(I),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}(S,d)}(t),f?f.update(t,h):e._modeBar=s(t,h)}else f&&(f.destroy(),delete e._modeBar)}},6400:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3400),o=r(9224),s=r(5788).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}},6680:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=(0,r(1780).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"}},5984:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},2148:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(1780),o=r(1272),s=r(6680),l=r(5984);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||{},d=a.newContainer(e,"rangeselector");function p(t,e){return n.coerce(h,d,s,t,e)}if(p("visible",o(h,d,{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);p("x",v[0]),p("y",v[1]),n.noneOrAll(t,e,["x","y"]),p("xanchor"),p("yanchor"),n.coerceFont(p,"font",r.font);var g=p("bgcolor");p("activecolor",i.contrast(g,l.lightAmount,l.darkAmount)),p("bordercolor"),p("borderwidth")}}},216:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(6308),s=r(3616),l=r(3400),u=l.strTranslate,c=r(2736),f=r(9811),h=r(4284),d=h.LINE_SPACING,p=h.FROM_TL,v=h.FROM_BR,g=r(5984),m=r(8040);function y(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx: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),y);e.enter().append("g").classed("rangeselector",!0),e.exit().remove(),e.style({cursor:"pointer","pointer-events":"all"}),e.each((function(e){var r=n.select(this),o=e,f=o.rangeselector,h=r.selectAll("g.button").data(l.filterVisible(f.buttons));h.enter().append("g").classed("button",!0),h.exit().remove(),h.each((function(e){var r=n.select(this),a=m(o,e);e._isActive=function(t,e,r){if("all"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,f,e),r.call(b,f,e,t),r.on("click",(function(){t._dragged||i.call("_guiRelayout",t,a)})),r.on("mouseover",(function(){e._isHovered=!0,r.call(x,f,e)})),r.on("mouseout",(function(){e._isHovered=!1,r.call(x,f,e)}))})),function(t,e,r,i,o){var f=0,h=0,m=r.borderwidth;e.each((function(){var t=n.select(this).select(".selector-text"),e=r.font.size*d,i=Math.max(e*c.lineCount(t),16)+3;h=Math.max(h,i)})),e.each((function(){var t=n.select(this),e=t.select(".selector-rect"),i=t.select(".selector-text"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*d,l=c.lineCount(i),p=Math.max(a+10,g.minButtonWidth);t.attr("transform",u(m+f,m)),e.attr({x:0,y:0,width:p,height:h}),c.positionText(i,p/2,h/2-(l-1)*o/2+3),f+=p+5}));var y=t._fullLayout._size,x=y.l+y.w*r.x,b=y.t+y.h*(1-r.y),_="left";l.isRightAnchor(r)&&(x-=f,_="right"),l.isCenterAnchor(r)&&(x-=f/2,_="center");var w="top";l.isBottomAnchor(r)&&(b-=h,w="bottom"),l.isMiddleAnchor(r)&&(b-=h/2,w="middle"),f=Math.ceil(f),h=Math.ceil(h),x=Math.round(x),b=Math.round(b),a.autoMargin(t,i+"-range-selector",{x:r.x,y:r.y,l:f*p[_],r:f*v[_],b:h*v[w],t:h*p[w]}),o.attr("transform",u(x,b))}(t,h,f,o._name,r)}))}},8040:function(t,e,r){"use strict";var n=r(3220),i=r(3400).titleCase;t.exports=function(t,e){var r=t._name,a={};if("all"===e.step)a[r+".autorange"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n["utc"+i(s)],u=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(o,-u));break;case"todate":var c=l.offset(o,-u);r=t.l2r(+l.ceil(c))}return[r,a[1]]}(t,e);a[r+".range[0]"]=o[0],a[r+".range[1]"]=o[1]}return a}},1152:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(6680)}}},layoutAttributes:r(6680),handleDefaults:r(2148),draw:r(216)}},8820:function(t,e,r){"use strict";var n=r(2548);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"}},6652:function(t,e,r){"use strict";var n=r(9811).list,i=r(9280).getAutoRange,a=r(4636);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))}}},4636: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}},1659:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(9811),o=r(8820),s=r(936);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,d=i.newContainer(u,"rangeslider");if(_("visible")){_("bgcolor",e.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!u.isValidRange(h.range)),_("range");var p=e._subplots;if(p)for(var v=p.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),m=0;m<g.length;m++){var y=g[m];c=h[y]||{},f=i.newContainer(d,y,"yaxis");var x,b=e[y];c.range&&b.isValidRange(c.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",b.range.slice())}d._input=h}}function _(t,e){return n.coerce(h,d,o,t,e)}function w(t,e){return n.coerce(c,f,s,t,e)}}},60:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(3616),u=r(6308),c=r(1668),f=r(7952),h=r(9811),d=r(6476),p=r(3972),v=r(4636);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function m(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 x(t,e,r,i){var s,u=e.calcdata,c=t.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(t){return v.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each((function(t,o){var l=n.select(this),c=0===o,d=h.getFromId(e,t,"y"),p=d._name,v=i[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:d.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():d.range.slice(),calendar:d.calendar},d.rangebreaks&&(g.layout[p].rangebreaks=d.rangebreaks),a.supplyDefaults(g);var m=g._fullLayout.xaxis,y=g._fullLayout[p];m.clearCalc(),m.setScale(),y.clearCalc(),y.setScale();var x={id:t,plotgroup:l,xaxis:m,yaxis:y,isRangePlot:!0};c?s=x:(x.mainplot="xy",x.mainplotinfo=s),f.rangePlot(e,x,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(u,t))}))}function b(t,e,r,n,i){o.ensureSingle(t,"rect",v.maskMinClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),o.ensureSingle(t,"rect",v.maskMaxClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),"match"!==i.rangemode&&(o.ensureSingle(t,"rect",v.maskMinOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(u.fill,v.maskOppAxisColor),o.ensureSingle(t,"rect",v.maskMaxOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",v.maskOppBorder).call(u.fill,v.maskOppAxisColor))}function _(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,"rect",v.slideBoxClassName,(function(t){t.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:v.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,"g",v.grabberMinClassName),a=o.ensureSingle(t,"g",v.grabberMaxClassName),s={x:0,width:v.handleWidth,rx:v.handleRadius,fill:u.background,stroke:u.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,"rect",v.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,"rect",v.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var c={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:e._context.staticPlot?void 0:v.grabAreaCursor};o.ensureSingle(i,"rect",v.grabAreaMinClassName,(function(t){t.attr(c)})).attr("height",n._height),o.ensureSingle(a,"rect",v.grabAreaMaxClassName,(function(t){t.attr(c)})).attr("height",n._height)}t.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,a=0;a<r.length;a++){var l=r[a][v.name];l._clipId=l._id+"-"+e._uid}var u=e._infolayer.selectAll("g."+v.containerClassName).data(r,(function(t){return t._name}));u.exit().each((function(t){var r=t[v.name];e._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(u.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),u.each((function(r){var a=n.select(this),l=r[v.name],u=e[h.id2name(r.anchor)],f=l[h.id2name(r.anchor)];if(l.range){var M,T=o.simpleMap(l.range,r.r2l),A=o.simpleMap(r.range,r.r2l);M=A[0]<A[1]?[Math.min(T[0],A[0]),Math.max(T[1],A[1])]:[Math.max(T[0],A[0]),Math.min(T[1],A[1])],l.range=l._input.range=o.simpleMap(M,r.l2r)}r.cleanRange("rangeslider.range");var k=e._size,L=r.domain;l._width=k.w*(L[1]-L[0]);var S=Math.round(k.l+k.w*L[0]),E=Math.round(k.t+k.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 C=l._rl[0],O=l._rl[1],R=O-C;if(l.p2d=function(t){return t/l._width*R+C},l.d2p=function(t){return(t-C)/R*l._width},r.rangebreaks){var P=r.locateBreaks(C,O);if(P.length){var D,I,z=0;for(D=0;D<P.length;D++)z+=(I=P[D]).max-I.min;var N=l._width/(O-C-z),F=[-N*C];for(D=0;D<P.length;D++)I=P[D],F.push(F[F.length-1]-N*(I.max-I.min));for(l.d2p=function(t){for(var e=F[0],r=0;r<P.length;r++){var n=P[r];if(t>=n.max)e=F[r+1];else if(t<n.min)break}return e+N*t},D=0;D<P.length;D++)(I=P[D]).pmin=l.d2p(I.min),I.pmax=l.d2p(I.max);l.p2d=function(t){for(var e=F[0],r=0;r<P.length;r++){var n=P[r];if(t>=n.pmax)e=F[r+1];else if(t<n.pmin)break}return(t-e)/N}}}if("match"!==f.rangemode){var B=u.r2l(f.range[0]),j=u.r2l(f.range[1])-B;l.d2pOppAxis=function(t){return(t-B)/j*l._height}}a.call(m,t,r,l).call(y,t,r,l).call(x,t,r,l).call(b,t,r,l,f).call(_,t,r,l).call(w,t,r,l),function(t,e,r,a){if(!e._context.staticPlot){var s=t.select("rect."+v.slideBoxClassName).node(),l=t.select("rect."+v.grabAreaMinClassName).node(),u=t.select("rect."+v.grabAreaMaxClassName).node();t.on("mousedown",c),t.on("touchstart",c)}function c(){var c=n.event,f=c.target,h=g(c),v=h-t.node().getBoundingClientRect().left,m=a.d2p(r._rl[0]),y=a.d2p(r._rl[1]),x=d.coverSlip();function b(t){var c,d,b,_=+g(t)-h;switch(f){case s:if(b="ew-resize",m+_>r._length||y+_<0)return;c=m+_,d=y+_;break;case l:if(b="col-resize",m+_>r._length)return;c=m+_,d=y;break;case u:if(b="col-resize",y+_<0)return;c=m,d=y+_;break;default:b="ew-resize",c=v,d=v+_}if(d<c){var w=d;d=c,c=w}a._pixelMin=c,a._pixelMax=d,p(n.select(x),b),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",e,r._name+".range",[s,l])}))}(0,e,r,a)}function _(){x.removeEventListener("mousemove",b),x.removeEventListener("mouseup",_),this.removeEventListener("touchmove",b),this.removeEventListener("touchend",_),o.removeElement(x)}this.addEventListener("touchmove",b),this.addEventListener("touchend",_),x.addEventListener("mousemove",b),x.addEventListener("mouseup",_)}}(a,t,r,l),function(t,e,r,n,i,a){var l=v.handleWidth/2;function u(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function f(t){return o.constrain(t,-l,n._width+l)}var h=u(n.d2p(r._rl[0])),d=u(n.d2p(r._rl[1]));if(t.select("rect."+v.slideBoxClassName).attr("x",h).attr("width",d-h),t.select("rect."+v.maskMinClassName).attr("width",h),t.select("rect."+v.maskMaxClassName).attr("x",d).attr("width",n._width-d),"match"!==a.rangemode){var p=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",p).attr("width",d-h),t.select("rect."+v.maskMaxOppAxisClassName).attr("x",h).attr("y",g).attr("height",n._height-g).attr("width",d-h),t.select("rect."+v.slideBoxClassName).attr("y",p).attr("height",g-p)}var m=.5,y=Math.round(f(h-l))-m,x=Math.round(f(d-l))+m;t.select("g."+v.grabberMinClassName).attr("transform",s(y,m)),t.select("g."+v.grabberMaxClassName).attr("transform",s(x,m))}(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.5*r.title.font.size,"text-anchor":"middle"}})})))}},7944:function(t,e,r){"use strict";var n=r(9811),i=r(2736),a=r(4636),o=r(4284).LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var u=o[s];u._id=s+o._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=i},e.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),u=0,c=0;return"bottom"===e.side&&(u=e._depth,e.title.text!==r._dfltTitle[l]&&(c=1.5*e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2*n._offsetShift}}},9692:function(t,e,r){"use strict";var n=r(3400),i=r(8820),a=r(936),o=r(7944);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(8820),handleDefaults:r(1659),calcAutorange:r(6652),draw:r(60),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},936: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"}},3956:function(t,e,r){"use strict";var n=r(3916),i=r(2904).line,a=r(8192).u,o=r(2880).extendFlat,s=r(7824).overrideAll,l=r(1780).templatedArray;r(6208),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")},3280:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},4224:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(3956),s=r(5152);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,d,p,v=c[f],g={_fullLayout:r},m=i.coerceRef(t,e,g,v);if((h=i.getFromId(g,m))._selectionIndices.push(e._index),p=s.rangeToShapePosition(h),d=s.shapePositionToRange(h),u){var y=v+"0",x=v+"1",b=t[y],_=t[x];t[y]=d(t[y],!0),t[x]=d(t[x],!0),i.coercePosition(e,g,a,m,y),i.coercePosition(e,g,a,m,x);var w=e[y],M=e[x];void 0!==w&&void 0!==M&&(e[y]=p(w),e[x]=p(M),t[y]=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))}}},3640:function(t,e,r){"use strict";var n=r(9856).readPaths,i=r(5496),a=r(1936).clearOutlineControllers,o=r(6308),s=r(3616),l=r(1780).arrayEditor,u=r(5152),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++)d(t,i)}function h(t){return t._context.editSelection}function d(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=u.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,d=r.plotinfo;a._input&&function(r){var u=c(t,a),g={"data-index":e,"fill-rule":"evenodd",d:u},m=a.opacity,y="rgba(0,0,0,0)",x=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),b=a.line.width,_=a.line.dash;b||(b=5,_="solid");var w=h(t)&&t._fullLayout._activeSelectionIndex===e;w&&(y=t._fullLayout.activeselection.fillcolor,m=t._fullLayout.activeselection.opacity);for(var M=[],T=1;T>=0;T--){var A=r.append("path").attr(g).style("opacity",T?.1:m).call(o.stroke,x).call(o.fill,y).call(s.dashLine,T?"solid":_,T?4+b:b);if(p(A,t,a),w){var k=l(t.layout,"selections",a);A.style({cursor:"move"});var L={element:A.node(),plotinfo:d,gd:t,editHelpers:k,isActiveSelection:!0},S=n(u,t);i(S,A,L)}else A.style("pointer-events",T?"all":"none");M[T]=A}var E=M[0];M[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,E)}))}(t._fullLayout._selectionLayer)}function p(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:d,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=v,f(t)}}}},4200:function(t,e,r){"use strict";var n=r(8192).u,i=r(2880).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"}}},1004:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(t,e,r){"use strict";var n=r(2760).selectMode,i=r(1936).clearOutline,a=r(9856),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),u=e.gd,c=u._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,d=f.yaxis,p=e.isActiveSelection,v=e.dragmode,g=(u.layout||{}).selections||[];if(!n(v)&&void 0!==p){var m=u._fullLayout._activeSelectionIndex;if(m<g.length)switch(u._fullLayout.selections[m].type){case"rect":v="select";break;case"path":v="lasso"}}var y,x=o(a,u,f,p),b={xref:h._id,yref:d._id,opacity:c.opacity,line:{color:c.line.color,width:c.line.width,dash:c.line.dash}};1===x.length&&(y=x[0]),y&&5===y.length&&"select"===v?(b.type="rect",b.x0=y[0][1],b.y0=y[0][2],b.x1=y[2][1],b.y1=y[2][2]):(b.type="path",h&&d&&l(x,h,d),b.path=s(x),y=null),i(u);for(var _=e.editHelpers,w=(_||{}).modifyItem,M=[],T=0;T<g.length;T++){var A=u._fullLayout.selections[T];if(A){if(M[T]=A._input,void 0!==p&&T===u._fullLayout._activeSelectionIndex){var k=b;switch(A.type){case"rect":w("x0",k.x0),w("x1",k.x1),w("y0",k.y0),w("y1",k.y1);break;case"path":w("path",k.path)}}}else M[T]=A}return void 0===p?(M.push(b),M):_?_.getUpdateObj():{}}}}},5840:function(t,e,r){"use strict";var n=r(3400).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},2676:function(t,e,r){"use strict";var n=r(3640),i=r(3156);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(3956),supplyLayoutDefaults:r(4224),supplyDrawNewSelectionDefaults:r(1004),includeBasePlot:r(6632)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},3156:function(t,e,r){"use strict";var n=r(4756),i=r(1456),a=r(4040),o=r(3616).dashStyle,s=r(6308),l=r(3024),u=r(624).makeEventData,c=r(2760),f=c.freeMode,h=c.rectMode,d=c.drawMode,p=c.openMode,v=c.selectMode,g=r(5152),m=r(3068),y=r(5496),x=r(1936).clearOutline,b=r(9856),_=b.handleEllipse,w=b.readPaths,M=r(3940).newShapes,T=r(5968),A=r(3640).activateLastSelection,k=r(3400),L=k.sorterAsc,S=r(2065),E=r(1200),C=r(9811).getFromId,O=r(3696),R=r(9172).redrawReglTraces,P=r(3280),D=P.MINSELECT,I=S.filter,z=S.tester,N=r(5840),F=N.p2r,B=N.axValue,j=N.getTransform;function U(t){return void 0!==t.subplot}function H(t,e,r,n,i,a,o){var s,l,u,c,f,h,d,v,g,m=e._hoverdata,x=e._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(m)){W(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(m,s=Z(e,r,n,i));if(_.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,_):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=K(_))){for(o&&o.remove(),g=0;g<s.length;g++)(l=s[g])._module.selectPoints(l,!1);Q(e,s),q(a),x&&ht(e)}else{for(d=t.shiftKey&&(void 0!==h?h:K(_)),u=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}(_.pointNumber,_.searchInfo,d),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(Q(e,s,v={points:b}),u&&a&&a.selectionDefs.push(u),o){var M=a.mergedPolygons,T=p(a.dragmode);y(et(M,T),o,a)}x&&ft(e,v)}}}function V(t){return"pointNumber"in t&&"searchInfo"in t}function Y(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=V(t[0])?0:t[0][0][0],n=r,i=V(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(V(t[o]))e.push(Y(t[o]));else{var s=z(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function W(t,e,r){var n=e._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(t.shiftKey||t.altKey)&&!(d(a)&&p(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||q(r),o||(x(e),n._lastSelectedSubplot=i.id)}function q(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=d(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(u=M(f,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(t)&&(c=T(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){e&&A(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function X(t){return t._id}function Z(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(X),u=r.map(X);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!U({subplot:n})||a.subplot!==n&&a.geo!==n)if("splom"===a.type){if(a._xaxes[l[0]]&&a._yaxes[u[0]]){var c=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)||a._xA&&a._xA.overlaying))continue;if(!(-1!==u.indexOf(a.yaxis)||a._yA&&a._yA.overlaying))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 Q(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,d=c.pointIndex,p=c.pointIndices;p?([].push.apply(f.selectedpoints,p),i._fullInput!==i&&[].push.apply(h.selectedpoints,p)):(f.selectedpoints.push(d),i._fullInput!==i&&h.selectedpoints.push(d))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,"regl")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(O(t),R(t))}(t,e)}function $(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 p=h._zoomlayer,g=h.dragmode,m=d(g),y=v(g);if(m||y){var x=C(t,o,"x"),b=C(t,s,"y");if(x&&b){var _=p.selectAll(".select-outline-"+a.id);if(_&&t._fullLayout._outlining&&_.length){for(var M=_[0][0].getAttribute("d"),T=w(M,t,a),A=[],k=0;k<T.length;k++){for(var L=T[k],S=[],E=0;E<L.length;E++)S.push([lt(x,L[E][1]),lt(b,L[E][2])]);S.xref=o,S.yref=s,S.subtract=st(S,A),A.push(S)}f=f.concat(A)}}}}var O=o&&s?[o+s]:h._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var R={},P=0;P<O.length;P++){var D=O[P],I=D.indexOf("y"),z=D.slice(0,I),N=D.slice(I),F=o&&s?r:void 0;if(F=at(f,z,N,F)){var B=n;if(!l){var j=C(t,z,"x"),U=C(t,N,"y");B=Z(t,[j],[U],D);for(var H=0;H<B.length;H++){var V=B[H],Y=V.cd[0],G=Y.trace;if("scattergl"===V._module.name&&!Y.t.xpx){var W=G.x,q=G.y,X=G._length;Y.t.xpx=[],Y.t.ypx=[];for(var J=0;J<X;J++)Y.t.xpx[J]=j.c2p(W[J]),Y.t.ypx[J]=U.c2p(q[J])}"splom"===V._module.name&&(R[G.uid]||(R[G.uid]=!0))}}var K=rt(F,B);u=u.concat(K),c=c.concat(B)}}var $={points:u};Q(t,c,$);var tt=h.clickmode.indexOf("event")>-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,dt=et[0].yref;if(nt&&dt){var pt=ut(et);ct([C(t,nt,"x"),C(t,dt,"y")])($,pt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ft(t,$),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&&($.points.length?ft(t,$):ht(t)),h._deselect=!1}return{eventData:$,selectionTesters:r}}function it(t,e,r,n){n=Z(t,[C(t,e,"x")],[C(t,r,"y")],e+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}Q(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=$(i,o,!!o.subtract)):(i=[o],n=z(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,d=s.xref,p=s.yref,v=C(t,d,"x"),y=C(t,p,"y");if("rect"===s.type){h=[];var x=lt(v,s.x0),b=lt(v,s.x1),_=lt(y,s.y0),w=lt(y,s.y1);h=[[x,_],[x,w],[b,w],[b,_]],l=Math.min(x,b),u=Math.max(x,b),c=Math.min(_,w),f=Math.max(_,w),h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=d,h.yref=p,h.subtract=!1,h.isRect=!0,r.push(h)}else if("path"===s.type)for(var M=s.path.split("Z"),T=[],A=0;A<M.length;A++){var k=M[A];if(k){k+="Z";var L=g.extractPathCoords(k,m.paramIsX,"raw"),S=g.extractPathCoords(k,m.paramIsY,"raw");l=1/0,u=-1/0,c=1/0,f=-1/0,h=[];for(var E=0;E<L.length;E++){var O=lt(v,L[E]),R=lt(y,S[E]);h.push([O,R]),l=Math.min(O,l),u=Math.max(O,u),c=Math.min(R,c),f=Math.max(R,f)}h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=d,h.yref=p,h.subtract=st(h,T),T.push(h),r.push(h)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return"date"===t.type&&(e=e.replace("_"," ")),"log"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ut(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ct(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+"min"],c=r[l+"max"];void 0!==u&&void 0!==c&&(n[s]=[F(o,u),F(o,c)].sort(L))}else i||(i={}),i[s]=r.map(B(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ft(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function ht(t){t.emit("plotly_deselect",null)}t.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var u=!U(n),c=f(i),g=h(i),m=p(i),x=d(i),b=v(i),w="drawcircle"===i,M="drawline"===i||w,T=n.gd,A=T._fullLayout,L=b&&"immediate"===A.newselection.mode&&u,S=A._zoomlayer,C=n.element.getBoundingClientRect(),O=n.plotinfo,R=j(O),N=e-C.left,F=r-C.top;A._calcInverseTransform(T);var B=k.apply3DTransform(A._invTransform)(N,F);N=B[0],F=B[1];var V,Y,X,J,K,tt,at,ot=A._invScaleX,st=A._invScaleY,lt=N,dt=F,pt="M"+N+","+F,vt=n.xaxes[0],gt=n.yaxes[0],mt=vt._length,yt=gt._length,xt=t.altKey&&!(d(i)&&m);W(t,T,n),c&&(V=I([[N,F]],P.BENDPX));var bt=S.selectAll("path.select-outline-"+O.id).data([1]),_t=x?A.newshape:A.newselection;x&&(n.hasText=_t.label.text||_t.label.texttemplate);var wt=x&&!m?_t.fillcolor:"rgba(0,0,0,0)",Mt=_t.line.color||(u?s.contrast(T._fullLayout.plot_bgcolor):"#7f7f7f");bt.enter().append("path").attr("class","select-outline select-outline-"+O.id).style({opacity:x?_t.opacity/2:1,"stroke-dasharray":o(_t.line.dash,_t.line.width),"stroke-width":_t.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Mt).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",R).attr("d",pt+"Z");var Tt=S.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",R).attr("d","M0,0Z");if(x&&n.hasText){var At=S.select(".label-temp");At.empty()&&(At=S.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var kt=A._uid+P.SELECTID,Lt=[],St=Z(T,n.xaxes,n.yaxes,n.subplot);L&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(u){var t=vt._id,e=gt._id;it(T,t,e,St);for(var r=(T.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&&(T._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",T,{selections:n}))}});var Et=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(mt,ot*t+N)),dt=Math.max(0,Math.min(yt,st*e+F));var r=Math.abs(lt-N),i=Math.abs(dt-F);if(g){var a,o,s;if(b){var l=A.selectdirection;switch(a="any"===l?i<Math.min(.6*r,D)?"h":r<Math.min(.6*i,D)?"v":"d":l){case"h":o=w?yt/2:0,s=yt;break;case"v":o=w?mt/2:0,s=mt}}if(x)switch(A.newshape.drawdirection){case"vertical":a="h",o=w?yt/2:0,s=yt;break;case"horizontal":a="v",o=w?mt/2:0,s=mt;break;case"ortho":r<i?(a="h",o=F,s=dt):(a="v",o=N,s=lt);break;default:a="d"}"h"===a?((J=M?_(w,[lt,o],[lt,s]):[[N,o],[N,s],[lt,s],[lt,o]]).xmin=M?lt:Math.min(N,lt),J.xmax=M?lt:Math.max(N,lt),J.ymin=Math.min(o,s),J.ymax=Math.max(o,s),Tt.attr("d","M"+J.xmin+","+(F-D)+"h-4v"+2*D+"h4ZM"+(J.xmax-1)+","+(F-D)+"h4v"+2*D+"h-4Z")):"v"===a?((J=M?_(w,[o,dt],[s,dt]):[[o,F],[o,dt],[s,dt],[s,F]]).xmin=Math.min(o,s),J.xmax=Math.max(o,s),J.ymin=M?dt:Math.min(F,dt),J.ymax=M?dt:Math.max(F,dt),Tt.attr("d","M"+(N-D)+","+J.ymin+"v-4h"+2*D+"v4ZM"+(N-D)+","+(J.ymax-1)+"v4h"+2*D+"v-4Z")):"d"===a&&((J=M?_(w,[N,F],[lt,dt]):[[N,F],[N,dt],[lt,dt],[lt,F]]).xmin=Math.min(N,lt),J.xmax=Math.max(N,lt),J.ymin=Math.min(F,dt),J.ymax=Math.max(F,dt),Tt.attr("d","M0,0Z"))}else c&&(V.addPt([lt,dt]),J=V.filtered);if(n.selectionDefs&&n.selectionDefs.length?(X=$(n.mergedPolygons,J,xt),J.subtract=xt,Y=G(n.selectionDefs.concat([J]))):(X=[J],Y=z(J)),y(et(X,m),bt,n),b){var u,f=nt(T,!1),h=f.eventData?f.eventData.points.slice():[];f=nt(T,!1,Y,St,n),Y=f.selectionTesters,at=f.eventData,u=V?V.filtered:ut(X),E.throttle(kt,P.SELECTDELAY,(function(){for(var t=(Lt=rt(Y,St)).slice(),e=0;e<h.length;e++){for(var r=h[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Et(at,u),function(t,e){t.emit("plotly_selecting",e)}(T,at)}))}},n.clickFn=function(t,e){if(Tt.remove(),T._fullLayout._activeShapeIndex>=0)T._fullLayout._deactivateShape(T);else if(!x){var r=A.clickmode;E.done(kt).then((function(){if(E.clear(kt),2===t){for(bt.remove(),K=0;K<St.length;K++)(tt=St[K])._module.selectPoints(tt,!1);if(Q(T,St),q(n),ht(T),St.length){var i=St[0].xaxis,o=St[0].yaxis;if(i&&o){for(var s=[],u=T._fullLayout.selections,c=0;c<u.length;c++){var f=u[c];f&&(f.xref===i._id&&f.yref===o._id||s.push(f))}s.length<u.length&&(T._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",T,{selections:s}))}}}else r.indexOf("select")>-1&&H(e,T,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(T,void 0);l.click(T,e,O.id)})).catch(k.error)}},n.doneFn=function(){Tt.remove(),E.done(kt).then((function(){E.clear(kt),!L&&J&&n.selectionDefs&&(J.subtract=xt,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,X)),(L||x)&&q(n,L),n.doneFnCompleted&&n.doneFnCompleted(Lt),b&&ft(T,at)})).catch(k.error)}},clearOutline:x,clearSelectionsCache:q,selectOnClick:H}},6056:function(t,e,r){"use strict";var n=r(3916),i=r(5376),a=r(2904).line,o=r(8192).u,s=r(2880).extendFlat,l=r(1780).templatedArray,u=(r(6208),r(5464)),c=r(1776).ye,f=r(7728);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},u.legend,{editType:"calc+arraydraw"}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:s({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:s({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:s({},a.color,{editType:"arraydraw"}),width:s({},a.width,{editType:"calc+arraydraw"}),dash:s({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:c({},{keys:Object.keys(f)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},6084:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(3068),o=r(5152);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),d=n.aggNums(Math.min,null,f),p=d<0?Math.abs(d)+u:u,v=h>0?h+u:u;return{ppad:u,ppadplus:c?p:v,ppadminus:c?v:p}}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,d=-1/0,p=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;l<p.length;l++)void 0!==(u=i[p[l].charAt(0)].drawn)&&(!(c=p[l].substr(1).match(a.paramRE))||c.length<u||((f=s(c[u]))<h&&(h=f),f>d&&(d=f)));return d>=h?[h,d]: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 d=i.getRefType(h.xref),p=i.getRefType(h.yref);if("paper"!==h.xref&&"domain"!==d){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"!==p){var m="pixel"===h.ysizemode?h.yanchor:h.y0,y="pixel"===h.ysizemode?h.yanchor:h.y1;(f=c(u=i.getFromId(t,h.yref),m,y,h.path,a.paramIsY))&&(h._extremes[u._id]=i.findExtremes(u,f,l(h)))}}}},3068: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}}},3712:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(6056),s=r(5152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(e._isShape=!0,a("visible")){a("showlegend")&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),n.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),u=a("type",l?"path":"rect"),c="path"!==u;c&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var v,g,m,y=d[p],x=y+"anchor",b="x"===y?f:h,_={_fullLayout:r},w=i.coerceRef(t,e,_,y,void 0,"paper");if("range"===i.getRefType(w)?((v=i.getFromId(_,w))._shapeIndices.push(e._index),m=s.rangeToShapePosition(v),g=s.shapePositionToRange(v)):g=m=n.identity,c){var M=y+"0",T=y+"1",A=t[M],k=t[T];t[M]=g(t[M],!0),t[T]=g(t[T],!0),"pixel"===b?(a(M,0),a(T,10)):(i.coercePosition(e,_,a,w,M,.25),i.coercePosition(e,_,a,w,T,.75)),e[M]=m(e[M]),e[T]=m(e[T]),t[M]=A,t[T]=k}if("pixel"===b){var L=t[x];t[x]=g(t[x],!0),i.coercePosition(e,_,a,w,x,.25),e[x]=m(e[x]),t[x]=L}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var S,E,C="line"===u;if(c&&(S=a("label.texttemplate")),S||(E=a("label.text")),E||S){a("label.textangle");var O=a("label.textposition",C?"middle":"middle center");a("label.xanchor"),a("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(C,O)),a("label.padding"),n.coerceFont(a,"label.font",r.font)}}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},728:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(2736),o=r(3616),s=r(9856).readPaths,l=r(5152),u=l.getPathString,c=r(7728),f=r(4284).FROM_TL;t.exports=function(t,e,r,h){if(h.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var d;if(r.label.texttemplate){var p={};if("path"!==r.type){var v=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var m in c){var y=c[m](r,v,g);void 0!==y&&(p[m]=y)}}d=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,p)}else d=r.label.text;var x,b,_,w,M={"data-index":e},T=r.label.font,A=h.append("g").attr(M).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(d);if(r.path){var k=u(t,r),L=s(k,t);x=1/0,_=1/0,b=-1/0,w=-1/0;for(var S=0;S<L.length;S++)for(var E=0;E<L[S].length;E++)for(var C=L[S][E],O=1;O<C.length;O+=2){var R=C[O],P=C[O+1];x=Math.min(x,R),b=Math.max(b,R),_=Math.min(_,P),w=Math.max(w,P)}}else{var D=i.getFromId(t,r.xref),I=i.getRefType(r.xref),z=i.getFromId(t,r.yref),N=i.getRefType(r.yref),F=l.getDataToPixel(t,D,!1,I),B=l.getDataToPixel(t,z,!0,N);x=F(r.x0),b=F(r.x1),_=B(r.y0),w=B(r.y1)}var j=r.label.textangle;"auto"===j&&(j="line"===r.type?function(t,e,r,n){var i,a;return a=Math.abs(r-t),i=r>=t?e-n:n-e,-180/Math.PI*Math.atan2(i,a)}(x,_,b,w):0),A.call((function(e){return e.call(o.font,T).attr({}),a.convertToTspans(e,t),e}));var U=function(t,e,r,n,i,a,o){var s,l,u,c,h=i.label.textposition,d=i.label.textangle,p=i.label.padding,v=i.type,g=Math.PI/180*a,m=Math.sin(g),y=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===x&&(x="start"===h?"auto"===d?r>t?"left":r<t?"right":"center":r>t?"right":r<t?"left":"center":"end"===h?"auto"===d?r>t?"right":r<t?"left":"center":r>t?"left":r<t?"right":"center":"center");var _={bottom:-1,middle:0,top:1};if("auto"===d){var w=_[b];u=-p*m*w,c=p*y*w}else u=p*{left:1,center:0,right:-1}[x],c=p*_[b];s+=u,l+=c}else u=p+3,-1!==h.indexOf("right")?(s=Math.max(t,r)-u,"auto"===x&&(x="right")):-1!==h.indexOf("left")?(s=Math.min(t,r)+u,"auto"===x&&(x="left")):(s=(t+r)/2,"auto"===x&&(x="center")),l=-1!==h.indexOf("top")?Math.min(e,n):-1!==h.indexOf("bottom")?Math.max(e,n):(e+n)/2,c=p,"bottom"===b?l-=c:"top"===b&&(l+=c);var M=f[b],T=i.label.font.size,A=o.height;return{textx:s+(A*M-T)*m,texty:l+-(A*M-T)*y,xanchor:x}}(x,_,b,w,r,j,o.bBox(A.node())),H=U.textx,V=U.texty,Y=U.xanchor;A.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Y],y:V,x:H,transform:"rotate("+j+","+H+","+V+")"}).call(a.positionText,H,V)}}},5496:function(t,e,r){"use strict";var n=r(3400).strTranslate,i=r(6476),a=r(2760),o=a.drawMode,s=a.selectMode,l=r(4040),u=r(6308),c=r(7e3),f=c.i000,h=c.i090,d=c.i180,p=c.i270,v=r(1936).clearOutlineControllers,g=r(9856),m=g.pointsOnRectangle,y=g.pointsOnEllipse,x=g.writePaths,b=r(3940).newShapes,_=r(3940).createShapeObj,w=r(5968),M=r(728);function T(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,c){c||(c=0);var g=a.gd;function A(){t(e,r,a,c++),(y(e[0])||a.hasText)&&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=w(r,a),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var L,S,E,C,O,R=g._fullLayout._zoomlayer,P=a.dragmode,D=o(P),I=s(P);if((D||I)&&(g._fullLayout._outlining=!0),v(g),r.attr("d",x(e)),c||!a.isActiveShape&&!a.isActiveSelection||(O=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){L=[];for(var r=0;r<e.length;r++){var o=e[r],s=m(o),l=!s&&y(o);L[r]=[];for(var c=o.length,v=0;v<c;v++)if("Z"!==o[v][0]&&(!l||v===f||v===h||v===d||v===p)){var x,b=s&&a.isActiveSelection;b&&(x=T(o,v));var _=o[v][1],w=o[v][2],M=t.append(b?"rect":"circle").attr("data-i",r).attr("data-j",v).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(b){var A=x[1]-_,k=x[2]-w,S=k?5:Math.max(Math.min(25,Math.abs(A)-5),5),E=A?5:Math.max(Math.min(25,Math.abs(k)-5),5);M.classed(k?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",S).attr("height",E).attr("x",_-S/2).attr("y",w-E/2).attr("transform",n(A/2,k/2))}else M.classed("cursor-grab",!0).attr("r",5).attr("cx",_).attr("cy",w);L[r][v]={element:M.node(),gd:g,prepFn:F,doneFn:j,clickFn:U},i.init(L[r][v])}}}(R.append("g").attr("class","outline-controllers")),function(){if(S=[],e.length){S[0]={element:r[0][0],gd:g,prepFn:V,doneFn:Y,clickFn:G},i.init(S[0])}}()),D&&a.hasText){var z=R.select(".label-temp"),N=_(r,a,a.dragmode);M(g,"label-temp",N,z)}function F(t){E=+t.srcElement.getAttribute("data-i"),C=+t.srcElement.getAttribute("data-j"),L[E][C].moveFn=B}function B(t,r){if(e.length){var n=O[E][C][1],i=O[E][C][2],o=e[E],s=o.length;if(m(o)){var l=t,u=r;a.isActiveSelection&&(T(o,C)[1]===o[C][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==C){var f=o[c];f[1]===o[C][1]&&(f[1]=n+l),f[2]===o[C][2]&&(f[2]=i+u)}if(o[C][1]=n+l,o[C][2]=i+u,!m(o))for(var h=0;h<s;h++)for(var d=0;d<o[h].length;d++)o[h][d]=O[E][h][d]}else o[C][1]=n+t,o[C][2]=i+r;A()}}function j(){k()}function U(t,r){if(2===t){E=+r.srcElement.getAttribute("data-i"),C=+r.srcElement.getAttribute("data-j");var n=e[E];m(n)||y(n)||function(){if(e.length&&e[E]&&e[E].length){for(var t=[],r=0;r<e[E].length;r++)r!==C&&t.push(e[E][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===C&&(t[0][0]="M"),e[E]=t,A(),k())}}()}}function H(t,r){!function(t,r){if(e.length)for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)for(var a=0;a+2<e[n][i].length;a+=2)e[n][i][a+1]=O[n][i][a+1]+t,e[n][i][a+2]=O[n][i][a+2]+r}(t,r),A()}function V(t){(E=+t.srcElement.getAttribute("data-i"))||(E=0),S[E].moveFn=H}function Y(){k()}function G(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){v(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call("_guiRelayout",t,{selections:n})}}}(g)}}},4016:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(4460),s=r(9856).readPaths,l=r(5496),u=r(728),c=r(1936).clearOutlineControllers,f=r(6308),h=r(3616),d=r(1780).arrayEditor,p=r(6476),v=r(3972),g=r(3068),m=r(5152),y=m.getPathString;function x(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)!0===e.shapes[i].visible&&w(t,i)}function b(t){return!!t._fullLayout._outlining}function _(t){return!t._context.edits.shapePosition}function w(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=m.makeShapesOptionsAndPlotinfo(t,e),c=r.options,w=r.plotinfo;function k(r){var k=y(t,c),L={"data-index":e,"fill-rule":c.fillrule,d:k},S=c.opacity,E=c.fillcolor,C=c.line.width?c.line.color:"rgba(0,0,0,0)",O=c.line.width,R=c.line.dash;O||!0!==c.editable||(O=5,R="solid");var P="Z"!==k[k.length-1],D=_(t)&&c.editable&&t._fullLayout._activeShapeIndex===e;D&&(E=P?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,S=t._fullLayout.activeshape.opacity);var I,z=r.append("g").classed("shape-group",!0).attr({"data-index":e}),N=z.append("path").attr(L).style("opacity",S).call(f.stroke,C).call(f.fill,E).call(h.dashLine,R,O);if(M(z,t,c),u(t,e,c,z),(D||t._context.edits.shapePosition)&&(I=d(t.layout,"shapes",c)),D){N.style({cursor:"move"});var F={element:N.node(),plotinfo:w,gd:t,editHelpers:I,hasText:c.label.text||c.label.texttemplate,isActiveShape:!0},B=s(k,t);l(B,N,F)}else t._context.edits.shapePosition?function(t,e,r,s,l,c){var f,d,x,_,w,A,k,L,S,E,C,O,R,P,D,I,z=10,N=10,F="pixel"===r.xsizemode,B="pixel"===r.ysizemode,j="line"===r.type,U="path"===r.type,H=c.modifyItem,V=n.select(e.node().parentNode),Y=o.getFromId(t,r.xref),G=o.getRefType(r.xref),W=o.getFromId(t,r.yref),q=o.getRefType(r.yref),X=m.getDataToPixel(t,Y,!1,G),Z=m.getDataToPixel(t,W,!0,q),J=m.getPixelToData(t,Y,!1,G),K=m.getPixelToData(t,W,!0,q),Q=j?function(){var t=10,n=Math.max(r.line.width,t),i=l.append("g").attr("data-index",s).attr("drag-helper",!0);i.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var a={"fill-opacity":"0"},o=Math.max(n/2,t);return i.append("circle").attr({"data-line-point":"start-point",cx:F?X(r.xanchor)+r.x0:X(r.x0),cy:B?Z(r.yanchor)-r.y0:Z(r.y0),r:o}).style(a).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:F?X(r.xanchor)+r.x1:X(r.x1),cy:B?Z(r.yanchor)-r.y1:Z(r.y1),r:o}).style(a).classed("cursor-grab",!0),i}():e,$={element:Q.node(),gd:t,prepFn:function(n){b(t)||(F&&(w=X(r.xanchor)),B&&(A=Z(r.yanchor)),"path"===r.type?D=r.path:(f=F?r.x0:X(r.x0),d=B?r.y0:Z(r.y0),x=F?r.x1:X(r.x1),_=B?r.y1:Z(r.y1)),f<x?(S=f,R="x0",E=x,P="x1"):(S=x,R="x1",E=f,P="x0"),!B&&d<_||B&&d>_?(k=d,C="y0",L=_,O="y1"):(k=_,C="y1",L=d,O="y0"),tt(n),nt(l,r),function(t,e,r){var n=e.xref,i=e.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),h.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),$.moveFn="move"===I?et:rt,$.altKey=n.altKey)},doneFn:function(){b(t)||(v(e),it(l),M(e,t,r),i.call("_guiRelayout",t,c.getUpdateObj()))},clickFn:function(){b(t)||it(l)}};function tt(r){if(b(t))I=null;else if(j)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=$.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!U&&i>z&&a>N&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";v(e,l),I=l.split("-")[0]}}function et(n,i){if("path"===r.type){var a=function(t){return t},o=a,c=a;F?H("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(X(t)+n)},Y&&"date"===Y.type&&(o=m.encodeDate(o))),B?H("yanchor",r.yanchor=K(A+i)):(c=function(t){return K(Z(t)+i)},W&&"date"===W.type&&(c=m.encodeDate(c))),H("path",r.path=T(D,o,c))}else F?H("xanchor",r.xanchor=J(w+n)):(H("x0",r.x0=J(f+n)),H("x1",r.x1=J(x+n))),B?H("yanchor",r.yanchor=K(A+i)):(H("y0",r.y0=K(d+i)),H("y1",r.y1=K(_+i)));e.attr("d",y(t,r)),nt(l,r),u(t,s,r,V)}function rt(n,i){if(U){var a=function(t){return t},o=a,c=a;F?H("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(X(t)+n)},Y&&"date"===Y.type&&(o=m.encodeDate(o))),B?H("yanchor",r.yanchor=K(A+i)):(c=function(t){return K(Z(t)+i)},W&&"date"===W.type&&(c=m.encodeDate(c))),H("path",r.path=T(D,o,c))}else if(j){if("resize-over-start-point"===I){var h=f+n,p=B?d-i:d+i;H("x0",r.x0=F?h:J(h)),H("y0",r.y0=B?p:K(p))}else if("resize-over-end-point"===I){var v=x+n,g=B?_-i:_+i;H("x1",r.x1=F?v:J(v)),H("y1",r.y1=B?g:K(g))}}else{var b=function(t){return-1!==I.indexOf(t)},M=b("n"),G=b("s"),q=b("w"),Q=b("e"),$=M?k+i:k,tt=G?L+i:L,et=q?S+n:S,rt=Q?E+n:E;B&&(M&&($=k-i),G&&(tt=L-i)),(!B&&tt-$>N||B&&$-tt>N)&&(H(C,r[C]=B?$:K($)),H(O,r[O]=B?tt:K(tt))),rt-et>z&&(H(R,r[R]=F?et:J(et)),H(P,r[P]=F?rt:J(rt)))}e.attr("d",y(t,r)),nt(l,r),u(t,s,r,V)}function nt(t,e){(F||B)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=X(F?e.xanchor:a.midRange(r?[e.x0,e.x1]:m.extractPathCoords(e.path,g.paramIsX))),o=Z(B?e.yanchor:a.midRange(r?[e.y0,e.y1]:m.extractPathCoords(e.path,g.paramIsY)));if(i=m.roundPositionForSharpStrokeRendering(i,1),o=m.roundPositionForSharpStrokeRendering(o,1),F&&B){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(F){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function it(t){t.selectAll(".visual-cue").remove()}p.init($),Q.node().onmousemove=tt}(t,N,c,e,r,I):!0===c.editable&&N.style("pointer-events",P||f.opacity(E)*S<=.5?"stroke":"all");N.node().addEventListener("click",(function(){return function(t,e){if(_(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void A(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=A,x(t)}}}(t,N)}))}c._input&&!0===c.visible&&("above"===c.layer?k(t._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?k(t._fullLayout._shapeLowerLayer):"between"===c.layer?k(w.shapelayerBetween):w._hadPlotinfo?k((w.mainplotinfo||w).shapelayer):k(t._fullLayout._shapeLowerLayer))}function M(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function T(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function A(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(c(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(_(t)){c(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var n=[],a=0;a<r.length;a++)a!==e&&n.push(r[a]);return delete t._fullLayout._activeShapeIndex,i.call("_guiRelayout",t,{shapes:n})}}},drawLabel:u}},2872:function(t,e,r){"use strict";var n=r(7824).overrideAll,i=r(5464),a=r(5376),o=r(8192).u,s=r(2880).extendFlat,l=r(1776).ye,u=r(7728);t.exports=n({newshape:{visible:s({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},i.legend,{}),legendgroup:s({},i.legendgroup,{}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({})},legendrank:s({},i.legendrank,{}),legendwidth:s({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:s({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),font:a({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(t){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},5144:function(t,e,r){"use strict";var n=r(6308),i=r(3400);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}var o="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var u=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(o,u)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},9856:function(t,e,r){"use strict";var n=r(9604),i=r(7e3),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(5840),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function d(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n<e;n++)for(var i=t[n].length,a=0;a<i;a++){var o=t[n][a][0];if("Z"===o)r+="Z";else for(var s=t[n][a].length,l=0;l<s;l++){var u=l;"Q"===o||"S"===o?u=f[l]:"C"===o&&(u=c[l]),r+=t[n][a][u],l>0&&l<s-1&&(r+=",")}}return r},e.readPaths=function(t,e,r,i){var o,s,c,f=n(t),h=[],d=-1,p=0,v=0,g=function(){s=p,c=v};g();for(var m=0;m<f.length;m++){var y,x,b,_,w=[],M=f[m][0],T=M;switch(M){case"M":h[++d]=[],p=+f[m][1],v=+f[m][2],w.push([T,p,v]),g();break;case"Q":case"S":y=+f[m][1],b=+f[m][2],p=+f[m][3],v=+f[m][4],w.push([T,p,v,y,b]);break;case"C":y=+f[m][1],b=+f[m][2],x=+f[m][3],_=+f[m][4],p=+f[m][5],v=+f[m][6],w.push([T,p,v,y,b,x,_]);break;case"T":case"L":p=+f[m][1],v=+f[m][2],w.push([T,p,v]);break;case"H":T="L",p=+f[m][1],w.push([T,p,v]);break;case"V":T="L",v=+f[m][1],w.push([T,p,v]);break;case"A":T="L";var A=+f[m][1],k=+f[m][2];+f[m][4]||(A=-A,k=-k);var L=p-A,S=v;for(o=1;o<=a/2;o++){var E=2*Math.PI*o/a;w.push([T,L+A*Math.cos(E),S+k*Math.sin(E)])}break;case"Z":p===s&&v===c||(p=s,v=c,w.push([T,p,v]))}for(var C=(r||{}).domain,O=e._fullLayout._size,R=r&&"pixel"===r.xsizemode,P=r&&"pixel"===r.ysizemode,D=!1===i,I=0;I<w.length;I++){for(o=0;o+2<7;o+=2){var z=w[I][o+1],N=w[I][o+2];void 0!==z&&void 0!==N&&(p=z,v=N,r&&(r.xaxis&&r.xaxis.p2r?(D&&(z-=r.xaxis._offset),z=R?u(r.xaxis,r.xanchor)+z:l(r.xaxis,z)):(D&&(z-=O.l),C?z=C.x[0]+z/O.w:z/=O.w),r.yaxis&&r.yaxis.p2r?(D&&(N-=r.yaxis._offset),N=P?u(r.yaxis,r.yanchor)-N:l(r.yaxis,N)):(D&&(N-=O.t),N=C?C.y[1]-N/O.h:1-N/O.h)),w[I][o+1]=z,w[I][o+2]=N)}h[d].push(w[I].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])||!(d(t[0],t[1])*d(t[0],t[3])))},e.pointsOnEllipse=function(t){var e=t.length;if(e!==a+1)return!1;e=a;for(var r=0;r<e;r++){var n=(2*e-r)%e,i=(e/2+n)%e,o=(e/2+r)%e;if(!h(d(t[r],t[o]),d(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 d=2*h*Math.PI/a;f.push([s+u*Math.cos(d),l+c*Math.sin(d)])}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}},3940:function(t,e,r){"use strict";var n=r(2760),i=n.drawMode,a=n.openMode,o=r(7e3),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,h=o.sin45,d=r(5840),p=d.p2r,v=d.r2p,g=r(1936).clearOutline,m=r(9856),y=m.readPaths,x=m.writePaths,b=m.ellipseOver,_=m.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],o=e.gd,d=i.getAttribute("d"),g=o._fullLayout.newshape,m=e.plotinfo,w=e.isActiveShape,M=m.xaxis,T=m.yaxis,A=!!m.domain||!m.xaxis,k=!!m.domain||!m.yaxis,L=a(r),S=y(d,o,m,w),E={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:A?"paper":M._id,yref:k?"paper":T._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(L||(E.fillcolor=g.fillcolor,E.fillrule=g.fillrule),1===S.length&&(n=S[0]),n&&5===n.length&&"drawrect"===r)E.type="rect",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[2][1],E.y1=n[2][2];else if(n&&"drawline"===r)E.type="line",E.x0=n[0][1],E.y0=n[0][2],E.x1=n[1][1],E.y1=n[1][2];else if(n&&"drawcircle"===r){E.type="circle";var C=n[s][1],O=n[l][1],R=n[u][1],P=n[c][1],D=n[s][2],I=n[l][2],z=n[u][2],N=n[c][2],F=m.xaxis&&("date"===m.xaxis.type||"log"===m.xaxis.type),B=m.yaxis&&("date"===m.yaxis.type||"log"===m.yaxis.type);F&&(C=v(m.xaxis,C),O=v(m.xaxis,O),R=v(m.xaxis,R),P=v(m.xaxis,P)),B&&(D=v(m.yaxis,D),I=v(m.yaxis,I),z=v(m.yaxis,z),N=v(m.yaxis,N));var j=(O+P)/2,U=(D+z)/2,H=b({x0:j,y0:U,x1:j+(P-O+R-C)/2*f,y1:U+(N-I+z-D)/2*h});F&&(H.x0=p(m.xaxis,H.x0),H.x1=p(m.xaxis,H.x1)),B&&(H.y0=p(m.yaxis,H.y0),H.y1=p(m.yaxis,H.y1)),E.x0=H.x0,E.y0=H.y0,E.x1=H.x1,E.y1=H.y1}else E.type="path",M&&T&&_(S,M,T),E.path=x(S),n=null;return E}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,a=e.dragmode,o=(r.layout||{}).shapes||[];if(!i(a)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s<o.length)switch(r._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";a="Z"===l[l.length-1]?"drawclosedpath":"drawopenpath"}}var u=w(t,e,a);g(r);for(var c=e.editHelpers,f=(c||{}).modifyItem,h=[],d=0;d<o.length;d++){var p=r._fullLayout.shapes[d];if(h[d]=p._input,void 0!==n&&d===r._fullLayout._activeShapeIndex){var v=u;switch(p.type){case"line":case"rect":case"circle":f("x0",v.x0),f("x1",v.x1),f("y0",v.y0),f("y1",v.y1);break;case"path":f("path",v.path)}}}return void 0===n?(h.push(u),h):c?c.getUpdateObj():{}}},createShapeObj:w}},1936:function(t){"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},5152:function(t,e,r){"use strict";var n=r(3068),i=r(3400),a=r(4460);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.w*t};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,d,p=r.type,v=a.getRefType(r.xref),g=a.getRefType(r.yref),m=a.getFromId(t,r.xref),y=a.getFromId(t,r.yref),x=t._fullLayout._size;if(m?"domain"===v?s=function(t){return m._offset+m._length*t}:(o=e.shapePositionToRange(m),s=function(t){return m._offset+m.r2p(o(t,!0))}):s=function(t){return x.l+x.w*t},y?"domain"===g?u=function(t){return y._offset+y._length*(1-t)}:(l=e.shapePositionToRange(y),u=function(t){return y._offset+y.r2p(l(t,!0))}):u=function(t){return x.t+x.h*(1-t)},"path"===p)return m&&"date"===m.type&&(s=e.decodeDate(s)),y&&"date"===y.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],d=n.numParams[c],p=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>d&&(t="X"),t}));return a>d&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+p}))}(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,d=_-r.y1}else h=u(r.y0),d=u(r.y1);if("line"===p)return"M"+c+","+h+"L"+f+","+d;if("rect"===p)return"M"+c+","+h+"H"+f+"V"+d+"H"+c+"Z";var w=(c+f)/2,M=(h+d)/2,T=Math.abs(w-c),A=Math.abs(M-h),k="A"+T+","+A,L=w+T+","+M;return"M"+L+k+" 0 1,1 "+w+","+(M-A)+k+" 0 0,1 "+L+"Z"}},1592:function(t,e,r){"use strict";var n=r(4016);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(6056),supplyLayoutDefaults:r(3712),supplyDrawNewShapeDefaults:r(5144),includeBasePlot:r(6632)("shapes"),calcAutorange:r(6084),draw:n.draw,drawOne:n.drawOne}},7728:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t,r){return e(t.x1,r)-e(t.x0,r)}function i(t,r,n){return e(t.y1,n)-e(t.y0,n)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:i(t,0,r)/n(t,e)},dx:n,dy:i,width:function(t,e){return Math.abs(n(t,e))},height:function(t,e,r){return Math.abs(i(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(n(t,e),2)+Math.pow(i(t,0,r),2))},xcenter:function(t,n){return r((e(t.x1,n)+e(t.x0,n))/2,n)},ycenter:function(t,n,i){return r((e(t.y1,i)+e(t.y0,i))/2,i)}}},9861:function(t,e,r){"use strict";var n=r(5376),i=r(6741),a=r(2880).extendDeepAll,o=r(7824).overrideAll,s=r(5656),l=r(1780).templatedArray,u=r(876),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")},876:function(t){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(t,e,r){"use strict";var n=r(3400),i=r(1272),a=r(9861),o=r(876).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})}},9664:function(t,e,r){"use strict";var n=r(3428),i=r(7316),a=r(6308),o=r(3616),s=r(3400),l=s.strTranslate,u=r(2736),c=r(1780).arrayEditor,f=r(876),h=r(4284),d=h.LINE_SPACING,p=h.FROM_TL,v=h.FROM_BR;function g(t){return f.autoMarginIdRoot+t._index}function m(t){return t._index}function y(t,e){var r=o.tester.selectAll("g."+f.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(f.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var c=e._dims={};c.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;c.lx=h.l+h.w*e.x,c.ly=h.t+h.h*(1-e.y),"fraction"===e.lenmode?c.outerLength=Math.round(h.w*e.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var d=(c.inputAreaLength-2*f.stepInset)/(e._stepCount-1),m=a+f.labelPadding;if(c.labelStride=Math.max(1,Math.ceil(m/d)),c.labelHeight=l,c.currentValueMaxWidth=0,c.currentValueHeight=0,c.currentValueTotalHeight=0,c.currentValueMaxLines=1,e.currentvalue.visible){var y=o.tester.append("g");r.each((function(t){var r=x(y,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=u.lineCount(r);c.currentValueMaxWidth=Math.max(c.currentValueMaxWidth,Math.ceil(n.width)),c.currentValueHeight=Math.max(c.currentValueHeight,Math.ceil(n.height)),c.currentValueMaxLines=Math.max(c.currentValueMaxLines,i)})),c.currentValueTotalHeight=c.currentValueHeight+e.currentvalue.offset,y.remove()}c.height=c.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+c.labelHeight+e.pad.t+e.pad.b;var b="left";s.isRightAnchor(e)&&(c.lx-=c.outerLength,b="right"),s.isCenterAnchor(e)&&(c.lx-=c.outerLength/2,b="center");var w="top";s.isBottomAnchor(e)&&(c.ly-=c.height,w="bottom"),s.isMiddleAnchor(e)&&(c.ly-=c.height/2,w="middle"),c.outerLength=Math.ceil(c.outerLength),c.height=Math.ceil(c.height),c.lx=Math.round(c.lx),c.ly=Math.round(c.ly);var M={y:e.y,b:c.height*v[w],t:c.height*p[w]};"fraction"===e.lenmode?(M.l=0,M.xl=e.x-e.len*p[b],M.r=0,M.xr=e.x+e.len*v[b]):(M.x=e.x,M.l=c.outerLength*p[b],M.r=c.outerLength*v[b]),i.autoMargin(t,g(e),M)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case"right":n=a.inputAreaLength-f.currentValueInset-a.currentValueMaxWidth,i="left";break;case"center":n=.5*a.inputAreaLength,i="middle";break;default:n=f.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",f.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),c=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)c+=r;else{var h=e.steps[e.active].label,p=e._gd._fullLayout._meta;p&&(h=s.templateString(h,p)),c+=h}e.currentvalue.suffix&&(c+=e.currentvalue.suffix),l.call(o.font,e.currentvalue.font).text(c).call(u.convertToTspans,e._gd);var v=u.lineCount(l),g=(a.currentValueMaxLines+1-v)*e.currentvalue.font.size*d;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,S(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*d+f.labelOffset+i.currentValueTotalHeight)}))}function M(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&T(t,e,r,o,!0,i)}function T(t,e,r,n,a,o){var s=r.active;r.active=n,c(t.layout,f.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(L,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=E(t,n.mouse(i)[0]);function c(){var t=s(),a=E(t,n.mouse(i)[0]);M(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]})}M(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 k(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,S(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)}))}function L(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=S(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function S(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function O(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[f.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(r,t),s=r._infolayer.selectAll("g."+f.containerClassName).data(a.length>0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(f.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(l)})).remove(),0!==a.length){var u=s.selectAll("g."+f.groupClassName).data(a,m);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];y(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||T(t,r,n,e.index,!1,!0))})),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(x,r).call(O,r).call(w,r).call(k,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(L,r,!1),e.call(x,r)}(t,n.select(this),e)}))}}},7544:function(t,e,r){"use strict";var n=r(876);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(9861),supplyLayoutDefaults:r(8132),draw:r(9664)}},1668:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(7316),o=r(4040),s=r(3400),l=s.strTranslate,u=r(3616),c=r(6308),f=r(2736),h=r(3448),d=r(4284).OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var v,g=r.propContainer,m=r.propName,y=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,M=r.containerGroup,T=t._fullLayout,A=1,k=!1,L=g.title,S=(L&&L.text?L.text:"").trim(),E=L&&L.font?L.font:{},C=E.family,O=E.size,R=E.color;"title.text"===m?v="titleText":-1!==m.indexOf("axis")?v="axisTitleText":m.indexOf(!0)&&(v="colorbarTitleText");var P=t._context.edits[v];""===S?A=0:S.replace(p," % ")===y.replace(p," % ")&&(A=.2,k=!0,P||(S="")),r._meta?S=s.templateString(S,r._meta):T._meta&&(S=s.templateString(S,T._meta));var D,I=S||P;M||(M=s.ensureSingle(T._infolayer,"g","g-"+e),D=T._hColorbarMoveTitle);var z=M.selectAll("text").data(I?[0]:[]);if(z.enter().append("text"),z.text(S).attr("class",e),z.exit().remove(),!I)return M;function N(t){s.syncOrAsync([F,B],t)}function F(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(O,2)+"px",fill:c.rgb(R),opacity:A*c.opacity(R),"font-weight":a.fontWeight}).attr(_).call(f.convertToTspans,t),a.previousPromises(t)}function B(e){var r=n.select(e.node().parentNode);if(b&&b.selection&&b.side&&S){r.attr("transform",null);var a=d[b.side],o="left"===b.side||"top"===b.side?-1:1,c=i(b.pad)?b.pad:2,f=u.bBox(r.node()),h={t:0,b:0,l:0,r:0},p=t._fullLayout._reservedMargin;for(var v in p)for(var m in p[v]){var y=p[v][m];h[m]=Math.max(h[m],y)}var x={left:h.l,top:h.t,right:T.width-h.r,bottom:T.height-h.b},_=b.maxShift||o*(x[b.side]-f[b.side]),w=0;if(_<0)w=_;else{var M=b.offsetLeft||0,A=b.offsetTop||0;f.left-=M,f.right-=M,f.top-=A,f.bottom-=A,b.selection.each((function(){var t=u.bBox(this);s.bBoxIntersect(f,t,c)&&(w=Math.max(w,o*(t[b.side]-f[a])+c))})),w=Math.min(_,w),g._titleScoot=Math.abs(w)}if(w>0||_<0){var k={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[b.side];r.attr("transform",l(k[0],k[1]))}}}return z.call(N),P&&(S?z.on(".opacity",null):(A=0,k=!0,z.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),z.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("_guiRestyle",t,m,e,x):o.call("_guiRelayout",t,m,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(N)})).on("input",(function(t){this.text(t||" ").call(f.positionText,_.x,_.y)}))),z.classed("js-placeholder",k),M}}},8444:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=r(2880).extendFlat,o=r(7824).overrideAll,s=r(6741),l=r(1780).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")},1331: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:"▼"}}},1384:function(t,e,r){"use strict";var n=r(3400),i=r(1272),a=r(8444),o=r(1331).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})}},4420:function(t,e,r){"use strict";var n=r(3428),i=r(7316),a=r(6308),o=r(3616),s=r(3400),l=r(2736),u=r(1780).arrayEditor,c=r(4284).LINE_SPACING,f=r(1331),h=r(7400);function d(t){return t._index}function p(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?m(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||m(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},d={width:l.headerWidth,height:l.headerHeight};a.call(y,i,c,t).call(k,i,h,d),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(L,String(p(r,i)?-1:i._index)),m(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(M,i)})),o.setTranslate(e,l.lx,l.ly)}function m(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),h=c.enter().append("g").classed(u,!0),d=c.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),d.transition().attr("opacity","0").remove()):d.remove();var p=0,g=0,m=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=m.headerHeight+f.gapButtonHeader:p=m.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-m.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-m.openWidth);var b={x:m.lx+p+o.pad.l,y:m.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(y,o,s,t).call(k,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(M,o),c.call(_,o)}))})),c.call(_,o),x?(T.w=Math.max(m.openWidth,m.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(m.openHeight,m.headerHeight)),T.direction=o.direction,a&&(c.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c="up"===u||"down"===u,h=i._dims,d=i.active;if(c)for(s=0,l=0;l<d;l++)s+=h.heights[l]+f.gapButton;else for(o=0,l=0;l<d;l++)o+=h.widths[l]+f.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,a,o,T):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,e||t.disable()}))}(a))}function y(t,e,r,n){t.call(x,e).call(b,e,r,n)}function x(t,e){s.ensureSingle(t,"rect",f.itemRectClassName,(function(t){t.attr({rx:f.rx,ry:f.ry,"shape-rendering":"crispEdges"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function b(t,e,r,n){var i=s.ensureSingle(t,"text",f.itemTextClassName,(function(t){t.attr({"text-anchor":"start","data-notex":1})})),a=r.label,u=n._fullLayout._meta;u&&(a=s.templateString(a,u)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function _(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select("rect."+f.itemRectClassName).call(a.fill,f.activeColor)}))}function w(t){t.select("rect."+f.itemRectClassName).call(a.fill,f.hoverColor)}function M(t,e){t.select("rect."+f.itemRectClassName).call(a.fill,e.bgcolor)}function T(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll("g."+f.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append("g").classed(f.dropdownButtonClassName,!0);var u=-1!==["up","down"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(y,e,i,t);var h=s.select("."+f.itemTextClassName),d=h.node()&&o.bBox(h.node()).width,p=Math.max(d+f.textPadX,f.minWidth),v=e.font.size*c,g=l.lineCount(h),m=Math.max(v*g,f.minHeight)+f.textOffsetY;m=Math.ceil(m),p=Math.ceil(p),r.widths[a]=p,r.heights[a]=m,r.height1=Math.max(r.height1,m),r.width1=Math.max(r.width1,p),u?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=m+f.gapButton,r.openHeight+=m+f.gapButton):(r.totalWidth+=p+f.gapButton,r.openWidth+=p+f.gapButton,r.totalHeight=Math.max(r.totalHeight,m),r.openHeight=r.totalHeight)})),u?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,"dropdown"===e.type&&(u?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),a.remove();var h=r.totalWidth+e.pad.l+e.pad.r,d=r.totalHeight+e.pad.t+e.pad.b,p=t._fullLayout._size;r.lx=p.l+p.w*e.x,r.ly=p.t+p.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-=d,g="bottom"),s.isMiddleAnchor(e)&&(r.ly-=d/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:d*({top:1,middle:.5}[g]||0),t:d*({bottom:1,middle:.5}[g]||0)})}function A(t){return f.autoMarginIdRoot+t._index}function k(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 d=-1!==["up","down"].indexOf(e.direction),p=n.height||(d?h.heights[u]:h.height1);i.attr({x:0,y:0,width:n.width||(d?h.width1:h.widths[u]),height:p});var v=e.font.size*c,g=(l.lineCount(a)-1)*v/2;l.positionText(a,f.textOffsetX,p/2-g+f.textOffsetY),d?r.y+=h.heights[u]+r.yPad:r.x+=h.widths[u]+r.xPad,r.index++}function L(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,d);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),c=0;c<r.length;c++){var y=r[c];T(t,y)}var x="updatemenus"+e._uid,b=new h(t,u,x);l.enter().size()&&(u.node().parentNode.appendChild(u.node()),u.call(L)),l.exit().each((function(t){u.call(L),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),p(u,e)&&m(t,r,u,b,e)):m(t,r,null,null,e)}))}}},6908:function(t,e,r){"use strict";var n=r(1331);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8444),supplyLayoutDefaults:r(1384),draw:r(4420)}},7400:function(t,e,r){"use strict";t.exports=s;var n=r(3428),i=r(6308),a=r(3616),o=r(3400);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,u=o.height;this.position=t;var c,f,h,d,p=this.position.l,v=this.position.w,g=this.position.t,m=this.position.h,y=this.position.direction,x="down"===y,b="left"===y,_="up"===y,w=v,M=m;x||b||"right"===y||_||(this.position.direction="down",x=!0),x||_?(f=(c=p)+w,x?(h=g,M=(d=Math.min(h+M,u))-h):M=(d=g+M)-(h=Math.max(d-M,0))):(d=(h=g)+M,b?w=(f=p+w)-(c=Math.max(f-w,0)):(c=p,w=(f=Math.min(c+w,l))-c)),this._box={l:c,t:h,w:w,h:M};var T=v>w,A=s.barLength+2*s.barPad,k=s.barWidth+2*s.barPad,L=p,S=g+m;S+k>u&&(S=u-k);var E=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),T?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:L,y:S,width:A,height:k}),this._hbarXMin=L+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=m>M,O=s.barWidth+2*s.barPad,R=s.barLength+2*s.barPad,P=p+v,D=g;P+O>l&&(P=l-O);var I=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),C?(this.vbar=I.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:D,width:O,height:R}),this._vbarYMin=D+R/2,this._vbarTranslateMax=M-R):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var z=this.id,N=c-.5,F=C?f+O+.5:f+.5,B=h-.5,j=T?d+k+.5:d+.5,U=o._topdefs.selectAll("#"+z).data(T||C?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",z).append("rect"),T||C?(this._clipRect=U.select("rect").attr({x:Math.floor(N),y:Math.floor(B),width:Math.ceil(F)-Math.floor(N),height:Math.ceil(j)-Math.floor(B)}),this.container.call(a.setClipUrl,z,this.gd),this.bg.attr({x:p,y:g,width:v,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),T||C){var H=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(H);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(V),C&&this.vbar.on(".drag",null).call(V)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},4284: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"}}},6208: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(" ")}}},6880: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"}},9104:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},9168: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]}},5412:function(t){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},3448:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},9032: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:""}},9616:function(t,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},4884:function(t,e,r){"use strict";e.version=r(5788).version,r(8324),r(9288);for(var n=r(4040),i=e.register=n.register,a=r(2448),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(5875)),i([r(9180),r(6864),r(2676),r(1592),r(7402),r(6908),r(7544),r(9692),r(1152),r(2704),r(4968),r(8932),r(5080),r(2780),r(3024),r(3080)]),i([r(6580),r(1680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(9224);var u=r(3024),c=r(7316);e.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},e.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},e.Snapshot=r(8904),e.PlotSchema=r(3060)},9224:function(t){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},8308: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}},1864:function(t,e,r){"use strict";var n=r(435),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,d,p,v=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}v?(c=0,f=o,h=s):r<n?(c=r,h=n):(c=n,h=r),t<e?(d=t,p=e):(d=e,p=t);var m,y=Math.abs(h-c)<=o?0:1;function x(t,e,r){return"A"+[t,t]+" "+[0,y,r]+" "+g(t,e)}return v?m=null===d?"M"+g(p,c)+x(p,f,0)+x(p,h,0)+"Z":"M"+g(d,c)+x(d,f,0)+x(d,h,0)+"ZM"+g(p,c)+x(p,f,1)+x(p,h,1)+"Z":null===d?(m="M"+g(p,c)+x(p,h,0),u&&(m+="L0,0Z")):m="M"+g(d,c)+"L"+g(p,c)+x(p,h,0)+"L"+g(d,h)+x(d,c,1)+"Z",m}t.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:u,angleDist:function(t,e){return Math.abs(u(t,e))},isFullCircle:l,isAngleInsideSector:c,isPtInsideSector:function(t,e,r,n){return!!c(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},8116:function(t,e,r){"use strict";var n=r(3160).decode,i=r(3620),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(t){return o.isView(t)&&!(t instanceof s)}function u(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=u,e.isArray1D=function(t){return!u(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};var c={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function f(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(u(t)){if(u(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}c.uint8c=c.u1c,c.uint8=c.u1,c.int8=c.i1,c.uint16=c.u2,c.int16=c.i2,c.uint32=c.u4,c.int32=c.i4,c.float32=c.f4,c.float64=c.f8,e.isArrayBuffer=f,e.decodeTypedArraySpec=function(t){var e=[],r=function(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}(t),i=r.dtype,a=c[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var o=a.BYTES_PER_ELEMENT,s=r.bdata;f(s)||(s=n(s));var l=void 0===r.shape?[s.byteLength/o]:(""+r.shape).split(",");l.reverse();var u,h,d=l.length,p=+l[0],v=o*p,g=0;if(1===d)e=new a(s);else if(2===d)for(u=+l[1],h=0;h<u;h++)e[h]=new a(s,g,p),g+=v;else{if(3!==d)throw new Error("ndim: "+d+'is not supported with the shape:"'+r.shape+'"');u=+l[1];for(var m=+l[2],y=0;y<m;y++)for(e[y]=[],h=0;h<u;h++)e[y][h]=new a(s,g,p),g+=v}return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e},e.isTypedArraySpec=function(t){return i(t)&&t.hasOwnProperty("dtype")&&"string"==typeof t.dtype&&t.hasOwnProperty("bdata")&&("string"==typeof t.bdata||f(t.bdata))&&(void 0===t.shape||t.hasOwnProperty("shape")&&("string"==typeof t.shape||"number"==typeof t.shape))},e.concat=function(){var t,e,r,n,i,o,s,l,u=[],c=!0,f=0;for(r=0;r<arguments.length;r++)(o=(n=arguments[r]).length)&&(e?u.push(n):(e=n,i=o),a(n)?t=!1:(c=!1,f?t!==n.constructor&&(t=!1):t=n.constructor),f+=o);if(!f)return[];if(!u.length)return e;if(c)return e.concat.apply(e,u);if(t){for((s=new t(f)).set(e),r=0;r<u.length;r++)n=u[r],s.set(n,i),i+=n.length;return s}for(s=new Array(f),l=0;l<e.length;l++)s[l]=e[l];for(r=0;r<u.length;r++){for(n=u[r],l=0;l<n.length;l++)s[i+l]=n[l];i+=l}return s},e.maxRowLength=function(t){return h(t,Math.max,0)},e.minRowLength=function(t){return h(t,Math.min,1/0)}},4037:function(t,e,r){"use strict";var n=r(8248),i=r(9032).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},3696: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})}))}},5352:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},3064:function(t,e,r){"use strict";var n=r(8248),i=r(9760),a=r(5464),o=r(8304),s=r(6308),l=r(3448).DESELECTDIM,u=r(2296),c=r(3756).counter,f=r(435).modHalf,h=r(8116).isArrayOrTypedArray,d=r(8116).isTypedArraySpec,p=r(8116).decodeTypedArraySpec;function v(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){e.set(h(t)?t:d(t)?p(t):r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!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(d(t)?p(t):t)}},info_array:{coerceFunction:function(t,r,n,i){function a(t,r,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=r.dflt),e.valObjectMeta[r.valType].coerceFunction(t,a,n,r),i}if(d(t)&&(t=p(t)),h(t)){var o,s,l,u,c,f,v=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(t)&&h(t[0]),g=i.items,m=[],y=Array.isArray(g),x=y&&v&&h(g[0]),b=v&&y&&!x,_=y&&!b?g.length:t.length;if(n=Array.isArray(n)?n:[],v)for(o=0;o<_;o++)for(m[o]=[],l=h(t[o])?t[o]:[],c=b?g.length:y?g[o].length:l.length,s=0;s<c;s++)u=b?g[s]:y?g[o][s]:g,void 0!==(f=a(l[s],u,(n[o]||[])[s]))&&(m[o][s]=f);else for(o=0;o<_;o++)void 0!==(f=a(t[o],y?g[o]:g,n[o]))&&(m[o]=f);r.set(m)}else r.set(n)},validateFunction:function(t,e){if(!h(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(!h(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!v(t[a][o],n?r[a][o]:r))return!1}else if(!v(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){if(h(c))return l.set(c),c;if(d(c))return c=p(c),l.set(c),c}var g=e.valObjectMeta[o.valType].coerceFunction;g(c,l,a,o);var m=l.get();return f&&m===a&&!v(c,o)&&(g(c=u(f,i).get(),l,a,o),m=l.get()),m},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=l*i),e("selected.marker.opacity",r),e("unselected.marker.opacity",n))}},e.validate=v},7555:function(t,e,r){"use strict";var n,i,a=r(4336).Yn,o=r(8248),s=r(4248),l=r(435).mod,u=r(9032),c=u.BADNUM,f=u.ONEDAY,h=u.ONEHOUR,d=u.ONEMIN,p=u.ONESEC,v=u.EPOCHJD,g=r(4040),m=r(4336).E9,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&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()*d,o=(t.getUTCMinutes()-t.getMinutes())*d+(t.getUTCSeconds()-t.getSeconds())*p+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*d;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),m=t.charAt(0);!u||"G"!==m&&"g"!==m||(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),M=t.match(w?x:y);if(!M)return c;var T=M[1],A=M[3]||"1",k=Number(M[5]||1),L=Number(M[7]||0),S=Number(M[9]||0),E=Number(M[11]||0);if(u){if(2===T.length)return c;var C;T=Number(T);try{var O=g.getComponentMethod("calendars","getCal")(r);if(w){var R="i"===A.charAt(A.length-1);A=parseInt(A,10),C=O.newDate(T,O.toMonthIndex(T,A,R),k)}else C=O.newDate(T,Number(A),k)}catch(t){return c}return C?(C.toJD()-v)*f+L*h+S*d+E*p:c}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),A-=1;var P=new Date(Date.UTC(2e3,A,k,L,S));return P.setUTCFullYear(T),P.getUTCMonth()!==A||P.getUTCDate()!==k?c:P.getTime()+E*p},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 M=90*f,T=3*h,A=5*d;function k(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,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var L=Math.floor(w/f)+v,S=Math.floor(l(t,f));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(t){a=m("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e<M?Math.floor(S/h):0,s=e<M?Math.floor(S%h/d):0,u=e<T?Math.floor(S%d/p):0,y=e<A?S%p*10+b:0}else x=new Date(w),a=m("%Y-%m-%d")(x),o=e<M?x.getUTCHours():0,s=e<M?x.getUTCMinutes():0,u=e<T?x.getUTCSeconds():0,y=e<A?10*x.getUTCMilliseconds()+b:0;return k(a,o,s,u,y)},e.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return k(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===c)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var L=/%\d?f/g,S=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function C(t,e,r,n){t=t.replace(L,(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(S,(function(){return E[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var O=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/d),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/p,60),O[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return C(e,t,n,i)};var R=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+R);return u.setUTCMonth(u.getUTCMonth()+e)+n-R},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}}},2200:function(t,e,r){"use strict";var n=r(3428),i=r(4248),a=r(2248),o=r(6524);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}}},5924:function(t,e,r){"use strict";var n=r(1252).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},2880:function(t,e,r){"use strict";var n=r(3620),i=Array.isArray;function a(t,e,r,o){var s,l,u,c,f,h,d,p=t[0],v=t.length;if(2===v&&i(p)&&i(t[1])&&0===p.length){if(d=function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&"object"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],p),d)return p;p.splice(0,p.length)}for(var g=1;g<v;g++)for(l in s=t[g])u=p[l],c=s[l],o&&i(c)?p[l]=c:e&&c&&(n(c)||(f=i(c)))?(f?(f=!1,h=u&&i(u)?u:[]):h=u&&n(u)?u:{},p[l]=a([h,c],e,r,o)):(void 0!==c||r)&&(p[l]=c);return p}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)}},8944: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}},3880: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}},2348:function(t,e,r){"use strict";var n,i,a,o=r(435).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,d=s-a,p=l*d-c*f;if(0===p)return null;var v=(u*d-c*h)/p,g=(u*f-l*h)/p;return g<0||g>1||v<0||v>1?null:{x:t+l*v,y:e+f*v}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,a,o,u){if(s(t,e,r,n,i,a,o,u))return 0;var c=r-t,f=n-e,h=o-i,d=u-a,p=c*c+f*f,v=h*h+d*d,g=Math.min(l(c,f,p,i-t,a-e),l(c,f,p,o-t,u-e),l(h,d,v,t-i,e-a),l(h,d,v,r-i,n-a));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),u=t.getPointAtLength(o(r+s/2,e)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=h,h},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,u=0,c=t.getTotalLength(),f=c;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.x<a?a-r.x:r.x>o?r.x-o:0,f=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var d=h(u);d;){if((u+=d+r)>f)return;d=h(u)}for(d=h(f);d;){if(u>(f-=d+r))return;d=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,d=s;f<u;){if(i=(h+d)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;c*o>0?d=i:h=i,f++}return a}},3040:function(t,e,r){"use strict";var n=r(8248),i=r(9760),a=r(2160),o=r(8932),s=r(2548).defaultLine,l=r(8116).isArrayOrTypedArray,u=a(s);function c(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return u;var e=a(t);return e.length?e:u}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,d,p,v,g=l(n),m=l(e),y=o.extractOpts(t),x=[];if(i=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,s=g?function(t,e){return void 0===t[e]?u:a(i(t[e]))}:f,d=m?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||m)for(var b=0;b<r;b++)p=s(n,b),v=d(e,b),x[b]=c(p,v);else x=c(a(n),e);return x},parseColorScale:function(t){var e=o.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=o.flipScale(e.colorscale)),r.map((function(t){var e=t[0],r=i(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,r.a]}}))}}},5536:function(t){"use strict";t.exports=function(t){return t}},1396:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(t,e,r){"use strict";var n=r(3428),i=r(4336).E9,a=r(7624).E9,o=r(8248),s=r(9032),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=t.exports={};f.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=r(2296),f.keyedContainer=r(7804),f.relativeAttr=r(3193),f.isPlainObject=r(3620),f.toLogRange=r(6896),f.relinkPrivateKeys=r(1528);var d=r(8116);f.isArrayBuffer=d.isArrayBuffer,f.isTypedArray=d.isTypedArray,f.isArrayOrTypedArray=d.isArrayOrTypedArray,f.isArray1D=d.isArray1D,f.ensureArray=d.ensureArray,f.concat=d.concat,f.maxRowLength=d.maxRowLength,f.minRowLength=d.minRowLength;var p=r(435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(3064);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(7555);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 m=r(4952);f.findBin=m.findBin,f.sorterAsc=m.sorterAsc,f.sorterDes=m.sorterDes,f.distinctVals=m.distinctVals,f.roundUp=m.roundUp,f.sort=m.sort,f.findIndexOfMin=m.findIndexOfMin,f.sortObjectKeys=r(2996);var y=r(3084);f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=r(2248);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(1864);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(8308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(2348);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 M=r(2880);f.extendFlat=M.extendFlat,f.extendDeep=M.extendDeep,f.extendDeepAll=M.extendDeepAll,f.extendDeepNoArrays=M.extendDeepNoArrays;var T=r(4248);f.log=T.log,f.warn=T.warn,f.error=T.error;var A=r(3756);f.counterRegex=A.counter;var k=r(1200);f.throttle=k.throttle,f.throttleDone=k.done,f.clearThrottle=k.clear;var L=r(2200);function S(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=L.getGraphDiv,f.isPlotDiv=L.isPlotDiv,f.removeElement=L.removeElement,f.addStyleRule=L.addStyleRule,f.addRelatedStyleRule=L.addRelatedStyleRule,f.deleteRelatedStyleRule=L.deleteRelatedStyleRule,f.getFullTransformMatrix=L.getFullTransformMatrix,f.getElementTransformMatrix=L.getElementTransformMatrix,f.getElementAndAncestors=L.getElementAndAncestors,f.equalDomRects=L.equalDomRects,f.clearResponsive=r(5352),f.preserveDrawingBuffer=r(4296),f.makeTraceGroups=r(988),f._=r(8356),f.notifier=r(1792),f.filterUnique=r(8944),f.filterVisible=r(3880),f.pushUnique=r(2416),f.increment=r(1396),f.cleanNumber=r(4037),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(6628),f.identity=r(5536),f.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},f.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var i=0;i<e.length;i++){var a=e[i],o=f.nestedProperty(t,a.replace("?",r)),s=f.nestedProperty(t,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}},f.raiseToTop=function(t){t.parentNode.appendChild(t)},f.cancelTransition=function(t){return t.transition().duration(0)},f.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},f.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l="";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;u&&(o=Math.pow(n,u),l=Math.floor(Math.random()*o).toString(n)+l);var c=parseInt(l,n);return e&&e[l]||c!==1/0&&c>=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r<l;r++)u[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},f.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(f.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},f.mergeArrayCastPositive=function(t,e,r){return f.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},f.castOption=function(t,e,r,n){n=n||f.identity;var i=f.nestedProperty(t,r).get();return f.isArrayOrTypedArray(i)?Array.isArray(e)&&f.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},f.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=f.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},f.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=S(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=S(r),i=[],a=0;a<e.length;a++){var o=e[a];if(f.isIndex(o)){var s=n[o];f.isIndex(s)&&i.push(s)}}return i}return e},f.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=f.nestedProperty(t,r).get();return!!f.isArrayOrTypedArray(n)&&n}return!!f.isArrayOrTypedArray(r)&&r},f.minExtend=function t(e,r,n){var i={};"object"!=typeof r&&(r={});var a,o,s,l="pieLike"===n?-1:3,u=Object.keys(e);for(a=0;a<u.length;a++)s=e[o=u[a]],"_"!==o.charAt(0)&&"function"!=typeof s&&("module"===o?i[o]=s:Array.isArray(s)?i[o]="colorscale"===o||-1===l?s.slice():s.slice(0,l):f.isTypedArray(s)?i[o]=-1===l?s.subarray():s.subarray(0,l):i[o]=s&&"object"==typeof s?t(e[o],r[o],n):s);for(u=Object.keys(r),a=0;a<u.length;a++)"object"==typeof(s=r[o=u[a]])&&o in i&&"object"==typeof i[o]||(i[o]=s);return i},f.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},f.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var E=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return E.test(window.navigator.userAgent)};var C=/iPad|iPhone|iPod/;f.isIOS=function(){return C.test(window.navigator.userAgent)};var O=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var t=O.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},f.isD3Selection=function(t){return t instanceof n.selection},f.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},f.ensureSingleById=function(t,e,r,n){var i=t.select(e+"#"+r);if(i.size())return i;var a=t.append(e).attr("id",r);return n&&a.call(n),a},f.objectFromPath=function(t,e){for(var r,n=t.split("."),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var R=/^([^\[\.]+)\.(.+)?/,P=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function D(t){return"__"===t.slice(0,2)}f.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if("object"==typeof t&&!Array.isArray(t))for(r in t)if(t.hasOwnProperty(r))if(e=r.match(R)){if(i=t[r],D(n=e[1]))continue;delete t[r],t[n]=f.extendDeepNoArrays(t[n]||{},f.objectFromPath(r,f.expandObjectPaths(i))[n])}else if(e=r.match(P)){if(i=t[r],D(n=e[1]))continue;if(a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],"."===e[3])s=e[4],o=t[n][a]=t[n][a]||{},f.extendDeepNoArrays(o,f.objectFromPath(s,f.expandObjectPaths(i)));else{if(D(n))continue;t[n][a]=f.expandObjectPaths(i)}}else{if(D(r))continue;t[r]=f.expandObjectPaths(t[r])}return t},f.numSeparate=function(t,e,r){if(r||(r=!1),"string"!=typeof e||0===e.length)throw new Error("Separator string required for formatting!");"number"==typeof t&&(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var I=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return I.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(z,arguments)};var N={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(N,arguments)};var F=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,B={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(B,arguments)};var j=/^[:|\|]/;function U(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,d="xother"===s||"yother"===s||u||h||c,p=s;(u||c)&&(p=p.substring(1)),(h||c)&&(p=p.substring(0,p.length-1));var v,g,m,y=null,x=null;if(n.parseMultDiv){var b=function(t){var e=t.match(F);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(d){if(void 0===(v=e[p]))return""}else for(m=3;m<a.length;m++)if(g=a[m]){if(g.hasOwnProperty(p)){v=g[p];break}if(I.test(p)||(v=f.nestedProperty(g,p).get(),(v=o[p]||f.nestedProperty(g,p).get())&&(o[p]=v)),void 0!==v)break}if(void 0!==v&&("*"===y&&(v*=x),"/"===y&&(v/=x)),void 0===v&&n)return n.count<n.max&&(f.warn("Variable '"+p+"' in "+n.name+" could not be found!"),v=t),n.count===n.max&&f.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,t;if(l){var _;if(":"===l[0]&&(_=r?r.numberFormat:f.numberFormat,""!==v&&(v=_(l.replace(j,""))(v))),"|"===l[0]){_=r?r.timeFormat:i;var w=f.dateTime2ms(v);v=f.formatDate(w,l.replace(j,""),!1,_)}}else{var M=p+"Label";e.hasOwnProperty(M)&&(v=e[M])}return d&&(v="("+v+")",(u||c)&&(v=" "+v),(h||c)&&(v+=" ")),v}))}f.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var H=2e9;f.seedPseudoRandom=function(){H=2e9},f.pseudoRandom=function(){var t=H;return H=(69069*H+1)%4294967296,Math.abs(H-t)<429496729?f.pseudoRandom():H/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n<e;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},f.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||"none"===e},f.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""},f.strRotate=function(t){return t?"rotate("+t+")":""},f.strScale=function(t){return 1!==t?"scale("+t+")":""},f.getTextTransform=function(t){var e=t.noCenter,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.anchorX||0,s=t.anchorY||0,l=t.rotate,u=t.scale;return u?u>1&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var V=f.getFirefoxVersion(),Y=null!==V&&V<86;f.getPositionFromD3Event=function(){return Y?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},3620: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")}},7804:function(t,e,r){"use strict";var n=r(2296),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 d=s[o]=s[o]||{};return d[r]=t,f?d[a]=e:n(d,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}},8356:function(t,e,r){"use strict";var n=r(4040);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}},4248:function(t,e,r){"use strict";var n=r(556).dfltConfig,i=r(1792),a=t.exports={};a.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}}},988:function(t,e,r){"use strict";var n=r(3428);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}},2248:function(t,e,r){"use strict";var n=r(6524);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},e.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},e.dot=function(t,r){if(!t.length||!r.length||t.length!==r.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=e.dot(t[i],r);else if(r[0].length){var o=e.transposeRagged(r);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=e.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*r[i];return n},e.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},e.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},e.rotationXYMatrix=function(t,r,n){return e.dot(e.dot(e.translationMatrix(r,n),e.rotationMatrix(t)),e.translationMatrix(-r,-n))},e.apply3DTransform=function(t){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return e.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},e.apply2DTransform=function(t){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return e.dot(t,[n[0],n[1],1]).slice(0,2)}},e.apply2DTransform2=function(t){var r=e.apply2DTransform(t);return function(t){return r(t.slice(0,2)).concat(r(t.slice(2,4)))}},e.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},435: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}}},2296:function(t,e,r){"use strict";var n=r(8248),i=r(8116).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,u=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<u.length;l++)o[l]=a(u[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!i(u))return;if("object"!=typeof(u=u[r])||null===u)return}if("object"==typeof u&&null!==u&&null!==(o=u[e[s]]))return o}}t.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";var r,i,o,s,u=e.split(".");for(s=0;s<u.length;s++)if("__"===String(u[s]).slice(0,2))throw"bad property string";for(s=0;s<u.length;){if(r=String(u[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw"bad property string";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|\.)args\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,h="",d=[[t,h]],p=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(p=!c(l,e.slice(o+1),n,r))break;return}if(!f(l,a,e[o+1],p))break;if("object"!=typeof(l=l[a])||null===l)throw"container is not an object";h=u(h,a),d.push([l,h])}if(p){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),d=!o&&s(r,h),p=e[0];for(a=0;a<t.length;a++)h=n.replace("-1",a),o&&(d=s(c=r[a%r.length],h)),d&&(u=!1),f(t,a,p,d)&&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}},6628:function(t){"use strict";t.exports=function(){}},1792:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=[];t.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=t.split(/<br\s*\/?>/g),l=0;l<o.length;l++)l&&a.append("br"),a.append("span").text(o[l]);"stick"===e?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style("opacity",0).each("end",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},2213:function(t,e,r){"use strict";var n=r(3972),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))}},2065:function(t,e,r){"use strict";var n=r(2248).dot,i=r(9032).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,d,p,v=r.length,g=r[0][0],m=r[0][1],y=0;for(c=1;c<v;c++)if(f=g,h=m,g=r[c][0],m=r[c][1],!(l<(d=Math.min(f,g))||l>Math.max(f,g)||u>Math.max(h,m)))if(u<Math.min(h,m))l!==d&&y++;else{if(u===(p=g===f?u:h+(l-f)*(m-h)/(g-f)))return 1!==c||!e;u<=p&&l!==d&&y++}return y%2==1},isRect:u,degenerate:c}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],u=[t[r][0]-l[0],t[r][1]-l[1]],c=n(u,u),f=Math.sqrt(c),h=[-u[1]/f,u[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,u))<0||s>c||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u<t.length;u++)(u===t.length-1||a.isSegmentBent(t,l,u+1,e))&&(r.push(t[u]),r.length<s-2&&(n=u,i=r.length-1),l=u)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},4296:function(t,e,r){"use strict";var n=r(8248),i=r(5928);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}},2416: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}},4552:function(t,e,r){"use strict";var n=r(3400),i=r(556).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},3756: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)}},3193: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}},1528:function(t,e,r){"use strict";var n=r(8116).isArrayOrTypedArray,i=r(3620);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])}}},4952:function(t,e,r){"use strict";var n=r(8248),i=r(4248),a=r(5536),o=r(9032).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,d=e.length,p=0,v=d>1?(e[d-1]-e[0])/(d-1):1;for(o=v>=0?r?l:u:r?f:c,t+=v*s*(r?-1:1)*(v>=0?1:-1);h<d&&p++<100;)o(e[a=Math.floor((h+d)/2)],t)?h=a+1:d=a;return p>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}},3972: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)}},6576:function(t,e,r){"use strict";var n=r(6308),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}},2996:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},3084:function(t,e,r){"use strict";var n=r(8248),i=r(8116).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=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},696:function(t,e,r){"use strict";var n=r(2160);t.exports=function(t){return t?n(t):[0,0,0,1]}},2736:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(4284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var L=t.text(),S=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&L.match(l),O=n.select(t.node().parentNode);if(!O.empty()){var R=t.attr("class")?t.attr("class").split(" ")[0]:"text";return R+="-math",O.selectAll("svg."+R).remove(),O.selectAll("g."+R+"-group").remove(),t.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),S?(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 d=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])},p=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")}),d,p,(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(){d(),p(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}else i.warn("No MathJax version:",MathJax.version)}(S[2],o,(function(n,i,o){O.selectAll("svg."+R).remove(),O.selectAll("g."+R+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return P(),void e();var l=O.append("g").classed(R+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"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:R,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 d=h.node().getBoundingClientRect(),p=d.width,v=d.height;(p>u||v>c)&&(s.style("overflow","hidden"),p=(d=s.node().getBoundingClientRect()).width,v=d.height);var m=+t.attr("x"),y=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===R[0])l.attr({transform:"rotate("+[-90,m,y]+")"+a(-p/2,x-v/2)});else if("l"===R[0])y=x-v/2;else if("a"===R[0]&&0!==R.indexOf("atitle"))m=0,y=x;else{var b=t.attr("text-anchor");m-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-v/2}s.attr({x:m,y:y}),g&&g.call(t,l),e(l)}))}))):P(),t}function P(){O.empty()||(R=t.attr("class")+"-math",O.select("svg."+R).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(m," ");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:u*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)f(i[a])}function f(t){var e,i=t.type,a={};if("a"===i){e="a";var s=t.target,u=t.href,c=t.popup;u&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":u},c&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+c+'");return false;'))}else e="tspan";t.style&&(a.style=t.style);var f=document.createElementNS(o.svg,e);if("sup"===i||"sub"===i){g(r,v),r.appendChild(f);var h=document.createElementNS(o.svg,"tspan");g(h,v),n.select(h).attr("dy",p[i]),a.dy=d[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 L(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 S=e.split(y),O=0;O<S.length;O++){var R=S[O],P=R.match(x),D=P&&P[2].toLowerCase(),I=h[D];if("br"===D)c();else if(void 0===I)g(r,E(R));else if(P[1])L(D);else{var z=P[4],N={type:D},F=A(z,_);if(F?(F=F.replace(k,"$1 fill:"),I&&(F+=";"+I)):I&&(F=I),F&&(N.style=F),"a"===D){a=!0;var B=A(z,w);if(B){var j=C(B);j&&(N.href=j,N.target=A(z,M)||"_blank",N.popup=A(z,T))}}f(N)}}return a}(t.node(),L);r&&t.style("pointer-events","all"),e.positionText(t),g&&g.call(t)}};var u=/(<|&lt;|&#60;)/g,c=/(>|&gt;|&#62;)/g,f=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="",g=["http:","https:","mailto:","",void 0,":"],m=e.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,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,M=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\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&&E(n)}var k=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(y),a=[],o="",s=0,l=0;l<i.length;l++){var u=i[l],c=u.match(x),f=c&&c[2].toLowerCase();if(f)-1!==n.indexOf(f)&&(a.push(u),o=f);else{var h=u.length;if(s+h<r)a.push(u),s+=h;else if(s<r){var d=r-s;o&&("br"!==o||d<=3||h<=3)&&a.pop(),r>3?a.push(u.substr(0,d-3)+"..."):a.push(u.substr(0,d));break}o=""}}return a.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,(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)):L[e])||t}))}function C(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function O(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(t){t=t.replace(m," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(y),o=0;o<a.length;o++){var s=a[o],l=s.match(x),u=l&&l[2].toLowerCase();if(u in h)if(l[1])i.length&&(r=i.pop());else{var c=l[4],f=A(c,_),d=f?{style:f}:{};if("a"===u){var p=A(c,w);if(p){var v=C(p);if(v){d.href=v;var g=A(c,M);g&&(d.target=g)}}}var b=document.createElement(u);r.appendChild(b),n.select(b).attr(d),r=b,i.push(b)}else r.appendChild(document.createTextNode(E(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 R="1px ";e.makeTextShadow=function(t){return R+R+R+t+", -"+R+"-"+R+R+t+", "+R+"-"+R+R+t+", -"+R+R+R+t},e.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var i,s,u,c,f;i=n.select(r).select(".svg-container"),s=i.append("div"),u=t.node().style,c=parseFloat(u.fontSize||12),void 0===(f=e.text)&&(f=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":u.fontFamily||"Arial","font-size":c,color:e.fill||u.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(f).call(O(t,i,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(O(t,i,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var h,d=o.attr("class");(h=d?"."+d.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")}},1200: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)}},6896:function(t,e,r){"use strict";var n=r(8248);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}},1680:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(t){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},9820:function(t,e,r){"use strict";var n=r(4040);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:""}}},7824:function(t,e,r){"use strict";var n=r(2880).extendFlat,i=r(3620),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function c(t,e,r){var a=n({},t);for(var o in a){var s=a[o];i(s)&&(a[o]=f(s,e,0,o))}return"from-root"===r&&(a.editType=e),a}function f(t,e,r,i){if(t.valType){var a=n({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=f(t.items[o],e)}return a}return c(t,e,"_"===i.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:o,traceFlags:function(){return u(s)},layoutFlags:function(){return u(l)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:c}},3404:function(t,e,r){"use strict";var n=r(8248),i=r(1784),a=r(4040),o=r(3400),s=r(7316),l=r(9811),u=r(6308),c=l.cleanId,f=l.getFromTrace,h=a.traceIs;function d(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=c(r,n,!0))}function p(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 m(t){var e="middle",r="center";return"string"==typeof t&&(-1!==t.indexOf("top")?e="top":-1!==t.indexOf("bottom")&&(e="bottom"),-1!==t.indexOf("left")?r="left":-1!==t.indexOf("right")&&(r="right")),e+" "+r}function y(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}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 m=t[g];m.anchor&&"free"!==m.anchor&&(m.anchor=c(m.anchor)),m.overlaying&&(m.overlaying=c(m.overlaying)),m.type||(m.isdate?m.type="date":m.islog?m.type="log":!1===m.isdate&&!1===m.islog&&(m.type="linear")),"withzero"!==m.autorange&&"tozero"!==m.autorange||(m.autorange=!0,m.rangemode="tozero"),m.insiderange&&delete m.range,delete m.islog,delete m.isdate,delete m.categories,y(m,"domain")&&delete m.domain,void 0!==m.autotick&&(void 0===m.tickmode&&(m.tickmode=m.autotick?"auto":"linear"),delete m.autotick),p(m)}else if(l&&l.test(g))p(t[g].radialaxis);else if(f&&f.test(g)){var x=t[g];p(x.aaxis),p(x.baxis),p(x.caxis)}else if(h&&h.test(g)){var b=t[g],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],M=_[1],T=_[2],A=i([],w),k=[];for(n=0;n<3;++n)k[n]=M[n]+T*A[2+4*n];b.camera={eye:{x:k[0],y:k[1],z:k[2]},center:{x:M[0],y:M[1],z:M[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}p(b.xaxis),p(b.yaxis),p(b.zaxis)}}var L=Array.isArray(t.annotations)?t.annotations.length:0;for(r=0;r<L;r++){var S=t.annotations[r];o.isPlainObject(S)&&(S.ref&&("paper"===S.ref?(S.xref="paper",S.yref="paper"):"data"===S.ref&&(S.xref="x",S.yref="y"),delete S.ref),d(S,"xref"),d(S,"yref"))}var E=Array.isArray(t.shapes)?t.shapes.length:0;for(r=0;r<E;r++){var C=t.shapes[r];o.isPlainObject(C)&&(d(C,"xref"),d(C,"yref"))}var O=Array.isArray(t.images)?t.images.length:0;for(r=0;r<O;r++){var R=t.images[r];o.isPlainObject(R)&&(d(R,"xref"),d(R,"yref"))}var P=t.legend;return P&&(P.x>3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.yanchor="top")),p(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]=m(i.textposition[n]);else i.textposition&&(i.textposition=m(i.textposition));var d=a.getModule(i);if(d&&d.colorbar){var x=d.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 M=!1!==(i.increasing||{}).showlegend,T=!1!==(i.decreasing||{}).showlegend,A=v(i.increasing),k=v(i.decreasing);if(!1!==A&&!1!==k){var L=g(A,k,M,T);L&&(i.name=L)}else!A&&!k||i.name||(i.name=A||k)}if(Array.isArray(i.transforms)){var S=i.transforms;for(n=0;n<S.length;n++){var E=S[n];if(o.isPlainObject(E))switch(E.type){case"filter":E.filtersrc&&(E.target=E.filtersrc,delete E.filtersrc),E.calendar&&(E.valuecalendar||(E.valuecalendar=E.calendar),delete E.calendar);break;case"groupby":if(E.styles=E.styles||E.style,E.styles&&!Array.isArray(E.styles)){var C=E.styles,O=Object.keys(C);E.styles=[];for(var R=0;R<O.length;R++)E.styles.push({target:O[R],value:C[O[R]]})}}}}y(i,"line")&&delete i.line,"marker"in i&&(y(i.marker,"line")&&delete i.marker.line,y(i,"marker")&&delete i.marker),u.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),p(i),i.colorbar&&p(i.colorbar),i.marker&&i.marker.colorbar&&p(i.marker.colorbar),i.line&&i.line.colorbar&&p(i.line.colorbar),i.aaxis&&p(i.aaxis),i.baxis&&p(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)}}}},2448:function(t,e,r){"use strict";var n=r(6424);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(2200).getGraphDiv,a=r(4016).eraseActiveShape;e.deleteActiveShape=function(t){return a(i(t))},e.toImage=r(7024),e.validate=r(1480),e.downloadImage=r(7412);var o=r(4828);e.makeTemplate=o.makeTemplate,e.validateTemplate=o.validateTemplate},7680:function(t,e,r){"use strict";var n=r(3620),i=r(6628),a=r(4248),o=r(4952).sorterAsc,s=r(4040);e.containerArrayMatch=r(9820);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"),d=s.getComponentMethod(f,"draw"),p=s.getComponentMethod(f,"drawOne"),v=n.replot||n.recalc||h===i||d===i,g=t.layout,m=t._fullLayout;if(r[""]){Object.keys(r).length>1&&a.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(u(y))e.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!v&&(h(g,m),d(t),!0)}var x,b,_,w,M,T,A,k,L=Object.keys(r).map(Number).sort(o),S=e.get(),E=S||[],C=c(m,f).get(),O=[],R=-1,P=E.length;for(x=0;x<L.length;x++)if(w=r[_=L[x]],M=Object.keys(w),T=w[""],A=l(T),_<0||_>E.length-(A?0:1))a.warn("index out of range",f,_);else if(void 0!==T)M.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(T)?O.push(_):A?("add"===T&&(T={}),E.splice(_,0,T),C&&C.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,T),-1===R&&(R=_);else for(b=0;b<M.length;b++)k=f+"["+_+"].",c(E[_],M[b],k).set(w[M[b]]);for(x=O.length-1;x>=0;x--)E.splice(O[x],1),C&&C.splice(O[x],1);if(E.length?S||e.set(E):e.set(null),v)return!1;if(h(g,m),p!==i){var D;if(-1===R)D=L;else{for(P=Math.max(E.length,P),D=[],x=0;x<L.length&&!((_=L[x])>=R);x++)D.push(_);for(x=R;x<P;x++)D.push(x)}for(x=0;x<D.length;x++)p(t,D[x])}else d(t);return!0}},6424:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(2264),o=r(3400),s=o.nestedProperty,l=r(5924),u=r(4552),c=r(4040),f=r(3060),h=r(7316),d=r(4460),p=r(6312),v=r(4724),g=r(3616),m=r(6308),y=r(2464).initInteractions,x=r(9616),b=r(2676).clearOutline,_=r(556).dfltConfig,w=r(7680),M=r(3404),T=r(9172),A=r(7824),k=r(3816).AX_NAME_PATTERN,L=0;function S(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function E(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function C(t,e){E(t,m.combine(e,"white"))}function O(t,e){if(!t._context){t._context=o.extendDeep({},_);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,u=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in u&&("setBackground"===l&&"opaque"===e[l]?u[l]=C:u[l]=e[l]);e.plot3dPixelRatio&&!u.plotGlPixelRatio&&(u.plotGlPixelRatio=u.plot3dPixelRatio);var c=e.editable;if(void 0!==c)for(u.editable=c,s=Object.keys(u.edits),i=0;i<s.length;i++)u.edits[s[i]]=c;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in u.edits&&(u.edits[l]=e.edits[l]);u._exportedPlot=e._exportedPlot}u.staticPlot&&(u.editable=!1,u.edits={},u.autosizable=!1,u.scrollZoom=!1,u.doubleClick=!1,u.showTips=!1,u.showLink=!1,u.displayModeBar=!1),"hover"!==u.displayModeBar||a||(u.displayModeBar=!0),"transparent"!==u.setBackground&&"function"==typeof u.setBackground||(u.setBackground=E),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 d=f.split("+");for(i=0;i<d.length;i++)h[d[i]]=1}else!1!==f&&(h.gl3d=1,h.geo=1,h.mapbox=1)}function R(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 D(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),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),d=[];for(var p in Array.isArray(r)||(r=[r]),r=R(r,t.data.length-1),e)for(var v=0;v<r.length;v++){if(a=t.data[r[v]],l=(u=s(a,p)).get(),c=e[p][v],!o.isArrayOrTypedArray(c))throw new Error("attribute: "+p+" index: "+v+" must be an array");if(!o.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+p);if(l.constructor!==c.constructor)throw new Error("cannot extend array with an array of a different type: "+p);f=h?n[p][v]:n,i(f)||(f=-1),d.push({prop:u,target:l,insert:c,maxp:Math.floor(f)})}return d}(t,e,r,n),u={},c={},f=0;f<l.length;f++){var h=l[f].prop,d=l[f].maxp,p=a(l[f].target,l[f].insert,d);h.set(p[0]),Array.isArray(u[h.astr])||(u[h.astr]=[]),u[h.astr].push(p[1]),Array.isArray(c[h.astr])||(c[h.astr]=[]),c[h.astr].push(l[f].target.length)}return{update:u,maxPoints:c}}function z(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function N(t,r,n,i){t=o.getGraphDiv(t),M.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=M.coerceTraceIndices(t,i),l=U(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&M.clearAxisTypes(t,s,{});var f=[];c.fullReplot?f.push(e._doPlot):(f.push(h.previousPromises),h.supplyDefaults(t),c.markerSize&&(h.doCalcdata(t),G(f)),c.style&&f.push(T.doTraceStyle),c.colorbars&&f.push(T.doColorBars),f.push(S)),f.push(h.rehover,h.redrag,h.reselect),u.add(t,N,[t,l.undoit,l.traces],N,[t,l.redoit,l.traces]);var d=o.syncOrAsync(f,t);return d&&d.then||(d=Promise.resolve()),d.then((function(){return t.emit("plotly_restyle",l.eventData),t}))}function F(t){return void 0===t?null:t}function B(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){j((n||"")+r,i.get(),e,t),a(e)},i}:s}function j(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)j(t+"["+l+"]",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var u=o.isPlainObject(e)?e:{},c=o.isPlainObject(r)?r:{},f=o.extendFlat({},u,c);for(var h in f)j(t+"."+h,u[h],c[h],n)}else void 0===n[t]&&(n[t]=F(e))}function U(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,p=B(i._preGUI,u),v=o.extendDeepAll({},e);H(e);var g,m=A.traceFlags(),y={},x={};function b(){return r.map((function(){}))}function _(t){var e=d.id2name(t);-1===g.indexOf(e)&&g.push(e)}function w(t){return"LAYOUT"+t+".autorange"}function T(t){return"LAYOUT"+t+".range"}function k(t){for(var e=t;e<a.length;e++)if(a[e]._input===l[t])return a[e]}function L(n,a,o){if(Array.isArray(n))n.forEach((function(t){L(t,a,o)}));else if(!(n in e)&&!M.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=p(t.layout,n.replace("LAYOUT",""));else{var c=r[o];s=B(i._tracePreGUI[k(c)._fullInput.uid],u)(l[c],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=F(s.get())),void 0!==a&&s.set(a)}}function S(t){return function(e){return a[e][t]}}function E(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var C in e){if(M.hasParent(e,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");var O,R,P,D,I,z,N=e[C];if("autobinx"!==C&&"autobiny"!==C||(C=C.charAt(C.length-1)+"bins",N=Array.isArray(N)?N.map(E(C)):!1===N?r.map(S(C)):null),y[C]=N,"LAYOUT"!==C.substr(0,6)){for(x[C]=b(),n=0;n<r.length;n++)if(O=l[r[n]],R=k(r[n]),D=(P=B(i._tracePreGUI[R._fullInput.uid],u)(O,C)).get(),void 0!==(I=Array.isArray(N)?N[n%N.length]:N)){var j=P.parts[P.parts.length-1],U=C.substr(0,C.length-j.length-1),V=U?U+".":"",Y=U?s(R,U).get():R;if((z=f.getTraceValObject(R,P.parts))&&z.impliedEdits&&null!==I)for(var G in z.impliedEdits)L(o.relativeAttr(C,G),z.impliedEdits[G],n);else if("thicknessmode"!==j&&"lenmode"!==j||D===I||"fraction"!==I&&"pixels"!==I||!Y){if("type"===C&&("pie"===I!=("pie"===D)||"funnelarea"===I!=("funnelarea"===D))){var W="x",q="y";"bar"!==I&&"bar"!==D||"h"!==O.orientation||(W="y",q="x"),o.swapAttrs(O,["?","?src"],"labels",W),o.swapAttrs(O,["d?","?0"],"label",W),o.swapAttrs(O,["?","?src"],"values",q),"pie"===D||"funnelarea"===D?(s(O,"marker.color").set(s(O,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):c.traceIs(O,"cartesian")&&s(O,"marker.colors").set(s(O,"marker.color").get())}}else{var X=i._size,Z=Y.orient,J="top"===Z||"bottom"===Z;if("thicknessmode"===j){var K=J?X.h:X.w;L(V+"thickness",Y.thickness*("fraction"===I?1/K:K),n)}else{var Q=J?X.w:X.h;L(V+"len",Y.len*("fraction"===I?1/Q:Q),n)}}if(x[C][n]=F(D),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(C)){if("orientation"===C){P.set(I);var $=O.x&&!O.y?"h":"v";if((P.get()||$)===R.orientation)continue}else"orientationaxes"===C&&(O.orientation={v:"h",h:"v"}[R.orientation]);M.swapXYData(O),m.calc=m.clearAxisTypes=!0}else-1!==h.dataArrayContainers.indexOf(P.parts[0])?(M.manageArrayContainers(P,I,x),m.calc=!0):(z?z.arrayOk&&!c.traceIs(R,"regl")&&(o.isArrayOrTypedArray(I)||o.isArrayOrTypedArray(D))?m.calc=!0:A.update(m,z):m.calc=!0,P.set(I))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(C)&&d.swap(t,r),"orientationaxes"===C){var tt=s(t.layout,"hovermode"),et=tt.get();"x"===et?tt.set("y"):"y"===et?tt.set("x"):"x unified"===et?tt.set("y unified"):"y unified"===et&&tt.set("x unified")}if(-1!==["orientation","type"].indexOf(C)){for(g=[],n=0;n<r.length;n++){var rt=l[r[n]];c.traceIs(rt,"cartesian")&&(_(rt.xaxis||"x"),_(rt.yaxis||"y"))}L(g.map(w),!0,0),L(g.map(T),[0,1],0)}}else P=p(t.layout,C.replace("LAYOUT","")),x[C]=[F(P.get())],P.set(Array.isArray(N)?N[0]:N),m.calc=!0}return(m.calc||m.plot)&&(m.fullReplot=!0),{flags:m,undoit:x,redoit:y,traces:r,eventData:o.extendDeepNoArrays([],[v,r])}}function H(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 V(t,e,r){t=o.getGraphDiv(t),M.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(T.layoutReplot):Object.keys(n).length&&(Y(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(T.doLegend),a.layoutstyle&&s.push(T.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(T.doTicksRelayout),a.modebar&&s.push(T.doModeBar),a.camera&&s.push(T.doCamera),a.colorbars&&s.push(T.doColorBars),s.push(S)),s.push(h.rehover,h.redrag,h.reselect),u.add(t,V,[t,i.undoit],V,[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 Y(t,e,r){var n,i,a=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return o.coerce(n,i,v,t,e)},u={};for(var c in r.rangesAltered){var f=d.id2name(c);if(n=t.layout[f],i=a[f],p(n,i,l,u),i._matchGroup)for(var h in i._matchGroup)if(h!==c){var g=a[d.id2name(h)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[];for(var n in e){var i=d.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 d.draw(t,r,{skipTitle:!0})}:function(t){return d.draw(t,"redraw")};t.push(b,T.doAutoRangeAndConstraints,r,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,i,a=t.layout,l=t._fullLayout,u=l._guiEditing,h=B(l._preGUI,u),p=Object.keys(e),v=d.list(t),g=o.extendDeepAll({},e),m={};for(H(e),p=Object.keys(e),n=0;n<p.length;n++)if(0===p[n].indexOf("allaxes")){for(i=0;i<v.length;i++){var y=v[i]._id.substr(1),x=-1!==y.indexOf("scene")?y+".":"",b=p[n].replace("allaxes",x+v[i]._name);e[b]||(e[b]=e[p[n]])}delete e[p[n]]}var _=A.layoutFlags(),T={},L={};function S(t,r){if(Array.isArray(t))t.forEach((function(t){S(t,r)}));else if(!(t in e)&&!M.hasParent(e,t)){var n=h(a,t);t in L||(L[t]=F(n.get())),void 0!==r&&n.set(r)}}var E,C={};function O(t){var e=d.name2id(t.split(".")[0]);return C[e]=1,e}for(var R in e){if(M.hasParent(e,R))throw new Error("cannot set "+R+" and a parent attribute simultaneously");for(var P=h(a,R),D=e[R],I=P.parts.length-1;I>0&&"string"!=typeof P.parts[I];)I--;var z=P.parts[I],N=P.parts[I-1]+"."+z,j=P.parts.slice(0,I).join("."),U=s(t.layout,j).get(),V=s(l,j).get(),Y=P.get();if(void 0!==D){T[R]=D,L[R]="reverse"===z?D:F(Y);var G=f.getLayoutValObject(l,P.parts);if(G&&G.impliedEdits&&null!==D)for(var Z in G.impliedEdits)S(o.relativeAttr(R,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(R))if(D){S("autosize",null);var K="height"===R?"width":"height";S(K,l[K])}else l[R]=t._initialAutoSize[R];else if("autosize"===R)S("width",D?null:l.width),S("height",D?null:l.height);else if(N.match(W))O(N),s(l,j+"._inputRange").set(null);else if(N.match(q)){O(N),s(l,j+"._inputRange").set(null);var Q=s(l,j).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(X)&&s(l,j+"._inputDomain").set(null);if("type"===z){E=U;var $="linear"===V.type&&"log"===D,tt="log"===V.type&&"linear"===D;if($||tt){if(E&&E.range)if(V.autorange)$&&(E.range=E.range[1]>E.range[0]?[1,2]:[2,1]);else{var et=E.range[0],rt=E.range[1];$?(et<=0&&rt<=0&&S(j+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),S(j+".range[0]",Math.log(et)/Math.LN10),S(j+".range[1]",Math.log(rt)/Math.LN10)):(S(j+".range[0]",Math.pow(10,et)),S(j+".range[1]",Math.pow(10,rt)))}else S(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[P.parts[0]]&&"radialaxis"===P.parts[1]&&delete l[P.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,V,D,S),c.getComponentMethod("images","convertCoords")(t,V,D,S)}else S(j+".autorange",!0),S(j+".range",null);s(l,j+"._inputRange").set(null)}else if(z.match(k)){var nt=s(l,R).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,S),c.getComponentMethod("images","convertCoords")(t,nt,it,S)}var at=w.containerArrayMatch(R);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(D)?L[R]=null:w.isRemoveVal(D)?L[R]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(_,st),m[r]||(m[r]={});var lt=m[r][n];lt||(lt=m[r][n]={}),lt[ot]=D,delete e[R]}else"reverse"===z?(U.range?U.range.reverse():(S(j+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===R&&(!1===D&&!1!==Y||!1!==D&&!1===Y)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===R&&("lasso"===D||"select"===D)&&"lasso"!==Y&&"select"!==Y||l._has("gl2d")?_.plot=!0:G?A.update(_,G):_.calc=!0,P.set(D))}}for(r in m)w.applyContainerArrayChanges(t,h(a,r),m[r],_,h)||(_.plot=!0);for(var ut in C){var ct=(E=d.getFromId(t,ut))&&E._constraintGroup;if(ct)for(var ft in _.calc=!0,ct)C[ft]||(d.getFromId(t,ft)._constraintShrinkable=!0)}(J(t)||e.height||e.width)&&(_.plot=!0);var ht=l.shapes;for(n=0;n<ht.length;n++)if(ht[n].showlegend){_.calc=!0;break}return(_.plot||_.calc)&&(_.layoutReplot=!0),{flags:_,rangesAltered:C,undoit:L,redoit:T,eventData:g}}function J(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 K(t,r,n,i){t=o.getGraphDiv(t),M.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=M.coerceTraceIndices(t,i),s=U(t,o.extendFlat({},r),a),l=s.flags,c=Z(t,o.extendFlat({},n)),f=c.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&M.clearAxisTypes(t,a,n);var d=[];f.layoutReplot?d.push(T.layoutReplot):l.fullReplot?d.push(e._doPlot):(d.push(h.previousPromises),Y(t,f,c)||h.supplyDefaults(t),l.style&&d.push(T.doTraceStyle),(l.colorbars||f.colorbars)&&d.push(T.doColorBars),f.legend&&d.push(T.doLegend),f.layoutstyle&&d.push(T.layoutStyles),f.axrange&&G(d,c.rangesAltered),f.ticks&&d.push(T.doTicksRelayout),f.modebar&&d.push(T.doModeBar),f.camera&&d.push(T.doCamera),d.push(S)),d.push(h.rehover,h.redrag,h.reselect),u.add(t,K,[t,s.undoit,c.undoit,s.traces],K,[t,s.redoit,c.redoit,s.traces]);var p=o.syncOrAsync(d,t);return p&&p.then||(p=Promise.resolve(t)),p.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:c.eventData}),t}))}function Q(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var $=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],tt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function et(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function rt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r<e.length;r++)if(e[r]._fullInput.uid===t)return r;return-1}function it(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function at(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function ot(t,e,r,n){var i,a,l,u=n.getValObject,c=n.flags,f=n.immutable,h=n.inArray,d=n.arrayIndex;function p(){var t=i.editType;h&&-1!==t.indexOf("arraydraw")?o.pushUnique(c.arrays[h],d):(A.update(c,i),"none"!==t&&c.nChanges++,n.transition&&i.anim&&c.nChangesAnim++,(W.test(l)||q.test(l))&&(c.rangesAltered[r[0]]=1),X.test(l)&&s(e,"_inputDomain").set(null),"datarevision"===a&&(c.newDataRevision=1))}function v(t){return"data_array"===t.valType||t.arrayOk}for(a in t){if(c.calc&&!n.transition)return;var g=t[a],m=e[a],y=r.concat(a);if(l=y.join("."),"_"!==a.charAt(0)&&"function"!=typeof g&&g!==m){if(("tick0"===a||"dtick"===a)&&"geo"!==r[0]){var x=e.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==a||!e.autorange)&&("zmin"!==a&&"zmax"!==a||"contourcarpet"!==e.type)&&(i=u(y))&&(!i._compareAsJSON||JSON.stringify(g)!==JSON.stringify(m))){var b,_=i.valType,w=v(i),M=Array.isArray(g),T=Array.isArray(m);if(M&&T){var k="_input_"+a,L=t[k],S=e[k];if(Array.isArray(L)&&L===S)continue}if(void 0===m)w&&M?c.calc=!0:p();else if(i._isLinkedToArray){var E=[],C=!1;h||(c.arrays[a]=E);var O=Math.min(g.length,m.length),R=Math.max(g.length,m.length);if(O!==R){if("arraydraw"!==i.editType){p();continue}C=!0}for(b=0;b<O;b++)ot(g[b],m[b],y.concat(b),o.extendFlat({inArray:a,arrayIndex:b},n));if(C)for(b=O;b<R;b++)E.push(b)}else!_&&o.isPlainObject(g)?ot(g,m,y,n):w?M&&T?(f&&(c.calc=!0),(f||n.newDataRevision)&&p()):M!==T?c.calc=!0:p():M&&T&&g.length===m.length&&String(g)===String(m)||p()}}}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);p()}}function st(t,e){var r;for(r in t)if("_"!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(st(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(st(n[a],i[a]))return!0}}}}function lt(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),e._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),e._lastBBox=r}}e.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=h.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function u(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function f(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,M.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 d,p,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 m=[],y=null==e,x=Array.isArray(e);if(y||x||!o.isPlainObject(e)){if(y||-1!==["string","number"].indexOf(typeof e))for(d=0;d<n._frames.length;d++)(p=n._frames[d])&&(y||String(p.group)===String(e))&&m.push({type:"byname",name:String(p.name),data:g({name:p.name})});else if(x)for(d=0;d<e.length;d++){var b=e[d];-1!==["number","string"].indexOf(typeof b)?(b=String(b),m.push({type:"byname",name:b,data:g({name:b})})):o.isPlainObject(b)&&m.push({type:"object",data:g(o.extendFlat({},b))})}}else m.push({type:"object",data:g(o.extendFlat({},e))});for(d=0;d<m.length;d++)if("byname"===(p=m[d]).type&&!n._frameHash[p.data.name])return o.warn('animate failure: frame not found: "'+p.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&&m.reverse();var _=t._fullLayout._currentFrame;if(_&&r.fromcurrent){var w=-1;for(d=0;d<m.length;d++)if("byname"===(p=m[d]).type&&p.name===_){w=d;break}if(w>0&&w<m.length-1){var T=[];for(d=0;d<m.length;d++)p=m[d],("byname"!==m[d].type||d>w)&&T.push(p);m=T}}m.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 d=l(i),p=s(i);p.duration=Math.min(p.duration,d.duration);var v={frame:o,name:e[i].name,frameOpts:d,transitionOpts:p};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()}}(m):(t.emit("plotly_animated"),a())}))},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var f=l.length+2*e.length,d=[],p={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,g=(c[v]||p[v]||{}).name,m=e[n].name,y=c[g]||p[g];g&&m&&"number"==typeof m&&y&&L<5&&(L++,o.warn('addFrames: overwriting frame "'+(c[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===L&&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.")),p[v]={name:v},d.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}d.sort((function(t,e){return t.index>e.index?-1:t.index<e.index?1:0}));var x=[],b=[],_=l.length;for(n=d.length-1;n>=0;n--){if("number"==typeof(i=d[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(d[n].index,_)),x.push({type:"insert",index:s,value:i}),b.unshift({type:"delete",index:s}),_++}var w=h.modifyFrames,M=h.modifyFrames,T=[t,b],A=[t,x];return u&&u.add(t,w,T,M,A),h.modifyFrames(t,x)},e.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],d=[t,a];return u&&u.add(t,l,f,c,d),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],d=[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)})),M.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,d),s;Array.isArray(i)||(i=[i]);try{D(r,l,i)}catch(t){throw r.data.splice(r.data.length-n.length,n.length),t}return u.startSequence(r),u.add(r,c,h,f,d),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=R(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 d=e.redraw(r);return u.add(r,l,f,c,h),d},e.extendTraces=function t(r,n,i,a){var s=I(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=z(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var u=r-e.length,c=t.length-u;n.set(t.subarray(c)),n.set(e,u),i.set(t.subarray(0,c))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.prependTraces,c,t,arguments),l},e.moveTraces=function t(r,n,i){var a,s=[],l=[],c=t,f=t,h=[r=o.getGraphDiv(r),i,n],d=[r,n,i];if(D(r,n,i),n=Array.isArray(n)?n:[n],void 0===i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=R(n,r.data.length-1),i=R(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 p=e.redraw(r);return u.add(r,c,h,f,d),p},e.prependTraces=function t(r,n,i,a){var s=I(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=z(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var u=r-e.length;n.set(e),n.set(t.subarray(0,u),e.length),i.set(t.subarray(u))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.extendTraces,c,t,arguments),l},e.newPlot=function(t,r,n,i){return t=o.getGraphDiv(t),h.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),h.purge(t),e._doPlot(t,r,n,i)},e._doPlot=function(t,r,i,a){var s;if(t=o.getGraphDiv(t),l.init(t),o.isPlainObject(r)){var u=r;r=u.data,i=u.layout,a=u.config,s=u.frames}if(!1===l.triggerHandler(t,"plotly_beforeplot",[r,i,a]))return Promise.reject();r||i||o.isPlotDiv(t)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",t),O(t,a),i||(i={}),n.select(t).classed("js-plotly-plot",!0),g.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var f=0===(t.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(M.cleanData(r),f?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!f||(t.layout=M.cleanLayout(i)),h.supplyDefaults(t);var p=t._fullLayout,v=p._has("cartesian");p._replotting=!0,(f||p._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=lt,r._calcInverseTransform(t),r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};n.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(x.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),t.emit("plotly_framework")}(t),p._shouldCreateBgLayer&&delete p._shouldCreateBgLayer),g.initGradients(t),g.initPatterns(t),f&&d.saveShowSpikeInitial(t);var m=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;m&&h.doCalcdata(t);for(var b=0;b<t.calcdata.length;b++)t.calcdata[b][0].trace=t._fullData[b];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||h.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var _=o.extendFlat({},p._size),w=0;function A(){if(h.clearAutoMarginIds(t),T.drawMarginPushers(t),d.allowAutoMargin(t),t._fullLayout.title.text&&t._fullLayout.title.automargin&&h.allowAutoMargin(t,"title.automargin"),p._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 k(){t._transitioning||(T.doAutoRangeAndConstraints(t),f&&d.saveRangeInitial(t),c.getComponentMethod("rangeslider","calcAutorange")(t))}var L=[h.previousPromises,function(){if(s)return e.addFrames(t,s)},function e(){for(var r=p._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!p._glcanvas&&p._has("gl")&&(p._glcanvas=p._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})),p._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(p._glcanvas){p._glcanvas.attr("width",p.width*i).attr("height",p.height*i).style("width",p.width+"px").style("height",p.height+"px");var a=p._glcanvas.data()[0].regl;if(a&&(Math.floor(p.width*i)!==a._gl.drawingBufferWidth||Math.floor(p.height*i)!==a._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!w)return o.log(s+" Clearing graph and plotting again."),h.cleanPlot([],{},t._fullData,p),h.supplyDefaults(t),p=t._fullLayout,h.doCalcdata(t),w++,e();o.error(s)}}return"h"===p.modebar.orientation?p._modebardiv.style("height",null).style("width","100%"):p._modebardiv.style("width",null).style("height",p.height+"px"),h.previousPromises(t)},A,function(){if(h.didMarginChange(_,p._size))return o.syncOrAsync([A,T.layoutStyles],t)}];v&&L.push((function(){if(m)return o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),k],t);k()})),L.push(T.layoutStyles),v&&L.push((function(){return d.draw(t,f?"":"redraw")}),(function(t){var e=t._fullLayout._insideTickLabelsUpdaterange;if(e)return t._fullLayout._insideTickLabelsUpdaterange=void 0,V(t,e).then((function(){d.saveRangeInitial(t,!0)}))})),L.push(T.drawData,T.finalDraw,y,h.addLinks,h.rehover,h.redrag,h.reselect,h.doAutoMargin,h.previousPromises);var E=o.syncOrAsync(L,t);return E&&E.then||(E=Promise.resolve()),E.then((function(){return S(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),M.clearPromiseQueue(t);var u=t._fullData,d=t._fullLayout;if(o.isPlotDiv(t)&&u&&d){if(o.isPlainObject(r)){var p=r;r=p.data,n=p.layout,i=p.config,a=p.frames}var v=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,O(t,i),v=st(g,t._context)}t.data=r||[],M.cleanData(t.data),t.layout=n||{},M.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,u,c,f,h,d,p,v,g=n._preGUI,m=[],y={},x={};for(i in g){if(c=et(i,$)){if(p=c.head,v=c.tail,a=c.attr||p+".uirevision",(u=(l=s(n,a).get())&&rt(a,e))&&u===l){if(null===(f=g[i])&&(f=void 0),at(d=(h=s(e,i)).get(),f)){void 0===d&&"autorange"===v&&m.push(p),h.set(F(s(n,i).get()));continue}if("autorange"===v||"range["===v.substr(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in y)){var M=s(e,p).get();y[p]=M&&(M.autorange||!1!==M.autorange&&(!M.range||2!==M.range.length))}if(y[p]){h.set(F(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 T=0;T<m.length;T++){var A=m[T];if(x[A]){var k=s(e,A).get();k&&delete k.autorange}}var L=n._tracePreGUI;for(var S in L){var E,C=L[S],O=null;for(i in C){if(!O){var R=nt(S,r);if(R<0){delete L[S];break}var P=it(S,t,(E=r[R]._fullInput).index);if(P<0){delete L[S];break}O=t[P]}if(c=et(i,tt)){if(c.attr?u=(l=s(n,c.attr).get())&&rt(c.attr,e):(l=E.uirevision,void 0===(u=O.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(f=C[i])&&(f=void 0),at(d=(h=s(O,i)).get(),f))){h.set(F(s(E,i).get()));continue}}else o.warn("unrecognized GUI edit: "+i+" in trace uid "+S);delete C[i]}}}(t.data,t.layout,u,d),h.supplyDefaults(t,{skipUpdateCalc:!0});var m=t._fullData,y=t._fullLayout,x=void 0===y.datarevision,b=y.transition,_=function(t,e,r,n,i){var a=A.layoutFlags();return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,ot(e,r,[],{getValObject:function(t){return f.getLayoutValObject(r,t)},flags:a,immutable:n,transition:i,gd:t}),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}(t,d,y,x,b),w=_.newDataRevision,k=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,u=A.traceFlags();u.arrays={},u.nChanges=0,u.nChangesAnim=0;var c={getValObject:function(t){var e=f.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e},flags:u,immutable:n,transition:i,newDataRevision:a,gd:t},d={};for(s=0;s<e.length;s++)if(r[s]){if(l=r[s]._fullInput,h.hasMakesDataTransform(l)&&(l=r[s]),d[l.uid])continue;d[l.uid]=1,ot(e[s]._fullInput,l,[],c)}return(u.calc||u.plot)&&(u.fullReplot=!0),i&&u.nChanges&&u.nChangesAnim&&(u.anim=u.nChanges===u.nChangesAnim&&o?"all":"some"),u}(t,u,m,x,b,w);if(J(t)&&(_.layoutReplot=!0),k.calc||_.calc){t.calcdata=void 0;for(var L=Object.getOwnPropertyNames(y),E=0;E<L.length;E++){var C=L[E],R=C.substring(0,5);if("xaxis"===R||"yaxis"===R){var P=y[C]._emptyCategories;P&&P()}}}else h.supplyDefaultsUpdateCalc(t.calcdata,m);var D=[];if(a&&(t._transitionData={},h.createTransitionData(t),D.push((function(){return e.addFrames(t,a)}))),y.transition&&!v&&(k.anim||_.anim))_.ticks&&D.push(T.doTicksRelayout),h.doCalcdata(t),T.doAutoRangeAndConstraints(t),D.push((function(){return h.transitionFromReact(t,k,_,d)}));else if(k.fullReplot||_.layoutReplot||v)t._fullLayout._skipDefaults=!0,D.push(e._doPlot);else{for(var I in _.arrays){var z=_.arrays[I];if(z.length){var N=c.getComponentMethod(I,"drawOne");if(N!==o.noop)for(var B=0;B<z.length;B++)N(t,z[B]);else{var j=c.getComponentMethod(I,"draw");if(j===o.noop)throw new Error("cannot draw components: "+I);j(t)}}}D.push(h.previousPromises),k.style&&D.push(T.doTraceStyle),(k.colorbars||_.colorbars)&&D.push(T.doColorBars),_.legend&&D.push(T.doLegend),_.layoutstyle&&D.push(T.layoutStyles),_.axrange&&G(D),_.ticks&&D.push(T.doTicksRelayout),_.modebar&&D.push(T.doModeBar),_.camera&&D.push(T.doCamera),D.push(S)}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 M.cleanData(t.data),M.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=V,e.restyle=N,e.setPlotConfig=function(t){return o.extendFlat(_,t)},e.update=K,e._guiRelayout=Q(V),e._guiRestyle=Q(N),e._guiUpdate=Q(K),e._storeDirectGUIEdit=function(t,e,r){for(var n in r)j(n,s(t,n).get(),r[n],e)}},556: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}},3060:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(5464),o=r(4859),s=r(6672),l=r(5656),u=r(556).configAttributes,c=r(7824),f=i.extendDeepAll,h=i.isPlainObject,d=i.isArrayOrTypedArray,p=i.nestedProperty,v=i.valObjectMeta,g="_isSubplotObj",m="_isLinkedToArray",y="_deprecated",x=[g,m,"_arrayAttrRegexps",y];function b(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!h(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!_(e[++r]))return!1}else if("info_array"===t.valType){var i=e[++r];if(!_(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)T(r,e,e.attr[i]);else T(r,e,"subplot"===e.attr?e.name:e.attr);for(t in n.componentsRegistry){var a=(e=n.componentsRegistry[t]).schema;if(a&&(a.subplots||a.layout)){var s=a.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l];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:M(r)}}function M(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[m];n&&(delete t[m],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 T(t,e,r){var n=p(t,r),i=f({},e.layoutAttributes);i[g]=!0,n.set(i)}function A(t,e,r){var n=p(t,r);n.set(f(n.get()||{},e))}e.IS_SUBPLOT_OBJ=g,e.IS_LINKED_TO_ARRAY=m,e.DEPRECATED=y,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){p(s,i).set(void 0),void 0===t&&p(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:M(o)};if(r.layoutAttributes){var c={};f(c,r.layoutAttributes),u.layoutAttributes=M(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:M(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)},M(r),r.frames),animation:M(l),config:M(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)d(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 p=c[f],v=p._module;v&&(n="transforms["+f+"].",r=p,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)}},1780:function(t,e,r){"use strict";var n=r(3400),i=r(5464),a="templateitemname",o={name:{valType:"string",editType:"none"}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}o[a]={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},e.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,"type"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var u={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var c=o[l];if(c.name===n)return u[n]=1,e._template=c,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!u[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),u[n]=1}}return t}}},e.arrayDefaultKey=l,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=e+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function f(t,e){s?n.nestedProperty(l[u],t).set(e):l[u+"."+t]=e}function h(){var t=l;return c(),t}return c(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},9172:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=r(2736),l=r(3696),u=r(6308),c=r(3616),f=r(1668),h=r(3080),d=r(4460),p=r(4284),v=r(1888),g=v.enforce,m=v.clean,y=r(9280).doAutoRange,x="start";function b(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 _(t){var r,i,s,l,f,v,g=t._fullLayout,m=g._size,y=m.p,x=d.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!g._has("cartesian"))return a.previousPromises(t);function _(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-y-n:e._offset+e._length+y+n:m.t+m.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+y+n:e._offset-y-n:m.l+m.w*(t.position||0)+n%1}for(r=0;r<x.length;r++){var M=(l=x[r])._anchorAxis;l._linepositions={},l._lw=c.crispRound(t,l.linewidth,1),l._mainLinePosition=_(l,M,l.side),l._mainMirrorPosition=l.mirror&&M?_(l,M,p.OPPOSITE_SIDE[l.side]):null}var A=[],k=[],L=[],S=1===u.opacity(g.paper_bgcolor)&&1===u.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(i in g._plots)if((s=g._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var E=s.xaxis.domain,C=s.yaxis.domain,O=s.plotgroup;if(b(E,C,L)){var R=O.node(),P=s.bg=o.ensureSingle(O,"rect","bg");R.insertBefore(P.node(),R.childNodes[0]),k.push(i)}else O.select("rect.bg").remove(),L.push([E,C]),S||(A.push(i),k.push(i))}var D,I,z,N,F,B,j,U,H,V,Y,G,W,q=g._bgLayer.selectAll(".bg").data(A);for(q.enter().append("rect").classed("bg",!0),q.exit().remove(),q.each((function(t){g._plots[t].bg=n.select(this)})),r=0;r<k.length;r++)s=g._plots[k[r]],f=s.xaxis,v=s.yaxis,s.bg&&void 0!==f._offset&&void 0!==v._offset&&s.bg.call(c.setRect,f._offset-y,v._offset-y,f._length+2*y,v._length+2*y).call(u.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(i in g._plots){s=g._plots[i],f=s.xaxis,v=s.yaxis;var X,Z,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:f._length,height:v._length}),c.setTranslate(s.plot,f._offset,v._offset),s._hasClipOnAxisFalse?(X=null,Z=J):(X=J,Z=null),c.setClipUrl(s.plot,X,t),s.layerClipId=Z}function Q(t){return"M"+D+","+t+"H"+I}function $(t){return"M"+f._offset+","+t+"h"+f._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],f=s.xaxis,v=s.yaxis;var nt="M0,0";w(f,i)&&(F=T(f,"left",v,x),D=f._offset-(F?y+F:0),B=T(f,"right",v,x),I=f._offset+f._length+(B?y+B:0),z=_(f,v,"bottom"),N=_(f,v,"top"),!(W=!f._anchorAxis||i!==f._mainSubplot)||"allticks"!==f.mirror&&"all"!==f.mirror||(f._linepositions[i]=[z,N]),nt=rt(f,Q,$),W&&f.showline&&("all"===f.mirror||"allticks"===f.mirror)&&(nt+=Q(z)+Q(N)),s.xlines.style("stroke-width",f._lw+"px").call(u.stroke,f.showline?f.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",nt);var it="M0,0";w(v,i)&&(Y=T(v,"bottom",f,x),j=v._offset+v._length+(Y?y:0),G=T(v,"top",f,x),U=v._offset-(G?y:0),H=_(v,f,"left"),V=_(v,f,"right"),!(W=!v._anchorAxis||i!==v._mainSubplot)||"allticks"!==v.mirror&&"all"!==v.mirror||(v._linepositions[i]=[H,V]),it=rt(v,tt,et),W&&v.showline&&("all"===v.mirror||"allticks"===v.mirror)&&(it+=tt(H)+tt(V)),s.ylines.style("stroke-width",v._lw+"px").call(u.stroke,v.showline?v.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",it)}return d.makeClipPaths(t),a.previousPromises(t)}function w(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||"all"===t.mirror||"allticks"===t.mirror)}function M(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(M(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&M(t,e,a))return a._lw}return 0}e.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,_],t)},e.drawMainTitle=function(t){var e,r=t._fullLayout.title,i=t._fullLayout,l=function(t){var e=t.title,r="middle";return o.isRightAnchor(e)?r="end":o.isLeftAnchor(e)&&(r=x),r}(i),u=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}(i),h=function(t,e){var r=t.title,n=t._size,i=0;return"0em"!==e&&e?e===p.CAP_SHIFT+"em"&&(i=r.pad.t):i=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.h*r.y+i:t.height-t.height*r.y+i}(i,u),d=function(t,e){var r=t.title,n=t._size,i=0;return e===x?i=r.pad.l:"end"===e&&(i=-r.pad.r),"paper"===r.xref?n.l+n.w*r.x+i:t.width*r.x+i}(i,l);if(f.draw(t,"gtitle",{propContainer:i,propName:"title.text",placeholder:i._dfltTitle.plot,attributes:{x:d,y:h,"text-anchor":l,dy:u}}),r.text&&r.automargin){var v=n.selectAll(".gtitle"),g=c.bBox(v.node()).height,m=function(t,e,r){var n=e.y,i=e.yanchor,a=n>.5?"t":"b",o=t._fullLayout.margin[a],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===t?("top"===r&&(a+=i),a+=n-e*n):("bottom"===r&&(a+=i),a+=e*n),a}(a,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>o?s:0}(t,r,g);if(m>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",u={x:s.x,y:s.y,t:0,b:0},c={};"paper"===s.yref&&function(t,e,r,n,i){var a="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=o.isTopAnchor(e)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(e)&&"t"===r||o.isBottomAnchor(e)&&"b"===r)&&l<i}(t,s,l,e,n)?u[l]=r:"container"===s.yref&&(c[l]=r,t._fullLayout._reservedMargin[i]=c),a.allowAutoMargin(t,i),a.autoMargin(t,i,u)}(t,h,m,g),v.attr({x:d,y:h,"text-anchor":l,dy:(e=r.yanchor,"top"===e?p.CAP_SHIFT+.3+"em":"bottom"===e?"-0.3em":p.MID_SHIFT+"em")}).call(s.positionText,d,h);var y=(r.text.match(s.BR_TAG_ALL)||[]).length;if(y){var b=p.LINE_SPACING*y+p.MID_SHIFT;0===r.y&&(b=-b),v.selectAll(".line").each((function(){var t=+this.getAttribute("dy").slice(0,-2)-b+"em";this.setAttribute("dy",t)}))}}}},e.doTraceStyle=function(t){var r,n=t.calcdata,o=[];for(r=0;r<n.length;r++){var s=n[r],u=s[0]||{},c=u.trace||{},f=c._module||{},h=f.arraysToCalcdata;h&&h(s,c);var d=f.editStyle;d&&o.push({fn:d,cd0:u})}if(o.length){for(r=0;r<o.length;r++){var p=o[r];p.fn(t,p.cd0)}l(t),e.redrawReglTraces(t)}return a.style(t),i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doColorBars=function(t){return i.getComponentMethod("colorbar","draw")(t),a.previousPromises(t)},e.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call("_doPlot",t,"",e)},e.doLegend=function(t){return i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doTicksRelayout=function(t){return d.draw(t,"redraw"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),l(t),e.redrawReglTraces(t)),e.drawMainTitle(t),a.previousPromises(t)},e.doModeBar=function(t){var e=t._fullLayout;h.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},e.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setViewport(i)}},e.drawData=function(t){var r=t._fullLayout;l(t);for(var n=r._basePlotModules,o=0;o<n.length;o++)n[o].plot(t);return e.redrawReglTraces(t),a.style(t),i.getComponentMethod("selections","draw")(t),i.getComponentMethod("shapes","draw")(t),i.getComponentMethod("annotations","draw")(t),i.getComponentMethod("images","draw")(t),r._replotting=!1,a.previousPromises(t)},e.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has("regl")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&0!==l._length&&("splom"===l.type?e._splomScenes[l.uid].draw():"scattergl"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},e.doAutoRangeAndConstraints=function(t){for(var e,r=d.list(t,"",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e._id]=1,m(t,e),y(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=d.getFromId(t,o);y(t,s,e.range),n[o]=1}}g(t)},e.finalDraw=function(t){i.getComponentMethod("rangeslider","draw")(t),i.getComponentMethod("rangeselector","draw")(t)},e.drawMarginPushers=function(t){i.getComponentMethod("legend","draw")(t),i.getComponentMethod("rangeselector","draw")(t),i.getComponentMethod("sliders","draw")(t),i.getComponentMethod("updatemenus","draw")(t),i.getComponentMethod("colorbar","draw")(t)}},4828:function(t,e,r){"use strict";var n=r(3400),i=n.isPlainObject,a=r(3060),o=r(7316),s=r(5464),l=r(1780),u=r(556).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 d in e){var p=f(d);d===p||p!==u||d in t||s(h,e[d],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],d=v(t,u,a),p=v(t,u,o),g=r(p);if(!g){var m=f(u);m!==u&&(g=r(p=v(t,m,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,d,p);else if(g._isLinkedToArray&&Array.isArray(c))for(var y=!1,x=0,b={},_=0;_<c.length;_++){var w=c[_];if(i(w)){var M=w.name;if(M)b[M]||(h(w,e,r,v(c,x,d),v(c,x,p)),x++,b[M]=1);else if(!y){var T=v(t,l.arrayDefaultKey(u),a),A=v(c,x,d);h(w,e,r,A,v(c,x,p));var k=n.nestedProperty(e,A);n.nestedProperty(e,T).set(k.get()),k.set(null),y=!0}}}else n.nestedProperty(e,d).set(c)}}function d(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}function p(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 m(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":e=t.path?"There are no templates for item "+t.path+" with name "+t.templateitemname:"There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":e=t.path?"The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?"Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":"The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type."}return t.msg=e,t}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,p.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,d.bind(null,r)),delete a.layout.template;var l=r.template;if(i(l)){var f,v,g,m,y,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=(y=a.data[v]).length,m=g.length,f=0;f<x;f++)c(g[f%m],y[f]);for(f=x;f<m;f++)y.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,d=r._fullData,p={};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++)p[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);p[a]?t(e[n],a):c.push({code:"unused",path:a})}}(s,"layout")):c.push({code:"layout"}),i(l)){for(var y,x={},b=0;b<d.length;b++){var _=d[b];x[y=_.type]=(x[y]||0)+1,_._fullInput._template||c.push({code:"missing",index:_._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,M=x[y]||0;w>M?c.push({code:"unused",traceType:y,templateCount:w,dataCount:M}):M>w&&c.push({code:"reused",traceType:y,templateCount:w,dataCount:M})}}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:d,layout:h},""),c.length)return c.map(m)}},7024:function(t,e,r){"use strict";var n=r(8248),i=r(6424),a=r(7316),o=r(3400),s=r(7030),l=r(7164),u=r(3268),c=r(5788).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,d,p;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||{},d=t.config||{},p={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),d=t._context,p=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 m(t,r){return o.coerce(e,g,f,t,r)}var y=m("format"),x=m("width"),b=m("height"),_=m("scale"),w=m("setBackground"),M=m("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(p.width)&&(A.width=p.width),b?A.height=b:null===e.height&&n(p.height)&&(A.height=p.height);var k=o.extendFlat({},d,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=s.getRedrawFunc(T);function S(){return new Promise((function(t){setTimeout(t,s.getDelay(T._fullLayout))}))}function E(){return new Promise((function(t,e){var r=l(T,y,_),n=T._fullLayout.width,f=T._fullLayout.height;function h(){i.purge(T),document.body.removeChild(T)}if("full-json"===y){var d=a.graphJson(T,!1,"keepdata","object",!0,!0);return d.version=c,d=JSON.stringify(d),h(),t(M?d:s.encodeJSON(d))}if(h(),"svg"===y)return t(M?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),u({format:y,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(T,r,A,k).then(L).then(S).then(E).then((function(e){t(function(t){return M?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},1480:function(t,e,r){"use strict";var n=r(3400),i=r(7316),a=r(3060),o=r(556).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var g=f[h];if("transforms"!==g){var m=o.slice();m.push(g);var y=t[g],x=e[g],b=v(r,g),_=(b||{}).valType,w="info_array"===_,M="colorscale"===_,T=(b||{}).items;if(p(r,g))if(s(y)&&s(x)&&"any"!==_)c(y,x,b,i,a,m);else if(w&&l(y)){y.length>x.length&&i.push(d("unused",a,m.concat(x.length)));var A,k,L,S,E,C=x.length,O=Array.isArray(T);if(O&&(C=Math.min(C,T.length)),2===b.dimensions)for(k=0;k<C;k++)if(l(y[k])){y[k].length>x[k].length&&i.push(d("unused",a,m.concat(k,x[k].length)));var R=x[k].length;for(A=0;A<(O?Math.min(R,T[k].length):R);A++)L=O?T[k][A]:T,S=y[k][A],E=x[k][A],n.validate(S,L)?E!==S&&E!==+S&&i.push(d("dynamic",a,m.concat(k,A),S,E)):i.push(d("value",a,m.concat(k,A),S))}else i.push(d("array",a,m.concat(k),y[k]));else for(k=0;k<C;k++)L=O?T[k]:T,S=y[k],E=x[k],n.validate(S,L)?E!==S&&E!==+S&&i.push(d("dynamic",a,m.concat(k),S,E)):i.push(d("value",a,m.concat(k),S))}else if(b.items&&!w&&l(y)){var P,D,I=T[Object.keys(T)[0]],z=[];for(P=0;P<x.length;P++){var N=x[P]._index||P;if((D=m.slice()).push(N),s(y[N])&&s(x[P])){z.push(N);var F=y[N],B=x[P];s(F)&&!1!==F.visible&&!1===B.visible?i.push(d("invisible",a,D)):c(F,B,I,i,a,D)}}for(P=0;P<y.length;P++)(D=m.slice()).push(P),s(y[P])?-1===z.indexOf(P)&&i.push(d("unused",a,D)):i.push(d("object",a,D,y[P]))}else!s(y)&&s(x)?i.push(d("object",a,m,y)):u(y)||!u(x)||w||M?g in e?n.validate(y,b)?"enumerated"===b.valType&&(b.coerceNumber&&y!==+x||y!==x)&&i.push(d("dynamic",a,m,y,x)):i.push(d("value",a,m,y)):i.push(d("unused",a,m,y)):i.push(d("array",a,m,y));else i.push(d("schema",a,m))}}return i}t.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,u,f=a.get(),h=[],p={_context:n.extendFlat({},o)};l(t)?(p.data=n.extendDeep([],t),r=t):(p.data=[],r=[],h.push(d("array","data"))),s(e)?(p.layout=n.extendDeep({},e),u=e):(p.layout={},u={},arguments.length>1&&h.push(d("object","layout"))),i.supplyDefaults(p);for(var v=p._fullData,g=r.length,m=0;m<g;m++){var y=r[m],x=["data",m];if(s(y)){var b=v[m],_=b.type,w=f.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==y.visible&&h.push(d("invisible",x)),c(y,b,w,h,x);var M=y.transforms,T=b.transforms;if(M){l(M)||h.push(d("array",x,["transforms"])),x.push("transforms");for(var A=0;A<M.length;A++){var k=["transforms",A],L=M[A].type;if(s(M[A])){var S=f.transforms[L]?f.transforms[L].attributes:{};S.type={valType:"enumerated",values:Object.keys(f.transforms)},c(M[A],T[A],S,h,x,k)}else h.push(d("object",x,k))}}}else h.push(d("object",x))}var E=p._fullLayout,C=function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(f,v);return c(u,E,C,h,"layout"),0===h.length?void 0:h};var f={object:function(t,e){return("layout"===t&&""===e?"The layout argument":"data"===t[0]&&""===e?"Trace "+t[1]+" in the data argument":h(t)+"key "+e)+" must be linked to an object container"},array:function(t,e){return("data"===t?"The data argument":h(t)+"key "+e)+" must be linked to an array container"},schema:function(t,e){return h(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var n=s(r)?"container":"key";return h(t)+n+" "+e+" did not get coerced"},dynamic:function(t,e,r,n){return[h(t)+"key",e,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?h(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[h(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function h(t){return l(t)?"In data trace "+t[1]+", ":"In "+t+", "}function 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=f[t](e,u,i,a);return n.log(c),{code:t,container:o,trace:s,path:r,astr:u,msg:c}}function p(t,e){var r=m(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function v(t,e){return e in t?t[e]:t[m(e).keyMinusId]}var g=n.counterRegex("([a-z]+)");function m(t){var e=t.match(g);return{keyMinusId:e&&e[1],id:e&&e[2]}}},5656: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"}}}},1272:function(t,e,r){"use strict";var n=r(3400),i=r(1780);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 d=c[a];n.isPlainObject(d)?o=h.newItem(d):(o=h.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(d,o,e,r),f.push(o)}var p=h.defaultItems();for(a=0;a<p.length;a++)(o=p[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}},5464:function(t,e,r){"use strict";var n=r(5376),i=r(5756);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},1220:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=i.dateTime2ms,o=i.incrementMonth,s=r(9032).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,d="start"===l,p="end"===l,v=t[r+"period0"],g=a(v,h)||0,m=[],y=[],x=[],b=i.length,_=0;_<b;_++){var w,M,T,A=i[_];if(u){for(w=Math.round((A-g)/(u*s)),T=o(g,u*w,h);T>A;)T=o(T,-u,h);for(;T<=A;)T=o(T,u,h);M=o(T,-u,h)}else{for(T=g+(w=Math.round((A-g)/c))*c;T>A;)T-=c;for(;T<=A;)T+=c;M=T-c}m[_]=d?M:p?T:(M+T)/2,y[_]=M,x[_]=T}return{vals:m,starts:y,ends:x}}},6720:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},9280:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3400),o=r(9032).FP_SAFE,s=r(4040),l=r(3616),u=r(9811),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=p(o,e,0),l=p(o,e,1),u=g(t,e),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=c[0].val,v=f[0].val;for(r=1;r<c.length&&h===v;r++)h=Math.min(h,c[r].val);for(r=1;r<f.length&&h===v;r++)v=Math.max(v,f[r].val);var m=e.autorange,y="reversed"===m||"min reversed"===m||"max reversed"===m;if(!y&&e.range){var x=a.simpleMap(e.range,e.r2l);y=x[1]<x[0]}"reversed"===e.autorange&&(e.autorange=!0);var b,_,w,M,A,k,L=e.rangemode,S="tozero"===L,E="nonnegative"===L,C=e._length,O=C/10,R=0;for(r=0;r<c.length;r++)for(b=c[r],n=0;n<f.length;n++)(k=(_=f[n]).val-b.val-d(e,b.val,_.val))>0&&((A=C-s(b)-l(_))>O?k/A>R&&(w=b,M=_,R=k/A):k/C>R&&(w={val:b.val,nopad:1},M={val:_.val,nopad:1},R=k/C));if(h===v){var P=h-1,D=h+1;if(S)if(0===h)i=[0,1];else{var I=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,I/C));i=h>0?[0,z]:[z,0]}else i=E?[Math.max(0,P),Math.max(1,D)]:[P,D]}else S?(w.val>=0&&(w={val:0,nopad:1}),M.val<=0&&(M={val:0,nopad:1})):E&&(w.val-R*s(w)<0&&(w={val:0,nopad:1}),M.val<=0&&(M={val:1,nopad:1})),R=(M.val-w.val-d(e,b.val,_.val))/(C-s(w)-l(M)),i=[w.val-R*s(w),M.val+R*l(M)];return i=T(i,e),e.limitRange&&e.limitRange(),y&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function d(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 p(t,e,r){var i=.05*e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var s=e.isReversed();if(!s){var u=a.simpleMap(e.range,e.r2l);s=u[1]<u[0]}s&&(r=!r)}var c=0;return f(t,e._id)||(c=function(t,e,r){var i=0,o="x"===e._id.charAt(0);for(var s in t._plots){var u=t._plots[s];if(e._id===u.xaxis._id||e._id===u.yaxis._id){var c=(o?u.yaxis:u.xaxis)||{};if(-1!==(c.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===c.side||"bottom"===c.side)||r&&("top"===c.side||"right"===c.side))){if(c._vals){var f=a.deg2rad(c._tickAngles[c._id+"tick"]||0),h=Math.abs(Math.cos(f)),d=Math.abs(Math.sin(f));if(!c._vals[0].bb){var p=c._id+"tick";c._selections[p].each((function(t){var e=n.select(this);e.select(".text-math-group").empty()&&(t.bb=l.bBox(e.node()))}))}for(var g=0;g<c._vals.length;g++){var m=c._vals[g].bb;if(m){var y=2*v+m.width,x=2*v+m.height;i=Math.max(i,o?Math.max(y*h,x*d):Math.max(x*h,y*d))}}}"inside"===c.ticks&&"inside"===c.ticklabelposition&&(i+=c.ticklen||0)}}}return i}(t,e,r)),i=Math.max(c,i),"domain"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:c)}}t.exports={applyAutorangeOptions:T,getAutoRange:h,makePadFn:p,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,d,p=[],v=[],g=e.length,x=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,M=!1,T=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return M=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var k=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),L=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=A(r.vpadplus||r.vpad),E=A(r.vpadminus||r.vpad);if(!M){if(h=1/0,d=-1/0,w)for(n=0;n<g;n++)(a=e[n])<h&&a>0&&(h=a),a>d&&a<o&&(d=a);else for(n=0;n<g;n++)(a=e[n])<h&&a>-o&&(h=a),a>d&&a<o&&(d=a);e=[h,d],g=2}var C={tozero:_,extrapad:x};function O(r){s=e[r],i(s)&&(c=k(r),f=L(r),T?(l=t.c2l(s)-E(r),u=t.c2l(s)+S(r)):(h=s-E(r),d=s+S(r),w&&h<d/10&&(h=d/10),l=t.c2l(h),u=t.c2l(d)),_&&(l=Math.min(0,l),u=Math.max(0,u)),b(l)&&m(p,l,f,C),b(u)&&y(v,u,c,C))}var R=Math.min(6,g);for(n=0;n<R;n++)O(n);for(n=g-1;n>=R;n--)O(n);return{min:p,max:v,opts:r}},concatExtremes:g};var v=3;function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,u=[],f=[];function h(t,e){for(n=0;n<e.length;n++){var r=t[e[n]],s=(r._extremes||{})[o];if(!0===r.visible&&s){for(i=0;i<s.min.length;i++)a=s.min[i],m(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 d in e._matchGroup)if(d!==e._id){var p=c(t,d),v=g(t,p,!0),x=e._length/p._length;for(i=0;i<v.min.length;i++)a=v.min[i],m(u,a.val,a.pad*x,{extrapad:a.extrapad});for(i=0;i<v.max.length;i++)a=v.max[i],y(f,a.val,a.pad*x,{extrapad:a.extrapad})}return{min:u,max:f}}function m(t,e,r,n){x(t,e,r,n,_)}function y(t,e,r,n){x(t,e,r,n,w)}function x(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function b(t){return i(t)&&Math.abs(t)<o}function _(t,e){return t<=e}function w(t,e){return t>=e}function M(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<t.d2l(r)}function T(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],n=t[1],i=e.autorangeoptions.include;if(void 0!==i){var o=e.d2l(r),s=e.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var u=e.d2l(i[l]);o>=u&&(o=u,r=u),s<=u&&(s=u,n=u)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&M(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&M(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&M(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&M(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},6808:function(t){"use strict";t.exports=function(t,e,r){var n,i;if(r){var a="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[a?1:0],i=r[a?0:1]}var o=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},4460:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(7316),o=r(4040),s=r(3400),l=s.strTranslate,u=r(2736),c=r(1668),f=r(6308),h=r(3616),d=r(4724),p=r(8728),v=r(9032),g=v.ONEMAXYEAR,m=v.ONEAVGYEAR,y=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,M=v.ONEAVGMONTH,T=v.ONEMINMONTH,A=v.ONEWEEK,k=v.ONEDAY,L=k/2,S=v.ONEHOUR,E=v.ONEMIN,C=v.ONESEC,O=v.MINUS_SIGN,R=v.BADNUM,P={K:"zeroline"},D={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},N={K:"tick",L:"text"},F={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},B=r(4284),j=B.MID_SHIFT,U=B.CAP_SHIFT,H=B.LINE_SPACING,V=B.OPPOSITE_SIDE,Y=t.exports={};Y.setConvert=r(8344);var G=r(2976),W=r(9811),q=W.idSort,X=W.isLinked;Y.id2name=W.id2name,Y.name2id=W.name2id,Y.cleanId=W.cleanId,Y.list=W.list,Y.listIds=W.listIds,Y.getFromId=W.getFromId,Y.getFromTrace=W.getFromTrace;var Z=r(9280);Y.getAutoRange=Z.getAutoRange,Y.findExtremes=Z.findExtremes;var J=1e-4;function K(t){var e=(t[1]-t[0])*J;return[t[0]-e,t[1]+e]}Y.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)},Y.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},Y.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==Y.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=Y.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},Y.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:Y.getFromId(e,r).cleanPos)(t)},Y.redrawComponents=function(t,e){e=e||Y.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[Y.id2name(e[c])][a],h=0;h<f.length;h++){var d=f[h];if(!u[d]&&(l(t,d),u[d]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var Q=Y.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(s.isArrayOrTypedArray(a)){if(i={type:G(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Y.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=Y.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===a?{d2c:tt,c2d:tt}:{d2c:$,c2d:$}};function $(t){return+t}function tt(t){return String(t)}function et(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function rt(t,e){return Math.abs(t/e-1)<.001}function nt(t){return+t.substring(1)}function it(t,e){return t.rangebreaks&&(e=e.filter((function(e){return t.maskBreaks(e.x)!==R}))),e}function at(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=Y.tickText(t,a);e._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return it(t,r)}function ot(t,e){var r=K(s.simpleMap(t.range,t.r2l)),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if((void 0===e||!(e&&l||!1===e&&!l))&&(!l||t.minor)){var u=l?t.minor.tickvals:t.tickvals,c=l?[]:t.ticktext;if(u){s.isArrayOrTypedArray(c)||(c=[]);for(var f=0;f<u.length;f++){var h=a(u[f]);if(h>n&&h<i){var d=Y.tickText(t,h,!1,String(c[f]));l&&(d.minor=!0,d.text=""),o.push(d)}}}}return it(t,o)}Y.getDataToCoordFunc=function(t,e,r,n){return Q(t,e,r,n).d2c},Y.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},Y.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},Y.saveRangeInitial=function(t,e){for(var r=Y.list(t,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial0&&void 0===a._rangeInitial1,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&!0!==l||e&&s)&&(a._rangeInitial0="min"===l||"max reversed"===l?void 0:a.range[0],a._rangeInitial1="max"===l||"min reversed"===l?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n},Y.saveShowSpikeInitial=function(t,e){for(var r=Y.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},Y.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},Y.setConvert(l),o=o&&p.dtick(o,l.type))l.dtick=o,l.tick0=p.tick0(void 0,l.type,a);else{var f;if(r)f=(c-u)/r;else{var h=s.distinctVals(t),d=Math.pow(10,Math.floor(Math.log(h.minDiff)/Math.LN10)),v=d*s.roundUp(h.minDiff/d,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(f)||(f=1)}Y.autoTicks(l,f)}var g,m=l.dtick,y=Y.tickIncrement(Y.tickFirst(l),m,"reverse",a);if("number"==typeof m)y=function(t,e,r,n,a){var o=0,s=0,l=0,u=0;function c(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||u++,c(e[f])&&o++,c(e[f]+r.dtick/2)&&s++;var h=e.length-u;if(l===h&&"date"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||c(n)||c(a))){var d=r.dtick/2;t+=t+d<n?d:-d}return t}(y,t,l,u,c),g=y+(1+Math.floor((c-y)/m))*m;else for("M"===l.dtick.charAt(0)&&(y=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=Y.tickIncrement(t,"M6","reverse")+1.5*k:a.exactMonths>.8?t=Y.tickIncrement(t,"M1","reverse")+15.5*k:t-=L;var l=Y.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,m,u,a)),g=y;g<=c;)g=Y.tickIncrement(g,m,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(g,0,a),size:m,_dataSpan:c-u}},Y.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=Y.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,Y.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?et(f,h)?f===2*A&&h===2*k&&(t.dtick=A):f===2*A&&h===3*k?t.dtick=A:f!==A||(e._input.minor||{}).nticks?rt(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=k:"M"===String(e.dtick).charAt(0)?c?t.dtick="M1":et(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)?et(f,h)||(t.dtick=rt(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)},Y.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,Y.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=Y.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%p/.test(a)?(e=L,o&&!n&&t.dtick<L&&(t.dtick=L)):/%[Aadejuwx]/.test(a)?(e=k,o&&!n&&t.dtick<k&&(t.dtick=k)):/%[UVW]/.test(a)?(e=A,o&&!n&&t.dtick<A&&(t.dtick=A)):/%[Bbm]/.test(a)?(e=M,o&&(n?nt(t.dtick)<1:t.dtick<T)&&(t.dtick="M1")):/%[q]/.test(a)?(e=b,o&&(n?nt(t.dtick)<3:t.dtick<_)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=m,o&&(n?nt(t.dtick)<12:t.dtick<y)&&(t.dtick="M12")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),vt(t)},Y.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]),d=Math.max(c[0],c[1]),p=Math.max(1e3,t._length||0),v=[],E=[],C=[],O=[],P=t.minor&&(t.minor.ticks||t.minor.showgrid),D=1;D>=(P?0:1);D--){var I=!D;D?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var z=D?t:s.extendFlat({},t,t.minor);if(I?Y.prepMinorTicks(z,t,e):Y.prepTicks(z,e),"array"!==z.tickmode)if("sync"!==z.tickmode){var N=K(c),F=N[0],B=N[1],j=i(z.dtick),U="log"===a&&!(j||"L"===z.dtick.charAt(0)),H=Y.tickFirst(z,e);if(D){if(t._tmin=H,H<F!==f)break;"category"!==a&&"multicategory"!==a||(B=f?Math.max(-.5,B):Math.min(t._categories.length-.5,B))}var V,G,W=null,q=H;D&&(j?G=t.dtick:"date"===a?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(G=M*t.dtick.substring(1)):G=t._roughDTick,V=Math.round((t.r2l(q)-t.r2l(t.tick0))/G)-1);var X=z.dtick;for(z.rangebreaks&&z._tick0Init!==z.tick0&&(q=It(q,t),f||(q=Y.tickIncrement(q,X,!f,o))),D&&u&&(q=Y.tickIncrement(q,X,!f,o),V--);f?q>=B:q<=B;q=Y.tickIncrement(q,X,f,o)){if(D&&V++,z.rangebreaks&&!f){if(q<F)continue;if(z.maskBreaks(q)===R&&It(q,z)>=d)break}if(C.length>p||q===W)break;W=q;var Z={value:q};D?(U&&q!==(0|q)&&(Z.simpleLabel=!0),l>1&&V%l&&(Z.skipLabel=!0),C.push(Z)):(Z.minor=!0,O.push(Z))}}else C=[],v=at(t);else D?(C=[],v=ot(t,!I)):(O=[],E=ot(t,!I))}if(P&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var J=C.map((function(t){return t.value})),Q=[],$=0;$<O.length;$++){var tt=O[$],et=tt.value;if(-1===J.indexOf(et)){for(var rt=!1,nt=0;!rt&&nt<C.length;nt++)1e7+C[nt].value===1e7+et&&(rt=!0);rt||Q.push(tt)}}O=Q}if(u&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),f=r||c,h=0;f>=y?h=c>=y&&c<=g?c:m:r===b&&f>=_?h=c>=_&&c<=x?c:b:f>=T?h=c>=T&&c<=w?c:M:r===A&&f>=A?h=A:f>=k?h=k:r===L&&f>=L?h=L:r===S&&f>=S&&(h=S),h>=c&&(h=c,s=!0);var d=i+h;if(e.rangebreaks&&h>0){for(var p=0,v=0;v<84;v++){var E=(v+.5)/84;e.maskBreaks(i*(1-E)+E*d)!==R&&p++}(h*=p/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 it="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=It(C[r].value,t);var ut=t.c2p(C[r].value);(it?lt>ut-st:lt<ut+st)?C.splice(f?r+1:r,1):lt=ut}}Dt(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(O),r=0;r<C.length;r++){var dt=C[r].minor,pt=C[r].value;dt?E.push({x:pt,minor:!0}):(n=t._prevDateHead,ct=Y.tickText(t,pt,!1,C[r].simpleLabel),void 0!==(ft=C[r].periodX)&&(ct.periodX=ft,(ft>d||ft<h)&&(ft>d&&(ct.periodX=d),ft<h&&(ct.periodX=h),ht(ct))),C[r].skipLabel&&ht(ct),v.push(ct))}return v=v.concat(E),t._inCalcTicks=!1,u&&v.length&&(v[0].noTick=!0),v};var st=[2,5,10],lt=[1,2,3,6,12],ut=[1,2,5,10,15,30],ct=[1,2,3,7,14],ft=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],ht=[-.301,0,.301,.699,1],dt=[15,30,45,90,180];function pt(t,e,r){return e*s.roundUp(t/e,r)}function vt(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>=k&&a<=10||e>=15*k)t._tickround="d";else if(e>=E&&a<=16||e>=S)t._tickround="M";else if(e>=C&&a<=19||e>=E)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)&&!xt(u)?t._tickexponent=3*Math.round((u-1)/3):t._tickexponent=u)}else t._tickround=null}function gt(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}}Y.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>m)e/=m,n=a(10),t.dtick="M"+12*pt(e,n,st);else if(o>M)e/=M,t.dtick="M"+pt(e,1,lt);else if(o>k){if(t.dtick=pt(e,k,t._hasDayOfWeekBreaks?[1,2,7,14]:ct),!r){var l=Y.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>S?t.dtick=pt(e,S,lt):o>E?t.dtick=pt(e,E,ut):o>C?t.dtick=pt(e,C,ut):(n=a(10),t.dtick=pt(e,n,st))}else if("log"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),t.dtick="L"+pt(e,n,st)}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))):Dt(t)?(t.tick0=0,n=1,t.dtick=pt(e,n,dt)):(t.tick0=0,n=a(10),t.dtick=pt(e,n,st));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)}},Y.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),u=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,u,a);if("L"===l)return Math.log(Math.pow(10,t)+u)/Math.LN10;if("D"===l){var c="D2"===e?ht:ft,f=t+.01*o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},Y.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,u=K(a)[0],c=t.dtick,f=r(t.tick0);if(i(c)){var h=l((u-f)/c)*c+f;return"category"!==t.type&&"multicategory"!==t.type||(h=s.constrain(h,0,t._categories.length-1)),h}var d=c.charAt(0),p=Number(c.substr(1));if("M"===d){for(var v,g,m,y=0,x=f;y<10;){if(((v=Y.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),m=d+(Math.abs(Math.round(g))||1)*p,x=Y.tickIncrement(x,m,g<0?!o:o,t.calendar),y++}return s.error("tickFirst did not converge",t),x}if("L"===d)return Math.log(l((Math.pow(10,u)-f)/p)*p+f)/Math.LN10;if("D"===d){var b="D2"===c?ht:ft,_=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)},Y.tickText=function(t,e,r,n){var a,o=gt(t,e),l="array"===t.tickmode,u=r||l,c=t.type,f="category"===c?t.d2l_noadd:t.d2l,h=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var d=s.simpleMap(t.range,t.r2l),p=(Math.abs(d[1]-d[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.xbnd=[h(o.x-.5),h(o.x+t.dtick-.5)],o}function v(n){if(void 0===n)return!0;if(r)return"none"===n;var i={first:t._tmin,last:t._tmax}[n];return"all"!==n&&e!==i}var g=r?"never":"none"!==t.exponentformat&&v(t.showexponent)?"hide":"";if("date"===c?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||Y.getTickFormat(t);(n=!o&&n)&&(a=i(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var l,u=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),c=u.indexOf("\n");if(-1!==c&&(l=u.substr(c+1),u=u.substr(0,c)),n&&(void 0===l||"00:00:00"!==u&&"00:00"!==u?8===u.length&&(u=u.replace(/:00$/,"")):(u=l,l="")),l)if(r)"d"===a?u+=", "+l:u=l+(u?", "+u:"");else if(t._inCalcTicks&&t._prevDateHead===l){var f=zt(t),h=t._trueSide||t.side;(!f&&"top"===h||f&&"bottom"===h)&&(u+="<br> ")}else t._prevDateHead=l,u+="<br>"+l;e.text=u}(t,o,r,u):"log"===c?function(t,e,r,n,a){var o=t.dtick,l=e.x,u=t.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)e.text=bt(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),d=t.exponentformat;"power"===d||yt(d)&&xt(f)?(e.text=0===f?1:1===f?"10":"10<sup>"+(f>1?"":O)+h+"</sup>",e.fontSize*=1.25):("e"===d||"E"===d)&&h>2?e.text="1"+d+(f>0?"+":O)+h:(e.text=bt(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 p=String(e.text).charAt(0);"0"!==p&&"1"!==p||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,u,g):"category"===c?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===c?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):Dt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=bt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=bt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["<sup>",o[0],"</sup>","","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=O+e.text)}}}}(t,o,r,u,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=bt(e.x,t,i,n)}(t,o,0,u,g),n||(t.tickprefix&&!v(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!v(t.showticksuffix)&&(o.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(o.text)){var m=t.labelalias[o.text];"string"==typeof m&&(o.text=m)}return("boundaries"===t.tickson||t.showdividers)&&(o.xbnd=[h(o.x-.5),h(o.x+t.dtick-.5)]),o},Y.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return Y.hoverLabelText(t,n,r)+" - "+Y.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=Y.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":O+o:o};var mt=["f","p","n","μ","m","","k","M","G","T"];function yt(t){return"SI"===t||"B"===t}function xt(t){return t>14||t<-15}function bt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",u=e._tickexponent,c=Y.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]};vt(h),o=(Number(h._tickround)||0)+4,u=h._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,O);var d,p=Math.pow(10,-o)/2;if("none"===l&&(u=0),(t=Math.abs(t))<p)t="0",a=!1;else{if(t+=p,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)&&xt(u)&&(l="power"),d=u<0?O+-u:"power"!==l?"+"+u:String(u),"e"===l||"E"===l?t+=l+d:"power"===l?t+="×10<sup>"+d+"</sup>":"B"===l&&9===u?t+="B":yt(l)&&(t+=mt[u/3+5])),a?O+t:t}function _t(t,e){if(t){var r=Object.keys(F).reduce((function(t,r){return-1!==e.indexOf(r)&&F[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 wt(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(gt(t,s.interp(n[o],.5),o));return r}function Mt(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 At(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(U+r*H):e*U:r?e*(r+1)*H:e}function kt(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Lt(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function St(t){return t._id+".automargin"}function Et(t){return St(t)+".mirror"}function Ct(t){return t._id+".rangeslider"}function Ot(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Rt(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(Y.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(Y.getFromId(t,r[n]));var u=Object.keys(d),c=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(n=0;n<u.length;n++){var h=u[n],p=a[0][h],v=o[0][h],g=!0,m=!1,y=!1;if("_"!==h.charAt(0)&&"function"!=typeof p&&-1===c.indexOf(h)){for(i=1;i<a.length&&g;i++){var x=a[i][h];"type"===h&&-1!==f.indexOf(p)&&-1!==f.indexOf(x)&&p!==x?m=!0:x!==p&&(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?y=!0:o[i][h]!==v&&(g=!1)}g&&(m&&(l[a[0]._name].type="linear"),y&&(l[o[0]._name].type="linear"),Pt(l,h,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var _=t._fullLayout.annotations[n];-1!==e.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&s.swapAttrs(l.annotations[n],["?"])}}function Pt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),u=o(t[n[0]._name],e).get();for("title"===e&&(l&&l.text===i.x&&(l.text=i.y),u&&u.text===i.y&&(u.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+"."+e).set(u);for(a=0;a<n.length;a++)o(t,n[a]._name+"."+e).set(l)}function Dt(t){return"angularaxis"===t._id}function It(t,e){for(var r=e._rangebreaks.length,n=0;n<r;n++){var i=e._rangebreaks[n];if(t>=i.min&&t<i.max)return i.max}return t}function zt(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Nt(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}Y.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return"string"!=typeof t?t:Number(t.replace("M",""))*M}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,o=void 0,void 0,void 0,o=u||function(t){return t},s=(a=n.dtickrange)[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},Y.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?Y.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},Y.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},Y.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=Y.list(t,"x",!0),l=Y.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})}))}},Y.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:Y.listIds(t),a=Y.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=Y.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=Y.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=Y.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}}})))},Y.drawOne=function(t,e,r){var n,i,l,u=(r=r||{}).axShifts||{},d=r.overlayingShiftedAx||[];e.setScale();var p=t._fullLayout,v=e._id,g=v.charAt(0),m=Y.counterLetter(v),y=p._plots[e._mainSubplot];if(y){if(e._shiftPusher=e.autoshift||-1!==d.indexOf(e._id)||-1!==d.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=y[g+"axislayer"],_=e._mainLinePosition,w=_+=e._shift,M=e._mainMirrorPosition,T=e._vals=Y.calcTicks(e),A=[e.mirror,w,M].join("_");for(n=0;n<T.length;n++)T[n].axInfo=A;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var k={};if(e.visible){var L,S,E=Y.makeTransTickFn(e),C=Y.makeTransTickLabelFn(e),O="inside"===e.ticks,R="outside"===e.ticks;if("boundaries"===e.tickson){var P=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,T);S=Y.clipEnds(e,P),L=O?S:P}else S=Y.clipEnds(e,T),L=O&&"period"!==e.ticklabelmode?S:T;var D,I=e._gridVals=S,z=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,T);if(!p._hasOnlyLargeSploms){var N=e._subplotsWith,F={};for(n=0;n<N.length;n++){i=N[n];var B=(l=p._plots[i])[m+"axis"],j=B._mainAxis._id;if(!F[j]){F[j]=1;var U="x"===g?"M0,"+B._offset+"v"+B._length:"M"+B._offset+",0h"+B._length;Y.drawGrid(t,e,{vals:I,counterAxis:B,layer:l.gridlayer.select("."+v),minorLayer:l.minorGridlayer.select("."+v),path:U,transFn:E}),Y.drawZeroLine(t,e,{counterAxis:B,layer:l.zerolinelayer,path:U,transFn:E})}}}var G=Y.getTickSigns(e),W=Y.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var q,X,Z,J,K=Y.makeTickPath(e,w,G[2]),Q=Y.makeTickPath(e,w,W[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(q=Y.makeTickPath(e,M,G[3]),X=Y.makeTickPath(e,M,W[3],{minor:!0}),Z=K+q,J=Q+X):(q="",X="",Z=K,J=Q),e.showdividers&&R&&"boundaries"===e.tickson){var $={};for(n=0;n<z.length;n++)$[z[n].x]=1;D=function(t){return $[t.x]?q:Z}}else D=function(t){return t.minor?J:Z}}if(Y.drawTicks(t,e,{vals:L,layer:b,path:D,transFn:E}),"allticks"===e.mirror){var tt=Object.keys(e._linepositions||{});for(n=0;n<tt.length;n++){i=tt[n],l=p._plots[i];var et=e._linepositions[i]||[],rt=et[0],nt=et[1],it=et[2],at=Y.makeTickPath(e,rt,it?G[0]:W[0],{minor:it})+Y.makeTickPath(e,nt,it?G[1]:W[1],{minor:it});Y.drawTicks(t,e,{vals:L,layer:l[g+"axislayer"],path:at,transFn:E})}}var ot=[];if(ot.push((function(){return Y.drawLabels(t,e,{vals:T,layer:b,plotinfo:l,transFn:C,labelFns:Y.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.size*H:0);return Y.drawLabels(t,e,{vals:wt(e,T),layer:b,cls:v+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:E,labelFns:Y.makeLabelFns(e,w+n*G[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:z,layer:b,path:Y.makeTickPath(e,w,G[4],{len:e._depth}),transFn:E})}))}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+At(e);else{var s=zt(e);if("multicategory"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,"outside"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var u,f,d,p,v=Y.getPxPosition(t,e);if("x"===a?(f=e._offset+e._length/2,d="top"===e.side?v-r:v+r):(d=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(p={selection:g,side:e.side},g&&g.node()&&g.node().parentNode){var m=h.getTranslate(g.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}e.title.hasOwnProperty("standoff")&&(p.pad=0)}return e._titleStandoff=r,c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:p,transform:u,attributes:{x:f,y:d,"text-anchor":"middle"}})}(t,e)})),ot.push((function(){var r,n,i,s,l=e.side.charAt(0),u=V[e.side].charAt(0),c=Y.getPxPosition(t,e),f=R?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,d=0;if(e._shiftPusher&&(h=Math.max(f,r.height>0?"l"===l?c-r.left:r.right-c:0),e.title.text!==p._dfltTitle[g]&&(d=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(d+=At(e))),e._fullDepth=Math.max(h,d)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var v=[0,1],y="number"==typeof e._shift?e._shift:0;if("x"===g){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?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-y):(e._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=e._depth+y,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[m]="free"===e.anchor?e.position:e._anchorAxis.domain[v[0]],e.title.text!==p._dfltTitle[g]&&(n[l]+=At(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=f),!0===e.mirror||"ticks"===e.mirror?i[m]=e._anchorAxis.domain[v[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[m]=[e._counterDomainMin,e._counterDomainMax][v[1]]))}lt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(_t(n,e.automargin),_t(i,e.automargin)),a.autoMargin(t,St(e),n),a.autoMargin(t,Et(e),i),a.autoMargin(t,Ct(e),s)})),s.syncOrAsync(ot)}}function ut(t){var r=v+(t||"tick");return k[r]||(k[r]=function(t,e,r){var n,i,a,o;if(t._selections[e].size())n=1/0,i=-1/0,a=1/0,o=-1/0,t._selections[e].each((function(){var t=Lt(this),e=h.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),a=Math.min(a,e.left),o=Math.max(o,e.right)}));else{var s=Y.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(e,r,w)),k[r]}},Y.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},Y.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))}},Y.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=t.side,c=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=h*U,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h*(1-U)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[l?c:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(Mt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(Mt(e)))}},Y.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},Y.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,d=0,p=0,v=h?t.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(d+=v,r)){var g=s.deg2rad(r);d=v*Math.cos(g)+1,p=v*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(d+=.2*t.tickfont.size);var m,y,x,b,_,w={labelStandoff:d+=(t.linewidth||1)/2*(f?-1:1),labelShift:p},M=0,T=t.side,A=t._id.charAt(0),k=t.tickangle;if("x"===A)b=(_=!f&&"bottom"===T||f&&"top"===T)?1:-1,f&&(b*=-1),m=p*b,y=e+d*b,x=_?1:-.2,90===Math.abs(k)&&(f?x+=j:x=-90===k&&"bottom"===T?U:90===k&&"top"===T?j:.5,M=j/2*(k/90)),w.xFn=function(t){return t.dx+m+M*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===T||f&&"right"===T)?1:-1,f&&(b*=-1),m=d,y=p*b,x=0,f||90!==Math.abs(k)||(x=-90===k&&"left"===T||90===k&&"right"===T?U:.5),f){var L=i(k)?+k:0;if(0!==L){var S=s.deg2rad(L);M=Math.abs(Math.sin(S))*U*b,x=0}}w.xFn=function(t){return t.dx+e-(m+t.fontSize*x)*b+M*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},Y.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),Nt(e,[z]),o.attr("transform",r.transFn)},Y.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&&Y.shouldShowZeroLine(t,e,l))for(var u="array"===e.tickmode,c=0;c<s.length;c++){var d=s[c].x;if(u?!d:Math.abs(d)<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 p=a?h.crispRound(t,e.minor.gridwidth,1):0,v=r.layer,g=r.minorLayer,m=1;m>=0;m--){var y=m?v:g;if(y){var x=y.selectAll("path."+i).data(m?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?p:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Nt(e,[D,I])}},Y.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=Y.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 q(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,e.zerolinecolor||f.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Nt(e,[P])},Y.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=r.cls||o+"tick",f=r.vals.filter((function(t){return t.text})),d=r.labelFns,p=r.secondary?0:e.tickangle,v=(e._prevTickAngles||{})[c],g=r.layer.selectAll("g."+c).data(e.showticklabels?f:[],Tt),m=[];function y(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=H*t.fontSize,g=d.heightFn(t,i(a)?+a:0,(p-1)*v);if(g&&(f+=l(0,g)),s.empty()){var m=o.select("text");m.attr({transform:f,"text-anchor":c}),m.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var y=h.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(y,0))}}))}g.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,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(){y(r,p)}))):y(r,p)})),Nt(e,[N]),g.exit().remove(),r.repositionOnUpdate&&g.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),d=Math.max(l,u),p=e.side,v=1/0,m=-1/0;for(var y in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>d||a.left<f)&&(s=1):(a.bottom>d||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"===p||"right"===p?Math.min(v,o?a.top:a.left):-1/0,m="top"===p||"left"===p?Math.max(m,o?a.bottom:a.right):1/0)}})),a._plots){var x=a._plots[y];if(e._id===x.xaxis._id||e._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b["_visibleLabelMin_"+e._id]=v,b["_visibleLabelMax_"+e._id]=m)}}}},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||[P,I,D,z,N]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===P.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===I.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?Mt(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)}))}))}))}))},y(g,v+1?v:p);var x=null;e._selections&&(e._selections[c]=g);var b=[function(){return m.length&&Promise.all(m)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){y(g,v)}))):b.push((function(){if(y(g,p),f.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){x=e.autotickangles[0];var t,n=0,i=[],a=1;if(g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=Lt(this),s=h.bBox(o.node());a=Math.max(a,u.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})})),"boundaries"!==e.tickson&&!e.showdividers||r.secondary){var o=f.length,l=Math.abs((f[o-1].x-f[0].x)*e._m)/(o-1),c=e.ticklabelposition||"",d=function(t){return-1!==c.indexOf(t)},v=d("top"),m=d("left"),b=d("right"),_=d("bottom")||m||v||b?(e.tickwidth||0)+6:0,w=l,M=1.25*n*a,T=w/Math.sqrt(Math.pow(w,2)+Math.pow(M,2)),A=e.autotickangles.map((function(t){return t*Math.PI/180})),k=A.find((function(t){return Math.abs(Math.cos(t))<=T}));void 0===k&&(k=A.reduce((function(t,e){return Math.abs(Math.cos(t))<Math.abs(Math.cos(e))?t:e}),A[0]));var L=k*(180/Math.PI);for(t=0;t<i.length-1;t++)if(s.bBoxIntersect(i[t],i[t+1],_)){x=L;break}}else{var S=2;for(e.ticks&&(S+=e.tickwidth/2),t=0;t<i.length;t++){var E=f[t].xbnd,C=i[t];if(null!==E[0]&&C.left-e.l2p(E[0])<S||null!==E[1]&&e.l2p(E[1])-C.right<S){x=90;break}}}x&&y(g,x)}})),e._tickAngles&&b.push((function(){e._tickAngles[c]=null===x?i(p)?p:0:x}));var _=function(){var t=0,r=0;return g.each((function(n,i){var a,o=Lt(this);o.select(".text-math-group").empty()&&(e._vals[i]&&(a=e._vals[i].bb||h.bBox(o.node()),e._vals[i].bb=a),t=Math.max(t,a.width),r=Math.max(r,a.height))})),{labelsMaxW:t,labelsMaxH:r}},w=e._anchorAxis;if(w&&(w.autorange||w.insiderange)&&zt(e)&&!X(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),w.autorange&&(a._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,b.push(_)),w.insiderange)){var M=_(),T="y"===e._id.charAt(0)?M.labelsMaxW:M.labelsMaxH;T+=6,"inside"===e.ticklabelposition&&(T+=e.ticklen||0);var A="right"===e.side||"top"===e.side?1:-1,k=1===A?1:0,L=1===A?0:1,S=[];S[L]=w.range[L];var E=w.range,C=w.r2p(E[k]),O=w.r2p(E[L]),R=a._insideTickLabelsUpdaterange[w._name+".range"];if(R){var F=w.r2p(R[k]),B=w.r2p(R[L]),j=A*("y"===e._id.charAt(0)?1:-1);j*C<j*F&&(C=F,S[k]=E[k]=R[k]),j*O>j*B&&(O=B,S[L]=E[L]=R[L])}var U=Math.abs(O-C);U-T>0?T*=1+T/(U-=T):T=0,"y"!==e._id.charAt(0)&&(T=-T),S[k]=w.p2r(w.r2p(E[k])+A*T),"min"===w.autorange||"max reversed"===w.autorange?(S[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(S[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=S}var V=s.syncOrAsync(b);return V&&V.then&&t._promises.push(V),V},Y.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},Y.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)===R)&&(kt(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=Y.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 d(r);for(var c=Y.list(t,s),f=0;f<c.length;f++){var h=c[f];if(h._mainAxis===i&&d(h))return!0}}function d(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))},Y.clipEnds=function(t,e){return e.filter((function(e){return kt(t,e.x)}))},Y.allowAutoMargin=function(t){for(var e=Y.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,Ct(n))}},Y.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]],Ot(u.x,l.x),Ot(u.y,l.y);Ot(u.x,[o]),Ot(u.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Rt(t,r[n].x,r[n].y)}},2976:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(9032).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 d=[],p=0;p<i.length;p++)if(o(i[p]))for(var v=0;v<i[p].length;v++)d.push(i[p][v]);i=d}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)],d=String(h);l[d]||(l[d]=1,s(h,e)&&a++,n(h)&&o++)}return a>2*o}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},c=0;c<r;c+=n){var h=t[u(c)],d=String(h);if(!s[d]){s[d]=1;var p=typeof h;"boolean"===p?o++:(e?l(h)!==a:"number"===p)?i++:"string"===p&&o++}}return o>2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n<r;n++)if(c(t[n],e))return!0;return!1}(i,g)?"linear":"-"}},5955:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(3400),o=r(1780),s=r(1272),l=r(4724),u=r(6332),c=r(5404),f=r(5936),h=r(2568),d=r(4796),p=r(2136),v=r(6312),g=r(8344),m=r(3816).WEEKDAY_PATTERN,y=r(3816).HOUR_PATTERN;function x(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=_(o[s])){c=m;break}var f=i("pattern",c);if(f===m)for(s=0;s<2;s++)(u=_(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case m: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 d=i("values");if(!d||!d.length)return void(e.enabled=!1);i("dvalue")}}}t.exports=function(t,e,r,n,y){var b,_=n.letter,w=n.font||{},M=n.splomStash||{},T=r("visible",!n.visibleDflt),A=e._template||{},k=e.type||A.type||"-";"date"===k&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(b=r("ticklabelmode")));var L="";n.noTicklabelposition&&"multicategory"!==k||(L=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===b?["outside","inside"]:"x"===_?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==L.indexOf("inside")?"hide past domain":"category"===k||"multicategory"===k?"allow":"hide past div"),g(e,y),v(t,e,r,n),d(t,e,r,n),"category"===k||n.noHover||r("hoverformat");var S=r("color"),E=S!==l.color.dflt?S:w.color,C=M.label||y._dfltTitle[_];if(h(t,e,r,k,n),!T)return e;r("title.text",C),a.coerceFont(r,"title.font",{family:w.family,size:a.bigFont(w.size),color:E}),u(t,e,r,k);var O=n.hasMinor;if(O&&(o.newContainer(e,"minor"),u(t,e,r,k,{isMinor:!0})),f(t,e,r,k,n),c(t,e,r,n),O){var R=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=R}p(t,e,r,{dfltColor:S,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:O,attributes:l}),!O||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var P,D="multicategory"===k;if(n.noTickson||"category"!==k&&!D||!e.ticks&&!e.showgrid||(D&&(P="boundaries"),"boundaries"===r("tickson",P)&&delete e.ticklabelposition),D&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===k)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:x}),e.rangebreaks.length){for(var I=0;I<e.rangebreaks.length;I++)if(e.rangebreaks[I].pattern===m){e._hasDayOfWeekBreaks=!0;break}if(g(e,y),y._has("scattergl")||y._has("splom"))for(var z=0;z<n.data.length;z++){var N=n.data[z];"scattergl"!==N.type&&"splom"!==N.type||(N.visible=!1,a.warn(N.type+" traces do not work on axes with rangebreaks. Setting trace "+N.index+" to `visible: false`."))}}else delete e.rangebreaks;return e};var b={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(t){if("string"==typeof t)return b[t.substr(0,3).toLowerCase()]}},9736:function(t,e,r){"use strict";var n=r(6880),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return o(t,e)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?o:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},9811:function(t,e,r){"use strict";var n=r(4040),i=r(3816);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)}},4796:function(t,e,r){"use strict";var n=r(8116).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o=t.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=e.categoryorder="trace"),"trace"===u?e._initialCategories=[]:"array"===u?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,i).sort(),"category ascending"===u?e._initialCategories=l:"category descending"===u&&(e._initialCategories=l.reverse()))}}},8728:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(9032),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}},3816:function(t,e,r){"use strict";var n=r(3756).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"}}},1888:function(t,e,r){"use strict";var n=r(3400),i=r(9280),a=r(9811).id2name,o=r(4724),s=r(1160),l=r(8344),u=r(9032).ALMOST_EQUAL,c=r(4284).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]||{},m=e._id,y="x"===m.charAt(0);function x(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:y?["left","center","right"]:["bottom","middle","top"],dflt:y?"center":"middle"}},"constraintoward");var b,_,w=e.type,M=[];for(b=0;b<i.length;b++)(_=i[b])!==m&&s[a(_)].type===w&&M.push(_);var T=d(u,m);if(T){var A=[];for(b=0;b<M.length;b++)T[_=M[b]]||A.push(_);M=A}var k,L,S=M.length;S&&(t.matches||g.matches)&&(k=n.coerce(t,e,{matches:{valType:"enumerated",values:M,dflt:-1!==M.indexOf(g.matches)?g.matches:void 0}},"matches"));var E=l&&!y?e.anchor:void 0;if(S&&!k&&(t.scaleanchor||E)&&(L=n.coerce(t,e,{scaleanchor:{valType:"enumerated",values:M.concat([!1])}},"scaleanchor",E)),k){e._matchGroup=p(c,m,k,1);var C=s[a(k)],O=h(s,e)/h(s,C);y!==("x"===k.charAt(0))&&(O=(y?"x":"y")+O),p(u,m,k,O)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(L){var R=x("scaleratio");R||(R=e.scaleratio=1),p(u,m,L,R)}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 d(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function p(t,e,r,n){var i,a,o,s,l,u=d(t,e);null===u?((u={})[e]=1,l=t.length,t.push(u)):l=t.indexOf(u);var c=Object.keys(u);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)o[s=c[a]]=v(f,v(n,u[s]));return void t.splice(l,1)}if(1!==n)for(a=0;a<c.length;a++){var h=c[a];u[h]=v(n,u[h])}u[r]=1}function v(t,e){var r,n,i="",a="";"string"==typeof t&&(r=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(r)),"string"==typeof e&&(n=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(n));var o=t*e;return r||n?r&&n&&i.charAt(0)!==a.charAt(0)?r===n?o:(r>n?i.substr(n):a.substr(r))+o:i+a+t*e:o}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],l=t[s];if("string"==typeof l){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.substr(c);for(var f="y"===u.charAt(0)?n:1/n,h=0;h<c;h++)l*=f}i[s]=l}return i}function m(t,e){var r=t._inputDomain,n=c[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}e.handleDefaults=function(t,e,r){var i,o,s,u,c,h,d,p,v=r.axIds,g=r.axHasImage,m=e._axisConstraintGroups=[],y=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(y,"_matchGroup"),i=0;i<m.length;i++)for(s in o=m[i])if((h=e[a(s)]).fixedrange){for(var b in o){var _=a(b);!1===(t[_]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}for(i=0;i<m.length;){for(s in o=m[i]){(h=e[a(s)])._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(o).length&&(m.splice(i,1),i--);break}i++}x(m,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],M=!1,T=!1;function A(){p=h[d],"rangebreaks"===d&&(T=h._hasDayOfWeekBreaks)}for(i=0;i<y.length;i++){o=y[i];for(var k=0;k<w.length;k++){var L;for(s in d=w[k],p=null,o)if(c=t[u=a(s)],h=e[u],d in h){if(!h.matches&&(L=h,d in c)){A();break}null===p&&d in c&&A()}if("range"===d&&p&&c.range&&2===c.range.length&&null!==c.range[0]&&null!==c.range[1]&&(M=!0),"autorange"===d&&null===p&&M&&(p=!1),null===p&&d in L&&(p=L[d]),null!==p)for(s in o)(h=e[a(s)])[d]="range"===d?p.slice():p,"rangebreaks"===d&&(h._hasDayOfWeekBreaks=T,l(h,e))}}},e.enforce=function(t){var e,r,n,o,l,c,f,h,d=t._fullLayout,p=d._axisConstraintGroups||[];for(e=0;e<p.length;e++){n=g(p[e],d);var v=Object.keys(n),y=1/0,x=0,b=1/0,_={},w={},M=!1;for(r=0;r<v.length;r++)w[o=v[r]]=l=d[a(o)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),_[o]=c=Math.abs(l._m)/n[o],y=Math.min(y,c),"domain"!==l.constrain&&l._constraintShrinkable||(b=Math.min(b,c)),delete l._constraintShrinkable,x=Math.max(x,c),"domain"===l.constrain&&(M=!0);if(!(y>u*x)||M)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 T=l._inputDomain,A=(l.domain[1]-l.domain[0])/(T[1]-T[0]),k=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((h/=A)*k<1){l.domain=l._input.domain=T.slice(),s(l,h);continue}if(k<1&&(l.range=l._input.range=l._inputRange.slice(),h*=k),l.autorange){var L=l.r2l(l.range[0]),S=l.r2l(l.range[1]),E=(L+S)/2,C=E,O=E,R=Math.abs(S-E),P=E-R*h*1.0001,D=E+R*h*1.0001,I=i.makePadFn(d,l,0),z=i.makePadFn(d,l,1);m(l,h);var N,F,B=Math.abs(l._m),j=i.concatExtremes(t,l),U=j.min,H=j.max;for(F=0;F<U.length;F++)(N=U[F].val-I(U[F])/B)>P&&N<C&&(C=N);for(F=0;F<H.length;F++)(N=H[F].val+z(H[F])/B)<D&&N>O&&(O=N);h/=(O-C)/(2*R),C=l.l2r(C),O=l.l2r(O),l.range=l._input.range=L<S?[C,O]:[O,C]}m(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)}}},1184:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.numberFormat,o=r(9760),s=r(9184),l=r(4040),u=i.strTranslate,c=r(2736),f=r(6308),h=r(3616),d=r(3024),p=r(4460),v=r(3972),g=r(6476),m=r(2760),y=m.selectingOrDrawing,x=m.freeMode,b=r(4284).FROM_TL,_=r(3696),w=r(9172).redrawReglTraces,M=r(7316),T=r(9811).getFromId,A=r(2676).prepSelect,k=r(2676).clearOutline,L=r(2676).selectOnClick,S=r(1160),E=r(3816),C=E.MINDRAG,O=E.MINZOOM,R=!0;function P(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=P(t,"rect",e,r);return n.select(l).call(h.setRect,i,a,o,s),l}function I(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function z(t,e,r,n,i){for(var a=0;a<t.length;a++){var o=t[a];if(!o.fixedrange)if(o.rangebreaks){var s="y"===o._id.charAt(0),l=s?1-e:e,u=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;n[o._name+".range[0]"]=o.l2r(c+f*e),n[o._name+".range[1]"]=o.l2r(c+f*r)}}if(i&&i.length){var h=(e+(1-r))/2;z(i,h,1-h,n,[])}}function N(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange){if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)];n.limitRange&&n.limitRange()}}}function F(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function B(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),H(t,e,i,a)}function H(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 V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Y(t){R&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),R=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,O)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function W(t,e,r,n,a){for(var o,s,l,u,c=!1,f={},h={},d=(a||{}).xaHash,p=(a||{}).yaHash,v=0;v<e.length;v++){var g=e[v];for(o in r)if(g[o]){for(l in g)a&&(d[l]||p[l])||("x"===l.charAt(0)?r:n)[l]||(f[l]=o);for(s in n)a&&(d[s]||p[s])||!g[s]||(c=!0)}for(s in n)if(g[s])for(u in g)a&&(d[u]||p[u])||("x"===u.charAt(0)?r:n)[u]||(h[u]=s)}c&&(i.extendFlat(f,h),h={});var m={},y=[];for(l in f){var x=T(t,l);y.push(x),m[x._id]=x}var b={},_=[];for(u in h){var w=T(t,u);_.push(w),b[w._id]=w}return{xaHash:m,yaHash:b,xaxes:y,yaxes:_,xLinks:f,yLinks:h,isSubplotConstrained:c}}function q(t,e){if(s){var r=void 0!==t.onwheel?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}))}function X(t){var e=[];for(var r in t)e.push(t[r]);return e}t.exports={makeDragBox:function(t,e,r,s,u,f,v,m){var R,P,H,Z,J,K,Q,$,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ft,ht,dt,pt,vt=t._fullLayout._zoomlayer,gt=v+m==="nsew",mt=1===(v+m).length;function yt(){if(R=e.xaxis,P=e.yaxis,tt=R._length,et=P._length,Q=R._offset,$=P._offset,(H={})[R._id]=R,(Z={})[P._id]=P,v&&m)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;H[i._id]=i;var a=r[n].yaxis;Z[a._id]=a}J=X(H),K=X(Z),it=I(J,m),at=I(K,v),ot=!at&&!it,nt=W(t,t._fullLayout._axisMatchGroups,H,Z);var o=(rt=W(t,t._fullLayout._axisConstraintGroups,H,Z,nt)).isSubplotConstrained||nt.isSubplotConstrained;st=m||o,lt=v||o;var s=t._fullLayout;ut=s._has("scattergl"),ct=s._has("splom"),ft=s._has("svg")}r+=e.yaxis._shift,yt();var xt=function(t,e,r){return t?"nsew"===t?r?"":"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}(at+it,t._fullLayout.dragmode,gt),bt=D(e,v+m+"drag",xt,r,s,u,f);if(ot&&!gt)return bt.onmousedown=null,bt.style.pointerEvents="none",bt;var _t,wt,Mt,Tt,At,kt,Lt,St,Et,Ct,Ot={element:bt,gd:t,plotinfo:e};function Rt(){Ot.plotinfo.selection=!1,k(t)}function Pt(t,r){var i=Ot.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(V(i),2!==t||mt||Yt(),gt)o.indexOf("select")>-1&&L(r,i,J,K,e.id,Ot),o.indexOf("event")>-1&&d.click(i,r,e.id);else if(1===t&&mt){var s=v?P:R,u="s"===v||"w"===m?0:1,f=s._name+".range["+u+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),p="left",g="middle";if(s.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===s.side&&(p="right")):"e"===m&&(p="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:p,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,dt*e+_t)),i=Math.max(0,Math.min(et,pt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){Lt="",Mt.r=Mt.l,Mt.t=Mt.b,Et.attr("d","M0,0Z")}if(Mt.l=Math.min(_t,n),Mt.r=Math.max(_t,n),Mt.t=Math.min(wt,i),Mt.b=Math.max(wt,i),rt.isSubplotConstrained)a>O||o>O?(Lt="xy",a/tt>o/et?(o=a*et/tt,wt>i?Mt.t=wt-o:Mt.b=wt+o):(a=o*tt/et,_t>n?Mt.l=_t-a:Mt.r=_t+a),Et.attr("d",G(Mt))):s();else if(nt.isSubplotConstrained)if(a>O||o>O){Lt="xy";var l=Math.min(Mt.l/tt,(et-Mt.b)/et),u=Math.max(Mt.r/tt,(et-Mt.t)/et);Mt.l=l*tt,Mt.r=u*tt,Mt.b=(1-l)*et,Mt.t=(1-u)*et,Et.attr("d",G(Mt))}else s();else!at||o<Math.min(Math.max(.6*a,C),O)?a<C||!it?s():(Mt.t=0,Mt.b=et,Lt="x",Et.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-O-.5)+"h-3v"+(2*O+1)+"h3ZM"+(t.r+.5)+","+(e-O-.5)+"h3v"+(2*O+1)+"h-3Z"}(Mt,wt))):!it||a<Math.min(.6*o,O)?(Mt.l=0,Mt.r=tt,Lt="y",Et.attr("d",function(t,e){return"M"+(e-O-.5)+","+(t.t-.5)+"v-3h"+(2*O+1)+"v3ZM"+(e-O-.5)+","+(t.b+.5)+"v3h"+(2*O+1)+"v-3Z"}(Mt,_t))):(Lt="xy",Et.attr("d",G(Mt)));Mt.w=Mt.r-Mt.l,Mt.h=Mt.b-Mt.t,Lt&&(Ct=!0),t._dragged=Ct,U(St,Et,Mt,At,kt,Tt),It(),t.emit("plotly_relayouting",ht),kt=!0}function It(){ht={},"xy"!==Lt&&"x"!==Lt||(z(J,Mt.l/tt,Mt.r/tt,ht,rt.xaxes),Ht("x",ht)),"xy"!==Lt&&"y"!==Lt||(z(K,(et-Mt.b)/et,(et-Mt.t)/et,ht,rt.yaxes),Ht("y",ht))}function zt(){It(),V(t),Gt(),Y(t)}Ot.prepFn=function(e,r,n){var a=Ot.dragmode,s=t._fullLayout.dragmode;s!==a&&(Ot.dragmode=s),yt(),dt=t._fullLayout._invScaleX,pt=t._fullLayout._invScaleY,ot||(gt?e.shiftKey?"pan"===s?s="zoom":y(s)||(s="pan"):e.ctrlKey&&(s="pan"):s="pan"),x(s)?Ot.minDrag=1:Ot.minDrag=void 0,y(s)?(Ot.xaxes=J,Ot.yaxes=K,A(e,r,n,Ot,s)):(Ot.clickFn=Pt,y(a)&&Rt(),ot||("zoom"===s?(Ot.moveFn=Dt,Ot.doneFn=zt,Ot.minDrag=1,function(e,r,n){var a=bt.getBoundingClientRect();_t=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(_t,wt);_t=s[0],wt=s[1],Mt={l:_t,r:_t,w:0,t:wt,b:wt,h:0},Tt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),kt=!1,Lt="xy",Ct=!1,St=B(vt,Tt,Q,$,At="M0,0H"+tt+"V"+et+"H0V0"),Et=j(vt,Q,$)}(0,r,n)):"pan"===s&&(Ot.moveFn=Ut,Ot.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===bt){var r=t._fullLayout.dragmode;y(r)||(yt(),Wt([0,0,tt,et]),Ot.moveFn(e.dx,e.dy))}}},g.init(Ot);var Nt=[0,0,tt,et],Ft=null,Bt=E.REDRAWDELAY,jt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Ut(e,r){if(e*=dt,r*=pt,!t._transitioningWithDuration){if(t._fullLayout._replotting=!0,"ew"===it||"ns"===at){var n=it?-e:0,i=at?-r:0;if(nt.isSubplotConstrained){if(it&&at){var a=(e/tt-r/et)/2;n=-(e=a*tt),i=-(r=-a*et)}at?n=-i*tt/et:i=-n*et/tt}return it&&(N(J,e),Ht("x")),at&&(N(K,r),Ht("y")),Wt([n,i,tt,et]),Vt(),void t.emit("plotly_relayouting",ht)}var o,s,l="w"===it==("n"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var u=(e/tt+l*r/et)/2;e=u*tt,r=l*u*et}if("w"===it?e=d(J,0,e):"e"===it?e=d(J,1,-e):it||(e=0),"n"===at?r=d(K,1,r):"s"===at?r=d(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(),S(J[c],1-r/et);o=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(c=0;c<K.length;c++)K[c].range=K[c]._r.slice(),S(K[c],1-e/tt);s=(r=e*et/tt)/2}}nt.isSubplotConstrained&&at||Ht("x"),nt.isSubplotConstrained&&it||Ht("y");var f=tt-e,h=et-r;!nt.isSubplotConstrained||it&&at||(it?(s=o?0:e*et/tt,h=f*et/tt):(o=s?0:r*tt/et,f=h*tt/et)),Wt([o,s,f,h]),Vt(),t.emit("plotly_relayouting",ht)}function d(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])/F(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 Ht(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]||H[s]||Z[s];l&&(e?(e[a._name+".range[0]"]=e[l._name+".range[0]"],e[a._name+".range[1]"]=e[l._name+".range[1]"]):a.range=l.range.slice())}}function Vt(){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=T(t,o);p.drawOne(t,s,{skipTitle:!0}),ht[s._name+".range[0]"]=s.range[0],ht[s._name+".range[1]"]=s.range[1]}p.redrawComponents(t,n)}function Yt(){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={};if("reset+autosize"===e)for(e="autosize",i=0;i<r.length;i++){var o=(n=r[i])._rangeInitial0,s=n._rangeInitial1,u=void 0!==o||void 0!==s;if(u&&(void 0!==o&&o!==n.range[0]||void 0!==s&&s!==n.range[1])||!u&&!0!==n.autorange){e="reset";break}}if("autosize"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(a[n._name+".autorange"]=!0);else if("reset"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(K)):r=r.concat(J)),i=0;i<r.length;i++)if(!(n=r[i]).fixedrange){var c=n._name,f=n._autorangeInitial;void 0===n._rangeInitial0&&void 0===n._rangeInitial1?a[c+".autorange"]=!0:void 0===n._rangeInitial0?(a[c+".autorange"]=f,a[c+".range"]=[null,n._rangeInitial1]):void 0===n._rangeInitial1?(a[c+".range"]=[n._rangeInitial0,null],a[c+".autorange"]=f):a[c+".range"]=[n._rangeInitial0,n._rangeInitial1]}t.emit("plotly_doubleclick",null),l.call("_guiRelayout",t,a)}}function Gt(){Wt([0,0,tt,et]),i.syncOrAsync([M.previousPromises,function(){t._fullLayout._replotting=!1,l.call("_guiRelayout",t,ht)}],t)}function Wt(e){var r,n,a,o,s=t._fullLayout,u=s._plots,c=s._subplots.cartesian;if(ct&&l.subplotsRegistry.splom.drag(t),ut)for(r=0;r<c.length;r++)if(a=(n=u[c[r]]).xaxis,o=n.yaxis,n._scene){var f=i.simpleMap(a.range,a.r2l),d=i.simpleMap(o.range,o.r2l);a.limitRange&&a.limitRange(),o.limitRange&&o.limitRange(),f=a.range,d=o.range,n._scene.update({range:[f[0],d[0],f[1],d[1]]})}if((ct||ut)&&(_(t),w(t)),ft){var p=e[2]/R._length,g=e[3]/P._length;for(r=0;r<c.length;r++){a=(n=u[c[r]]).xaxis,o=n.yaxis;var y,x,b,M,T=(st||nt.isSubplotConstrained)&&!a.fixedrange&&H[a._id],A=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&Z[o._id];if(T?(y=p,b=m||nt.isSubplotConstrained?e[0]:Zt(a,y)):nt.xaHash[a._id]?(y=p,b=e[0]*a._length/R._length):nt.yaHash[a._id]?(y=g,b="ns"===at?-e[1]*a._length/P._length:Zt(a,y,{n:"top",s:"bottom"}[at])):b=Xt(a,y=qt(a,p,g)),y>1&&(void 0!==a.maxallowed&&st===(a.range[0]<a.range[1]?"e":"w")||void 0!==a.minallowed&&st===(a.range[0]<a.range[1]?"w":"e"))&&(y=1,b=0),A?(x=g,M=v||nt.isSubplotConstrained?e[1]:Zt(o,x)):nt.yaHash[o._id]?(x=g,M=e[1]*o._length/P._length):nt.xaHash[o._id]?(x=p,M="ew"===it?-e[0]*o._length/R._length:Zt(o,x,{e:"right",w:"left"}[it])):M=Xt(o,x=qt(o,p,g)),x>1&&(void 0!==o.maxallowed&&lt===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&&lt===(o.range[0]<o.range[1]?"s":"n"))&&(x=1,M=0),y||x){y||(y=1),x||(x=1);var k=a._offset-b/y,L=o._offset-M/x;n.clipRect.call(h.setTranslate,b,M).call(h.setScale,y,x),n.plot.call(h.setTranslate,k,L).call(h.setScale,1/y,1/x),y===n.xScaleFactor&&x===n.yScaleFactor||(h.setPointGroupScale(n.zoomScalePts,y,x),h.setTextPointsScale(n.zoomScaleTxt,y,x)),h.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=y,n.yScaleFactor=x}}}}function qt(t,e,r){return t.fixedrange?0:st&&rt.xaHash[t._id]?e:lt&&(rt.isSubplotConstrained?rt.xaHash:rt.yaHash)[t._id]?r:0}function Xt(t,e){return e?(t.range=t._r.slice(),S(t,e),Zt(t,e)):0}function Zt(t,e,r){return t._length*(1-e)*b[r||t.constraintoward||"middle"]}return v.length*m.length!=1&&q(bt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Rt(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();yt(),clearTimeout(Ft);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=jt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(m||(s=.5),n=0;n<J.length;n++)u(J[n],s,a);Ht("x"),Nt[2]*=a,Nt[0]+=Nt[2]*s*(1/a-1)}if(lt){for(v||(l=.5),n=0;n<K.length;n++)u(K[n],l,a);Ht("y"),Nt[3]*=a,Nt[1]+=Nt[3]*(1-l)*(1/a-1)}Wt(Nt),Vt(),t.emit("plotly_relayouting",ht),Ft=setTimeout((function(){t._fullLayout&&(Nt=[0,0,tt,et],Gt())}),Bt),e.preventDefault()}else i.log("Did not find wheel motion attributes: ",e)}function u(t,e,r){if(!t.fixedrange){var n=i.simpleMap(t.range,t.r2l),a=n[0]+(n[1]-n[0])*e;t.range=n.map((function(e){return t.l2r(a+(e-a)*r)}))}}})),bt},makeDragger:P,makeRectDragger:D,makeZoombox:B,makeCorners:j,updateZoombox:U,xyCorners:G,transitionZoombox:H,removeZoombox:V,showDoubleClickNotifier:Y,attachWheelEventHandler:q}},2464:function(t,e,r){"use strict";var n=r(3428),i=r(3024),a=r(6476),o=r(3972),s=r(1184).makeDragBox,l=r(3816).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(t,n,o._offset,u._offset,o._length,u._length,"ns","ew");c.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=c,t._fullLayout._hoversubplot=e},c.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,u._offset-l,l,l,"n","w"),s(t,n,o._offset+o._length,u._offset-l,l,l,"n","e"),s(t,n,o._offset-l,u._offset+u._length,l,l,"s","w"),s(t,n,o._offset+o._length,u._offset+u._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===o._mainSubplot){var f=o._mainLinePosition;"top"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,"","ew"),s(t,n,o._offset,f,.1*o._length,l,"","w"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,"","e")}if(e===u._mainSubplot){var h=u._mainLinePosition;"right"!==u.side&&(h-=l),s(t,n,h,u._offset+.1*u._length,l,.8*u._length,"ns",""),s(t,n,h,u._offset+.9*u._length,l,.1*u._length,"s",""),s(t,n,h,u._offset,l,.1*u._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";o(e._draggers,r)}},6632:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(9811);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,d=r._has("cartesian")||r._has("gl2d"),p=0;p<o.length;p++){var v=o[p];if(i.isPlainObject(v)){var g=a.cleanId(v.xref,"x",!1),m=a.cleanId(v.yref,"y",!1),y=l.x.test(g),x=l.y.test(m);if(y||x){d||i.pushUnique(r._basePlotModules,s);var b=!1;y&&-1===c.indexOf(g)&&(c.push(g),b=!0),x&&-1===f.indexOf(m)&&(f.push(m),b=!0),b&&y&&x&&h.push(g+m)}}}}}},7952:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(7316),s=r(3616),l=r(4888)._M,u=r(9811),c=r(3816),f=r(9616),h=a.ensureSingle;function d(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function p(t,e,r,o,u){for(var f,h,d,p=c.traceLayerClasses,v=t._fullLayout,g=v._modules,m={},y=0;y<r.length;y++){var x=r[y][0].trace.zorder||0;m[x]||(m[x]=[]),m[x].push(r[y])}for(var b=[],_=[],w=Object.keys(m).map(Number).sort(a.sorterAsc),M=0;M<w.length;M++)for(var T=w[M],A=0;A<g.length;A++){var k=(f=g[A]).name,L=i.modules[k].categories;if(L.svg){var S=(f.layerName||k+"layer")+(M?Number(M)+1:""),E=f.plot;d=(h=l(r,E,T))[0],r=h[1],d.length&&b.push({i:p.indexOf(S),zorder:M,className:S,plotMethod:E,cdModule:d}),L.zoomScale&&_.push("."+S)}}b.sort((function(t,e){return(t.zorder||0)-(e.zorder||0)||t.i-e.i}));var C=e.plot.selectAll("g.mlayer").data(b,(function(t){return t.className}));if(C.enter().append("g").attr("class",(function(t){return t.className})).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),C.exit().remove(),C.order(),C.each((function(r){var i=n.select(this),a=r.className;r.plotMethod(t,e,r.cdModule,i,o,u),-1===c.clipOnAxisFalseQuery.indexOf("."+a)&&s.setClipUrl(i,e.layerClipId,t)})),v._has("scattergl")&&(f=i.getModule("scattergl"),d=l(r,f)[0],f.plot(t,e,d)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(c.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),_.length)){var O=e.plot.selectAll(_.join(",")).selectAll(".trace");e.zoomScalePts=O.selectAll("path.point"),e.zoomScaleTxt=O.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",p=n+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,h(s.overlinesBelow,"path",f),h(s.overlinesBelow,"path",p),h(s.overaxesBelow,"g",f),h(s.overaxesBelow,"g",p),e.plot=h(s.overplot,"g",n),h(s.overlinesAbove,"path",f),h(s.overlinesAbove,"path",p),h(s.overaxesAbove,"g",f),h(s.overaxesAbove,"g",p),e.xlines=l.select(".overlines-"+i).select("."+f),e.ylines=l.select(".overlines-"+a).select("."+p),e.xaxislayer=l.select(".overaxes-"+i).select("."+f),e.yaxislayer=l.select(".overaxes-"+a).select("."+p)}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");var g=h(r,"g","layer-between");e.shapelayerBetween=h(g,"g","shapelayer"),e.imagelayerBetween=h(g,"g","imagelayer"),h(r,"path","xlines-below"),h(r,"path","ylines-below"),e.overlinesBelow=h(r,"g","overlines-below"),h(r,"g","xaxislayer-below"),h(r,"g","yaxislayer-below"),e.overaxesBelow=h(r,"g","overaxes-below"),e.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||(d(e.minorGridlayer,"g",e.xaxis._id),d(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort),d(e.gridlayer,"g",e.xaxis._id),d(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(),m(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function m(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=c.idRegex,e.attrRegex=c.attrRegex,e.attributes=r(6720),e.layoutAttributes=r(4724),e.supplyLayoutDefaults=r(7352),e.transitionAxes=r(3736),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||[]),d={},p={};for(r=0;r<h.length;r++){var v=h[r].split("y");d[v[0]]=1,p["y"+v[1]]=1}for(r=0;r<s.length;r++)d[n=s[r]]||(i=(t[u.id2name(n)]||{}).anchor,c.idRegex.y.test(i)||(i="y"),f.push(n+i),h.push(n+i),p[i]||(p[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)p[i=l[r]]||(n=(t[u.id2name(i)]||{}).anchor,c.idRegex.x.test(n)||(n="x"),f.push(n+i),h.push(n+i),d[n]||(d[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 d=s[h],v=d[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(d)),l=d)}p(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 d=u.listIds({_fullLayout:n});for(a=0;a<d.length;a++){var p=d[a];e[u.id2name(p)]||n._infolayer.selectAll(".g-"+p+"title").remove()}}var v=n._has&&n._has("cartesian"),y=e._has&&e._has("cartesian");if(v&&!y)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(),m(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,d=o._mainAxis,p=h._id+d._id,v=s._plots[p];i.overlays=[],p!==n&&v?(i.mainplot=p,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),m=new Array(u);for(e=0;e<u;e++){n=g[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var y=[n,a.layer,o.layer,a.overlaying||"",o.overlaying||""];for(r=0;r<i.overlays.length;r++)y.push(i.overlays[r].id);m[e]=y}return m}(t),i=e._cartesianlayer.selectAll(".subplot").data(r,String);i.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),i.order(),i.exit().call(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),p(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(2464).updateFx},4724:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=r(8192).u,o=r(2880).extendFlat,s=r(1780).templatedArray,l=r(9736).descriptionWithDates,u=r(9032).ONEDAY,c=r(3816),f=c.HOUR_PATTERN,h=c.WEEKDAY_PATTERN,d={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},p=o({},d,{values:d.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"}},m={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={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"},M={valType:"color",dflt:i.lightLine,editType:"ticks"};function T(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var A=o({},a,{editType:"ticks"}),k={valType:"boolean",editType:"ticks"};t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:i.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[h,f,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:u},editType:"calc"}),tickmode:p,nticks:v(),tick0:g,dtick:m,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:y,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"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:k,gridcolor:M,gridwidth:T(),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:d,nticks:v("minor"),tick0:g,dtick:m,tickvals:y,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:M,gridwidth:T("minor"),griddash:A,showgrid:k,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"})}}},7352:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(624).isUnifiedHover,o=r(1008),s=r(1780),l=r(4859),u=r(4724),c=r(4944),f=r(5955),h=r(1888),d=r(7668),p=r(9811),v=p.id2name,g=p.name2id,m=r(3816).AX_ID_PATTERN,y=r(4040),x=y.traceIs,b=y.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var y,w,M=e.autotypenumbers,T={},A={},k={},L={},S={},E={},C={},O={},R={},P={};for(y=0;y<r.length;y++){var D=r[y];if(x(D,"cartesian")||x(D,"gl2d")){var I,z;if(D.xaxis)I=v(D.xaxis),_(T,I,D);else if(D.xaxes)for(w=0;w<D.xaxes.length;w++)_(T,v(D.xaxes[w]),D);if(D.yaxis)z=v(D.yaxis),_(T,z,D);else if(D.yaxes)for(w=0;w<D.yaxes.length;w++)_(T,v(D.yaxes[w]),D);"funnel"===D.type?"h"===D.orientation?(I&&(A[I]=!0),z&&(C[z]=!0)):z&&(k[z]=!0):"image"===D.type?(z&&(O[z]=!0),I&&(O[I]=!0)):(z&&(S[z]=!0,E[z]=!0),x(D,"carpet")&&("carpet"!==D.type||D._cheater)||I&&(L[I]=!0)),"carpet"===D.type&&D._cheater&&I&&(A[I]=!0),x(D,"2dMap")&&(R[I]=!0,R[z]=!0),x(D,"oriented")&&(P["h"===D.orientation?z:I]=!0)}}var N=e._subplots,F=N.xaxis,B=N.yaxis,j=n.simpleMap(F,v),U=n.simpleMap(B,v),H=j.concat(U),V=i.background;F.length&&B.length&&(V=n.coerce(t,e,l,"plot_bgcolor"));var Y,G,W,q,X,Z=i.combine(V,e.paper_bgcolor);function J(){var t=T[Y]||[];X._traceIndices=t.map((function(t){return t._expandedIndex})),X._annIndices=[],X._shapeIndices=[],X._selectionIndices=[],X._imgIndices=[],X._subplotsWith=[],X._counterAxes=[],X._name=X._attr=Y,X._id=G}function K(t,e){return n.coerce(q,X,u,t,e)}function Q(t,e){return n.coerce2(q,X,u,t,e)}function $(t){return"x"===t?B:F}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:$("x"),y:$("y")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=q.matches;m.test(t)&&-1===rt.indexOf(t)&&(nt[t]=q.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(y=0;y<H.length;y++){Y=H[y],G=g(Y),W=Y.charAt(0),n.isPlainObject(t[Y])||(t[Y]={}),q=t[Y],X=s.newContainer(e,Y,W+"axis"),J();var lt="x"===W&&!L[Y]&&A[Y]||"y"===W&&!S[Y]&&k[Y],ut="y"===W&&(!E[Y]&&C[Y]||O[Y]),ct={hasMinor:!0,letter:W,font:e.font,outerTicks:R[Y],showGrid:!P[Y],data:T[Y]||[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:M,splomStash:((e._splomAxes||{})[W]||{})[G],noAutotickangles:"y"===W};K("uirevision",e.uirevision),c(q,X,K,ct),f(q,X,K,ct,e);var ft=st&&W===ot.charAt(0),ht=Q("spikecolor",st?X.color:void 0),dt=Q("spikethickness",st?1.5:void 0),pt=Q("spikedash",st?"dot":void 0),vt=Q("spikemode",st?"across":void 0),gt=Q("spikesnap");K("showspikes",!!(ft||ht||dt||pt||vt||gt))||(delete X.spikecolor,delete X.spikethickness,delete X.spikedash,delete X.spikemode,delete X.spikesnap);var mt=v(q.overlaying),yt=[0,1];if(void 0!==e[mt]){var xt=v(e[mt].anchor);void 0!==e[xt]&&(yt=e[xt].domain)}d(q,X,K,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,Y),grid:e.grid,overlayingDomain:yt}),K("title.standoff"),at(),X._input=q}for(y=0;y<it.length;){G=it[y++],W=(Y=v(G)).charAt(0),n.isPlainObject(t[Y])||(t[Y]={}),q=t[Y],X=s.newContainer(e,Y,W+"axis"),J();var bt={letter:W,font:e.font,outerTicks:R[Y],showGrid:!P[Y],data:[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:M,splomStash:((e._splomAxes||{})[W]||{})[G]};K("uirevision",e.uirevision),X.type=nt[G]||"linear",f(q,X,K,bt,e),d(q,X,K,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,Y),grid:e.grid}),K("fixedrange"),at(),X._input=q}var _t=b("rangeslider","handleDefaults"),wt=b("rangeselector","handleDefaults");for(y=0;y<j.length;y++)Y=j[y],q=t[Y],X=e[Y],_t(t,e,Y),"date"===X.type&&wt(q,X,e,U,X.calendar),K("fixedrange");for(y=0;y<U.length;y++){Y=U[y],q=t[Y],X=e[Y];var Mt=e[v(X.anchor)];K("fixedrange",b("rangeslider","isVisible")(Mt))}h.handleDefaults(t,e,{axIds:rt.concat(it).sort(p.idSort),axHasImage:O})}},2136:function(t,e,r){"use strict";var n=r(9760).mix,i=r(2548),a=r(3400);t.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var u=l("linecolor",s),c=l("linewidth");r("showline",o.showLine||!!u||!!c)||(delete e.linecolor,delete e.linewidth);var f=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),h=l("gridwidth"),d=l("griddash");if(r("showgrid",o.showGrid||!!f||!!h||!!d)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),o.hasMinor){var p=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",!!p||!!v||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!o.noZeroLine){var m=l("zerolinecolor",s),y=l("zerolinewidth");r("zeroline",o.showGrid||!!m||!!y)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},7668:function(t,e,r){"use strict";var n=r(8248),i=r(3400);t.exports=function(t,e,r,a){var o,s,l,u,c,f,h=a.counterAxes||[],d=a.overlayableAxes||[],p=a.letter,v=a.grid,g=a.overlayingDomain;v&&(s=v._domains[p][v._axisMap[e._id]],o=v._anchors[e._id],s&&(l=v[p+"side"].split(" ")[0],u=v.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?"free":h[0]||"free"),l=l||("x"===p?"bottom":"left"),u=u||0,c=0,f=!1;var m=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(h),dflt:o}},"anchor"),y=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===m&&("y"===p&&(r("autoshift")&&(u="left"===y?g[0]:g[1],f=!e.automargin||e.automargin,c="left"===y?-3:3),r("shift",c)),r("position",u)),r("automargin",f);var x=!1;if(d.length&&(x=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(d),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}},2568:function(t,e,r){"use strict";var n=r(5024);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)}},6312:function(t,e,r){"use strict";var n=r(6808);t.exports=function(t,e,r,i){var a=e._template||{},o=e.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var u,c=e.getAutorangeDflt(l,i),f=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==f&&!0!==f)&&(null===l[0]||"min"!==f&&"max reversed"!==f)&&(null===l[1]||"max"!==f&&"min reversed"!==f)||(l=void 0,delete e.range,e.autorange=!0,u=!0),u||(f=r("autorange",c=e.getAutorangeDflt(l,i))),f&&(n(r,f,l),"linear"!==o&&"-"!==o||r("rangemode")),e.cleanRange()}},1160:function(t,e,r){"use strict";var n=r(4284).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()}},8344:function(t,e,r){"use strict";var n=r(3428),i=r(4336).E9,a=r(3400),o=a.numberFormat,s=r(8248),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,d=r(9032),p=d.FP_SAFE,v=d.BADNUM,g=d.LOG_CLIP,m=d.ONEWEEK,y=d.ONEDAY,x=d.ONEHOUR,b=d.ONEMIN,_=d.ONESEC,w=r(9811),M=r(3816),T=M.HOUR_PATTERN,A=M.WEEKDAY_PATTERN;function k(t){return Math.pow(10,t)}function L(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",d=r.charAt(0);function S(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return v}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===v){if(!s(e))return v;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),u=Math.round(e-l/10);o=c(new Date(u))+l/10}return o}function C(e,r,n){return u(e,r,n||t.calendar)}function O(e){return t._categories[Math.round(e)]}function R(e){if(L(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return v}function P(e){if(t._categoriesMap)return t._categoriesMap[e]}function D(t){var e=P(t);return void 0!==e?e:s(t)?+t:void 0}function I(t){return s(t)?+t:P(t)}function z(t,e,r){return n.round(r+e*t,2)}function N(t,e,r){return(t-r)/e}var F=function(e){return s(e)?z(e,t._m,t._b):v},B=function(e){return N(e,t._m,t._b)};if(t.rangebreaks){var j="y"===d;F=function(e){if(!s(e))return v;var r=t._rangebreaks.length;if(!r)return z(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;l<r;l++){var u=i*t._rangebreaks[l].min,c=i*t._rangebreaks[l].max;if(a<u)break;if(!(a>c)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?z(e,t._m2,f):0},B=function(e){var r=t._rangebreaks.length;if(!r)return N(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 N(e,t._m2,t._B[n])}}t.c2l="log"===t.type?S:f,t.l2c="log"===t.type?k:f,t.l2p=F,t.p2l=B,t.c2p="log"===t.type?function(t,e){return F(S(t,e))}:F,t.p2c="log"===t.type?function(t){return k(B(t))}:B,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=B,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return S(l(t),e)},t.r2d=t.r2c=function(t){return k(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=S,t.l2d=k,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return k(B(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=B,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(B(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,v,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=R,t.r2d=t.c2d=t.l2d=O,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return O(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=O,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=P,t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return O(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var u in l)if(u!==r){var c=e[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(i=0;i<s.length;i++){var v=n[s[i]];if(d in v){var g=v[d],m=v._length||a.minRowLength(g);if(h(g[0])&&h(g[1]))for(o=0;o<m;o++){var y=g[0][o],x=g[1][o];L(y)&&L(x)&&(p.push([y,x]),y in f[0][1]||(f[0][1][y]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(p.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<p.length;i++)R(p[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.limitRange=function(e){var r=t.minallowed,n=t.maxallowed;if(void 0!==r||void 0!==n){e||(e="range");var i=a.nestedProperty(t,e).get(),o=a.simpleMap(i,t.r2l),s=o[1]<o[0];s&&o.reverse();var l=a.simpleMap([r,n],t.r2l);if(void 0!==r&&o[0]<l[0]&&(i[s?1:0]=r),void 0!==n&&o[1]>l[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=t.l2r(r),c=t.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),i[s?1:0]=f}if(void 0!==n){var h=c+1;void 0!==r&&(h=Math.max(h,u)),i[s?0:1]=h}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===d?M.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||M.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],u=null===o[1];for("date"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],v,t.calendar),o[1]=a.cleanDate(o[1],v,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!a.isDateTime(o[n],t.calendar)){t[e]=i;break}if(t.r2l(o[0])===t.r2l(o[1])){var c=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(c-1e3),o[1]=t.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||u||!s(o[1-n])){t[e]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),f="y"===d;if(f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(u,c),Math.max(u,c)),t._rangebreaks.length)){for(s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._lBreaks+=Math.abs(l.max-l.min);var h=f;u>c&&(h=!h),h&&t._rangebreaks.reverse();var p=h?-1:1;for(t._m2=p*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(f?c:u)),s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._B.push(t._B[t._B.length-1]-p*t._m2*(l.max-l.min));for(s=0;s<t._rangebreaks.length;s++)(l=t._rangebreaks[s]).pmin=F(l.min),l.pmax=F(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 T:o=(s=new Date(e)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),n>i&&(i+=24,o<n&&(o+=24));break;case"":o=e}if(o>=n&&o<i)return v}else for(var d=u._cachedValues[c],p=0;p<d.length;p++)if(i=(n=d[p])+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===T?-1:e.pattern===A&&t.pattern===T?1:0})),f=function(t,n){if((t=a.constrain(t,e,r))!==(n=a.constrain(n,e,r))){for(var i=!0,o=0;o<u.length;o++){var s=u[o];t<s.max&&n>=s.min&&(t<s.min&&(s.min=t),n>s.max&&(s.max=n),i=!1)}i&&u.push({min:t,max:n})}};for(n=0;n<c.length;n++){var h=c[n];if(h.enabled)if(h.bounds){var d=e,p=r;h.pattern&&(d=Math.floor(d)),o=(i=a.simpleMap(h.bounds,h.pattern?l:t.r2l))[0],s=i[1];var v,g,w=new Date(d);switch(h.pattern){case A:g=m,v=(s-o+(s<o?7:0))*y,d+=o*y-(w.getUTCDay()*y+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case T:g=y,v=(s-o+(s<o?24:0))*x,d+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;default:d=Math.min(i[0],i[1]),v=g=(p=Math.max(i[0],i[1]))-d}for(var M=d;M<p;M+=g)f(M,M+v)}else for(var k=a.simpleMap(h.values,t.d2c),L=0;L<k.length;L++)f(o=k[L],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]=P([i,a])}return r}(i,l);for(o=new Array(l),s=0;s<l;s++)o[s]=t.d2c(i[s],0,c,n)}else{var f=r+"0"in e?t.d2c(e[r+"0"],0,c):0,h=e["d"+r]?Number(e["d"+r]):1;for(i=e[{x:"y",y:"x"}[r]],l=e._length||i.length,o=new Array(l),s=0;s<l;s++)o[s]=f+s*h}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e,r){return Array.isArray(e)&&2===e.length&&(r&&null===e[0]||s(t.r2l(e[0])))&&(r&&null===e[1]||s(t.r2l(e[1])))},t.getAutorangeDflt=function(e,r){var n=!t.isValidRange(e,"nullOk");return n&&r&&r.reverseDflt?n="reversed":e&&(null===e[0]&&null===e[1]?n=!0:null===e[0]&&null!==e[1]?n="min":null!==e[0]&&null===e[1]&&(n="max")),n},t.isReversed=function(){var e=t.autorange;return"reversed"===e||"min reversed"===e||"max reversed"===e},t.isPtWithinRange=function(e,r){var n=t.c2l(e[d],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++)R(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)R(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}},5024: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]]}},5936:function(t,e,r){"use strict";var n=r(3400),i=r(6308).contrast,a=r(4724),o=r(5024),s=r(1272);function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,u,c){c||(c={});var f=r("labelalias");n.isPlainObject(f)||delete e.labelalias;var h=o(t);if(r("showticklabels")){var d=c.font||{},p=e.color,v=-1!==(e.ticklabelposition||"").indexOf("inside")?i(c.bgColor):p&&p!==a.color.dflt?p:d.color;if(n.coerceFont(r,"tickfont",{family:d.family,size:d.size,color:v}),c.noTicklabelstep||"multicategory"===u||"log"===u||r("ticklabelstep"),!c.noAng){var g=r("tickangle");c.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==u){var m=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||m||"date"===u||(r("showexponent",h),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},5404:function(t,e,r){"use strict";var n=r(3400),i=r(4724);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),d=n.coerce2(s,l,u,"tickcolor",(o?e.tickcolor:void 0)||l.color);r(c+"ticks",!o&&a.outerTicks||f||h||d?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},6332:function(t,e,r){"use strict";var n=r(8728),i=r(3400).isArrayOrTypedArray,a=r(8116).isTypedArraySpec,o=r(8116).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var u=l.isMinor,c=u?t.minor||{}:t,f=u?e.minor:e,h=u?"minor.":"";function d(t){var e=c[t];return a(e)&&(e=o(e)),void 0!==e?e:(f._template||{})[t]}var p=d("tick0"),v=d("dtick"),g=d("tickvals"),m=r(h+"tickmode",i(g)?"array":v?"linear":"auto");if("auto"===m||"sync"===m)r(h+"nticks");else if("linear"===m){var y=f.dtick=n.dtick(v,s);f.tick0=n.tick0(p,s,e.calendar,y)}else"multicategory"!==s&&(void 0===r(h+"tickvals")?f.tickmode="auto":u||r("ticktext"))}},3736:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(3616),s=r(4460);t.exports=function(t,e,r,l){var u=t._fullLayout;if(0!==e.length){var c,f,h,d;l&&(c=l());var p=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(d),d=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(),d=window.requestAnimationFrame((function n(){h=Date.now();for(var a=Math.min(1,(h-f)/r.duration),o=p(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)}))}(),d=window.cancelAnimationFrame(n)):d=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,d=[];if(f){var p=a.simpleMap(e.xr0,i.r2l),v=a.simpleMap(e.xr1,i.r2l),g=p[1]-p[0],m=v[1]-v[0];d[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*u,d[2]=u*(1-r+r*m/g),i.range[0]=i.l2r(p[0]*(1-r)+r*v[0]),i.range[1]=i.l2r(p[1]*(1-r)+r*v[1])}else d[0]=0,d[2]=u;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];d[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*c,d[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else d[1]=0,d[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/d[2]:1,M=h?c/d[3]:1,T=f?d[0]:0,A=h?d[1]:0,k=f?d[0]/d[2]*u:0,L=h?d[1]/d[3]*c:0,S=i._offset-k,E=l._offset-L;n.clipRect.call(o.setTranslate,T,A).call(o.setScale,1/w,1/M),n.plot.call(o.setTranslate,S,E).call(o.setScale,w,M),o.setPointGroupScale(n.zoomScalePts,1/w,1/M),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/M)}s.redrawComponents(t)}},4944:function(t,e,r){"use strict";var n=r(4040).traceIs,i=r(2976);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 d=a(u),p=[];for(r=0;r<e.length;r++){var v=e[r];n(v,"box-violin")&&(v[l+"axis"]||l)===s&&(void 0!==v[d]?p.push(v[d][0]):void 0!==v.name?p.push(v.name):p.push("text"),v[c]!==f&&(f=void 0))}t.type=i(p,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)}},2460:function(t,e,r){"use strict";var n=r(4040),i=r(3400);function a(t,e,r){var n,a,o,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if("string"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},"string"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u<l;u++)a[u]=r?r[u]:u}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var c=o;o=[];for(var f=0;f<a.length;f++)o[f]=c}o.length=Math.min(a.length,o.length)}s.push({type:"data",prop:e,traces:a,value:o})}),"",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if("_"!==a[0]){var s=r+(n>0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f<c.length;f++)t._internalOn(c[f],s.check);s.remove=function(){for(var e=0;e<c.length;e++)t._removeInternalListener(c[e],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},r&&(r._commandObserver=s),s},e.hasSimpleAPICommandBindings=function(t,r,n){var i,a,o=r.length;for(i=0;i<o;i++){var s,l=r[i],u=l.method,c=l.args;if(Array.isArray(c)||(c=[]),!u)return!1;var f=e.computeAPICommandBindings(t,u,c);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var d=(s=f[0]).value;if(Array.isArray(d)){if(1!==d.length)return!1;d=d[0]}n&&(n[d]=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}},6968:function(t,e,r){"use strict";var n=r(2880).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:t.editType},i.column={valType:"integer",min:0,dflt:0,editType:t.editType}),i},e.Q=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var u=r("domain.x",i),c=r("domain.y",a);u[0]<u[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=a.slice())}},5376: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}},6672: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"}}},4888:function(t,e,r){"use strict";var n=r(4040),i=r(3816).SUBPLOT_PATTERN;e._M=function(t,e,r){var i,a=[],o=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[a,t];for(var s=r,l=0;l<t.length;l++){var u=t[l],c=u[0].trace,f=void 0!==c.zorder;!0===c.visible&&0!==c._length&&(!c._module||c._module.plot!==i||f&&c.zorder!==s?o.push(u):a.push(u))}return[a,o]},e.op=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,u=[];if("gl2d"===e){var c=r.match(i);o="x"+c[1],s="y"+c[2]}for(var f=0;f<t.length;f++)a=t[f],"gl2d"===e&&n.traceIs(a,"gl2d")?a[l[0]]===o&&a[l[1]]===s&&u.push(a):a[l]===r&&u.push(a);return u}},2536:function(t,e,r){"use strict";var n=r(7824).overrideAll,i=r(5460),a=r(8432),o=r(4888).op,s=r(3400),l=r(9616),u="gl3d",c="scene";e.name=u,e.attr=c,e.idRoot=c,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(6636),e.layoutAttributes=r(346),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(5208),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[u],i=0;i<n.length;i++){var s=n[i],l=o(r,u,s),c=e[s],f=c.camera,h=c._scene;h||(h=new a({id:s,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:f},e),c._scene=h),h.viewInitial||(h.viewInitial={up:{x:f.up.x,y:f.up.y,z:f.up.z},eye:{x:f.eye.x,y:f.eye.y,z:f.eye.z},center:{x:f.center.x,y:f.center.y,z:f.center.z}}),h.plot(l,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots[u]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[u],n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,c=s.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}},e.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return"1"===e&&(e=""),c+e}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[u],n=0;n<r.length;n++)e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}},6636:function(t){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},6140:function(t,e,r){"use strict";var n=r(6308),i=r(4724),a=r(2880).extendFlat,o=r(7824).overrideAll;t.exports=o({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:n.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:a({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},4380:function(t,e,r){"use strict";var n=r(9760).mix,i=r(3400),a=r(1780),o=r(6140),s=r(4944),l=r(5955),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 d=0;d<u.length;d++){var p=u[d];c=t[p]||{},(f=a.newContainer(e,p))._id=p[0]+r.scene,f._name=p,s(c,f,h,r),l(c,f,h,{font:r.font,letter:p[0],data:r.data,showGrid:!0,noAutotickangles:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),h("gridcolor",n(f.color,r.bgColor,72.72727272727273).toRgbString()),h("title.text",p[0]),f.setScale=i.noop,h("showspikes")&&(h("spikesides"),h("spikethickness"),h("spikecolor",f.color)),h("showaxeslabels"),h("showbackground")&&h("backgroundcolor")}}},4728:function(t,e,r){"use strict";var n=r(696),i=r(3400),a=["xaxis","yaxis","zaxis"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.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}},5208:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(4040),o=r(168),s=r(4380),l=r(346),u=r(4888).op,c="gl3d";function f(t,e,r,n){for(var o=r("bgcolor"),l=i.combine(o,n.paper_bgcolor),f=["up","center","eye"],h=0;h<f.length;h++)r("camera."+f[h]+".x"),r("camera."+f[h]+".y"),r("camera."+f[h]+".z");r("camera.projection.type");var d=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),p=r("aspectmode",d?"manual":"auto");d||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},"manual"===p&&(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 m=t.camera.up.x,y=t.camera.up.y,x=t.camera.up.z;0!==x&&(m&&y&&x?x/Math.sqrt(m*m+y*y+x*x)>.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:c,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},346:function(t,e,r){"use strict";var n=r(6140),i=r(6968).u,a=r(2880).extendFlat,o=r(3400).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(t,e,r){"use strict";var n=r(696),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}},4772: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 d=n.calcTicks(c,{msUTC:!0}),p=0;p<d.length;++p)d[p].x=d[p].x*t.dataScale[u],"date"===c.type&&(d[p].text=d[p].text.replace(/\<br\>/g," "));l[u]=d,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]),p=0;p<2;++p)e.bounds[p][u]=t.glplot.bounds[p][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(4460),i=r(3400),a=["xaxis","yaxis","zaxis"],o=[0,0,0]},4424:function(t){"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},8432:function(t,e,r){"use strict";var n,i,a=r(5411).gl_plot3d,o=a.createCamera,s=a.createScene,l=r(5408),u=r(9184),c=r(4040),f=r(3400),h=f.preserveDrawingBuffer(),d=r(4460),p=r(3024),v=r(696),g=r(6576),m=r(4424),y=r(4728),x=r(9020),b=r(4772),_=r(9280).applyAutorangeOptions,w=!1;function M(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=y(e,e[this.id]),this.spikeOptions=x(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=c.getComponentMethod("annotations3d","convert"),this.drawAnnotations=c.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var T=M.prototype;T.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:h,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var A=!0;T.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!A||h)r=!1;else{f.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{h=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){h=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return A=!1,r},T.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"})},T.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){w=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!u&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},T.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(e),e.glplot.axes.update(e.axesOptions);for(var 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)),d.hoverLabelText(i,r,n)}if(null!==c){var y=m(e.glplot.cameraParams,h.dataCoordinate);t=c.data;var x,_=r._fullData[t.index],M=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)},A=p.castHoverinfo(_,e.fullLayout,M),k=(A||"").split("+"),L=A&&"all"===A;_.hovertemplate||L||(-1===k.indexOf("x")&&(T.xLabel=void 0),-1===k.indexOf("y")&&(T.yLabel=void 0),-1===k.indexOf("z")&&(T.zLabel=void 0),-1===k.indexOf("text")&&(h.textLabel=void 0),-1===k.indexOf("name")&&(c.name=void 0));var S=[];"cone"===t.type||"streamtube"===t.type?(T.uLabel=g("x",h.traceCoordinate[3],t.uhoverformat),(L||-1!==k.indexOf("u"))&&S.push("u: "+T.uLabel),T.vLabel=g("y",h.traceCoordinate[4],t.vhoverformat),(L||-1!==k.indexOf("v"))&&S.push("v: "+T.vLabel),T.wLabel=g("z",h.traceCoordinate[5],t.whoverformat),(L||-1!==k.indexOf("w"))&&S.push("w: "+T.wLabel),T.normLabel=h.traceCoordinate[6].toPrecision(3),(L||-1!==k.indexOf("norm"))&&S.push("norm: "+T.normLabel),"streamtube"===t.type&&(T.divergenceLabel=h.traceCoordinate[7].toPrecision(3),(L||-1!==k.indexOf("divergence"))&&S.push("divergence: "+T.divergenceLabel)),h.textLabel&&S.push(h.textLabel),x=S.join("<br>")):"isosurface"===t.type||"volume"===t.type?(T.valueLabel=d.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("<br>")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:M};p.appendArrayPointValue(E,_,M),t._module.eventData&&(E=_._module.eventData(E,h,_,{},M));var C={points:[E]};if(e.fullSceneLayout.hovermode){var O=[];p.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:c.name,color:p.castHoverOption(_,M,"bgcolor")||c.color,borderColor:p.castHoverOption(_,M,"bordercolor"),fontFamily:p.castHoverOption(_,M,"font.family"),fontSize:p.castHoverOption(_,M,"font.size"),fontColor:p.castHoverOption(_,M,"font.color"),nameLength:p.castHoverOption(_,M,"namelength"),textAlign:p.castHoverOption(_,M,"align"),hovertemplate:f.castOption(_,M,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:O}),E.bbox=O[0]}h.distance<5&&(h.buttons||w)?r.emit("plotly_click",C):r.emit("plotly_hover",C),this.oldEventData=C}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},T.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var k=["xaxis","yaxis","zaxis"];function L(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,d=0;d<(c||l.length);d++)if(f.isArrayOrTypedArray(l[d]))for(var p=0;p<l[d].length;++p)h=s.d2l(l[d][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 h=s.d2l(l[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 r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1)}}T.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&&L(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 d=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(n.dataScale=d,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 p=Object.keys(n.traces);t:for(o=0;o<p.length;++o){for(s=0;s<t.length;++s)if(t[s].uid===p[o]&&!0===t[s].visible&&0!==t[s]._length)continue t;(a=n.traces[p[o]]).dispose(),delete n.traces[p[o]]}n.glplot.objects.sort((function(t,e){return t._trace.data.index-e._trace.data.index}));var g,m=[[0,0,0],[0,0,0]],y=[],x={};for(o=0;o<3;++o){var b;if((u=(l=c[k[o]]).type)in x?(x[u].acc*=d[o],x[u].count+=1):x[u]={acc:d[o],count:1},l.autorange){m[0][o]=1/0,m[1][o]=-1/0;var w=n.glplot.objects,M=n.fullSceneLayout.annotations||[],T=l._name.charAt(0);for(s=0;s<w.length;s++){var A=w[s],S=A.bounds,E=A._trace.data._pad||0;"ErrorBars"===A.constructor.name&&l._lowerLogErrorBound?m[0][o]=Math.min(m[0][o],l._lowerLogErrorBound):m[0][o]=Math.min(m[0][o],S[0][o]/d[o]-E),m[1][o]=Math.max(m[1][o],S[1][o]/d[o]+E)}for(s=0;s<M.length;s++){var C=M[s];if(C.visible){var O=l.r2l(C[T]);m[0][o]=Math.min(m[0][o],O),m[1][o]=Math.max(m[1][o],O)}}if("rangemode"in l&&"tozero"===l.rangemode&&(m[0][o]=Math.min(m[0][o],0),m[1][o]=Math.max(m[1][o],0)),m[0][o]>m[1][o])m[0][o]=-1,m[1][o]=1;else{var R=m[1][o]-m[0][o];m[0][o]-=R/32,m[1][o]+=R/32}if(b=[m[0][o],m[1][o]],b=_(b,l),m[0][o]=b[0],m[1][o]=b[1],l.isReversed()){var P=m[0][o];m[0][o]=m[1][o],m[1][o]=P}}else b=l.range,m[0][o]=l.r2l(b[0]),m[1][o]=l.r2l(b[1]);m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),y[o]=m[1][o]-m[0][o],l.range=[m[0][o],m[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var D=c.aspectmode;if("cube"===D)g=[1,1,1];else if("manual"===D){var I=c.aspectratio;g=[I.x,I.y,I.z]}else{if("auto"!==D&&"data"!==D)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 N=x[u=(l=c[k[o]]).type];z[o]=Math.pow(N.acc,1/N.count)/d[o]}g="data"===D||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 j=n.container.style;j.position="absolute",j.left=B.l+F.x[0]*B.w+"px",j.top=B.t+(1-F.y[1])*B.h+"px",j.width=B.w*(F.x[1]-F.x[0])+"px",j.height=B.h*(F.y[1]-F.y[0])+"px"}n.glplot.redraw()}},T.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},T.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},T.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},T.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},T.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(t),h=s.isAspectChanged(t),d=u||h;if(d){var p={};u&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+".camera")).get(),p[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+".aspectratio")).get(),p[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",t,l._preGUI,p),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 d},T.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var h=r.id+".camera.up",d={x:0,y:0,z:1},p={};p[h]=d;var v=i.layout;c.call("_storeDirectGUIEdit",v,a._preGUI,p),o.up=d,f.nestedProperty(v,h).set(d)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},T.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<e;++a)for(var o=0;o<4;++o){var s=4*(e*n+a)+o,l=4*(e*i+a)+o,u=t[s];t[s]=t[l],t[l]=u}}(o,i,a),function(t,e,r){for(var n=0;n<r;++n)for(var i=0;i<e;++i){var a=4*(e*n+i),o=t[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,u=s.getContext("2d",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},T.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];d.setConvert(e,this.fullLayout),e.setScale=f.noop}},T.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(t._mockAxis,e)},t.exports=M},2094: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}},4859:function(t,e,r){"use strict";var n=r(5376),i=r(5656),a=r(2548),o=r(2872),s=r(4200),l=r(6741),u=r(2880).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"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:u({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},6741:function(t){"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},7316:function(t,e,r){"use strict";var n=r(3428),i=r(4336).m_,a=r(7624).SO,o=r(8248),s=r(3160),l=r(4040),u=r(3060),c=r(1780),f=r(3400),h=r(6308),d=r(9032).BADNUM,p=r(9811),v=r(1936).clearOutline,g=r(5308),m=r(5656),y=r(6672),x=r(4888)._M,b=f.relinkPrivateKeys,_=f._,w=t.exports={};f.extendFlat(w,l),w.attributes=r(5464),w.attributes.type.values=w.allTypes,w.fontAttrs=r(5376),w.layoutAttributes=r(4859),w.fontWeight="normal";var M=w.transformsRegistry,T=r(2460);w.executeAPICommand=T.executeAPICommand,w.computeAPICommandBindings=T.computeAPICommandBindings,w.manageCommandObserver=T.manageCommandObserver,w.hasSimpleAPICommandBindings=T.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=f.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=f.getGraphDiv(t);var r=new Promise((function(r,n){t&&!f.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||f.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=f.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:h.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function L(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=t._context.locales,u=0;u<2;u++){var c=(s[r]||{}).format;if(c&&(a(c),n))break;s=l.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||a(l.localeRegistry.en.format),i}function 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||M[n.type];if(i&&i.makesData)return!0}return!1}function C(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=M[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function O(t){return"string"==typeof t&&"px"===t.substr(t.length-2)&&parseFloat(t)}function R(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={}),t._reservedMargin||(t._reservedMargin={})}w.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,s=t._fullLayout={},u=t.layout||{},c=t._fullData||[],h=t._fullData=[],d=t.data||[],p=t.calcdata||[],g=t._context||{};t._transitionData||w.createTransitionData(t),s._dfltTitle={plot:_(t,"Click to enter Plot title"),x:_(t,"Click to enter X axis title"),y:_(t,"Click to enter Y axis title"),colorbar:_(t,"Click to enter Colorscale title"),annotation:_(t,"new text")},s._traceWord=_(t,"trace");var m=L(t,A);if(s._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var y=n.width,x=n.height;w.supplyLayoutGlobalDefaults(u,s,m),u.width||(s.width=y),u.height||(s.height=x),w.sanitizeMargins(s)}else{w.supplyLayoutGlobalDefaults(u,s,m);var M=!u.width||!u.height,T=s.autosize,S=g.autosizable;M&&(T||S)?w.plotAutoSize(t,u,s):M&&w.sanitizeMargins(s),!T&&M&&(u.width=s.width,u.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return e},timeFormat:i(t).utcFormat}}(m,s.separators),s._extraFormat=L(t,k),s._initialAutoSizeIsDone=!0,s._dataLength=d.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var E=s._subplots=function(){var t,e,r=l.collectableSubplotTypes,n={};if(!r){r=[];var i=l.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)f.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),C=s._splomAxes={x:{},y:{}},O=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),u={};function c(t,e){l[e]=t,u[t]=1}function h(t,e){if(t&&"string"==typeof t&&!u[t])return c(t,e),!0}for(r=0;r<i;r++){var d=e[r].uid;"number"==typeof d&&(d=String(d)),h(d,r)||r<s&&h(a[r].uid,r)||c(f.randstr(u),r)}return l}(c,d),s._globalTransforms=(t._context||{}).globalTransforms,w.supplyDataDefaults(d,h,u,s);var P=Object.keys(C.x),D=Object.keys(C.y);if(P.length>1&&D.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o<P.length;o++)f.pushUnique(E.xaxis,P[o]);for(o=0;o<D.length;o++)f.pushUnique(E.yaxis,D[o]);for(var I in O)f.pushUnique(E.cartesian,I)}if(s._has=w._hasPlotType.bind(s),c.length===h.length)for(o=0;o<h.length;o++)b(h[o],c[o]);w.supplyLayoutModuleDefaults(u,s,h,t._transitionData);var z=s._visibleModules,N=[];for(o=0;o<z.length;o++){var F=z[o].crossTraceDefaults;F&&f.pushUnique(N,F)}for(o=0;o<N.length;o++)N[o](h,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&P.length>15&&D.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(h,s,c,n),w.cleanPlot(h,s,c,n);var B=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||B,H=!(!s._has||!s._has("cartesian"))||j;U&&!H?n._bgLayer.remove():H&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&v({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a._meta={meta:a.meta}:e.meta&&(a._meta={meta:e.meta}),e.meta&&(a._meta.layout={meta:e.meta})}n.length&&(r||(r=e._meta={}),r.data=n)}(h,s),b(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(h,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var V,Y=s._tracePreGUI,G={};for(V in Y)G[V]="old";for(o=0;o<h.length;o++)G[V=h[o]._fullInput.uid]||(Y[V]={}),G[V]="new";for(V in G)"old"===G[V]&&delete Y[V];R(s),l.getComponentMethod("rangeslider","makeData")(s),r||p.length!==h.length||w.supplyDefaultsUpdateCalc(p,h)}},w.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,l,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],l=f.nestedProperty(a,s).get().slice(),f.nestedProperty(n,s).set(l)}i.trace=n}}},w.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},w._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=l.modules[i];if(a&&a.categories[t])return!0}return!1},w.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has("gl"),u=e._has&&e._has("gl");l&&!u&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var c=!!n._infolayer;t:for(i=0;i<r.length;i++){var f=r[i].uid;for(a=0;a<t.length;a++)if(f===t[a].uid)continue t;c&&n._infolayer.select(".cb"+f).remove()}},w.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},u=e._subplots,c={_fullData:t,_fullLayout:e},h=u.cartesian.concat(u.gl2d||[]);for(i=0;i<h.length;i++){var d,v=h[i],g=o[v],m=p.getFromId(c,v,"x"),y=p.getFromId(c,v,"y");for(g?d=s[v]=g:(d=s[v]={}).id=v,m._counterAxes.push(y._id),y._counterAxes.push(m._id),m._subplotsWith.push(v),y._subplotsWith.push(v),d.xaxis=m,d.yaxis=y,d._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===d.xaxis._id&&x.yaxis===d.yaxis._id&&!1===x.cliponaxis){d._hasClipOnAxisFalse=!0;break}}}var b,_=p.list(c,null,!0);for(i=0;i<_.length;i++){var w=null;(b=_[i]).overlaying&&(w=p.getFromId(c,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis="free"===b.anchor?null:p.getFromId(c,b.anchor)}for(i=0;i<_.length;i++)if((b=_[i])._counterAxes.sort(p.idSort),b._subplotsWith.sort(f.subplotSort),b._mainSubplot=S(b,e),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||l.getComponentMethod("rangeslider","isVisible")(b))){var M=1,T=0;for(a=0;a<b._counterAxes.length;a++){var A=p.getFromId(c,b._counterAxes[a]);M=Math.min(M,A.domain[0]),T=Math.max(T,A.domain[1])}M<T&&(b._counterDomainMin=M,b._counterDomainMax=T)}},w.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],u.crawl(t._module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,"color"===t.valType&&void 0===t.dflt&&e.push(r.join("."))}))),n=0;n<e.length;n++)f.nestedProperty(t,"_input."+e[n]).get()||f.nestedProperty(t,e[n]).set(null)},w.supplyDataDefaults=function(t,e,r,n){var i,a,o,s=n._modules,u=n._visibleModules,h=n._basePlotModules,d=0,p=0;function v(t){e.push(t);var r=t._module;r&&(f.pushUnique(s,r),!0===t.visible&&f.pushUnique(u,r),f.pushUnique(h,t._module.basePlotModule),d++,!1!==t._input.visible&&p++)}n._transformModules=[];var g={},m=[],y=(r.template||{}).data||{},x=c.traceTemplater(y);for(i=0;i<t.length;i++){if(o=t[i],(a=x.newTrace(o)).uid=n._traceUids[i],w.supplyTraceDefaults(o,a,p,n,i),a.index=i,a._input=o,a._expandedIndex=d,a.transforms&&a.transforms.length)for(var _=!1!==o.visible&&!1===a.visible,M=C(a,e,r,n),T=0;T<M.length;T++){var A=M[T],k={_template:a._template,type:a.type,uid:a.uid+T};_&&!1===A.visible&&delete A.visible,w.supplyTraceDefaults(A,k,d,n,i),b(k,A),k.index=i,k._input=o,k._fullInput=a,k._expandedIndex=d,k._expandedInput=A,v(k)}else a._fullInput=a,a._expandedInput=a,v(a);l.traceIs(a,"carpetAxis")&&(g[a.carpet]=a),l.traceIs(a,"carpetDependent")&&m.push(i)}for(i=0;i<m.length;i++)if((a=e[m[i]]).visible){var L=g[a.carpet];a._carpet=L,L&&L.visible?(a.xaxis=L.xaxis,a.yaxis=L.yaxis):a.visible=!1}},w.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return f.coerce(t||{},r,m,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=w.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=w.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=w.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=w.supplyAnimationTransitionDefaults(t.transition||{});return r},w.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,m.frame,r,n)}return r("duration"),r("redraw"),e},w.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,m.transition,r,n)}return r("duration"),r("easing"),e},w.supplyFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t,e,y,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},w.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||h.defaults,s=o[r%o.length];function u(r,n){return f.coerce(t,e,w.attributes,r,n)}var c=u("visible");u("type"),u("name",n._traceWord+" "+i),u("uirevision",n.uirevision);var d=w.getModule(e);if(e._module=d,d){var p=d.basePlotModule,v=p.attr,g=p.attributes;if(v&&g){var m=n._subplots,y="";if(c||"gl2d"!==p.name){if(Array.isArray(v))for(a=0;a<v.length;a++){var x=v[a],b=f.coerce(t,e,g,x);m[x]&&f.pushUnique(m[x],b),y+=b}else y=f.coerce(t,e,g,v);m[p.name]&&f.pushUnique(m[p.name],y)}}}if(c){if(u("customdata"),u("ids"),u("meta"),l.traceIs(e,"showLegend")?(f.coerce(t,e,d.attributes.showlegend?d.attributes:w.attributes,"showlegend"),u("legend"),u("legendwidth"),u("legendgroup"),u("legendgrouptitle.text"),u("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,d&&d.supplyDefaults(t,e,s,n),l.traceIs(e,"noOpacity")||u("opacity"),l.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),l.traceIs(e,"noHover")||(e.hovertemplate||f.coerceHoverinfo(t,e,n),"parcats"!==e.type&&l.getComponentMethod("fx","supplyDefaults")(t,e,s,n)),d&&d.selectPoints){var _=u("selectedpoints");f.isTypedArray(_)&&(e.selectedpoints=Array.from(_))}w.supplyTransformDefaults(t,e,n)}return e},w.hasMakesDataTransform=E,w.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,c=o[l],h=c.type,d=M[h],p=!(c._module&&c._module===d),v=d&&"function"==typeof d.transform;d||f.warn("Unrecognized transform type "+h+"."),d&&d.supplyDefaults&&(p||v)?((u=d.supplyDefaults(c,e,r,t)).type=h,u._module=d,f.pushUnique(i,d)):u=f.extendFlat({},c),s.push(u)}}},w.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return f.coerce(t,e,w.layoutAttributes,r,n)}var i=t.template;f.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),n("autotypenumbers");var a=f.coerceFont(n,"font"),o=a.size;f.coerceFont(n,"title.font",f.extendFlat({},a,{size:Math.round(1.4*o)})),n("title.text",e._dfltTitle.plot),n("title.xref");var s=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var u=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),u&&("paper"===s&&(0!==e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=0===e.title.y?"top":"bottom")),"container"===s&&("auto"===e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=e.title.y<.5?"bottom":"top"))),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(t.width&&t.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),t.width&&t.height&&w.sanitizeMargins(e),l.getComponentMethod("grid","sizeDefaults")(t,e),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var c=n("uirevision");n("editrevision",c),n("selectionrevision",c),l.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,n),l.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,n),n("meta"),f.isPlainObject(t.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),l.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),l.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,n),f.coerce(t,e,g,"scattermode")},w.plotAutoSize=function(t,e,r){var n,i,a=t._context||{},s=a.frameMargins,l=f.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(n=O(u.width)||O(u.maxWidth)||r.width,i=O(u.height)||O(u.maxHeight)||r.height,o(s)&&s>0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var h=w.layoutAttributes.width.min,d=w.layoutAttributes.height.min;n<h&&(n=h),i<d&&(i=d);var p=!e.width&&Math.abs(r.width-n)>1,v=!e.height&&Math.abs(r.height-i)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,u=e._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in u.length||u.push(c),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),c.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(f.subplotSort);for(a=0;a<u.length;a++)(o=u[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e._modules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var p=e._transformModules;for(a=0;a<p.length;a++)(o=p[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},w.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),f.clearThrottle(),f.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},w.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&f.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},w.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},w.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},w.autoMargin=function(t,e,r){var n=t._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=f.constrain(i-o.l-o.r,2,s),c=f.constrain(a-o.t-o.b,2,l),h=Math.max(0,i-u),d=Math.max(0,a-c),p=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 m=(r.l+r.r)/h;m>1&&(r.l/=m,r.r/=m)}if(d){var y=(r.t+r.b)/d;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,M=void 0!==r.yb?r.yb:r.y;p[e]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:M,size:r.b+g},t:{val:_,size:r.t+g}},v[e]=1}else delete p[e],delete v[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),R(e);var i=e._size,a=e.margin,s={t:0,b:0,l:0,r:0},u=f.extendFlat({},i),c=a.l,h=a.r,d=a.t,v=a.b,g=e._pushmargin,m=e._pushmarginIds,y=e.minreducedwidth,x=e.minreducedheight;if(!1!==a.autoexpand){for(var b in g)m[b]||delete g[b];var _=t._fullLayout._reservedMargin;for(var M in _)for(var T in _[M]){var A=_[M][T];s[T]=Math.max(s[T],A)}for(var k in g.base={l:{val:0,size:c},r:{val:1,size:h},t:{val:1,size:d},b:{val:0,size:v}},s){var L=0;for(var S in g)"base"!==S&&o(g[S][k].size)&&(L=g[S][k].size>L?g[S][k].size:L);var E=Math.max(0,a[k]-L);s[k]=Math.max(0,s[k]-E)}for(var C in g){var O=g[C].l||{},P=g[C].b||{},D=O.val,I=O.size,z=P.val,N=P.size,F=r-s.r-s.l,B=n-s.t-s.b;for(var j in g){if(o(I)&&g[j].r){var U=g[j].r.val,H=g[j].r.size;if(U>D){var V=(I*U+(H-F)*D)/(U-D),Y=(H*(1-D)+(I-F)*(1-U))/(U-D);V+Y>c+h&&(c=V,h=Y)}}if(o(N)&&g[j].t){var G=g[j].t.val,W=g[j].t.size;if(G>z){var q=(N*G+(W-B)*z)/(G-z),X=(W*(1-z)+(N-B)*(1-G))/(G-z);q+X>v+d&&(v=q,d=X)}}}}}var Z=f.constrain(r-a.l-a.r,2,y),J=f.constrain(n-a.t-a.b,2,x),K=Math.max(0,r-Z),Q=Math.max(0,n-J);if(K){var $=(c+h)/K;$>1&&(c/=$,h/=$)}if(Q){var tt=(v+d)/Q;tt>1&&(v/=tt,d/=tt)}if(i.l=Math.round(c)+s.l,i.r=Math.round(h)+s.r,i.t=Math.round(d)+s.t,i.b=Math.round(v)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(u,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=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 et=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount<et)return l.call("_doPlot",t);e._size=u,f.warn("Too many auto-margin redraws.")}!function(t){var e=p.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var P=["l","r","t","b","p","w","h"];function D(t,e,r){var n=!1,i=[w.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,w.rehover,w.reselect,function(){return t.emit("plotly_transitioning",[]),new Promise((function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],a=f.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r<P.length;r++){var n=P[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)return!0}return!1},w.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,u=(t._transitionData||{})._frames;function c(t,e){if("function"==typeof t)return e?"_function_":null;if(f.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(t[a],e)}else e&&(i[a]="_function")})),i}var a=Array.isArray(t),o=f.isTypedArray(t);if((a||o)&&t.dtype&&t.shape){var l=t.bdata;return c({dtype:t.dtype,shape:t.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map((function(t){return c(t,e)})):o?f.simpleMap(t,f.identity):f.isJSDate(t)?f.ms2DateTimeLocal(+t):t}var h={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(h.layout=c(l),i)){var d=l._size;h.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return u&&(h.frames=c(u)),a&&(h.config=c(t._context,!0)),"object"===n?h:JSON.stringify(h)},w.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case"replace":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case"insert":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case"delete":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},w.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error("computeFrame must be given a string frame name");var s=o[e.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===u.indexOf(s.name);)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=w.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(c.traces||(c.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=c.traces.indexOf(i))&&(a=c.data.length,c.traces[a]=i),c.data[a]=w.extendTrace(c.data[a],s.data[r]))}return c},w.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},w.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,u,c=f.extendDeepNoArrays({},e||{}),h=f.expandObjectPaths(c),d={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=f.nestedProperty(h,r[a])).get())?f.nestedProperty(d,r[a]).set(null):(n.set(null),f.nestedProperty(d,r[a]).set(i));if(t=f.extendDeepNoArrays(t||{},h),r&&r.length)for(a=0;a<r.length;a++)if(l=f.nestedProperty(d,r[a]).get()){for(u=(s=f.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<l.length;o++){var p=l[o];u[o]=null===p?null:w.extendObjectWithContainers(u[o],p)}s.set(u)}return t},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=l.layoutArrayContainers,w.extendTrace=function(t,e){return w.extendObjectWithContainers(t,e,w.dataArrayContainers)},w.extendLayout=function(t,e){return w.extendObjectWithContainers(t,e,w.layoutArrayContainers)},w.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var u=a[o],c=t._fullData[u]._module;if(c){if(c.animatable){var h=c.basePlotModule.name;s[h]||(s[h]=[]),s[h].push(u)}t.data[a[o]]=w.extendTrace(t.data[a[o]],e[o])}}var d=f.expandObjectPaths(f.extendDeepNoArrays({},r)),p=/^[xy]axis[0-9]*$/;for(var v in d)p.test(v)&&delete d[v].range;w.extendLayout(t.layout,d),delete t.calcdata,w.supplyDefaults(t),w.doCalcdata(t);var g=f.expandObjectPaths(r);if(g){var m=t._fullLayout._plots;for(var y in m){var x=m[y],b=x.xaxis,_=x.yaxis,M=b.range.slice(),T=_.range.slice(),A=null,k=null,L=null,S=null;Array.isArray(g[b._name+".range"])?A=g[b._name+".range"].slice():Array.isArray((g[b._name]||{}).range)&&(A=g[b._name].range.slice()),Array.isArray(g[_._name+".range"])?k=g[_._name+".range"].slice():Array.isArray((g[_._name]||{}).range)&&(k=g[_._name].range.slice()),M&&A&&(b.r2l(M[0])!==b.r2l(A[0])||b.r2l(M[1])!==b.r2l(A[1]))&&(L={xr0:M,xr1:A}),T&&k&&(_.r2l(T[0])!==_.r2l(k[0])||_.r2l(T[1])!==_.r2l(k[1]))&&(S={yr0:T,yr1:k}),(L||S)&&l.push(f.extendFlat({plotinfo:x},L,S))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var c in u?((n=f.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var h=s[c];t._fullData[h[0]]._module.basePlotModule.plot(t,h,n,e)}},D(t,a,o)},w.transitionFromReact=function(t,e,r,n){var i=t._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i._plots;for(var a in o.redraw=!1,"some"===e.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),t){var l=t[a],u=l.xaxis,c=l.yaxis,h=n[u._name].range.slice(),d=n[c._name].range.slice(),p=u.range.slice(),v=c.range.slice();u.setScale(),c.setScale();var g=null,m=null;u.r2l(h[0])===u.r2l(p[0])&&u.r2l(h[1])===u.r2l(p[1])||(g={xr0:h,xr1:p}),c.r2l(d[0])===c.r2l(v[0])&&c.r2l(d[1])===c.r2l(v[1])||(m={yr0:d,yr1:v}),(g||m)&&s.push(f.extendFlat({plotinfo:l},g,m))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,u=t._fullLayout._basePlotModules,c=[],h=0;h<l.length;h++)c.push(h);function d(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].transitionAxes&&u[e].transitionAxes(t,s,n,r)}function p(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].plot(t,o,i,r)}s.length&&e.anim?"traces first"===a.ordering?(n=f.extendFlat({},a,{duration:0}),o=c,i=a,setTimeout(d,a.duration),p()):(n=a,o=null,i=f.extendFlat({},a,{duration:0}),setTimeout(p,n.duration),d()):s.length?(n=a,d()):e.anim&&(o=c,i=a,p())},D(t,a,o)},w.doCalcdata=function(t,e){var r,n,i,a,o=p.list(t),s=t._fullData,c=t._fullLayout,h=new Array(s.length),v=(t.calcdata||[]).slice();for(t.calcdata=h,c._numBoxes=0,c._numViolins=0,c._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,c._piecolormap={},c._sunburstcolormap={},c._treemapcolormap={},c._iciclecolormap={},c._funnelareacolormap={},i=0;i<s.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(h[i]=v[i]);for(i=0;i<s.length;i++)(r=s[i])._arrayAttrs=u.findArrayAttributes(r),r._extremes={};var g=c._subplots.polar||[];for(i=0;i<g.length;i++)o.push(c[g[i]].radialaxis,c[g[i]].angularaxis);for(var m in c._colorAxes){var y=c[m];!1!==y.cauto&&(delete y.cmin,delete y.cmax)}var x=!1;function b(e){if(r=s[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=M[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(t,r,o))}}}function _(e,i){if(r=s[e],!!(n=r._module).isContainer===i){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var l=r.transforms||[];for(a=l.length-1;a>=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:d,y:d}]),o[0].t||(o[0].t={}),o[0].trace=r,h[e]=o}}for(z(o,s,c),i=0;i<s.length;i++)_(i,!0);for(i=0;i<s.length;i++)b(i);for(x&&z(o,s,c),i=0;i<s.length;i++)_(i,!0);for(i=0;i<s.length;i++)_(i,!1);N(t);var w=function(t,e){var r,n,i,a,o,s=[];function u(t,r,n){var i=r._id.charAt(0);if("histogram2dcontour"===t){var a=r._counterAxes[0],o=p.getFromId(e,a),s="x"===i||"x"===a&&"category"===o.type,l="y"===i||"y"===a&&"category"===o.type;return function(t,e){return 0===t||0===e||s&&t===n[e].length-1||l&&e===n.length-1?-1:("y"===i?e:t)-1}}return function(t,e){return"y"===i?e:t}}var c={min:function(t){return f.aggNums(Math.min,null,t)},max:function(t){return f.aggNums(Math.max,null,t)},sum:function(t){return f.aggNums((function(t,e){return t+e}),null,t)},total:function(t){return f.aggNums((function(t,e){return t+e}),null,t)},mean:function(t){return f.mean(t)},median:function(t){return f.median(t)}};function h(t,e){return t[1]-e[1]}function d(t,e){return e[1]-t[1]}for(r=0;r<t.length;r++){var v=t[r];if("category"===v.type){var g=v.categoryorder.match(I);if(g){var m=g[1],y=g[2],x=v._id.charAt(0),b="x"===x,_=[];for(n=0;n<v._categories.length;n++)_.push([v._categories[n],[]]);for(n=0;n<v._traceIndices.length;n++){var w=v._traceIndices[n],M=e._fullData[w];if(!0===M.visible){var T=M.type;l.traceIs(M,"histogram")&&(delete M._xautoBinFinished,delete M._yautoBinFinished);var A="splom"===T,k="scattergl"===T,L=e.calcdata[w];for(i=0;i<L.length;i++){var S,E,C=L[i];if(A){var O=M._axesDim[v._id];if(!b){var R=M._diag[O][0];R&&(v=e._fullLayout[p.id2name(R)])}var P=C.trace.dimensions[O].values;for(a=0;a<P.length;a++)for(S=v._categoriesMap[P[a]],o=0;o<C.trace.dimensions.length;o++)if(o!==O){var D=C.trace.dimensions[o];_[S][1].push(D.values[a])}}else if(k){for(a=0;a<C.t.x.length;a++)b?(S=C.t.x[a],E=C.t.y[a]):(S=C.t.y[a],E=C.t.x[a]),_[S][1].push(E);C.t&&C.t._scene&&delete C.t._scene.dirty}else if(C.hasOwnProperty("z")){E=C.z;var z=u(M.type,v,E);for(a=0;a<E.length;a++)for(o=0;o<E[a].length;o++)(S=z(o,a))+1&&_[S][1].push(E[a][o])}else for(void 0===(S=C.p)&&(S=C[x]),void 0===(E=C.s)&&(E=C.v),void 0===E&&(E=b?C.y:C.x),Array.isArray(E)||(E=void 0===E?[]:[E]),a=0;a<E.length;a++)_[S][1].push(E[a])}}}v._categoriesValue=_;var N=[];for(n=0;n<_.length;n++)N.push([_[n][0],c[m](_[n][1])]);N.sort("descending"===y?d:h),v._categoriesAggregatedValue=N,v._initialCategories=N.map((function(t){return t[0]})),s=s.concat(v.sortByInitialCategories())}}}return s}(o,t);if(w.length){for(c._numBoxes=0,c._numViolins=0,i=0;i<w.length;i++)_(w[i],!0);for(i=0;i<w.length;i++)_(w[i],!1);N(t)}l.getComponentMethod("fx","calc")(t),l.getComponentMethod("errorbars","calc")(t)};var I=/(total|sum|min|max|mean|median) (ascending|descending)/;function z(t,e,r){var n={};function i(t){t.clearCalc(),"multicategory"===t.type&&t.setupMultiCategory(e),n[t._id]=1}f.simpleMap(t,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[p.id2name(s)])}function N(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;o[u]?f.pushUnique(o[u],l):o[u]=[l]}}for(n in o){var c=o[n],h=i._subplots[n];if(Array.isArray(h))for(e=0;e<h.length;e++){var d=h[e],p="cartesian"===n?i._plots[d]:i[d];for(r=0;r<c.length;r++)c[r](t,p,d)}else for(r=0;r<c.length;r++)c[r](t)}}w.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},w.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()},w.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,n=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(n);l.getComponentMethod("selections","reselect")(t,i)},w.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var u in a)if(!o[u]){var c=a[u][0];c[0].trace.visible=!1,o[u]=[c]}for(var h in o){var d=o[h];d[0][0].trace._module.plot(t,e,f.filterVisible(d),n)}e.traceHash=o},w.plotBasePlot=function(t,e,r,n,i){var a=l.getModule(t),o=x(e.calcdata,a)[0];a.plot(e,o,n,i)},w.cleanBasePlot=function(t,e,r,n,i){var a=i._has&&i._has(t),o=r._has&&r._has(t);a&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()}},168:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(6968).Q;t.exports=function(t,e,r,o){var s,l,u=o.type,c=o.attributes,f=o.handleDefaults,h=o.partition||"x",d=e._subplots[u],p=d.length,v=p&&d[0].replace(/\d+$/,"");function g(t,e){return n.coerce(s,l,c,t,e)}for(var m=0;m<p;m++){var y=d[m];s=t[y]?t[y]:t[y]={},l=i.newContainer(e,y,v),o.noUirevision||g("uirevision",e.uirevision);var x={};x[h]=[m/p,(m+1)/p],a(l,e,g,x),o.id=y,f(s,l,g,o)}}},1776:function(t,e,r){"use strict";var n=r(6880);function i(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]="`"+r[i]+"`";e+="Finally, the template string has access to ",e=1===r.length?e+"variable "+n[0]:e+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return e}n.FORMAT_LINK,n.DATE_FORMAT_LINK,e.Ks=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"none"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.Gw=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"calc"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.ye=function(t,e){return e=e||{},(t=t||{}).newshape,i(e),{valType:"string",dflt:"",editType:t.editType||"arraydraw"}}},4040:function(t,e,r){"use strict";var n=r(4248),i=r(6628),a=r(2416),o=r(3620),s=r(2200).addStyleRule,l=r(2880),u=r(5464),c=r(4859),f=l.extendFlat,h=l.extendDeepAll;function d(t){var r=t.name,i=t.categories,a=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in m(t),e.subplotsRegistry[r]=t,e.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l<i.length;l++)o[i[l]]=!0,e.allCategories[i[l]]=!0;for(var u in e.modules[r]={_module:t,categories:o},a&&Object.keys(a).length&&(e.modules[r].meta=a),e.allTypes.push(r),e.componentsRegistry)y(u,r);t.layoutAttributes&&f(e.traceLayoutAttributes,t.layoutAttributes);var c=t.basePlotModule,h=c.name;if("mapbox"===h){var d=c.constants.styleRules;for(var p in d)s(".js-plotly-plot .plotly .mapboxgl-"+p,d[p])}"geo"!==h&&"mapbox"!==h||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function p(t){if("string"!=typeof t.name)throw new Error("Component module *name* must be a string.");var r=t.name;for(var n in e.componentsRegistry[r]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(e.layoutArrayContainers,r),m(t)),e.modules)y(r,n);for(var i in e.subplotsRegistry)b(r,i);for(var o in e.transformsRegistry)x(r,o);t.schema&&t.schema.layout&&h(c,t.schema.layout)}function v(t){if("string"!=typeof t.name)throw new Error("Transform module *name* must be a string.");var r="Transform module "+t.name,i="function"==typeof t.transform,a="function"==typeof t.calcTransform;if(!i&&!a)throw new Error(r+" is missing a *transform* or *calcTransform* method.");for(var s in i&&a&&n.log([r+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(t.attributes)||n.log(r+" registered without an *attributes* object."),"function"!=typeof t.supplyDefaults&&n.log(r+" registered without a *supplyDefaults* method."),e.transformsRegistry[t.name]=t,e.componentsRegistry)x(s,t.name)}function g(t){var r=t.name,n=r.split("-")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=e.localeRegistry,u=l[r];if(u||(l[r]=u={}),n!==r){var c=l[n];c||(l[n]=c={}),o&&c.dictionary===u.dictionary&&(c.dictionary=i),s&&c.format===u.format&&(c.format=a)}o&&(u.dictionary=i),s&&(u.format=a)}function m(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n<r.length;n++)a(e.layoutArrayRegexes,r[n])}}function y(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[r];i&&h(e.modules[r]._module.attributes,i)}}function x(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[r];i&&h(e.transformsRegistry[r].attributes,i)}}function b(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.subplots){var i=e.subplotsRegistry[r],a=i.layoutAttributes,o="subplot"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&h(a,s)}}function _(t){return"object"==typeof t&&(t=t.type),t}e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.transformsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(t){if(e.collectableSubplotTypes=null,!t)throw new Error("No argument passed to Plotly.register.");t&&!Array.isArray(t)&&(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":d(n);break;case"transform":v(n);break;case"component":p(n);break;case"locale":g(n);break;case"apiMethod":var i=n.name;e.apiMethodRegistry[i]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},e.getModule=function(t){var r=e.modules[_(t)];return!!r&&r._module},e.traceIs=function(t,r){if("various"===(t=_(t)))return!1;var i=e.modules[t];return i||(t&&n.log("Unrecognized trace type "+t+"."),i=e.modules[u.type.dflt]),!!i.categories[r]},e.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},e.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},e.getComponentMethod=function(t,r){var n=e.componentsRegistry[t];return n&&n[r]||i},e.call=function(){var t=arguments[0],r=[].slice.call(arguments,1);return e.apiMethodRegistry[t].apply(null,r)}},1536:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=i.extendFlat,o=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,u=t.layout,c=o([],l),f=o({},u,s(e.tileClass)),h=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var d=Object.keys(f);for(r=0;r<d.length;r++)i=d[r],["xaxis","yaxis","zaxis"].indexOf(i.slice(0,5))>-1&&(f[d[r]].title={text:""});for(r=0;r<c.length;r++){var p=c[r];p.showscale=!1,p.marker&&(p.marker.showscale=!1),n.traceIs(p,"pie-like")&&(p.textposition="none")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)f.annotations.push(e.annotations[r]);var v=Object.keys(f).filter((function(t){return t.match(/^scene\d*$/)}));if(v.length){var g={};for("thumbnail"===e.tileClass&&(g={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<v.length;r++){var m=f[v[r]];m.xaxis||(m.xaxis={}),m.yaxis||(m.yaxis={}),m.zaxis||(m.zaxis={}),a(m.xaxis,g),a(m.yaxis,g),a(m.zaxis,g),m._scene=null}}var y=document.createElement("div");e.tileClass&&(y.className=e.tileClass);var x={gd:y,td:y,layout:f,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:h.mapboxAccessToken}};return"transparent"!==e.setBackground&&(x.config.setBackground=e.setBackground||"opaque"),x.gd.defaultLayout=s(e.tileClass),x}},7412:function(t,e,r){"use strict";var n=r(3400),i=r(7024),a=r(8616),o=r(7030);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var u=i(t,e),c=e.filename||t.fn||"newplot";c+="."+e.format.replace("-","."),u.then((function(t){return r&&(r._snapshotInProgress=!1),a(t,c,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},8616:function(t,e,r){"use strict";var n=r(3400),i=r(7030);t.exports=function(t,e,r){var a=document.createElement("a"),o="download"in a;return new Promise((function(s,l){var u,c;if(n.isIE())return u=i.createBlob(t,"svg"),window.navigator.msSaveBlob(u,e),u=null,s(e);if(o)return u=i.createBlob(t,r),c=i.createObjectURL(u),a.href=c,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),i.revokeObjectURL(c),u=null,s(e);if(n.isSafari()){var f="svg"===r?",":";base64,";return i.octetStream(f+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},7030:function(t,e,r){"use strict";var n=r(4040);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i<e;i++)n[i]=t.charCodeAt(i);return r}(window.atob(t));return new window.Blob([r],{type:"image/"+e})},e.octetStream=function(t){document.location.href="data:application/octet-stream"+t},e.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,e.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},8904:function(t,e,r){"use strict";var n=r(7030),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(1536),toSVG:r(7164),svgToImg:r(3268),toImage:r(1808),downloadImage:r(7412)};t.exports=i},3268:function(t,e,r){"use strict";var n=r(3400),i=r(1252).EventEmitter,a=r(7030);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,o){var s=window.Image,l=t.svg,u=t.format||"png";if(n.isIE()&&"svg"!==u){var c=new Error(a.MSG_IE_BAD_FORMAT);return o(c),t.promise?r:e.emit("error",c)}var f,h,d=t.canvas,p=t.scale||1,v=t.width||300,g=t.height||150,m=p*v,y=p*g,x=d.getContext("2d",{willReadFrequently:!0}),b=new s;"svg"===u||n.isSafari()?h=a.encodeSVG(l):(f=a.createBlob(l,"svg"),h=a.createObjectURL(f)),d.width=m,d.height=y,b.onload=function(){var r;switch(f=null,a.revokeObjectURL(h),"svg"!==u&&x.drawImage(b,0,0,m,y),u){case"jpeg":r=d.toDataURL("image/jpeg");break;case"png":r=d.toDataURL("image/png");break;case"webp":r=d.toDataURL("image/webp");break;case"svg":r=h;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},b.onerror=function(r){if(f=null,a.revokeObjectURL(h),o(r),!t.promise)return e.emit("error",r)},b.src=h}));return t.promise?r:e}},1808:function(t,e,r){"use strict";var n=r(1252).EventEmitter,i=r(4040),a=r(3400),o=r(7030),s=r(1536),l=r(7164),u=r(3268);t.exports=function(t,e){var r=new n,c=s(t,{format:"png"}),f=c.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call("_doPlot",f,c.data,c.layout,c.config).then(h).then((function(){var t=o.getDelay(f._fullLayout);setTimeout((function(){var t=l(f),n=document.createElement("canvas");n.id=a.randstr(),(r=u({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}}),t)})).catch((function(t){r.emit("error",t)})),r}},7164:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(3616),o=r(6308),s=r(9616),l=/"/g,u="TOBESTRIPPED",c=new RegExp('("'+u+")|("+u+'")',"g");t.exports=function(t,e,r){var f,h=t._fullLayout,d=h._paper,p=h._toppaper,v=h.width,g=h.height;d.insert("rect",":first-child").call(a.setRect,0,0,v,g).call(o.fill,h.paper_bgcolor);var m=h._basePlotModules||[];for(f=0;f<m.length;f++){var y=m[f];y.toSVG&&y.toSVG(t)}if(p){var x=p.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&d.node().appendChild(_)}}h._draggers&&h._draggers.remove(),d.node().style.background="",d.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var t=n.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('"')&&t.style("font-family",e.replace(l,u))}else t.remove()})),d.selectAll(".gradient_filled,.pattern_filled").each((function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,u));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,u))})),"pdf"!==e&&"eps"!==e||d.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),d.node().setAttributeNS(s.xmlns,"xmlns",s.svg),d.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(d.attr("width",r*v),d.attr("height",r*g),d.attr("viewBox","0 0 "+v+" "+g));var w=(new window.XMLSerializer).serializeToString(d.node());return w=(w=(w=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,(function(t){return"&lt;"===t?"&#60;":"&rt;"===t?"&#62;":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(c,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},6376:function(t,e,r){"use strict";var n=r(8248),i=r(3400).isArrayOrTypedArray,a=r(9032).BADNUM,o=r(4040),s=r(4460),l=r(1888).getAxisGroup,u=r(2592);function c(t,e,r,o,c){if(o.length){var b,_,w,M;switch(function(t,e){var r,a;for(r=0;r<e.length;r++){var o,s=e[r],l=s[0].trace,u="funnel"===l.type?l._base:l.base,c="h"===l.orientation?l.xcalendar:l.ycalendar,f="category"===t.type||"multicategory"===t.type?function(){return null}:t.d2c;if(i(u)){for(a=0;a<Math.min(u.length,s.length);a++)o=f(u[a],0,c),n(o)?(s[a].b=+o,s[a].hasB=1):s[a].b=0;for(;a<s.length;a++)s[a].b=0}else{o=f(u,0,c);var h=n(o);for(o=h?o:0,a=0;a<s.length;a++)s[a].b=o,h&&(s[a].hasB=1)}}}(r,o),c.mode){case"overlay":f(e,r,o,c);break;case"group":for(b=[],_=[],w=0;w<o.length;w++)void 0===(M=o[w])[0].trace.offset?_.push(M):b.push(M);_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});(function(t,e,r,n){for(var i=t._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,c=u.length,f=a.length!==o.length,h=s*(1-n.gap),g=l(i,e._id)+u[0][0].trace.orientation,m=i._alignmentOpts[g]||{},y=0;y<c;y++){var x,b,_=u[y],w=_[0].trace,M=m[w.alignmentgroup]||{},T=Object.keys(M.offsetGroups||{}).length,A=(x=T?h/T:f?h/c:h)*(1-(n.groupgap||0));b=T?((2*w._offsetIndex+1-T)*x-A)/2:f?((2*y+1-c)*x-A)/2:-A/2;var k=_[0].t;k.barwidth=A,k.poffset=b,k.bargroupwidth=h,k.bardelta=s}r.binWidth=u[0][0].t.barwidth/100,d(r),p(e,r),v(e,r,f)})(t,e,o,i),function(t,e){for(var r=t.traces,n=0;n<r.length;n++){var i=r[n];if(void 0===i[0].trace.base)for(var o=new u([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var l=i[s];if(l.p!==a){var c=o.put(l.p,l.b+l.s);c&&(l.b=c)}}}}(o,e),i.norm?(m(o),y(r,o,i)):g(r,o)}(t,e,r,_,c),b.length&&f(e,r,b,c);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(M=o[w])[0].trace.base?_.push(M):b.push(M);!function(t){if(!(t.length<2)){var e,r,i,a,o,s;for(e=0;e<t.length&&void 0===(a=(r=t[e][0].trace).marker?r.marker.cornerradius:void 0);e++);if(void 0!==a)for(o=n(a)?+a:+a.slice(0,-1),s=n(a)?"px":"%",e=0;e<t.length;e++)(i=t[e][0].t).cornerradiusvalue=o,i.cornerradiusform=s}}(_),_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:"relative"===i.mode,overlapNoMerge:!(i.norm||"stack"===i.mode||"relative"===i.mode)});h(e,o,i),function(t,e,r){var n,i,o,l,u,c,f=x(t),h=e.traces;for(l=0;l<h.length;l++)if("funnel"===(i=(n=h[l])[0].trace).type)for(u=0;u<n.length;u++)(c=n[u]).s!==a&&e.put(c.p,-.5*c.s);for(l=0;l<h.length;l++){o="funnel"===(i=(n=h[l])[0].trace).type;var d=[];for(u=0;u<n.length;u++)if((c=n[u]).s!==a){var p;p=o?c.s:c.s+c.b;var v=e.put(c.p,p),g=v+p;c.b=v,c[f]=g,r.norm||(d.push(g),c.hasB&&d.push(v))}r.norm||(i._extremes[t._id]=s.findExtremes(t,d,{tozero:!0,padded:!0}))}}(r,o,i);for(var l=0;l<n.length;l++)for(var c=n[l],f=0;f<c.length;f++){var d=c[f];d.s!==a&&d.b+d.s===o.get(d.p,d.s)&&(d._outmost=!0)}i.norm&&y(r,o,i)}(0,e,r,_,c),b.length&&f(e,r,b,c)}!function(t){var e,r,i,a,o,s,l;for(e=0;e<t.length;e++)i=(r=t[e])[0].trace,void 0===(a=r[0].t).cornerradiusvalue&&void 0!==(o=i.marker?i.marker.cornerradius:void 0)&&(s=n(o)?+o:+o.slice(0,-1),l=n(o)?"px":"%",a.cornerradiusvalue=s,a.cornerradiusform=l)}(o),function(t,e){var r,a,o,s=x(e),l={},u=1/0,c=-1/0;for(r=0;r<t.length;r++)for(o=t[r],a=0;a<o.length;a++){var f=o[a].p;n(f)&&(u=Math.min(u,f),c=Math.max(c,f))}var h=1e4/(c-u),d=l.round=function(t){return String(Math.round(h*(t-u)))},p={},v={},g=t.some((function(t){var e=t[0].trace;return"marker"in e&&e.marker.cornerradius}));for(r=0;r<t.length;r++){(o=t[r])[0].t.extents=l;var m=o[0].t.poffset,y=i(m);for(a=0;a<o.length;a++){var b=o[a],_=b[s]-b.w/2;if(n(_)){var w=b[s]+b.w/2,M=d(b.p);l[M]?l[M]=[Math.min(_,l[M][0]),Math.max(w,l[M][1])]:l[M]=[_,w]}if(b.p0=b.p+(y?m[a]:m),b.p1=b.p0+b.w,b.s0=b.b,b.s1=b.s0+b.s,g){var T=Math.min(b.s0,b.s1)||0,A=Math.max(b.s0,b.s1)||0,k=b[s];p[k]=k in p?Math.min(p[k],T):T,v[k]=k in v?Math.max(v[k],A):A}}}g&&function(t,e,r,n){for(var i=x(n),a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=e[u],l._sMax=r[u]}}(t,p,v,e)}(o,e)}}function f(t,e,r,n){for(var i=0;i<r.length;i++){var a=r[i],o=new u([a],{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});h(t,o,n),n.norm?(m(o),y(e,o,n)):g(e,o)}}function h(t,e,r){for(var n=e.minDiff,i=e.traces,a=n*(1-r.gap),o=a*(1-(r.groupgap||0)),s=-o/2,l=0;l<i.length;l++){var u=i[l][0].t;u.barwidth=o,u.poffset=s,u.bargroupwidth=a,u.bardelta=n}e.binWidth=i[0][0].t.barwidth/100,d(e),p(t,e),v(t,e)}function d(t){var e,r,a=t.traces;for(e=0;e<a.length;e++){var o,s=a[e],l=s[0],u=l.trace,c=l.t,f=u._offset||u.offset,h=c.poffset;if(i(f)){for(o=Array.prototype.slice.call(f,0,s.length),r=0;r<o.length;r++)n(o[r])||(o[r]=h);for(r=o.length;r<s.length;r++)o.push(h);c.poffset=o}else void 0!==f&&(c.poffset=f);var d=u._width||u.width,p=c.barwidth;if(i(d)){var v=Array.prototype.slice.call(d,0,s.length);for(r=0;r<v.length;r++)n(v[r])||(v[r]=p);for(r=v.length;r<s.length;r++)v.push(p);if(c.barwidth=v,void 0===f){for(o=[],r=0;r<s.length;r++)o.push(h+(p-v[r])/2);c.poffset=o}}else void 0!==d&&(c.barwidth=d,void 0===f&&(c.poffset=h+(p-d)/2))}}function p(t,e){for(var r=e.traces,n=x(t),a=0;a<r.length;a++)for(var o=r[a],s=o[0].t,l=s.poffset,u=i(l),c=s.barwidth,f=i(c),h=0;h<o.length;h++){var d=o[h],p=d.w=f?c[h]:c;void 0===d.p&&(d.p=d[n],d["orig_"+n]=d[n]);var v=(u?l[h]:l)+p/2;d[n]=d.p+v}}function v(t,e,r){var n=e.traces,a=e.minDiff/2;s.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<n.length;o++){var l,u,c,f,h=n[o],d=h[0],p=d.trace,v=[];for(f=0;f<h.length;f++)u=(l=h[f]).p-a,c=l.p+a,v.push(u,c);if(p.width||p.offset){var g=d.t,m=g.poffset,y=g.barwidth,x=i(m),b=i(y);for(f=0;f<h.length;f++){l=h[f];var _=x?m[f]:m,w=b?y[f]:y;c=(u=l.p+_)+w,v.push(u,c)}}p._extremes[t._id]=s.findExtremes(t,v,{padded:!1})}}function g(t,e){for(var r=e.traces,n=x(t),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,l="scatter"===o.type,u="v"===o.orientation,c=[],f=!1,h=0;h<a.length;h++){var d=a[h],p=l?0:d.b,v=l?u?d.y:d.x:p+d.s;d[n]=v,c.push(v),d.hasB&&c.push(p),d.hasB&&d.b||(f=!0)}o._extremes[t._id]=s.findExtremes(t,c,{tozero:f,padded:!0})}}function m(t){for(var e=t.traces,r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var o=n[i];o.s!==a&&t.put(o.p,o.b+o.s)}}function y(t,e,r){var i=e.traces,o=x(t),l="fraction"===r.norm?1:100,u=l/1e9,c=t.l2c(t.c2l(0)),f="stack"===r.mode?l:c;function h(e){return n(t.c2l(e))&&(e<c-u||e>f+u||!n(c))}for(var d=0;d<i.length;d++){for(var p=i[d],v=p[0].trace,g=[],m=!1,y=!1,b=0;b<p.length;b++){var _=p[b];if(_.s!==a){var w=Math.abs(l/e.get(_.p,_.s));_.b*=w,_.s*=w;var M=_.b,T=M+_.s;_[o]=T,g.push(T),y=y||h(T),_.hasB&&(g.push(M),y=y||h(M)),_.hasB&&_.b||(m=!0)}}v._extremes[t._id]=s.findExtremes(t,g,{tozero:m,padded:y})}}function x(t){return t._id.charAt(0)}t.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],u=[],f=0;f<a.length;f++){var h=a[f];if(!0===h.visible&&o.traceIs(h,"bar")&&h.xaxis===r._id&&h.yaxis===n._id&&("h"===h.orientation?l.push(s[f]):u.push(s[f]),h._computePh))for(var d=t.calcdata[f],p=0;p<d.length;p++)"function"==typeof d[p].ph0&&(d[p].ph0=d[p].ph0()),"function"==typeof d[p].ph1&&(d[p].ph1=d[p].ph1())}var v={xCat:"category"===r.type||"multicategory"===r.type,yCat:"category"===n.type||"multicategory"===n.type,mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};c(t,r,n,u,v),c(t,n,r,l,v)},setGroupPositions:c}},2592:function(t,e,r){"use strict";t.exports=i;var n=r(3400).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),a=[],o=0;o<t.length;o++){for(var s=t[o],l=0;l<s.length;l++){var u=s[l],c=u.p;void 0===c&&(c=u[i]),void 0!==c&&a.push(c)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=a;var f=n(a);this.distinctPositions=f.vals,1===f.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(f.minDiff,r);var h=(e.posAxis||{}).type;"category"!==h&&"multicategory"!==h||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},i.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},i.prototype.getLabel=function(t,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?t:Math.round(t/this.binWidth))}},6040:function(t,e,r){"use strict";var n=r(9084),i=r(9736).axisHoverFormat,a=r(1776).Ks,o=r(2948),s=r(5464),l=r(2880).extendFlat,u={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(t){u[t]=o[t]})),u.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,t.exports=u},3344:function(t,e,r){"use strict";var n=r(7128);t.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=r[u],f=i[u],h=a[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}e._len=o,e._normMax=s,n(t,e,{vals:[l,s],containerStr:"",cLetter:"c"})}},6648:function(t,e,r){"use strict";var n=r(5411).gl_cone3d,i=r(5411).gl_cone3d.createConeMesh,a=r(3400).simpleMap,o=r(3040).parseColorScale,s=r(8932).extractOpts,l=r(3400).isArrayOrTypedArray,u=r(2094);function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var f=c.prototype;f.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index,r=this.data.x[e],n=this.data.y[e],i=this.data.z[e],a=this.data.u[e],o=this.data.v[e],s=this.data.w[e];t.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var u=this.data.hovertext||this.data.text;return l(u)&&void 0!==u[e]?t.textLabel=u[e]:u&&(t.textLabel=u),!0}};var h={xaxis:0,yaxis:1,zaxis:2},d={tip:1,tail:0,cm:.25,center:.5},p={tip:1,tail:1,cm:.75,center:.5};function v(t,e){var r=t.fullSceneLayout,i=t.dataScale,l={};function c(t,e){var n=r[e],o=i[h[e]];return a(t,(function(t){return n.d2l(t)*o}))}l.vectors=u(c(e.u,"xaxis"),c(e.v,"yaxis"),c(e.w,"zaxis"),e._len),l.positions=u(c(e.x,"xaxis"),c(e.y,"yaxis"),c(e.z,"zaxis"),e._len);var f=s(e);l.colormap=o(e),l.vertexIntensityBounds=[f.min/e._normMax,f.max/e._normMax],l.coneOffset=d[e.anchor];var v=e.sizemode;"scaled"===v?l.coneSize=e.sizeref||.5:"absolute"===v?l.coneSize=e.sizeref&&e._normMax?e.sizeref/e._normMax:.5:"raw"===v&&(l.coneSize=e.sizeref),l.coneSizemode=v;var g=n(l),m=e.lightposition;return g.lightPosition=[m.x,m.y,m.z],g.ambient=e.lighting.ambient,g.diffuse=e.lighting.diffuse,g.specular=e.lighting.specular,g.roughness=e.lighting.roughness,g.fresnel=e.lighting.fresnel,g.opacity=e.opacity,e._pad=p[e.anchor]*g.vectorScale*g.coneScale*e._normMax,g}f.update=function(t){this.data=t;var e=v(this.scene,t);this.mesh.update(e)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(t,e){var r=t.glplot.gl,n=v(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},6096:function(t,e,r){"use strict";var n=r(3400),i=r(7260),a=r(6040);t.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("u"),u=s("v"),c=s("w"),f=s("x"),h=s("y"),d=s("z");if(l&&l.length&&u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length&&d&&d.length){var p=s("sizemode");s("sizeref","raw"===p?1:.5),s("anchor"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),i(t,e,o,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),e._length=null}else e.visible=!1}},6048:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"cone",basePlotModule:r(2536),categories:["gl3d","showLegend"],attributes:r(6040),supplyDefaults:r(6096),colorbar:{min:"cmin",max:"cmax"},calc:r(3344),plot:r(6648),eventData:function(t,e){return t.norm=e.traceCoordinate[6],t},meta:{}}},1240:function(t,e,r){"use strict";var n=r(3400).maxRowLength;t.exports=function(t){var e,r,i,a,o,s,l,u,c=[],f={},h=[],d=t[0],p=[],v=[0,0,0],g=n(t);for(r=0;r<t.length;r++)for(e=p,p=d,d=t[r+1]||[],i=0;i<g;i++)void 0===p[i]&&((s=(void 0!==p[i-1]?1:0)+(void 0!==p[i+1]?1:0)+(void 0!==e[i]?1:0)+(void 0!==d[i]?1:0))?(0===r&&s++,0===i&&s++,r===t.length-1&&s++,i===p.length-1&&s++,s<4&&(f[[r,i]]=[r,i,s]),c.push([r,i,s])):h.push([r,i]));for(;h.length;){for(l={},u=!1,o=h.length-1;o>=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||v)[2]+(f[[r+1,i]]||v)[2]+(f[[r,i-1]]||v)[2]+(f[[r,i+1]]||v)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],c.push(l[a])}return c.sort((function(t,e){return e[2]-t[2]}))}},448:function(t,e,r){"use strict";var n=r(3400),i=[[-1,0],[1,0],[0,-1],[0,1]];function a(t){return.5-.25*Math.min(1,.5*t)}function o(t,e,r){var n,a,o,s,l,u,c,f,h,d,p,v,g,m=0;for(s=0;s<e.length;s++){for(a=(n=e[s])[0],o=n[1],p=t[a][o],d=0,h=0,l=0;l<4;l++)(c=t[a+(u=i[l])[0]])&&void 0!==(f=c[o+u[1]])&&(0===d?v=g=f:(v=Math.min(v,f),g=Math.max(g,f)),h++,d+=f);if(0===h)throw"iterateInterp2d order is wrong: no defined neighbors";t[a][o]=d/h,void 0===p?h<4&&(m=1):(t[a][o]=(1+r)*t[a][o]-r*p,g>v&&(m=Math.max(m,Math.abs(t[a][o]-p)/(g-v))))}return m}t.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r<e.length&&!(e[r][2]<4);r++);for(e=e.slice(r),r=0;r<100&&i>.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},48:function(t,e,r){"use strict";var n=r(9084),i=r(9736).axisHoverFormat,a=r(1776).Ks,o=r(2948),s=r(5464),l=r(2880).extendFlat,u=r(7824).overrideAll,c=t.exports=u(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},2624:function(t,e,r){"use strict";var n=r(7128),i=r(3832).processGrid,a=r(3832).filter;t.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l<e._len;l++){var u=e._value[l];o=Math.min(o,u),s=Math.max(s,u)}e._minValues=o,e._maxValues=s,e._vMin=void 0===e.isomin||null===e.isomin?o:e.isomin,e._vMax=void 0===e.isomax||null===e.isomin?s:e.isomax,n(t,e,{vals:[e._vMin,e._vMax],containerStr:"",cLetter:"c"})}},1460:function(t,e,r){"use strict";var n=r(5411).gl_mesh3d,i=r(3040).parseColorScale,a=r(3400).isArrayOrTypedArray,o=r(696),s=r(8932).extractOpts,l=r(2094),u=function(t,e){for(var r=e.length-1;r>0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n<t&&t<=i)return{id:r,distRatio:(i-t)/(i-n)}}return{id:0,distRatio:0}};function c(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.data=null,this.showContour=!1}var f=c.prototype;f.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._meshX[e],n=this.data._meshY[e],i=this.data._meshZ[e],o=this.data._Ys.length,s=this.data._Zs.length,l=u(r,this.data._Xs).id,c=u(n,this.data._Ys).id,f=u(i,this.data._Zs).id,h=t.index=f+s*c+s*o*l;t.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return a(d)&&void 0!==d[h]?t.textLabel=d[h]:d&&(t.textLabel=d),!0}},f.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map((function(e){return t.d2l(e,0,n)*r}))}this.data=d(t);var a={positions:l(n(r.xaxis,t._meshX,e.dataScale[0],t.xcalendar),n(r.yaxis,t._meshY,e.dataScale[1],t.ycalendar),n(r.zaxis,t._meshZ,e.dataScale[2],t.zcalendar)),cells:l(t._meshI,t._meshJ,t._meshK),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},u=s(t);a.vertexIntensity=t._meshIntensity,a.vertexIntensityBounds=[u.min,u.max],a.colormap=i(t),this.mesh.update(a)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var h=["xyz","xzy","yxz","yzx","zxy","zyx"];function d(t){t._meshI=[],t._meshJ=[],t._meshK=[];var e,r,n,i,a,o,s,l=t.surface.show,c=t.spaceframe.show,f=t.surface.fill,d=t.spaceframe.fill,p=!1,v=!1,g=0,m=t._Xs,y=t._Ys,x=t._Zs,b=m.length,_=y.length,w=x.length,M=h.indexOf(t._gridFill.replace(/-/g,"").replace(/\+/g,"")),T=function(t,e,r){switch(M){case 5:return r+w*e+w*_*t;case 4:return r+w*t+w*b*e;case 3:return e+_*r+_*w*t;case 2:return e+_*t+_*b*r;case 1:return t+b*r+b*w*e;default:return t+b*e+b*_*r}},A=t._minValues,k=t._maxValues,L=t._vMin,S=t._vMax;function E(t,e,s){for(var l=o.length,u=r;u<l;u++)if(t===n[u]&&e===i[u]&&s===a[u])return u;return-1}function C(){r=e}function O(){n=[],i=[],a=[],o=[],e=0,C()}function R(t,r,s,l){return n.push(t),i.push(r),a.push(s),o.push(l),++e-1}function P(t,e,r){for(var n=[],i=0;i<t.length;i++)n[i]=t[i]*(1-r)+r*e[i];return n}function D(t){s=t}function I(t,e){return"all"===t||null===t||t.indexOf(e)>-1}function z(t,e){return null===t?e:t}function N(e,r,n){C();var i,a,o,l=[r],u=[n];if(s>=1)l=[r],u=[n];else if(s>0){var c=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i<t.length;i++)n[i]=(t[i]+e[i]+r[i])/3;return n}(r,n,i),o=Math.sqrt(1-s),l=P(a,r,o),u=P(a,n,o),c=P(a,i,o),f=e[0],h=e[1],d=e[2];return{xyzv:[[r,n,u],[u,l,r],[n,i,c],[c,u,n],[i,r,l],[l,c,i]],abc:[[f,h,-1],[-1,-1,f],[h,d,-1],[-1,-1,h],[d,f,-1],[-1,-1,d]]}}(r,n);l=c.xyzv,u=c.abc}for(var f=0;f<l.length;f++){r=l[f],n=u[f];for(var h=[],d=0;d<3;d++){var p=r[d][0],v=r[d][1],m=r[d][2],y=r[d][3],x=n[d]>-1?n[d]:E(p,v,m);h[d]=x>-1?x:R(p,v,m,z(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++g}}function F(t,e,r,n){var i=t[3];i<r&&(i=r),i>n&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function B(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(S-L);return t>=L-e&&t<=S+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}var H=3;function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[B(e[0][3],n,i),B(e[1][3],n,i),B(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(N(t,e,r),!0):a<H&&V(t,e,r,L,S,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var u=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],d=F(h,c,n,i),p=F(h,f,n,i);o=l(t,[p,d,c],[-1,-1,r[a[0]]])||o,o=l(t,[c,f,p],[r[a[0]],r[a[1]],-1])||o,u=!0}})),u||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],d=F(f,c,n,i),p=F(h,c,n,i);o=l(t,[p,d,c],[-1,-1,r[a[0]]])||o,u=!0}})),o}function Y(t,e,r,n){var i=!1,a=U(e),o=[B(a[0][3],r,n),B(a[1][3],r,n),B(a[2][3],r,n),B(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return v&&(i=function(t,e,r){var n=function(n,i,a){N(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]];if(v)i=N(t,[u,c,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var d=F(h,u,r,n),p=F(h,c,r,n),g=F(h,f,r,n);i=N(null,[d,p,g],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],d=F(f,u,r,n),p=F(f,c,r,n),g=F(h,c,r,n),m=F(h,u,r,n);v?(i=N(t,[u,m,d],[e[l[0]],-1,-1])||i,i=N(t,[c,p,g],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(t,n,i){N(null,[e[t],e[n],e[i]],[r[t],r[n],r[i]])};n(0,1,2),n(2,3,0)}(0,[d,p,g,m],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],d=F(c,u,r,n),p=F(f,u,r,n),g=F(h,u,r,n);v?(i=N(t,[u,d,p],[e[l[0]],-1,-1])||i,i=N(t,[u,p,g],[e[l[0]],-1,-1])||i,i=N(t,[u,g,d],[e[l[0]],-1,-1])||i):i=N(null,[d,p,g],[-1,-1,-1])||i,s=!0}}))),i}function G(t,e,r,n,i,a,o,s,l,u,c){var f=!1;return p&&(I(t,"A")&&(f=Y(null,[e,r,n,a],u,c)||f),I(t,"B")&&(f=Y(null,[r,n,i,l],u,c)||f),I(t,"C")&&(f=Y(null,[r,a,o,l],u,c)||f),I(t,"D")&&(f=Y(null,[n,a,s,l],u,c)||f),I(t,"E")&&(f=Y(null,[r,n,a,l],u,c)||f)),v&&(f=Y(t,[r,n,a,l],u,c)||f),f}function W(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function q(t,e,r,n,i,a,o,s,l){return s?W(t,e,r,i,n,a,o,l):W(t,r,i,n,e,a,o,l)}function X(t,e,r,n,i,a,o){var s,l,u,c,f=!1,h=function(){f=V(t,[s,l,u],[-1,-1,-1],i,a)||f,f=V(t,[u,c,s],[-1,-1,-1],i,a)||f},d=o[0],p=o[1],v=o[2];return d&&(s=P(U([T(e,r-0,n-0)])[0],U([T(e-1,r-0,n-0)])[0],d),l=P(U([T(e,r-0,n-1)])[0],U([T(e-1,r-0,n-1)])[0],d),u=P(U([T(e,r-1,n-1)])[0],U([T(e-1,r-1,n-1)])[0],d),c=P(U([T(e,r-1,n-0)])[0],U([T(e-1,r-1,n-0)])[0],d),h()),p&&(s=P(U([T(e-0,r,n-0)])[0],U([T(e-0,r-1,n-0)])[0],p),l=P(U([T(e-0,r,n-1)])[0],U([T(e-0,r-1,n-1)])[0],p),u=P(U([T(e-1,r,n-1)])[0],U([T(e-1,r-1,n-1)])[0],p),c=P(U([T(e-1,r,n-0)])[0],U([T(e-1,r-1,n-0)])[0],p),h()),v&&(s=P(U([T(e-0,r-0,n)])[0],U([T(e-0,r-0,n-1)])[0],v),l=P(U([T(e-0,r-1,n)])[0],U([T(e-0,r-1,n-1)])[0],v),u=P(U([T(e-1,r-1,n)])[0],U([T(e-1,r-1,n-1)])[0],v),c=P(U([T(e-1,r-0,n)])[0],U([T(e-1,r-0,n-1)])[0],v),h()),f}function Z(t,e,r,n,i,a,o,s,l,u,c,f){var h=t;return f?(p&&"even"===t&&(h=null),G(h,e,r,n,i,a,o,s,l,u,c)):(p&&"odd"===t&&(h=null),G(h,l,s,o,a,i,n,r,e,u,c))}function J(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<w;u++)for(var c=1;c<_;c++)a.push(q(t,T(l,c-1,u-1),T(l,c-1,u),T(l,c,u-1),T(l,c,u),r,n,(l+c+u)%2,i&&i[o]?i[o]:[])),o++;return a}function K(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<b;u++)for(var c=1;c<w;c++)a.push(q(t,T(u-1,l,c-1),T(u,l,c-1),T(u-1,l,c),T(u,l,c),r,n,(u+l+c)%2,i&&i[o]?i[o]:[])),o++;return a}function Q(t,e,r,n,i){for(var a=[],o=0,s=0;s<e.length;s++)for(var l=e[s],u=1;u<_;u++)for(var c=1;c<b;c++)a.push(q(t,T(c-1,u-1,l),T(c-1,u,l),T(c,u-1,l),T(c,u,l),r,n,(c+u+l)%2,i&&i[o]?i[o]:[])),o++;return a}function $(t,e,r){for(var n=1;n<w;n++)for(var i=1;i<_;i++)for(var a=1;a<b;a++)Z(t,T(a-1,i-1,n-1),T(a-1,i-1,n),T(a-1,i,n-1),T(a-1,i,n),T(a,i-1,n-1),T(a,i-1,n),T(a,i,n-1),T(a,i,n),e,r,(a+i+n)%2)}function tt(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<w;c++)for(var f=1;f<_;f++)o.push(X(t,u,f,c,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function et(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<b;c++)for(var f=1;f<w;f++)o.push(X(t,c,u,f,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function rt(t,e,r,n,i,a){for(var o=[],s=0,l=0;l<e.length;l++)for(var u=e[l],c=1;c<_;c++)for(var f=1;f<b;f++)o.push(X(t,f,c,u,r,n,i[l],a&&a[s]&&a[s])),s++;return o}function nt(t,e){for(var r=[],n=t;n<e;n++)r.push(n);return r}return function(){O(),function(){for(var e=0;e<b;e++)for(var r=0;r<_;r++)for(var n=0;n<w;n++){var i=T(e,r,n);R(t._x[i],t._y[i],t._z[i],t._value[i])}}();var e=null;if(c&&d&&(D(d),v=!0,$(e,L,S),v=!1),l&&f){D(f);for(var r=t.surface.pattern,s=t.surface.count,h=0;h<s;h++){var M=1===s?.5:h/(s-1),E=(1-M)*L+M*S,C=Math.abs(E-A)>Math.abs(E-k)?[A,E]:[E,k];p=!0,$(r,C[0],C[1]),p=!1}}var P=[[Math.min(L,k),Math.max(L,k)],[Math.min(A,S),Math.max(A,S)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i<P.length;i++){var a=0,o=P[i][0],s=P[i][1],l=t.slices[r];if(l.show&&l.fill){D(l.fill);var c=[],f=[],h=[];if(l.locations.length)for(var d=0;d<l.locations.length;d++){var p=u(l.locations[d],"x"===r?m:"y"===r?y:x);0===p.distRatio?c.push(p.id):p.id>0&&(f.push(p.id),"x"===r?h.push([p.distRatio,0,0]):"y"===r?h.push([0,p.distRatio,0]):h.push([0,0,p.distRatio]))}else c=nt(1,"x"===r?b-1:"y"===r?_-1:w-1);f.length>0&&(n[a]="x"===r?tt(e,f,o,s,h,n[a]):"y"===r?et(e,f,o,s,h,n[a]):rt(e,f,o,s,h,n[a]),a++),c.length>0&&(n[a]="x"===r?J(e,c,o,s,n[a]):"y"===r?K(e,c,o,s,n[a]):Q(e,c,o,s,n[a]),a++)}var v=t.caps[r];v.show&&v.fill&&(D(v.fill),n[a]="x"===r?J(e,[0,b-1],o,s,n[a]):"y"===r?K(e,[0,_-1],o,s,n[a]):Q(e,[0,w-1],o,s,n[a]),a++)}})),0===g&&O(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=m,t._Ys=y,t._Zs=x}(),t}t.exports={findNearestOnAxis:u,generateIsoMeshes:d,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},548:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(48),o=r(7260);function s(t,e,r,n,a){var s=a("isomin"),l=a("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var u=a("x"),c=a("y"),f=a("z"),h=a("value");u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach((function(t){a(t+"hoverformat");var e="caps."+t;a(e+".show")&&a(e+".fill");var r="slices."+t;a(r+".show")&&(a(r+".fill"),a(r+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}t.exports={supplyDefaults:function(t,e,r,i){s(t,e,0,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},6296:function(t,e,r){"use strict";t.exports={attributes:r(48),supplyDefaults:r(548).supplyDefaults,calc:r(2624),colorbar:{min:"cmin",max:"cmax"},plot:r(1460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(2536),categories:["gl3d","showLegend"],meta:{}}},2948:function(t,e,r){"use strict";var n=r(9084),i=r(9736).axisHoverFormat,a=r(1776).Ks,o=r(9096),s=r(5464),l=r(2880).extendFlat;t.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},1876:function(t,e,r){"use strict";var n=r(7128);t.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},576:function(t,e,r){"use strict";var n=r(5411).gl_mesh3d,i=r(5411).delaunay_triangulate,a=r(5411).alpha_shape,o=r(5411).convex_hull,s=r(3040).parseColorScale,l=r(3400).isArrayOrTypedArray,u=r(696),c=r(8932).extractOpts,f=r(2094);function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=h.prototype;function p(t){for(var e=[],r=t.length,n=0;n<r;n++)e[n]=u(t[n]);return e}function v(t,e,r,n){for(var i=[],a=e.length,o=0;o<a;o++)i[o]=t.d2l(e[o],0,n)*r;return i}function g(t){for(var e=[],r=t.length,n=0;n<r;n++)e[n]=Math.round(t[n]);return e}function m(t,e){for(var r=t.length,n=0;n<r;n++)if(t[n]<=-.5||t[n]>=e-.5)return!1;return!0}d.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return l(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},d.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,l=t.x.length,h=f(v(r.xaxis,t.x,e.dataScale[0],t.xcalendar),v(r.yaxis,t.y,e.dataScale[1],t.ycalendar),v(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,l)||!m(t.j,l)||!m(t.k,l))return;n=f(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;o<a;o++)n[o]=[e[o][(r+1)%3],e[o][(r+2)%3]];return i(n)}(t.delaunayaxis,h);var d={positions:h,cells:n,lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,contourEnable:t.contour.show,contourColor:u(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading};if(t.intensity){var y=c(t);this.color="#fff";var x=t.intensitymode;d[x+"Intensity"]=t.intensity,d[x+"IntensityBounds"]=[y.min,y.max],d.colormap=s(t)}else t.vertexcolor?(this.color=t.vertexcolor[0],d.vertexColors=p(t.vertexcolor)):t.facecolor?(this.color=t.facecolor[0],d.cellColors=p(t.facecolor)):(this.color=t.color,d.meshColor=u(t.color));this.mesh.update(d)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},1832:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(7260),o=r(2948);t.exports=function(t,e,r,s){function l(r,n){return i.coerce(t,e,o,r,n)}function u(t){var e=t.map((function(t){var e=l(t);return e&&i.isArrayOrTypedArray(e)?e:null}));return e.every((function(t){return t&&t.length===e[0].length}))&&e}u(["x","y","z"])?(u(["i","j","k"]),(!e.i||e.j&&e.k)&&(!e.j||e.k&&e.i)&&(!e.k||e.i&&e.j)?(n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach((function(t){l(t)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in t?(l("intensity"),l("intensitymode"),a(t,e,s,l,{prefix:"",cLetter:"c"})):(e.showscale=!1,"facecolor"in t?l("facecolor"):"vertexcolor"in t?l("vertexcolor"):l("color",r)),l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),e._length=null):e.visible=!1):e.visible=!1}},2640:function(t,e,r){"use strict";t.exports={attributes:r(2948),supplyDefaults:r(1832),calc:r(1876),colorbar:{min:"cmin",max:"cmax"},plot:r(576),moduleType:"trace",name:"mesh3d",basePlotModule:r(2536),categories:["gl3d","showLegend"],meta:{}}},1552:function(t,e,r){"use strict";var n=r(3616),i=r(6308);t.exports=function(t,e,r,a){var o=r.marker.pattern;o&&o.shape?n.pointStyle(t,r,a,e):i.fill(t,e.color)}},9656:function(t,e,r){"use strict";var n=r(3400);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r<e.length;r++){var i=t[e[r]];if(i||0===i||""===i)return i}},e.castOption=function(t,r){return n.isArrayOrTypedArray(t)?e.getFirstFilled(t,r):t||void 0},e.getRotationAngle=function(t){return("auto"===t?0:t)*Math.PI/180}},528:function(t,e,r){"use strict";var n=r(6308),i=r(9656).castOption,a=r(1552);t.exports=function(t,e,r,o){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,u=i(s.width,e.pts)||0;t.call(a,e,r,o).style("stroke-width",u).call(n.stroke,l)}},148:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,"tx"),n.mergeArray(e.texttemplate,t,"txt"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArrayCastPositive(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var i=e.marker;if(i){n.mergeArrayCastPositive(i.size,t,"ms"),n.mergeArrayCastPositive(i.opacity,t,"mo"),n.mergeArray(i.symbol,t,"mx"),n.mergeArray(i.angle,t,"ma"),n.mergeArray(i.standoff,t,"mf"),n.mergeArray(i.color,t,"mc");var a=i.line;i.line&&(n.mergeArray(a.color,t,"mlc"),n.mergeArrayCastPositive(a.width,t,"mlw"));var o=i.gradient;o&&"none"!==o.type&&(n.mergeArray(o.type,t,"mgt"),n.mergeArray(o.color,t,"mgc"))}}},2904:function(t,e,r){"use strict";var n=r(9736).axisHoverFormat,i=r(1776).Gw,a=r(1776).Ks,o=r(9084),s=r(5376),l=r(8192).u,u=r(8192).c,c=r(3616),f=r(8200),h=r(2880).extendFlat,d=r(3544);t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:a({},{keys:f.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:h({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:d(!0),fillgradient:h({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:u,marker:h({symbol:{valType:"enumerated",values:c.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:h({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}},6356:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(4460),o=r(1220),s=r(9032).BADNUM,l=r(3028),u=r(136),c=r(148),f=r(4500);function h(t,e,r,n,i,o,s){var u=e._length,c=t._fullLayout,f=r._id,h=n._id,d=c._firstScatter[v(e)]===e.uid,p=(g(e,c,r,n)||{}).orientation,m=e.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},x={padded:!0};s&&(y.ppad=x.ppad=s);var b=u<2||i[0]!==i[u-1]||o[0]!==o[u-1];b&&("tozerox"===m||"tonextx"===m&&(d||"h"===p))?y.tozero=!0:(e.error_y||{}).visible||"tonexty"!==m&&"tozeroy"!==m&&(l.hasMarkers(e)||l.hasText(e))||(y.padded=!1,y.ppad=0),b&&("tozeroy"===m||"tonexty"===m&&(d||"v"===p))?x.tozero=!0:"tonextx"!==m&&"tozerox"!==m||(x.padded=!1),f&&(e._extremes[f]=a.findExtremes(r,i,y)),h&&(e._extremes[h]=a.findExtremes(n,o,x))}function d(t,e){if(l.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};a.setConvert(s);for(var u=s.makeCalcdata(t.marker,"size"),c=new Array(e),f=0;f<e;f++)c[f]=r(u[f]);return c}return r(n.size)}}function p(t,e){var r=v(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function v(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function g(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o="v"===a.orientation?n:r;return"linear"===o.type||"log"===o.type?a:void 0}}t.exports={calc:function(t,e){var r,l,v,m,y,x,b=t._fullLayout,_=e._xA=a.getFromId(t,e.xaxis||"x","x"),w=e._yA=a.getFromId(t,e.yaxis||"y","y"),M=_.makeCalcdata(e,"x"),T=w.makeCalcdata(e,"y"),A=o(e,_,"x",M),k=o(e,w,"y",T),L=A.vals,S=k.vals,E=e._length,C=new Array(E),O=e.ids,R=g(e,b,_,w),P=!1;p(b,e);var D,I="x",z="y";R?(i.pushUnique(R.traceIndices,e._expandedIndex),(r="v"===R.orientation)?(z="s",D="x"):(I="s",D="y"),y="interpolate"===R.stackgaps):h(t,e,_,w,L,S,d(e,E));var N=!!e.xperiodalignment,F=!!e.yperiodalignment;for(l=0;l<E;l++){var B=C[l]={},j=n(L[l]),U=n(S[l]);j&&U?(B[I]=L[l],B[z]=S[l],N&&(B.orig_x=M[l],B.xEnd=A.ends[l],B.xStart=A.starts[l]),F&&(B.orig_y=T[l],B.yEnd=k.ends[l],B.yStart=k.starts[l])):R&&(r?j:U)?(B[D]=r?L[l]:S[l],B.gap=!0,y?(B.s=s,P=!0):B.s=0):B[I]=B[z]=s,O&&(B.id=String(O[l]))}if(c(C,e),u(t,e),f(C,e),R){for(l=0;l<C.length;)C[l][D]===s?C.splice(l,1):l++;if(i.sort(C,(function(t,e){return t[D]-e[D]||t.i-e.i})),P){for(l=0;l<C.length-1&&C[l].gap;)l++;for((x=C[l].s)||(x=C[l].s=0),v=0;v<l;v++)C[v].s=x;for(m=C.length-1;m>l&&C[m].gap;)m--;for(x=C[m].s,v=C.length-1;v>m;v--)C[v].s=x;for(;l<m;)if(C[++l].gap){for(v=l+1;C[v].gap;)v++;for(var H=C[l-1][D],V=C[l-1].s,Y=(C[v].s-V)/(C[v][D]-H);l<v;)C[l].s=V+(C[l][D]-H)*Y,l++}}}return C},calcMarkerSize:d,calcAxisExpansion:h,setFirstScatter:p,getStackOpts:g}},4500:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},136:function(t,e,r){"use strict";var n=r(4288).hasColorscale,i=r(7128),a=r(3028);t.exports=function(t,e){a.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),a.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},8200:function(t){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},6664:function(t,e,r){"use strict";var n=r(6356),i=r(6376).setGroupPositions;function a(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&&r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,o=t._fullData,s=t.calcdata,l=[],u=[],c=0;c<o.length;c++){var f=o[c];!0===f.visible&&"scatter"===f.type&&f.xaxis===r._id&&f.yaxis===n._id&&("h"===f.orientation?l.push(s[c]):"v"===f.orientation&&u.push(s[c]))}var h={mode:a.scattermode,gap:a.scattergap};i(t,r,n,u,h),i(t,n,r,l,h)}(t,e);var r=e.xaxis,o=e.yaxis,s=r._id+o._id,l=t._fullLayout._scatterStackOpts[s];if(l){var u,c,f,h,d,p,v,g,m,y,x,b,_,w,M,T=t.calcdata;for(var A in l){var k=(y=l[A]).traceIndices;if(k.length){for(x="interpolate"===y.stackgaps,b=y.groupnorm,"v"===y.orientation?(_="x",w="y"):(_="y",w="x"),M=new Array(k.length),u=0;u<M.length;u++)M[u]=!1;p=T[k[0]];var L=new Array(p.length);for(u=0;u<p.length;u++)L[u]=p[u][_];for(u=1;u<k.length;u++){for(d=T[k[u]],c=f=0;c<d.length;c++){for(v=d[c][_];v>L[f]&&f<L.length;f++)a(d,c,L[f],u,M,x,_),c++;if(v!==L[f]){for(h=0;h<u;h++)a(T[k[h]],f,v,h,M,x,_);L.splice(f,0,v)}f++}for(;f<L.length;f++)a(d,c,L[f],u,M,x,_),c++}var S=L.length;for(c=0;c<p.length;c++){for(g=p[c][w]=p[c].s,u=1;u<k.length;u++)(d=T[k[u]])[0].trace._rawLength=d[0].trace._length,d[0].trace._length=S,g+=d[c].s,d[c][w]=g;if(b)for(m=("fraction"===b?g:g/100)||1,u=0;u<k.length;u++){var E=T[k[u]][c];E[w]/=m,E.sNorm=E.s/m}}for(u=0;u<k.length;u++){var C=(d=T[k[u]])[0].trace,O=n.calcMarkerSize(C,C._rawLength),R=Array.isArray(O);if(O&&M[u]||R){var P=O;for(O=new Array(S),c=0;c<S;c++)O[c]=d[c].gap?0:R?P[d[c].i]:P}var D=new Array(S),I=new Array(S);for(c=0;c<S;c++)D[c]=d[c].x,I[c]=d[c].y;n.calcAxisExpansion(t,C,r,o,D,I,O),d[0].t.orientation=y.orientation}}}}}},5036:function(t,e,r){"use strict";var n=r(3400),i=r(11),a=r(2904);t.exports=function(t,e){var r,o,s;function l(t){return n.coerce(o._input,o,a,t)}if("group"===e.scattermode)for(s=0;s<t.length;s++)"scatter"===(o=t[s]).type&&(r=o._input,i(r,o,e,l));for(s=0;s<t.length;s++){var u=t[s];if("scatter"===u.type){var c=u.fill;if("none"!==c&&"toself"!==c&&(u.opacity=void 0,"tonexty"===c||"tonextx"===c))for(var f=s-1;f>=0;f--){var h=t[f];if("scatter"===h.type&&h.xaxis===u.xaxis&&h.yaxis===u.yaxis){h.opacity=void 0;break}}}}}},8800:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(2904),o=r(8200),s=r(3028),l=r(3980),u=r(1147),c=r(3912),f=r(4428),h=r(6828),d=r(1731),p=r(124),v=r(840),g=r(3400).coercePattern;t.exports=function(t,e,r,m){function y(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,m,y);if(x||(e.visible=!1),e.visible){u(t,e,m,y),y("xhoverformat"),y("yhoverformat"),y("zorder");var b=c(t,e,m,y);"group"===m.scattermode&&void 0===e.orientation&&y("orientation","v");var _=!b&&x<o.PTS_LINESONLY?"lines+markers":"lines";y("text"),y("hovertext"),y("mode",_),s.hasMarkers(e)&&f(t,e,r,m,y,{gradient:!0}),s.hasLines(e)&&(h(t,e,r,m,y,{backoff:!0}),d(t,e,y),y("connectgaps"),y("line.simplify")),s.hasText(e)&&(y("texttemplate"),p(t,e,m,y));var w=[];(s.hasMarkers(e)||s.hasText(e))&&(y("cliponaxis"),y("marker.maxdisplayed"),w.push("points")),y("fill",b?b.fillDflt:"none"),"none"!==e.fill&&(v(t,e,r,y,{moduleHasFillgradient:!0}),s.hasLines(e)||d(t,e,y),g(y,"fillpattern",e.fillcolor,!1));var M=(e.line||{}).color,T=(e.marker||{}).color;"tonext"!==e.fill&&"toself"!==e.fill||w.push("fills"),y("hoveron",w.join("+")||"points"),"fills"!==e.hoveron&&y("hovertemplate");var A=i.getComponentMethod("errorbars","supplyDefaults");A(t,e,M||T||r,{axis:"y"}),A(t,e,M||T||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(e,y)}}},3544:function(t){"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0}}},840:function(t,e,r){"use strict";var n=r(6308),i=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r,a,o){o||(o={});var s,l=!1;if(e.marker){var u=e.marker.color,c=(e.marker.line||{}).color;u&&!i(u)?l=u:c&&!i(c)&&(l=c)}if(o.moduleHasFillgradient&&"none"!==a("fillgradient.type")){a("fillgradient.start"),a("fillgradient.stop");var f=a("fillgradient.colorscale");f&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r<t.length;r++){var i=n.interpolate(t[r-1][1],t[r][1],.5);e=n.interpolate(e,i,t[r-1][0]/t[r][0])}return e}(f))}a("fillcolor",n.addOpacity((e.line||{}).color||l||s||r,.5))}},6688:function(t,e,r){"use strict";var n=r(4460);t.exports=function(t,e,r){var i={},a={_fullLayout:r},o=n.getFromTrace(a,e,"x"),s=n.getFromTrace(a,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var u=t.orig_y;return void 0===u&&(u=t.y),i.xLabel=n.tickText(o,o.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(u),!0).text,i}},4928:function(t,e,r){"use strict";var n=r(6308),i=r(3028);t.exports=function(t,e){var r,a;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},11:function(t,e,r){"use strict";var n=r(1888).getAxisGroup;t.exports=function(t,e,r,i){var a=e.orientation,o=e[{v:"x",h:"y"}[a]+"axis"],s=n(r,o)+a,l=r._alignmentOpts||{},u=i("alignmentgroup"),c=l[s];c||(c=l[s]={});var f=c[u];f?f.traces.push(e):f=c[u]={traces:[e],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var h=i("offsetgroup"),d=f.offsetGroups,p=d[h];h&&(p||(p=d[h]={offsetIndex:Object.keys(d).length}),e._offsetIndex=p.offsetIndex)}},8723:function(t,e,r){"use strict";var n=r(3400),i=r(3024),a=r(4040),o=r(4928),s=r(6308),l=n.fillText;t.exports=function(t,e,r,u){var c=t.cd,f=c[0].trace,h=t.xa,d=t.ya,p=h.c2p(e),v=d.c2p(r),g=[p,v],m=f.hoveron||"",y=-1!==f.mode.indexOf("markers")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==m.indexOf("points")){var _=function(t){var e=Math.max(y,t.mrc||0),r=h.c2p(t.x)-p,n=d.c2p(t.y)-v;return Math.max(Math.sqrt(r*r+n*n)-e,1-y/e)},w=i.getDistanceFunction(u,(function(t){if(x){var e=h.c2p(t.xStart),r=h.c2p(t.xEnd);return p>=Math.min(e,r)&&p<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-p);return a<n?i*a/n:a-n+i}),(function(t){if(b){var e=d.c2p(t.yStart),r=d.c2p(t.yEnd);return v>=Math.min(e,r)&&v<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(d.c2p(t.y)-v);return a<n?i*a/n:a-n+i}),_);if(i.getClosest(c,w,t),!1!==t.index){var M=c[t.index],T=h.c2p(M.x,!0),A=d.c2p(M.y,!0),k=M.mrc||1;t.index=M.i;var L=c[0].t.orientation,S=L&&(M.sNorm||M.s),E="h"===L?S:void 0!==M.orig_x?M.orig_x:M.x,C="v"===L?S:void 0!==M.orig_y?M.orig_y:M.y;return n.extendFlat(t,{color:o(f,M),x0:T-k,x1:T+k,xLabelVal:E,y0:A-k,y1:A+k,yLabelVal:C,spikeDistance:_(M),hovertemplate:f.hovertemplate}),l(M,f,t),a.getComponentMethod("errorbars","hoverInfo")(M,f,t),[t]}}function O(t){if(!t)return!1;var e=t.node();try{var r=new DOMPoint(g[0],g[1]);return e.isPointInFill(r)}catch(t){var n=e.ownerSVGElement.createSVGPoint();return n.x=g[0],n.y=g[1],e.isPointInFill(n)}}if(-1!==m.indexOf("fills")&&f._fillElement&&O(f._fillElement)&&!O(f._fillExclusionElement)){var R=function(t){var e,r,n,i,a,o,s,l,u,c=[],f=1/0,p=-1/0,v=1/0,m=-1/0;for(e=0;e<t.length;e++){var y=t[e];y.contains(g)&&(c.push(y),v=Math.min(v,y.ymin),m=Math.max(m,y.ymax))}if(0===c.length)return null;for(r=((v=Math.max(v,0))+(m=Math.min(m,d._length)))/2,e=0;e<c.length;e++)for(i=c[e].pts,n=1;n<i.length;n++)(l=i[n-1][1])>r!=(u=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],u-l&&(a=o+(s-o)*(r-l)/(u-l),f=Math.min(f,a),p=Math.max(p,a)));return{x0:f=Math.max(f,0),x1:p=Math.min(p,h._length),y0:r,y1:r}}(f._polygons);null===R&&(R={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var P=s.defaultLine;return s.opacity(f.fillcolor)?P=f.fillcolor:s.opacity((f.line||{}).color)&&(P=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:R.x0,x1:R.x1,y0:R.y0,y1:R.y1,color:P,hovertemplate:!1}),delete t.index,f.text&&!n.isArrayOrTypedArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}},5875:function(t,e,r){"use strict";var n=r(3028);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(2904),layoutAttributes:r(5308),supplyDefaults:r(8800),crossTraceDefaults:r(5036),supplyLayoutDefaults:r(9748),calc:r(6356).calc,crossTraceCalc:r(6664),arraysToCalcdata:r(148),plot:r(6504),colorbar:r(5528),formatLabels:r(6688),style:r(6844).style,styleOnSelect:r(6844).styleOnSelect,hoverPoints:r(8723),selectPoints:r(1560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(7952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},5308:function(t){"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},9748:function(t,e,r){"use strict";var n=r(3400),i=r(5308);t.exports=function(t,e){var r,a="group"===e.barmode;"group"===e.scattermode&&("scattergap",r=a?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},6828:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(4288).hasColorscale,a=r(7260);t.exports=function(t,e,r,o,s,l){l||(l={});var u=(t.marker||{}).color;u&&u._inputArray&&(u=u._inputArray),s("line.color",r),i(t,"line")?a(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(u)&&u||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},2340:function(t,e,r){"use strict";var n=r(3616),i=r(9032),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(3400),c=u.segmentsIntersect,f=u.constrain,h=r(8200);t.exports=function(t,e){var r,i,o,d,p,v,g,m,y,x,b,_,w,M,T,A,k,L,S=e.trace||{},E=e.xaxis,C=e.yaxis,O="log"===E.type,R="log"===C.type,P=E._length,D=C._length,I=e.backoff,z=S.marker,N=e.connectGaps,F=e.baseTolerance,B=e.shape,j="linear"===B,U=S.fill&&"none"!==S.fill,H=[],V=h.minTolerance,Y=t.length,G=new Array(Y),W=0;function q(r){var n=t[r];if(!n)return!1;var i=e.linearized?E.l2p(n.x):E.c2p(n.x),o=e.linearized?C.l2p(n.y):C.c2p(n.y);if(i===a){if(O&&(i=E.c2p(n.x,!0)),i===a)return!1;R&&o===a&&(i*=Math.abs(E._m*D*(E._m>0?s:l)/(C._m*P*(C._m>0?s:l)))),i*=1e3}if(o===a){if(R&&(o=C.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function X(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,u=i*o+a*s;if(u>0&&u<l){var c=o*a-s*i;if(c*c<l)return!0}}function Z(t,e){var r=t[0]/P,n=t[1]/D,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==k&&X(r,n,k,L)&&(i=0),i&&e&&X(r,n,e[0]/P,e[1]/D)&&(i=0),(1+h.toleranceGrowth*i)*F}function J(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var K,Q,$,tt,et,rt,nt,it=h.maxScreensAway,at=-P*it,ot=P*(1+it),st=-D*it,lt=D*(1+it),ut=[[at,st,ot,st],[ot,st,ot,lt],[ot,lt,at,lt],[at,lt,at,st]];function ct(t){if(t[0]<at||t[0]>ot||t[1]<st||t[1]>lt)return[f(t[0],at,ot),f(t[1],st,lt)]}function ft(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var a=ct(n),o=ct(i),s=[];if(a&&o&&ft(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);return l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l),s}}function dt(t){var e=t[0],r=t[1],n=e===G[W-1][0],i=r===G[W-1][1];if(!n||!i)if(W>1){var a=e===G[W-2][0],o=r===G[W-2][1];n&&(e===at||e===ot)&&a?o?W--:G[W-1]=t:i&&(r===st||r===lt)&&o?a?W--:G[W-1]=t:G[W++]=t}else G[W++]=t}function pt(t){G[W-1][0]!==t[0]&&G[W-1][1]!==t[1]&&dt([$,tt]),dt(t),et=null,$=tt=0}"linear"===B||"spline"===B?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ut[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,t)<J(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:"hv"===B||"vh"===B?nt=function(t,e){var r=[],n=ct(t),i=ct(e);return n&&i&&ft(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===B?nt=ht(0,at,ot):"vhv"===B&&(nt=ht(1,st,lt));var vt=u.isArrayOrTypedArray(z);function gt(e){if(e&&I&&(e.i=r,e.d=t,e.trace=S,e.marker=vt?z[e.i]:z,e.backoff=I),k=e[0]/P,L=e[1]/D,K=e[0]<at?at:e[0]>ot?ot:0,Q=e[1]<st?st:e[1]>lt?lt:0,K||Q){if(W)if(et){var n=nt(et,e);n.length>1&&(pt(n[0]),G[W++]=n[1])}else rt=nt(G[W-1],e)[0],G[W++]=rt;else G[W++]=[K||e[0],Q||e[1]];var i=G[W-1];K&&Q&&(i[0]!==K||i[1]!==Q)?(et&&($!==K&&tt!==Q?dt($&&tt?(a=et,s=(o=e)[0]-a[0],l=(o[1]-a[1])/s,(a[1]*o[0]-o[1]*a[0])/s>0?[l>0?at:ot,lt]:[l>0?ot:at,st]):[$||K,tt||Q]):$&&tt&&dt([$,tt])),dt([K,Q])):$-K&&tt-Q&&dt([K||$,Q||tt]),et=e,$=K,tt=Q}else et&&pt(nt(et,e)[0]),G[W++]=e;var a,o,s,l}for(r=0;r<Y;r++)if(i=q(r)){for(W=0,et=null,gt(i),r++;r<Y;r++){if(!(d=q(r))){if(N)continue;break}if(j&&e.simplify){var mt=q(r+1);if(x=J(d,i),U&&(0===W||W===Y-1)||!(x<Z(d,mt)*V)){for(m=[(d[0]-i[0])/x,(d[1]-i[1])/x],p=i,b=x,_=M=T=0,g=!1,o=d,r++;r<t.length;r++){if(v=mt,mt=q(r+1),!v){if(N)continue;break}if(A=(y=[v[0]-i[0],v[1]-i[1]])[0]*m[1]-y[1]*m[0],M=Math.min(M,A),(T=Math.max(T,A))-M>Z(v,mt))break;o=v,(w=y[0]*m[0]+y[1]*m[1])>b?(b=w,d=v,g=!1):w<_&&(_=w,p=v,g=!0)}if(g?(gt(d),o!==p&&gt(p)):(p!==i&&gt(p),o!==d&&gt(d)),gt(o),r>=t.length||!v)break;gt(v),i=v}}else gt(d)}et&&dt([$||et[0],tt||et[1]]),H.push(G.slice(0,W))}var yt=B.slice(B.length-1);if(I&&"h"!==yt&&"v"!==yt){for(var xt=!1,bt=-1,_t=[],wt=0;wt<H.length;wt++)for(var Mt=0;Mt<H[wt].length-1;Mt++){var Tt=H[wt][Mt],At=H[wt][Mt+1],kt=n.applyBackoff(At,Tt);kt[0]===At[0]&&kt[1]===At[1]||(xt=!0),_t[bt+1]||(_t[++bt]=[Tt,[kt[0],kt[1]]])}return xt?_t:H}return H}},1731:function(t){"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},4328:function(t){"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a<n.length;a++)(o=(i=n[a][0].trace).stackgroup||"")?o in u?l=u[o]:(l=u[o]=h,h++):i.fill in e&&d>=0?l=d:(l=d=h,h++),l<f&&(c=!0),i._groupIndex=f=l;var p=n.slice();c&&p.sort((function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var v={};for(a=0;a<p.length;a++)o=(i=p[a][0].trace).stackgroup||"",!0===i.visible?(i._nexttrace=null,i.fill in e&&(s=v[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&("tozero"===i.fill.substr(0,6)||"toself"===i.fill||"to"===i.fill.substr(0,2)&&!i._prevtrace),v[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return p}},7152:function(t,e,r){"use strict";var n=r(8248);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,a=r.sizemin||0,o="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=o(t/e);return n(r)&&r>0?Math.max(r,a):0}}},5528:function(t){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},4428:function(t,e,r){"use strict";var n=r(6308),i=r(4288).hasColorscale,a=r(7260),o=r(3028);t.exports=function(t,e,r,s,l,u){var c=o.isBubble(t),f=(t.line||{}).color;u=u||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),u.noAngle||(l("marker.angle"),u.noAngleRef||l("marker.angleref"),u.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),u.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:c?n.background:n.defaultLine),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0)),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),u.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},1147:function(t,e,r){"use strict";var n=r(3400).dateTick0,i=r(9032).ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,e.ycalendar)),n("yperiodalignment"))}}},6504:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=a.ensureSingle,s=a.identity,l=r(3616),u=r(3028),c=r(2340),f=r(4328),h=r(2065).tester;function d(t,e,r,f,d,p,v){var g,m=t._context.staticPlot;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,c=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(u.hasMarkers(h)){var d=h.marker.maxdisplayed;if(0!==d){var p=i.filter((function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]})),v=Math.ceil(p.length/d),g=0;o.forEach((function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&g++}));var m=Math.round(g*v/3+Math.floor(g/3)*v/7.1);i.forEach((function(t){delete t.vis})),p.forEach((function(t,e){0===Math.round((e+m)%v)&&(t.vis=!0)}))}}}(0,e,r,f,d);var y=!!v&&v.duration>0;function x(t){return y?t.transition():t}var b=r.xaxis,_=r.yaxis,w=f[0].trace,M=w.line,T=n.select(p),A=o(T,"g","errorbars"),k=o(T,"g","lines"),L=o(T,"g","points"),S=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(t,A,r,v),!0===w.visible){var E,C;x(T).style("opacity",w.opacity);var O,R,P=w.fill.charAt(w.fill.length-1);"x"!==P&&"y"!==P&&(P=""),"y"===P?(O=1,R=_.c2p(0,!0)):"x"===P&&(O=0,R=b.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var D,I,z="",N=[],F=w._prevtrace,B=null,j=null;F&&(z=F._prevRevpath||"",C=F._nextFill,N=F._ownPolygons,B=F._fillsegments,j=F._fillElement);var U,H,V,Y,G,W,q="",X="",Z=[];w._polygons=[];var J=[],K=[],Q=a.noop;if(E=w._ownFill,u.hasLines(w)||"none"!==w.fill){C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(M.shape)?(U=l.steps(M.shape),H=l.steps(M.shape.split("").reverse().join(""))):U=H="spline"===M.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),M.smoothing):l.smoothopen(t,M.smoothing)}:function(t){return"M"+t.join("L")},V=function(t){return H(t.reverse())},K=c(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(M.width||1,3)/4,shape:M.shape,backoff:M.backoff,simplify:M.simplify,fill:w.fill}),J=new Array(K.length);var $=0;for(g=0;g<K.length;g++){var tt,et=K[g];tt&&P?tt.push.apply(tt,et):(tt=et.slice(),J[$]=tt,$++)}w._fillElement=null,w._fillExclusionElement=j,w._fillsegments=J.slice(0,$),J=w._fillsegments,K.length&&(Y=K[0][0].slice(),W=(G=K[K.length-1])[G.length-1].slice()),Q=function(t){return function(e){if(D=U(e),I=V(e),q?P?(q+="L"+D.substr(1),X=I+"L"+X.substr(1)):(q+="Z"+D,X=I+"Z"+X):(q=D,X=I),u.hasLines(w)){var r=n.select(this);if(r.datum(f),t)x(r.style("opacity",0).attr("d",D).call(l.lineGroupStyle)).style("opacity",1);else{var i=x(r);i.attr("d",D),l.singleLineStyle(f,i)}}}}}var rt=k.selectAll(".js-line").data(K);x(rt.exit()).style("opacity",0).remove(),rt.each(Q(!1)),rt.enter().append("path").classed("js-line",!0).style("vector-effect",m?"none":"non-scaling-stroke").call(l.lineGroupStyle).each(Q(!0)),l.setClipUrl(rt,r.layerClipId,t);var nt=function(){var t=new Array(J.length);for(g=0;g<J.length;g++)t[g]=h(J[g]);return t},it=function(t){var e,r;if(t&&0!==t.length){for(e=new Array(t.length-1+J.length),r=0;r<t.length-1;r++)e[r]=h(t[r]);var n=t[t.length-1].slice();for(n.reverse(),r=0;r<J.length;r++)e[t.length-1+r]=h(J[r].concat(n))}else for(e=new Array(J.length),r=0;r<J.length;r++){var i=J[r][0].slice(),a=J[r][J[r].length-1].slice();i[O]=a[O]=R;var o=[a,i].concat(J[r]);e[r]=h(o)}return e};K.length?(E?(E.datum(f),Y&&W&&(P?(Y[O]=W[O]=R,x(E).attr("d","M"+W+"L"+Y+"L"+q.substr(1)).call(l.singleFillStyle,t),Z=it(null)):(x(E).attr("d",q+"Z").call(l.singleFillStyle,t),Z=nt())),w._polygons=Z,w._fillElement=E):C&&("tonext"===w.fill.substr(0,6)&&q&&z?("tonext"===w.fill?(x(C).attr("d",q+"Z"+z+"Z").call(l.singleFillStyle,t),Z=nt(),w._polygons=Z.concat(N)):(x(C).attr("d",q+"L"+z.substr(1)+"Z").call(l.singleFillStyle,t),Z=it(B),w._polygons=Z),w._fillElement=C):ot(C)),w._prevRevpath=X):(E?ot(E):C&&ot(C),w._prevRevpath=null),w._ownPolygons=Z,L.datum(f),S.datum(f),function(e,i,a){var o,c=a[0].trace,f=u.hasMarkers(c),h=u.hasText(c),d=ft(c),p=ht,v=ht;if(f||h){var g=s,m=c.stackgroup,w=m&&"infer zero"===t._fullLayout._scatterStackOpts[b._id+_._id][m].stackgaps;c.marker.maxdisplayed||c._needsCull?g=w?lt:st:m&&!w&&(g=ut),f&&(p=g),h&&(v=g)}var M,T=(o=e.selectAll("path.point").data(p,d)).enter().append("path").classed("point",!0);y&&T.call(l.pointStyle,c,t).call(l.translatePoints,b,_).style("opacity",0).transition().style("opacity",1),o.order(),f&&(M=l.makePointStyleFns(c)),o.each((function(e){var i=n.select(this),a=x(i);l.translatePoint(e,a,b,_)?(l.singlePointStyle(e,a,c,M,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,b,_,c.xcalendar,c.ycalendar),c.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()})),y?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(v,d)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),i=x(e.select("text"));l.translatePoint(t,i,b,_)?r.layerClipId&&l.hideOutsideRangePoint(t,e,b,_,c.xcalendar,c.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,c,t).each((function(t){var e=b.c2p(t.x),r=_.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){x(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(L,S,f);var at=!1===w.cliponaxis?null:r.layerClipId;l.setClipUrl(L,at,t),l.setClipUrl(S,at,t)}function ot(t){x(t).attr("d","M0,0Z")}function st(t){return t.filter((function(t){return!t.gap&&t.vis}))}function lt(t){return t.filter((function(t){return t.vis}))}function ut(t){return t.filter((function(t){return!t.gap}))}function ct(t){return t.id}function ft(t){if(t.ids)return ct}function ht(){return!1}}t.exports=function(t,e,r,i,a,u){var c,h,p=!a,v=!!a&&a.duration>0,g=f(t,e,r);(c=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,u=[];a._ownfill&&u.push("_ownFill"),a._nexttrace&&u.push("_nextFill");var c=i.selectAll("g").data(u,s);c.enter().append("g"),c.exit().each((function(t){a[t]=null})).remove(),c.order().each((function(t){a[t]=o(n.select(this),"path","js-fill")}))}))}(t,c,e),v?(u&&(h=u()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){d(t,n,e,r,g,this,a)}))}))):c.each((function(r,n){d(t,n,e,r,g,this,a)})),p&&c.exit().remove(),i.selectAll("path:not([d])").remove()}},1560:function(t,e,r){"use strict";var n=r(3028);t.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=u.c2p(i.y),null!==i.i&&e.contains([a,o],!1,r,t)?(c.push({pointNumber:i.i,x:l.c2d(i.x),y:u.c2d(i.y)}),i.selected=1):i.selected=0;return c}},3912:function(t){"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h<e.length;h++){var d=e[h],p=d+"Found";if(!u[p]){var v=void 0!==t[d],g="orientation"===d;if((v||c)&&(u[d]=i(d,f[d]),g&&(u.fillDflt="h"===u[d]?"tonextx":"tonexty"),v&&(u[p]=!0,!c&&(delete u.traces[0][d],g))))for(var m=0;m<u.traces.length-1;m++){var y=u.traces[m];y._input.fill!==y.fill&&(y.fill=u.fillDflt)}}}return u}}},6844:function(t,e,r){"use strict";var n=r(3428),i=r(3616),a=r(4040);function o(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){o(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),a.getComponentMethod("errorbars","style")(e)},stylePoints:o,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(o(r,n,t),s(r,n,t))}}},3028:function(t,e,r){"use strict";var n=r(3400),i=r(8116).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},124:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e,r,i,a){a=a||{},i("textposition"),n.coerceFont(i,"textfont",a.font||r.font),a.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},3980:function(t,e,r){"use strict";var n=r(3400),i=r(4040);t.exports=function(t,e,r,a){var o,s=a("x"),l=a("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var u=n.minRowLength(s);l?o=Math.min(u,n.minRowLength(l)):(o=u,a("y0"),a("dy"))}else{if(!l)return 0;o=n.minRowLength(l),a("x0"),a("dx")}return e._length=o,o}},9212:function(t,e,r){"use strict";var n=r(2904),i=r(9084),a=r(9736).axisHoverFormat,o=r(1776).Ks,s=r(1776).Gw,l=r(5464),u=r(9168),c=r(5412),f=r(2880).extendFlat,h=r(7824).overrideAll,d=r(2996),p=n.line,v=n.marker,g=v.line,m=f({width:p.width,dash:{valType:"enumerated",values:d(u),dflt:"solid"}},i("line")),y=t.exports=h({x:n.x,y:n.y,z:{valType:"data_array"},text:f({},n.text,{}),texttemplate:s({},{}),hovertext:f({},n.hovertext,{}),hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),mode:f({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},y:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},z:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:m,marker:f({symbol:{valType:"enumerated",values:d(c),dflt:"circle",arrayOk:!0},size:f({},v.size,{dflt:8}),sizeref:v.sizeref,sizemin:v.sizemin,sizemode:v.sizemode,opacity:f({},v.opacity,{arrayOk:!1}),colorbar:v.colorbar,line:f({width:f({},g.width,{arrayOk:!1})},i("marker.line"))},i("marker")),textposition:f({},n.textposition,{dflt:"top center"}),textfont:{color:n.textfont.color,size:n.textfont.size,family:f({},n.textfont.family,{arrayOk:!1})},opacity:l.opacity,hoverinfo:f({},l.hoverinfo)},"calc","nested");y.x.editType=y.y.editType=y.z.editType="calc+clearAxisTypes"},1484:function(t,e,r){"use strict";var n=r(148),i=r(136);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},5156:function(t,e,r){"use strict";var n=r(4040);function i(t,e,r,i){if(!e||!e.visible)return null;for(var a=n.getComponentMethod("errorbars","makeComputeError")(e),o=new Array(t.length),s=0;s<t.length;s++){var l=a(+t[s],s);if("log"===i.type){var u=i.c2l(t[s]),c=t[s]-l[0],f=t[s]+l[1];if(o[s]=[(i.c2l(c,!0)-u)*r,(i.c2l(f,!0)-u)*r],c>0){var h=i.c2l(c);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e<t.length;e++)if(t[e])return t[e].length;return 0}(n);if(0===a)return null;for(var o=new Array(a),s=0;s<a;s++){for(var l=[[0,0,0],[0,0,0]],u=0;u<3;u++)if(n[u])for(var c=0;c<2;c++)l[c][u]=n[u][s][c];o[s]=l}return o}},1064:function(t,e,r){"use strict";var n=r(5411).gl_line3d,i=r(5411).gl_scatter3d,a=r(5411).gl_error3d,o=r(5411).gl_mesh3d,s=r(5411).delaunay_triangulate,l=r(3400),u=r(696),c=r(3040).formatColor,f=r(7152),h=r(9168),d=r(5412),p=r(4460),v=r(624).appendArrayPointValue,g=r(5156);function m(t,e){this.scene=t,this.uid=e,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var y=m.prototype;function x(t){return null==t?0:t.indexOf("left")>-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return d[t]}function M(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o<e;o++)void 0===t[o]?a[o]=n:a[o]=r(t[o],i)}else a=r(t,l.identity);return a}function T(t){if(l.isArrayOrTypedArray(t)){var e=t[0];return l.isArrayOrTypedArray(e)&&(t=e),"rgb("+t.slice(0,3).map((function(t){return Math.round(255*t)}))+")"}return null}function A(t){return l.isArrayOrTypedArray(t)?4===t.length&&"number"==typeof t[0]?T(t):t.map(T):null}y.handlePick=function(t){if(t.object&&(t.object===this.linePlot||t.object===this.delaunayMesh||t.object===this.textMarkers||t.object===this.scatterPlot)){var e=t.index=t.data.index;return t.object.highlight&&t.object.highlight(null),this.scatterPlot&&(t.object=this.scatterPlot,this.scatterPlot.highlight(t.data)),t.textLabel="",this.textLabels&&(l.isArrayOrTypedArray(this.textLabels)?(this.textLabels[e]||0===this.textLabels[e])&&(t.textLabel=this.textLabels[e]):t.textLabel=this.textLabels),t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]],!0}},y.update=function(t){var e,r,d,m,y=this.scene.glplot.gl,T=h.solid;this.data=t;var k=function(t,e){var r,n,i,a,o,s,h=[],d=t.fullSceneLayout,m=t.dataScale,y=d.xaxis,T=d.yaxis,A=d.zaxis,k=e.marker,L=e.line,S=e.x||[],E=e.y||[],C=e.z||[],O=S.length,R=e.xcalendar,P=e.ycalendar,D=e.zcalendar;for(o=0;o<O;o++)r=y.d2l(S[o],0,R)*m[0],n=T.d2l(E[o],0,P)*m[1],i=A.d2l(C[o],0,D)*m[2],h[o]=[r,n,i];if(Array.isArray(e.text))s=e.text;else if(l.isTypedArray(e.text))s=Array.from(e.text);else if(void 0!==e.text)for(s=new Array(O),o=0;o<O;o++)s[o]=e.text;function I(t,e){var r=d[t];return p.tickText(r,r.d2l(e),!0).text}var z=e.texttemplate;if(z){var N=t.fullLayout._d3locale,F=Array.isArray(z),B=F?Math.min(z.length,O):O,j=F?function(t){return z[t]}:function(){return z};for(s=new Array(B),o=0;o<B;o++){var U={x:S[o],y:E[o],z:C[o]},H={xLabel:I("xaxis",S[o]),yLabel:I("yaxis",E[o]),zLabel:I("zaxis",C[o])},V={};v(V,e,o);var Y=e._meta||{};s[o]=l.texttemplateString(j(o),H,N,V,U,Y)}}if(a={position:h,mode:e.mode,text:s},"line"in e&&(a.lineColor=c(L,1,O),a.lineWidth=L.width,a.lineDashes=L.dash),"marker"in e){var G=f(e);a.scatterColor=c(k,1,O),a.scatterSize=M(k.size,O,_,20,G),a.scatterMarker=M(k.symbol,O,w,"●"),a.scatterLineWidth=k.line.width,a.scatterLineColor=c(k.line,1,O),a.scatterAngle=0}"textposition"in e&&(a.textOffset=function(t){var e=[0,0];if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=[0,0],t[r]&&(e[r][0]=x(t[r]),e[r][1]=b(t[r]));else e[0]=x(t),e[1]=b(t);return e}(e.textposition),a.textColor=c(e.textfont,1,O),a.textSize=M(e.textfont.size,O,l.identity,12),a.textFont=e.textfont.family,a.textAngle=0);var W=["x","y","z"];for(a.project=[!1,!1,!1],a.projectScale=[1,1,1],a.projectOpacity=[1,1,1],o=0;o<3;++o){var q=e.projection[W[o]];(a.project[o]=q.show)&&(a.projectOpacity[o]=q.opacity,a.projectScale[o]=q.scale)}a.errorBounds=g(e,m,d);var X=function(t){for(var e=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],i=0;i<3;i++){var a=t[i];a&&!1!==a.copy_zstyle&&!1!==t[2].visible&&(a=t[2]),a&&a.visible&&(e[i]=a.width/2,r[i]=u(a.color),n[i]=a.thickness)}return{capSize:e,color:r,lineWidth:n}}([e.error_x,e.error_y,e.error_z]);return a.errorColor=X.color,a.errorLineWidth=X.lineWidth,a.errorCapSize=X.capSize,a.delaunayAxis=e.surfaceaxis,a.delaunayColor=u(e.surfacecolor),a}(this.scene,t);"mode"in k&&(this.mode=k.mode),"lineDashes"in k&&k.lineDashes in h&&(T=h[k.lineDashes]),this.color=A(k.scatterColor)||A(k.lineColor),this.dataPoints=k.position,e={gl:this.scene.glplot.gl,position:k.position,color:k.lineColor,lineWidth:k.lineWidth||1,dashes:T[0],dashScale:T[1],opacity:t.opacity,connectGaps:t.connectgaps},-1!==this.mode.indexOf("lines")?this.linePlot?this.linePlot.update(e):(this.linePlot=n(e),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var L=t.opacity;if(t.marker&&void 0!==t.marker.opacity&&(L*=t.marker.opacity),r={gl:this.scene.glplot.gl,position:k.position,color:k.scatterColor,size:k.scatterSize,glyph:k.scatterMarker,opacity:L,orthographic:!0,lineWidth:k.scatterLineWidth,lineColor:k.scatterLineColor,project:k.project,projectScale:k.projectScale,projectOpacity:k.projectOpacity},-1!==this.mode.indexOf("markers")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=i(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),m={gl:this.scene.glplot.gl,position:k.position,glyph:k.text,color:k.textColor,size:k.textSize,angle:k.textAngle,alignment:k.textOffset,font:k.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:t.opacity},this.textLabels=t.hovertext||t.text,-1!==this.mode.indexOf("text")?this.textMarkers?this.textMarkers.update(m):(this.textMarkers=i(m),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),d={gl:this.scene.glplot.gl,position:k.position,color:k.errorColor,error:k.errorBounds,lineWidth:k.errorLineWidth,capSize:k.errorCapSize,opacity:t.opacity},this.errorBars?k.errorBounds?this.errorBars.update(d):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):k.errorBounds&&(this.errorBars=a(d),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),k.delaunayAxis>=0){var S=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n<t.length;++n){var u=t[n];!isNaN(u[i])&&isFinite(u[i])&&!isNaN(u[a])&&isFinite(u[a])&&(o.push([u[i],u[a]]),l.push(n))}var c=s(o);for(n=0;n<c.length;++n)for(var f=c[n],h=0;h<f.length;++h)f[h]=l[f[h]];return{positions:t,cells:c,meshColor:e}}(k.position,k.delaunayColor,k.delaunayAxis);S.opacity=t.opacity,this.delaunayMesh?this.delaunayMesh.update(S):(S.gl=y,this.delaunayMesh=o(S),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},t.exports=function(t,e){var r=new m(t,e.uid);return r.update(e),r}},3484:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(3028),o=r(4428),s=r(6828),l=r(124),u=r(9212);t.exports=function(t,e,r,c){function f(r,n){return i.coerce(t,e,u,r,n)}var h=function(t,e,r,i){var a=0,o=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],i),o&&s&&l&&(a=Math.min(o.length,s.length,l.length),e._length=e._xlength=e._ylength=e._zlength=a),a}(t,e,f,c);if(h){f("text"),f("hovertext"),f("hovertemplate"),f("xhoverformat"),f("yhoverformat"),f("zhoverformat"),f("mode"),a.hasMarkers(e)&&o(t,e,r,c,f,{noSelect:!0,noAngle:!0}),a.hasLines(e)&&(f("connectgaps"),s(t,e,r,c,f)),a.hasText(e)&&(f("texttemplate"),l(t,e,c,f,{noSelect:!0}));var d=(e.line||{}).color,p=(e.marker||{}).color;f("surfaceaxis")>=0&&f("surfacecolor",d||p);for(var v=["x","y","z"],g=0;g<3;++g){var m="projection."+v[g];f(m+".show")&&(f(m+".opacity"),f(m+".scale"))}var y=n.getComponentMethod("errorbars","supplyDefaults");y(t,e,d||p||r,{axis:"z"}),y(t,e,d||p||r,{axis:"y",inherit:"z"}),y(t,e,d||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},3296:function(t,e,r){"use strict";t.exports={plot:r(1064),attributes:r(9212),markerSymbols:r(5412),supplyDefaults:r(3484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(1484),moduleType:"trace",name:"scatter3d",basePlotModule:r(2536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},167:function(t,e,r){"use strict";var n=r(9084),i=r(9736).axisHoverFormat,a=r(1776).Ks,o=r(2948),s=r(5464),l=r(2880).extendFlat,u={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(t){u[t]=o[t]})),u.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,t.exports=u},3832:function(t,e,r){"use strict";var n=r(3400),i=r(7128);function a(t){var e,r,i,a,s,l,u,c,f,h,d,p,v=t._x,g=t._y,m=t._z,y=t._len,x=-1/0,b=1/0,_=-1/0,w=1/0,M=-1/0,T=1/0,A="";for(y&&(u=v[0],f=g[0],d=m[0]),y>1&&(c=v[y-1],h=g[y-1],p=m[y-1]),e=0;e<y;e++)x=Math.max(x,v[e]),b=Math.min(b,v[e]),_=Math.max(_,g[e]),w=Math.min(w,g[e]),M=Math.max(M,m[e]),T=Math.min(T,m[e]),a||v[e]===u||(a=!0,A+="x"),s||g[e]===f||(s=!0,A+="y"),l||m[e]===d||(l=!0,A+="z");a||(A+="x"),s||(A+="y"),l||(A+="z");var k=o(t._x),L=o(t._y),S=o(t._z);A=(A=(A=A.replace("x",(u>c?"-":"+")+"x")).replace("y",(f>h?"-":"+")+"y")).replace("z",(d>p?"-":"+")+"z");var E=function(){y=0,k=[],L=[],S=[]};(!y||y<k.length*L.length*S.length)&&E();var C=function(t){return"x"===t?v:"y"===t?g:m},O=function(t){return"x"===t?k:"y"===t?L:S},R=function(t){return t[y-1]<t[0]?-1:1},P=C(A[1]),D=C(A[3]),I=C(A[5]),z=O(A[1]).length,N=O(A[3]).length,F=O(A[5]).length,B=!1,j=function(t,e,r){return z*(N*t+e)+r},U=R(C(A[1])),H=R(C(A[3])),V=R(C(A[5]));for(e=0;e<F-1;e++){for(r=0;r<N-1;r++){for(i=0;i<z-1;i++){var Y=j(e,r,i),G=j(e,r,i+1),W=j(e,r+1,i),q=j(e+1,r,i);if(P[Y]*U<P[G]*U&&D[Y]*H<D[W]*H&&I[Y]*V<I[q]*V||(B=!0),B)break}if(B)break}if(B)break}return B&&(n.warn("Encountered arbitrary coordinates! Unable to input data grid."),E()),{xMin:b,yMin:w,zMin:T,xMax:x,yMax:_,zMax:M,Xs:k,Ys:L,Zs:S,len:y,fill:A}}function o(t){return n.distinctVals(t).vals}function s(t,e){if(void 0===e&&(e=t.length),n.isTypedArray(t))return t.subarray(0,e);for(var r=[],i=0;i<e;i++)r[i]=+t[i];return r}t.exports={calc:function(t,e){e._len=Math.min(e.u.length,e.v.length,e.w.length,e.x.length,e.y.length,e.z.length),e._u=s(e.u,e._len),e._v=s(e.v,e._len),e._w=s(e.w,e._len),e._x=s(e.x,e._len),e._y=s(e.y,e._len),e._z=s(e.z,e._len);var r=a(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;var n,o,l,u=0;e.starts&&(n=s(e.starts.x||[]),o=s(e.starts.y||[]),l=s(e.starts.z||[]),u=Math.min(n.length,o.length,l.length)),e._startsX=n||[],e._startsY=o||[],e._startsZ=l||[];var c,f=0,h=1/0;for(c=0;c<e._len;c++){var d=e._u[c],p=e._v[c],v=e._w[c],g=Math.sqrt(d*d+p*p+v*v);f=Math.max(f,g),h=Math.min(h,g)}for(i(t,e,{vals:[h,f],containerStr:"",cLetter:"c"}),c=0;c<u;c++){var m=n[c];r.xMax=Math.max(r.xMax,m),r.xMin=Math.min(r.xMin,m);var y=o[c];r.yMax=Math.max(r.yMax,y),r.yMin=Math.min(r.yMin,y);var x=l[c];r.zMax=Math.max(r.zMax,x),r.zMin=Math.min(r.zMin,x)}e._slen=u,e._normMax=f,e._xbnds=[r.xMin,r.xMax],e._ybnds=[r.yMin,r.yMax],e._zbnds=[r.zMin,r.zMax]},filter:s,processGrid:a}},5668:function(t,e,r){"use strict";var n=r(5411).gl_streamtube3d,i=n.createTubeMesh,a=r(3400),o=r(3040).parseColorScale,s=r(8932).extractOpts,l=r(2094),u={xaxis:0,yaxis:1,zaxis:2};function c(t,e){this.scene=t,this.uid=e,this.mesh=null,this.data=null}var f=c.prototype;function h(t){var e=t.length;return e>2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function d(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function p(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,f={};function p(t,e){var n=r[e],o=i[u[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(p(e._u,"xaxis"),p(e._v,"yaxis"),p(e._w,"zaxis"),c),!c)return{positions:[],cells:[]};var v=p(e._Xs,"xaxis"),g=p(e._Ys,"yaxis"),m=p(e._Zs,"zaxis");if(f.meshgrid=[v,g,m],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(p(e._startsX,"xaxis"),p(e._startsY,"yaxis"),p(e._startsZ,"zaxis"));else{for(var y=g[0],x=h(v),b=h(m),_=new Array(x.length*b.length),w=0,M=0;M<x.length;M++)for(var T=0;T<b.length;T++)_[w++]=[x[M],y,b[T]];f.startingPositions=_}f.colormap=o(e),f.tubeSize=e.sizeref,f.maxLength=e.maxdisplayed;var A=p(e._xbnds,"xaxis"),k=p(e._ybnds,"yaxis"),L=p(e._zbnds,"zaxis"),S=d(v),E=d(g),C=d(m),O=[[A[0]-S[0],k[0]-E[0],L[0]-C[0]],[A[1]+S[1],k[1]+E[1],L[1]+C[1]]],R=n(f,O),P=s(e);R.vertexIntensityBounds=[P.min/e._normMax,P.max/e._normMax];var D=e.lightposition;return R.lightPosition=[D.x,D.y,D.z],R.ambient=e.lighting.ambient,R.diffuse=e.lighting.diffuse,R.specular=e.lighting.specular,R.roughness=e.lighting.roughness,R.fresnel=e.lighting.fresnel,R.opacity=e.opacity,e._pad=R.tubeScale*e.sizeref*2,R}f.handlePick=function(t){var e=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(t,n){var i=e[n],a=r[u[n]];return i.l2c(t)/a}if(t.object===this.mesh){var i=t.data.position,a=t.data.velocity;return t.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),t.data.intensity*this.data._normMax,t.data.divergence],t.textLabel=this.data.hovertext||this.data.text,!0}},f.update=function(t){this.data=t;var e=p(this.scene,t);this.mesh.update(e)},f.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(t,e){var r=t.glplot.gl,n=p(t,e),a=i(r,n),o=new c(t,e.uid);return o.mesh=a,o.data=e,a._trace=o,t.glplot.add(a),o}},4304:function(t,e,r){"use strict";var n=r(3400),i=r(7260),a=r(167);t.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("u"),u=s("v"),c=s("w"),f=s("x"),h=s("y"),d=s("z");l&&l.length&&u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length&&d&&d.length?(s("starts.x"),s("starts.y"),s("starts.z"),s("maxdisplayed"),s("sizeref"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),i(t,e,o,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),s("uhoverformat"),s("vhoverformat"),s("whoverformat"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),e._length=null):e.visible=!1}},5436:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"streamtube",basePlotModule:r(2536),categories:["gl3d","showLegend"],attributes:r(167),supplyDefaults:r(4304),colorbar:{min:"cmin",max:"cmax"},calc:r(3832).calc,plot:r(5668),eventData:function(t,e){return t.tubex=t.x,t.tubey=t.y,t.tubez=t.z,t.tubeu=e.traceCoordinate[3],t.tubev=e.traceCoordinate[4],t.tubew=e.traceCoordinate[5],t.norm=e.traceCoordinate[6],t.divergence=e.traceCoordinate[7],delete t.x,delete t.y,delete t.z,t},meta:{}}},9096:function(t,e,r){"use strict";var n=r(6308),i=r(9084),a=r(9736).axisHoverFormat,o=r(1776).Ks,s=r(5464),l=r(2880).extendFlat,u=r(7824).overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var f=t.exports=u(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");f.x.editType=f.y.editType=f.z.editType="calc+clearAxisTypes",f.transforms=void 0},4196:function(t,e,r){"use strict";var n=r(7128);t.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},9164:function(t,e,r){"use strict";var n=r(5411).gl_surface3d,i=r(5411).ndarray,a=r(5411).ndarray_linear_interpolate.d2,o=r(448),s=r(1240),l=r(3400).isArrayOrTypedArray,u=r(3040).parseColorScale,c=r(696),f=r(8932).extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var d=h.prototype;d.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},d.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},d.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},d.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){null!=t.dataCoordinate[a]&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var o=this.data.hovertext||this.data.text;return l(o)&&o[i]&&void 0!==o[i][n]?t.textLabel=o[i][n]:t.textLabel=o||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var p=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function v(t,e){if(t<e)return 0;for(var r=0;0===Math.floor(t%e);)t/=e,r++;return r}function g(t){for(var e=[],r=0;r<p.length;r++){var n=p[r];e.push(v(t,n))}return e}function m(t){for(var e=g(t),r=t,n=0;n<p.length;n++)if(e[n]>0){r=p[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=g(t),n=g(e),i=1,a=0;a<p.length;a++)i*=Math.pow(p[a],Math.max(r[a],n[a]));return i}}d.calcXnums=function(t){var e,r=[];for(e=1;e<t;e++){var n=this.getXat(e-1,0),i=this.getXat(e,0);r[e-1]=i!==n&&null!=n&&null!=i?Math.abs(i-n):0}var a=0;for(e=1;e<t;e++)a+=r[e-1];for(e=1;e<t;e++)0===r[e-1]?r[e-1]=1:r[e-1]=Math.round(a/r[e-1]);return r},d.calcYnums=function(t){var e,r=[];for(e=1;e<t;e++){var n=this.getYat(0,e-1),i=this.getYat(0,e);r[e-1]=i!==n&&null!=n&&null!=i?Math.abs(i-n):0}var a=0;for(e=1;e<t;e++)a+=r[e-1];for(e=1;e<t;e++)0===r[e-1]?r[e-1]=1:r[e-1]=Math.round(a/r[e-1]);return r};var x=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],b=x[9],_=x[13];function w(t,e,r){var n=r[8]+r[2]*e[0]+r[5]*e[1];return t[0]=(r[6]+r[0]*e[0]+r[3]*e[1])/n,t[1]=(r[7]+r[1]*e[0]+r[4]*e[1])/n,t}function M(t,e,r){return function(t,e,r,n){for(var i=[0,0],o=t.shape[0],s=t.shape[1],l=0;l<o;l++)for(var u=0;u<s;u++)r(i,[l,u],n),t.set(l,u,a(e,i[0],i[1]))}(t,e,w,r),t}function T(t,e){for(var r=!1,n=0;n<t.length;n++)if(e===t[n]){r=!0;break}!1===r&&t.push(e)}d.estimateScale=function(t,e){for(var r=1+function(t){if(0!==t.length){for(var e=1,r=0;r<t.length;r++)e=y(e,t[r]);return e}}(0===e?this.calcXnums(t):this.calcYnums(t));r<b;)r*=2;for(;r>_;)r--,r/=m(r),++r<b&&(r=_);var n=Math.round(r/t);return n>1?n:1},d.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,u=1+a+1,c=i(new Float32Array(l*u),[l,u]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h<t.length;++h){this.surface.padField(c,t[h]);var d=i(new Float32Array(o*s),[o,s]);M(d,c,f),t[h]=d}},d.setContourLevels=function(){var t,e,r,n=[[],[],[]],i=[!1,!1,!1],a=!1;for(t=0;t<3;++t)if(this.showContour[t]&&(a=!0,this.contourSize[t]>0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];e<this.contourEnd[t];e+=this.contourSize[t])r=e*this.scene.dataScale[t],T(n[t],r);if(a){var o=[[],[],[]];for(t=0;t<3;++t)this.showContour[t]&&(o[t]=i[t]?n[t]:this.scene.contourLevels[t]);this.surface.update({levels:o})}},d.update=function(t){var e,r,n,a,l=this.scene,h=l.fullSceneLayout,d=this.surface,p=u(t),v=l.dataScale,g=t.z[0].length,m=t._ylength,y=l.contourLevels;this.data=t;var x=[];for(e=0;e<3;e++)for(x[e]=[],r=0;r<g;r++)x[e][r]=[];for(r=0;r<g;r++)for(n=0;n<m;n++)x[0][r][n]=this.getXat(r,n,t.xcalendar,h.xaxis),x[1][r][n]=this.getYat(r,n,t.ycalendar,h.yaxis),x[2][r][n]=this.getZat(r,n,t.zcalendar,h.zaxis);if(t.connectgaps)for(t._emptypoints=s(x[2]),o(x[2],t._emptypoints),t._interpolatedZ=[],r=0;r<g;r++)for(t._interpolatedZ[r]=[],n=0;n<m;n++)t._interpolatedZ[r][n]=x[2][r][n];for(e=0;e<3;e++)for(r=0;r<g;r++)for(n=0;n<m;n++)null==(a=x[e][r][n])?x[e][r][n]=NaN:a=x[e][r][n]*=v[e];for(e=0;e<3;e++)for(r=0;r<g;r++)for(n=0;n<m;n++)null!=(a=x[e][r][n])&&(this.minValues[e]>a&&(this.minValues[e]=a),this.maxValues[e]<a&&(this.maxValues[e]=a));for(e=0;e<3;e++)this.objectOffset[e]=.5*(this.minValues[e]+this.maxValues[e]);for(e=0;e<3;e++)for(r=0;r<g;r++)for(n=0;n<m;n++)null!=(a=x[e][r][n])&&(x[e][r][n]-=this.objectOffset[e]);var b=[i(new Float32Array(g*m),[g,m]),i(new Float32Array(g*m),[g,m]),i(new Float32Array(g*m),[g,m])];for(e=0;e<3;e++)for(r=0;r<g;r++)for(n=0;n<m;n++)b[e].set(r,n,x[e][r][n]);x=[];var w={colormap:p,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!t.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:t.opacityscale,opacity:t.opacity},M=f(t);if(w.intensityBounds=[M.min,M.max],t.surfacecolor){var T=i(new Float32Array(g*m),[g,m]);for(r=0;r<g;r++)for(n=0;n<m;n++)T.set(r,n,t.surfacecolor[n][r]);b.push(T)}else w.intensityBounds[0]*=v[2],w.intensityBounds[1]*=v[2];(_<b[0].shape[0]||_<b[0].shape[1])&&(this.refineData=!1),!0===this.refineData&&(this.dataScaleX=this.estimateScale(b[0].shape[0],0),this.dataScaleY=this.estimateScale(b[0].shape[1],1),1===this.dataScaleX&&1===this.dataScaleY||this.refineCoords(b)),t.surfacecolor&&(w.intensity=b.pop());var A=[!0,!0,!0],k=["x","y","z"];for(e=0;e<3;++e){var L=t.contours[k[e]];A[e]=L.highlight,w.showContour[e]=L.show||L.highlight,w.showContour[e]&&(w.contourProject[e]=[L.project.x,L.project.y,L.project.z],L.show?(this.showContour[e]=!0,w.levels[e]=y[e],d.highlightColor[e]=w.contourColor[e]=c(L.color),L.usecolormap?d.highlightTint[e]=w.contourTint[e]=0:d.highlightTint[e]=w.contourTint[e]=1,w.contourWidth[e]=L.width,this.contourStart[e]=L.start,this.contourEnd[e]=L.end,this.contourSize[e]=L.size):(this.showContour[e]=!1,this.contourStart[e]=null,this.contourEnd[e]=null,this.contourSize[e]=0),L.highlight&&(w.dynamicColor[e]=c(L.highlightcolor),w.dynamicWidth[e]=L.highlightwidth))}(function(t){var e=t[0].rgb,r=t[t.length-1].rgb;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]})(p)&&(w.vertexColor=!0),w.objectOffset=this.objectOffset,w.coords=b,d.update(w),d.visible=t.visible,d.enableDynamic=A,d.enableHighlight=A,d.snapToData=!0,"lighting"in t&&(d.ambientLight=t.lighting.ambient,d.diffuseLight=t.lighting.diffuse,d.specularLight=t.lighting.specular,d.roughness=t.lighting.roughness,d.fresnel=t.lighting.fresnel),"lightposition"in t&&(d.lightPosition=[t.lightposition.x,t.lightposition.y,t.lightposition.z])},d.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},t.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new h(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},192:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(7260),o=r(9096);function s(t,e,r,n){var i=n("opacityscale");"max"===i?e.opacityscale=[[0,.1],[1,1]]:"min"===i?e.opacityscale=[[0,1],[1,.1]]:"extremes"===i?e.opacityscale=function(t,e){for(var r=[],n=0;n<32;n++){var i=n/31,a=.1+.9*(1-Math.pow(Math.sin(1*i*Math.PI),2));r.push([i,Math.max(0,Math.min(1,a))])}return r}():function(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var n=t[r];if(2!==n.length||+n[0]<e)return!1;e=+n[0]}return!0}(i)||(e.opacityscale=void 0)}function l(t,e,r){e in t&&!(r in t)&&(t[r]=t[e])}t.exports={supplyDefaults:function(t,e,r,u){var c,f;function h(r,n){return i.coerce(t,e,o,r,n)}var d=h("x"),p=h("y"),v=h("z");if(!v||!v.length||d&&d.length<1||p&&p.length<1)e.visible=!1;else{e._xlength=Array.isArray(d)&&i.isArrayOrTypedArray(d[0])?v.length:v[0].length,e._ylength=v.length,n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],u),h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach((function(t){h(t)}));var g=h("surfacecolor"),m=["x","y","z"];for(c=0;c<3;++c){var y="contours."+m[c],x=h(y+".show"),b=h(y+".highlight");if(x||b)for(f=0;f<3;++f)h(y+".project."+m[f]);x&&(h(y+".color"),h(y+".width"),h(y+".usecolormap")),b&&(h(y+".highlightcolor"),h(y+".highlightwidth")),h(y+".start"),h(y+".end"),h(y+".size")}g||(l(t,"zmin","cmin"),l(t,"zmax","cmax"),l(t,"zauto","cauto")),a(t,e,u,h,{prefix:"",cLetter:"c"}),s(0,e,0,h),e._length=null}},opacityscaleDefaults:s}},1304:function(t,e,r){"use strict";t.exports={attributes:r(9096),supplyDefaults:r(192).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:r(4196),plot:r(9164),moduleType:"trace",name:"surface",basePlotModule:r(2536),categories:["gl3d","2dMap","showLegend"],meta:{}}},8168:function(t,e,r){"use strict";var n=r(9084),i=r(48),a=r(9096),o=r(5464),s=r(2880).extendFlat,l=r(7824).overrideAll,u=t.exports=l(s({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:a.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},9596:function(t,e,r){"use strict";var n=r(5411).gl_mesh3d,i=r(3040).parseColorScale,a=r(3400).isArrayOrTypedArray,o=r(696),s=r(8932).extractOpts,l=r(2094),u=r(1460).findNearestOnAxis,c=r(1460).generateIsoMeshes;function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.data=null,this.showContour=!1}var h=f.prototype;h.handlePick=function(t){if(t.object===this.mesh){var e=t.data.index,r=this.data._meshX[e],n=this.data._meshY[e],i=this.data._meshZ[e],o=this.data._Ys.length,s=this.data._Zs.length,l=u(r,this.data._Xs).id,c=u(n,this.data._Ys).id,f=u(i,this.data._Zs).id,h=t.index=f+s*c+s*o*l;t.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return a(d)&&void 0!==d[h]?t.textLabel=d[h]:d&&(t.textLabel=d),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;function n(t,e,r,n){return e.map((function(e){return t.d2l(e,0,n)*r}))}this.data=c(t);var a={positions:l(n(r.xaxis,t._meshX,e.dataScale[0],t.xcalendar),n(r.yaxis,t._meshY,e.dataScale[1],t.ycalendar),n(r.zaxis,t._meshZ,e.dataScale[2],t.zcalendar)),cells:l(t._meshI,t._meshJ,t._meshK),lightPosition:[t.lightposition.x,t.lightposition.y,t.lightposition.z],ambient:t.lighting.ambient,diffuse:t.lighting.diffuse,specular:t.lighting.specular,roughness:t.lighting.roughness,fresnel:t.lighting.fresnel,vertexNormalsEpsilon:t.lighting.vertexnormalsepsilon,faceNormalsEpsilon:t.lighting.facenormalsepsilon,opacity:t.opacity,opacityscale:t.opacityscale,contourEnable:t.contour.show,contourColor:o(t.contour.color).slice(0,3),contourWidth:t.contour.width,useFacetNormals:t.flatshading},u=s(t);a.vertexIntensity=t._meshIntensity,a.vertexIntensityBounds=[u.min,u.max],a.colormap=i(t),this.mesh.update(a)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new f(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}},68:function(t,e,r){"use strict";var n=r(3400),i=r(8168),a=r(548).supplyIsoDefaults,o=r(192).opacityscaleDefaults;t.exports=function(t,e,r,s){function l(r,a){return n.coerce(t,e,i,r,a)}a(t,e,r,s,l),o(t,e,s,l)}},7776:function(t,e,r){"use strict";t.exports={attributes:r(8168),supplyDefaults:r(68),calc:r(2624),colorbar:{min:"cmin",max:"cmax"},plot:r(9596),moduleType:"trace",name:"volume",basePlotModule:r(2536),categories:["gl3d","showLegend"],meta:{}}},1843:function(t,e,r){"use strict";var n=r(4460),i=r(3400),a=r(3060),o=r(468).W,s=r(9032).BADNUM;e.moduleType="transform",e.name="aggregate";var l=e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=l.aggregations;function c(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),u=l.get(),c=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return h;case"last":return d;case"sum":return function(t,e){for(var r=0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r+=o)}return a(r)};case"avg":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l,i++)}return i?a(r/i):s};case"min":return function(t,e){for(var r=1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:a(r)};case"max":return function(t,e){for(var r=-1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:a(r)};case"range":return function(t,e){for(var r=1/0,i=-1/0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r=Math.min(r,l),i=Math.max(i,l))}return i===-1/0||r===1/0?s:a(i-r)};case"change":return function(t,e){var r=n(t[e[0]]),i=n(t[e[e.length-1]]);return r===s||i===s?s:a(i-r)};case"median":return function(t,e){for(var r=[],o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&r.push(l)}if(!r.length)return s;r.sort(i.sorterAsc);var u=(r.length-1)/2;return a((r[Math.floor(u)]+r[Math.ceil(u)])/2)};case"mode":return function(t,e){for(var r={},i=0,o=s,l=0;l<e.length;l++){var u=n(t[e[l]]);if(u!==s){var c=r[u]=(r[u]||0)+1;c>i&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l*l,i++)}return i?a(Math.sqrt(r/i)):s};case"stddev":return function(e,r){var i,a=0,o=0,l=1,u=s;for(i=0;i<r.length&&u===s;i++)u=n(e[r[i]]);if(u===s)return s;for(;i<r.length;i++){var c=n(e[r[i]]);if(c!==s){var f=c-u;a+=f,o+=f*f,l++}}var h="sample"===t.funcmode?l-1:l;return h?Math.sqrt((o-a*a/l)/h):0}}}(a,n.getDataConversions(t,e,o,u)),p=new Array(r.length),v=0;v<r.length;v++)p[v]=c(u,r[v]);l.set(p),"count"===a.func&&i.pushUnique(e._arrayAttrs,o)}}function f(t,e){return e.length}function h(t,e){return t[e[0]]}function d(t,e){return t[e[e.length-1]]}e.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o("enabled"))return n;var s=a.findArrayAttributes(e),c={};for(r=0;r<s.length;r++)c[s[r]]=1;var f=o("groups");if(!Array.isArray(f)){if(!c[f])return n.enabled=!1,n;c[f]=0}var h,d=t.aggregations||[],p=n.aggregations=new Array(d.length);function v(t,e){return i.coerce(d[r],h,u,t,e)}for(r=0;r<d.length;r++){h={_index:r};var g=v("target"),m=v("func");v("enabled")&&g&&(c[g]||"count"===m&&void 0===c[g])?("stddev"===m&&v("funcmode"),c[g]=0,p[r]=h):p[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)c[s[r]]&&p.push({target:s[r],func:u.func.dflt,enabled:!0,_index:-1});return n},e.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,u,f,h={},d={},p=[],v=o(e.transforms,r),g=a.length;for(e._length&&(g=Math.min(g,e._length)),s=0;s<g;s++)void 0===(u=h[l=a[s]])?(h[l]=p.length,f=[s],p.push(f),d[h[l]]=v(s)):(p[u].push(s),d[h[l]]=(d[h[l]]||[]).concat(v(s)));r._indexToPoints=d;var m=r.aggregations;for(s=0;s<m.length;s++)c(t,e,p,m[s]);"string"==typeof n&&c(t,e,p,{target:n,func:"first",enabled:!0}),e._length=p.length}}}},6744:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(4460),o=r(468).W,s=r(9104),l=s.COMPARISON_OPS,u=s.INTERVAL_OPS,c=s.SET_OPS;e.moduleType="transform",e.name="filter",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(l).concat(u).concat(c),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},e.supplyDefaults=function(t){var r={};function a(i,a){return n.coerce(t,r,e.attributes,i,a)}if(a("enabled")){var o=a("target");if(n.isArrayOrTypedArray(o)&&0===o.length)return r.enabled=!1,r;a("preservegaps"),a("operation"),a("value");var s=i.getComponentMethod("calendars","handleDefaults");s(t,r,"valuecalendar",null),s(t,r,"targetcalendar",null)}return r},e.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,f=i.length;e._length&&(f=Math.min(f,e._length));var h=r.targetcalendar,d=e._arrayAttrs,p=r.preservegaps;if("string"==typeof s){var v=n.nestedProperty(e,s+"calendar").get();v&&(h=v)}var g,m,y=function(t,e,r){var i=t.operation,a=t.value,o=n.isArrayOrTypedArray(a);function s(t){return-1!==t.indexOf(i)}var f,h=function(r){return e(r,0,t.valuecalendar)},d=function(t){return e(t,0,r)};switch(s(l)?f=h(o?a[0]:a):s(u)?f=o?[h(a[0]),h(a[1])]:[h(a),h(a)]:s(c)&&(f=o?a.map(h):[h(a)]),i){case"=":return function(t){return d(t)===f};case"!=":return function(t){return d(t)!==f};case"<":return function(t){return d(t)<f};case"<=":return function(t){return d(t)<=f};case">":return function(t){return d(t)>f};case">=":return function(t){return d(t)>=f};case"[]":return function(t){var e=d(t);return e>=f[0]&&e<=f[1]};case"()":return function(t){var e=d(t);return e>f[0]&&e<f[1]};case"[)":return function(t){var e=d(t);return e>=f[0]&&e<f[1]};case"(]":return function(t){var e=d(t);return e>f[0]&&e<=f[1]};case"][":return function(t){var e=d(t);return e<=f[0]||e>=f[1]};case")(":return function(t){var e=d(t);return e<f[0]||e>f[1]};case"](":return function(t){var e=d(t);return e<=f[0]||e>f[1]};case")[":return function(t){var e=d(t);return e<f[0]||e>=f[1]};case"{}":return function(t){return-1!==f.indexOf(d(t))};case"}{":return function(t){return-1===f.indexOf(d(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;p?(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},m=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},m=function(t,e){var r=x[t.astr][e];t.get().push(r)}),T(g);for(var w=o(e.transforms,r),M=0;M<f;M++)y(i[M])?(T(m,M),b[_++]=w(M)):p&&_++;r._indexToPoints=b,e._length=_}}function T(t,r){for(var i=0;i<d.length;i++)t(n.nestedProperty(e,d[i]),r)}}},2028:function(t,e,r){"use strict";var n=r(3400),i=r(3060),a=r(7316),o=r(468).W;function s(t,e){var r,s,l,u,c,f,h,d,p,v,g=e.transform,m=e.transformIndex,y=t.transforms[m].groups,x=o(t.transforms,g);if(!n.isArrayOrTypedArray(y)||0===y.length)return[t];var b=n.filterUnique(y),_=new Array(b.length),w=y.length,M=i.findArrayAttributes(t),T=g.styles||[],A={};for(r=0;r<T.length;r++)A[T[r].target]=T[r].value;g.styles&&(v=n.keyedContainer(g,"styles","target","value.name"));var k={},L={};for(r=0;r<b.length;r++){k[f=b[r]]=r,L[f]=0,(h=_[r]=n.extendDeepNoArrays({},t))._group=f,h.transforms[m]._indexToPoints={};var S=null;for(v&&(S=v.get(f)),h.name=S||""===S?S:n.templateString(g.nameformat,{trace:t.name,group:f}),d=h.transforms,h.transforms=[],s=0;s<d.length;s++)h.transforms[s]=n.extendDeepNoArrays({},d[s]);for(s=0;s<M.length;s++)n.nestedProperty(h,M[s]).set([])}for(l=0;l<M.length;l++){for(u=M[l],s=0,p=[];s<b.length;s++)p[s]=n.nestedProperty(_[s],u).get();for(c=n.nestedProperty(t,u).get(),s=0;s<w;s++)p[k[y[s]]].push(c[s])}for(s=0;s<w;s++)(h=_[k[y[s]]]).transforms[m]._indexToPoints[L[y[s]]]=x(s),L[y[s]]++;for(r=0;r<b.length;r++)f=b[r],h=_[r],a.clearExpandedTraceDefaultColors(h),h=n.extendDeepNoArrays(h,A[f]||{});return _}e.moduleType="transform",e.name="groupby",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},e.supplyDefaults=function(t,r,i){var a,o={};function s(r,i){return n.coerce(t,o,e.attributes,r,i)}if(!s("enabled"))return o;s("groups"),s("nameformat",i._dataLength>1?"%{group} (%{trace})":"%{group}");var l=t.styles,u=o.styles=[];if(l)for(a=0;a<l.length;a++){var c=u[a]={};n.coerce(l[a],u[a],e.attributes.styles,"target");var f=n.coerce(l[a],u[a],e.attributes.styles,"value");n.isPlainObject(f)?c.value=n.extendDeep({},f):f&&delete c.value}return o},e.transform=function(t,e){var r,n,i,a=[];for(n=0;n<t.length;n++)for(r=s(t[n],e),i=0;i<r.length;i++)a.push(r[i]);return a}},468:function(t,e){"use strict";e.W=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);var a=n?function(t){return n[t]}:function(t){return[t]};return a}},6272:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(468).W,o=r(9032).BADNUM;e.moduleType="transform",e.name="sort",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},e.supplyDefaults=function(t){var r={};function i(i,a){return n.coerce(t,r,e.attributes,i,a)}return i("enabled")&&(i("target"),i("order")),r},e.calcTransform=function(t,e,r){if(r.enabled){var s=n.getTargetArray(e,r);if(s){var l=r.target,u=s.length;e._length&&(u=Math.min(u,e._length));var c,f,h=e._arrayAttrs,d=function(t,e,r,n){var i,a=new Array(n),s=new Array(n);for(i=0;i<n;i++)a[i]={v:e[i],i:i};for(a.sort(function(t,e){switch(t.order){case"ascending":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:n-i};case"descending":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:i-n}}}(t,r)),i=0;i<n;i++)s[i]=a[i].i;return s}(r,s,i.getDataToCoordFunc(t,e,l,s),u),p=a(e.transforms,r),v={};for(c=0;c<h.length;c++){var g=n.nestedProperty(e,h[c]),m=g.get(),y=new Array(u);for(f=0;f<u;f++)y[f]=m[d[f]];g.set(y)}for(f=0;f<u;f++)v[f]=p(d[f]);r._indexToPoints=v,e._length=u}}}},5788:function(t,e){"use strict";e.version="2.31.0"},5411:function(t,e,r){var n=r(4168);!function(){var e={1964:function(t,e,r){t.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_heatmap2d:r(2510),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot2d:r(1850),gl_plot3d:r(4100),gl_pointcloud2d:r(4696),gl_scatter3d:r(8418),gl_select_box:r(3161),gl_spikes2d:r(4098),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t,e){if("object"!=l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(a=function(){return!!t})()}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}var u=r(7507),c=r(3778),f="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=p,e.IS=50;var h=2147483647;function d(t){if(t>h)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,p.prototype),e}function p(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return v(t,e,r)}function v(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!p.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|_(t,e),n=d(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(et(t,Uint8Array)){var e=new Uint8Array(t);return x(e.buffer,e.byteOffset,e.byteLength)}return y(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t));if(et(t,ArrayBuffer)||t&&et(t.buffer,ArrayBuffer))return x(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(et(t,SharedArrayBuffer)||t&&et(t.buffer,SharedArrayBuffer)))return x(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return p.from(n,e,r);var i=function(t){if(p.isBuffer(t)){var e=0|b(t.length),r=d(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||rt(t.length)?d(0):y(t):"Buffer"===t.type&&Array.isArray(t.data)?y(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return p.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(t))}function g(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function m(t){return g(t),d(t<0?0:0|b(t))}function y(t){for(var e=t.length<0?0:0|b(t.length),r=d(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function x(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,p.prototype),n}function b(t){if(t>=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return 0|t}function _(t,e){if(p.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||et(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(t).length;default:if(i)return n?-1:Q(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return z(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function M(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function T(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),rt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=p.from(e,n)),p.isBuffer(e))return 0===e.length?-1:A(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):A(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function A(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;a<s;a++)if(u(t,a)===u(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===l)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+l>s&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h<l;h++)if(u(t,a+h)!==u(e,h)){f=!1;break}if(f)return a}return-1}function k(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a,o=e.length;for(n>o/2&&(n=o/2),a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(rt(s))return a;t[r+a]=s}return a}function L(t,e,r,n){return tt(Q(e,t.length-r),t,r,n)}function S(t,e,r,n){return tt(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return tt($(e),t,r,n)}function C(t,e,r,n){return tt(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?u.fromByteArray(t):u.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a=t[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=P)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=P));return r}(n)}p.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),p.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}}),p.poolSize=8192,p.from=function(t,e,r){return v(t,e,r)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array),p.alloc=function(t,e,r){return function(t,e,r){return g(t),t<=0?d(t):void 0!==e?"string"==typeof r?d(t).fill(e,r):d(t).fill(e):d(t)}(t,e,r)},p.allocUnsafe=function(t){return m(t)},p.allocUnsafeSlow=function(t){return m(t)},p.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==p.prototype},p.compare=function(t,e){if(et(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),et(e,Uint8Array)&&(e=p.from(e,e.offset,e.byteLength)),!p.isBuffer(t)||!p.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},p.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return p.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=p.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(et(a,Uint8Array))i+a.length>n.length?(p.isBuffer(a)||(a=p.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!p.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},p.byteLength=_,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)M(this,e,e+1);return this},p.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)M(this,e,e+3),M(this,e+1,e+2);return this},p.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)M(this,e,e+7),M(this,e+1,e+6),M(this,e+2,e+5),M(this,e+3,e+4);return this},p.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?R(this,0,t):w.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(t){if(!p.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===p.compare(this,t)},p.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},f&&(p.prototype[f]=p.prototype.inspect),p.prototype.compare=function(t,e,r,n,i){if(et(t,Uint8Array)&&(t=p.from(t,t.offset,t.byteLength)),!p.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),u=this.slice(n,i),c=t.slice(e,r),f=0;f<s;++f)if(u[f]!==c[f]){a=u[f],o=c[f];break}return a<o?-1:o<a?1:0},p.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},p.prototype.indexOf=function(t,e,r){return T(this,t,e,r,!0)},p.prototype.lastIndexOf=function(t,e,r){return T(this,t,e,r,!1)},p.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return k(this,t,e,r);case"utf8":case"utf-8":return L(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function z(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a<r;++a)i+=nt[t[a]];return i}function N(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function F(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,a){if(!p.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function j(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function U(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function H(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function V(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,4),c.write(t,e,r,n,23,4),r+4}function Y(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,8),c.write(t,e,r,n,52,8),r+8}p.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,p.prototype),n},p.prototype.readUintLE=p.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},p.prototype.readUintBE=p.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},p.prototype.readUint8=p.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},p.prototype.readBigUInt64LE=it((function(t){Z(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||J(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))})),p.prototype.readBigUInt64BE=it((function(t){Z(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||J(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),p.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},p.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},p.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},p.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},p.prototype.readInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},p.prototype.readBigInt64LE=it((function(t){Z(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||J(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),p.prototype.readBigInt64BE=it((function(t){Z(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||J(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r)})),p.prototype.readFloatLE=function(t,e){return t>>>=0,e||F(t,4,this.length),c.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),c.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),c.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),c.read(this,t,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},p.prototype.writeUint8=p.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigUInt64LE=it((function(t){return j(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeBigUInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),p.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},p.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},p.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},p.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},p.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},p.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},p.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},p.prototype.writeBigInt64LE=it((function(t){return j(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeBigInt64BE=it((function(t){return U(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),p.prototype.writeFloatLE=function(t,e,r){return V(this,t,e,!0,r)},p.prototype.writeFloatBE=function(t,e,r){return V(this,t,e,!1,r)},p.prototype.writeDoubleLE=function(t,e,r){return Y(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return Y(this,t,e,!1,r)},p.prototype.copy=function(t,e,r,n){if(!p.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},p.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!p.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=p.isBuffer(t)?t:p.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<r-e;++a)this[a+e]=o[a%s]}return this};var G={};function W(t,e,r){G[t]=function(r){function i(){var r,n,s,u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),n=this,s=o(s=i),r=function(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(n,a()?Reflect.construct(s,u||[],o(n).constructor):s.apply(n,u)),Object.defineProperty(r,"message",{value:e.apply(r,arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(i,r),u=i,(c=[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}])&&n(u.prototype,c),Object.defineProperty(u,"prototype",{writable:!1}),u;var u,c}(r)}function q(t){for(var e="",r=t.length,n="-"===t[0]?1:0;r>=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function X(t,e,r,n,i,a){if(t>r||t<e){var o,s="bigint"==typeof e?"n":"";throw o=a>3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new G.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){Z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||J(e,t.length-(r+1))}(n,i,a)}function Z(t,e){if("number"!=typeof t)throw new G.ERR_INVALID_ARG_TYPE(e,"number",t)}function J(t,e,r){if(Math.floor(t)!==t)throw Z(t,r),new G.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(l(e))}),TypeError),W("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=q(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var K=/[^+/0-9A-Za-z-_]/g;function Q(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function $(t){return u.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function tt(t,e,r,n){var i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function et(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function rt(t){return t!=t}var nt=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function it(t){return"undefined"==typeof BigInt?at:t}function at(){throw new Error("BigInt not supported")}},9216:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=n(),f=i(),h=a();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:c,orbit:f,matrix:h},u)};var n=r(7261),i=r(9977),a=r(4192);function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r<e.length;++r)e[r].flush(t)},s.idle=function(t){for(var e=this._controllerList,r=0;r<e.length;++r)e[r].idle(t)},s.lookAt=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].lookAt(t,e,r,n)},s.rotate=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].rotate(t,e,r,n)},s.pan=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].pan(t,e,r,n)},s.translate=function(t,e,r,n){for(var i=this._controllerList,a=0;a<i.length;++a)i[a].translate(t,e,r,n)},s.setMatrix=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setMatrix(t,e)},s.setDistanceLimits=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setDistanceLimits(t,e)},s.setDistance=function(t,e){for(var r=this._controllerList,n=0;n<r.length;++n)r[n].setDistance(t,e)},s.recalcMatrix=function(t){this._active.recalcMatrix(t)},s.getDistance=function(t){return this._active.getDistance(t)},s.getDistanceLimits=function(t){return this._active.getDistanceLimits(t)},s.lastT=function(){return this._active.lastT()},s.setMode=function(t){if(t!==this._mode){var e=this._controllerNames.indexOf(t);if(!(e<0)){var r=this._active,n=this._controllerList[e],i=Math.max(r.lastT(),n.lastT());r.recalcMatrix(i),n.setMatrix(i,r.computedMatrix),this._active=n,this._mode=t,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},7169:function(t,e,r){"use strict";var n="undefined"==typeof WeakMap?r(1538):WeakMap,i=r(2762),a=r(8116),o=new n;t.exports=function(t){var e=o.get(t),r=e&&(e._triangleBuffer.handle||e._triangleBuffer.buffer);if(!r||!t.isBuffer(r)){var n=i(t,new Float32Array([-1,-1,-1,4,4,-1]));(e=a(t,[{buffer:n,type:t.FLOAT,size:2}]))._triangleBuffer=n,o.set(t,e)}e.bind(),t.drawArrays(t.TRIANGLES,0,3),e.unbind()}},1085:function(t,e,r){var n=r(1371);t.exports=function(t,e,r){e="number"==typeof e?e:1,r=r||": ";var i=t.split(/\r?\n/),a=String(i.length+e-1).length;return i.map((function(t,i){var o=i+e,s=String(o).length;return n(o,a-s)+r+t})).join("\n")}},3952:function(t,e,r){"use strict";t.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[0];for(var r=t[0].length,n=[t[0]],a=[0],o=1;o<e;++o)if(n.push(t[o]),i(n,r)){if(a.push(o),a.length===r+1)return a}else n.pop();return a};var n=r(3250);function i(t,e){for(var r=new Array(e+1),i=0;i<t.length;++i)r[i]=t[i];for(i=0;i<=t.length;++i){for(var a=t.length;a<=e;++a){for(var o=new Array(e),s=0;s<e;++s)o[s]=Math.pow(a+1-i,s);r[a]=o}if(n.apply(void 0,r))return!0}return!1}},5995:function(t,e,r){"use strict";t.exports=function(t,e){return n(e).filter((function(r){for(var n=new Array(r.length),a=0;a<r.length;++a)n[a]=e[r[a]];return i(n)*t<1}))};var n=r(7642),i=r(6037)},3502:function(t,e,r){t.exports=function(t,e){return i(n(t,e))};var n=r(5995),i=r(9127)},6468:function(t){t.exports=function(t){return atob(t)}},2642:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=t[l][o];a[o]=s}for(a[r]=new Array(r+1),o=0;o<=r;++o)a[r][o]=1;var u=new Array(r+1);for(o=0;o<r;++o)u[o]=e[o];u[r]=1;var c=n(a,u),f=i(c[r+1]);0===f&&(f=1);var h=new Array(r+1);for(o=0;o<=r;++o)h[o]=i(c[o])/f;return h};var n=r(727);function i(t){for(var e=0,r=0;r<t.length;++r)e+=t[r];return e}},7507:function(t,e){"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=s(t),o=a[0],l=a[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,o,l)),c=0,f=l>0?o-4:o;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===l&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===l&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(l(t,s,s+o>u?u:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,n){for(var i,a,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),a=r(2651),o=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var u,c,f=0;if(i(e))u=e.clone();else if("string"==typeof e)u=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),f-=256;u=a(e)}}if(n(r))u.mul(r[1]),c=r[0].clone();else if(i(r))c=r.clone();else if("string"==typeof r)c=o(r);else if(r)if(r===Math.floor(r))c=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),f+=256;c=a(r)}else c=a(1);return f>0?u=u.ushln(f):f<0&&(c=c.ushln(-f)),s(u,c)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a<e;a++)i+=r[a]*Math.pow(67108864,a);return n(t)*i}},4025:function(t,e,r){"use strict";var n=r(2361),i=r(8828).countTrailingZeros;t.exports=function(t){var e=i(n.lo(t));if(e<32)return e;var r=i(n.hi(t));return r>20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=i(s)+4;return u*(s+(h=n(l.ushln(c).divRound(r)))*Math.pow(2,-c))}var f=r.bitLength()-l.bitLength()+53,h=n(l.ushln(f).divRound(r));return f<1023?u*h*Math.pow(2,-f):u*(h*=Math.pow(2,-1023))*Math.pow(2,1023-f)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function r(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function n(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function i(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function a(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,a){return o(t,r,n,i,a,e)},gt:function(t,e,n,i,a){return o(t,e,n,i,a,r)},lt:function(t,e,r,i,a){return o(t,e,r,i,a,n)},le:function(t,e,r,n,a){return o(t,e,r,n,a,i)},eq:function(t,e,r,n,i){return o(t,e,r,n,i,a)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(n),e.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o<a;o++){var s=t.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=t.length-1,a=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,o=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=l(t,e,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=l(t,e,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,c=r;c<s;c+=n)l=u(t,c,c+n,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var f=1;for(l=u(t,c,t.length,e),c=0;c<o;c++)f*=e;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=l>>>26,f=67108863&l,h=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=h;d++){var p=u-d|0;c+=(o=(i=0|t.words[p])*(a=0|e.words[d])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<i|a)).toString(16);r=0!=(a=s>>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=f[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?v+r:c[u-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s<a;s++)u[s]=0}else{for(s=0;s<a-i;s++)u[s]=0;for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[a-s-1]=o}return u},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a<n.length;a++)e=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&e,i=e>>>26;for(;0!==i&&a<r.length;a++)e=(0|r.words[a])+i,this.words[a]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o<n.length;o++)a=(e=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<r.length;o++)a=(e=(0|r.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,a,o=t.words,s=e.words,l=r.words,u=0,c=0|o[0],f=8191&c,h=c>>>13,d=0|o[1],p=8191&d,v=d>>>13,g=0|o[2],m=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],M=8191&w,T=w>>>13,A=0|o[5],k=8191&A,L=A>>>13,S=0|o[6],E=8191&S,C=S>>>13,O=0|o[7],R=8191&O,P=O>>>13,D=0|o[8],I=8191&D,z=D>>>13,N=0|o[9],F=8191&N,B=N>>>13,j=0|s[0],U=8191&j,H=j>>>13,V=0|s[1],Y=8191&V,G=V>>>13,W=0|s[2],q=8191&W,X=W>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,vt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(v,U)|0,a=Math.imul(v,H);var mt=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,Y)|0))<<13)|0;u=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,H))+Math.imul(y,U)|0,a=Math.imul(y,H),n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,G)|0;var yt=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,q)|0))<<13)|0;u=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,H))+Math.imul(_,U)|0,a=Math.imul(_,H),n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(y,Y)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(v,q)|0,a=a+Math.imul(v,X)|0;var xt=(u+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;u=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(T,U)|0,a=Math.imul(T,H),n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(m,q)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(y,q)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,K)|0;var bt=(u+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;u=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,H))+Math.imul(L,U)|0,a=Math.imul(L,H),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,G)|0,n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,q)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,tt)|0;var _t=(u+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(E,U),i=(i=Math.imul(E,H))+Math.imul(C,U)|0,a=Math.imul(C,H),n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(T,q)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,nt)|0;var wt=(u+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;u=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,H))+Math.imul(P,U)|0,a=Math.imul(P,H),n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(L,q)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0;var Mt=(u+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((a=a+Math.imul(h,ut)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,H))+Math.imul(z,U)|0,a=Math.imul(z,H),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,G)|0,n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(C,q)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,K)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(m,at)|0,i=(i=i+Math.imul(m,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ut)|0;var Tt=(u+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;u=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,a=Math.imul(B,H),n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(P,q)|0,a=a+Math.imul(P,X)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(m,lt)|0,i=(i=i+Math.imul(m,ut)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ut)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(v,ft)|0,a=a+Math.imul(v,ht)|0;var At=(u+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,vt)|0)+Math.imul(h,pt)|0))<<13)|0;u=((a=a+Math.imul(h,vt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,G))+Math.imul(B,Y)|0,a=Math.imul(B,G),n=n+Math.imul(I,q)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(z,q)|0,a=a+Math.imul(z,X)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,K)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ut)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(m,ft)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,vt)|0)+Math.imul(v,pt)|0))<<13)|0;u=((a=a+Math.imul(v,vt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,X))+Math.imul(B,q)|0,a=Math.imul(B,X),n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ut)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var Lt=(u+(n=n+Math.imul(m,pt)|0)|0)+((8191&(i=(i=i+Math.imul(m,vt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((a=a+Math.imul(y,vt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(F,J),i=(i=Math.imul(F,K))+Math.imul(B,J)|0,a=Math.imul(B,K),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(z,$)|0,a=a+Math.imul(z,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(P,rt)|0,a=a+Math.imul(P,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ut)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(T,ft)|0,a=a+Math.imul(T,ht)|0;var St=(u+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,vt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((a=a+Math.imul(_,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,tt))+Math.imul(B,$)|0,a=Math.imul(B,tt),n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(z,rt)|0,a=a+Math.imul(z,nt)|0,n=n+Math.imul(R,at)|0,i=(i=i+Math.imul(R,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ut)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Et=(u+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,vt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((a=a+Math.imul(T,vt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(B,rt)|0,a=Math.imul(B,nt),n=n+Math.imul(I,at)|0,i=(i=i+Math.imul(I,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ut)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,vt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((a=a+Math.imul(L,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,at),i=(i=Math.imul(F,ot))+Math.imul(B,at)|0,a=Math.imul(B,ot),n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ut)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ut)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(P,ft)|0,a=a+Math.imul(P,ht)|0;var Ot=(u+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,vt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((a=a+Math.imul(C,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ut))+Math.imul(B,lt)|0,a=Math.imul(B,ut),n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(z,ft)|0,a=a+Math.imul(z,ht)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,vt)|0)+Math.imul(P,pt)|0))<<13)|0;u=((a=a+Math.imul(P,vt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(B,ft)|0,a=Math.imul(B,ht);var Pt=(u+(n=n+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,vt)|0)+Math.imul(z,pt)|0))<<13)|0;u=((a=a+Math.imul(z,vt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Dt=(u+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,vt))+Math.imul(B,pt)|0))<<13)|0;return u=((a=Math.imul(B,vt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,l[0]=gt,l[1]=mt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Mt,l[8]=Tt,l[9]=At,l[10]=kt,l[11]=Lt,l[12]=St,l[13]=Et,l[14]=Ct,l[15]=Ot,l[16]=Rt,l[17]=Pt,l[18]=Dt,0!==u&&(l[19]=u,r.length++),r};function v(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,l=Math.min(a,e.length-1),u=Math.max(0,a-t.length+1);u<=l;u++){var c=a-u,f=(0|t.words[c])*(0|e.words[u]),h=67108863&f;s=67108863&(h=h+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(h>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):v(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},g.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o<a;o++)n[o]=e[t[o]],i[o]=r[t[o]]},g.prototype.transform=function(t,e,r,n,i,a){this.permute(a,t,e,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var f=l,h=u,d=0;d<o;d++){var p=r[c+d],v=n[c+d],g=r[c+d+o],m=n[c+d+o],y=f*g-h*m;m=f*m+h*g,g=y,r[c+d]=p+g,n[c+d]=v+m,r[c+d+o]=p-g,n[c+d+o]=v-m,d!==s&&(y=l*f-u*h,h=l*h+u*f,f=y)}},g.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},g.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,r,i){for(var a=0,o=0;o<e;o++)a+=0|t[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},g.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(e.words,e.length,u,n),this.transform(o,a,s,l,n,i),this.transform(u,a,c,f,n,i);for(var d=0;d<n;d++){var p=s[d]*c[d]-l[d]*f[d];l[d]=s[d]*f[d]+l[d]*c[d],s[d]=p}return this.conjugate(s,l,n),this.transform(s,l,h,a,n,i),this.conjugate(h,a,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),v(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,a=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<r;this.words[e]=l|o,o=s>>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,l=r;if(i-=o,i=Math.max(0,i),l){for(var u=0;u<o;u++)l.words[u]=this.words[u];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,u=0;u<this.length;u++)this.words[u]=this.words[u+o];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-a|f>>>a,c=f&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,r){var i,a,o=t.length+r;this._expand(o);var s=0;for(i=0;i<t.length;i++){a=(0|this.words[i+r])+s;var l=(0|t.words[i])*e;s=((a-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(i,1,l);0===c.negative&&(n=c,s&&(s.words[l]=1));for(var f=l-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new M(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(x,y),x.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&r,i=10;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,y),i(_,y),i(w,y),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new x;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return m[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=o;0!==d.cmp(s);){for(var v=d,g=0;0!==v.cmp(s);g++)v=v.redSqr();n(g<p);var m=this.pow(f,new a(1).iushln(p-g-1));h=h.redMul(m),f=m.redSqr(),d=d.redMul(f),p=g}return h},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new T(t)},i(T,M),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e<i;++e)a+=t[e].length;var o=new Array(a),s=0;for(e=0;e<i;++e){var l=t[e],u=l.length;for(r=0;r<u;++r){var c=o[s++]=new Array(u-1),f=0;for(n=0;n<u;++n)n!==r&&(c[f++]=l[n]);if(1&r){var h=c[1];c[1]=c[0],c[0]=h}}}return o}},6867:function(t,e,r){"use strict";t.exports=function(t,e,r){switch(arguments.length){case 1:return n=[],u(i=t,i,c,!0),n;case 2:return"function"==typeof e?u(t,t,e,!0):function(t,e){return n=[],u(t,e,c,!1),n}(t,e);case 3:return u(t,e,r,!1);default:throw new Error("box-intersect: Invalid arguments")}var i};var n,i=r(1888),a=r(855),o=r(7150);function s(t,e){for(var r=0;r<t;++r)if(!(e[r]<=e[r+t]))return!0;return!1}function l(t,e,r,n){for(var i=0,a=0,o=0,l=t.length;o<l;++o){var u=t[o];if(!s(e,u)){for(var c=0;c<2*e;++c)r[i++]=u[c];n[a++]=o}}return a}function u(t,e,r,n){var s=t.length,u=e.length;if(!(s<=0||u<=0)){var c=t[0].length>>>1;if(!(c<=0)){var f,h=i.mallocDouble(2*c*s),d=i.mallocInt32(s);if((s=l(t,c,h,d))>0){if(1===c&&n)a.init(s),f=a.sweepComplete(c,r,0,s,h,d,0,s,h,d);else{var p=i.mallocDouble(2*c*u),v=i.mallocInt32(u);(u=l(e,c,p,v))>0&&(a.init(s+u),f=1===c?a.sweepBipartite(c,r,0,s,h,d,0,u,p,v):o(c,r,n,s,h,d,u,p,v),i.free(p),i.free(v))}i.free(h),i.free(d)}return f}}}function c(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,a,o,s,l,u,c){return i-n>l-s?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,d=f*n;h<i;++h,d+=f){var p=a[e+d],v=a[e+d+t],g=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=u[e+y+t],_=c[m];if(!(b<p||v<x)){for(var w=e+1;w<t;++w){var M=a[w+d],T=a[w+t+d],A=u[w+y],k=u[w+t+y];if(T<A||k<M)continue t}var L=r(g,_);if(void 0!==L)return L}}}}(t,e,r,n,i,a,o,s,l,u,c):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,d=f*s;h<l;++h,d+=f){var p=u[e+d],v=u[e+d+t],g=c[h];t:for(var m=n,y=f*n;m<i;++m,y+=f){var x=a[e+y],b=a[e+y+t],_=o[m];if(!(v<x||b<p)){for(var w=e+1;w<t;++w){var M=a[w+y],T=a[w+t+y],A=u[w+d],k=u[w+t+d];if(T<A||k<M)continue t}var L=r(_,g);if(void 0!==L)return L}}}}(t,e,r,n,i,a,o,s,l,u,c)}:function(t,e,r,n,i,a,o,s,l,u,c,f){return a-i>u-l?n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,d=f*n;h<i;++h,d+=f){var p=a[e+d],v=a[e+d+t],g=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=c[m];if(!(x<=p||v<x)){for(var _=e+1;_<t;++_){var w=a[_+d],M=a[_+t+d],T=u[_+y],A=u[_+t+y];if(M<T||A<w)continue t}var k=r(b,g);if(void 0!==k)return k}}}}(t,e,r,i,a,o,s,l,u,c,f):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,d=f*n;h<i;++h,d+=f){var p=a[e+d],v=a[e+d+t],g=o[h];t:for(var m=s,y=f*s;m<l;++m,y+=f){var x=u[e+y],b=c[m];if(!(x<p||v<x)){for(var _=e+1;_<t;++_){var w=a[_+d],M=a[_+t+d],T=u[_+y],A=u[_+t+y];if(M<T||A<w)continue t}var k=r(g,b);if(void 0!==k)return k}}}}(t,e,r,i,a,o,s,l,u,c,f):n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,d=f*s;h<l;++h,d+=f){var p=u[e+d],v=c[h];t:for(var g=n,m=f*n;g<i;++g,m+=f){var y=a[e+m],x=a[e+m+t],b=o[g];if(!(p<=y||x<p)){for(var _=e+1;_<t;++_){var w=a[_+m],M=a[_+t+m],T=u[_+d],A=u[_+t+d];if(M<T||A<w)continue t}var k=r(v,b);if(void 0!==k)return k}}}}(t,e,r,i,a,o,s,l,u,c,f):function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=s,d=f*s;h<l;++h,d+=f){var p=u[e+d],v=c[h];t:for(var g=n,m=f*n;g<i;++g,m+=f){var y=a[e+m],x=a[e+m+t],b=o[g];if(!(p<y||x<p)){for(var _=e+1;_<t;++_){var w=a[_+m],M=a[_+t+m],T=u[_+d],A=u[_+t+d];if(M<T||A<w)continue t}var k=r(b,v);if(void 0!==k)return k}}}}(t,e,r,i,a,o,s,l,u,c,f)}}e.partial=r(!1),e.full=r(!0)},7150:function(t,e,r){"use strict";t.exports=function(t,e,r,a,c,L,S,E,C){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(b*r);w.length<a&&(n.free(w),w=n.mallocInt32(a));var o=i.nextPow2(_*r);M.length<o&&(n.free(M),M=n.mallocDouble(o))}(t,a+S);var O,R=0,P=2*t;for(T(R++,0,0,a,0,S,r?16:0,-1/0,1/0),r||T(R++,0,0,S,0,a,1,-1/0,1/0);R>0;){var D=(R-=1)*b,I=w[D],z=w[D+1],N=w[D+2],F=w[D+3],B=w[D+4],j=w[D+5],U=R*_,H=M[U],V=M[U+1],Y=1&j,G=!!(16&j),W=c,q=L,X=E,Z=C;if(Y&&(W=E,q=C,X=c,Z=L),!(2&j&&z>=(N=g(t,I,z,N,W,q,V))||4&j&&(z=m(t,I,z,N,W,q,H))>=N)){var J=N-z,K=B-F;if(G){if(t*J*(J+K)<d){if(void 0!==(O=l.scanComplete(t,I,e,z,N,W,q,F,B,X,Z)))return O;continue}}else{if(t*Math.min(J,K)<f){if(void 0!==(O=o(t,I,e,Y,z,N,W,q,F,B,X,Z)))return O;continue}if(t*J*K<h){if(void 0!==(O=l.scanBipartite(t,I,e,Y,z,N,W,q,F,B,X,Z)))return O;continue}}var Q=p(t,I,z,N,W,q,H,V);if(z<Q)if(t*(Q-z)<f){if(void 0!==(O=s(t,I+1,e,z,Q,W,q,F,B,X,Z)))return O}else if(I===t-2){if(void 0!==(O=Y?l.sweepBipartite(t,e,F,B,X,Z,z,Q,W,q):l.sweepBipartite(t,e,z,Q,W,q,F,B,X,Z)))return O}else T(R++,I+1,z,Q,F,B,Y,-1/0,1/0),T(R++,I+1,F,B,z,Q,1^Y,-1/0,1/0);if(Q<N){var $=u(t,I,F,B,X,Z),tt=X[P*$+I],et=v(t,I,$,B,X,Z,tt);if(et<B&&T(R++,I,Q,N,et,B,(4|Y)+(G?16:0),tt,V),F<$&&T(R++,I,Q,N,F,$,(2|Y)+(G?16:0),H,tt),$+1===et){if(void 0!==(O=G?k(t,I,e,Q,N,W,q,$,X,Z[$]):A(t,I,e,Y,Q,N,W,q,$,X,Z[$])))return O}else if($<et){var rt;if(G){if(Q<(rt=y(t,I,Q,N,W,q,tt))){var nt=v(t,I,Q,rt,W,q,tt);if(I===t-2){if(Q<nt&&void 0!==(O=l.sweepComplete(t,e,Q,nt,W,q,$,et,X,Z)))return O;if(nt<rt&&void 0!==(O=l.sweepBipartite(t,e,nt,rt,W,q,$,et,X,Z)))return O}else Q<nt&&T(R++,I+1,Q,nt,$,et,16,-1/0,1/0),nt<rt&&(T(R++,I+1,nt,rt,$,et,0,-1/0,1/0),T(R++,I+1,$,et,nt,rt,1,-1/0,1/0))}}else Q<(rt=Y?x(t,I,Q,N,W,q,tt):y(t,I,Q,N,W,q,tt))&&(I===t-2?O=Y?l.sweepBipartite(t,e,$,et,X,Z,Q,rt,W,q):l.sweepBipartite(t,e,Q,rt,W,q,$,et,X,Z):(T(R++,I+1,Q,rt,$,et,Y,-1/0,1/0),T(R++,I+1,$,et,Q,rt,1^Y,-1/0,1/0)))}}}}};var n=r(1888),i=r(8828),a=r(2455),o=a.partial,s=a.full,l=r(855),u=r(3545),c=r(8105),f=128,h=1<<22,d=1<<22,p=c("!(lo>=p0)&&!(p1>=hi)"),v=c("lo===p0"),g=c("lo<p0"),m=c("hi<=p0"),y=c("lo<=p0&&p0<=hi"),x=c("lo<p0&&p0<=hi"),b=6,_=2,w=n.mallocInt32(1024),M=n.mallocDouble(1024);function T(t,e,r,n,i,a,o,s,l){var u=b*t;w[u]=e,w[u+1]=r,w[u+2]=n,w[u+3]=i,w[u+4]=a,w[u+5]=o;var c=_*t;M[c]=s,M[c+1]=l}function A(t,e,r,n,i,a,o,s,l,u,c){var f=2*t,h=l*f,d=u[h+e];t:for(var p=i,v=i*f;p<a;++p,v+=f){var g=o[v+e],m=o[v+e+t];if(!(d<g||m<d||n&&d===g)){for(var y,x=s[p],b=e+1;b<t;++b){g=o[v+b],m=o[v+b+t];var _=u[h+b],w=u[h+b+t];if(m<_||w<g)continue t}if(void 0!==(y=n?r(c,x):r(x,c)))return y}}}function k(t,e,r,n,i,a,o,s,l,u){var c=2*t,f=s*c,h=l[f+e];t:for(var d=n,p=n*c;d<i;++d,p+=c){var v=o[d];if(v!==u){var g=a[p+e],m=a[p+e+t];if(!(h<g||m<h)){for(var y=e+1;y<t;++y){g=a[p+y],m=a[p+y+t];var x=l[f+y],b=l[f+y+t];if(m<x||b<g)continue t}var _=r(v,u);if(void 0!==_)return _}}}}},3545:function(t,e,r){"use strict";t.exports=function(t,e,r,o,s,l){if(o<=r+1)return r;for(var u=r,c=o,f=o+r>>>1,h=2*t,d=f,p=s[h*f+e];u<c;){if(c-u<i){a(t,e,u,c,s,l),p=s[h*f+e];break}var v=c-u,g=Math.random()*v+u|0,m=s[h*g+e],y=Math.random()*v+u|0,x=s[h*y+e],b=Math.random()*v+u|0,_=s[h*b+e];m<=x?_>=x?(d=y,p=x):m>=_?(d=g,p=m):(d=b,p=_):x>=_?(d=y,p=x):_>=m?(d=g,p=m):(d=b,p=_);for(var w=h*(c-1),M=h*d,T=0;T<h;++T,++w,++M){var A=s[w];s[w]=s[M],s[M]=A}var k=l[c-1];for(l[c-1]=l[d],l[d]=k,w=h*(c-1),M=h*(d=n(t,e,u,c-1,s,l,p)),T=0;T<h;++T,++w,++M)A=s[w],s[w]=s[M],s[M]=A;if(k=l[c-1],l[c-1]=l[d],l[d]=k,f<d){for(c=d-1;u<c&&s[h*(c-1)+e]===p;)c-=1;c+=1}else{if(!(d<f))break;for(u=d+1;u<c&&s[h*u+e]===p;)u+=1}}return n(t,e,r,f,s,l,s[h*f+e])};var n=r(8105)("lo<p0"),i=8;function a(t,e,r,n,i,a){for(var o=2*t,s=o*(r+1)+e,l=r+1;l<n;++l,s+=o)for(var u=i[s],c=l,f=o*(l-1);c>r&&i[f+e]>u;--c,f-=o){for(var h=f,d=f+o,p=0;p<o;++p,++h,++d){var v=i[h];i[h]=i[d],i[d]=v}var g=a[c];a[c]=a[c-1],a[c-1]=g}}},8105:function(t){"use strict";t.exports=function(t){return e[t]};var e={"lo===p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=r;n>h;++h,l+=s)if(i[l+f]===o)if(c===h)c+=1,u+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[u],i[u++]=p}var v=a[h];a[h]=a[c],a[c++]=v}return c},"lo<p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=r;n>h;++h,l+=s)if(i[l+f]<o)if(c===h)c+=1,u+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[u],i[u++]=p}var v=a[h];a[h]=a[c],a[c++]=v}return c},"lo<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[u],i[u++]=p}var v=a[h];a[h]=a[c],a[c++]=v}return c},"hi<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[u],i[u++]=p}var v=a[h];a[h]=a[c],a[c++]=v}return c},"lo<p0&&p0<=hi":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=t+e,d=r;n>d;++d,l+=s){var p=i[l+f],v=i[l+h];if(p<o&&o<=v)if(c===d)c+=1,u+=s;else{for(var g=0;s>g;++g){var m=i[l+g];i[l+g]=i[u],i[u++]=m}var y=a[d];a[d]=a[c],a[c++]=y}}return c},"lo<=p0&&p0<=hi":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=t+e,d=r;n>d;++d,l+=s){var p=i[l+f],v=i[l+h];if(p<=o&&o<=v)if(c===d)c+=1,u+=s;else{for(var g=0;s>g;++g){var m=i[l+g];i[l+g]=i[u],i[u++]=m}var y=a[d];a[d]=a[c],a[c++]=y}}return c},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,a,o,s){for(var l=2*t,u=l*r,c=u,f=r,h=e,d=t+e,p=r;n>p;++p,u+=l){var v=i[u+h],g=i[u+d];if(!(v>=o||s>=g))if(f===p)f+=1,c+=l;else{for(var m=0;l>m;++m){var y=i[u+m];i[u+m]=i[c],i[c++]=y}var x=a[p];a[p]=a[f],a[f++]=x}}return f}}},1811:function(t){"use strict";t.exports=function(t,n){n<=4*e?r(0,n-1,t):u(0,n-1,t)};var e=32;function r(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(u<a)break;if(u===a&&c<o)break;r[l]=u,r[l+1]=c,l-=2}r[l]=a,r[l+1]=o}}function n(t,e,r){e*=2;var n=r[t*=2],i=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=n,r[e+1]=i}function i(t,e,r){e*=2,r[t*=2]=r[e],r[t+1]=r[e+1]}function a(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}function o(t,e,r,n,i){e*=2,i[t*=2]=i[e],i[e]=r,i[t+1]=i[e+1],i[e+1]=n}function s(t,e,r){e*=2;var n=r[t*=2],i=r[e];return!(n<i)&&(n!==i||r[t+1]>r[e+1])}function l(t,e,r,n){var i=n[t*=2];return i<e||i===e&&n[t+1]<r}function u(t,c,f){var h=(c-t+1)/6|0,d=t+h,p=c-h,v=t+c>>1,g=v-h,m=v+h,y=d,x=g,b=v,_=m,w=p,M=t+1,T=c-1,A=0;s(y,x,f)&&(A=y,y=x,x=A),s(_,w,f)&&(A=_,_=w,w=A),s(y,b,f)&&(A=y,y=b,b=A),s(x,b,f)&&(A=x,x=b,b=A),s(y,_,f)&&(A=y,y=_,_=A),s(b,_,f)&&(A=b,b=_,_=A),s(x,w,f)&&(A=x,x=w,w=A),s(x,b,f)&&(A=x,x=b,b=A),s(_,w,f)&&(A=_,_=w,w=A);for(var k=f[2*x],L=f[2*x+1],S=f[2*_],E=f[2*_+1],C=2*y,O=2*b,R=2*w,P=2*d,D=2*v,I=2*p,z=0;z<2;++z){var N=f[C+z],F=f[O+z],B=f[R+z];f[P+z]=N,f[D+z]=F,f[I+z]=B}i(g,t,f),i(m,c,f);for(var j=M;j<=T;++j)if(l(j,k,L,f))j!==M&&n(j,M,f),++M;else if(!l(j,S,E,f))for(;;){if(l(T,S,E,f)){l(T,k,L,f)?(a(j,M,T,f),++M,--T):(n(j,T,f),--T);break}if(--T<j)break}o(t,M-1,k,L,f),o(c,T+1,S,E,f),M-2-t<=e?r(t,M-2,f):u(t,M-2,f),c-(T+2)<=e?r(T+2,c,f):u(T+2,c,f),T-M<=e?r(M,T,f):u(M,T,f)}},855:function(t,e,r){"use strict";t.exports={init:function(t){var e=i.nextPow2(t);l.length<e&&(n.free(l),l=n.mallocInt32(e)),u.length<e&&(n.free(u),u=n.mallocInt32(e)),c.length<e&&(n.free(c),c=n.mallocInt32(e)),f.length<e&&(n.free(f),f=n.mallocInt32(e)),h.length<e&&(n.free(h),h=n.mallocInt32(e)),d.length<e&&(n.free(d),d=n.mallocInt32(e));var r=8*e;p.length<r&&(n.free(p),p=n.mallocDouble(r))},sweepBipartite:function(t,e,r,n,i,s,h,d,m,y){for(var x=0,b=2*t,_=t-1,w=b-1,M=r;M<n;++M){var T=s[M],A=b*M;p[x++]=i[A+_],p[x++]=-(T+1),p[x++]=i[A+w],p[x++]=T}for(M=h;M<d;++M){T=y[M]+o;var k=b*M;p[x++]=m[k+_],p[x++]=-T,p[x++]=m[k+w],p[x++]=T}var L=x>>>1;a(p,L);var S=0,E=0;for(M=0;M<L;++M){var C=0|p[2*M+1];if(C>=o)v(c,f,E--,C=C-o|0);else if(C>=0)v(l,u,S--,C);else if(C<=-o){C=-C-o|0;for(var O=0;O<S;++O)if(void 0!==(R=e(l[O],C)))return R;g(c,f,E++,C)}else{for(C=-C-1|0,O=0;O<E;++O){var R;if(void 0!==(R=e(C,c[O])))return R}g(l,u,S++,C)}}},sweepComplete:function(t,e,r,n,i,o,s,m,y,x){for(var b=0,_=2*t,w=t-1,M=_-1,T=r;T<n;++T){var A=o[T]+1<<1,k=_*T;p[b++]=i[k+w],p[b++]=-A,p[b++]=i[k+M],p[b++]=A}for(T=s;T<m;++T){A=x[T]+1<<1;var L=_*T;p[b++]=y[L+w],p[b++]=1|-A,p[b++]=y[L+M],p[b++]=1|A}var S=b>>>1;a(p,S);var E=0,C=0,O=0;for(T=0;T<S;++T){var R=0|p[2*T+1],P=1&R;if(T<S-1&&R>>1==p[2*T+3]>>1&&(P=2,T+=1),R<0){for(var D=-(R>>1)-1,I=0;I<O;++I)if(void 0!==(z=e(h[I],D)))return z;if(0!==P)for(I=0;I<E;++I)if(void 0!==(z=e(l[I],D)))return z;if(1!==P)for(I=0;I<C;++I){var z;if(void 0!==(z=e(c[I],D)))return z}0===P?g(l,u,E++,D):1===P?g(c,f,C++,D):2===P&&g(h,d,O++,D)}else D=(R>>1)-1,0===P?v(l,u,E--,D):1===P?v(c,f,C--,D):2===P&&v(h,d,O--,D)}},scanBipartite:function(t,e,r,n,i,s,c,f,h,d,m,y){var x=0,b=2*t,_=e,w=e+t,M=1,T=1;n?T=o:M=o;for(var A=i;A<s;++A){var k=A+M,L=b*A;p[x++]=c[L+_],p[x++]=-k,p[x++]=c[L+w],p[x++]=k}for(A=h;A<d;++A){k=A+T;var S=b*A;p[x++]=m[S+_],p[x++]=-k}var E=x>>>1;a(p,E);var C=0;for(A=0;A<E;++A){var O=0|p[2*A+1];if(O<0){var R=!1;if((k=-O)>=o?(R=!n,k-=o):(R=!!n,k-=1),R)g(l,u,C++,k);else{var P=y[k],D=b*k,I=m[D+e+1],z=m[D+e+1+t];t:for(var N=0;N<C;++N){var F=l[N],B=b*F;if(!(z<c[B+e+1]||c[B+e+1+t]<I)){for(var j=e+2;j<t;++j)if(m[D+j+t]<c[B+j]||c[B+j+t]<m[D+j])continue t;var U,H=f[F];if(void 0!==(U=n?r(P,H):r(H,P)))return U}}}}else v(l,u,C--,O-M)}},scanComplete:function(t,e,r,n,i,s,u,c,f,h,d){for(var v=0,g=2*t,m=e,y=e+t,x=n;x<i;++x){var b=x+o,_=g*x;p[v++]=s[_+m],p[v++]=-b,p[v++]=s[_+y],p[v++]=b}for(x=c;x<f;++x){b=x+1;var w=g*x;p[v++]=h[w+m],p[v++]=-b}var M=v>>>1;a(p,M);var T=0;for(x=0;x<M;++x){var A=0|p[2*x+1];if(A<0)if((b=-A)>=o)l[T++]=b-o;else{var k=d[b-=1],L=g*b,S=h[L+e+1],E=h[L+e+1+t];t:for(var C=0;C<T;++C){var O=l[C],R=u[O];if(R===k)break;var P=g*O;if(!(E<s[P+e+1]||s[P+e+1+t]<S)){for(var D=e+2;D<t;++D)if(h[L+D+t]<s[P+D]||s[P+D+t]<h[L+D])continue t;var I=r(R,k);if(void 0!==I)return I}}}else{for(b=A-o,C=T-1;C>=0;--C)if(l[C]===b){for(D=C+1;D<T;++D)l[D-1]=l[D];break}--T}}}};var n=r(1888),i=r(8828),a=r(1811),o=1<<28,s=1024,l=n.mallocInt32(s),u=n.mallocInt32(s),c=n.mallocInt32(s),f=n.mallocInt32(s),h=n.mallocInt32(s),d=n.mallocInt32(s),p=n.mallocDouble(8192);function v(t,e,r,n){var i=e[n],a=t[r-1];t[i]=a,e[a]=i}function g(t,e,r,n){t[r]=n,e[n]=r}},2538:function(t,e,r){"use strict";var n=r(8902),i=r(5542),a=r(2272),o=r(5023);function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function u(t,e,r){return e in t?t[e]:r}t.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var c=!!u(r,"delaunay",!0),f=!!u(r,"interior",!0),h=!!u(r,"exterior",!0),d=!!u(r,"infinity",!1);if(!f&&!h||0===t.length)return[];var p=n(t,e);if(c||f!==h||d){for(var v=i(t.length,function(t){return t.map(s).sort(l)}(e)),g=0;g<p.length;++g){var m=p[g];v.addTriangle(m[0],m[1],m[2])}return c&&a(t,v),h?f?d?o(v,0,d):v.cells():o(v,1,d):o(v,-1)}return p}},2272:function(t,e,r){"use strict";var n=r(2646)[4];function i(t,e,r,i,a,o){var s=e.opposite(i,a);if(!(s<0)){if(a<i){var l=i;i=a,a=l,l=o,o=s,s=l}e.isConstraint(i,a)||n(t[i],t[a],t[o],t[s])<0&&r.push(i,a)}}r(2478),t.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;s<a;++s)for(var l=o[s],u=1;u<l.length;u+=2)if(!((d=l[u])<s||e.isConstraint(s,d))){for(var c=l[u-1],f=-1,h=1;h<l.length;h+=2)if(l[h-1]===d){f=l[h];break}f<0||n(t[s],t[d],t[c],t[f])<0&&r.push(s,d)}for(;r.length>0;){for(var d=r.pop(),p=(c=-1,f=-1,l=o[s=r.pop()],1);p<l.length;p+=2){var v=l[p-1],g=l[p];v===d?f=g:g===d&&(c=v)}c<0||f<0||n(t[s],t[d],t[c],t[f])>=0||(e.flip(s,d),i(t,e,r,c,s,f),i(t,e,r,s,f,c),i(t,e,r,f,d,c),i(t,e,r,d,c,f))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i<n;++i){var s=(m=r[i])[0],l=m[1],u=m[2];l<u?l<s&&(m[0]=l,m[1]=u,m[2]=s):u<s&&(m[0]=u,m[1]=s,m[2]=l)}r.sort(o);var c=new Array(n);for(i=0;i<c.length;++i)c[i]=0;var f=[],h=[],d=new Array(3*n),p=new Array(3*n),v=null;e&&(v=[]);var g=new a(r,d,p,c,f,h,v);for(i=0;i<n;++i)for(var m=r[i],y=0;y<3;++y){s=m[y],l=m[(y+1)%3];var x=d[3*i+y]=g.locate(l,s,t.opposite(l,s)),b=p[3*i+y]=t.isConstraint(s,l);x<0&&(b?h.push(i):(f.push(i),c[i]=1),e&&v.push([l,s,-1]))}return g}(t,r);if(0===e)return r?n.cells.concat(n.boundary):n.cells;for(var i=1,s=n.active,l=n.next,u=n.flags,c=n.cells,f=n.constraint,h=n.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var d=s.pop();if(u[d]!==-i){u[d]=i,c[d];for(var p=0;p<3;++p){var v=h[3*d+p];v>=0&&0===u[v]&&(f[3*d+p]?l.push(v):(s.push(v),u[v]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var m=function(t,e,r){for(var n=0,i=0;i<t.length;++i)e[i]===r&&(t[n++]=t[i]);return t.length=n,t}(c,u,e);return r?m.concat(n.boundary):m},a.prototype.locate=(n=[0,0,0],function(t,e,r){var a=t,s=e,l=r;return e<r?e<t&&(a=e,s=r,l=t):r<t&&(a=r,s=t,l=e),a<0?-1:(n[0]=a,n[1]=s,n[2]=l,i.eq(this.cells,n,o))})},8902:function(t,e,r){"use strict";var n=r(2478),i=r(3250)[3];function a(t,e,r,n,i){this.a=t,this.b=e,this.idx=r,this.lowerIds=n,this.upperIds=i}function o(t,e,r,n){this.a=t,this.b=e,this.type=r,this.idx=n}function s(t,e){var r=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return r||(0!==t.type&&(r=i(t.a,t.b,e.b))?r:t.idx-e.idx)}function l(t,e){return i(t.a,t.b,e)}function u(t,e,r,a,o){for(var s=n.lt(e,a,l),u=n.gt(e,a,l),c=s;c<u;++c){for(var f=e[c],h=f.lowerIds,d=h.length;d>1&&i(r[h[d-2]],r[h[d-1]],a)>0;)t.push([h[d-1],h[d-2],o]),d-=1;h.length=d,h.push(o);var p=f.upperIds;for(d=p.length;d>1&&i(r[p[d-2]],r[p[d-1]],a)<0;)t.push([p[d-2],p[d-1],o]),d-=1;p.length=d,p.push(o)}}function c(t,e){var r;return(r=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?r:(r=e.b[0]<t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function f(t,e,r){var i=n.le(t,r,c),o=t[i],s=o.upperIds,l=s[s.length-1];o.upperIds=[l],t.splice(i+1,0,new a(r.a,r.b,r.idx,[l],s))}function h(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,c),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}t.exports=function(t,e){for(var r=t.length,n=e.length,i=[],l=0;l<r;++l)i.push(new o(t[l],null,0,l));for(l=0;l<n;++l){var c=e[l],d=t[c[0]],p=t[c[1]];d[0]<p[0]?i.push(new o(d,p,2,l),new o(p,d,1,l)):d[0]>p[0]&&i.push(new o(p,d,2,l),new o(d,p,1,l))}i.sort(s);for(var v=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([v,1],[v,0],-1,[],[],[],[])],m=[],y=(l=0,i.length);l<y;++l){var x=i[l],b=x.type;0===b?u(m,g,t,x.a,x.idx):2===b?f(g,0,x):h(g,0,x)}return m}},5542:function(t,e,r){"use strict";var n=r(2478);function i(t,e){this.stars=t,this.edges=e}t.exports=function(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=[];return new i(r,e)};var a=i.prototype;function o(t,e,r){for(var n=1,i=t.length;n<i;n+=2)if(t[n-1]===e&&t[n]===r)return t[n-1]=t[i-2],t[n]=t[i-1],void(t.length=i-2)}a.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(r,i){return t[0]=Math.min(r,i),t[1]=Math.max(r,i),n.eq(this.edges,t,e)>=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n<i;n+=2)if(r[n]===t)return r[n-1];return-1},a.flip=function(t,e){var r=this.opposite(t,e),n=this.opposite(e,t);this.removeTriangle(t,e,r),this.removeTriangle(e,t,n),this.addTriangle(t,n,r),this.addTriangle(e,r,n)},a.edges=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2)e.push([i[a],i[a+1]]);return e},a.cells=function(){for(var t=this.stars,e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;a+=2){var s=i[a],l=i[a+1];r<Math.min(s,l)&&e.push([r,s,l])}return e}},2419:function(t){"use strict";t.exports=function(t){for(var e=1,r=1;r<t.length;++r)for(var n=0;n<r;++n)if(t[r]<t[n])e=-e;else if(t[n]===t[r])return 0;return e}},3628:function(t,e,r){"use strict";var n=r(1338),i=r(727);function a(t,e){for(var r=0,n=t.length,i=0;i<n;++i)r+=t[i]*e[i];return r}function o(t){var e=t.length;if(0===e)return[];t[0].length;var r=n([t.length+1,t.length+1],1),o=n([t.length+1],1);r[e][e]=0;for(var s=0;s<e;++s){for(var l=0;l<=s;++l)r[l][s]=r[s][l]=2*a(t[s],t[l]);o[s]=a(t[s],t[s])}var u=i(r,o),c=0,f=u[e+1];for(s=0;s<f.length;++s)c+=f[s];var h=new Array(e);for(s=0;s<e;++s){f=u[s];var d=0;for(l=0;l<f.length;++l)d+=f[l];h[s]=d/c}return h}function s(t){if(0===t.length)return[];for(var e=t[0].length,r=n([e]),i=o(t),a=0;a<t.length;++a)for(var s=0;s<e;++s)r[s]+=t[a][s]*i[a];return r}s.barycenetric=o,t.exports=s},6037:function(t,e,r){t.exports=function(t){for(var e=n(t),r=0,i=0;i<t.length;++i)for(var a=t[i],o=0;o<e.length;++o)r+=Math.pow(a[o]-e[o],2);return Math.sqrt(r/t.length)};var n=r(3628)},332:function(t,e,r){"use strict";t.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;a<e.length;++a){var o=e[a];i[a]=[o[0],o[1],r[a]]}e=i}for(var s=function(t,e,r){var n=p(t,[],d(t));return m(e,n,r),!!n}(t,e,!!r);y(t,e,!!r);)s=!0;if(r&&s)for(n.length=0,r.length=0,a=0;a<e.length;++a)o=e[a],n.push([o[0],o[1]]),r.push(o[2]);return s};var n=r(1755),i=r(6867),a=r(1125),o=r(7842),s=r(1318),l=r(946),u=r(5838),c=r(1278),f=r(3637);function h(t){var e=l(t);return[c(e,-1/0),c(e,1/0)]}function d(t){for(var e=new Array(t.length),r=0;r<t.length;++r){var n=t[r];e[r]=[c(n[0],-1/0),c(n[1],-1/0),c(n[0],1/0),c(n[1],1/0)]}return e}function p(t,e,r){for(var a=e.length,o=new n(a),s=[],l=0;l<e.length;++l){var u=e[l],f=h(u[0]),d=h(u[1]);s.push([c(f[0],-1/0),c(d[0],-1/0),c(f[1],1/0),c(d[1],1/0)])}i(s,(function(t,e){o.link(t,e)}));var p=!0,v=new Array(a);for(l=0;l<a;++l)(m=o.find(l))!==l&&(p=!1,t[m]=[Math.min(t[l][0],t[m][0]),Math.min(t[l][1],t[m][1])]);if(p)return null;var g=0;for(l=0;l<a;++l){var m;(m=o.find(l))===l?(v[l]=g,t[g++]=t[l]):v[l]=-1}for(t.length=g,l=0;l<a;++l)v[l]<0&&(v[l]=v[o.find(l)]);return v}function v(t,e){return t[0]-e[0]||t[1]-e[1]}function g(t,e){return t[0]-e[0]||t[1]-e[1]||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function m(t,e,r){if(0!==t.length){if(e)for(var n=0;n<t.length;++n){var i=e[(o=t[n])[0]],a=e[o[1]];o[0]=Math.min(i,a),o[1]=Math.max(i,a)}else for(n=0;n<t.length;++n){var o;i=(o=t[n])[0],a=o[1],o[0]=Math.min(i,a),o[1]=Math.max(i,a)}r?t.sort(g):t.sort(v);var s=1;for(n=1;n<t.length;++n){var l=t[n-1],u=t[n];(u[0]!==l[0]||u[1]!==l[1]||r&&u[2]!==l[2])&&(t[s++]=u)}t.length=s}}function y(t,e,r){var n=function(t,e){for(var r=new Array(e.length),n=0;n<e.length;++n){var i=e[n],a=t[i[0]],o=t[i[1]];r[n]=[c(Math.min(a[0],o[0]),-1/0),c(Math.min(a[1],o[1]),-1/0),c(Math.max(a[0],o[0]),1/0),c(Math.max(a[1],o[1]),1/0)]}return r}(t,e),h=function(t,e,r){var n=[];return i(r,(function(r,i){var o=e[r],s=e[i];if(o[0]!==s[0]&&o[0]!==s[1]&&o[1]!==s[0]&&o[1]!==s[1]){var l=t[o[0]],u=t[o[1]],c=t[s[0]],f=t[s[1]];a(l,u,c,f)&&n.push([r,i])}})),n}(t,e,n),v=function(t,e,r,n){var o=[];return i(r,n,(function(r,n){var i=e[r];if(i[0]!==n&&i[1]!==n){var s=t[n],l=t[i[0]],u=t[i[1]];a(l,u,s,s)&&o.push([r,n])}})),o}(t,e,n,d(t)),g=function(t,e,r,n,i){var a,c,h=t.map((function(t){return[o(t[0]),o(t[1])]}));for(a=0;a<r.length;++a){var d=r[a];c=d[0];var p=d[1],v=e[c],g=e[p],m=f(u(t[v[0]]),u(t[v[1]]),u(t[g[0]]),u(t[g[1]]));if(m){var y=t.length;t.push([l(m[0]),l(m[1])]),h.push(m),n.push([c,y],[p,y])}}for(n.sort((function(t,e){if(t[0]!==e[0])return t[0]-e[0];var r=h[t[1]],n=h[e[1]];return s(r[0],n[0])||s(r[1],n[1])})),a=n.length-1;a>=0;--a){var x=e[c=(L=n[a])[0]],b=x[0],_=x[1],w=t[b],M=t[_];if((w[0]-M[0]||w[1]-M[1])<0){var T=b;b=_,_=T}x[0]=b;var A,k=x[1]=L[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===c;){var L,S=(L=n[--a])[1];i?e.push([k,S,A]):e.push([k,S]),k=S}i?e.push([k,_,A]):e.push([k,_])}return h}(t,e,h,v,r),y=p(t,g);return m(e,y,r),!!y||h.length>0||v.length>0}},3637:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=c(a,f);if(0===o(h))return null;var d=c(f,s(t,r)),p=i(d,h),v=u(a,p);return l(t,v)};var n=r(6504),i=r(8697),a=r(5572),o=r(7721),s=r(544),l=r(2653),u=r(8987);function c(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},3642:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(t,e,r){"use strict";var n=r(3642),i=r(395);function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,u,c,f,h,d,p,v;if(t||(t={}),d=(t.nshades||72)-1,h=t.format||"hex",(f=t.colormap)||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+" not a supported colorscale");c=n[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);c=f.slice()}if(c.length>d+1)throw new Error(f+" map requires nshades to be at least size "+c.length);p=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=c.map((function(t){return Math.round(t.index*d)})),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var g=c.map((function(t,e){var r=c[e].index,n=c[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=p[0]+(p[1]-p[0])*r),n})),m=[];for(v=0;v<e.length-1;++v){u=e[v+1]-e[v],r=g[v],l=g[v+1];for(var y=0;y<u;y++){var x=y/u;m.push([Math.round(i(r[0],l[0],x)),Math.round(i(r[1],l[1],x)),Math.round(i(r[2],l[2],x)),i(r[3],l[3],x)])}}return m.push(c[c.length-1].rgb.concat(p[1])),"hex"===h?m=m.map(o):"rgbaString"===h?m=m.map(s):"float"===h&&(m=m.map(a)),m}},3140:function(t,e,r){"use strict";t.exports=function(t,e,r,a){var o=n(e,r,a);if(0===o){var s=i(n(t,e,r)),u=i(n(t,e,a));if(s===u){if(0===s){var c=l(t,e,r);return c===l(t,e,a)?0:c?1:-1}return 0}return 0===u?s>0||l(t,e,a)?-1:1:0===s?u>0||l(t,e,r)?1:-1:i(u-s)}var f=n(t,e,r);return f>0?o>0&&n(t,e,a)>0?1:-1:f<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0||l(t,e,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),u=a(r[1],-e[1]),c=s(o(n,l),o(i,u));return c[c.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,a=t.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var o=t[0]+t[1],s=n[0]+n[1];if(a=o+t[2]-(s+n[2]))return a;var l=e(t[0],t[1]),u=e(n[0],n[1]);return e(l,t[2])-e(u,n[2])||e(l+t[2],o)-e(u+n[2],s);case 4:var c=t[0],f=t[1],h=t[2],d=t[3],p=n[0],v=n[1],g=n[2],m=n[3];return c+f+h+d-(p+v+g+m)||e(c,f,h,d)-e(p,v,g,m,p)||e(c+f,c+h,c+d,f+h,f+d,h+d)-e(p+v,p+g,p+m,v+g,v+m,g+m)||e(c+f+h,c+f+d,c+h+d,f+h+d)-e(p+v+g,p+v+m,p+g+m,v+g+m);default:for(var y=t.slice().sort(r),x=n.slice().sort(r),b=0;b<i;++b)if(a=y[b]-x[b])return a;return 0}};var e=Math.min;function r(t,e){return t-e}},3788:function(t,e,r){"use strict";var n=r(8507),i=r(2419);t.exports=function(t,e){return n(t,e)||i(t)-i(e)}},7352:function(t,e,r){"use strict";var n=r(5721),i=r(4750),a=r(2690);t.exports=function(t){var e=t.length;if(0===e)return[];if(1===e)return[[0]];var r=t[0].length;return 0===r?[]:1===r?n(t):2===r?i(t):a(t,r)}},5721:function(t){"use strict";t.exports=function(t){for(var e=0,r=0,n=1;n<t.length;++n)t[n][0]<t[e][0]&&(e=n),t[n][0]>t[r][0]&&(r=n);return e<r?[[e],[r]]:e>r?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o<r;++o){var s=e[o];i[o]=[a,s],a=s}return i};var n=r(3090)},2690:function(t,e,r){"use strict";t.exports=function(t,e){try{return n(t,!0)}catch(o){var r=i(t);if(r.length<=e)return[];var a=function(t,e){for(var r=t.length,n=new Array(r),i=0;i<e.length;++i)n[i]=t[e[i]];var a=e.length;for(i=0;i<r;++i)e.indexOf(i)<0&&(n[a++]=t[i]);return n}(t,r);return function(t,e){for(var r=t.length,n=e.length,i=0;i<r;++i)for(var a=t[i],o=0;o<a.length;++o){var s=a[o];if(s<n)a[o]=e[s];else{s-=n;for(var l=0;l<n;++l)s>=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var d=t.length-1;d>=0;--d)a[d]=u*t[d]+c*e[d]+f*r[d]+h*n[d];return a}return u*t+c*e+f*r+h*n},t.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a<i;++a){var o=n[a]-r[a];if(o)return o}return 0}t.exports=function(t,e){var r=t.length;if(0===r)return[];var s=t[0].length;if(s<1)return[];if(1===s)return function(t,e,r){if(1===t)return r?[[-1,0]]:[];var n=e.map((function(t,e){return[t[0],e]}));n.sort((function(t,e){return t[0]-e[0]}));for(var i=new Array(t-1),a=1;a<t;++a){var o=n[a-1],s=n[a];i[a-1]=[o[1],s[1]]}return r&&i.push([-1,i[0][1]],[i[t-1][1],-1]),i}(r,t,e);for(var l=new Array(r),u=1,c=0;c<r;++c){for(var f=t[c],h=new Array(s+1),d=0,p=0;p<s;++p){var v=f[p];h[p]=v,d+=v*v}h[s]=d,l[c]=new a(h,c),u=Math.max(d,u)}i(l,o),r=l.length;var g=new Array(r+s+1),m=new Array(r+s+1),y=(s+1)*(s+1)*u,x=new Array(s+1);for(c=0;c<=s;++c)x[c]=0;for(x[s]=y,g[0]=x.slice(),m[0]=-1,c=0;c<=s;++c)(h=x.slice())[c]=1,g[c+1]=h,m[c+1]=-1;for(c=0;c<r;++c){var b=l[c];g[c+s+1]=b.point,m[c+s+1]=b.index}var _=n(g,!1);if(_=e?_.filter((function(t){for(var e=0,r=0;r<=s;++r){var n=m[t[r]];if(n<0&&++e>=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=m[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(c=0;c<_.length;++c)h=(b=_[c])[0],b[0]=b[1],b[1]=h;return _}},2361:function(t){var e=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);r[0]=1,e=!0,1072693248===n[1]?(t.exports=function(t){return r[0]=t,[n[0],n[1]]},t.exports.pack=function(t,e){return n[0]=t,n[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[0]},t.exports.hi=function(t){return r[0]=t,n[1]}):1072693248===n[0]?(t.exports=function(t){return r[0]=t,[n[1],n[0]]},t.exports.pack=function(t,e){return n[1]=t,n[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[1]},t.exports.hi=function(t){return r[0]=t,n[0]}):e=!1}if(!e){var i=new Buffer(8);t.exports=function(t){return i.writeDoubleLE(t,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return i.writeUInt32LE(t,0,!0),i.writeUInt32LE(e,4,!0),i.readDoubleLE(0,!0)},t.exports.lo=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(0,!0)},t.exports.hi=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var a,o=new Array(i);if(n===t.length-1)for(a=0;a<i;++a)o[a]=r;else for(a=0;a<i;++a)o[a]=e(t,r,n+1);return o}t.exports=function(t,r){switch(void 0===r&&(r=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n<t;++n)r[n]=e;return r}(0|t,r);break;case"object":if("number"==typeof t.length)return e(t,r,0)}return[]}},3134:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var i=0;i<r;++i){var a=t[i];e=Math.max(e,a[0],a[1])}e=1+(0|e)}e|=0;var o=new Array(e);for(i=0;i<e;++i)o[i]=[];for(i=0;i<r;++i)o[(a=t[i])[0]].push(a[1]),o[a[1]].push(a[0]);for(var s=0;s<e;++s)n(o[s],(function(t,e){return t-e}));return o};var n=r(1682)},5033:function(t){"use strict";t.exports=function(t,e,r){var n=e||0,i=r||1;return[[t[12]+t[0],t[13]+t[1],t[14]+t[2],t[15]+t[3]],[t[12]-t[0],t[13]-t[1],t[14]-t[2],t[15]-t[3]],[t[12]+t[4],t[13]+t[5],t[14]+t[6],t[15]+t[7]],[t[12]-t[4],t[13]-t[5],t[14]-t[6],t[15]-t[7]],[n*t[12]+t[8],n*t[13]+t[9],n*t[14]+t[10],n*t[15]+t[11]],[i*t[12]-t[8],i*t[13]-t[9],i*t[14]-t[10],i*t[15]-t[11]]]}},9215:function(t,e,r){"use strict";t.exports=function(t,e,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:return"number"==typeof t?new o(n=l(t),n,0):new o(t,l(t.length),0);case 2:var n;if("number"==typeof e)return new o(t,n=l(t.length),+e);r=0;case 3:if(t.length!==e.length)throw new Error("state and velocity lengths must match");return new o(t,e,r)}};var n=r(4769),i=r(2478);function a(t,e,r){return Math.min(e,Math.max(t,r))}function o(t,e,r){this.dimension=t.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=t.slice().reverse(),this._velocity=e.slice().reverse(),this._time=[r],this._scratch=[t.slice(),t.slice(),t.slice(),t.slice(),t.slice()]}var s=o.prototype;function l(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=0;return e}s.flush=function(t){var e=i.gt(this._time,t)-1;e<=0||(this._time.splice(0,e),this._state.splice(0,e*this.dimension),this._velocity.splice(0,e*this.dimension))},s.curve=function(t){var e=this._time,r=e.length,o=i.le(e,t),s=this._scratch[0],l=this._state,u=this._velocity,c=this.dimension,f=this.bounds;if(o<0)for(var h=c-1,d=0;d<c;++d,--h)s[d]=l[h];else if(o>=r-1){h=l.length-1;var p=t-e[r-1];for(d=0;d<c;++d,--h)s[d]=l[h]+p*u[h]}else{h=c*(o+1)-1;var v=e[o],g=e[o+1]-v||1,m=this._scratch[1],y=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(d=0;d<c;++d,--h)m[d]=l[h],x[d]=u[h]*g,y[d]=l[h+c],b[d]=u[h+c]*g,_=_&&m[d]===y[d]&&x[d]===b[d]&&0===x[d];if(_)for(d=0;d<c;++d)s[d]=m[d];else n(m,x,y,b,(t-v)/g,s)}var w=f[0],M=f[1];for(d=0;d<c;++d)s[d]=a(w[d],M[d],s[d]);return s},s.dcurve=function(t){var e=this._time,r=e.length,a=i.le(e,t),o=this._scratch[0],s=this._state,l=this._velocity,u=this.dimension;if(a>=r-1)for(var c=s.length-1,f=(e[r-1],0);f<u;++f,--c)o[f]=l[c];else{c=u*(a+1)-1;var h=e[a],d=e[a+1]-h||1,p=this._scratch[1],v=this._scratch[2],g=this._scratch[3],m=this._scratch[4],y=!0;for(f=0;f<u;++f,--c)p[f]=s[c],g[f]=l[c]*d,v[f]=s[c+u],m[f]=l[c+u]*d,y=y&&p[f]===v[f]&&g[f]===m[f]&&0===g[f];if(y)for(f=0;f<u;++f)o[f]=0;else for(n.derivative(p,g,v,m,(t-h)/d,o),f=0;f<u;++f)o[f]/=d}return o},s.lastT=function(){var t=this._time;return t[t.length-1]},s.stable=function(){for(var t=this._velocity,e=t.length,r=this.dimension-1;r>=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1];this._time.push(e,t);for(var c=0;c<2;++c)for(var f=0;f<r;++f)n.push(n[o++]),i.push(0);for(this._time.push(t),f=r;f>0;--f)n.push(a(l[f-1],u[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t<e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=t-e,l=this.bounds,u=l[0],c=l[1],f=s>1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var d=a(u[h-1],c[h-1],arguments[h]);n.push(d),i.push((d-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t<this.lastT()||arguments.length!==e+1)){var r=this._state,n=this._velocity,i=this.bounds,o=i[0],s=i[1];this._time.push(t);for(var l=e;l>0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,f=c>1e-6?1/c:0;this._time.push(t);for(var h=r;h>0;--h){var d=arguments[h];n.push(a(l[h-1],u[h-1],n[o++]+d)),i.push(d*f)}}},s.idle=function(t){var e=this.lastT();if(!(t<e)){var r=this.dimension,n=this._state,i=this._velocity,o=n.length-r,s=this.bounds,l=s[0],u=s[1],c=t-e;this._time.push(t);for(var f=r-1;f>=0;--f)n.push(a(l[f],u[f],n[o]+c*i[o])),i.push(0),o+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function a(t,e){this._compare=t,this.root=e}t.exports=function(t){return new a(t||d,null)};var o=a.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function u(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=u(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return u(t,e,r,n,i.right)}function c(t,e){this.tree=t,this._stack=e}Object.defineProperty(o,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(o,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(t,r){for(var o=this._compare,s=this.root,l=[],u=[];s;){var c=o(t,s.key);l.push(s),u.push(c),s=c<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var f=l.length-2;f>=0;--f)s=l[f],u[f]<=0?l[f]=new e(s._color,s.key,s.value,l[f+1],s.right,s._count+1):l[f]=new e(s._color,s.key,s.value,s.left,l[f+1],s._count+1);for(f=l.length-1;f>1;--f){var h=l[f-1];if(s=l[f],1===h._color||1===s._color)break;var d=l[f-2];if(d.left===h)if(h.left===s){if(!(p=d.right)||0!==p._color){d._color=0,d.left=h.right,h._color=1,h.right=d,l[f-2]=h,l[f-1]=s,i(d),i(h),f>=3&&((v=l[f-3]).left===d?v.left=h:v.right=h);break}h._color=1,d.right=n(1,p),d._color=0,f-=1}else{if(!(p=d.right)||0!==p._color){h.right=s.left,d._color=0,d.left=s.right,s._color=1,s.left=h,s.right=d,l[f-2]=s,l[f-1]=h,i(d),i(h),i(s),f>=3&&((v=l[f-3]).left===d?v.left=s:v.right=s);break}h._color=1,d.right=n(1,p),d._color=0,f-=1}else if(h.right===s){if(!(p=d.left)||0!==p._color){d._color=0,d.right=h.left,h._color=1,h.left=d,l[f-2]=h,l[f-1]=s,i(d),i(h),f>=3&&((v=l[f-3]).right===d?v.right=h:v.left=h);break}h._color=1,d.left=n(1,p),d._color=0,f-=1}else{var p;if(!(p=d.left)||0!==p._color){var v;h.left=s.right,d._color=0,d.right=s.left,s._color=1,s.right=h,s.left=d,l[f-2]=s,l[f-1]=h,i(d),i(h),i(s),f>=3&&((v=l[f-3]).right===d?v.right=s:v.left=s);break}h._color=1,d.left=n(1,p),d._color=0,f-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return u(e,r,this._compare,t,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new c(this,t)}}),Object.defineProperty(o,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new c(this,t)}}),o.at=function(t){if(t<0)return new c(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new c(this,r);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new c(this,[])},o.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new c(this,n);r=i<=0?r.left:r.right}return new c(this,[])},o.remove=function(t){var e=this.find(t);return e?e.remove():this},o.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=c.prototype;function h(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new c(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var o=new Array(t.length),s=t[t.length-1];o[o.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?o[l]=new e(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count);if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var c=o[u-1];for(o.push(new e(s._color,c.key,c.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value,l=o.length-2;l>=u;--l)s=o[l],o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var f=o[o.length-2];for(f.left===s?f.left=null:f.right===s&&(f.right=null),o.pop(),l=0;l<o.length;++l)o[l]._count--;return new a(this.tree._compare,o[0])}if(s.left||s.right){for(s.left?h(s,s.left):s.right&&h(s,s.right),s._color=1,l=0;l<o.length-1;++l)o[l]._count--;return new a(this.tree._compare,o[0])}if(1===o.length)return new a(this.tree._compare,null);for(l=0;l<o.length;++l)o[l]._count--;var d=o[o.length-2];return function(t){for(var e,a,o,s,l=t.length-1;l>=0;--l){if(e=t[l],0===l)return void(e._color=1);if((a=t[l-1]).left===e){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,e._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((u=t[l-2]).left===a?u.left=o:u.right=o),void(t[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1&&((u=t[l-2]).left===a?u.left=s:u.right=s),void(t[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=n(0,o));a.right=n(0,o);continue}o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=t[l-2]).left===a?u.left=o:u.right=o),t[l-1]=o,t[l]=a,l+1<t.length?t[l+1]=e:t.push(e),l+=2}else{if((o=a.left).left&&0===o.left._color)return s=(o=a.left=r(o)).left=r(o.left),a.left=o.right,o.right=a,o.left=s,o._color=a._color,e._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((u=t[l-2]).right===a?u.right=o:u.left=o),void(t[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1&&((u=t[l-2]).right===a?u.right=s:u.left=s),void(t[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=n(0,o));a.left=n(0,o);continue}var u;o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=t[l-2]).right===a?u.right=o:u.left=o),t[l-1]=o,t[l]=a,l+1<t.length?t[l+1]=e:t.push(e),l+=2}}}(o),d.left===s?d.left=null:d.right=null,new a(this.tree._compare,o[0])},Object.defineProperty(f,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new e(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new e(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new c(t);return r.update(e),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=c.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),u=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),c=!1,f=!1;if("bounds"in t)for(var h=t.bounds,d=0;d<2;++d)for(var p=0;p<3;++p)h[d][p]!==this.bounds[d][p]&&(f=!0),this.bounds[d][p]=h[d][p];if("ticks"in t)for(r=t.ticks,c=!0,this.autoTicks=!1,d=0;d<3;++d)this.tickSpacing[d]=0;else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),f=!0,c=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),c=!0),c){for(d=0;d<3;++d)r[d].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?c=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(c=!0),a("tickSize"),a("tickAngle"),a("tickPad"),u("tickColor");var v=l("labels");l("labelFont")&&(v=!0),o("labelEnable"),a("labelSize"),a("labelPad"),u("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),u("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),u("lineTickColor"),o("gridEnable"),a("gridWidth"),u("gridColor"),o("zeroEnable"),u("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),u("backgroundColor"),this._text?this._text&&(v||c)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var d=[new h,new h,new h];function p(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,u=n[e],c=0;c<3;++c)if(e!==c){var f=a,h=s,d=o,p=l;u&1<<c&&(f=s,h=a,d=l,p=o),f[c]=r[0][c],h[c]=r[1][c],i[c]>0?(d[c]=-1,p[c]=0):(d[c]=0,p[c]=1)}}var v=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var m=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,c=o(r,n,i,a,s),f=c.cubeEdges,h=c.axis,b=n[12],_=n[13],w=n[14],M=n[15],T=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*M)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=f[A],this.lastCubeProps.axis[A]=h[A];var k=d;for(A=0;A<3;++A)p(d[A],A,this.bounds,f,h);e=this.gl;var L,S,E,C=v;for(A=0;A<3;++A)this.backgroundEnable[A]?C[A]=h[A]:C[A]=0;for(this._background.draw(r,n,i,a,C,this.backgroundColor),this._lines.bind(r,n,i,this),A=0;A<3;++A){var O=[0,0,0];h[A]>0?O[A]=a[1][A]:O[A]=a[0][A];for(var R=0;R<2;++R){var P=(A+1+R)%3,D=(A+1+(1^R))%3;this.gridEnable[P]&&this._lines.drawGrid(P,D,this.bounds,O,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(R=0;R<2;++R)P=(A+1+R)%3,D=(A+1+(1^R))%3,this.zeroEnable[D]&&Math.min(a[0][D],a[1][D])<=0&&Math.max(a[0][D],a[1][D])>=0&&this._lines.drawZero(P,D,this.bounds,O,this.zeroLineColor[D],this.zeroLineWidth[D]*this.pixelRatio)}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,k[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var I=u(m,k[A].primalMinor),z=u(y,k[A].mirrorMinor),N=this.lineTickLength;for(R=0;R<3;++R){var F=T/r[5*R];I[R]*=N[R]*F,z[R]*=N[R]*F}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,k[A].primalOffset,I,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,k[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}function B(t){(E=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?B(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&B(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),A=0;A<3;++A){var U=k[A].primalMinor,H=k[A].mirrorMinor,V=u(x,k[A].primalOffset);for(R=0;R<3;++R)this.lineTickEnable[A]&&(V[R]+=T*U[R]*Math.max(this.lineTickLength[R],0)/r[5*R]);var Y=[0,0,0];if(Y[A]=1,this.tickEnable[A]){for(-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,S=1,"auto"===(L=[this.tickAlign[A],.5,S])[0]?L[0]=0:L[0]=parseInt(""+L[0]),E=[0,0,0],j(A,U,H),R=0;R<3;++R)V[R]+=T*U[R]*this.tickPad[R]/r[5*R];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],V,this.tickColor[A],Y,E,L)}if(this.labelEnable[A]){for(S=0,E=[0,0,0],this.labels[A].length>4&&(B(A),S=1),"auto"===(L=[this.labelAlign[A],.5,S])[0]?L[0]=0:L[0]=parseInt(""+L[0]),R=0;R<3;++R)V[R]+=T*U[R]*this.labelPad[R]/r[5*R];V[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],V,this.labelColor[A],[0,0,0],E,L)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,f=[0,0,0],h=[0,0,0],d=-1;d<=1;d+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=d,h[l]=d;for(var p=-1;p<=1;p+=2){f[u]=p;for(var v=-1;v<=1;v+=2)f[c]=v,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=u;u=c,c=g}var m=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:m,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:m,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,m,x,b)};var n=r(2762),i=r(8116),a=r(1879).bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,a,d){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){c[2]=a[x][2];for(var b=0;b<2;++b){c[1]=a[b][1];for(var _=0;_<2;++_)c[0]=a[_][0],h(l[y],c,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var M=l[x][3],T=0;T<3;++T)u[x][T]=l[x][T]/M;d&&(u[x][2]*=-1),M<0&&(w<0||u[x][2]<u[w][2])&&(w=x)}if(w<0){w=0;for(var A=0;A<3;++A){for(var k=(A+2)%3,L=(A+1)%3,S=-1,E=-1,C=0;C<2;++C){var O=(P=C<<A)+(C<<k)+(1-C<<L),R=P+(1-C<<k)+(C<<L);o(u[P],u[O],u[R],f)<0||(C?S=1:E=1)}if(S<0||E<0)E>S&&(w|=1<<A);else{for(C=0;C<2;++C){O=(P=C<<A)+(C<<k)+(1-C<<L),R=P+(1-C<<k)+(C<<L);var P,D=p([l[P],l[O],l[R],l[P+(1<<k)+(1<<L)]]);C?S=D:E=D}E>S&&(w|=1<<A)}}}var I=7^w,z=-1;for(x=0;x<8;++x)x!==w&&x!==I&&(z<0||u[z][1]>u[x][1])&&(z=x);var N=-1;for(x=0;x<3;++x)(B=z^1<<x)!==w&&B!==I&&(N<0&&(N=B),(L=u[B])[0]<u[N][0]&&(N=B));var F=-1;for(x=0;x<3;++x){var B;(B=z^1<<x)!==w&&B!==I&&B!==N&&(F<0&&(F=B),(L=u[B])[0]>u[F][0]&&(F=B))}var j=v;j[0]=j[1]=j[2]=0,j[n.log2(N^z)]=z&N,j[n.log2(z^F)]=z&F;var U=7^F;U===w||U===I?(U=7^N,j[n.log2(F^U)]=U&F):j[n.log2(N^U)]=U&N;var H=g,V=w;for(A=0;A<3;++A)H[A]=V&1<<A?-1:1;return m};var n=r(8828),i=r(6760),a=r(5202),o=r(3250),s=new Array(16),l=new Array(8),u=new Array(8),c=new Array(3),f=[0,0,0];function h(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}!function(){for(var t=0;t<8;++t)l[t]=[1,1,1,1],u[t]=[1,1,1]}();var d=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function p(t){for(var e=0;e<d.length;++e)if((t=a.positive(t,d[e])).length<3)return 0;var r=t[0],n=r[0]/r[3],i=r[1]/r[3],o=0;for(e=1;e+1<t.length;++e){var s=t[e],l=t[e+1],u=s[0]/s[3]-n,c=s[1]/s[3]-i,f=l[0]/l[3]-n,h=l[1]/l[3]-i;o+=Math.abs(u*h-c*f)}return o}var v=[1,1,1],g=[0,0,0],m={cubeEdges:v,axis:g}},501:function(t,e,r){"use strict";t.exports=function(t,e,r){var o=[],s=[0,0,0],l=[0,0,0],u=[0,0,0],c=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var f=0;f<3;++f){for(var h=o.length/3|0,p=0;p<r[f].length;++p){var v=+r[f][p].x;o.push(v,0,1,v,1,1,v,0,-1,v,0,-1,v,1,1,v,1,-1)}var g=o.length/3|0;s[f]=h,l[f]=g-h,h=o.length/3|0;for(var m=0;m<r[f].length;++m)v=+r[f][m].x,o.push(v,0,1,v,1,1,v,0,-1,v,0,-1,v,1,1,v,1,-1);g=o.length/3|0,u[f]=h,c[f]=g-h}var y=n(t,new Float32Array(o)),x=i(t,[{buffer:y,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new d(t,y,x,b,l,s,c,u)};var n=r(2762),i=r(8116),a=r(1879).n,o=[0,0,0],s=[0,0,0],l=[0,0,0],u=[0,0,0],c=[1,1];function f(t){return t[0]=t[1]=t[2]=0,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function d(t,e,r,n,i,a,o,s){this.gl=t,this.vertBuffer=e,this.vao=r,this.shader=n,this.tickCount=i,this.tickOffset=a,this.gridCount=o,this.gridOffset=s}var p=d.prototype;p.bind=function(t,e,r){this.shader.bind(),this.shader.uniforms.model=t,this.shader.uniforms.view=e,this.shader.uniforms.projection=r,c[0]=this.gl.drawingBufferWidth,c[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=c,this.vao.bind()},p.unbind=function(){this.vao.unbind()},p.drawAxisLine=function(t,e,r,n,i){var a=f(s);this.shader.uniforms.majorAxis=s,a[t]=e[1][t]-e[0][t],this.shader.uniforms.minorAxis=a;var o,c=h(u,r);c[t]+=e[0][t],this.shader.uniforms.offset=c,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=n,(o=f(l))[(t+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=f(l))[(t+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},p.drawAxisTicks=function(t,e,r,n,i){if(this.tickCount[t]){var a=f(o);a[t]=1,this.shader.uniforms.majorAxis=a,this.shader.uniforms.offset=e,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=i;var s=f(l);s[t]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t])}},p.drawGrid=function(t,e,r,n,i,a){if(this.gridCount[t]){var c=f(s);c[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=c;var d=h(u,n);d[e]+=r[0][e],this.shader.uniforms.offset=d;var p=f(o);p[t]=1,this.shader.uniforms.majorAxis=p;var v=f(l);v[t]=1,this.shader.uniforms.screenAxis=v,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,this.gridCount[t],this.gridOffset[t])}},p.drawZero=function(t,e,r,n,i,a){var o=f(s);this.shader.uniforms.majorAxis=o,o[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=o;var c=h(u,n);c[t]+=r[0][t],this.shader.uniforms.offset=c;var d=f(l);d[e]=1,this.shader.uniforms.screenAxis=d,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=i,this.vao.draw(this.gl.TRIANGLES,6)},p.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},1879:function(t,e,r){"use strict";var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\nuniform float lineWidth;\nuniform vec2 screenShape;\n\nvec3 project(vec3 p) {\n vec4 pp = projection * view * model * vec4(p, 1.0);\n return pp.xyz / max(pp.w, 0.0001);\n}\n\nvoid main() {\n vec3 major = position.x * majorAxis;\n vec3 minor = position.y * minorAxis;\n\n vec3 vPosition = major + minor + offset;\n vec3 pPosition = project(vPosition);\n vec3 offset = project(vPosition + screenAxis * position.z);\n\n vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n\n gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.n=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"}])};var s=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, axis, alignDir, alignOpt;\nuniform float scale, angle, pixelScale;\nuniform vec2 resolution;\n\nvec3 project(vec3 p) {\n vec4 pp = projection * view * model * vec4(p, 1.0);\n return pp.xyz / max(pp.w, 0.0001);\n}\n\nfloat computeViewAngle(vec3 a, vec3 b) {\n vec3 A = project(a);\n vec3 B = project(b);\n\n return atan(\n (B.y - A.y) * resolution.y,\n (B.x - A.x) * resolution.x\n );\n}\n\nconst float PI = 3.141592;\nconst float TWO_PI = 2.0 * PI;\nconst float HALF_PI = 0.5 * PI;\nconst float ONE_AND_HALF_PI = 1.5 * PI;\n\nint option = int(floor(alignOpt.x + 0.001));\nfloat hv_ratio = alignOpt.y;\nbool enableAlign = (alignOpt.z != 0.0);\n\nfloat mod_angle(float a) {\n return mod(a, PI);\n}\n\nfloat positive_angle(float a) {\n return mod_angle((a < 0.0) ?\n a + TWO_PI :\n a\n );\n}\n\nfloat look_upwards(float a) {\n float b = positive_angle(a);\n return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,u,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,o,l){var u=i(t),f=a(t,[{buffer:u,size:3}]),h=s(t);h.attributes.position.location=0;var d=new c(t,h,u,f);return d.update(e,r,n,o,l),d};var i=r(2762),a=r(8116),o=r(4359),s=r(1879).Q,l=window||n.global||{},u=l.__TEXT_CACHE||{};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var f=c.prototype,h=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},f.unbind=function(){this.vao.unbind()},f.update=function(t,e,r,n,i){var a=[];function s(t,e,r,n,i,s){var l=u[r];l||(l=u[r]={});var c=l[e];c||(c=l[e]=function(t,e){try{return o(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,h=c.positions,d=c.cells,p=0,v=d.length;p<v;++p)for(var g=d[p],m=2;m>=0;--m){var y=h[g[m]];a.push(f*y[0],-f*y[1],t)}}for(var l=[0,0,0],c=[0,0,0],f=[0,0,0],h=[0,0,0],d={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){f[p]=a.length/3|0,s(.5*(t[0][p]+t[1][p]),e[p],r[p],12,1.25,d),h[p]=(a.length/3|0)-f[p],l[p]=a.length/3|0;for(var v=0;v<n[p].length;++v)n[p][v].text&&s(n[p][v].x,n[p][v].text,n[p][v].font||i,n[p][v].fontSize||12,1.25,d);c[p]=(a.length/3|0)-l[p]}this.buffer.update(a),this.tickOffset=l,this.tickCount=c,this.labelOffset=f,this.labelCount=h},f.drawTicks=function(t,e,r,n,i,a,o,s){this.tickCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[t],this.tickOffset[t]))},f.drawLabel=function(t,e,r,n,i,a,o,s){this.labelCount[t]&&(this.shader.uniforms.axis=a,this.shader.uniforms.color=i,this.shader.uniforms.angle=r,this.shader.uniforms.scale=e,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[t],this.labelOffset[t]))},f.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}},6444:function(t,e){"use strict";function r(t,e){var r=t+"",n=r.indexOf("."),i=0;n>=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var f=""+u;f.length<i;)f="0"+f;return c+"."+f}return c}e.create=function(t,e){for(var n=[],i=0;i<3;++i){for(var a=[],o=(t[0][i],t[1][i],0);o*e[i]<=t[1][i];++o)a.push({x:o*e[i],text:r(e[i],o)});for(o=-1;o*e[i]>=t[0][i];--o)a.push({x:o*e[i],text:r(e[i],o)});n.push(a)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;++n){var i=t[r][n],a=e[r][n];if(i.x!==a.x||i.text!==a.text||i.font!==a.font||i.fontColor!==a.fontColor||i.fontSize!==a.fontSize||i.dx!==a.dx||i.dy!==a.dy)return!1}}return!0}},5445:function(t,e,r){"use strict";t.exports=function(t,e,r,l,f){var h=e.model||u,d=e.view||u,m=e.projection||u,y=e._ortho||!1,x=t.bounds,b=(f=f||a(h,d,m,x,y)).axis;o(c,d,h),o(c,m,c);for(var _=v,w=0;w<3;++w)_[w].lo=1/0,_[w].hi=-1/0,_[w].pixelsPerDataUnit=1/0;var M=n(s(c,c));s(c,c);for(var T=0;T<3;++T){var A=(T+1)%3,k=(T+2)%3,L=g;t:for(w=0;w<2;++w){var S=[];if(b[T]<0!=!!w){L[T]=x[w][T];for(var E=0;E<2;++E){L[A]=x[E^w][A];for(var C=0;C<2;++C)L[k]=x[C^E^w][k],S.push(L.slice())}var O=y?5:4;for(E=O;E===O;++E){if(0===S.length)continue t;S=i.positive(S,M[E])}for(E=0;E<S.length;++E){k=S[E];var R=p(g,c,k,r,l);for(C=0;C<3;++C)_[C].lo=Math.min(_[C].lo,k[C]),_[C].hi=Math.max(_[C].hi,k[C]),C!==T&&(_[C].pixelsPerDataUnit=Math.min(_[C].pixelsPerDataUnit,Math.abs(R[C])))}}}}return _};var n=r(5033),i=r(5202),a=r(6429),o=r(6760),s=r(5665),l=r(5352),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=new Float32Array(16);function f(t,e,r){this.lo=t,this.hi=e,this.pixelsPerDataUnit=r}var h=[0,0,0,1],d=[0,0,0,1];function p(t,e,r,n,i){for(var a=0;a<3;++a){for(var o=h,s=d,u=0;u<3;++u)s[u]=o[u]=r[u];s[3]=o[3]=1,s[a]+=1,l(s,s,e),s[3]<0&&(t[a]=1/0),o[a]-=1,l(o,o,e),o[3]<0&&(t[a]=1/0);var c=(o[0]/o[3]-s[0]/s[3])*n,f=(o[1]/o[3]-s[1]/s[3])*i;t[a]=.25*Math.sqrt(c*c+f*f)}return t}var v=[new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0),new f(1/0,-1/0,1/0)],g=[0,0,0]},2762:function(t,e,r){"use strict";var n=r(1888),i=r(5298),a=r(9618),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(t,e,r,n,i){this.gl=t,this.type=e,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function u(t,e,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return t.bufferData(e,i,n),o;if(o+a>r)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function c(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a<i;++a)r[a]=t[a];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(t,e){if("number"!=typeof e&&(e=-1),this.bind(),"object"==typeof t&&void 0!==t.shape){var r=t.dtype;if(o.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"),r===t.dtype&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,t.data,e):this.length=u(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=u(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(t,"uint16"):c(t,"float32"),this.length=u(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=u(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,d=null,p=null,v=[],g=1/0,m=!1,y="raw"===t.coneSizemode,x=0;x<r.length;x++){var b=r[x];s=Math.min(b[0],s),l=Math.max(b[0],l),u=Math.min(b[1],u),c=Math.max(b[1],c),f=Math.min(b[2],f),h=Math.max(b[2],h);var _=i[x];if(n.length(_)>o&&(o=n.length(_)),x&&!y){var w=2*n.distance(d,b)/(n.length(p)+n.length(_));w?(g=Math.min(g,w),m=!1):m=!0}m||(d=b,p=_),v.push(_)}var M=[s,u,f],T=[l,c,h];e&&(e[0]=M,e[1]=T),0===o&&(o=1);var A=1/o;isFinite(g)||(g=1),a.vectorScale=g;var k=t.coneSize||(y?1:.5);t.absoluteConeSize&&(k=t.absoluteConeSize*A),a.coneScale=k,x=0;for(var L=0;x<r.length;x++)for(var S=(b=r[x])[0],E=b[1],C=b[2],O=v[x],R=n.length(O)*A,P=0;P<8;P++){a.positions.push([S,E,C,L++]),a.positions.push([S,E,C,L++]),a.positions.push([S,E,C,L++]),a.positions.push([S,E,C,L++]),a.positions.push([S,E,C,L++]),a.positions.push([S,E,C,L++]),a.vectors.push(O),a.vectors.push(O),a.vectors.push(O),a.vectors.push(O),a.vectors.push(O),a.vectors.push(O),a.vertexIntensity.push(R,R,R),a.vertexIntensity.push(R,R,R);var D=a.positions.length;a.cells.push([D-6,D-5,D-4],[D-3,D-2,D-1])}return a};var i=r(614);t.exports.createMesh=r(9060),t.exports.createConeMesh=function(e,r){return t.exports.createMesh(e,r,{shaders:i,traceType:"cone"})}},9060:function(t,e,r){"use strict";var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(6760),l=r(7608),u=r(9618),c=r(6729),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e,r,n,i,a,o,s,l,u,c){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=i,this.triangleVectors=a,this.triangleColors=s,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=u,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=c,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=f,this._view=f,this._projection=f,this._resolution=[1,1]}var d=h.prototype;d.isOpaque=function(){return this.opacity>=1},d.isTransparent=function(){return this.opacity<1},d.pickSlots=1,d.setPickBase=function(t){this.pickId=t},d.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=c({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],d=t.vertexIntensity,p=1/0,v=-1/0;if(d)if(t.vertexIntensityBounds)p=+t.vertexIntensityBounds[0],v=+t.vertexIntensityBounds[1];else for(var g=0;g<d.length;++g){var m=d[g];p=Math.min(p,m),v=Math.max(v,m)}else for(g=0;g<n.length;++g)m=n[g][2],p=Math.min(p,m),v=Math.max(v,m);for(this.intensity=d||function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=0;g<n.length;++g)for(var y=n[g],x=0;x<3;++x)!isNaN(y[x])&&isFinite(y[x])&&(this.bounds[0][x]=Math.min(this.bounds[0][x],y[x]),this.bounds[1][x]=Math.max(this.bounds[1][x],y[x]));var b=0;t:for(g=0;g<r.length;++g){var _=r[g];if(3===_.length){for(x=0;x<3;++x){y=n[M=_[x]];for(var w=0;w<3;++w)if(isNaN(y[w])||!isFinite(y[w]))continue t}for(x=0;x<3;++x){var M;y=n[M=_[2-x]],a.push(y[0],y[1],y[2],y[3]);var T=i[M];o.push(T[0],T[1],T[2],T[3]||0);var A,k=h;3===k.length?s.push(k[0],k[1],k[2],1):s.push(k[0],k[1],k[2],k[3]),A=d?[(d[M]-p)/(v-p),0]:[(y[2]-p)/(v-p),0],l.push(A[0],A[1]),f.push(g)}b+=1}}this.triangleCount=b,this.trianglePositions.update(a),this.triangleVectors.update(o),this.triangleColors.update(s),this.triangleUVs.update(l),this.triangleIds.update(new Uint32Array(f))}},d.drawTransparent=d.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var u={model:r,view:n,projection:i,inverseModel:f.slice(),clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};u.inverseModel=l(u.inverseModel,u.model),e.disable(e.CULL_FACE),this.texture.bind(0);var c=new Array(16);for(s(c,u.view,u.model),s(c,u.projection,c),l(c,c),o=0;o<3;++o)u.eyePosition[o]=c[12+o]/c[15];var h=c[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*c[4*o+3];for(o=0;o<3;++o){for(var d=c[12+o],p=0;p<3;++p)d+=c[4*p+o]*this.lightPosition[p];u.lightPosition[o]=d/h}if(this.triangleCount>0){var v=this.triShader;v.bind(),v.uniforms=u,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},d.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},d.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},d.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s=r.shaders;1===arguments.length&&(t=(e=t).gl);var l=function(t,e){var r=n(t,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(t,s),c=function(t,e){var r=n(t,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(t,s),f=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));f.generateMipmap(),f.minFilter=t.LINEAR_MIPMAP_LINEAR,f.magFilter=t.LINEAR;var d=i(t),p=i(t),v=i(t),g=i(t),m=i(t),y=new h(t,f,l,c,d,p,m,v,g,a(t,[{buffer:d,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:v,type:t.FLOAT,size:4},{buffer:g,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),r.traceType||"cone");return y.update(e),y}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(e,r,o,l);return u.update(t),u};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],u=n[15],c=(t._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*u)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*c,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var c=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=c[n],a=0;a<i.length;++a){var o=i[a];t.push(e[0],e[1],e[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return i.length}l.update=function(t){"lineWidth"in(t=t||{})&&(this.lineWidth=t.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in t&&(this.capSize=t.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var e=t.color||[[0,0,0],[0,0,0],[0,0,0]],r=t.position,n=t.error;if(Array.isArray(e[0])||(e=[e,e,e]),r&&n){var i=[],a=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=o;t:for(var l=0;l<a;++l){for(var c=r[l],h=0;h<3;++h)if(isNaN(c[h])||!isFinite(c[h]))continue t;var d,p=n[l],v=e[s];if(Array.isArray(v[0])&&(v=e[l]),3===v.length?v=[v[0],v[1],v[2],1]:4===v.length&&(v=[v[0],v[1],v[2],v[3]],!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0)),!isNaN(p[0][s])&&!isNaN(p[1][s]))p[0][s]<0&&((d=c.slice())[s]+=p[0][s],i.push(c[0],c[1],c[2],v[0],v[1],v[2],v[3],0,0,0,d[0],d[1],d[2],v[0],v[1],v[2],v[3],0,0,0),u(this.bounds,d),o+=2+f(i,d,v,s)),p[1][s]>0&&((d=c.slice())[s]+=p[1][s],i.push(c[0],c[1],c[2],v[0],v[1],v[2],v[3],0,0,0,d[0],d[1],d[2],v[0],v[1],v[2],v[3],0,0,0),u(this.bounds,d),o+=2+f(i,d,v,s))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n=r(7766);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=t.getExtension("WEBGL_draw_buffers");if(!l&&u&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;a<n;++a)i[a]=t.COLOR_ATTACHMENT0+a;for(a=n;a<r;++a)i[a]=t.NONE;l[n]=i}}(t,u),Array.isArray(e)&&(n=r,r=0|e[1],e=0|e[0]),"number"!=typeof e)throw new Error("gl-fbo: Missing shape parameter");var c=t.getParameter(t.MAX_RENDERBUFFER_SIZE);if(e<0||e>c||r<0||r>c)throw new Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(!u)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(f>t.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+f+" draw buffers")}}var h=t.UNSIGNED_BYTE,d=t.getExtension("OES_texture_float");if(n.float&&f>0){if(!d)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&f>0&&d&&(h=t.FLOAT);var v=!0;"depth"in n&&(v=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(t,e,r,h,f,v,g,u)};var i,a,o,s,l=null;function u(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function c(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function d(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function p(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var p=0;p<i;++p)this.color[p]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=a,this._useStencil=o;var v=this,g=[0|e,0|r];Object.defineProperties(g,{0:{get:function(){return v._shape[0]},set:function(t){return v.width=t}},1:{get:function(){return v._shape[1]},set:function(t){return v.height=t}}}),this._shapeVector=g,function(t){var e=u(t.gl),r=t.gl,n=t.handle=r.createFramebuffer(),i=t._shape[0],a=t._shape[1],o=t.color.length,s=t._ext,p=t._useStencil,v=t._useDepth,g=t._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var m=0;m<o;++m)t.color[m]=h(r,i,a,g,r.RGBA,r.COLOR_ATTACHMENT0+m);0===o?(t._color_rb=d(r,i,a,r.RGBA4,r.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):o>1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?p?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):v&&p?t._depth_rb=d(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v?t._depth_rb=d(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(t._depth_rb=d(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),m=0;m<t.color.length;++m)t.color[m].dispose(),t.color[m]=null;t._color_rb&&(r.deleteRenderbuffer(t._color_rb),t._color_rb=null),c(r,e),f(x)}c(r,e)}(this)}var v=p.prototype;function g(t,e,r){if(t._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(t._shape[0]!==e||t._shape[1]!==r){var n=t.gl,i=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=u(n),o=0;o<t.color.length;++o)t.color[o].shape=t._shape;t._color_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,t._shape[0],t._shape[1])),t.depth&&(t.depth.shape=t._shape),t._depth_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,t._depth_rb),t._useDepth&&t._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t._shape[0],t._shape[1]):t._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t._shape[0],t._shape[1]):t._useStencil&&n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,t._shape[0],t._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,t.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&&(t.dispose(),c(n,a),f(s)),c(n,a)}}Object.defineProperties(v,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(t){if(Array.isArray(t)||(t=[0|t,0|t]),2!==t.length)throw new Error("gl-fbo: Shape vector must be length 2");var e=0|t[0],r=0|t[1];return g(this,e,r),[e,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(t){return g(this,t|=0,this._shape[1]),t},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(t){return t|=0,g(this,this._shape[0],t),t},enumerable:!1}}),v.bind=function(){if(!this._destroyed){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.handle),t.viewport(0,0,this._shape[0],this._shape[1])}},v.dispose=function(){if(!this._destroyed){this._destroyed=!0;var t=this.gl;t.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(t.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var e=0;e<this.color.length;++e)this.color[e].dispose(),this.color[e]=null;this._color_rb&&(t.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},2992:function(t,e,r){var n=r(3387).sprintf,i=r(5171),a=r(1848),o=r(1085);t.exports=function(t,e,r){"use strict";var s=a(e)||"of unknown name (see npm glsl-shader-name)",l="unknown type";void 0!==r&&(l=r===i.FRAGMENT_SHADER?"fragment":"vertex");for(var u=n("Error compiling %s shader %s:\n",l,s),c=n("%s%s",u,t),f=t.split("\n"),h={},d=0;d<f.length;d++){var p=f[d];if(""!==p&&"\0"!==p){var v=parseInt(p.split(":")[2]);if(isNaN(v))throw new Error(n("Could not parse error: %s",p));h[v]=p}}var g=o(e).split("\n");for(d=0;d<g.length;d++)if((h[d+3]||h[d+2]||h[d+1])&&(u+=g[d]+"\n",h[d+1])){var m=h[d+1];m=m.substr(m.split(":",3).join(":").length+1).trim(),u+=n("^^^ %s\n\n",m)}return{long:u.trim(),short:c.trim()}}},2510:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.gl,n=new u(t,o(r,l.vertex,l.fragment),o(r,l.pickVertex,l.pickFragment),s(r),s(r),s(r),s(r));return n.update(e),t.addObject(n),n};var n=r(2478),i=r(7762),a=r(1888),o=r(9405),s=r(2762),l=r(6768);function u(t,e,r,n,i,a,o){this.plot=t,this.shader=e,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=i,this.colorBuffer=a,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var c,f=u.prototype,h=[0,0,1,0,0,1,1,0,1,1,0,1];f.draw=(c=[1,0,0,0,1,0,0,0,1],function(){var t=this.plot,e=this.shader,r=this.bounds,n=this.numVertices;if(!(n<=0)){var i=t.gl,a=t.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=a[2]-a[0],u=a[3]-a[1];c[0]=2*o/l,c[4]=2*s/u,c[6]=2*(r[0]-a[0])/l-1,c[7]=2*(r[1]-a[1])/u-1,e.bind();var f=e.uniforms;f.viewTransform=c,f.shape=this.shape;var h=e.attributes;this.positionBuffer.bind(),h.position.pointer(),this.weightBuffer.bind(),h.weight.pointer(i.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),h.color.pointer(i.UNSIGNED_BYTE,!0),i.drawArrays(i.TRIANGLES,0,n)}}),f.drawPick=function(){var t=[1,0,0,0,1,0,0,0,1],e=[0,0,0,0];return function(r){var n=this.plot,i=this.pickShader,a=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,u=a[2]-a[0],c=a[3]-a[1],f=l[2]-l[0],h=l[3]-l[1];t[0]=2*u/f,t[4]=2*c/h,t[6]=2*(a[0]-l[0])/f-1,t[7]=2*(a[1]-l[1])/h-1;for(var d=0;d<4;++d)e[d]=r>>8*d&255;this.pickOffset=r,i.bind();var p=i.uniforms;p.viewTransform=t,p.pickOffset=e,p.shape=this.shape;var v=i.attributes;return this.positionBuffer.bind(),v.position.pointer(),this.weightBuffer.bind(),v.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),v.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r<n||r>=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=o;var u,c,f,d,p=t.colorLevels||[0],v=t.colorValues||[0,0,0,1],g=p.length,m=this.bounds;l?(u=m[0]=r[0],c=m[1]=o[0],f=m[2]=r[r.length-1],d=m[3]=o[o.length-1]):(u=m[0]=r[0]+(r[1]-r[0])/2,c=m[1]=o[0]+(o[1]-o[0])/2,f=m[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,d=m[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(f-u),x=1/(d-c),b=e[0],_=e[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(h.length>>>1);this.numVertices=w;for(var M=a.mallocUint8(4*w),T=a.mallocFloat32(2*w),A=a.mallocUint8(2*w),k=a.mallocUint32(w),L=0,S=l?b-1:b,E=l?_-1:_,C=0;C<E;++C){var O,R;l?(O=x*(o[C]-c),R=x*(o[C+1]-c)):(O=C<_-1?x*(o[C]-(o[C+1]-o[C])/2-c):x*(o[C]-(o[C]-o[C-1])/2-c),R=C<_-1?x*(o[C]+(o[C+1]-o[C])/2-c):x*(o[C]+(o[C]-o[C-1])/2-c));for(var P=0;P<S;++P){var D,I;l?(D=y*(r[P]-u),I=y*(r[P+1]-u)):(D=P<b-1?y*(r[P]-(r[P+1]-r[P])/2-u):y*(r[P]-(r[P]-r[P-1])/2-u),I=P<b-1?y*(r[P]+(r[P+1]-r[P])/2-u):y*(r[P]+(r[P]-r[P-1])/2-u));for(var z=0;z<h.length;z+=2){var N,F,B,j,U=h[z],H=h[z+1],V=s[l?(C+H)*b+(P+U):C*b+P],Y=n.le(p,V);if(Y<0)N=v[0],F=v[1],B=v[2],j=v[3];else if(Y===g-1)N=v[4*g-4],F=v[4*g-3],B=v[4*g-2],j=v[4*g-1];else{var G=(V-p[Y])/(p[Y+1]-p[Y]),W=1-G,q=4*Y,X=4*(Y+1);N=W*v[q]+G*v[X],F=W*v[q+1]+G*v[X+1],B=W*v[q+2]+G*v[X+2],j=W*v[q+3]+G*v[X+3]}M[4*L]=255*N,M[4*L+1]=255*F,M[4*L+2]=255*B,M[4*L+3]=255*j,T[2*L]=.5*D+.5*I,T[2*L+1]=.5*O+.5*R,A[2*L]=U,A[2*L+1]=H,k[L]=C*b+P,L+=1}}}this.positionBuffer.update(T),this.weightBuffer.update(A),this.colorBuffer.update(M),this.idBuffer.update(k),a.free(T),a.free(M),a.free(A),a.free(k)},f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},6768:function(t,e,r){"use strict";var n=r(3236);t.exports={fragment:n(["precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n}\n"]),vertex:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 color;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n fragColor = color;\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"]),pickFragment:n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nuniform vec2 shape;\nuniform vec4 pickOffset;\n\nvoid main() {\n vec2 d = step(.5, vWeight);\n vec4 id = fragId + pickOffset;\n id.x += d.x + d.y*shape.x;\n\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n gl_FragColor = id/255.;\n}\n"]),pickVertex:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n vWeight = weight;\n\n fragId = pickId;\n\n vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"])}},7319:function(t,e,r){var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, nextPosition;\nattribute float arcLength, lineWidth;\nattribute vec4 color;\n\nuniform vec2 screenShape;\nuniform float pixelRatio;\nuniform mat4 model, view, projection;\n\nvarying vec4 fragColor;\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n vec4 startPoint = project(position);\n vec4 endPoint = project(nextPosition);\n\n vec2 A = startPoint.xy / startPoint.w;\n vec2 B = endPoint.xy / endPoint.w;\n\n float clipAngle = atan(\n (B.y - A.y) * screenShape.y,\n (B.x - A.x) * screenShape.x\n );\n\n vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\n sin(clipAngle),\n -cos(clipAngle)\n ) / screenShape;\n\n gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\n\n worldPosition = position;\n pixelArcLength = arcLength;\n fragColor = color;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,a,o,null,l)},e.createPickShader=function(t){return i(t,a,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),c=u(new Array(1024),[256,1,4]),d=0;d<1024;++d)c.data[d]=255;var p=a(e,c);p.wrap=e.REPEAT;var v=new m(e,r,o,s,l,p);return v.update(t),v};var n=r(2762),i=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),u=r(9618),c=r(7319),f=c.createShader,h=c.createPickShader,d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function v(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function m(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=m.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||d,view:t.view||d,projection:t.projection||d,clipBounds:v(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||d,view:t.view||d,projection:t.projection||d,pickId:this.pickId,clipBounds:v(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,c=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var d=t.color||t.colors||[0,0,0,1],v=t.lineWidth||1,g=!1;t:for(e=1;e<h.length;++e){var m,y,x,b=h[e-1],_=h[e];for(a.push(s),o.push(b.slice()),r=0;r<3;++r){if(isNaN(b[r])||isNaN(_[r])||!isFinite(b[r])||!isFinite(_[r])){if(!n&&i.length>0){for(var w=0;w<24;++w)i.push(i[i.length-12]);c+=2,g=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(d[0])?(m=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],y=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):m=y=d,3===m.length&&(m=[m[0],m[1],m[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0),x=Array.isArray(v)?v.length>e-1?v[e-1]:v.length>0?v[v.length-1]:[0,0,0,1]:v;var M=s;if(s+=p(b,_),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],M,x,m[0],m[1],m[2],m[3]);c+=2,g=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],M,x,m[0],m[1],m[2],m[3],b[0],b[1],b[2],_[0],_[1],_[2],M,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),c+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=c,this.points=o,this.arcLength=a,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),e=1;e<T.length;++e)T[e]=T[e-1]+T[e];var A=u(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)A.set(e,0,r,0);1&l.le(T,T[T.length-1]*e/255)?A.set(e,0,0,0):A.set(e,0,0,255)}this.texture.setPixels(A)}},y.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},y.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=function(t,e,r,n){return o[0]=0,o[1]=r,o[2]=e,o[3]=t,s[0]}(t.value[0],t.value[1],t.value[2]),r=l.le(this.arcLength,e);if(r<0)return null;if(r===this.arcLength.length-1)return new g(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],i=this.points[Math.min(r+1,this.points.length-1)],a=(e-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),u=1-a,c=[0,0,0],f=0;f<3;++f)c[f]=u*n[f]+a*i[f];var h=Math.min(a<.5?r:r+1,this.points.length-1);return new g(e,c,h,this.points[h])}},1903:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},6864:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},9921:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return(e*o-r*a)*(f*g-h*v)-(e*s-n*a)*(c*g-h*p)+(e*l-i*a)*(c*v-f*p)+(r*s-n*o)*(u*g-h*d)-(r*l-i*o)*(u*v-f*d)+(n*l-i*s)*(u*p-c*d)}},7399:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,p=i*l,v=a*o,g=a*s,m=a*l;return t[0]=1-f-p,t[1]=c+m,t[2]=h-g,t[3]=0,t[4]=c-m,t[5]=1-u-p,t[6]=d+v,t[7]=0,t[8]=h+g,t[9]=d-v,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6743:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,p=i*u,v=a*u,g=o*s,m=o*l,y=o*u;return t[0]=1-(d+v),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(c+v),t[6]=p+g,t[7]=0,t[8]=h+m,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},7894:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7608:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,M=i*u-a*l,T=c*v-f*p,A=c*g-h*p,k=c*m-d*p,L=f*g-h*v,S=f*m-d*v,E=h*m-d*g,C=y*E-x*S+b*L+_*k-w*A+M*T;return C?(C=1/C,t[0]=(s*E-l*S+u*L)*C,t[1]=(i*S-n*E-a*L)*C,t[2]=(v*M-g*w+m*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*k-o*E-u*A)*C,t[5]=(r*E-i*k+a*A)*C,t[6]=(g*b-p*M-m*x)*C,t[7]=(c*M-h*b+d*x)*C,t[8]=(o*S-s*k+u*T)*C,t[9]=(n*k-r*S-a*T)*C,t[10]=(p*w-v*b+m*y)*C,t[11]=(f*b-c*w-d*y)*C,t[12]=(s*A-o*L-l*T)*C,t[13]=(r*L-n*A+i*T)*C,t[14]=(v*x-p*_-g*y)*C,t[15]=(c*_-f*x+h*y)*C,t):null}},6582:function(t,e,r){var n=r(7894);t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,d,p,v=e[0],g=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],M=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(m-M)<1e-6?n(t):(f=v-_,h=g-w,d=m-M,a=x*(d*=p=1/Math.sqrt(f*f+h*h+d*d))-b*(h*=p),o=b*(f*=p)-y*d,s=y*h-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),l=h*s-d*o,u=d*a-f*s,c=f*o-h*a,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=d,t[11]=0,t[12]=-(a*v+o*g+s*m),t[13]=-(l*v+u*g+c*m),t[14]=-(f*v+h*g+d*m),t[15]=1,t)}},6760:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*d+w*m,t[3]=x*o+b*c+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*d+w*m,t[7]=x*o+b*c+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*d+w*m,t[11]=x*o+b*c+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*d+w*m,t[15]=x*o+b*c+_*p+w*y,t}},4040:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},4772:function(t){t.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},6079:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,d,p,v,g,m,y,x,b,_,w,M,T,A,k,L,S=n[0],E=n[1],C=n[2],O=Math.sqrt(S*S+E*E+C*C);return Math.abs(O)<1e-6?null:(S*=O=1/O,E*=O,C*=O,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],v=e[8],g=e[9],m=e[10],y=e[11],x=S*S*o+a,b=E*S*o+C*i,_=C*S*o-E*i,w=S*E*o-C*i,M=E*E*o+a,T=C*E*o+S*i,A=S*C*o+E*i,k=E*C*o-S*i,L=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+d*b+m*_,t[3]=c*x+p*b+y*_,t[4]=s*w+f*M+v*T,t[5]=l*w+h*M+g*T,t[6]=u*w+d*M+m*T,t[7]=c*w+p*M+y*T,t[8]=s*A+f*k+v*L,t[9]=l*A+h*k+g*L,t[10]=u*A+d*k+m*L,t[11]=c*A+p*k+y*L,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},5567:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},2408:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},7089:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},2504:function(t){t.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},7656:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,d,p,v=r[0],g=r[1],m=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*v+s*g+f*m+e[12],t[13]=i*v+l*g+h*m+e[13],t[14]=a*v+u*g+d*m+e[14],t[15]=o*v+c*g+p*m+e[15]),t}},5665:function(t){t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},7626:function(t,e,r){"use strict";var n=r(2642),i=r(9346);function a(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}function o(t,e,r,n,i){for(var o=a(n,a(r,a(e,[t[0],t[1],t[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*i[0]*(1+o[0]),.5*i[1]*(1-o[1])]}function s(t,e){for(var r=[0,0,0],n=0;n<t.length;++n)for(var i=t[n],a=e[n],o=0;o<3;++o)r[o]+=a*i[o];return r}t.exports=function(t,e,r,a,l,u){if(1===t.length)return[0,t[0].slice()];for(var c=new Array(t.length),f=0;f<t.length;++f)c[f]=o(t[f],r,a,l,u);var h=0,d=1/0;for(f=0;f<c.length;++f){for(var p=0,v=0;v<2;++v)p+=Math.pow(c[f][v]-e[v],2);p<d&&(d=p,h=f)}var g=function(t,e){if(2===t.length){for(var r=0,a=0,o=0;o<2;++o)r+=Math.pow(e[o]-t[0][o],2),a+=Math.pow(e[o]-t[1][o],2);return(r=Math.sqrt(r))+(a=Math.sqrt(a))<1e-6?[1,0]:[a/(r+a),r/(a+r)]}if(3===t.length){var s=[0,0];return i(t[0],t[1],t[2],e,s),n(t,s)}return[]}(c,e),m=0;for(f=0;f<3;++f){if(g[f]<-.001||g[f]>1.0001)return null;m+=g[f]}return Math.abs(m-1)>.001?null:[h,s(t,g),g]}},840:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:d,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),u=r(7608),c=r(9618),f=r(6729),h=r(7765),d=r(1888),p=r(840),v=r(7626),g=p.meshShader,m=p.wireShader,y=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(t,e,r,n,i,a,o,s,l,u,c,f,h,d,p,v,g,m,y,x,b,_,M,T,A,k,L){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=u,this.triangleVAO=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=m,this.edgeIds=v,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=M,this.pointSizes=T,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=L,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var T=M.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;r<e.length;++r){if(e.length<2)return 1;if(e[r][0]===t)return e[r][1];if(e[r][0]>t&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function k(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function L(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function S(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function E(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(t){this.pickId=t},T.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=d.mallocFloat32(6*a),s=0,l=0;l<a;++l)for(var u=r[l],c=0;c<2;++c){var f=u[0];2===u.length&&(f=u[c]);for(var p=n[f][0],v=n[f][1],g=i[f],m=1-g,y=this.positions[p],x=this.positions[v],b=0;b<3;++b)o[s++]=g*y[b]+m*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),d.free(o)}else this.contourCount=0},T.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"contourEnable"in t&&(this.contourEnable=t.contourEnable),"contourColor"in t&&(this.contourColor=t.contourColor),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"lightPosition"in t&&(this.lightPosition=t.lightPosition),this.hasAlpha=!1,"opacity"in t&&(this.opacity=t.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in t&&(this.opacityscale=t.opacityscale,this.hasAlpha=!0),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),t.texture?(this.texture.dispose(),this.texture=o(e,t.texture)):t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t,e){for(var r=f({colormap:t,nshades:256,format:"rgba"}),n=new Uint8Array(1024),i=0;i<256;++i){for(var a=r[i],o=0;o<3;++o)n[4*i+o]=a[o];n[4*i+3]=e?255*A(i/255,e):255*a[3]}return c(n,[256,256,4],[4,0,1])}(t.colormap,this.opacityscale)),this.texture.generateMipmap());var r=t.cells,n=t.positions;if(n&&r){var i=[],a=[],l=[],u=[],h=[],d=[],p=[],v=[],g=[],m=[],y=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,M=t.cellNormals,T=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,k=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!M&&(M=s.faceNormals(r,n,k)),M||w||(w=s.vertexNormals(r,n,T));var L=t.vertexColors,S=t.cellColors,E=t.meshColor||[1,1,1,1],C=t.vertexUVs,O=t.vertexIntensity,R=t.cellUVs,P=t.cellIntensity,D=1/0,I=-1/0;if(!C&&!R)if(O)if(t.vertexIntensityBounds)D=+t.vertexIntensityBounds[0],I=+t.vertexIntensityBounds[1];else for(var z=0;z<O.length;++z){var N=O[z];D=Math.min(D,N),I=Math.max(I,N)}else if(P)if(t.cellIntensityBounds)D=+t.cellIntensityBounds[0],I=+t.cellIntensityBounds[1];else for(z=0;z<P.length;++z)N=P[z],D=Math.min(D,N),I=Math.max(I,N);else for(z=0;z<n.length;++z)N=n[z][2],D=Math.min(D,N),I=Math.max(I,N);this.intensity=O||P||function(t){for(var e=t.length,r=new Array(e),n=0;n<e;++n)r[n]=t[n][2];return r}(n),this.pickVertex=!(P||S);var F=t.pointSizes,B=t.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],z=0;z<n.length;++z)for(var j=n[z],U=0;U<3;++U)!isNaN(j[U])&&isFinite(j[U])&&(this.bounds[0][U]=Math.min(this.bounds[0][U],j[U]),this.bounds[1][U]=Math.max(this.bounds[1][U],j[U]));var H=0,V=0,Y=0;t:for(z=0;z<r.length;++z){var G=r[z];switch(G.length){case 1:for(j=n[q=G[0]],U=0;U<3;++U)if(isNaN(j[U])||!isFinite(j[U]))continue t;m.push(j[0],j[1],j[2]),X=L?L[q]:S?S[z]:E,this.opacityscale&&O?a.push(X[0],X[1],X[2],this.opacity*A((O[q]-D)/(I-D),this.opacityscale)):3===X.length?y.push(X[0],X[1],X[2],this.opacity):(y.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)),Z=C?C[q]:O?[(O[q]-D)/(I-D),0]:R?R[z]:P?[(P[z]-D)/(I-D),0]:[(j[2]-D)/(I-D),0],x.push(Z[0],Z[1]),F?b.push(F[q]):b.push(B),_.push(z),Y+=1;break;case 2:for(U=0;U<2;++U){j=n[q=G[U]];for(var W=0;W<3;++W)if(isNaN(j[W])||!isFinite(j[W]))continue t}for(U=0;U<2;++U)j=n[q=G[U]],d.push(j[0],j[1],j[2]),X=L?L[q]:S?S[z]:E,this.opacityscale&&O?a.push(X[0],X[1],X[2],this.opacity*A((O[q]-D)/(I-D),this.opacityscale)):3===X.length?p.push(X[0],X[1],X[2],this.opacity):(p.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)),Z=C?C[q]:O?[(O[q]-D)/(I-D),0]:R?R[z]:P?[(P[z]-D)/(I-D),0]:[(j[2]-D)/(I-D),0],v.push(Z[0],Z[1]),g.push(z);V+=1;break;case 3:for(U=0;U<3;++U)for(j=n[q=G[U]],W=0;W<3;++W)if(isNaN(j[W])||!isFinite(j[W]))continue t;for(U=0;U<3;++U){var q,X,Z,J;j=n[q=G[2-U]],i.push(j[0],j[1],j[2]),(X=L?L[q]:S?S[z]:E)?this.opacityscale&&O?a.push(X[0],X[1],X[2],this.opacity*A((O[q]-D)/(I-D),this.opacityscale)):3===X.length?a.push(X[0],X[1],X[2],this.opacity):(a.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)):a.push(.5,.5,.5,1),Z=C?C[q]:O?[(O[q]-D)/(I-D),0]:R?R[z]:P?[(P[z]-D)/(I-D),0]:[(j[2]-D)/(I-D),0],u.push(Z[0],Z[1]),J=w?w[q]:M[z],l.push(J[0],J[1],J[2]),h.push(z)}H+=1}}this.pointCount=Y,this.edgeCount=V,this.triangleCount=H,this.pointPositions.update(m),this.pointColors.update(y),this.pointUVs.update(x),this.pointSizes.update(b),this.pointIds.update(new Uint32Array(_)),this.edgePositions.update(d),this.edgeColors.update(p),this.edgeUVs.update(v),this.edgeIds.update(new Uint32Array(g)),this.trianglePositions.update(i),this.triangleColors.update(a),this.triangleUVs.update(u),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(h))}},T.drawTransparent=T.draw=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:i,inverseModel:w.slice(),clipBounds:a,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};s.inverseModel=u(s.inverseModel,s.model),e.disable(e.CULL_FACE),this.texture.bind(0);var c=new Array(16);for(l(c,s.view,s.model),l(c,s.projection,c),u(c,c),o=0;o<3;++o)s.eyePosition[o]=c[12+o]/c[15];var f,h=c[15];for(o=0;o<3;++o)h+=this.lightPosition[o]*c[4*o+3];for(o=0;o<3;++o){for(var d=c[12+o],p=0;p<3;++p)d+=c[4*p+o]*this.lightPosition[p];s.lightPosition[o]=d/h}this.triangleCount>0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},T.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},T.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;a<r.length;++a)i[a]=n[r[a]];var o=t.coord[0],s=t.coord[1];if(!this.pickVertex){var l=this.positions[r[0]],u=this.positions[r[1]],c=this.positions[r[2]],f=[(l[0]+u[0]+c[0])/3,(l[1]+u[1]+c[1])/3,(l[2]+u[2]+c[2])/3];return{_cellCenter:!0,position:[o,s],index:e,cell:r,cellId:e,intensity:this.intensity[e],dataCoordinate:f}}var h=v(i,[o*this.pixelRatio,this._resolution[1]-s*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!h)return null;var d=h[2],p=0;for(a=0;a<r.length;++a)p+=d[a]*this.intensity[r[a]];return{position:h[1],index:r[h[0]],cell:r,cellId:e,intensity:p,dataCoordinate:this.positions[r[h[0]]]}},T.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},t.exports=function(t,e){if(1===arguments.length&&(t=(e=t).gl),!(t.getExtension("OES_standard_derivatives")||t.getExtension("MOZ_OES_standard_derivatives")||t.getExtension("WEBKIT_OES_standard_derivatives")))throw new Error("derivatives not supported");var r=function(t){var e=n(t,g.vertex,g.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}(t),s=function(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=k(t),u=L(t),f=S(t),h=E(t),d=o(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=t.LINEAR_MIPMAP_LINEAR,d.magFilter=t.LINEAR;var p=i(t),v=i(t),y=i(t),x=i(t),b=i(t),_=a(t,[{buffer:p,type:t.FLOAT,size:3},{buffer:b,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:v,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),T=i(t),A=i(t),C=i(t),O=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:T,type:t.FLOAT,size:4},{buffer:A,type:t.FLOAT,size:2}]),R=i(t),P=i(t),D=i(t),I=i(t),z=i(t),N=a(t,[{buffer:R,type:t.FLOAT,size:3},{buffer:z,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:P,type:t.FLOAT,size:4},{buffer:D,type:t.FLOAT,size:2},{buffer:I,type:t.FLOAT,size:1}]),F=i(t),B=new M(t,d,r,s,l,u,f,h,p,b,v,y,x,_,w,C,T,A,O,R,z,P,D,I,N,F,a(t,[{buffer:F,type:t.FLOAT,size:3}]));return B.update(e),B}},8120:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl;return new o(t,n(e,[0,0,0,1,1,0,1,1]),i(e,a.boxVert,a.lineFrag))};var n=r(2762),i=r(9405),a=r(3603);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,u=o.prototype;u.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},u.drawBox=(s=[0,0],l=[0,0],function(t,e,r,n,i){var a=this.plot,o=this.shader,u=a.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=i,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},1913:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl;return new s(t,n(e),i(e,o.gridVert,o.gridFrag),i(e,o.tickVert,o.gridFrag))};var n=r(2762),i=r(9405),a=r(2478),o=r(3603);function s(t,e,r,n){this.plot=t,this.vbo=e,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(t,e){return t-e}var u,c,f,h,d,p=s.prototype;p.draw=(u=[0,0],c=[0,0],f=[0,0],function(){for(var t=this.plot,e=this.vbo,r=this.shader,n=this.ticks,i=t.gl,a=t._tickBounds,o=t.dataBox,s=t.viewBox,l=t.gridLineWidth,h=t.gridLineColor,d=t.gridLineEnable,p=t.pixelRatio,v=0;v<2;++v){var g=a[v],m=a[v+2]-g,y=.5*(o[v+2]+o[v]),x=o[v+2]-o[v];c[v]=2*m/x,u[v]=2*(g-y)/x}r.bind(),e.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=u,r.uniforms.dataScale=c;var b=0;for(v=0;v<2;++v){f[0]=f[1]=0,f[v]=1,r.uniforms.dataAxis=f,r.uniforms.lineWidth=l[v]/(s[v+2]-s[v])*p,r.uniforms.color=h[v];var _=6*n[v].length;d[v]&&_&&i.drawArrays(i.TRIANGLES,b,_),b+=_}}),p.drawTickMarks=function(){var t=[0,0],e=[0,0],r=[1,0],n=[0,1],i=[0,0],o=[0,0];return function(){for(var s=this.plot,u=this.vbo,c=this.tickShader,f=this.ticks,h=s.gl,d=s._tickBounds,p=s.dataBox,v=s.viewBox,g=s.pixelRatio,m=s.screenBox,y=m[2]-m[0],x=m[3]-m[1],b=v[2]-v[0],_=v[3]-v[1],w=0;w<2;++w){var M=d[w],T=d[w+2]-M,A=.5*(p[w+2]+p[w]),k=p[w+2]-p[w];e[w]=2*T/k,t[w]=2*(M-A)/k}e[0]*=b/y,t[0]*=b/y,e[1]*=_/x,t[1]*=_/x,c.bind(),u.bind(),c.attributes.dataCoord.pointer();var L=c.uniforms;L.dataShift=t,L.dataScale=e;var S=s.tickMarkLength,E=s.tickMarkWidth,C=s.tickMarkColor,O=6*f[0].length,R=Math.min(a.ge(f[0],(p[0]-d[0])/(d[2]-d[0]),l),f[0].length),P=Math.min(a.gt(f[0],(p[2]-d[0])/(d[2]-d[0]),l),f[0].length),D=0+6*R,I=6*Math.max(0,P-R),z=Math.min(a.ge(f[1],(p[1]-d[1])/(d[3]-d[1]),l),f[1].length),N=Math.min(a.gt(f[1],(p[3]-d[1])/(d[3]-d[1]),l),f[1].length),F=O+6*z,B=6*Math.max(0,N-z);i[0]=2*(v[0]-S[1])/y-1,i[1]=(v[3]+v[1])/x-1,o[0]=S[1]*g/y,o[1]=E[1]*g/x,B&&(L.color=C[1],L.tickScale=o,L.dataAxis=n,L.screenOffset=i,h.drawArrays(h.TRIANGLES,F,B)),i[0]=(v[2]+v[0])/y-1,i[1]=2*(v[1]-S[0])/x-1,o[0]=E[0]*g/y,o[1]=S[0]*g/x,I&&(L.color=C[0],L.tickScale=o,L.dataAxis=r,L.screenOffset=i,h.drawArrays(h.TRIANGLES,D,I)),i[0]=2*(v[2]+S[3])/y-1,i[1]=(v[3]+v[1])/x-1,o[0]=S[3]*g/y,o[1]=E[3]*g/x,B&&(L.color=C[3],L.tickScale=o,L.dataAxis=n,L.screenOffset=i,h.drawArrays(h.TRIANGLES,F,B)),i[0]=(v[2]+v[0])/y-1,i[1]=2*(v[3]+S[2])/x-1,o[0]=E[2]*g/y,o[1]=S[2]*g/x,I&&(L.color=C[2],L.tickScale=o,L.dataAxis=r,L.screenOffset=i,h.drawArrays(h.TRIANGLES,D,I))}}(),p.update=(h=[1,1,-1,-1,1,-1],d=[1,-1,1,1,-1,-1],function(t){for(var e=t.ticks,r=t.bounds,n=new Float32Array(18*(e[0].length+e[1].length)),i=(this.plot.zeroLineEnable,0),a=[[],[]],o=0;o<2;++o)for(var s=a[o],l=e[o],u=r[o],c=r[o+2],f=0;f<l.length;++f){var p=(l[f].x-u)/(c-u);s.push(p);for(var v=0;v<6;++v)n[i++]=p,n[i++]=h[v],n[i++]=d[v]}this.ticks=a,this.vbo.update(n)}),p.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},4747:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl;return new o(t,n(e,[-1,-1,-1,1,1,-1,1,1]),i(e,a.lineVert,a.lineFrag))};var n=r(2762),i=r(9405),a=r(3603);function o(t,e,r){this.plot=t,this.vbo=e,this.shader=r}var s,l,u=o.prototype;u.bind=function(){var t=this.shader;this.vbo.bind(),this.shader.bind(),t.attributes.coord.pointer(),t.uniforms.screenBox=this.plot.screenBox},u.drawLine=(s=[0,0],l=[0,0],function(t,e,r,n,i,a){var o=this.plot,u=this.shader,c=o.gl;s[0]=t,s[1]=e,l[0]=r,l[1]=n,u.uniforms.start=s,u.uniforms.end=l,u.uniforms.width=i*o.pixelRatio,u.uniforms.color=a,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),u.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},3603:function(t,e,r){"use strict";var n=r(3236),i=n(["precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n"]);t.exports={lineVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 start, end;\nuniform float width;\n\nvec2 perp(vec2 v) {\n return vec2(v.y, -v.x);\n}\n\nvec2 screen(vec2 v) {\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n vec2 delta = normalize(perp(start - end));\n vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\n gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\n}\n"]),lineFrag:i,textVert:n(["#define GLSLIFY 1\nattribute vec3 textCoordinate;\n\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\nuniform float angle;\n\nvoid main() {\n float dataOffset = textCoordinate.z;\n vec2 glyphOffset = textCoordinate.xy;\n mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\n glyphMatrix * glyphOffset * textScale + screenOffset;\n gl_Position = vec4(screenCoordinate, 0, 1);\n}\n"]),textFrag:i,gridVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale;\nuniform float lineWidth;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\n gl_Position = vec4(pos, 0, 1);\n}\n"]),gridFrag:i,boxVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 lo, hi;\n\nvec2 screen(vec2 v) {\n return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\n}\n"]),tickVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n"])}},2142:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl;return new l(t,n(e),i(e,s.textVert,s.textFrag))};var n=r(2762),i=r(9405),a=r(529),o=r(2478),s=r(3603);function l(t,e,r){this.plot=t,this.vbo=e,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var u,c,f,h,d,p,v=l.prototype;v.drawTicks=(u=[0,0],c=[0,0],f=[0,0],function(t){var e=this.plot,r=this.shader,n=this.tickX[t],i=this.tickOffset[t],a=e.gl,s=e.viewBox,l=e.dataBox,h=e.screenBox,d=e.pixelRatio,p=e.tickEnable,v=e.tickPad,g=e.tickColor,m=e.tickAngle,y=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],M=this.labelCount[t],T=o.lt(n,l[t]),A=o.le(n,l[t+2]);u[0]=u[1]=0,u[t]=1,c[t]=(s[2+t]+s[t])/(h[2+t]-h[t])-1;var k=2/h[2+(1^t)]-h[1^t];c[1^t]=k*s[1^t]-1,p[t]&&(c[1^t]-=k*d*v[t],T<A&&i[A]>i[T]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t],r.uniforms.angle=m[t],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t]&&M&&(c[1^t]-=k*d*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,M)),c[1^t]=k*s[2+(1^t)]-1,p[t+2]&&(c[1^t]+=k*d*v[t+2],T<A&&i[A]>i[T]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t+2],r.uniforms.angle=m[t+2],a.drawArrays(a.TRIANGLES,i[T],i[A]-i[T]))),y[t+2]&&M&&(c[1^t]+=k*d*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,M))}),v.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),v.bind=(h=[0,0],d=[0,0],p=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,u=.5*(n[o+2]+n[o]),c=n[o+2]-n[o],f=a[o],v=a[o+2]-f,g=i[o],m=i[o+2]-g;d[o]=2*l/c*v/m,h[o]=2*(s-u)/c*v/m}p[1]=2*t.pixelRatio/(i[3]-i[1]),p[0]=p[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=d,e.uniforms.dataShift=h,e.uniforms.textScale=p,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),v.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,u=t.bounds;for(o=0;o<2;++o){var c=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e<h.length;++e){var d=h[e],p=d.x,v=d.text,g=d.font||"sans-serif";i=d.fontSize||12;for(var m=1/(u[o+2]-u[o]),y=u[o],x=v.split("\n"),b=0;b<x.length;b++)for(n=a(g,x[b]).data,r=0;r<n.length;r+=2)s.push(n[r]*i,-n[r+1]*i-b*i*1.2,(p-y)*m);c.push(Math.floor(s.length/3)),f.push(p)}this.tickOffset[o]=c,this.tickX[o]=f}for(o=0;o<2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=a(t.labelFont[o],t.labels[o],{textAlign:"center"}).data,i=t.labelSize[o],e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=a(t.titleFont,t.title).data,i=t.titleSize,e=0;e<n.length;e+=2)s.push(n[e]*i,-n[e+1]*i,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},v.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},1850:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=new l(e,n(e,[e.drawingBufferWidth,e.drawingBufferHeight]));return r.grid=i(r),r.text=a(r),r.line=o(r),r.box=s(r),r.update(t),r};var n=r(3589),i=r(1913),a=r(2142),o=r(4747),s=r(8120);function l(t,e){this.gl=t,this.pickBuffer=e,this.screenBox=[0,0,t.drawingBufferWidth,t.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var u=l.prototype;function c(t){for(var e=t.slice(),r=0;r<e.length;++r)e[r]=e[r].slice();return e}function f(t,e){return t.x-e.x}u.setDirty=function(){this.dirty=this.pickDirty=!0},u.setOverlayDirty=function(){this.dirty=!0},u.nextDepthValue=function(){return this._depthCounter++/65536},u.draw=function(){var t=this.gl,e=this.screenBox,r=this.viewBox,n=this.dataBox,i=this.pixelRatio,a=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,t.bindFramebuffer(t.FRAMEBUFFER,null),t.enable(t.SCISSOR_TEST),t.disable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.depthMask(!1),t.enable(t.BLEND),t.blendEquation(t.FUNC_ADD,t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.borderColor){t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]);var u=this.borderColor;t.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}t.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),t.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var c=this.backgroundColor;t.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),t.clear(t.COLOR_BUFFER_BIT),a.draw();var f=this.zeroLineEnable,h=this.zeroLineColor,d=this.zeroLineWidth;if(f[0]||f[1]){o.bind();for(var p=0;p<2;++p)if(f[p]&&n[p]<=0&&n[p+2]>=0){var v=e[p]-n[p]*(e[p+2]-e[p])/(n[p+2]-n[p]);0===p?o.drawLine(v,e[1],v,e[3],d[p],h[p]):o.drawLine(e[0],v,e[2],v,d[p],h[p])}}for(p=0;p<l.length;++p)l[p].draw();t.viewport(e[0],e[1],e[2]-e[0],e[3]-e[1]),t.scissor(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.grid.drawTickMarks(),o.bind();var g=this.borderLineEnable,m=this.borderLineWidth,y=this.borderLineColor;for(g[1]&&o.drawLine(r[0],r[1]-.5*m[1]*i,r[0],r[3]+.5*m[3]*i,m[1],y[1]),g[0]&&o.drawLine(r[0]-.5*m[0]*i,r[1],r[2]+.5*m[2]*i,r[1],m[0],y[0]),g[3]&&o.drawLine(r[2],r[1]-.5*m[1]*i,r[2],r[3]+.5*m[3]*i,m[3],y[3]),g[2]&&o.drawLine(r[0]-.5*m[0]*i,r[3],r[2]+.5*m[2]*i,r[3],m[2],y[2]),s.bind(),p=0;p<2;++p)s.drawTicks(p);this.titleEnable&&s.drawTitle();var x=this.overlays;for(p=0;p<x.length;++p)x[p].draw();t.disable(t.SCISSOR_TEST),t.disable(t.BLEND),t.depthMask(!0)}},u.drawPick=function(){if(!this.static){var t=this.pickBuffer;this.gl,this._pickTimeout=null,t.begin();for(var e=1,r=this.objects,n=0;n<r.length;++n)e=r[n].drawPick(e);t.end()}},u.pick=function(t,e){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,i=this.viewBox,a=0|Math.round((t-i[0]/r)*n),o=0|Math.round((e-i[1]/r)*n),s=this.pickBuffer.query(a,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),u=this.objects,c=0;c<u.length;++c){var f=u[c].pick(a,o,l);if(f)return f}return null}},u.setScreenBox=function(t){var e=this.screenBox,r=this.pixelRatio;e[0]=0|Math.round(t[0]*r),e[1]=0|Math.round(t[1]*r),e[2]=0|Math.round(t[2]*r),e[3]=0|Math.round(t[3]*r),this.setDirty()},u.setDataBox=function(t){var e=this.dataBox;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3])&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this.setDirty())},u.setViewBox=function(t){var e=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(t[0]*e),r[1]=0|Math.round(t[1]*e),r[2]=0|Math.round(t[2]*e),r[3]=0|Math.round(t[3]*e);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((t[2]-t[0])*n),0|Math.round((t[3]-t[1])*n)],this.setDirty()},u.update=function(t){t=t||{};var e=this.gl;this.pixelRatio=t.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(t.screenBox||[0,0,e.drawingBufferWidth/r,e.drawingBufferHeight/r]),this.screenBox,this.setViewBox(t.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,i=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(t.dataBox||[-10,-10/i,10,10/i]),this.borderColor=!1!==t.borderColor&&(t.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(t.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(t.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(t.gridLineWidth||[1,1]).slice(),this.gridLineColor=c(t.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(t.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(t.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=c(t.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(t.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(t.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=c(t.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(t.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!("titleEnable"in t)||!!t.titleEnable,this.titleAngle=t.titleAngle||0,this.titleColor=(t.titleColor||[0,0,0,1]).slice(),this.labelPad=(t.labelPad||[15,15,15,15]).slice(),this.labelAngle=(t.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(t.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=c(t.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(t.tickPad||[15,15,15,15]).slice(),this.tickAngle=(t.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(t.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=c(t.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(t.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(t.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=c(t.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var a=t.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s<2;++s){var l=a[s].slice(0);0!==l.length&&(l.sort(f),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:a}),this.text.update({bounds:o,ticks:a,labels:t.labels||["x","y"],labelSize:t.labelSize||[12,12],labelFont:t.labelFont||["sans-serif","sans-serif"],title:t.title||"",titleSize:t.titleSize||18,titleFont:t.titleFont||"sans-serif"}),this.static=!!t.static,this.setDirty()},u.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var t=this.objects.length-1;t>=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},u.removeObject=function(t){for(var e=this.objects,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setDirty();break}},u.addOverlay=function(t){this.overlays.indexOf(t)<0&&(this.overlays.push(t),this.setOverlayDirty())},u.removeOverlay=function(t){for(var e=this.overlays,r=0;r<e.length;++r)if(e[r]===t){e.splice(r,1),this.setOverlayDirty();break}}},4437:function(t,e,r){"use strict";t.exports=function(t,e){t=t||document.body;var r=[.01,1/0];"distanceLimits"in(e=e||{})&&(r[0]=e.distanceLimits[0],r[1]=e.distanceLimits[1]),"zoomMin"in e&&(r[0]=e.zoomMin),"zoomMax"in e&&(r[1]=e.zoomMax);var u=i({center:e.center||[0,0,0],up:e.up||[0,1,0],eye:e.eye||[0,0,10],mode:e.mode||"orbit",distanceLimits:r}),c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f=0,h=t.clientWidth,d=t.clientHeight,p={keyBindingMode:"rotate",enableWheel:!0,view:u,element:t,delay:e.delay||16,rotateSpeed:e.rotateSpeed||1,zoomSpeed:e.zoomSpeed||1,translateSpeed:e.translateSpeed||1,flipX:!!e.flipX,flipY:!!e.flipY,modes:u.modes,_ortho:e._ortho||e.projection&&"orthographic"===e.projection.type||!1,tick:function(){var e=n(),r=this.delay,i=e-2*r;u.idle(e-r),u.recalcMatrix(i),u.flush(e-(100+2*r));for(var a=!0,o=u.computedMatrix,s=0;s<16;++s)a=a&&c[s]===o[s],c[s]=o[s];var l=t.clientWidth===h&&t.clientHeight===d;return h=t.clientWidth,d=t.clientHeight,a?!l:(f=Math.exp(u.computedRadius[0]),!0)},lookAt:function(t,e,r){u.lookAt(u.lastT(),t,e,r)},rotate:function(t,e,r){u.rotate(u.lastT(),t,e,r)},pan:function(t,e,r){u.pan(u.lastT(),t,e,r)},translate:function(t,e,r){u.translate(u.lastT(),t,e,r)}};return Object.defineProperties(p,{matrix:{get:function(){return u.computedMatrix},set:function(t){return u.setMatrix(u.lastT(),t),u.computedMatrix},enumerable:!0},mode:{get:function(){return u.getMode()},set:function(t){var e=u.computedUp.slice(),r=u.computedEye.slice(),i=u.computedCenter.slice();if(u.setMode(t),"turntable"===t){var a=n();u._active.lookAt(a,r,i,e),u._active.lookAt(a+500,r,i,[0,0,1]),u._active.flush(a)}return u.getMode()},enumerable:!0},center:{get:function(){return u.computedCenter},set:function(t){return u.lookAt(u.lastT(),null,t),u.computedCenter},enumerable:!0},eye:{get:function(){return u.computedEye},set:function(t){return u.lookAt(u.lastT(),t),u.computedEye},enumerable:!0},up:{get:function(){return u.computedUp},set:function(t){return u.lookAt(u.lastT(),null,null,t),u.computedUp},enumerable:!0},distance:{get:function(){return f},set:function(t){return u.setDistance(u.lastT(),t),t},enumerable:!0},distanceLimits:{get:function(){return u.getDistanceLimits(r)},set:function(t){return u.setDistanceLimits(t),t},enumerable:!0}}),t.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),p._lastX=-1,p._lastY=-1,p._lastMods={shift:!1,control:!1,alt:!1,meta:!1},p.enableMouseListeners=function(){function e(e,r,i,a){var o=p.keyBindingMode;if(!1!==o){var s="rotate"===o,l="pan"===o,c="zoom"===o,h=!!a.control,d=!!a.alt,v=!!a.shift,g=!!(1&e),m=!!(2&e),y=!!(4&e),x=1/t.clientHeight,b=x*(r-p._lastX),_=x*(i-p._lastY),w=p.flipX?1:-1,M=p.flipY?1:-1,T=Math.PI*p.rotateSpeed,A=n();if(-1!==p._lastX&&-1!==p._lastY&&((s&&g&&!h&&!d&&!v||g&&!h&&!d&&v)&&u.rotate(A,w*T*b,-M*T*_,0),(l&&g&&!h&&!d&&!v||m||g&&h&&!d&&!v)&&u.pan(A,-p.translateSpeed*b*f,p.translateSpeed*_*f,0),c&&g&&!h&&!d&&!v||y||g&&!h&&d&&!v)){var k=-p.zoomSpeed*_/window.innerHeight*(A-u.lastT())*100;u.pan(A,0,0,f*(Math.exp(k)-1))}return p._lastX=r,p._lastY=i,p._lastMods=a,!0}}p.mouseListener=a(t,e),t.addEventListener("touchstart",(function(r){var n=s(r.changedTouches[0],t);e(0,n[0],n[1],p._lastMods),e(1,n[0],n[1],p._lastMods)}),!!l&&{passive:!0}),t.addEventListener("touchmove",(function(r){var n=s(r.changedTouches[0],t);e(1,n[0],n[1],p._lastMods),r.preventDefault()}),!!l&&{passive:!1}),t.addEventListener("touchend",(function(t){e(0,p._lastX,p._lastY,p._lastMods)}),!!l&&{passive:!0}),p.wheelListener=o(t,(function(t,e){if(!1!==p.keyBindingMode&&p.enableWheel){var r=p.flipX?1:-1,i=p.flipY?1:-1,a=n();if(Math.abs(t)>Math.abs(e))u.rotate(a,0,0,-t*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*i*e/window.innerHeight*(a-u.lastT())/20;u.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),u=r(7169),c=r(351),f=r(4772),h=r(4040),d=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function m(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(p=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw new Error("webgl not supported");var y=t.bounds||[[-10,-10,-10],[10,10,10]],x=new v,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),_=d(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,M={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},T=t.axes||{},A=i(r,T);A.enable=!T.disable;var k=t.spikes||{},L=o(r,k),S=[],E=[],C=[],O=[],R=!0,P=!0,D={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},I=(P=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),z=t.cameraObject||n(e,M),N={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:z,axes:A,axesPixels:null,spikes:L,bounds:y,objects:S,shape:I,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:m(t.autoResize),autoBounds:m(t.autoBounds),autoScale:!!t.autoScale,autoCenter:m(t.autoCenter),clipToBounds:m(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:D,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,P=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},F=[r.drawingBufferWidth/N.pixelRatio|0,r.drawingBufferHeight/N.pixelRatio|0];function B(){if(!N._stopped&&N.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*N.pixelRatio),a=0|Math.ceil(n*N.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",R=!0}}}function j(){for(var t=S.length,e=O.length,n=0;n<e;++n)C[n]=0;t:for(n=0;n<t;++n){var i=S[n],a=i.pickSlots;if(a){for(var o=0;o<e;++o)if(C[o]+a<255){E[n]=o,i.setPickBase(C[o]+1),C[o]+=a;continue t}var l=s(r,I);E[n]=e,O.push(l),C.push(a),i.setPickBase(1),e+=1}else E[n]=-1}for(;e>0&&0===C[e-1];)C.pop(),O.pop().dispose()}function U(){if(N.contextLost)return!0;r.isContextLost()&&(N.contextLost=!0,N.mouseListener.enabled=!1,N.selection.object=null,N.oncontextloss&&N.oncontextloss())}N.autoResize&&B(),window.addEventListener("resize",B),N.update=function(t){N._stopped||(t=t||{},R=!0,P=!0)},N.add=function(t){N._stopped||(t.axes=A,S.push(t),E.push(-1),R=!0,P=!0,j())},N.remove=function(t){if(!N._stopped){var e=S.indexOf(t);e<0||(S.splice(e,1),E.pop(),R=!0,P=!0,j())}},N.dispose=function(){if(!N._stopped&&(N._stopped=!0,window.removeEventListener("resize",B),e.removeEventListener("webglcontextlost",U),N.mouseListener.enabled=!1,!N.contextLost)){A.dispose(),L.dispose();for(var t=0;t<S.length;++t)S[t].dispose();for(b.dispose(),t=0;t<O.length;++t)O[t].dispose();_.dispose(),r=null,A=null,L=null,S=[]}},N._mouseRotating=!1,N._prevButtons=0,N.enableMouseListeners=function(){N.mouseListener=c(e,(function(t,e,r){if(!N._stopped){var n=O.length,i=S.length,a=x.object;x.distance=1/0,x.mouse[0]=e,x.mouse[1]=r,x.object=null,x.screen=null,x.dataCoordinate=x.dataPosition=null;var o=!1;if(t&&N._prevButtons)N._mouseRotating=!0;else{N._mouseRotating&&(P=!0),N._mouseRotating=!1;for(var s=0;s<n;++s){var l=O[s].query(e,F[1]-r-1,N.pickRadius);if(l){if(l.distance>x.distance)continue;for(var u=0;u<i;++u){var c=S[u];if(E[u]===s){var f=c.pick(l);f&&(x.buttons=t,x.screen=l.coord,x.distance=l.distance,x.object=c,x.index=f.distance,x.dataPosition=f.position,x.dataCoordinate=f.dataCoordinate,x.data=f,o=!0)}}}}}a&&a!==x.object&&(a.highlight&&a.highlight(null),R=!0),x.object&&(x.object.highlight&&x.object.highlight(x.data),R=!0),(o=o||x.object!==a)&&N.onselect&&N.onselect(x),1&t&&!(1&N._prevButtons)&&N.onclick&&N.onclick(x),N._prevButtons=t}}))},e.addEventListener("webglcontextlost",U);var H=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],V=[H[0].slice(),H[1].slice()];function Y(){if(!U()){B();var t=N.camera.tick();D.view=N.camera.matrix,R=R||t,P=P||t,A.pixelRatio=N.pixelRatio,L.pixelRatio=N.pixelRatio;var e=S.length,n=H[0],i=H[1];n[0]=n[1]=n[2]=1/0,i[0]=i[1]=i[2]=-1/0;for(var o=0;o<e;++o){(C=S[o]).pixelRatio=N.pixelRatio,C.axes=N.axes,R=R||!!C.dirty,P=P||!!C.dirty;var s=C.bounds;if(s)for(var l=s[0],c=s[1],d=0;d<3;++d)n[d]=Math.min(n[d],l[d]),i[d]=Math.max(i[d],c[d])}var p=N.bounds;if(N.autoBounds)for(d=0;d<3;++d){if(i[d]<n[d])n[d]=-1,i[d]=1;else{n[d]===i[d]&&(n[d]-=1,i[d]+=1);var v=.05*(i[d]-n[d]);n[d]=n[d]-v,i[d]=i[d]+v}p[0][d]=n[d],p[1][d]=i[d]}var m=!1;for(d=0;d<3;++d)m=m||V[0][d]!==p[0][d]||V[1][d]!==p[1][d],V[0][d]=p[0][d],V[1][d]=p[1][d];if(P=P||m,R=R||m){if(m){var y=[0,0,0];for(o=0;o<3;++o)y[o]=g((p[1][o]-p[0][o])/10);A.autoTicks?A.update({bounds:p,tickSpacing:y}):A.update({bounds:p})}var M=r.drawingBufferWidth,T=r.drawingBufferHeight;for(I[0]=M,I[1]=T,F[0]=0|Math.max(M/N.pixelRatio,1),F[1]=0|Math.max(T/N.pixelRatio,1),function(t,e){var r=t.bounds,n=t.cameraParams,i=n.projection,a=n.model,o=t.gl.drawingBufferWidth,s=t.gl.drawingBufferHeight,l=t.zNear,u=t.zFar,c=t.fovy,d=o/s;e?(h(i,-d,d,-1,1,l,u),n._ortho=!0):(f(i,c,d,l,u),n._ortho=!1);for(var p=0;p<16;++p)a[p]=0;a[15]=1;var v=0;for(p=0;p<3;++p)v=Math.max(v,r[1][p]-r[0][p]);for(p=0;p<3;++p)t.autoScale?a[5*p]=t.aspect[p]/(r[1][p]-r[0][p]):a[5*p]=1/v,t.autoCenter&&(a[12+p]=.5*-a[5*p]*(r[0][p]+r[1][p]))}(N,w),o=0;o<e;++o)(C=S[o]).axesBounds=p,N.clipToBounds&&(C.clipBounds=p);x.object&&(N.snapToData?L.position=x.dataCoordinate:L.position=x.dataPosition,L.bounds=p),P&&(P=!1,function(){if(!U()){r.colorMask(!0,!0,!0,!0),r.depthMask(!0),r.disable(r.BLEND),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL);for(var t=S.length,e=O.length,n=0;n<e;++n){var i=O[n];i.shape=F,i.begin();for(var a=0;a<t;++a)if(E[a]===n){var o=S[a];o.drawPick&&(o.pixelRatio=1,o.drawPick(D))}i.end()}}}()),N.axesPixels=a(N.axes,D,M,T),N.onrender&&N.onrender(),r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,M,T),N.clearRGBA(),r.depthMask(!0),r.colorMask(!0,!0,!0,!0),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL),r.disable(r.BLEND),r.disable(r.CULL_FACE);var k=!1;for(A.enable&&(k=k||A.isTransparent(),A.draw(D)),L.axes=A,x.object&&L.draw(D),r.disable(r.CULL_FACE),o=0;o<e;++o)(C=S[o]).axes=A,C.pixelRatio=N.pixelRatio,C.isOpaque&&C.isOpaque()&&C.draw(D),C.isTransparent&&C.isTransparent()&&(k=!0);if(k){for(b.shape=I,b.bind(),r.clear(r.DEPTH_BUFFER_BIT),r.colorMask(!1,!1,!1,!1),r.depthMask(!0),r.depthFunc(r.LESS),A.enable&&A.isTransparent()&&A.drawTransparent(D),o=0;o<e;++o)(C=S[o]).isOpaque&&C.isOpaque()&&C.draw(D);for(r.enable(r.BLEND),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.colorMask(!0,!0,!0,!0),r.depthMask(!1),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),A.isTransparent()&&A.drawTransparent(D),o=0;o<e;++o){var C;(C=S[o]).isTransparent&&C.isTransparent()&&C.drawTransparent(D)}r.bindFramebuffer(r.FRAMEBUFFER,null),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.disable(r.DEPTH_TEST),_.bind(),b.color[0].bind(0),_.uniforms.accumBuffer=0,u(r),r.disable(r.BLEND)}for(R=!1,o=0;o<e;++o)S[o].dirty=!1}}}return N.enableMouseListeners(),function t(){N._stopped||N.contextLost||(Y(),requestAnimationFrame(t))}(),N.redraw=function(){N._stopped||(R=!0,Y())},N},createCamera:n}},6640:function(t,e,r){var n=r(3236);e.pointVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n highp float a = 12.9898;\n highp float b = 78.233;\n highp float c = 43758.5453;\n highp float d = dot(co.xy, vec2(a, b));\n highp float e = mod(d, 3.14);\n return fract(sin(e) * c);\n}\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n // if we don't jitter the point size a bit, overall point cloud\n // saturation 'jumps' on zooming, which is disturbing and confusing\n gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n if(pointCloud != 0.0) { // pointCloud is truthy\n // get the same square surface as circle would be\n gl_PointSize *= 0.886;\n }\n}"]),e.pointFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\nuniform float pointCloud;\n\nvoid main() {\n float radius;\n vec4 baseColor;\n if(pointCloud != 0.0) { // pointCloud is truthy\n if(centerFraction == 1.0) {\n gl_FragColor = color;\n } else {\n gl_FragColor = mix(borderColor, color, centerFraction);\n }\n } else {\n radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n=r(9405),i=r(2762),a=r(1888),o=r(6640);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,a=new s(t,i(r),i(r),n(r,o.pointVertex,o.pointFragment),n(r,o.pickVertex,o.pickFragment));return a.update(e),t.addObject(a),a};var l,u,c=s.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),u=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e<n;e++)u[e]=e;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(u),i||a.free(l),o||a.free(u),this.pointCount=n,this.pickOffset=0},c.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0],function(t){var e=void 0!==t,r=e?this.pickShader:this.shader,n=this.plot.gl,i=this.plot.dataBox;if(0===this.pointCount)return t;var a=i[2]-i[0],o=i[3]-i[1],s=function(t,e){var r,n=0,i=t.length>>>1;for(r=0;r<i;r++){var a=t[2*r],o=t[2*r+1];a>=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=c<5,r.uniforms.pointSize=c,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(u[0]=255&t,u[1]=t>>8&255,u[2]=t>>16&255,u[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=u,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r<n||r>=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],f=e[2],h=e[3],d=r[0],p=r[1],v=r[2],g=r[3];return(a=u*d+c*p+f*v+h*g)<0&&(a=-a,d=-d,p=-p,v=-v,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*d,t[1]=s*c+l*p,t[2]=s*f+l*v,t[3]=s*h+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var a=i[e];if(a||(a=i[e]={}),t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,u,c=n(t,o);if(r&&1!==r){for(l=0;l<s.positions.length;++l)for(u=0;u<s.positions[l].length;++u)s.positions[l][u]/=r;for(l=0;l<c.positions.length;++l)for(u=0;u<c.positions[l].length;++u)c.positions[l][u]/=r}var f=[[1/0,1/0],[-1/0,-1/0]],h=c.positions.length;for(l=0;l<h;++l){var d=c.positions[l];for(u=0;u<2;++u)f[0][u]=Math.min(f[0][u],d[u]),f[1][u]=Math.max(f[1][u],d[u])}return a[t]=[s,c,f]};var i={}},1283:function(t,e,r){var n=r(9405),i=r(3236),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),c=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:c},h={vertex:o,fragment:l,attributes:c},d={vertex:s,fragment:l,attributes:c},p={vertex:a,fragment:u,attributes:c},v={vertex:o,fragment:u,attributes:c},g={vertex:s,fragment:u,attributes:c};function m(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return m(t,f)},e.createOrtho=function(t){return m(t,h)},e.createProject=function(t){return m(t,d)},e.createPickPerspective=function(t){return m(t,p)},e.createPickOrtho=function(t){return m(t,v)},e.createPickProject=function(t){return m(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),u=r(9366),c=r(5964),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function d(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function p(t,e){this.index=t,this.dataCoordinate=this.position=e}function v(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,a,o,s,l,u,c,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=f,this.points=[],this._selectResult=new p(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),u=l.createPickOrtho(e),c=l.createPickProject(e),f=i(e),h=i(e),d=i(e),p=i(e),v=new g(e,r,n,o,f,h,d,p,a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:d,size:2,type:e.FLOAT},{buffer:p,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,u,c);return v.update(t),v};var m=g.prototype;m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],M=f.slice(),T=[0,0,0],A=[[0,0,0],[0,0,0]];function k(t){return t[0]=t[1]=t[2]=0,t}function L(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function S(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function C(t,e,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,u=r.model||f,c=r.view||f,h=r.projection||f,p=e.axesBounds,v=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=c,l.projection=h,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=v,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(a[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var m=M,E=0;E<16;++E)m[E]=0;for(E=0;E<4;++E)m[5*E]=1;m[5*g]=0,i[g]<0?m[12+g]=p[0][g]:m[12+g]=p[1][g],s(m,u,m),l.model=m;var C=(g+1)%3,O=(g+2)%3,R=k(x),P=k(b);R[C]=1,P[O]=1;var D=d(0,0,0,L(_,R)),I=d(0,0,0,L(w,P));if(Math.abs(D[1])>Math.abs(I[1])){var z=D;D=I,I=z,z=R,R=P,P=z;var N=C;C=O,O=N}D[0]<0&&(R[C]=-1),I[1]>0&&(P[O]=-1);var F=0,B=0;for(E=0;E<4;++E)F+=Math.pow(u[4*C+E],2),B+=Math.pow(u[4*O+E],2);R[C]/=Math.sqrt(F),P[O]/=Math.sqrt(B),l.axes[0]=R,l.axes[1]=P,l.fragClipBounds[0]=S(T,v[0],g,-1e8),l.fragClipBounds[1]=S(T,v[1],g,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),a===r.hasAlpha||o){t.bind();var u=t.uniforms;u.model=n.model||f,u.view=n.view||f,u.projection=n.projection||f,y[0]=2/l.drawingBufferWidth,y[1]=2/l.drawingBufferHeight,u.screenSize=y,u.highlightId=r.highlightId,u.highlightScale=r.highlightScale,u.fragClipBounds=E,u.clipBounds=r.axes.bounds,u.opacity=r.opacity,u.pickGroup=r.pickId/255,u.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(t,e,r,i){var a;a=Array.isArray(t)?e<t.length?t[e]:void 0:t,a=c(a);var o=!0;n(a)&&(a="▼",o=!1);var s=u(a,r,i);return{mesh:s[0],lines:s[1],bounds:s[2],visible:o}}m.draw=function(t){C(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!1,!1)},m.drawTransparent=function(t){C(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!0,!1)},m.drawPick=function(t){C(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,1,!0,!0)},m.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[2]+(t.value[1]<<8)+(t.value[0]<<16);if(e>=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},m.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},m.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){Array.isArray(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=v(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",u=t.alignment||[0,0];if(2===u.length)i=u[0],a=u[1];else for(i=[],a=[],n=0;n<u.length;++n)i[n]=u[n][0],a[n]=u[n][1];var c=[1/0,1/0,1/0],f=[-1/0,-1/0,-1/0],h=t.glyph,d=t.color,p=t.size,g=t.angle,m=t.lineColor,y=-1,x=0,b=0,_=0;if(s.length){_=s.length;t:for(n=0;n<_;++n){for(var w=s[n],M=0;M<3;++M)if(isNaN(w[M])||!isFinite(w[M]))continue t;var T=(B=O(h,n,l,this.pixelRatio)).mesh,A=B.lines,k=B.bounds;x+=3*T.cells.length,b+=2*A.edges.length}}var L=x+b,S=o.mallocFloat(3*L),E=o.mallocFloat(4*L),C=o.mallocFloat(2*L),R=o.mallocUint32(L);if(L>0){var P=0,D=x,I=[0,0,0,1],z=[0,0,0,1],N=Array.isArray(d)&&Array.isArray(d[0]),F=Array.isArray(m)&&Array.isArray(m[0]);t:for(n=0;n<_;++n){for(y+=1,w=s[n],M=0;M<3;++M){if(isNaN(w[M])||!isFinite(w[M]))continue t;f[M]=Math.max(f[M],w[M]),c[M]=Math.min(c[M],w[M])}T=(B=O(h,n,l,this.pixelRatio)).mesh,A=B.lines,k=B.bounds;var B,j=B.visible;if(j)if(Array.isArray(d)){if(3===(U=N?n<d.length?d[n]:[0,0,0,0]:d).length){for(M=0;M<3;++M)I[M]=U[M];I[3]=1}else if(4===U.length){for(M=0;M<4;++M)I[M]=U[M];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else I[0]=I[1]=I[2]=0,I[3]=1;else I=[1,1,1,0];if(j)if(Array.isArray(m)){var U;if(3===(U=F?n<m.length?m[n]:[0,0,0,0]:m).length){for(M=0;M<3;++M)z[M]=U[M];z[M]=1}else if(4===U.length){for(M=0;M<4;++M)z[M]=U[M];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else z[0]=z[1]=z[2]=0,z[3]=1;else z=[1,1,1,0];var H=.5;j?Array.isArray(p)?H=n<p.length?+p[n]:12:p?H=+p:this.useOrtho&&(H=12):H=0;var V=0;Array.isArray(g)?V=n<g.length?+g[n]:0:g&&(V=+g);var Y=Math.cos(V),G=Math.sin(V);for(w=s[n],M=0;M<3;++M)f[M]=Math.max(f[M],w[M]),c[M]=Math.min(c[M],w[M]);var W=i,q=a;W=0,Array.isArray(i)?W=n<i.length?i[n]:0:i&&(W=i),q=0,Array.isArray(a)?q=n<a.length?a[n]:0:a&&(q=a);var X=[W*=W>0?1-k[0][0]:W<0?1+k[1][0]:1,q*=q>0?1-k[0][1]:q<0?1+k[1][1]:1],Z=T.cells||[],J=T.positions||[];for(M=0;M<Z.length;++M)for(var K=Z[M],Q=0;Q<3;++Q){for(var $=0;$<3;++$)S[3*P+$]=w[$];for($=0;$<4;++$)E[4*P+$]=I[$];R[P]=y;var tt=J[K[Q]];C[2*P]=H*(Y*tt[0]-G*tt[1]+X[0]),C[2*P+1]=H*(G*tt[0]+Y*tt[1]+X[1]),P+=1}for(Z=A.edges,J=A.positions,M=0;M<Z.length;++M)for(K=Z[M],Q=0;Q<2;++Q){for($=0;$<3;++$)S[3*D+$]=w[$];for($=0;$<4;++$)E[4*D+$]=z[$];R[D]=y,tt=J[K[Q]],C[2*D]=H*(Y*tt[0]-G*tt[1]+X[0]),C[2*D+1]=H*(G*tt[0]+Y*tt[1]+X[1]),D+=1}}}this.bounds=[c,f],this.points=s,this.pointCount=s.length,this.vertexCount=x,this.lineVertexCount=b,this.pointBuffer.update(S),this.colorBuffer.update(E),this.glyphBuffer.update(C),this.idBuffer.update(R),o.free(S),o.free(E),o.free(C),o.free(R)},m.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},4298:function(t,e,r){"use strict";var n=r(3236);e.boxVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n"]),e.boxFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n gl_FragColor = color;\n}\n"])},3161:function(t,e,r){"use strict";var n=r(9405),i=r(2762),a=r(4298);function o(t,e,r){this.plot=t,this.boxBuffer=e,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}t.exports=function(t,e){var r=t.gl,s=new o(t,i(r,[0,0,0,1,1,0,1,1]),n(r,a.boxVertex,a.boxFragment));return s.update(e),t.addOverlay(s),s};var s=o.prototype;s.draw=function(){if(this.enabled){var t=this.plot,e=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),i=(this.outerFill,this.outerColor),a=this.borderColor,o=t.box,s=t.screenBox,l=t.dataBox,u=t.viewBox,c=t.pixelRatio,f=(e[0]-l[0])*(u[2]-u[0])/(l[2]-l[0])+u[0],h=(e[1]-l[1])*(u[3]-u[1])/(l[3]-l[1])+u[1],d=(e[2]-l[0])*(u[2]-u[0])/(l[2]-l[0])+u[0],p=(e[3]-l[1])*(u[3]-u[1])/(l[3]-l[1])+u[1];if(f=Math.max(f,u[0]),h=Math.max(h,u[1]),d=Math.min(d,u[2]),p=Math.min(p,u[3]),!(d<f||p<h)){o.bind();var v=s[2]-s[0],g=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,v,h,i),o.drawBox(0,h,f,p,i),o.drawBox(0,p,v,g,i),o.drawBox(d,h,v,p,i)),this.innerFill&&o.drawBox(f,h,d,p,n),r>0){var m=r*c;o.drawBox(f-m,h-m,d+m,h+m,a),o.drawBox(f-m,p-m,d+m,p+m,a),o.drawBox(f-m,h-m,f+m,p+m,a),o.drawBox(d-m,h-m,d+m,p+m,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],a=e[1];return new l(t,n(t,r,a,{}),i.mallocUint8(r*a*4))};var n=r(2260),i=r(1888),a=r(9618),o=r(8828).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=l.prototype;Object.defineProperty(u,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;a<r*e*4;++a)n[a]=255}return t}}}),u.begin=function(){var t=this.gl;this.shape,t&&(this.fbo.bind(),t.clearColor(1,1,1,1),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT))},u.end=function(){var t=this.gl;t&&(t.bindFramebuffer(t.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(t,e,r){if(!this.gl)return null;var n=this.fbo.shape.slice();t|=0,e|=0,"number"!=typeof r&&(r=1);var i=0|Math.min(Math.max(t-r,0),n[0]),o=0|Math.min(Math.max(t+r,0),n[0]),l=0|Math.min(Math.max(e-r,0),n[1]),u=0|Math.min(Math.max(e+r,0),n[1]);if(o<=i||u<=l)return null;var c=[o-i,u-l],f=a(this.buffer,[c[0],c[1],4],[4,4*n[0],1],4*(i+n[0]*l)),h=function(t,e,r){for(var n=1e8,i=-1,a=-1,o=t.shape[0],s=t.shape[1],l=0;l<o;l++)for(var u=0;u<s;u++){var c=t.get(l,u,0),f=t.get(l,u,1),h=t.get(l,u,2),d=t.get(l,u,3);if(c<255||f<255||h<255||d<255){var p=e-l,v=r-u,g=p*p+v*v;g<n&&(n=g,i=l,a=u)}}return[i,a,n]}(f.hi(c[0],c[1],1),r,r),d=h[0],p=h[1];return d<0||Math.pow(this.radius,2)<h[2]?null:new s(d+i|0,p+l|0,f.get(d,p,0),[f.get(d,p,1),f.get(d,p,2),f.get(d,p,3)],Math.sqrt(h[2]))},u.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},9405:function(t,e,r){"use strict";var n=r(3327),i=r(8731),a=r(216),o=r(5091),s=r(2145),l=r(8866);function u(t){this.gl=t,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var c=u.prototype;function f(t,e){return t.name<e.name?-1:1}c.bind=function(){var t;this.program||this._relink();var e=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(e>r)for(t=r;t<e;t++)this.gl.enableVertexAttribArray(t);else if(r>e)for(t=e;t<r;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=e,this.gl.useProgram(this.program)},c.dispose=function(){for(var t=this.gl.lastAttribCount,e=0;e<t;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},c.update=function(t,e,r,u){if(!e||1===arguments.length){var c=t;t=c.vertex,e=c.fragment,r=c.uniforms,u=c.attributes}var h=this,d=h.gl,p=h._vref;h._vref=o.shader(d,d.VERTEX_SHADER,t),p&&p.dispose(),h.vertShader=h._vref.shader;var v=this._fref;if(h._fref=o.shader(d,d.FRAGMENT_SHADER,e),v&&v.dispose(),h.fragShader=h._fref.shader,!r||!u){var g=d.createProgram();if(d.attachShader(g,h.fragShader),d.attachShader(g,h.vertShader),d.linkProgram(g),!d.getProgramParameter(g,d.LINK_STATUS)){var m=d.getProgramInfoLog(g);throw new l(m,"Error linking program:"+m)}r=r||s.uniforms(d,g),u=u||s.attributes(d,g),d.deleteProgram(g)}(u=u.slice()).sort(f);var y,x=[],b=[],_=[];for(y=0;y<u.length;++y){var w=u[y];if(w.type.indexOf("mat")>=0){for(var M=0|w.type.charAt(w.type.length-1),T=new Array(M),A=0;A<M;++A)T[A]=_.length,b.push(w.name+"["+A+"]"),"number"==typeof w.location?_.push(w.location+A):Array.isArray(w.location)&&w.location.length===M&&"number"==typeof w.location[A]?_.push(0|w.location[A]):_.push(-1);x.push({name:w.name,type:w.type,locations:T})}else x.push({name:w.name,type:w.type,locations:[_.length]}),b.push(w.name),"number"==typeof w.location?_.push(0|w.location):_.push(-1)}var k=0;for(y=0;y<_.length;++y)if(_[y]<0){for(;_.indexOf(k)>=0;)k+=1;_[y]=k}var L=new Array(r.length);function S(){h.program=o.program(d,h._vref,h._fref,b,_);for(var t=0;t<r.length;++t)L[t]=d.getUniformLocation(h.program,r[t].name)}S(),h._relink=S,h.types={uniforms:a(r),attributes:a(u)},h.attributes=i(d,h,x,_),Object.defineProperty(h,"uniforms",n(d,h,r,L))},t.exports=function(t,e,r,n,i){var a=new u(t);return a.update(e,r,n,i),a}},8866:function(t){function e(t,e,r){this.shortMessage=e||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(e||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}e.prototype=new Error,e.prototype.name="GLError",e.prototype.constructor=e,t.exports=e},8731:function(t,e,r){"use strict";t.exports=function(t,e,r,i){for(var a={},o=0,u=r.length;o<u;++o){var c=r[o],f=c.name,h=c.type,d=c.locations;switch(h){case"bool":case"int":case"float":s(t,e,d[0],i,1,a,f);break;default:if(h.indexOf("vec")>=0){if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+f+": "+h);s(t,e,d[0],i,p,a,f)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+f+": "+h);var p;if((p=h.charCodeAt(h.length-1)-48)<2||p>4)throw new n("","Invalid data type for attribute "+f+": "+h);l(t,e,d,i,p,a,f)}}}return a};var n=r(8866);function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var o=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,a){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,a):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,a,s,l){var u=o[a],c=new i(t,e,r,n,a,u);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),u(t,n[r],e),e},get:function(){return c},enumerable:!0})}function l(t,e,r,n,i,a,o){for(var l=new Array(i),u=new Array(i),c=0;c<i;++c)s(t,e,r[c],n,i,l,c),u[c]=l[c];Object.defineProperty(l,"location",{set:function(t){if(Array.isArray(t))for(var e=0;e<i;++e)u[e].location=t[e];else for(e=0;e<i;++e)u[e].location=t+e;return t},get:function(){for(var t=new Array(i),e=0;e<i;++e)t[e]=n[r[e]];return t},enumerable:!0}),l.pointer=function(e,a,o,s){e=e||t.FLOAT,a=!!a,o=o||i*i,s=s||0;for(var l=0;l<i;++l){var u=n[r[l]];t.vertexAttribPointer(u,i,e,a,o,s+l*i),t.enableVertexAttribArray(u)}};var f=new Array(i),h=t["vertexAttrib"+i+"fv"];Object.defineProperty(a,o,{set:function(e){for(var a=0;a<i;++a){var o=n[r[a]];if(t.disableVertexAttribArray(o),Array.isArray(e[0]))h.call(t,o,e[a]);else{for(var s=0;s<i;++s)f[s]=e[i*a+s];h.call(t,o,f)}}return e},get:function(){return l},enumerable:!0})}},3327:function(t,e,r){"use strict";var n=r(216),i=r(8866);function a(t){return function(){return t}}function o(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}t.exports=function(t,e,r,s){function l(e){return function(n){for(var a=u("",e),o=0;o<a.length;++o){var l=a[o],c=l[0],f=l[1];if(s[f]){var h=n;if("string"==typeof c&&(0===c.indexOf(".")||0===c.indexOf("["))){var d=c;if(0===c.indexOf(".")&&(d=c.slice(1)),d.indexOf("]")===d.length-1){var p=d.indexOf("["),v=d.slice(0,p),g=d.slice(p+1,d.length-1);h=v?n[v][g]:n[g]}else h=n[d]}var m,y=r[f].type;switch(y){case"bool":case"int":case"sampler2D":case"samplerCube":t.uniform1i(s[f],h);break;case"float":t.uniform1f(s[f],h);break;default:var x=y.indexOf("vec");if(!(0<=x&&x<=1&&y.length===4+x)){if(0===y.indexOf("mat")&&4===y.length){if((m=y.charCodeAt(y.length-1)-48)<2||m>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);t["uniformMatrix"+m+"fv"](s[f],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+y)}if((m=y.charCodeAt(y.length-1)-48)<2||m>4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":t["uniform"+m+"iv"](s[f],h);break;case"v":t["uniform"+m+"fv"](s[f],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}}}}}function u(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function c(t,e,n){if("object"==typeof n){var u=f(n);Object.defineProperty(t,e,{get:a(u),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(c=n,function(t,e,r){return t.getUniform(e.program,r[c])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var c}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r<t.length;++r)c(e,r,t[r])}else for(var n in e={},t)c(e,n,t[n]);return e}var h=n(r,!0);return{get:a(f(h)),set:l(h),enumerable:!0,configurable:!0}}},216:function(t){"use strict";t.exports=function(t,e){for(var r={},n=0;n<t.length;++n)for(var i=t[n].name.split("."),a=r,o=0;o<i.length;++o){var s=i[o].split("[");if(s.length>1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l<s.length;++l){var u=parseInt(s[l]);l<s.length-1||o<i.length-1?(u in a||(l<s.length-1?a[u]=[]:a[u]={}),a=a[u]):a[u]=e?n:t[n].type}}else o<i.length-1?(s[0]in a||(a[s[0]]={}),a=a[s[0]]):a[s[0]]=e?n:t[n].type}return r}},2145:function(t,e){"use strict";e.uniforms=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),n=[],a=0;a<r;++a){var o=t.getActiveUniform(e,a);if(o){var s=i(t,o.type);if(o.size>1)for(var l=0;l<o.size;++l)n.push({name:o.name.replace("[0]","["+l+"]"),type:s});else n.push({name:o.name,type:s})}}return n},e.attributes=function(t,e){for(var r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),n=[],a=0;a<r;++a){var o=t.getActiveAttrib(e,a);o&&n.push({name:o.name,type:i(t,o.type)})}return n};var r={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},n=null;function i(t,e){if(!n){var i=Object.keys(r);n={};for(var a=0;a<i.length;++a){var o=i[a];n[t[o]]=r[o]}}return n[e]}},5091:function(t,e,r){"use strict";e.shader=function(t,e,r){return c(t).getShaderReference(e,r)},e.program=function(t,e,r,n,i){return c(t).getProgram(e,r,n,i)};var n=r(8866),i=r(2992),a=new("undefined"==typeof WeakMap?r(606):WeakMap),o=0;function s(t,e,r,n,i,a,o){this.id=t,this.src=e,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(t){this.gl=t,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var t=this.cache,e=t.gl,r=this.programs,n=0,i=r.length;n<i;++n){var a=t.programs[r[n]];a&&(delete t.programs[n],e.deleteProgram(a))}e.deleteShader(this.shader),delete t.shaders[this.type===e.FRAGMENT_SHADER|0][this.src]}};var u=l.prototype;function c(t){var e=a.get(t);return e||(e=new l(t),a.set(t,e)),e}u.getShaderReference=function(t,e){var r=this.gl,a=this.shaders[t===r.FRAGMENT_SHADER|0],l=a[e];if(l&&r.isShader(l.shader))l.count+=1;else{var u=function(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS)){var o=t.getShaderInfoLog(a);try{var s=i(o,r,e)}catch(t){throw console.warn("Failed to format compiler error: "+t),new n(o,"Error compiling shader:\n"+o)}throw new n(o,s.short,s.long)}return a}(r,t,e);l=a[e]=new s(o++,e,t,u,[],1,this)}return l},u.getProgram=function(t,e,r,i){var a=[t.id,e.id,r.join(":"),i.join(":")].join("@"),o=this.programs[a];return o&&this.gl.isProgram(o)||(this.programs[a]=o=function(t,e,r,i,a){var o=t.createProgram();t.attachShader(o,e),t.attachShader(o,r);for(var s=0;s<i.length;++s)t.bindAttribLocation(o,a[s],i[s]);if(t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){var l=t.getProgramInfoLog(o);throw new n(l,"Error linking program: "+l)}return o}(this.gl,t.shader,e.shader,r,i),t.programs.push(a),e.programs.push(a)),o}},4098:function(t){"use strict";function e(t){this.plot=t,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}t.exports=function(t,r){var n=new e(t);return n.update(r),t.addOverlay(n),n};var r=e.prototype;r.update=function(t){t=t||{},this.enable=(t.enable||[!0,!0,!1,!1]).slice(),this.width=(t.width||[1,1,1,1]).slice(),this.color=(t.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map((function(t){return t.slice()})),this.center=(t.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},r.draw=function(){var t=this.enable,e=this.width,r=this.color,n=this.center,i=this.plot,a=i.line,o=i.dataBox,s=i.viewBox;if(a.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),u=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);t[0]&&a.drawLine(l,u,s[0],u,e[0],r[0]),t[1]&&a.drawLine(l,u,l,s[1],e[1],r[1]),t[2]&&a.drawLine(l,u,s[2],u,e[2],r[2]),t[3]&&a.drawLine(l,u,l,s[3],e[3],r[3])}},r.dispose=function(){this.plot.removeOverlay(this)}},1493:function(t,e,r){"use strict";var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n vec3 vertexPosition = mix(coordinates[0],\n mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n vec2 delta = weight * clipOffset * screenShape;\n vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449:function(t,e,r){"use strict";var n=r(2762),i=r(8116),a=r(1493);t.exports=function(t,e){var r=[];function o(t,e,n,i,a,o){var s=[t,e,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(t,r),u=i(t,[{type:t.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:t.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:t.FLOAT,buffer:l,size:1,offset:24,stride:28}]),c=a(t);c.attributes.position.location=0,c.attributes.color.location=1,c.attributes.weight.location=2;var f=new s(t,l,u,c);return f.update(e),f};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,u=[0,0,0],c=[0,0,0],f=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(t){},l.draw=function(t){var e=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=t.model||o,s=t.view||o,l=t.projection||o;this.axes&&(i=this.axes.lastCubeProps.axis);for(var h=u,d=c,p=0;p<3;++p)i&&i[p]<0?(h[p]=this.bounds[0][p],d[p]=this.bounds[1][p]):(h[p]=this.bounds[1][p],d[p]=this.bounds[0][p]);for(f[0]=e.drawingBufferWidth,f[1]=e.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,h,d],n.uniforms.colors=this.colors,n.uniforms.screenShape=f,p=0;p<3;++p)n.uniforms.lineWidth=this.lineWidth[p]*this.pixelRatio,this.enabled[p]&&(r.draw(e.TRIANGLES,6,6*p),this.drawSides[p]&&r.draw(e.TRIANGLES,12,18+12*p));r.unbind()},l.update=function(t){t&&("bounds"in t&&(this.bounds=t.bounds),"position"in t&&(this.position=t.position),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"colors"in t&&(this.colors=t.colors),"enabled"in t&&(this.enabled=t.enabled),"drawSides"in t&&(this.drawSides=t.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6740:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(t,e){var r,n=t.length;for(r=0;r<n;r++){var i=t[r];if(i===e)return r;if(i>e)return r-1}return r},s=function(t,e,r){return t<e?e:t>r?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;n<r;n++){var i=Math.abs(t[n]-t[n-1]);i<e&&(e=i)}return e};t.exports=function(t,e){var r=t.startingPositions,u=t.maxLength||1e3,c=t.tubeSize||1,f=t.absoluteTubeSize,h=t.gridFill||"+x+y+z",d={};-1!==h.indexOf("-x")&&(d.reversedX=!0),-1!==h.indexOf("-y")&&(d.reversedY=!0),-1!==h.indexOf("-z")&&(d.reversedZ=!0),d.filled=a.indexOf(h.replace(/-/g,"").replace(/\+/g,""));var p=t.getVelocity||function(e){return function(t,e,r){var i=e.vectors,a=e.meshgrid,l=t[0],u=t[1],c=t[2],f=a[0].length,h=a[1].length,d=a[2].length,p=o(a[0],l),v=o(a[1],u),g=o(a[2],c),m=p+1,y=v+1,x=g+1;if(p=s(p,0,f-1),m=s(m,0,f-1),v=s(v,0,h-1),y=s(y,0,h-1),g=s(g,0,d-1),x=s(x,0,d-1),p<0||v<0||g<0||m>f-1||y>h-1||x>d-1)return n.create();var b,_,w,M,T,A,k=a[0][p],L=a[0][m],S=a[1][v],E=a[1][y],C=a[2][g],O=(l-k)/(L-k),R=(u-S)/(E-S),P=(c-C)/(a[2][x]-C);switch(isFinite(O)||(O=.5),isFinite(R)||(R=.5),isFinite(P)||(P=.5),r.reversedX&&(p=f-1-p,m=f-1-m),r.reversedY&&(v=h-1-v,y=h-1-y),r.reversedZ&&(g=d-1-g,x=d-1-x),r.filled){case 5:T=g,A=x,w=v*d,M=y*d,b=p*d*h,_=m*d*h;break;case 4:T=g,A=x,b=p*d,_=m*d,w=v*d*f,M=y*d*f;break;case 3:w=v,M=y,T=g*h,A=x*h,b=p*h*d,_=m*h*d;break;case 2:w=v,M=y,b=p*h,_=m*h,T=g*h*f,A=x*h*f;break;case 1:b=p,_=m,T=g*f,A=x*f,w=v*f*d,M=y*f*d;break;default:b=p,_=m,w=v*f,M=y*f,T=g*f*h,A=x*f*h}var D=i[b+w+T],I=i[b+w+A],z=i[b+M+T],N=i[b+M+A],F=i[_+w+T],B=i[_+w+A],j=i[_+M+T],U=i[_+M+A],H=n.create(),V=n.create(),Y=n.create(),G=n.create();n.lerp(H,D,F,O),n.lerp(V,I,B,O),n.lerp(Y,z,j,O),n.lerp(G,N,U,O);var W=n.create(),q=n.create();n.lerp(W,H,Y,R),n.lerp(q,V,G,R);var X=n.create();return n.lerp(X,W,q,P),X}(e,t,d)},v=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=p(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,i,0]);var o=p(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,0,i]);var s=p(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},g=[],m=e[0][0],y=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],M=function(t){var e=t[0],r=t[1],n=t[2];return!(e<m||e>b||r<y||r>_||n<x||n>w)},T=10*n.distance(e[0],e[1])/u,A=T*T,k=1,L=0,S=r.length;S>1&&(k=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=t.length,u=0;u<s;u++){var c=t[u],f=c[0],h=c[1],d=c[2];i[f]||(e.push(f),i[f]=!0),a[h]||(r.push(h),a[h]=!0),o[d]||(n.push(d),o[d]=!0)}var p=l(e),v=l(r),g=l(n),m=Math.min(p,v,g);return isFinite(m)?m:1}(r));for(var E=0;E<S;E++){var C=n.create();n.copy(C,r[E]);var O=[C],R=[],P=p(C),D=C;R.push(P);var I=[],z=v(C,P),N=n.length(z);isFinite(N)&&N>L&&(L=N),I.push(N),g.push({points:O,velocities:R,divergences:I});for(var F=0;F<100*u&&O.length<u&&M(C);){F++;var B=n.clone(P),j=n.squaredLength(B);if(0===j)break;j>A&&n.scale(B,B,T/Math.sqrt(j)),n.add(B,B,C),P=p(B),n.squaredDistance(D,B)-A>-1e-4*A&&(O.push(B),D=B,R.push(P),z=v(B,P),N=n.length(z),isFinite(N)&&N>L&&(L=N),I.push(N)),C=B}}var U=function(t,e,r,a){for(var o=0,s=0;s<t.length;s++)for(var l=t[s].velocities,u=0;u<l.length;u++)o=Math.max(o,n.length(l[u]));var c=t.map((function(t){return function(t,e,r,a){for(var o=t.points,s=t.velocities,l=t.divergences,u=[],c=[],f=[],h=[],d=[],p=[],v=0,g=0,m=i.create(),y=i.create(),x=0;x<o.length;x++){var b=o[x],_=s[x],w=l[x];0===e&&(w=.05*r),g=n.length(_)/a,m=i.create(),n.copy(m,_),m[3]=w;for(var M=0;M<8;M++)d[M]=[b[0],b[1],b[2],M];if(h.length>0)for(M=0;M<8;M++){var T=(M+1)%8;u.push(h[M],d[M],d[T],d[T],h[T],h[M]),f.push(y,m,m,m,y,y),p.push(v,g,g,g,v,v);var A=u.length;c.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var k=h;h=d,d=k;var L=y;y=m,m=L;var S=v;v=g,g=S}return{positions:u,cells:c,vectors:f,vertexIntensity:p}}(t,r,a,o)})),f=[],h=[],d=[],p=[];for(s=0;s<c.length;s++){var v=c[s],g=f.length;for(f=f.concat(v.positions),d=d.concat(v.vectors),p=p.concat(v.vertexIntensity),u=0;u<v.cells.length;u++){var m=v.cells[u],y=[];h.push(y);for(var x=0;x<m.length;x++)y.push(m[x]+g)}}return{positions:f,cells:h,vectors:d,vertexIntensity:p,colormap:e}}(g,t.colormap,L,k);return f?U.tubeScale=f:(0===L&&(L=1),U.tubeScale=.5*c*k/L),U};var u=r(6740),c=r(6405).createMesh;t.exports.createTubeMesh=function(t,e){return c(t,e,{shaders:u,traceType:"streamtube"})}},990:function(t,e,r){var n=r(9405),i=r(3236),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),u=i(e),c=a(e,[{buffer:u,size:4,stride:w,offset:0},{buffer:u,size:3,stride:w,offset:16},{buffer:u,size:3,stride:w,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),d=i(e),p=a(e,[{buffer:d,size:2,type:e.FLOAT}]),v=o(e,1,L,e.RGBA,e.UNSIGNED_BYTE);v.minFilter=e.LINEAR,v.magFilter=e.LINEAR;var g=new S(e,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,v,s,l,f,h,d,p,[0,0,0]),m={levels:[[],[],[]]};for(var M in t)m[M]=t[M];return m.colormap=m.colormap||"jet",g.update(m),g};var n=r(8828),i=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),u=r(5298),c=r(9994),f=r(9618),h=r(3711),d=r(6760),p=r(7608),v=r(2478),g=r(6199),m=r(990),y=m.createShader,x=m.createContourShader,b=m.createPickShader,_=m.createPickContourShader,w=40,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function k(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=A[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var L=256;function S(t,e,r,n,i,a,o,l,u,c,h,d,p,v,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=d,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new k([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=v,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var E=S.prototype;E.genColormap=function(t,e){var r=!1,n=c([l({colormap:t,nshades:L,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;r<e.length;++r){if(e.length<2)return 1;if(e[r][0]===t)return e[r][1];if(e[r][0]>t&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return u.divseq(n,255),this.hasAlphaScale=r,n},E.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},E.isOpaque=function(){return!this.isTransparent()},E.pickSlots=1,E.setPickBase=function(t){this.pickId=t};var C=[0,0,0],O={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function R(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||C,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=O.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],d(l,t.model,l);var u=O.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return O.showSurface=o,O.showContour=s,O}var P={model:M,view:M,projection:M,inverseModel:M.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},D=M.slice(),I=[1,0,0,0,1,0,0,0,1];function z(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=P;n.model=t.model||M,n.view=t.view||M,n.projection=t.projection||M,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=p(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=I,n.vertexColor=this.vertexColor;var s=D;for(d(s,n.view,n.model),d(s,n.projection,s),p(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var u=s[12+i];for(o=0;o<3;++o)u+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=u/l}var c=R(n,this);if(c.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=c.projections[i],this._shader.uniforms.clipBounds=c.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(c.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o<this.contourLevels[i].length;++o)o===this.highlightLevel[i]?(f.uniforms.contourColor=this.highlightColor[i],f.uniforms.contourTint=this.highlightTint[i]):0!==o&&o-1!==this.highlightLevel[i]||(f.uniforms.contourColor=this.contourColor[i],f.uniforms.contourTint=this.contourTint[i]),this._contourCounts[i][o]&&(f.uniforms.height=this.contourLevels[i][o],h.draw(r.LINES,this._contourCounts[i][o],this._contourOffsets[i][o]));for(i=0;i<3;++i)for(f.uniforms.model=c.projections[i],f.uniforms.clipBounds=c.clipBounds[i],o=0;o<3;++o)if(this.contourProject[i][o]){f.uniforms.permutation=A[o],r.lineWidth(this.contourWidth[o]*this.pixelRatio);for(var v=0;v<this.contourLevels[o].length;++v)v===this.highlightLevel[o]?(f.uniforms.contourColor=this.highlightColor[o],f.uniforms.contourTint=this.highlightTint[o]):0!==v&&v-1!==this.highlightLevel[o]||(f.uniforms.contourColor=this.contourColor[o],f.uniforms.contourTint=this.contourTint[o]),this._contourCounts[o][v]&&(f.uniforms.height=this.contourLevels[o][v],h.draw(r.LINES,this._contourCounts[o][v],this._contourOffsets[o][v]))}for(h.unbind(),(h=this._dynamicVAO).bind(),i=0;i<3;++i)if(0!==this._dynamicCounts[i])for(f.uniforms.model=n.model,f.uniforms.clipBounds=n.clipBounds,f.uniforms.permutation=A[i],r.lineWidth(this.dynamicWidth[i]*this.pixelRatio),f.uniforms.contourColor=this.dynamicColor[i],f.uniforms.contourTint=this.dynamicTint[i],f.uniforms.height=this.dynamicLevel[i],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]),o=0;o<3;++o)this.contourProject[o][i]&&(f.uniforms.model=c.projections[o],f.uniforms.clipBounds=c.clipBounds[o],h.draw(r.LINES,this._dynamicCounts[i],this._dynamicOffsets[i]));h.unbind()}}E.draw=function(t){return z.call(this,t,!1)},E.drawTransparent=function(t){return z.call(this,t,!0)};var N={model:M,view:M,projection:M,inverseModel:M,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function F(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function B(t){return Array.isArray(t)?3===t.length?[t[0],t[1],t[2],1]:[t[0],t[1],t[2],t[3]]:[0,0,0,1]}function j(t){if(Array.isArray(t)){if(Array.isArray(t))return[B(t[0]),B(t[1]),B(t[2])];var e=B(t);return[e.slice(),e.slice(),e.slice()]}}E.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=N;r.model=t.model||M,r.view=t.view||M,r.projection=t.projection||M,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.objectOffset=this.objectOffset,r.permutation=I;for(var n=0;n<2;++n)for(var i=r.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);var o=R(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(e.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(e.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),a=0;a<3;++a)for(e.lineWidth(this.contourWidth[a]*this.pixelRatio),s.uniforms.permutation=A[a],n=0;n<this.contourLevels[a].length;++n)this._contourCounts[a][n]&&(s.uniforms.height=this.contourLevels[a][n],l.draw(e.LINES,this._contourCounts[a][n],this._contourOffsets[a][n]));for(n=0;n<3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],a=0;a<3;++a)if(this.contourProject[n][a]){s.uniforms.permutation=A[a],e.lineWidth(this.contourWidth[a]*this.pixelRatio);for(var u=0;u<this.contourLevels[a].length;++u)this._contourCounts[a][u]&&(s.uniforms.height=this.contourLevels[a][u],l.draw(e.LINES,this._contourCounts[a][u],this._contourOffsets[a][u]))}l.unbind()}},E.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=this._field[2].shape,r=this._pickResult,n=e[0]*(t.value[0]+(t.value[2]>>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var f=c?a:1-a,h=0;h<2;++h)for(var d=i+c,p=s+h,g=f*(h?l:1-l),m=0;m<3;++m)u[m]+=this._field[m].get(d,p)*g;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=v.le(this.contourLevels[x],u[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]<this.contourLevels[x].length-1){var b=this.contourLevels[x][y[x]],_=this.contourLevels[x][y[x]+1];Math.abs(b-u[x])>Math.abs(_-u[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],m=0;m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},E.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();u.assign(t.lo(1,1).hi(r[0],r[1]),e),u.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),u.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),u.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),u.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},E.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=F(t.contourWidth,Number)),"showContour"in t&&(this.showContour=F(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=F(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=F(t.contourProject,(function(t){return F(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=F(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=F(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var u=l[o];for(m=0;m<2;++m)if(u.shape[m]!==a[m])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],u)}}else if(t.ticks){var c=t.ticks;if(!Array.isArray(c)||2!==c.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var d=c[o];if((Array.isArray(d)||d.length)&&(d=f(d)),d.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var p=f(d.data,a);p.stride[o]=d.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var v=[0,0];v[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],v,0)}this._field[0].set(0,0,0);for(var m=0;m<a[0];++m)this._field[0].set(m+1,0,m);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),m=0;m<a[1];++m)this._field[1].set(0,m+1,m);this._field[1].set(0,a[1]+1,a[1]-1)}var y=this._field,x=f(s.mallocFloat(3*y[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o<3;++o)g(x.pick(o),y[o],"mirror");var b=f(s.mallocFloat(3*y[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o<a[0]+2;++o)for(m=0;m<a[1]+2;++m){var _=x.get(0,o,m,0),w=x.get(0,o,m,1),M=x.get(1,o,m,0),A=x.get(1,o,m,1),k=x.get(2,o,m,0),L=x.get(2,o,m,1),S=M*L-A*k,E=k*w-L*_,C=_*A-w*M,O=Math.sqrt(S*S+E*E+C*C);O<1e-8?(O=Math.max(Math.abs(S),Math.abs(E),Math.abs(C)))<1e-8?(C=1,E=S=0,O=1):O=1/O:O=1/Math.sqrt(O),b.set(o,m,0,S*O),b.set(o,m,1,E*O),b.set(o,m,2,C*O)}s.free(x.data);var R=[1/0,1/0,1/0],P=[-1/0,-1/0,-1/0],D=1/0,I=-1/0,z=(a[0]-1)*(a[1]-1)*6,N=s.mallocFloat(n.nextPow2(10*z)),B=0,U=0;for(o=0;o<a[0]-1;++o)t:for(m=0;m<a[1]-1;++m){for(var H=0;H<2;++H)for(var V=0;V<2;++V)for(var Y=0;Y<3;++Y){var G=this._field[Y].get(1+o+H,1+m+V);if(isNaN(G)||!isFinite(G))continue t}for(Y=0;Y<6;++Y){var W=o+T[Y][0],q=m+T[Y][1],X=this._field[0].get(W+1,q+1),Z=this._field[1].get(W+1,q+1);G=this._field[2].get(W+1,q+1),S=b.get(W+1,q+1,0),E=b.get(W+1,q+1,1),C=b.get(W+1,q+1,2),t.intensity&&(J=t.intensity.get(W,q));var J=t.intensity?t.intensity.get(W,q):G+this.objectOffset[2];N[B++]=W,N[B++]=q,N[B++]=X,N[B++]=Z,N[B++]=G,N[B++]=0,N[B++]=J,N[B++]=S,N[B++]=E,N[B++]=C,R[0]=Math.min(R[0],X+this.objectOffset[0]),R[1]=Math.min(R[1],Z+this.objectOffset[1]),R[2]=Math.min(R[2],G+this.objectOffset[2]),D=Math.min(D,J),P[0]=Math.max(P[0],X+this.objectOffset[0]),P[1]=Math.max(P[1],Z+this.objectOffset[1]),P[2]=Math.max(P[2],G+this.objectOffset[2]),I=Math.max(I,J),U+=1}}for(t.intensityBounds&&(D=+t.intensityBounds[0],I=+t.intensityBounds[1]),o=6;o<B;o+=10)N[o]=(N[o]-D)/(I-D);this._vertexCount=U,this._coordinateBuffer.update(N.subarray(0,B)),s.freeFloat(N),s.free(b.data),this.bounds=[R,P],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===D&&this.intensityBounds[1]===I||(r=!0),this.intensityBounds=[D,I]}if("levels"in t){var K=t.levels;for(K=Array.isArray(K[0])?K.slice():[[],[],K],o=0;o<3;++o)K[o]=K[o].slice(),K[o].sort((function(t,e){return t-e}));for(o=0;o<3;++o)for(m=0;m<K[o].length;++m)K[o][m]-=this.objectOffset[o];t:for(o=0;o<3;++o){if(K[o].length!==this.contourLevels[o].length){r=!0;break}for(m=0;m<K[o].length;++m)if(K[o][m]!==this.contourLevels[o][m]){r=!0;break t}}this.contourLevels=K}if(r){y=this._field,a=this.shape;for(var Q=[],$=0;$<3;++$){var tt=this.contourLevels[$],et=[],rt=[],nt=[0,0,0];for(o=0;o<tt.length;++o){var it=h(this._field[$],tt[o]);et.push(Q.length/5|0),U=0;t:for(m=0;m<it.cells.length;++m){var at=it.cells[m];for(Y=0;Y<2;++Y){var ot=it.positions[at[Y]],st=ot[0],lt=0|Math.floor(st),ut=st-lt,ct=ot[1],ft=0|Math.floor(ct),ht=ct-ft,dt=!1;e:for(var pt=0;pt<3;++pt){nt[pt]=0;var vt=($+pt+1)%3;for(H=0;H<2;++H){var gt=H?ut:1-ut;for(W=0|Math.min(Math.max(lt+H,0),a[0]),V=0;V<2;++V){var mt=V?ht:1-ht;if(q=0|Math.min(Math.max(ft+V,0),a[1]),G=pt<2?this._field[vt].get(W,q):(this.intensity.get(W,q)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(G)||isNaN(G)){dt=!0;break e}var yt=gt*mt;nt[pt]+=yt*G}}}if(dt){if(Y>0){for(var xt=0;xt<5;++xt)Q.pop();U-=1}continue t}Q.push(nt[0],nt[1],ot[0],ot[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[$]=et,this._contourCounts[$]=rt}var bt=s.mallocFloat(Q.length);for(o=0;o<Q.length;++o)bt[o]=Q[o];this._contourBuffer.update(bt),s.freeFloat(bt)}},E.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},E.highlight=function(t){var e,r;if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;for(r=this.snapToData?t.dataCoordinate:t.position,e=0;e<3;++e)r[e]-=this.objectOffset[e];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,u=(o+2)%3,c=this._field[o],f=this._field[l],d=this._field[u],p=h(c,r[o]),v=p.cells,g=p.positions;for(this._dynamicOffsets[o]=n,e=0;e<v.length;++e)for(var m=v[e],y=0;y<2;++y){var x=g[m[y]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),M=b-_,T=1-M,A=+x[1],k=0|A,L=0|Math.min(k+1,i[1]),S=A-k,E=1-S,C=T*E,O=T*S,R=M*E,P=M*S,D=C*f.get(_,k)+O*f.get(_,L)+R*f.get(w,k)+P*f.get(w,L),I=C*d.get(_,k)+O*d.get(_,L)+R*d.get(w,k)+P*d.get(w,L);if(isNaN(D)||isNaN(I)){y&&(n-=1);break}a[2*n+0]=D,a[2*n+1]=I,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(a.subarray(0,2*n)),s.freeFloat(a)}}},7766:function(t,e,r){"use strict";var n=r(9618),i=r(5298),a=r(1888);t.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||function(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}(t),"number"==typeof arguments[1])return g(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=u(e)?e:e.raw;if(r)return function(t,e,r,n,i,a){var o=v(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new h(t,o,r,n,i,a)}(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return function(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=p(o,e.stride.slice()),u=0;"float32"===r?u=t.FLOAT:"float64"===r?(u=t.FLOAT,l=!1,r="float32"):"uint8"===r?u=t.UNSIGNED_BYTE:(u=t.UNSIGNED_BYTE,l=!1,r="uint8");var f,d,g=0;if(2===o.length)g=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])g=t.ALPHA;else if(2===o[2])g=t.LUMINANCE_ALPHA;else if(3===o[2])g=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}}u!==t.FLOAT||t.getExtension("OES_texture_float")||(u=t.UNSIGNED_BYTE,l=!1);var m=e.size;if(l)f=0===e.offset&&e.data.length===m?e.data:e.data.subarray(e.offset,e.offset+m);else{var y=[o[2],o[2]*o[0],1];d=a.malloc(m,r);var x=n(d,o,y,0);"float32"!==r&&"float64"!==r||u!==t.UNSIGNED_BYTE?i.assign(x,e):c(x,e),f=d.subarray(0,m)}var b=v(t);return t.texImage2D(t.TEXTURE_2D,0,g,o[0],o[1],0,g,u,f),l||a.free(d),new h(t,b,o[0],o[1],g,u)}(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function u(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var c=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var d=h.prototype;function p(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function v(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=v(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),d.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},d.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=u(t)?t:t.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,u,f){var h=f.dtype,d=f.shape.slice();if(d.length<2||d.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var v=0,g=0,m=p(d,f.stride.slice());if("float32"===h?v=t.FLOAT:"float64"===h?(v=t.FLOAT,m=!1,h="float32"):"uint8"===h?v=t.UNSIGNED_BYTE:(v=t.UNSIGNED_BYTE,m=!1,h="uint8"),2===d.length)g=t.LUMINANCE,d=[d[0],d[1],1],f=n(f.data,d,[f.stride[0],f.stride[1],1],f.offset);else{if(3!==d.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===d[2])g=t.ALPHA;else if(2===d[2])g=t.LUMINANCE_ALPHA;else if(3===d[2])g=t.RGB;else{if(4!==d[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}d[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=f.size,x=u.indexOf(o)<0;if(x&&u.push(o),v===l&&m)0===f.offset&&f.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,d[0],d[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,d[0],d[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,d[0],d[1],0,s,l,f.data.subarray(f.offset,f.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,d[0],d[1],s,l,f.data.subarray(f.offset,f.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,d,[d[2],d[2]*d[0],1]);v===t.FLOAT&&l===t.UNSIGNED_BYTE?c(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,d[0],d[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,d[0],d[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i<r.length;++i){var a=r[i];if(a.buffer){var o=a.buffer,s=a.size||4,l=a.type||t.FLOAT,u=!!a.normalized,c=a.stride||0,f=a.offset||0;o.bind(),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,s,l,u,c,f)}else{if("number"==typeof a)t.vertexAttrib1f(i,a);else if(1===a.length)t.vertexAttrib1f(i,a[0]);else if(2===a.length)t.vertexAttrib2f(i,a[0],a[1]);else if(3===a.length)t.vertexAttrib3f(i,a[0],a[1],a[2]);else{if(4!==a.length)throw new Error("gl-vao: Invalid vertex attribute");t.vertexAttrib4f(i,a[0],a[1],a[2],a[3])}t.disableVertexAttribArray(i)}}for(;i<n;++i)t.disableVertexAttribArray(i)}else for(t.bindBuffer(t.ARRAY_BUFFER,null),i=0;i<n;++i)t.disableVertexAttribArray(i)}},870:function(t,e,r){"use strict";var n=r(1433);function i(t){this.gl=t,this._elements=null,this._attributes=null,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},i.prototype.update=function(t,e,r){this._elements=e,this._attributes=t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._elements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},t.exports=function(t){return new i(t)}},7518:function(t,e,r){"use strict";var n=r(1433);function i(t,e,r,n,i,a){this.location=t,this.dimension=e,this.a=r,this.b=n,this.c=i,this.d=a}function a(t,e,r){this.gl=t,this._ext=e,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=t.UNSIGNED_SHORT}i.prototype.bind=function(t){switch(this.dimension){case 1:t.vertexAttrib1f(this.location,this.a);break;case 2:t.vertexAttrib2f(this.location,this.a,this.b);break;case 3:t.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:t.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},a.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var t=0;t<this._attribs.length;++t)this._attribs[t].bind(this.gl)},a.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},a.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},a.prototype.update=function(t,e,r){if(this.bind(),n(this.gl,e,t),this.unbind(),this._attribs.length=0,t)for(var a=0;a<t.length;++a){var o=t[a];"number"==typeof o?this._attribs.push(new i(a,1,o)):Array.isArray(o)&&this._attribs.push(new i(a,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.draw=function(t,e,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(t,e,this._elementsType,r):n.drawArrays(t,r,e)},t.exports=function(t,e){return new a(t,e,e.createVertexArrayOES())}},8116:function(t,e,r){"use strict";var n=r(7518),i=r(870);function a(t){this.bindVertexArrayOES=t.bindVertexArray.bind(t),this.createVertexArrayOES=t.createVertexArray.bind(t),this.deleteVertexArrayOES=t.deleteVertexArray.bind(t)}t.exports=function(t,e,r,o){var s,l=t.createVertexArray?new a(t):t.getExtension("OES_vertex_array_object");return(s=l?n(t,l):i(t)).update(e,r,o),s}},5632:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}},8192:function(t,e,r){t.exports=function(t,e){var r=n(t[0],t[1],t[2]),o=n(e[0],e[1],e[2]);i(r,r),i(o,o);var s=a(r,o);return s>1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,a,o){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t};var n=r(1091)()},2825:function(t){t.exports=function(t,e,r){var n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}},2931:function(t,e,r){t.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},811:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}},868:function(t,e,r){t.exports=r(1387)},1387:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}},6658:function(t){t.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t}},7417:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}},8107:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}},4505:function(t,e,r){t.exports=r(5847)},5847:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}},5093:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}},3536:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},7636:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=e[0],t[1]=i+o*u-s*l,t[2]=a+o*l+s*u,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+s*l+o*u,t[1]=e[1],t[2]=a+s*u-o*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+o*u-s*l,t[1]=a+o*l+s*u,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+f*-l-h*-s,t[1]=f*u+d*-s+h*-o-c*-l,t[2]=h*u+d*-l+c*-s-f*-o,t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,d=-o*n-s*i-l*a;return t[0]=c*u+d*-o+f*-l-h*-s,t[1]=f*u+d*-s+h*-o-c*-l,t[2]=h*u+d*-l+c*-s-f*-o,t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r<e.length;r++){var a=e[r];if("preprocessor"===a.type){var o=a.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?i(l):l).trim()}}}}},5874:function(t,e,r){t.exports=function(t){var e,r,M,T=0,A=0,k=l,L=[],S=[],E=1,C=0,O=0,R=!1,P=!1,D="",I=a,z=n;"300 es"===(t=t||{}).version&&(I=s,z=o);var N={},F={};for(T=0;T<I.length;T++)N[I[T]]=!0;for(T=0;T<z.length;T++)F[z[T]]=!0;return function(t){return S=[],null!==t?function(t){var r;for(T=0,t.toString&&(t=t.toString()),D+=t.replace(/\r\n/g,"\n"),M=D.length;e=D[T],T<M;){switch(r=T,k){case c:T=V();break;case f:case h:T=H();break;case d:T=Y();break;case p:T=q();break;case _:T=W();break;case v:T=X();break;case u:T=Z();break;case x:T=U();break;case l:T=j()}r!==T&&("\n"===D[r]?(C=0,++E):++C)}return A+=T,D=D.slice(T),S}(t):(L.length&&B(L.join("")),k=b,B("(eof)"),S)};function B(t){t.length&&S.push({type:w[k],data:t,position:O,line:E,column:C})}function j(){return L=L.length?[]:L,"/"===r&&"*"===e?(O=A+T-1,k=c,r=e,T+1):"/"===r&&"/"===e?(O=A+T-1,k=f,r=e,T+1):"#"===e?(k=h,O=A+T,T):/\s/.test(e)?(k=x,O=A+T,T):(R=/\d/.test(e),P=/[^\w_]/.test(e),O=A+T,k=R?p:P?d:u,T)}function U(){return/[^\s]/g.test(e)?(B(L.join("")),k=l,T):(L.push(e),r=e,T+1)}function H(){return"\r"!==e&&"\n"!==e||"\\"===r?(L.push(e),r=e,T+1):(B(L.join("")),k=l,T)}function V(){return"/"===e&&"*"===r?(L.push(e),B(L.join("")),k=l,T+1):(L.push(e),r=e,T+1)}function Y(){if("."===r&&/\d/.test(e))return k=v,T;if("/"===r&&"*"===e)return k=c,T;if("/"===r&&"/"===e)return k=f,T;if("."===e&&L.length){for(;G(L););return k=v,T}if(";"===e||")"===e||"("===e){if(L.length)for(;G(L););return B(e),k=l,T+1}var t=2===L.length&&"="!==e;if(/[\w_\d\s]/.test(e)||t){for(;G(L););return k=l,T}return L.push(e),r=e,T+1}function G(t){for(var e,r,n=0;;){if(e=i.indexOf(t.slice(0,t.length+n).join("")),r=i[e],-1===e){if(n--+t.length>0)continue;r=t.slice(0,1).join("")}return B(r),O+=r.length,(L=L.slice(r.length)).length}}function W(){return/[^a-fA-F0-9]/.test(e)?(B(L.join("")),k=l,T):(L.push(e),r=e,T+1)}function q(){return"."===e||/[eE]/.test(e)?(L.push(e),k=v,r=e,T+1):"x"===e&&1===L.length&&"0"===L[0]?(k=_,L.push(e),r=e,T+1):/[^\d]/.test(e)?(B(L.join("")),k=l,T):(L.push(e),r=e,T+1)}function X(){return"f"===e&&(L.push(e),r=e,T+=1),/[eE]/.test(e)?(L.push(e),r=e,T+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(B(L.join("")),k=l,T):(L.push(e),r=e,T+1)}function Z(){if(/[^\d\w_]/.test(e)){var t=L.join("");return k=F[t]?y:N[t]?m:g,B(L.join("")),k=l,T}return L.push(e),r=e,T+1}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=999,u=9999,c=0,f=1,h=2,d=3,p=4,v=5,g=6,m=7,y=8,x=9,b=10,_=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n<t.length-1;n++)r.push(t[n],e[n]||"");return r.push(t[n]),r.join("")}},7520:function(t,e,r){"use strict";var n=r(9507);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},3778:function(t,e){e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*v}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),c=0;c<=i;++c)l[c]=c;s<0&&(l[0]=1,l[1]=0);var f=new a(l,new Array(i+1),!1),h=f.adjacent,d=new Array(i+2);for(c=0;c<=i;++c){for(var p=l.slice(),v=0;v<=i;++v)v===c&&(p[v]=-1);var g=p[0];p[0]=p[1],p[1]=g;var m=new a(p,new Array(i+1),!0);h[c]=m,d[c]=m}for(d[i+1]=f,c=0;c<=i;++c){p=h[c].vertices;var y=h[c].adjacent;for(v=0;v<=i;++v){var x=p[v];if(x<0)y[v]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[v]=h[b])}}var _=new u(i,o,d),w=!!e;for(c=i+1;c<r;++c)_.insert(t[c],w);return _.boundary()};var n=r(3250),i=r(6803).Fw;function a(t,e,r){this.vertices=t,this.adjacent=e,this.boundary=r,this.lastVisited=-1}function o(t,e,r){this.vertices=t,this.cell=e,this.index=r}function s(t,e){return i(t.vertices,e.vertices)}a.prototype.flip=function(){var t=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=t;var e=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=e};var l=[];function u(t,e,r){this.dimension=t,this.vertices=e,this.simplices=r,this.interior=r.filter((function(t){return!t.boundary})),this.tuple=new Array(t+1);for(var i=0;i<=t;++i)this.tuple[i]=this.vertices[i];var a,o=l[t];o||(o=l[t]=((a=n[t+1])||(a=n),function(t){return function(){var e=this.tuple;return t.apply(this,e)}}(a))),this.orient=o}var c=u.prototype;c.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;)for(var s=(t=o.pop()).adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,f=0;f<=r;++f){var h=c[f];i[f]=h<0?e:a[h]}var d=this.orient();if(d>0)return u;u.lastVisited=-n,0===d&&o.push(u)}}return null},c.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];for(s.lastVisited=r,c=0;c<=n;++c){var f=u[c];if(!(f.lastVisited>=r)){var h=a[c];a[c]=t;var d=this.orient();if(a[c]=h,d<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},c.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var h=[];f.length>0;){var d=(e=f.pop()).vertices,p=e.adjacent,v=d.indexOf(r);if(!(v<0))for(var g=0;g<=n;++g)if(g!==v){var m=p[g];if(m.boundary&&!(m.lastVisited>=r)){var y=m.vertices;if(m.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,m.boundary=!1,u.push(m),f.push(m),m.lastVisited=r;continue}m.lastVisited=-r}var _=m.adjacent,w=d.slice(),M=p.slice(),T=new a(w,M,!0);c.push(T);var A=_.indexOf(e);if(!(A<0))for(_[A]=T,M[v]=m,w[g]=-1,M[g]=e,p[g]=T,T.flip(),b=0;b<=n;++b){var k=w[b];if(!(k<0||k===r)){for(var L=new Array(n-1),S=0,E=0;E<=n;++E){var C=w[E];C<0||E===b||(L[S++]=C)}h.push(new o(L,T,b))}}}}}for(h.sort(s),g=0;g+1<h.length;g+=2){var O=h[g],R=h[g+1],P=O.index,D=R.index;P<0||D<0||(O.cell.adjacent[O.index]=R.cell,R.cell.adjacent[R.index]=O.cell)}},c.insert=function(t,e){var r=this.vertices;r.push(t);var n=this.walk(t,e);if(n){for(var i=this.dimension,a=this.tuple,o=0;o<=i;++o){var s=n.vertices[o];a[o]=s<0?t:r[s]}var l=this.orient(a);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,t)))&&this.addPeaks(t,n)}},c.boundary=function(){for(var t=this.dimension,e=[],r=this.simplices,n=r.length,i=0;i<n;++i){var a=r[i];if(a.boundary){for(var o=new Array(t),s=a.vertices,l=0,u=0,c=0;c<=t;++c)s[c]>=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new m(g(t)):new m(null)};var a=i.prototype;function o(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function u(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function c(t,e,r){for(var n=0;n<t.length&&t[n][0]<=e;++n){var i=r(t[n]);if(i)return i}}function f(t,e,r){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r<t.length;++r){var n=e(t[r]);if(n)return n}}function d(t,e){return t-e}function p(t,e){return t[0]-e[0]||t[1]-e[1]}function v(t,e){return t[1]-e[1]||t[0]-e[0]}function g(t){if(0===t.length)return null;for(var e=[],r=0;r<t.length;++r)e.push(t[r][0],t[r][1]);e.sort(d);var n=e[e.length>>1],a=[],o=[],s=[];for(r=0;r<t.length;++r){var l=t[r];l[1]<n?a.push(l):n<l[0]?o.push(l):s.push(l)}var u=s,c=s.slice();return u.sort(p),c.sort(v),new i(n,g(a),g(o),u,c)}function m(t){this.root=t}a.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},a.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,p),i=n.ge(this.rightPoints,t,v);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?u(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?u(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,t,p);a<this.leftPoints.length&&this.leftPoints[a][0]===t[0];++a)if(this.leftPoints[a]===t)for(this.count-=1,this.leftPoints.splice(a,1),s=n.ge(this.rightPoints,t,v);s<this.rightPoints.length&&this.rightPoints[s][1]===t[1];++s)if(this.rightPoints[s]===t)return this.rightPoints.splice(s,1),1;return 0},a.queryPoint=function(t,e){return t<this.mid?this.left&&(r=this.left.queryPoint(t,e))?r:c(this.leftPoints,t,e):t>this.mid?this.right&&(r=this.right.queryPoint(t,e))?r:f(this.rightPoints,t,e):h(this.leftPoints,e);var r},a.queryInterval=function(t,e,r){var n;return t<this.mid&&this.left&&(n=this.left.queryInterval(t,e,r))||e>this.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:e<this.mid?c(this.leftPoints,e,r):t>this.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var y=m.prototype;y.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},y.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},y.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},y.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=r;return e}},9507:function(t){t.exports=!0},7163:function(t){function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},5219:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),u={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},c=i(),f=i(),h=[0,0,0,0],d=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function v(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,m){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),m||(m=[0,0,0,1]),!n(c,t))return!1;if(a(f,c),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b,_,w,M,T,A=c[3],k=c[7],L=c[11],S=c[12],E=c[13],C=c[14],O=c[15];if(0!==A||0!==k||0!==L){if(h[0]=A,h[1]=k,h[2]=L,h[3]=O,!s(f,f))return!1;l(f,f),y=g,b=f,_=(x=h)[0],w=x[1],M=x[2],T=x[3],y[0]=b[0]*_+b[4]*w+b[8]*M+b[12]*T,y[1]=b[1]*_+b[5]*w+b[9]*M+b[13]*T,y[2]=b[2]*_+b[6]*w+b[10]*M+b[14]*T,y[3]=b[3]*_+b[7]*w+b[11]*M+b[15]*T}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=S,e[1]=E,e[2]=C,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,c),r[0]=u.length(d[0]),u.normalize(d[0],d[0]),i[0]=u.dot(d[0],d[1]),v(d[1],d[1],d[0],1,-i[0]),r[1]=u.length(d[1]),u.normalize(d[1],d[1]),i[0]/=r[1],i[1]=u.dot(d[0],d[2]),v(d[2],d[2],d[0],1,-i[1]),i[2]=u.dot(d[1],d[2]),v(d[2],d[2],d[1],1,-i[2]),r[2]=u.length(d[2]),u.normalize(d[2],d[2]),i[1]/=r[2],i[2]/=r[2],u.cross(p,d[1],d[2]),u.dot(d[0],p)<0)for(var R=0;R<3;R++)r[R]*=-1,d[R][0]*=-1,d[R][1]*=-1,d[R][2]*=-1;return m[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),m[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),m[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),m[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(m[0]=-m[0]),d[0][2]>d[2][0]&&(m[1]=-m[1]),d[1][0]>d[0][1]&&(m[2]=-m[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),l=f(),u=f(),c=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),d=a(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!(!h||!d||(n(c.translate,l.translate,u.translate,f),n(c.skew,l.skew,u.skew,f),n(c.scale,l.scale,u.scale,f),n(c.perspective,l.perspective,u.perspective,f),s(c.quaternion,l.quaternion,u.quaternion,f),i(t,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());t.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),u=r(6582),c=r(7656),f=(r(2504),r(3536)),h=[0,0,0];function d(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new d((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=d.prototype;p.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{var c=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),d=!0;for(u=0;u<16;++u)h[u]=s[l++];var p=this.nextMatrix;for(u=0;u<16;++u)p[u]=s[l++],d=d&&h[u]===p[u];if(c<1e-6||d)for(u=0;u<16;++u)o[u]=h[u];else i(o,h,p,(t-e[r])/c)}var v=this.computedUp;v[0]=o[1],v[1]=o[5],v[2]=o[9],f(v,v);var g=this.computedInverse;a(g,o);var m=this.computedEye,y=g[15];m[0]=g[12]/y,m[1]=g[13]/y,m[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)x[u]=m[u]-o[2+4*u]*b}},p.idle=function(t){if(!(t<this.lastT())){for(var e=this._components,r=e.length-16,n=0;n<16;++n)e.push(e[r++]);this._time.push(t)}},p.flush=function(t){var e=n.gt(this._time,t)-2;e<0||(this._time.splice(0,e),this._components.splice(0,16*e))},p.lastT=function(){return this._time[this._time.length-1]},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||h,n=n||this.computedUp,this.setMatrix(t,u(this.computedMatrix,e,r,n));for(var i=0,a=0;a<3;++a)i+=Math.pow(r[a]-e[a],2);i=Math.log(Math.sqrt(i)),this.computedRadius[0]=i},p.rotate=function(t,e,r,n){this.recalcMatrix(t);var i=this.computedInverse;e&&s(i,i,e),r&&o(i,i,r),n&&l(i,i,n),this.setMatrix(t,a(this.computedMatrix,i))};var v=[0,0,0];p.pan=function(t,e,r,n){v[0]=-(e||0),v[1]=-(r||0),v[2]=-(n||0),this.recalcMatrix(t);var i=this.computedInverse;c(i,i,v),this.setMatrix(t,a(i,i))},p.translate=function(t,e,r,n){v[0]=e||0,v[1]=r||0,v[2]=n||0,this.recalcMatrix(t);var i=this.computedMatrix;c(i,i,v),this.setMatrix(t,i)},p.setMatrix=function(t,e){if(!(t<this.lastT())){this._time.push(t);for(var r=0;r<16;++r)this._components.push(e[r])}},p.setDistance=function(t,e){this.computedRadius[0]=e},p.setDistanceLimits=function(t,e){var r=this._limits;r[0]=t,r[1]=e},p.getDistanceLimits=function(t){var e=this._limits;return t?(t[0]=e[0],t[1]=e[1],t):e}},3090:function(t,e,r){"use strict";t.exports=function(t){var e=t.length;if(e<3){for(var r=new Array(e),i=0;i<e;++i)r[i]=i;return 2===e&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:r}var a=new Array(e);for(i=0;i<e;++i)a[i]=i;a.sort((function(e,r){return t[e][0]-t[r][0]||t[e][1]-t[r][1]}));var o=[a[0],a[1]],s=[a[0],a[1]];for(i=2;i<e;++i){for(var l=a[i],u=t[l],c=o.length;c>1&&n(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i<h;++i)r[f++]=o[i];for(var d=s.length-2;d>0;--d)r[f++]=s[d];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function d(t){0===n.buttons(t)?u(0,t):u(r,t)}function p(t){u(r|n.buttons(t),t)}function v(t){u(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",d),t.addEventListener("mousedown",p),t.addEventListener("mouseup",v),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var m={element:t};return Object.defineProperties(m,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",d),t.removeEventListener("mousedown",p),t.removeEventListener("mouseup",v),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),m};var n=r(4687)},24:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if("button"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},e.element=r,e.x=function(t){if("object"==typeof t){if("offsetX"in t)return t.offsetX;var e=r(t).getBoundingClientRect();return t.clientX-e.left}return 0},e.y=function(t){if("object"==typeof t){if("offsetY"in t)return t.offsetY;var e=r(t).getBoundingClientRect();return t.clientY-e.top}return 0}},8512:function(t,e,r){"use strict";var n=r(665);t.exports=function(t,e,r){"function"==typeof t&&(r=!!e,e=t,t=window);var i=n("ex",t),a=function(t){r&&t.preventDefault();var n=t.deltaX||0,a=t.deltaY||0,o=t.deltaZ||0,s=1;switch(t.deltaMode){case 1:s=i;break;case 2:s=window.innerHeight}if(a*=s,o*=s,(n*=s)||a||o)return e(n,a,o,t)};return t.addEventListener("wheel",a),a}},2640:function(t,e,r){"use strict";var n=r(1888);t.exports=function(t){function e(t){throw new Error("ndarray-extract-contour: "+t)}"object"!=typeof t&&e("Must specify arguments");var r=t.order;Array.isArray(r)||e("Must specify order");var a=t.arrayArguments||1;a<1&&e("Must have at least one array argument"),(t.scalarArguments||0)<0&&e("Scalar arg count must be > 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var o=t.getters||[],s=new Array(a),l=0;l<a;++l)o.indexOf(l)>=0?s[l]=!0:s[l]=!1;return function(t,e,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,d=0|a.offset,p=0|a.stride[0],v=0|a.stride[1],g=d,m=0|-p,y=0,x=0|-v,b=0,_=-p-v|0,w=0,M=0|p,T=v-p*c|0,A=0,k=0,L=0,S=2*c|0,E=n(S),C=n(S),O=0,R=0,P=-1,D=-1,I=0,z=0|-c,N=0|c,F=0,B=-c-1|0,j=c-1|0,U=0,H=0,V=0;for(A=0;A<c;++A)E[O++]=r(h[g],o,s,l),g+=M;if(g+=T,f>0){if(k=1,E[O++]=r(h[g],o,s,l),g+=M,c>0)for(A=1,u=h[g],R=E[O]=r(u,o,s,l),I=E[O+P],F=E[O+z],U=E[O+B],R===I&&R===F&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,I,F,U,o,s,l),H=C[O]=L++),O+=1,g+=M,A=2;A<c;++A)u=h[g],R=E[O]=r(u,o,s,l),I=E[O+P],F=E[O+z],U=E[O+B],R===I&&R===F&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,I,F,U,o,s,l),H=C[O]=L++,U!==I&&e(C[O+P],H,w,y,U,I,o,s,l)),O+=1,g+=M;for(g+=T,O=0,V=P,P=D,D=V,V=z,z=N,N=V,V=B,B=j,j=V,k=2;k<f;++k){if(E[O++]=r(h[g],o,s,l),g+=M,c>0)for(A=1,u=h[g],R=E[O]=r(u,o,s,l),I=E[O+P],F=E[O+z],U=E[O+B],R===I&&R===F&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,I,F,U,o,s,l),H=C[O]=L++,U!==F&&e(C[O+z],H,b,w,F,U,o,s,l)),O+=1,g+=M,A=2;A<c;++A)u=h[g],R=E[O]=r(u,o,s,l),I=E[O+P],F=E[O+z],U=E[O+B],R===I&&R===F&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,I,F,U,o,s,l),H=C[O]=L++,U!==F&&e(C[O+z],H,b,w,F,U,o,s,l),U!==I&&e(C[O+P],H,w,y,U,I,o,s,l)),O+=1,g+=M;1&k&&(O=0),V=P,P=D,D=V,V=z,z=N,N=V,V=B,B=j,j=V,g+=T}}i(C),i(E)}},"false,1,0":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,d=0|a.offset,p=0|a.stride[0],v=0|a.stride[1],g=d,m=0|-p,y=0,x=0|-v,b=0,_=-p-v|0,w=0,M=0|v,T=p-v*f|0,A=0,k=0,L=0,S=2*f|0,E=n(S),C=n(S),O=0,R=0,P=-1,D=-1,I=0,z=0|-f,N=0|f,F=0,B=-f-1|0,j=f-1|0,U=0,H=0,V=0;for(k=0;k<f;++k)E[O++]=r(h[g],o,s,l),g+=M;if(g+=T,c>0){if(A=1,E[O++]=r(h[g],o,s,l),g+=M,f>0)for(k=1,u=h[g],R=E[O]=r(u,o,s,l),F=E[O+z],I=E[O+P],U=E[O+B],R===F&&R===I&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,F,I,U,o,s,l),H=C[O]=L++),O+=1,g+=M,k=2;k<f;++k)u=h[g],R=E[O]=r(u,o,s,l),F=E[O+z],I=E[O+P],U=E[O+B],R===F&&R===I&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,F,I,U,o,s,l),H=C[O]=L++,U!==I&&e(C[O+P],H,b,w,I,U,o,s,l)),O+=1,g+=M;for(g+=T,O=0,V=z,z=N,N=V,V=P,P=D,D=V,V=B,B=j,j=V,A=2;A<c;++A){if(E[O++]=r(h[g],o,s,l),g+=M,f>0)for(k=1,u=h[g],R=E[O]=r(u,o,s,l),F=E[O+z],I=E[O+P],U=E[O+B],R===F&&R===I&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,F,I,U,o,s,l),H=C[O]=L++,U!==F&&e(C[O+z],H,w,y,U,F,o,s,l)),O+=1,g+=M,k=2;k<f;++k)u=h[g],R=E[O]=r(u,o,s,l),F=E[O+z],I=E[O+P],U=E[O+B],R===F&&R===I&&R===U||(y=h[g+m],b=h[g+x],w=h[g+_],t(A,k,u,y,b,w,R,F,I,U,o,s,l),H=C[O]=L++,U!==I&&e(C[O+P],H,b,w,I,U,o,s,l),U!==F&&e(C[O+z],H,w,y,U,F,o,s,l)),O+=1,g+=M;1&A&&(O=0),V=z,z=N,N=V,V=P,P=D,D=V,V=B,B=j,j=V,g+=T}}i(C),i(E)}}}},6199:function(t,e,r){"use strict";var n=r(1338),i={zero:function(t,e,r,n){var i=t[0];n|=0;var a=0,o=r[0];for(a=0;a<i;++a)e[n]=0,n+=o},fdTemplate1:function(t,e,r,n,i,a,o){var s=t[0],l=r[0],u=-1*l,c=l;n|=0,o|=0;var f=0,h=l,d=a[0];for(f=0;f<s;++f)i[o]=.5*(e[n+u]-e[n+c]),n+=h,o+=d},fdTemplate2:function(t,e,r,n,i,a,o,s,l,u){var c=t[0],f=t[1],h=r[0],d=r[1],p=a[0],v=a[1],g=l[0],m=l[1],y=-1*h,x=h,b=-1*d,_=d;n|=0,o|=0,u|=0;var w=0,M=0,T=d,A=h-f*d,k=v,L=p-f*v,S=m,E=g-f*m;for(M=0;M<c;++M){for(w=0;w<f;++w)i[o]=.5*(e[n+y]-e[n+x]),s[u]=.5*(e[n+b]-e[n+_]),n+=T,o+=k,u+=S;n+=A,o+=L,u+=E}}},a={cdiff:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},zero:function(t){var e={};return function(r){var n=r.dtype,i=r.order,a=[n,i.join()].join(),o=e[a];return o||(e[a]=o=t([n,i])),o(r.shape.slice(0),r.data,r.stride,0|r.offset)}},fdTemplate1:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=n.dtype,s=n.order,l=[i,a.join(),o,s.join()].join(),u=e[l];return u||(e[l]=u=t([i,a,o,s])),u(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset)}},fdTemplate2:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}}};function o(t){return(0,a[t.funcName])(s.bind(void 0,t))}function s(t){return i[t.funcName]}function l(t){return o({funcName:t.funcName})}var u={},c={},f=l({funcName:"cdiff"}),h=l({funcName:"zero"});function d(t){return t in u?u[t]:u[t]=l({funcName:"fdTemplate"+t})}function p(t,e,r,n){return function(t,i){var a=i.shape.slice();return a[0]>2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),t.pick(0,-1,1).lo(1).hi(a[1]-2)),e(t.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),t.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),e(t.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),t.pick(-1,0,0).lo(1).hi(a[0]-2)),e(t.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),t.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),e(t.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(a[0]-1,0,0,0),t.set(a[0]-1,0,1,0),t.set(0,a[1]-1,0,0),t.set(0,a[1]-1,1,0),t.set(a[0]-1,a[1]-1,0,0),t.set(a[0]-1,a[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(a=c[e])return a;for(var r=t.length,n=[f,h],i=1;i<=r;++i)n.push(d(i));var a=p.apply(void 0,n);return c[e]=a,a}(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r<t.shape[0],a=0<=r+1&&r+1<t.shape[0];return(1-n)*(i?+t.get(r):0)+n*(a?+t.get(r+1):0)}function r(t,e,r){var n=Math.floor(e),i=e-n,a=0<=n&&n<t.shape[0],o=0<=n+1&&n+1<t.shape[0],s=Math.floor(r),l=r-s,u=0<=s&&s<t.shape[1],c=0<=s+1&&s+1<t.shape[1],f=a&&u?t.get(n,s):0,h=a&&c?t.get(n,s+1):0;return(1-l)*((1-i)*f+i*(o&&u?t.get(n+1,s):0))+l*((1-i)*h+i*(o&&c?t.get(n+1,s+1):0))}function n(t,e,r,n){var i=Math.floor(e),a=e-i,o=0<=i&&i<t.shape[0],s=0<=i+1&&i+1<t.shape[0],l=Math.floor(r),u=r-l,c=0<=l&&l<t.shape[1],f=0<=l+1&&l+1<t.shape[1],h=Math.floor(n),d=n-h,p=0<=h&&h<t.shape[2],v=0<=h+1&&h+1<t.shape[2],g=o&&c&&p?t.get(i,l,h):0,m=o&&f&&p?t.get(i,l+1,h):0,y=s&&c&&p?t.get(i+1,l,h):0,x=s&&f&&p?t.get(i+1,l+1,h):0,b=o&&c&&v?t.get(i,l,h+1):0,_=o&&f&&v?t.get(i,l+1,h+1):0;return(1-d)*((1-u)*((1-a)*g+a*y)+u*((1-a)*m+a*x))+d*((1-u)*((1-a)*b+a*(s&&c&&v?t.get(i+1,l,h+1):0))+u*((1-a)*_+a*(s&&f&&v?t.get(i+1,l+1,h+1):0)))}function i(t){var e,r,n=0|t.shape.length,i=new Array(n),a=new Array(n),o=new Array(n),s=new Array(n);for(e=0;e<n;++e)r=+arguments[e+1],i[e]=Math.floor(r),a[e]=r-i[e],o[e]=0<=i[e]&&i[e]<t.shape[e],s[e]=0<=i[e]+1&&i[e]+1<t.shape[e];var l,u,c,f=0;t:for(e=0;e<1<<n;++e){for(u=1,c=t.offset,l=0;l<n;++l)if(e&1<<l){if(!s[l])continue t;u*=a[l],c+=t.stride[l]*(i[l]+1)}else{if(!o[l])continue t;u*=1-a[l],c+=t.stride[l]*i[l]}f+=u*t.data[c]}return f}t.exports=function(t,a,o,s){switch(t.shape.length){case 0:return 0;case 1:return e(t,a);case 2:return r(t,a,o);case 3:return n(t,a,o,s);default:return i.apply(void 0,arguments)}},t.exports.d1=e,t.exports.d2=r,t.exports.d3=n},5298:function(t,e){"use strict";var r={"float64,2,1,0":function(){return function(t,e,r,n,i){var a=t[0],o=t[1],s=t[2],l=r[0],u=r[1],c=r[2];n|=0;var f=0,h=0,d=0,p=c,v=u-s*c,g=l-o*u;for(d=0;d<a;++d){for(h=0;h<o;++h){for(f=0;f<s;++f)e[n]/=i,n+=p;n+=v}n+=g}}},"uint8,2,0,1,float64,2,1,0":function(){return function(t,e,r,n,i,a,o,s){for(var l=t[0],u=t[1],c=t[2],f=r[0],h=r[1],d=r[2],p=a[0],v=a[1],g=a[2],m=n|=0,y=o|=0,x=0|t[0];x>0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|t[1];b>0;){b<64?(u=b,b=0):(u=64,b-=64),n=m+x*f+b*h,o=y+x*p+b*v;var _=0,w=0,M=0,T=d,A=f-c*d,k=h-l*f,L=g,S=p-c*g,E=v-l*p;for(M=0;M<u;++M){for(w=0;w<l;++w){for(_=0;_<c;++_)e[n]=i[o]*s,n+=T,o+=L;n+=A,o+=S}n+=k,o+=E}}}}},"float32,1,0,float32,1,0":function(){return function(t,e,r,n,i,a,o){var s=t[0],l=t[1],u=r[0],c=r[1],f=a[0],h=a[1];n|=0,o|=0;var d=0,p=0,v=c,g=u-l*c,m=h,y=f-l*h;for(p=0;p<s;++p){for(d=0;d<l;++d)e[n]=i[o],n+=v,o+=m;n+=g,o+=y}}},"float32,1,0,float32,0,1":function(){return function(t,e,r,n,i,a,o){for(var s=t[0],l=t[1],u=r[0],c=r[1],f=a[0],h=a[1],d=n|=0,p=o|=0,v=0|t[1];v>0;){v<64?(l=v,v=0):(l=64,v-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=d+v*c+g*u,o=p+v*h+g*f;var m=0,y=0,x=c,b=u-l*c,_=h,w=f-l*h;for(y=0;y<s;++y){for(m=0;m<l;++m)e[n]=i[o],n+=x,o+=_;n+=b,o+=w}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(t,e,r,n,i,a,o){for(var s=t[0],l=t[1],u=t[2],c=r[0],f=r[1],h=r[2],d=a[0],p=a[1],v=a[2],g=n|=0,m=o|=0,y=0|t[2];y>0;){y<64?(u=y,y=0):(u=64,y-=64);for(var x=0|t[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|t[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+y*h+x*c+b*f,o=m+y*v+x*d+b*p;var _=0,w=0,M=0,T=h,A=c-u*h,k=f-s*c,L=v,S=d-u*v,E=p-s*d;for(M=0;M<l;++M){for(w=0;w<s;++w){for(_=0;_<u;++_)e[n]=i[o],n+=T,o+=L;n+=A,o+=S}n+=k,o+=E}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(t,e,r,n,i,a,o){var s=t[0],l=t[1],u=t[2],c=r[0],f=r[1],h=r[2],d=a[0],p=a[1],v=a[2];n|=0,o|=0;var g=0,m=0,y=0,x=h,b=c-u*h,_=f-s*c,w=v,M=d-u*v,T=p-s*d;for(y=0;y<l;++y){for(m=0;m<s;++m){for(g=0;g<u;++g)e[n]=i[o],n+=x,o+=w;n+=b,o+=M}n+=_,o+=T}}}},n=function(t,e){var n=e.join(",");return(0,r[n])()},i={mul:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},muls:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=[a,o.join(),s,l.join()].join(),c=e[u];return c||(e[u]=c=t([a,o,s,l])),c(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i)}},mulseq:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}},div:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=i.dtype,c=i.order,f=[a,o.join(),s,l.join(),u,c.join()].join(),h=e[f];return h||(e[f]=h=t([a,o,s,l,u,c])),h(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i.data,i.stride,0|i.offset)}},divs:function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=n.dtype,l=n.order,u=[a,o.join(),s,l.join()].join(),c=e[u];return c||(e[u]=c=t([a,o,s,l])),c(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset,i)}},divseq:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}},assign:function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=n.dtype,s=n.order,l=[i,a.join(),o,s.join()].join(),u=e[l];return u||(e[l]=u=t([i,a,o,s])),u(r.shape.slice(0),r.data,r.stride,0|r.offset,n.data,n.stride,0|n.offset)}}};function a(t){return e={funcName:t.funcName},(0,i[e.funcName])(n.bind(void 0,e));var e}var o={mul:"*",div:"/"};!function(){for(var t in o)e[t]=a({funcName:t}),e[t+"s"]=a({funcName:t+"s"}),e[t+"seq"]=a({funcName:t+"seq"})}(),e.assign=a({funcName:"assign"})},9994:function(t,e,r){"use strict";var n=r(9618),i=r(8277);t.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},8277:function(t){"use strict";t.exports=function(t){var e={};return function(r,n){var i=r.dtype,a=r.order,o=[i,a.join()].join(),s=e[o];return s||(e[o]=s=t([i,a])),s(r.shape.slice(0),r.data,r.stride,0|r.offset,n)}}(function(){return function(t,e,r,n,i){var a=t[0],o=t[1],s=t[2],l=r[0],u=r[1],c=r[2],f=[0,0,0];n|=0;var h=0,d=0,p=0,v=c,g=u-s*c,m=l-o*u;for(p=0;p<a;++p){for(d=0;d<o;++d){for(h=0;h<s;++h){var y,x=i;for(y=0;y<f.length-1;++y)x=x[f[y]];e[n]=x[f[f.length-1]],n+=v,++f[2]}n+=g,f[2]-=s,++f[1]}n+=m,f[1]-=o,++f[0]}}}.bind(void 0,{funcName:"convert"}))},7640:function(t,e,r){"use strict";var n=r(1888);function i(t){return"uint32"===t?[n.mallocUint32,n.freeUint32]:null}var a={"uint32,1,0":function(t,e){return function(r,n,i,a,o,s,l,u,c,f,h){var d,p,v,g,m,y,x,b,_=r*o+a,w=t(u);for(d=r+1;d<=n;++d){for(p=d,v=_+=o,m=0,y=_,g=0;g<u;++g)w[m++]=i[y],y+=c;t:for(;p-- >r;){m=0,y=v-o;e:for(g=0;g<u;++g){if((x=i[y])<(b=w[m]))break t;if(x>b)break e;y+=f,m+=h}for(m=v,y=v-o,g=0;g<u;++g)i[m]=i[y],m+=c,y+=c;v-=o}for(m=v,y=0,g=0;g<u;++g)i[m]=w[y++],m+=c}e(w)}}},o={"uint32,1,0":function(t,e,r){return function n(i,a,o,s,l,u,c,f,h,d,p){var v,g,m,y,x,b,_,w,M,T,A,k,L,S,E,C,O,R,P,D,I,z,N,F,B,j=(a-i+1)/6|0,U=i+j,H=a-j,V=i+a>>1,Y=V-j,G=V+j,W=U,q=Y,X=V,Z=G,J=H,K=i+1,Q=a-1,$=!0,tt=0,et=0,rt=0,nt=f,it=e(nt),at=e(nt);A=l*W,k=l*q,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=W,W=q,q=g;break t}if(rt<0)break t;B+=d}A=l*Z,k=l*J,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=Z,Z=J,J=g;break t}if(rt<0)break t;B+=d}A=l*W,k=l*X,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=W,W=X,X=g;break t}if(rt<0)break t;B+=d}A=l*q,k=l*X,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=q,q=X,X=g;break t}if(rt<0)break t;B+=d}A=l*W,k=l*Z,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=W,W=Z,Z=g;break t}if(rt<0)break t;B+=d}A=l*X,k=l*Z,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=X,X=Z,Z=g;break t}if(rt<0)break t;B+=d}A=l*q,k=l*J,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=q,q=J,J=g;break t}if(rt<0)break t;B+=d}A=l*q,k=l*X,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=q,q=X,X=g;break t}if(rt<0)break t;B+=d}A=l*Z,k=l*J,B=s;t:for(T=0;T<f;++T){if(w=k+B,(rt=o[_=A+B]-o[w])>0){g=Z,Z=J,J=g;break t}if(rt<0)break t;B+=d}for(A=l*W,k=l*q,L=l*X,S=l*Z,E=l*J,C=l*U,O=l*V,R=l*H,F=0,B=s,T=0;T<f;++T)_=A+B,w=k+B,M=L+B,P=S+B,D=E+B,I=C+B,z=O+B,N=R+B,it[F]=o[w],at[F]=o[P],$=$&&it[F]===at[F],m=o[_],y=o[M],x=o[D],o[I]=m,o[z]=y,o[N]=x,++F,B+=h;for(A=l*Y,k=l*i,B=s,T=0;T<f;++T)w=k+B,o[_=A+B]=o[w],B+=h;for(A=l*G,k=l*a,B=s,T=0;T<f;++T)w=k+B,o[_=A+B]=o[w],B+=h;if($)for(b=K;b<=Q;++b){for(_=s+b*l,F=0,T=0;T<f&&0==(rt=o[_]-it[F]);++T)F+=p,_+=d;if(0!==rt)if(rt<0){if(b!==K)for(A=l*b,k=l*K,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;++K}else for(;;){for(_=s+Q*l,F=0,T=0;T<f&&0==(rt=o[_]-it[F]);++T)F+=p,_+=d;if(!(rt>0)){if(rt<0){for(A=l*b,k=l*K,L=l*Q,B=s,T=0;T<f;++T)w=k+B,M=L+B,v=o[_=A+B],o[_]=o[w],o[w]=o[M],o[M]=v,B+=h;++K,--Q;break}for(A=l*b,k=l*Q,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;--Q;break}Q--}}else for(b=K;b<=Q;++b){for(_=s+b*l,F=0,T=0;T<f&&0==(tt=o[_]-it[F]);++T)F+=p,_+=d;if(tt<0){if(b!==K)for(A=l*b,k=l*K,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;++K}else{for(_=s+b*l,F=0,T=0;T<f&&0==(et=o[_]-at[F]);++T)F+=p,_+=d;if(et>0)for(;;){for(_=s+Q*l,F=0,T=0;T<f&&0==(rt=o[_]-at[F]);++T)F+=p,_+=d;if(!(rt>0)){for(_=s+Q*l,F=0,T=0;T<f&&0==(rt=o[_]-it[F]);++T)F+=p,_+=d;if(rt<0){for(A=l*b,k=l*K,L=l*Q,B=s,T=0;T<f;++T)w=k+B,M=L+B,v=o[_=A+B],o[_]=o[w],o[w]=o[M],o[M]=v,B+=h;++K,--Q}else{for(A=l*b,k=l*Q,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;--Q}break}if(--Q<b)break}}}for(A=l*i,k=l*(K-1),F=0,B=s,T=0;T<f;++T)w=k+B,o[_=A+B]=o[w],o[w]=it[F],++F,B+=h;for(A=l*a,k=l*(Q+1),F=0,B=s,T=0;T<f;++T)w=k+B,o[_=A+B]=o[w],o[w]=at[F],++F,B+=h;if(K-2-i<=32?t(i,K-2,o,s,l,u,c,f,h,d,p):n(i,K-2,o,s,l,u,c,f,h,d,p),a-(Q+2)<=32?t(Q+2,a,o,s,l,u,c,f,h,d,p):n(Q+2,a,o,s,l,u,c,f,h,d,p),$)return r(it),void r(at);if(K<U&&Q>H){t:for(;;){for(_=s+K*l,F=0,B=s,T=0;T<f;++T){if(o[_]!==it[F])break t;++F,_+=h}++K}t:for(;;){for(_=s+Q*l,F=0,B=s,T=0;T<f;++T){if(o[_]!==at[F])break t;++F,_+=h}--Q}for(b=K;b<=Q;++b){for(_=s+b*l,F=0,T=0;T<f&&0==(tt=o[_]-it[F]);++T)F+=p,_+=d;if(0===tt){if(b!==K)for(A=l*b,k=l*K,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;++K}else{for(_=s+b*l,F=0,T=0;T<f&&0==(et=o[_]-at[F]);++T)F+=p,_+=d;if(0===et)for(;;){for(_=s+Q*l,F=0,T=0;T<f&&0==(rt=o[_]-at[F]);++T)F+=p,_+=d;if(0!==rt){for(_=s+Q*l,F=0,T=0;T<f&&0==(rt=o[_]-it[F]);++T)F+=p,_+=d;if(rt<0){for(A=l*b,k=l*K,L=l*Q,B=s,T=0;T<f;++T)w=k+B,M=L+B,v=o[_=A+B],o[_]=o[w],o[w]=o[M],o[M]=v,B+=h;++K,--Q}else{for(A=l*b,k=l*Q,B=s,T=0;T<f;++T)w=k+B,v=o[_=A+B],o[_]=o[w],o[w]=v,B+=h;--Q}break}if(--Q<b)break}}}}r(it),r(at),Q-K<=32?t(K,Q,o,s,l,u,c,f,h,d,p):n(K,Q,o,s,l,u,c,f,h,d,p)}}},s={"uint32,1,0":function(t,e){return function(r){var n=r.data,i=0|r.offset,a=r.shape,o=r.stride,s=0|o[0],l=0|a[0],u=0|o[1],c=0|a[1],f=u,h=u;l<=32?t(0,l-1,n,i,s,u,l,c,f,h,1):e(0,l-1,n,i,s,u,l,c,f,h,1)}}};t.exports=function(t,e){var r=[e,t].join(","),n=s[r],l=function(t,e){var r=i(e),n=[e,t].join(","),o=a[n];return r?o(r[0],r[1]):o()}(t,e),u=function(t,e,r){var n=i(e),a=[e,t].join(","),s=o[a];return t.length>1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,u)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=new Array(e.length);for(t=0;t<r.length;++t)r[t]=[Math.abs(e[t]),t];r.sort(a);var n=new Array(r.length);for(t=0;t<n.length;++t)n[t]=r[t][1];return n}var s={T:function(t){function e(t){this.data=t}var r=e.prototype;return r.dtype=t,r.index=function(){return-1},r.size=0,r.dimension=-1,r.shape=r.stride=r.order=[],r.lo=r.hi=r.transpose=r.step=function(){return new e(this.data)},r.get=r.set=function(){},r.pick=function(){return null},function(t){return new e(t)}},0:function(t,e){function r(t,e){this.data=t,this.offset=e}var n=r.prototype;return n.dtype=t,n.index=function(){return this.offset},n.dimension=0,n.size=1,n.shape=n.stride=n.order=[],n.lo=n.hi=n.transpose=n.step=function(){return new r(this.data,this.offset)},n.pick=function(){return e(this.data)},n.valueOf=n.get=function(){return"generic"===t?this.data.get(this.offset):this.data[this.offset]},n.set=function(e){return"generic"===t?this.data.set(this.offset,e):this.data[this.offset]=e},function(t,e,n,i){return new r(t,i)}},1:function(t,e,r){function n(t,e,r,n){this.data=t,this.shape=[e],this.stride=[r],this.offset=0|n}var i=n.prototype;return i.dtype=t,i.dimension=1,Object.defineProperty(i,"size",{get:function(){return this.shape[0]}}),i.order=[0],i.set=function(e,r){return"generic"===t?this.data.set(this.offset+this.stride[0]*e,r):this.data[this.offset+this.stride[0]*e]=r},i.get=function(e){return"generic"===t?this.data.get(this.offset+this.stride[0]*e):this.data[this.offset+this.stride[0]*e]},i.index=function(t){return this.offset+this.stride[0]*t},i.hi=function(t){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,this.stride[0],this.offset)},i.lo=function(t){var e=this.offset,r=0,i=this.shape[0],a=this.stride[0];return"number"==typeof t&&t>=0&&(e+=a*(r=0|t),i-=r),new n(this.data,i,a,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof t&&((a=0|t)<0?(i+=r*(e-1),e=o(-e/a)):e=o(e/a),r*=a),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,a){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),a-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,u=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=a*(r-1),r=u(-r/l)):r=u(r/l),a*=l),"number"==typeof e&&((l=0|e)<0?(s+=o*(i-1),i=u(-i/l)):i=u(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,a)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,a,o,s){this.data=t,this.shape=[e,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.stride[0],c=this.stride[1],f=this.stride[2];return"number"==typeof t&&t>=0&&(i+=u*(a=0|t),o-=a),"number"==typeof e&&e>=0&&(i+=c*(a=0|e),s-=a),"number"==typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,u,c,f,i)},i.step=function(t,e,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],u=this.stride[2],c=this.offset,f=0,h=Math.ceil;return"number"==typeof t&&((f=0|t)<0?(c+=s*(i-1),i=h(-i/f)):i=h(i/f),s*=f),"number"==typeof e&&((f=0|e)<0?(c+=l*(a-1),a=h(-a/f)):a=h(a/f),l*=f),"number"==typeof r&&((f=0|r)<0?(c+=u*(o-1),o=h(-o/f)):o=h(o/f),u*=f),new n(this.data,i,a,o,s,l,u,c)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[t],i[e],i[r],a[t],a[e],a[r],this.offset)},i.pick=function(t,r,n){var i=[],a=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,e[i.length+1])(this.data,i,a,o)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u){this.data=t,this.shape=[e,r,n,i],this.stride=[a,o,s,l],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],u=this.shape[2],c=this.shape[3],f=this.stride[0],h=this.stride[1],d=this.stride[2],p=this.stride[3];return"number"==typeof t&&t>=0&&(a+=f*(o=0|t),s-=o),"number"==typeof e&&e>=0&&(a+=h*(o=0|e),l-=o),"number"==typeof r&&r>=0&&(a+=d*(o=0|r),u-=o),"number"==typeof i&&i>=0&&(a+=p*(o=0|i),c-=o),new n(this.data,s,l,u,c,f,h,d,p,a)},i.step=function(t,e,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],u=this.stride[0],c=this.stride[1],f=this.stride[2],h=this.stride[3],d=this.offset,p=0,v=Math.ceil;return"number"==typeof t&&((p=0|t)<0?(d+=u*(a-1),a=v(-a/p)):a=v(a/p),u*=p),"number"==typeof e&&((p=0|e)<0?(d+=c*(o-1),o=v(-o/p)):o=v(o/p),c*=p),"number"==typeof r&&((p=0|r)<0?(d+=f*(s-1),s=v(-s/p)):s=v(s/p),f*=p),"number"==typeof i&&((p=0|i)<0?(d+=h*(l-1),l=v(-l/p)):l=v(l/p),h*=p),new n(this.data,a,o,s,l,u,c,f,h,d)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],o[t],o[e],o[r],o[i],this.offset)},i.pick=function(t,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,e[a.length+1])(this.data,a,o,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u,c,f){this.data=t,this.shape=[e,r,n,i,a],this.stride=[o,s,l,u,c],this.offset=0|f}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(e,r,n,i,a){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,a){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,a){var o=this.offset,s=0,l=this.shape[0],u=this.shape[1],c=this.shape[2],f=this.shape[3],h=this.shape[4],d=this.stride[0],p=this.stride[1],v=this.stride[2],g=this.stride[3],m=this.stride[4];return"number"==typeof t&&t>=0&&(o+=d*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(o+=p*(s=0|e),u-=s),"number"==typeof r&&r>=0&&(o+=v*(s=0|r),c-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),f-=s),"number"==typeof a&&a>=0&&(o+=m*(s=0|a),h-=s),new n(this.data,l,u,c,f,h,d,p,v,g,m,o)},i.step=function(t,e,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.shape[3],c=this.shape[4],f=this.stride[0],h=this.stride[1],d=this.stride[2],p=this.stride[3],v=this.stride[4],g=this.offset,m=0,y=Math.ceil;return"number"==typeof t&&((m=0|t)<0?(g+=f*(o-1),o=y(-o/m)):o=y(o/m),f*=m),"number"==typeof e&&((m=0|e)<0?(g+=h*(s-1),s=y(-s/m)):s=y(s/m),h*=m),"number"==typeof r&&((m=0|r)<0?(g+=d*(l-1),l=y(-l/m)):l=y(l/m),d*=m),"number"==typeof i&&((m=0|i)<0?(g+=p*(u-1),u=y(-u/m)):u=y(u/m),p*=m),"number"==typeof a&&((m=0|a)<0?(g+=v*(c-1),c=y(-c/m)):c=y(c/m),v*=m),new n(this.data,o,s,l,u,c,f,h,d,p,v,g)},i.transpose=function(t,e,r,i,a){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],o[a],s[t],s[e],s[r],s[i],s[a],this.offset)},i.pick=function(t,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,e[o.length+1])(this.data,o,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,u[t][0]):n(t,u[t],o)}var u={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,a){if(void 0===t)return(0,u.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,c=1;s>=0;--s)r[s]=c,c*=e[s]}if(void 0===a)for(a=0,s=0;s<o;++s)r[s]<0&&(a-=(e[s]-1)*r[s]);for(var f=function(t){if(n(t))return"buffer";if(i)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(t)?"array":"generic"}(t),h=u[f];h.length<=o+1;)h.push(l(f,h.length-1));return(0,h[o+1])(t,e,r,a)}},1278:function(t,e,r){"use strict";var n=r(2361),i=Math.pow(2,-1074),a=-1>>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);return e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o)i[o]=[0,0,0];for(o=0;o<t.length;++o)for(var s=t[o],l=0,u=s[s.length-1],c=s[0],f=0;f<s.length;++f){l=u,u=c,c=s[(f+1)%s.length];for(var h=e[l],d=e[u],p=e[c],v=new Array(3),g=0,m=new Array(3),y=0,x=0;x<3;++x)v[x]=h[x]-d[x],g+=v[x]*v[x],m[x]=p[x]-d[x],y+=m[x]*m[x];if(g*y>a){var b=i[u],_=1/Math.sqrt(g*y);for(x=0;x<3;++x){var w=(x+1)%3,M=(x+2)%3;b[x]+=_*(m[w]*v[M]-m[M]*v[w])}}}for(o=0;o<n;++o){b=i[o];var T=0;for(x=0;x<3;++x)T+=b[x]*b[x];if(T>a)for(_=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;o<n;++o){for(var s=t[o],l=new Array(3),u=0;u<3;++u)l[u]=e[s[u]];var c=new Array(3),f=new Array(3);for(u=0;u<3;++u)c[u]=l[1][u]-l[0][u],f[u]=l[2][u]-l[0][u];var h=new Array(3),d=0;for(u=0;u<3;++u){var p=(u+1)%3,v=(u+2)%3;h[u]=c[p]*f[v]-c[v]*f[p],d+=h[u]*h[u]}for(d=d>a?1/Math.sqrt(d):0,u=0;u<3;++u)h[u]*=d;i[o]=h}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,a,o,s,l,u){var c=e+a+u;if(f>0){var f=Math.sqrt(c+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,u);f=Math.sqrt(2*h-c+1),e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),c(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function c(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=u(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;c(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],u=l(a,o,s);a/=u,o/=u,s/=u;var c=i[0],f=i[4],h=i[8],d=c*a+f*o+h*s,p=l(c-=a*d,f-=o*d,h-=s*d);c/=p,f/=p,h/=p;var v=i[2],g=i[6],m=i[10],y=v*a+g*o+m*s,x=v*c+g*f+m*h,b=l(v-=y*a+x*c,g-=y*o+x*f,m-=y*s+x*h);v/=b,g/=b,m/=b;var _=c*e+a*r,w=f*e+o*r,M=h*e+s*r;this.center.move(t,_,w,M);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(t,Math.log(T))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],c=i[1],f=i[5],h=i[9],d=i[2],p=i[6],v=i[10],g=e*a+r*c,m=e*o+r*f,y=e*s+r*h,x=-(p*y-v*m),b=-(v*g-d*y),_=-(d*m-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),M=u(x,b,_,w);M>1e-6?(x/=M,b/=M,_/=M,w/=M):(x=b=_=0,w=1);var T=this.computedRotation,A=T[0],k=T[1],L=T[2],S=T[3],E=A*w+S*x+k*_-L*b,C=k*w+S*b+L*x-A*_,O=L*w+S*_+A*b-k*x,R=S*w-A*x-k*b-L*_;if(n){x=d,b=p,_=v;var P=Math.sin(n)/l(x,b,_);x*=P,b*=P,_*=P,R=R*(w=Math.cos(e))-(E=E*w+R*x+C*_-O*b)*x-(C=C*w+R*b+O*x-E*_)*b-(O=O*w+R*_+E*b-C*x)*_}var D=u(E,C,O,R);D>1e-6?(E/=D,C/=D,O/=D,R/=D):(E=C=O=0,R=1),this.rotation.set(t,E,C,O,R)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),c(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-e[u],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),c(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,u=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,u-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o<r;++o)a[0][o]=[],a[1][o]=[];for(o=0;o<i;++o){var s=t[o];a[0][s[0]].push(s),a[1][s[1]].push(s)}var l=[];for(o=0;o<r;++o)a[0][o].length+a[1][o].length===0&&l.push([o]);function u(t,e){var r=a[e][t[e]];r.splice(r.indexOf(t),1)}function c(t,r,i){for(var o,s,l,c=0;c<2;++c)if(a[c][r].length>0){o=a[c][r][0],l=c;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],d=0;d<h.length;++d){var p=h[d],v=p[1^f];n(e[t],e[r],e[s],e[v])>0&&(o=p,s=v,l=f)}return i||o&&u(o,l),s}function f(t,r){var i=a[r][t][0],o=[t];u(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=c(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],d=c(l,f,!0);if(n(e[l],e[f],e[h],e[d])<0)break;o.push(t),s=c(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(o=0;o<r;++o)for(var d=0;d<2;++d){for(var p=[];a[d][o].length>0;){a[0][o].length;var v=f(o,d);h(0,v)?p.push.apply(p,v):(p.length>0&&l.push(p),p=v)}p.length>0&&l.push(p)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s<e.length;++s){var l=r[s].length;a[s]=l,i[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){i[d=o.pop()]=!1;var u=r[d];for(s=0;s<u.length;++s){var c=u[s];0==--a[c]&&o.push(c)}}var f=new Array(e.length),h=[];for(s=0;s<e.length;++s)if(i[s]){var d=h.length;f[s]=d,h.push(e[s])}else f[s]=-1;var p=[];for(s=0;s<t.length;++s){var v=t[s];i[v[0]]&&i[v[1]]&&p.push([f[v[0]],f[v[1]]])}return[p,h]};var n=r(3134)},2095:function(t,e,r){"use strict";t.exports=function(t,e){var r=u(t,e);t=r[0];for(var f=(e=r[1]).length,h=(t.length,n(t,e.length)),d=0;d<f;++d)if(h[d].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var p=i(t,e),v=(p=p.filter((function(t){for(var r=t.length,n=[0],i=0;i<r;++i){var a=e[t[i]],l=e[t[(i+1)%r]],u=o(-a[0],a[1]),c=o(-a[0],l[1]),f=o(l[0],a[1]),h=o(l[0],l[1]);n=s(n,s(s(u,c),s(f,h)))}return n[n.length-1]>0}))).length,g=new Array(v),m=new Array(v);for(d=0;d<v;++d){g[d]=d;var y=new Array(v),x=p[d].map((function(t){return e[t]})),b=a([x]),_=0;t:for(var w=0;w<v;++w)if(y[w]=0,d!==w){for(var M=(V=p[w]).length,T=0;T<M;++T){var A=b(e[V[T]]);if(0!==A){A<0&&(y[w]=1,_+=1);continue t}}y[w]=1,_+=1}m[d]=[_,d,y]}for(m.sort((function(t,e){return e[0]-t[0]})),d=0;d<v;++d){var k=(y=m[d])[1],L=y[2];for(w=0;w<v;++w)L[w]&&(g[w]=k)}var S=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(v);for(d=0;d<v;++d)S[d].push(g[d]),S[g[d]].push(d);var E={},C=c(f,!1);for(d=0;d<v;++d)for(M=(V=p[d]).length,w=0;w<M;++w){var O=V[w],R=V[(w+1)%M],P=Math.min(O,R)+":"+Math.max(O,R);if(P in E){var D=E[P];S[D].push(d),S[d].push(D),C[O]=C[R]=!0}else E[P]=d}function I(t){for(var e=t.length,r=0;r<e;++r)if(!C[t[r]])return!1;return!0}var z=[],N=c(v,-1);for(d=0;d<v;++d)g[d]!==d||I(p[d])?N[d]=-1:(z.push(d),N[d]=0);for(r=[];z.length>0;){var F=z.pop(),B=S[F];l(B,(function(t,e){return t-e}));var j,U=B.length,H=N[F];for(0===H&&(j=[V=p[F]]),d=0;d<U;++d){var V,Y=B[d];N[Y]>=0||(N[Y]=1^H,z.push(Y),0===H&&(I(V=p[Y])||(V.reverse(),j.push(V))))}0===H&&r.push(j)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),u=r(5609);function c(t,e){for(var r=new Array(t),n=0;n<t;++n)r[n]=e;return r}},5085:function(t,e,r){t.exports=function(t){for(var e=t.length,r=[],a=[],s=0;s<e;++s)for(var c=t[s],f=c.length,h=f-1,d=0;d<f;h=d++){var p=c[h],v=c[d];p[0]===v[0]?a.push([p,v]):r.push([p,v])}if(0===r.length)return 0===a.length?u:(g=l(a),function(t){return g(t[0],t[1])?0:1});var g,m=i(r),y=function(t,e){return function(r){var i=o.le(e,r[0]);if(i<0)return 1;var a=t[i];if(!a){if(!(i>0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,u=n(r,l[0],l[1]);if(l[0][0]<l[1][0])if(u<0)a=a.left;else{if(!(u>0))return 0;s=-1,a=a.right}else if(u>0)a=a.left;else{if(!(u<0))return 0;s=1,a=a.right}}return s}}(m.slabs,m.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r<t.length;++r){var n=t[r],i=n[0][0],o=n[0][1],l=n[1][1],u=[Math.min(o,l),Math.max(o,l)];i in e?e[i].push(u):e[i]=[u]}var c={},f=Object.keys(e);for(r=0;r<f.length;++r){var h=e[f[r]];c[f[r]]=a(h)}return function(t){return function(e,r){var n=t[e];return!!n&&!!n.queryPoint(r,s)}}(c)}function u(t){return 1}},9346:function(t){"use strict";var e=new Float64Array(4),r=new Float64Array(4),n=new Float64Array(4);t.exports=function(t,i,a,o,s){e.length<o.length&&(e=new Float64Array(o.length),r=new Float64Array(o.length),n=new Float64Array(o.length));for(var l=0;l<o.length;++l)e[l]=t[l]-o[l],r[l]=i[l]-t[l],n[l]=a[l]-t[l];var u=0,c=0,f=0,h=0,d=0,p=0;for(l=0;l<o.length;++l){var v=r[l],g=n[l],m=e[l];u+=v*v,c+=v*g,f+=g*g,h+=m*v,d+=m*g,p+=m*m}var y,x,b,_,w,M=Math.abs(u*f-c*c),T=c*d-f*h,A=c*h-u*d;if(T+A<=M)if(T<0)A<0&&h<0?(A=0,-h>=u?(T=1,y=u+2*h+p):y=h*(T=-h/u)+p):(T=0,d>=0?(A=0,y=p):-d>=f?(A=1,y=f+2*d+p):y=d*(A=-d/f)+p);else if(A<0)A=0,h>=0?(T=0,y=p):-h>=u?(T=1,y=u+2*h+p):y=h*(T=-h/u)+p;else{var k=1/M;y=(T*=k)*(u*T+c*(A*=k)+2*h)+A*(c*T+f*A+2*d)+p}else T<0?(b=f+d)>(x=c+h)?(_=b-x)>=(w=u-2*c+f)?(T=1,A=0,y=u+2*h+p):y=(T=_/w)*(u*T+c*(A=1-T)+2*h)+A*(c*T+f*A+2*d)+p:(T=0,b<=0?(A=1,y=f+2*d+p):d>=0?(A=0,y=p):y=d*(A=-d/f)+p):A<0?(b=u+h)>(x=c+d)?(_=b-x)>=(w=u-2*c+f)?(A=1,T=0,y=f+2*d+p):y=(T=1-(A=_/w))*(u*T+c*A+2*h)+A*(c*T+f*A+2*d)+p:(A=0,b<=0?(T=1,y=u+2*h+p):h>=0?(T=0,y=p):y=h*(T=-h/u)+p):(_=f+d-c-h)<=0?(T=0,A=1,y=f+2*d+p):_>=(w=u-2*c+f)?(T=1,A=0,y=u+2*h+p):y=(T=_/w)*(u*T+c*(A=1-T)+2*h)+A*(c*T+f*A+2*d)+p;var L=1-T-A;for(l=0;l<o.length;++l)s[l]=L*t[l]+T*i[l]+A*a[l];return y<0?0:y}},8648:function(t,e,r){t.exports=r(783)},2653:function(t,e,r){"use strict";var n=r(3865);t.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},5838:function(t,e,r){"use strict";t.exports=function(t){for(var e=new Array(t.length),r=0;r<t.length;++r)e[r]=n(t[r]);return e};var n=r(7842)},8987:function(t,e,r){"use strict";var n=r(7842),i=r(6504);t.exports=function(t,e){for(var r=n(e),a=t.length,o=new Array(a),s=0;s<a;++s)o[s]=i(t[s],r);return o}},544:function(t,e,r){"use strict";var n=r(5572);t.exports=function(t,e){for(var r=t.length,i=new Array(r),a=0;a<r;++a)i[a]=n(t[a],e[a]);return i}},5771:function(t,e,r){"use strict";var n=r(8507),i=r(3788),a=r(2419);t.exports=function(t){t.sort(i);for(var e=t.length,r=0,o=0;o<e;++o){var s=t[o],l=a(s);if(0!==l){if(r>0){var u=t[r-1];if(0===n(s,u)&&a(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r;(l=(s=t[i])-((r=a+s)-a))&&(t[--n]=r,r=l)}var o=0;for(i=n;i<e;++i){var s,l;(l=(s=r)-((r=(a=t[i])+s)-a))&&(t[o++]=l)}return t[o++]=r,t.length=o,t}},2962:function(t,e,r){"use strict";var n=r(5250),i=r(8210),a=r(3012),o=r(7004);function s(t,e,r,n){return function(e){return n(t(r(e[0][0],e[1][1]),r(-e[0][1],e[1][0])))}}function l(t,e,r,n){return function(i){return n(t(e(t(r(i[1][1],i[2][2]),r(-i[1][2],i[2][1])),i[0][0]),t(e(t(r(i[1][0],i[2][2]),r(-i[1][2],i[2][0])),-i[0][1]),e(t(r(i[1][0],i[2][1]),r(-i[1][1],i[2][0])),i[0][2]))))}}function u(t,e,r,n){return function(i){return n(t(t(e(t(e(t(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][1]),t(e(t(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),-i[1][2]),e(t(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][3]))),i[0][0]),e(t(e(t(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][0]),t(e(t(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][2]),e(t(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),i[1][3]))),-i[0][1])),t(e(t(e(t(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),i[1][0]),t(e(t(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][1]),e(t(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][3]))),i[0][2]),e(t(e(t(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][0]),t(e(t(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),-i[1][1]),e(t(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][2]))),-i[0][3]))))}}function c(t,e,r,n){return function(i){return n(t(t(e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][1]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),-i[1][2])),t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),-i[1][4]))),i[0][0]),e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][2])),t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][4]))),-i[0][1])),t(e(t(t(e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][3]),e(t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),-i[1][4]))),i[0][2]),t(e(t(t(e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][0]),e(t(e(t(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][2]),e(t(e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][4]))),-i[0][3]),e(t(t(e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),i[1][0]),e(t(e(t(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][1])),t(e(t(e(t(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),i[1][2]),e(t(e(t(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),t(e(t(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),e(t(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][3]))),i[0][4])))))}}function f(t){return(2===t?s:3===t?l:4===t?u:5===t?c:void 0)(i,a,n,o)}var h=[function(){return[0]},function(t){return[t[0][0]]}];function d(t,e,r,n,i,a,o,s){return function(l){switch(l.length){case 0:return t(l);case 1:return e(l);case 2:return r(l);case 3:return n(l);case 4:return i(l);case 5:return a(l)}var u=o[l.length];return u||(u=o[l.length]=s(l.length)),u(l)}}!function(){for(;h.length<6;)h.push(f(h.length));t.exports=d.apply(void 0,h.concat([h,f]));for(var e=0;e<h.length;++e)t.exports[e]=h[e]}()},1944:function(t,e,r){"use strict";var n=r(5250),i=r(8210);t.exports=function(t,e){for(var r=n(t[0],e[0]),a=1;a<t.length;++a)r=i(r,n(t[a],e[a]));return r}},2646:function(t,e,r){"use strict";var n=r(5250),i=r(8210),a=r(8545),o=r(3012);function s(t){return(3===t?l:4===t?u:5===t?c:f)(i,a,n,o)}function l(t,e,r,n){return function(i,a,o){var s=r(i[0],i[0]),l=n(s,a[0]),u=n(s,o[0]),c=r(a[0],a[0]),f=n(c,i[0]),h=n(c,o[0]),d=r(o[0],o[0]),p=n(d,i[0]),v=n(d,a[0]),g=t(e(v,h),e(f,l)),m=e(p,u),y=e(g,m);return y[y.length-1]}}function u(t,e,r,n){return function(i,a,o,s){var l=t(r(i[0],i[0]),r(i[1],i[1])),u=n(l,a[0]),c=n(l,o[0]),f=n(l,s[0]),h=t(r(a[0],a[0]),r(a[1],a[1])),d=n(h,i[0]),p=n(h,o[0]),v=n(h,s[0]),g=t(r(o[0],o[0]),r(o[1],o[1])),m=n(g,i[0]),y=n(g,a[0]),x=n(g,s[0]),b=t(r(s[0],s[0]),r(s[1],s[1])),_=n(b,i[0]),w=n(b,a[0]),M=n(b,o[0]),T=t(t(n(e(M,x),a[1]),t(n(e(w,v),-o[1]),n(e(y,p),s[1]))),t(n(e(w,v),i[1]),t(n(e(_,f),-a[1]),n(e(d,u),s[1])))),A=t(t(n(e(M,x),i[1]),t(n(e(_,f),-o[1]),n(e(m,c),s[1]))),t(n(e(y,p),i[1]),t(n(e(m,c),-a[1]),n(e(d,u),o[1])))),k=e(T,A);return k[k.length-1]}}function c(t,e,r,n){return function(i,a,o,s,l){var u=t(r(i[0],i[0]),t(r(i[1],i[1]),r(i[2],i[2]))),c=n(u,a[0]),f=n(u,o[0]),h=n(u,s[0]),d=n(u,l[0]),p=t(r(a[0],a[0]),t(r(a[1],a[1]),r(a[2],a[2]))),v=n(p,i[0]),g=n(p,o[0]),m=n(p,s[0]),y=n(p,l[0]),x=t(r(o[0],o[0]),t(r(o[1],o[1]),r(o[2],o[2]))),b=n(x,i[0]),_=n(x,a[0]),w=n(x,s[0]),M=n(x,l[0]),T=t(r(s[0],s[0]),t(r(s[1],s[1]),r(s[2],s[2]))),A=n(T,i[0]),k=n(T,a[0]),L=n(T,o[0]),S=n(T,l[0]),E=t(r(l[0],l[0]),t(r(l[1],l[1]),r(l[2],l[2]))),C=n(E,i[0]),O=n(E,a[0]),R=n(E,o[0]),P=n(E,s[0]),D=t(t(t(n(t(n(e(P,S),o[1]),t(n(e(R,M),-s[1]),n(e(L,w),l[1]))),a[2]),t(n(t(n(e(P,S),a[1]),t(n(e(O,y),-s[1]),n(e(k,m),l[1]))),-o[2]),n(t(n(e(R,M),a[1]),t(n(e(O,y),-o[1]),n(e(_,g),l[1]))),s[2]))),t(n(t(n(e(L,w),a[1]),t(n(e(k,m),-o[1]),n(e(_,g),s[1]))),-l[2]),t(n(t(n(e(P,S),a[1]),t(n(e(O,y),-s[1]),n(e(k,m),l[1]))),i[2]),n(t(n(e(P,S),i[1]),t(n(e(C,d),-s[1]),n(e(A,h),l[1]))),-a[2])))),t(t(n(t(n(e(O,y),i[1]),t(n(e(C,d),-a[1]),n(e(v,c),l[1]))),s[2]),t(n(t(n(e(k,m),i[1]),t(n(e(A,h),-a[1]),n(e(v,c),s[1]))),-l[2]),n(t(n(e(L,w),a[1]),t(n(e(k,m),-o[1]),n(e(_,g),s[1]))),i[2]))),t(n(t(n(e(L,w),i[1]),t(n(e(A,h),-o[1]),n(e(b,f),s[1]))),-a[2]),t(n(t(n(e(k,m),i[1]),t(n(e(A,h),-a[1]),n(e(v,c),s[1]))),o[2]),n(t(n(e(_,g),i[1]),t(n(e(b,f),-a[1]),n(e(v,c),o[1]))),-s[2]))))),I=t(t(t(n(t(n(e(P,S),o[1]),t(n(e(R,M),-s[1]),n(e(L,w),l[1]))),i[2]),n(t(n(e(P,S),i[1]),t(n(e(C,d),-s[1]),n(e(A,h),l[1]))),-o[2])),t(n(t(n(e(R,M),i[1]),t(n(e(C,d),-o[1]),n(e(b,f),l[1]))),s[2]),n(t(n(e(L,w),i[1]),t(n(e(A,h),-o[1]),n(e(b,f),s[1]))),-l[2]))),t(t(n(t(n(e(R,M),a[1]),t(n(e(O,y),-o[1]),n(e(_,g),l[1]))),i[2]),n(t(n(e(R,M),i[1]),t(n(e(C,d),-o[1]),n(e(b,f),l[1]))),-a[2])),t(n(t(n(e(O,y),i[1]),t(n(e(C,d),-a[1]),n(e(v,c),l[1]))),o[2]),n(t(n(e(_,g),i[1]),t(n(e(b,f),-a[1]),n(e(v,c),o[1]))),-l[2])))),z=e(D,I);return z[z.length-1]}}function f(t,e,r,n){return function(i,a,o,s,l,u){var c=t(t(r(i[0],i[0]),r(i[1],i[1])),t(r(i[2],i[2]),r(i[3],i[3]))),f=n(c,a[0]),h=n(c,o[0]),d=n(c,s[0]),p=n(c,l[0]),v=n(c,u[0]),g=t(t(r(a[0],a[0]),r(a[1],a[1])),t(r(a[2],a[2]),r(a[3],a[3]))),m=n(g,i[0]),y=n(g,o[0]),x=n(g,s[0]),b=n(g,l[0]),_=n(g,u[0]),w=t(t(r(o[0],o[0]),r(o[1],o[1])),t(r(o[2],o[2]),r(o[3],o[3]))),M=n(w,i[0]),T=n(w,a[0]),A=n(w,s[0]),k=n(w,l[0]),L=n(w,u[0]),S=t(t(r(s[0],s[0]),r(s[1],s[1])),t(r(s[2],s[2]),r(s[3],s[3]))),E=n(S,i[0]),C=n(S,a[0]),O=n(S,o[0]),R=n(S,l[0]),P=n(S,u[0]),D=t(t(r(l[0],l[0]),r(l[1],l[1])),t(r(l[2],l[2]),r(l[3],l[3]))),I=n(D,i[0]),z=n(D,a[0]),N=n(D,o[0]),F=n(D,s[0]),B=n(D,u[0]),j=t(t(r(u[0],u[0]),r(u[1],u[1])),t(r(u[2],u[2]),r(u[3],u[3]))),U=n(j,i[0]),H=n(j,a[0]),V=n(j,o[0]),Y=n(j,s[0]),G=n(j,l[0]),W=t(t(t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),o[2]),n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),-s[2])),t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),l[2]),n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),-u[2]))),a[3]),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),-s[2])),t(n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),l[2]),n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),-o[2])),t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),l[2]),n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),a[2]),n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),-o[2])),t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),s[2]),n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),a[2]),n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),-o[2])),t(n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),s[2]),n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),-s[2])),t(n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),l[2]),n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-s[2])),t(n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),l[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),l[2]),n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),-u[2]))),s[3]),n(t(t(n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),i[2]),n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),i[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-a[2])),t(n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),a[2]),n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),-o[2])),t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),s[2]),n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),-u[2]))),i[3]))),t(t(n(t(t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),i[2]),n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),-o[2])),t(n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),s[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-u[2]))),-a[3]),n(t(t(n(t(n(e(Y,P),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),i[2]),n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),-u[2]))),o[3])),t(n(t(t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),i[2]),n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-u[2]))),-s[3]),n(t(t(n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),i[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-a[2])),t(n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-s[2]))),u[3]))))),q=t(t(t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),o[2]),n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),-s[2])),t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),l[2]),n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),-u[2]))),i[3]),t(n(t(t(n(t(n(e(G,B),s[1]),t(n(e(Y,P),-l[1]),n(e(F,R),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-s[2])),t(n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),l[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-o[2])),t(n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),l[2]),n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(Y,P),o[1]),t(n(e(V,L),-s[1]),n(e(O,A),u[1]))),i[2]),n(t(n(e(Y,P),i[1]),t(n(e(U,v),-s[1]),n(e(E,d),u[1]))),-o[2])),t(n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),s[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),i[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-o[2])),t(n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),s[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),a[2]),n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),-o[2])),t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),l[2]),n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(G,B),o[1]),t(n(e(V,L),-l[1]),n(e(N,k),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-o[2])),t(n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),l[2]),n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(G,B),a[1]),t(n(e(H,_),-l[1]),n(e(z,b),u[1]))),i[2]),n(t(n(e(G,B),i[1]),t(n(e(U,v),-l[1]),n(e(I,p),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),l[2]),n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),-u[2]))),o[3]),n(t(t(n(t(n(e(V,L),a[1]),t(n(e(H,_),-o[1]),n(e(T,y),u[1]))),i[2]),n(t(n(e(V,L),i[1]),t(n(e(U,v),-o[1]),n(e(M,h),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(m,f),u[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),i[2]),n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),-a[2])),t(n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),a[2]),n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),-o[2])),t(n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),s[2]),n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),-l[2]))),i[3]))),t(t(n(t(t(n(t(n(e(F,R),o[1]),t(n(e(N,k),-s[1]),n(e(O,A),l[1]))),i[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-o[2])),t(n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),s[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-l[2]))),-a[3]),n(t(t(n(t(n(e(F,R),a[1]),t(n(e(z,b),-s[1]),n(e(C,x),l[1]))),i[2]),n(t(n(e(F,R),i[1]),t(n(e(I,p),-s[1]),n(e(E,d),l[1]))),-a[2])),t(n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),-l[2]))),o[3])),t(n(t(t(n(t(n(e(N,k),a[1]),t(n(e(z,b),-o[1]),n(e(T,y),l[1]))),i[2]),n(t(n(e(N,k),i[1]),t(n(e(I,p),-o[1]),n(e(M,h),l[1]))),-a[2])),t(n(t(n(e(z,b),i[1]),t(n(e(I,p),-a[1]),n(e(m,f),l[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-l[2]))),-s[3]),n(t(t(n(t(n(e(O,A),a[1]),t(n(e(C,x),-o[1]),n(e(T,y),s[1]))),i[2]),n(t(n(e(O,A),i[1]),t(n(e(E,d),-o[1]),n(e(M,h),s[1]))),-a[2])),t(n(t(n(e(C,x),i[1]),t(n(e(E,d),-a[1]),n(e(m,f),s[1]))),o[2]),n(t(n(e(T,y),i[1]),t(n(e(M,h),-a[1]),n(e(m,f),o[1]))),-s[2]))),l[3]))))),X=e(W,q);return X[X.length-1]}}var h=[function(){return 0},function(){return 0},function(){return 0}];function d(t){var e=h[t.length];return e||(e=h[t.length]=s(t.length)),e.apply(void 0,t)}function p(t,e,r,n,i,a,o,s){return function(e,r,l,u,c,f){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,l);case 4:return a(e,r,l,u);case 5:return o(e,r,l,u,c);case 6:return s(e,r,l,u,c,f)}for(var h=new Array(arguments.length),d=0;d<arguments.length;++d)h[d]=arguments[d];return t(h)}}!function(){for(;h.length<=6;)h.push(s(h.length));t.exports=p.apply(void 0,[d].concat(h));for(var e=0;e<=6;++e)t.exports[e]=h[e]}()},727:function(t,e,r){"use strict";var n=r(2962);function i(t){return(2===t?a:3===t?o:4===t?s:5===t?l:u)(t<6?n[t]:n)}function a(t){return function(e,r){return[t([[+r[0],+e[0][1]],[+r[1],+e[1][1]]]),t([[+e[0][0],+r[0]],[+e[1][0],+r[1]]]),t(e)]}}function o(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2]],[+r[1],+e[1][1],+e[1][2]],[+r[2],+e[2][1],+e[2][2]]]),t([[+e[0][0],+r[0],+e[0][2]],[+e[1][0],+r[1],+e[1][2]],[+e[2][0],+r[2],+e[2][2]]]),t([[+e[0][0],+e[0][1],+r[0]],[+e[1][0],+e[1][1],+r[1]],[+e[2][0],+e[2][1],+r[2]]]),t(e)]}}function s(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3]],[+r[1],+e[1][1],+e[1][2],+e[1][3]],[+r[2],+e[2][1],+e[2][2],+e[2][3]],[+r[3],+e[3][1],+e[3][2],+e[3][3]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3]],[+e[1][0],+r[1],+e[1][2],+e[1][3]],[+e[2][0],+r[2],+e[2][2],+e[2][3]],[+e[3][0],+r[3],+e[3][2],+e[3][3]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3]],[+e[1][0],+e[1][1],+r[1],+e[1][3]],[+e[2][0],+e[2][1],+r[2],+e[2][3]],[+e[3][0],+e[3][1],+r[3],+e[3][3]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+r[3]]]),t(e)]}}function l(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3],+e[0][4]],[+r[1],+e[1][1],+e[1][2],+e[1][3],+e[1][4]],[+r[2],+e[2][1],+e[2][2],+e[2][3],+e[2][4]],[+r[3],+e[3][1],+e[3][2],+e[3][3],+e[3][4]],[+r[4],+e[4][1],+e[4][2],+e[4][3],+e[4][4]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3],+e[0][4]],[+e[1][0],+r[1],+e[1][2],+e[1][3],+e[1][4]],[+e[2][0],+r[2],+e[2][2],+e[2][3],+e[2][4]],[+e[3][0],+r[3],+e[3][2],+e[3][3],+e[3][4]],[+e[4][0],+r[4],+e[4][2],+e[4][3],+e[4][4]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3],+e[0][4]],[+e[1][0],+e[1][1],+r[1],+e[1][3],+e[1][4]],[+e[2][0],+e[2][1],+r[2],+e[2][3],+e[2][4]],[+e[3][0],+e[3][1],+r[3],+e[3][3],+e[3][4]],[+e[4][0],+e[4][1],+r[4],+e[4][3],+e[4][4]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0],+e[0][4]],[+e[1][0],+e[1][1],+e[1][2],+r[1],+e[1][4]],[+e[2][0],+e[2][1],+e[2][2],+r[2],+e[2][4]],[+e[3][0],+e[3][1],+e[3][2],+r[3],+e[3][4]],[+e[4][0],+e[4][1],+e[4][2],+r[4],+e[4][4]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+r[3]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+r[4]]]),t(e)]}}function u(t){return function(e,r){return[t([[+r[0],+e[0][1],+e[0][2],+e[0][3],+e[0][4],+e[0][5]],[+r[1],+e[1][1],+e[1][2],+e[1][3],+e[1][4],+e[1][5]],[+r[2],+e[2][1],+e[2][2],+e[2][3],+e[2][4],+e[2][5]],[+r[3],+e[3][1],+e[3][2],+e[3][3],+e[3][4],+e[3][5]],[+r[4],+e[4][1],+e[4][2],+e[4][3],+e[4][4],+e[4][5]],[+r[5],+e[5][1],+e[5][2],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+r[0],+e[0][2],+e[0][3],+e[0][4],+e[0][5]],[+e[1][0],+r[1],+e[1][2],+e[1][3],+e[1][4],+e[1][5]],[+e[2][0],+r[2],+e[2][2],+e[2][3],+e[2][4],+e[2][5]],[+e[3][0],+r[3],+e[3][2],+e[3][3],+e[3][4],+e[3][5]],[+e[4][0],+r[4],+e[4][2],+e[4][3],+e[4][4],+e[4][5]],[+e[5][0],+r[5],+e[5][2],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+r[0],+e[0][3],+e[0][4],+e[0][5]],[+e[1][0],+e[1][1],+r[1],+e[1][3],+e[1][4],+e[1][5]],[+e[2][0],+e[2][1],+r[2],+e[2][3],+e[2][4],+e[2][5]],[+e[3][0],+e[3][1],+r[3],+e[3][3],+e[3][4],+e[3][5]],[+e[4][0],+e[4][1],+r[4],+e[4][3],+e[4][4],+e[4][5]],[+e[5][0],+e[5][1],+r[5],+e[5][3],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+r[0],+e[0][4],+e[0][5]],[+e[1][0],+e[1][1],+e[1][2],+r[1],+e[1][4],+e[1][5]],[+e[2][0],+e[2][1],+e[2][2],+r[2],+e[2][4],+e[2][5]],[+e[3][0],+e[3][1],+e[3][2],+r[3],+e[3][4],+e[3][5]],[+e[4][0],+e[4][1],+e[4][2],+r[4],+e[4][4],+e[4][5]],[+e[5][0],+e[5][1],+e[5][2],+r[5],+e[5][4],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+r[0],+e[0][5]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+r[1],+e[1][5]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+r[2],+e[2][5]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+r[3],+e[3][5]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+r[4],+e[4][5]],[+e[5][0],+e[5][1],+e[5][2],+e[5][3],+r[5],+e[5][5]]]),t([[+e[0][0],+e[0][1],+e[0][2],+e[0][3],+e[0][4],+r[0]],[+e[1][0],+e[1][1],+e[1][2],+e[1][3],+e[1][4],+r[1]],[+e[2][0],+e[2][1],+e[2][2],+e[2][3],+e[2][4],+r[2]],[+e[3][0],+e[3][1],+e[3][2],+e[3][3],+e[3][4],+r[3]],[+e[4][0],+e[4][1],+e[4][2],+e[4][3],+e[4][4],+r[4]],[+e[5][0],+e[5][1],+e[5][2],+e[5][3],+e[5][4],+r[5]]]),t(e)]}}var c=[function(){return[[0]]},function(t,e){return[[e[0]],[t[0][0]]]}];function f(t,e,r,n,i,a,o,s){return function(l,u){switch(l.length){case 0:return t(l,u);case 1:return e(l,u);case 2:return r(l,u);case 3:return n(l,u);case 4:return i(l,u);case 5:return a(l,u)}var c=o[l.length];return c||(c=o[l.length]=s(l.length)),c(l,u)}}!function(){for(;c.length<6;)c.push(i(c.length));t.exports=f.apply(void 0,c.concat([c,i]));for(var e=0;e<6;++e)t.exports[e]=c[e]}()},3250:function(t,e,r){"use strict";var n=r(5250),i=r(8210),a=r(3012),o=r(8545);function s(t,e,r,n){return function(r,i,a){var o=t(t(e(i[1],a[0]),e(-a[1],i[0])),t(e(r[1],i[0]),e(-i[1],r[0]))),s=t(e(r[1],a[0]),e(-a[1],r[0])),l=n(o,s);return l[l.length-1]}}function l(t,e,r,n){return function(i,a,o,s){var l=t(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2])))),u=t(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2])))),c=n(l,u);return c[c.length-1]}}function u(t,e,r,n){return function(i,a,o,s,l){var u=t(t(t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),o[2]),t(r(t(e(o[1],l[0]),e(-l[1],o[0])),-s[2]),r(t(e(o[1],s[0]),e(-s[1],o[0])),l[2]))),a[3]),t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),r(t(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),-o[3]),r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),s[3]))),t(r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),-l[3]),t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),r(t(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),i[3]),r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-s[2]),r(t(e(i[1],s[0]),e(-s[1],i[0])),l[2]))),-a[3])))),t(t(r(t(r(t(e(a[1],l[0]),e(-l[1],a[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),l[2]))),s[3]),t(r(t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2]))),-l[3]),r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),a[2]),t(r(t(e(a[1],s[0]),e(-s[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),s[2]))),i[3]))),t(r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),-a[3]),t(r(t(r(t(e(a[1],s[0]),e(-s[1],a[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),s[2]))),o[3]),r(t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2]))),-s[3]))))),c=t(t(t(r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),o[2]),t(r(t(e(o[1],l[0]),e(-l[1],o[0])),-s[2]),r(t(e(o[1],s[0]),e(-s[1],o[0])),l[2]))),i[3]),r(t(r(t(e(s[1],l[0]),e(-l[1],s[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-s[2]),r(t(e(i[1],s[0]),e(-s[1],i[0])),l[2]))),-o[3])),t(r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),l[2]))),s[3]),r(t(r(t(e(o[1],s[0]),e(-s[1],o[0])),i[2]),t(r(t(e(i[1],s[0]),e(-s[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),s[2]))),-l[3]))),t(t(r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),a[2]),t(r(t(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),r(t(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),i[3]),r(t(r(t(e(o[1],l[0]),e(-l[1],o[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-o[2]),r(t(e(i[1],o[0]),e(-o[1],i[0])),l[2]))),-a[3])),t(r(t(r(t(e(a[1],l[0]),e(-l[1],a[0])),i[2]),t(r(t(e(i[1],l[0]),e(-l[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),l[2]))),o[3]),r(t(r(t(e(a[1],o[0]),e(-o[1],a[0])),i[2]),t(r(t(e(i[1],o[0]),e(-o[1],i[0])),-a[2]),r(t(e(i[1],a[0]),e(-a[1],i[0])),o[2]))),-l[3])))),f=n(u,c);return f[f.length-1]}}function c(t){return(3===t?s:4===t?l:u)(i,n,a,o)}var f=c(3),h=c(4),d=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,r){var n,i=(t[1]-r[1])*(e[0]-r[0]),a=(t[0]-r[0])*(e[1]-r[1]),o=i-a;if(i>0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],f=e[2]-n[2],d=r[2]-n[2],p=a*u,v=o*l,g=o*s,m=i*u,y=i*l,x=a*s,b=c*(p-v)+f*(g-m)+d*(y-x),_=7771561172376103e-31*((Math.abs(p)+Math.abs(v))*Math.abs(c)+(Math.abs(g)+Math.abs(m))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(d));return b>_||-b>_?b:h(t,e,r,n)}];function p(t){var e=d[t.length];return e||(e=d[t.length]=c(t.length)),e.apply(void 0,t)}function v(t,e,r,n,i,a,o){return function(e,r,s,l,u){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,u)}for(var c=new Array(arguments.length),f=0;f<arguments.length;++f)c[f]=arguments[f];return t(c)}}!function(){for(;d.length<=5;)d.push(c(d.length));t.exports=v.apply(void 0,[p].concat(d));for(var e=0;e<=5;++e)t.exports[e]=d[e]}()},5382:function(t,e,r){"use strict";var n=r(8210),i=r(3012);t.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var r=[0];if(t.length<e.length)for(var a=0;a<t.length;++a)r=n(r,i(e,t[a]));else for(a=0;a<e.length;++a)r=n(r,i(t,e[a]));return r}},3012:function(t,e,r){"use strict";var n=r(5250),i=r(9362);t.exports=function(t,e){var r=t.length;if(1===r){var a=n(t[0],e);return a[0]?a:[a[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],u=0;n(t[0],e,s),s[0]&&(o[u++]=s[0]);for(var c=1;c<r;++c){n(t[c],e,l);var f=s[1];i(f,l[0],s),s[0]&&(o[u++]=s[0]);var h=l[1],d=s[1],p=h+d,v=d-(p-h);s[1]=p,v&&(o[u++]=v)}return s[1]&&(o[u++]=s[1]),0===u&&(o[u++]=0),o.length=u,o}},1125:function(t,e,r){"use strict";t.exports=function(t,e,r,i){var a=n(t,r,i),o=n(e,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),u=r[i],c=n[i],f=Math.min(u,c);if(Math.max(u,c)<s||l<f)return!1}return!0}(t,e,r,i))};var n=r(3250)[3]},8545:function(t){"use strict";t.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],-e[0]);var i,a,o=new Array(r+n),s=0,l=0,u=0,c=Math.abs,f=t[l],h=c(f),d=-e[u],p=c(d);h<p?(a=f,(l+=1)<r&&(h=c(f=t[l]))):(a=d,(u+=1)<n&&(p=c(d=-e[u]))),l<r&&h<p||u>=n?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=d,(u+=1)<n&&(p=c(d=-e[u])));for(var v,g,m=i+a,y=m-i,x=a-y,b=x,_=m;l<r&&u<n;)h<p?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=d,(u+=1)<n&&(p=c(d=-e[u]))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(y=(m=(i=d)+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v,(u+=1)<n&&(d=-e[u]);return b&&(o[s++]=b),_&&(o[s++]=_),s||(o[s++]=0),o.length=s,o}},8210:function(t){"use strict";t.exports=function(t,e){var r=0|t.length,n=0|e.length;if(1===r&&1===n)return function(t,e){var r=t+e,n=r-t,i=t-(r-n)+(e-n);return i?[i,r]:[r]}(t[0],e[0]);var i,a,o=new Array(r+n),s=0,l=0,u=0,c=Math.abs,f=t[l],h=c(f),d=e[u],p=c(d);h<p?(a=f,(l+=1)<r&&(h=c(f=t[l]))):(a=d,(u+=1)<n&&(p=c(d=e[u]))),l<r&&h<p||u>=n?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=d,(u+=1)<n&&(p=c(d=e[u])));for(var v,g,m=i+a,y=m-i,x=a-y,b=x,_=m;l<r&&u<n;)h<p?(i=f,(l+=1)<r&&(h=c(f=t[l]))):(i=d,(u+=1)<n&&(p=c(d=e[u]))),(x=(a=b)-(y=(m=i+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v;for(;l<r;)(x=(a=b)-(y=(m=(i=f)+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(y=(m=(i=d)+a)-i))&&(o[s++]=x),b=_-((v=_+m)-(g=v-_))+(m-g),_=v,(u+=1)<n&&(d=e[u]);return b&&(o[s++]=b),_&&(o[s++]=_),s||(o[s++]=0),o.length=s,o}},9127:function(t,e,r){"use strict";t.exports=function(t){return i(n(t))};var n=r(6204),i=r(5771)},7765:function(t,e,r){"use strict";t.exports=function(t,e,r,s){if(r=r||0,void 0===s&&(s=function(t){for(var e=t.length,r=0,n=0;n<e;++n)r=0|Math.max(r,t[n].length);return r-1}(t)),0===t.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(t,e){for(var r=t.length,n=i.mallocUint8(r),a=0;a<r;++a)n[a]=t[a]<e|0;return n}(e,+r),u=function(t,e){for(var r=t.length,o=e*(e+1)/2*r|0,s=i.mallocUint32(2*o),l=0,u=0;u<r;++u)for(var c=t[u],f=(e=c.length,0);f<e;++f)for(var h=0;h<f;++h){var d=c[h],p=c[f];s[l++]=0|Math.min(d,p),s[l++]=0|Math.max(d,p)}a(n(s,[l/2|0,2]));var v=2;for(u=2;u<l;u+=2)s[u-2]===s[u]&&s[u-1]===s[u+1]||(s[v++]=s[u],s[v++]=s[u+1]);return n(s,[v/2|0,2])}(t,s),c=function(t,e,r,a){for(var o=t.data,s=t.shape[0],l=i.mallocDouble(s),u=0,c=0;c<s;++c){var f=o[2*c],h=o[2*c+1];if(r[f]!==r[h]){var d=e[f],p=e[h];o[2*u]=f,o[2*u+1]=h,l[u++]=(p-a)/(p-d)}}return t.shape[0]=u,n(l,[u])}(u,e,l,+r),f=function(t,e){var r=i.mallocInt32(2*e),n=t.shape[0],a=t.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=a[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}for(r[2*o+1]=n;++o<e;)r[2*o]=r[2*o+1]=n;return r}(u,0|e.length),h=o(s)(t,u.data,f,l),d=function(t){for(var e=0|t.shape[0],r=t.data,n=new Array(e),i=0;i<e;++i)n[i]=[r[2*i],r[2*i+1]];return n}(u),p=[].slice.call(c.data,0,c.shape[0]);return i.free(l),i.free(u.data),i.free(c.data),i.free(f),{cells:h,vertexIds:d,vertexWeights:p}};var n=r(9618),i=r(1888),a=r(446),o=r(1570)},1570:function(t){"use strict";t.exports=function(t){return e[t]()};var e=[function(){return function(t,e,r,n){for(var i=t.length,a=0;a<i;++a)t[a].length;return[]}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s];if(2===l.length){var u=(i[l[0]]<<0)+(i[l[1]]<<1);if(0===u||3===u)continue;switch(u){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s],u=l.length;if(3===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===c)continue;switch(c){case 0:case 7:break;case 1:o.push([t(n,r,l[0],l[2]),t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0]),t(n,r,l[1],l[2])]);break;case 3:o.push([t(n,r,l[0],l[2]),t(n,r,l[1],l[2])]);break;case 4:o.push([t(n,r,l[2],l[1]),t(n,r,l[2],l[0])]);break;case 5:o.push([t(n,r,l[2],l[1]),t(n,r,l[0],l[1])]);break;case 6:o.push([t(n,r,l[1],l[0]),t(n,r,l[2],l[0])])}}else if(2===u){var c;if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1))||3===c)continue;switch(c){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}},function(){function t(t,e,r,n){for(var i=0|Math.min(r,n),a=0|Math.max(r,n),o=t[2*i],s=t[2*i+1];o<s;){var l=o+s>>1,u=e[2*l+1];if(u===a)return l;a<u?s=l:o=l+1}return o}return function(e,r,n,i){for(var a=e.length,o=[],s=0;s<a;++s){var l=e[s],u=l.length;if(4===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2)+(i[l[3]]<<3))||15===c)continue;switch(c){case 0:case 15:break;case 1:o.push([t(n,r,l[0],l[1]),t(n,r,l[0],l[2]),t(n,r,l[0],l[3])]);break;case 2:o.push([t(n,r,l[1],l[2]),t(n,r,l[1],l[0]),t(n,r,l[1],l[3])]);break;case 3:o.push([t(n,r,l[1],l[2]),t(n,r,l[0],l[2]),t(n,r,l[0],l[3])],[t(n,r,l[1],l[3]),t(n,r,l[1],l[2]),t(n,r,l[0],l[3])]);break;case 4:o.push([t(n,r,l[2],l[0]),t(n,r,l[2],l[1]),t(n,r,l[2],l[3])]);break;case 5:o.push([t(n,r,l[0],l[1]),t(n,r,l[2],l[1]),t(n,r,l[0],l[3])],[t(n,r,l[2],l[1]),t(n,r,l[2],l[3]),t(n,r,l[0],l[3])]);break;case 6:o.push([t(n,r,l[2],l[0]),t(n,r,l[1],l[0]),t(n,r,l[1],l[3])],[t(n,r,l[2],l[3]),t(n,r,l[2],l[0]),t(n,r,l[1],l[3])]);break;case 7:o.push([t(n,r,l[0],l[3]),t(n,r,l[1],l[3]),t(n,r,l[2],l[3])]);break;case 8:o.push([t(n,r,l[3],l[1]),t(n,r,l[3],l[0]),t(n,r,l[3],l[2])]);break;case 9:o.push([t(n,r,l[3],l[1]),t(n,r,l[0],l[1]),t(n,r,l[0],l[2])],[t(n,r,l[3],l[2]),t(n,r,l[3],l[1]),t(n,r,l[0],l[2])]);break;case 10:o.push([t(n,r,l[1],l[0]),t(n,r,l[3],l[0]),t(n,r,l[1],l[2])],[t(n,r,l[3],l[0]),t(n,r,l[3],l[2]),t(n,r,l[1],l[2])]);break;case 11:o.push([t(n,r,l[1],l[2]),t(n,r,l[0],l[2]),t(n,r,l[3],l[2])]);break;case 12:o.push([t(n,r,l[3],l[0]),t(n,r,l[2],l[0]),t(n,r,l[2],l[1])],[t(n,r,l[3],l[1]),t(n,r,l[3],l[0]),t(n,r,l[2],l[1])]);break;case 13:o.push([t(n,r,l[0],l[1]),t(n,r,l[2],l[1]),t(n,r,l[3],l[1])]);break;case 14:o.push([t(n,r,l[2],l[0]),t(n,r,l[1],l[0]),t(n,r,l[3],l[0])])}}else if(3===u){if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1)+(i[l[2]]<<2))||7===c)continue;switch(c){case 0:case 7:break;case 1:o.push([t(n,r,l[0],l[2]),t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0]),t(n,r,l[1],l[2])]);break;case 3:o.push([t(n,r,l[0],l[2]),t(n,r,l[1],l[2])]);break;case 4:o.push([t(n,r,l[2],l[1]),t(n,r,l[2],l[0])]);break;case 5:o.push([t(n,r,l[2],l[1]),t(n,r,l[0],l[1])]);break;case 6:o.push([t(n,r,l[1],l[0]),t(n,r,l[2],l[0])])}}else if(2===u){var c;if(0==(c=(i[l[0]]<<0)+(i[l[1]]<<1))||3===c)continue;switch(c){case 0:case 3:break;case 1:o.push([t(n,r,l[0],l[1])]);break;case 2:o.push([t(n,r,l[1],l[0])])}}}return o}}]},6803:function(t,e,r){"use strict";r(8828),r(1755);function n(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),u=i(e[0],e[1]);return(s=i(l,t[2])-i(u,e[2]))||i(l+t[2],a)-i(u+e[2],o);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=c[h]-f[h])return n;return 0}}e.Fw=n},3105:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<<i&255}}(n),e.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),u=i(e[0],e[1]);return(s=i(l,t[2])-i(u,e[2]))||i(l+t[2],a)-i(u+e[2],o);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h<r;++h)if(n=c[h]-f[h])return n;return 0}}function o(t,e){return a(t[0],e[0])}function s(t,e){if(e){for(var r=t.length,n=new Array(r),i=0;i<r;++i)n[i]=[t[i],e[i]];for(n.sort(o),i=0;i<r;++i)t[i]=n[i][0],e[i]=n[i][1];return t}return t.sort(a),t}function l(t){if(0===t.length)return[];for(var e=1,r=t.length,n=1;n<r;++n){var i=t[n];if(a(i,t[n-1])){if(n===e){e++;continue}t[e++]=i}}return t.length=e,t}function u(t,e){for(var r=0,n=t.length-1,i=-1;r<=n;){var o=r+n>>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function c(t,e){for(var r=new Array(t.length),i=0,o=r.length;i<o;++i)r[i]=[];for(var s=[],l=(i=0,e.length);i<l;++i)for(var c=e[i],f=c.length,h=1,d=1<<f;h<d;++h){s.length=n.popCount(h);for(var p=0,v=0;v<f;++v)h&1<<v&&(s[p++]=c[v]);var g=u(t,s);if(!(g<0))for(;r[g++].push(i),!(g>=t.length||0!==a(t[g],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<<e+1)-1,a=0;a<t.length;++a)for(var o=t[a],l=i;l<1<<o.length;l=n.nextCombination(l)){for(var u=new Array(e+1),c=0,f=0;f<o.length;++f)l&1<<f&&(u[c++]=o[f]);r.push(u)}return s(r)}e.dimension=function(t){for(var e=0,r=Math.max,n=0,i=t.length;n<i;++n)e=r(e,t[n].length);return e-1},e.countVertices=function(t){for(var e=-1,r=Math.max,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)e=r(e,a[o]);return e+1},e.cloneCells=function(t){for(var e=new Array(t.length),r=0,n=t.length;r<n;++r)e[r]=t[r].slice(0);return e},e.compareCells=a,e.normalize=s,e.unique=l,e.findCell=u,e.incidence=c,e.dual=function(t,e){if(!e)return c(l(f(t,0)),t);for(var r=new Array(e),n=0;n<e;++n)r[n]=[];n=0;for(var i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length;o<s;++o)r[a[o]].push(n);return r},e.explode=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0|i.length,o=1,l=1<<a;o<l;++o){for(var u=[],c=0;c<a;++c)o>>>c&1&&u.push(i[c]);e.push(u)}return s(e)},e.skeleton=f,e.boundary=function(t){for(var e=[],r=0,n=t.length;r<n;++r)for(var i=t[r],a=0,o=i.length;a<o;++a){for(var l=new Array(i.length-1),u=0,c=0;u<o;++u)u!==a&&(l[c++]=i[u]);e.push(l)}return s(e)},e.connectedComponents=function(t,e){return e?function(t,e){for(var r=new i(e),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var s=o+1;s<a.length;++s)r.link(a[o],a[s]);var l=[],u=r.ranks;for(n=0;n<u.length;++n)u[n]=-1;for(n=0;n<t.length;++n){var c=r.find(t[n][0]);u[c]<0?(u[c]=l.length,l.push([t[n].slice(0)])):l[u[c]].push(t[n].slice(0))}return l}(t,e):function(t){for(var e=l(s(f(t,0))),r=new i(e.length),n=0;n<t.length;++n)for(var a=t[n],o=0;o<a.length;++o)for(var c=u(e,[a[o]]),h=o+1;h<a.length;++h)r.link(c,u(e,[a[h]]));var d=[],p=r.ranks;for(n=0;n<p.length;++n)p[n]=-1;for(n=0;n<t.length;++n){var v=r.find(u(e,[t[n][0]]));p[v]<0?(p[v]=d.length,d.push([t[n].slice(0)])):d[p[v]].push(t[n].slice(0))}return d}(t)}},4623:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=e,e.prototype.length=function(){return this.roots.length},e.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},e.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var r=e[t];e[t]=e[r],t=r}return t},e.prototype.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},5878:function(t,e,r){"use strict";t.exports=function(t,e,r){for(var a=e.length,o=t.length,s=new Array(a),l=new Array(a),u=new Array(a),c=new Array(a),f=0;f<a;++f)s[f]=l[f]=-1,u[f]=1/0,c[f]=!1;for(f=0;f<o;++f){var h=t[f];if(2!==h.length)throw new Error("Input must be a graph");var d=h[1],p=h[0];-1!==l[p]?l[p]=-2:l[p]=d,-1!==s[d]?s[d]=-2:s[d]=p}function v(t){if(c[t])return 1/0;var r,i,a,o=s[t],u=l[t];return o<0||u<0?1/0:(r=e[t],i=e[o],a=e[u],Math.abs(n(r,i,a))/Math.sqrt(Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)))}function g(t,e){var r=T[t],n=T[e];T[t]=n,T[e]=r,A[r]=e,A[n]=t}function m(t){return u[T[t]]}function y(t){return 1&t?t-1>>1:(t>>1)-1}function x(t){for(var e=m(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<k){var o=m(n);o<r&&(a=n,r=o)}if(i<k&&m(i)<r&&(a=i),a===t)return t;g(t,a),t=a}}function b(t){for(var e=m(t);t>0;){var r=y(t);if(!(r>=0&&e<m(r)))return t;g(t,r),t=r}}function _(){if(k>0){var t=T[0];return g(0,k-1),k-=1,x(0),t}return-1}function w(t,e){var r=T[t];return u[r]===e?t:(u[r]=-1/0,b(t),_(),u[r]=e,b((k+=1)-1))}function M(t){if(!c[t]){c[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],v(e)),A[r]>=0&&w(A[r],v(r))}}var T=[],A=new Array(a);for(f=0;f<a;++f)(u[f]=v(f))<1/0?(A[f]=T.length,T.push(f)):A[f]=-1;var k=T.length;for(f=k>>1;f>=0;--f)x(f);for(;;){var L=_();if(L<0||u[L]>r)break;M(L)}var S=[];for(f=0;f<a;++f)c[f]||(A[f]=S.length,S.push(e[f].slice()));function E(t,e){if(t[e]<0)return e;var r=e,n=e;do{var i=t[n];if(!c[n]||i<0||i===n)break;if(i=t[n=i],!c[n]||i<0||i===n)break;n=i,r=t[r]}while(r!==n);for(var a=e;a!==n;a=t[a])t[a]=n;return n}S.length;var C=[];return t.forEach((function(t){var e=E(s,t[0]),r=E(l,t[1]);if(e>=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:S,edges:C}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){var r,a,o,s;if(e[0][0]<e[1][0])r=e[0],a=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]<t[1][0])o=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),u=n(r,a,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,a),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return a[0]-s[0]};var n=r(3250);function i(t,e){var r,i,a,o;if(e[0][0]<e[1][0])r=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),u=Math.min(e[0][1],e[1][1]),c=Math.max(e[0][1],e[1][1]);return l<u?l-u:s>c?s-c:l-c}r=e[1],i=e[0]}t[0][1]<t[1][1]?(a=t[0],o=t[1]):(a=t[1],o=t[0]);var f=n(i,r,a);return f||(f=n(i,r,o))||o-i}},4209:function(t,e,r){"use strict";t.exports=function(t){for(var e=t.length,r=2*e,n=new Array(r),a=0;a<e;++a){var l=t[a],u=l[0][0]<l[1][0];n[2*a]=new f(l[0][0],l,u,a),n[2*a+1]=new f(l[1][0],l,!u,a)}n.sort((function(t,e){var r=t.x-e.x;return r||(r=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1])}));var h=i(o),d=[],p=[],v=[];for(a=0;a<r;){for(var g=n[a].x,m=[];a<r;){var y=n[a];if(y.x!==g)break;a+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(m.push(new c(y.segment[0][1],y.index,!0,!0)),m.push(new c(y.segment[1][1],y.index,!1,!1))):(m.push(new c(y.segment[1][1],y.index,!0,!1)),m.push(new c(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}d.push(h.root),p.push(g),v.push(m)}return new s(d,p,v)};var n=r(2478),i=r(3840),a=r(3250),o=r(1303);function s(t,e,r){this.slabs=t,this.coordinates=e,this.horizontal=r}function l(t,e){return t.y-e}function u(t,e){for(var r=null;t;){var n,i,o=t.key;o[0][0]<o[1][0]?(n=o[0],i=o[1]):(n=o[1],i=o[0]);var s=a(n,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=u(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=u(t.right,e))return l;t=t.left}}return r}function c(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=u(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var c=u(this.slabs[e-1],t);c&&(s?o(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h<f.length){var d=f[h];if(t[1]===d.y){if(d.closed)return d.index;for(;h<f.length-1&&f[h+1].y===t[1];)if((d=f[h+=1]).closed)return d.index;if(d.y===t[1]&&!d.start){if((h+=1)>=f.length)return i;d=f[h]}}if(d.start)if(s){var p=a(s[0],s[1],[t[0],d.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=d.index)}else i=d.index;else d.y!==t[1]&&(i=d.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l<o;++l)s[l]=i*t[l]+a*r[l];return s}t.exports=function(t,e){for(var r=[],n=[],i=a(t[t.length-1],e),s=t[t.length-1],l=t[0],u=0;u<t.length;++u,s=l){var c=a(l=t[u],e);if(i<0&&c>0||i>0&&c<0){var f=o(s,c,l,i);r.push(f),n.push(f.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=c}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var u=a(s=t[l],e);(n<0&&u>0||n>0&&u<0)&&r.push(o(i,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},t.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l<t.length;++l,i=s){var u=a(s=t[l],e);(n<0&&u>0||n>0&&u<0)&&r.push(o(i,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(t){return function(t,e){var r,n,o,s,l,u,c,f,h,d=1,p=t.length,v="";for(n=0;n<p;n++)if("string"==typeof t[n])v+=t[n];else if("object"==typeof t[n]){if((s=t[n]).keys)for(r=e[d],o=0;o<s.keys.length;o++){if(null==r)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));r=r[s.keys[o]]}else r=s.param_no?e[s.param_no]:e[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(a("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(f=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?h="":(h=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(h+r).length,l=s.width&&c>0?u.repeat(c):"",v+=s.align?h+r+l:"0"===u?h+l+r:l+h+r)}return v}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],a=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){a|=1;var o=[],l=e[2],u=[];if(null===(u=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else{if(null===(u=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}e[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function o(t,e){return a.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=a,e.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(e,r,e,t))||(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;s<n;++s)a[s]=[r[s]],o[s]=[s];return{positions:a,cells:o}}(t,e);var r=t.order.join()+"-"+t.dtype,s=o[r];return e=+e||0,s||(s=o[r]=function(t,e){var r=t.length+"d",i=a[r];if(i)return i(n,t,e)}(t.order,t.dtype)),s(t,e)};var n=r(2640),i=r(781),a={"2d":function(t,e,r){var n=t({order:e,scalarArguments:3,getters:"generic"===r?[0]:void 0,phase:function(t,e,r,n){return t>n|0},vertex:function(t,e,r,n,i,a,o,s,l,u,c,f,h){var d=(o<<0)+(s<<1)+(l<<2)+(u<<3)|0;if(0!==d&&15!==d)switch(d){case 0:case 15:c.push([t-.5,e-.5]);break;case 1:c.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:c.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:c.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:c.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:c.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:c.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:c.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:c.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:c.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:c.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:c.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:c.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:c.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:c.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},o={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){n=n||{};var a=o[e];a||(a=o[e]={" ":{data:new Float32Array(0),shape:.2}});var s=a[r];if(!s)if(r.length<=1||!/\d/.test(r))s=a[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o<e.length;++o)for(var s=e[o],l=0;l<3;++l){var u=r[s[l]];n[i++]=u[0],n[i++]=u[1]+1.4,a=Math.max(u[0],a)}return{data:n,shape:a}}(i(r,{triangles:!0,font:e,textAlign:n.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var l=r.split(/(\d|\s)/),u=new Array(l.length),c=0,f=0,h=0;h<l.length;++h)u[h]=t(e,l[h]),c+=u[h].data.length,f+=u[h].shape,h>0&&(f+=.02);var d=new Float32Array(c),p=0,v=-.5*f;for(h=0;h<u.length;++h){for(var g=u[h].data,m=0;m<g.length;m+=2)d[p++]=g[m]+v,d[p++]=g[m+1];v+=u[h].shape+.02}s=a[r]={data:d,shape:f}}return s};var i=r(4359),a=window||n.global||{},o=a.__TEXT_CACHE||{};a.__TEXT_CACHE={}},665:function(t,e,r){"use strict";var n=r(3202);t.exports=o;var i=96;function a(t,e){var r=n(getComputedStyle(t).getPropertyValue(e));return r[0]*o(r[1],t)}function o(t,e){switch(e=e||document.body,t=(t||"px").trim().toLowerCase(),e!==window&&e!==document||(e=document.body),t){case"%":return e.clientHeight/100;case"ch":case"ex":return function(t,e){var r=document.createElement("div");r.style["font-size"]="128"+t,e.appendChild(r);var n=a(r,"font-size")/128;return e.removeChild(r),n}(t,e);case"em":return a(e,"font-size");case"rem":return a(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},7261:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.up||[0,1,0],n=t.right||f(r),i=t.radius||1,a=t.theta||0,c=t.phi||0;if(e=[].slice.call(e,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),"eye"in t){var d=t.eye,p=[d[0]-e[0],d[1]-e[1],d[2]-e[2]];o(n,p,r),u(n[0],n[1],n[2])<1e-6?n=f(r):s(n,n),i=u(p[0],p[1],p[2]);var v=l(r,p)/i,g=l(n,p)/i;c=Math.acos(v),a=Math.acos(g)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,c)};var n=r(9215),i=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function u(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var d=h.prototype;d.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},d.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},d.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),c=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,c+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(c);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],v=this.computedAngle[1],g=Math.cos(p),m=Math.sin(p),y=Math.cos(v),x=Math.sin(v),b=this.computedCenter,_=g*y,w=m*y,M=x,T=-g*x,A=-m*x,k=y,L=this.computedEye,S=this.computedMatrix;for(a=0;a<3;++a){var E=_*r[a]+w*h[a]+M*e[a];S[4*a+1]=T*r[a]+A*h[a]+k*e[a],S[4*a+2]=E,S[4*a+3]=0}var C=S[1],O=S[5],R=S[9],P=S[2],D=S[6],I=S[10],z=O*I-R*D,N=R*P-C*I,F=C*D-O*P,B=u(z,N,F);for(z/=B,N/=B,F/=B,S[0]=z,S[4]=N,S[8]=F,a=0;a<3;++a)L[a]=b[a]+S[2+4*a]*d;for(a=0;a<3;++a){c=0;for(var j=0;j<3;++j)c+=S[a+4*j]*L[j];S[12+a]=-c}S[15]=1},d.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var p=[0,0,0];d.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)i[4*u]=o[u],i[4*u+1]=s[u],i[4*u+2]=l[u];for(a(i,i,n,p),u=0;u<3;++u)o[u]=i[4*u],s[u]=i[4*u+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},d.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=u(a,o,s);a/=l,o/=l,s/=l;var c=i[0],f=i[4],h=i[8],d=c*a+f*o+h*s,p=u(c-=a*d,f-=o*d,h-=s*d),v=(c/=p)*e+a*r,g=(f/=p)*e+o*r,m=(h/=p)*e+s*r;this.center.move(t,v,g,m);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},d.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},d.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),d=Math.abs(l),p=Math.abs(f),v=Math.max(h,d,p);h===v?(s=s<0?-1:1,l=f=0):p===v?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var g=u(s,l,f);s/=g,l/=g,f/=g}var m,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,M=u(x-=s*w,b-=l*w,_-=f*w),T=l*(_/=M)-f*(b/=M),A=f*(x/=M)-s*_,k=s*b-l*x,L=u(T,A,k);if(T/=L,A/=L,k/=L,this.center.jump(t,Y,G,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var S=e[1],E=e[5],C=e[9],O=S*x+E*b+C*_,R=S*T+E*A+C*k;m=z<0?-Math.PI/2:Math.PI/2,y=Math.atan2(R,O)}else{var P=e[2],D=e[6],I=e[10],z=P*s+D*l+I*f,N=P*x+D*b+I*_,F=P*T+D*A+I*k;m=Math.asin(c(z)),y=Math.atan2(F,N)}this.angle.jump(t,y,m),this.recalcMatrix(t);var B=e[2],j=e[6],U=e[10],H=this.computedMatrix;i(H,e);var V=H[15],Y=H[12]/V,G=H[13]/V,W=H[14]/V,q=Math.exp(this.computedRadius[0]);this.center.jump(t,Y-B*q,G-j*q,W-U*q)},d.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},d.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},d.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},d.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},d.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=u(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],d=u(l,f,h);if(!(d<1e-6)){l/=d,f/=d,h/=d;var p=this.computedRight,v=p[0],g=p[1],m=p[2],y=i*v+a*g+o*m,x=u(v-=y*i,g-=y*a,m-=y*o);if(!(x<.01&&(x=u(v=a*h-o*f,g=o*l-i*h,m=i*f-a*l))<1e-6)){v/=x,g/=x,m/=x,this.up.set(t,i,a,o),this.right.set(t,v,g,m),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var b=a*m-o*g,_=o*v-i*m,w=i*g-a*v,M=u(b,_,w),T=i*l+a*f+o*h,A=v*l+g*f+m*h,k=(b/=M)*l+(_/=M)*f+(w/=M)*h,L=Math.asin(c(T)),S=Math.atan2(k,A),E=this.angle._state,C=E[E.length-1],O=E[E.length-2];C%=2*Math.PI;var R=Math.abs(C+2*Math.PI-S),P=Math.abs(C-S),D=Math.abs(C-2*Math.PI-S);R<P&&(C+=2*Math.PI),D<P&&(C-=2*Math.PI),this.angle.jump(this.angle.lastT(),C,O),this.angle.set(t,S,L)}}}}},5250:function(t){"use strict";t.exports=function(t,r,n){var i=t*r,a=e*t,o=a-(a-t),s=t-o,l=e*r,u=l-(l-r),c=r-u,f=s*c-(i-o*u-s*u-o*c);return n?(n[0]=f,n[1]=i,n):[f,i]};var e=+(Math.pow(2,27)+1)},9362:function(t){"use strict";t.exports=function(t,e,r){var n=t+e,i=n-t,a=e-i,o=t-(n-i);return r?(r[0]=o+a,r[1]=n,r):[o+a,n]}},1888:function(t,e,r){"use strict";var n=r(8828),i=r(1338),a=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,u=r.g.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);c[r].push(t)}}function d(t){t=n.nextPow2(t);var e=n.log2(t),r=c[e];return r.length>0?r.pop():new ArrayBuffer(t)}function p(t){return new Uint8Array(d(t),0,t)}function v(t){return new Uint16Array(d(2*t),0,t)}function g(t){return new Uint32Array(d(4*t),0,t)}function m(t){return new Int8Array(d(t),0,t)}function y(t){return new Int16Array(d(2*t),0,t)}function x(t){return new Int32Array(d(4*t),0,t)}function b(t){return new Float32Array(d(4*t),0,t)}function _(t){return new Float64Array(d(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(d(t),0,t):p(t)}function M(t){return s?new BigUint64Array(d(8*t),0,t):null}function T(t){return l?new BigInt64Array(d(8*t),0,t):null}function A(t){return new DataView(d(t),0,t)}function k(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}e.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);c[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){f[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return d(t);switch(e){case"uint8":return p(t);case"uint16":return v(t);case"uint32":return g(t);case"int8":return m(t);case"int16":return y(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return T(t);case"biguint64":return M(t);case"buffer":return k(t);case"data":case"dataview":return A(t);default:return null}return null},e.mallocArrayBuffer=d,e.mallocUint8=p,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=m,e.mallocInt16=y,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=M,e.mallocBigInt64=T,e.mallocDataView=A,e.mallocBuffer=k,e.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=e;var r=e.prototype;Object.defineProperty(r,"length",{get:function(){return this.roots.length}}),r.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},r.find=function(t){for(var e=t,r=this.roots;r[t]!==t;)t=r[t];for(;r[e]!==t;){var n=r[e];r[e]=t,e=n}return t},r.link=function(t,e){var r=this.find(t),n=this.find(e);if(r!==n){var i=this.ranks,a=this.roots,o=i[r],s=i[n];o<s?a[r]=n:s<o?a[n]=r:(a[n]=r,++i[r])}}},1682:function(t){"use strict";t.exports=function(t,e,r){return 0===t.length?t:e?(r||t.sort(e),function(t,e){for(var r=1,n=t.length,i=t[0],a=t[0],o=1;o<n;++o)if(a=i,e(i=t[o],a)){if(o===r){r++;continue}t[r++]=i}return t.length=r,t}(t,e)):(r||t.sort(),function(t){for(var e=1,r=t.length,n=t[0],i=t[0],a=1;a<r;++a,i=n)if(i=n,(n=t[a])!==i){if(a===e){e++;continue}t[e++]=n}return t.length=e,t}(t))}},4359:function(t,e,r){"use strict";t.exports=function(t,e){return"object"==typeof e&&null!==e||(e={}),n(t,e.canvas||i,e.context||a,e)};var n=r(7718),i=null,a=null;"undefined"!=typeof document&&((i=document.createElement("canvas")).width=8192,i.height=1024,a=i.getContext("2d"))},7718:function(t,e,r){t.exports=function(t,e,r,n){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return n&&(n.size&&n.size>0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(t,e,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\<br\>/g,"\n"):r.replace(/\<br\>/g," ");var s="",l=[];for(M=0;M<r.length;++M)l[M]=s;!0===o.bolds&&(l=x(u,c,r,l)),!0===o.italics&&(l=x(f,h,r,l)),!0===o.superscripts&&(l=x(d,v,r,l)),!0===o.subscripts&&(l=x(g,y,r,l));var b=[],_="";for(M=0;M<r.length;++M)null!==l[M]&&(_+=r[M],b.push(l[M]));var w,M,T,A,k,L=_.split("\n"),S=L.length,E=Math.round(a*n),C=n,O=2*n,R=0,P=S*E+O;t.height<P&&(t.height=P),e.fillStyle="#000",e.fillRect(0,0,t.width,t.height),e.fillStyle="#fff";var D=0,I="";function z(){if(""!==I){var t=e.measureText(I).width;e.fillText(I,C+T,O+A),T+=t}}function N(){return Math.round(k)+"px "}function F(t,r){var n=""+e.font;if(!0===o.subscripts){var i=t.indexOf(m),a=r.indexOf(m),s=i>-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(N(),"?px "),k*=Math.pow(.75,l-s),n=n.replace("?px ",N())),A+=.25*E*(l-s)}if(!0===o.superscripts){var u=t.indexOf(p),f=r.indexOf(p),d=u>-1?parseInt(t[1+u]):0,v=f>-1?parseInt(r[1+f]):0;d!==v&&(n=n.replace(N(),"?px "),k*=Math.pow(.75,v-d),n=n.replace("?px ",N())),A-=.25*E*(v-d)}if(!0===o.bolds){var g=t.indexOf(c)>-1,y=r.indexOf(c)>-1;!g&&y&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(h)>-1,b=r.indexOf(h)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(w=0;w<S;++w){var B=L[w]+"\n";for(T=0,A=w*E,k=n,I="",M=0;M<B.length;++M){var j=M+D<b.length?b[M+D]:b[b.length-1];s===j?I+=B[M]:(z(),I=B[M],void 0!==j&&(F(s,j),s=j))}z(),D+=B.length;var U=0|Math.round(T+2*C);R<U&&(R=U)}var H=R,V=O+E*S;return i(e.getImageData(0,0,H,V).data,[V,H,4]).pick(-1,-1,0).transpose(1,0)}(e,r,t,a,o,s),n,a)},t.exports.processPixels=w;var n=r(3711),i=r(9618),a=r(5878),o=r(332),s=r(2538),l=r(2095),u="b",c="b|",f="i",h="i|",d="sup",p="+",v="+1",g="sub",m="-",y="-1";function x(t,e,r,n){for(var i="<"+t+">",a="</"+t+">",o=i.length,s=a.length,l=e[0]===p||e[0]===m,u=0,c=-s;u>-1&&-1!==(u=r.indexOf(i,u))&&-1!==(c=r.indexOf(a,u+o))&&!(c<=u);){for(var f=u;f<c+s;++f)if(f<u+o||f>=c)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var d=u+o,v=r.substr(d,c-d).indexOf(i);u=-1!==v?v:c+s}return n}function b(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function _(t,e,r,n){var i=b(t,n),a=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l<s;++l)for(var u=t[l],c=0;c<2;++c)a[c]=0|Math.min(a[c],u[c]),o[c]=0|Math.max(o[c],u[c]);var f=0;switch(n){case"center":f=-.5*(a[0]+o[0]);break;case"right":case"end":f=-o[0];break;case"left":case"start":f=-a[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+n+"'")}var h=0;switch(i){case"hanging":case"top":h=-a[1];break;case"middle":h=-.5*(a[1]+o[1]);break;case"alphabetic":case"ideographic":h=-3*r;break;case"bottom":h=-o[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+i+"'")}var d=1/r;return"lineHeight"in e?d*=+e.lineHeight:"width"in e?d=e.width/(o[0]-a[0]):"height"in e&&(d=e.height/(o[1]-a[1])),t.map((function(t){return[d*(t[0]+f),d*(t[1]+h)]}))}(i.positions,e,r),u=i.edges,c="ccw"===e.orientation;if(o(a,u),e.polygons||e.polygon||e.polyline){for(var f=l(u,a),h=new Array(f.length),d=0;d<f.length;++d){for(var p=f[d],v=new Array(p.length),g=0;g<p.length;++g){for(var m=p[g],y=new Array(m.length),x=0;x<m.length;++x)y[x]=a[m[x]].slice();c&&y.reverse(),v[g]=y}h[d]=v}return h}return e.triangles||e.triangulate||e.triangle?{cells:s(a,u,{delaunay:!1,exterior:!1,interior:!0}),positions:a}:{edges:u,positions:a}}function w(t,e,r){try{return _(t,e,r,!0)}catch(t){}try{return _(t,e,r,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},1538:function(t){!function(){"use strict";if("undefined"==typeof ses||!ses.ok||ses.ok()){"undefined"!=typeof ses&&(ses.weakMapPermitHostObjects=g);var e=!1;if("function"==typeof WeakMap){var r=WeakMap;if("undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var n=new r,i=Object.freeze({});if(n.set(i,1),1===n.get(i))return void(t.exports=WeakMap);e=!0}}Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l="weakmap:",u=l+"ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var c=new ArrayBuffer(25),f=new Uint8Array(c);crypto.getRandomValues(f),u=l+"rand:"+Array.prototype.map.call(f,(function(t){return(t%36).toString(36)})).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(t){return a(t).filter(m)}}),"getPropertyNames"in Object){var h=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(t){return h(t).filter(m)}})}!function(){var t=Object.freeze;o(Object,"freeze",{value:function(e){return y(e),t(e)}});var e=Object.seal;o(Object,"seal",{value:function(t){return y(t),e(t)}});var r=Object.preventExtensions;o(Object,"preventExtensions",{value:function(t){return y(t),r(t)}})}();var d=!1,p=0,v=function(){this instanceof v||b();var t=[],e=[],r=p++;return Object.create(v.prototype,{get___:{value:x((function(n,i){var a,o=y(n);return o?r in o?o[r]:i:(a=t.indexOf(n))>=0?e[a]:i}))},has___:{value:x((function(e){var n=y(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:x((function(n,i){var a,o=y(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=y(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))}))}})};v.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof v||b();var t,n=new r,i=void 0,a=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new v),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new v),i.set___(t,e)}else n.set(t,e);return this},Object.create(v.prototype,{get___:{value:x((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:x((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:x(t)},delete___:{value:x((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:x((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=v.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=v)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function y(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[u];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,u,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){d||"undefined"==typeof console||(d=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],u=s;n|=0;var c=0,f=s;for(c=0;c<o;++c){var h=e[n]-a,d=e[n+u]-a;h>=0!=d>=0&&i.push(l[0]+.5+.5*(h+d)/(h-d)),n+=f,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function i(t){var n=r[t];if(void 0!==n)return n.exports;var a=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var a=i(1964);t.exports=a}()},5928:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},3428:function(t,e,r){var n,i;(function(){var a={version:"3.8.0"},o=[].slice,s=function(t){return o.call(t)},l=self.document;function u(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var f=this.Element.prototype,h=f.setAttribute,d=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;f.setAttribute=function(t,e){h.call(this,t,e+"")},f.setAttributeNS=function(t,e,r){d.call(this,t,e,r+"")},p.setProperty=function(t,e,r){v.call(this,t,e+"",r)}}function g(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function m(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function x(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}a.ascending=g,a.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},a.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},a.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},a.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},a.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)y(r=+t[a])&&(n+=r);else for(;++a<i;)y(r=+e.call(t,t[a],a))&&(n+=r);return n},a.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)y(r=m(t[a]))?n+=r:--o;else for(;++a<i;)y(r=m(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},a.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},a.median=function(t,e){var r,n=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)y(r=m(t[o]))&&n.push(r);else for(;++o<i;)y(r=m(e.call(t,t[o],o)))&&n.push(r);if(n.length)return a.quantile(n.sort(g),.5)},a.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)y(r=m(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)y(r=m(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(l>1)return o/(l-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=x(g);function _(t){return t.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(t){return x(1===t.length?function(e,r){return g(t(e),r)}:t)},a.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},a.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},a.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},a.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,r=a.min(t,_),n=new Array(r);++e<r;)for(var i,o=-1,s=n[e]=new Array(i);++o<i;)s[o]=t[o][e];return n},a.zip=function(){return a.transpose(arguments)},a.keys=function(t){var e=[];for(var r in t)e.push(r);return e},a.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},a.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},a.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var w=Math.abs;function M(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function T(){this._=Object.create(null)}a.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){for(var e=1;t*e%1;)e*=10;return e}(w(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},a.map=function(t,e){var r=new T;if(t instanceof T)t.forEach((function(t,e){r.set(t,e)}));else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var A="__proto__",k="\0";function L(t){return(t+="")===A||t[0]===k?k+t:t}function S(t){return(t+="")[0]===k?t.slice(1):t}function E(t){return L(t)in this._}function C(t){return(t=L(t))in this._&&delete this._[t]}function O(){var t=[];for(var e in this._)t.push(S(e));return t}function R(){var t=0;for(var e in this._)++t;return t}function P(){for(var t in this._)return!1;return!0}function D(){this._=Object.create(null)}function I(t){return t}function z(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function N(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=F.length;r<n;++r){var i=F[r]+e;if(i in t)return i}}M(T,{has:E,get:function(t){return this._[L(t)]},set:function(t,e){return this._[L(t)]=e},remove:C,keys:O,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:S(e),value:this._[e]});return t},size:R,empty:P,forEach:function(t){for(var e in this._)t.call(this,S(e),this._[e])}}),a.nest=function(){var t,e,r={},n=[],i=[];function o(i,a,s){if(s>=n.length)return e?e.call(r,a):t?a.sort(t):a;for(var l,u,c,f,h=-1,d=a.length,p=n[s++],v=new T;++h<d;)(f=v.get(l=p(u=a[h])))?f.push(u):v.set(l,[u]);return i?(u=i(),c=function(t,e){u.set(t,o(i,e,s))}):(u={},c=function(t,e){u[t]=o(i,e,s)}),v.forEach(c),u}function s(t,e){if(e>=n.length)return t;var r=[],a=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),a?r.sort((function(t,e){return a(t.key,e.key)})):r}return r.map=function(t,e){return o(e,t,0)},r.entries=function(t){return s(o(a.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},a.set=function(t){var e=new D;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},M(D,{has:E,add:function(t){return this._[L(t+="")]=!0,t},remove:C,values:O,size:R,empty:P,forEach:function(t){for(var e in this._)t.call(this,S(e))}}),a.behavior={},a.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=z(t,e,e[r]);return t};var F=["webkit","ms","moz","Moz","o","O"];function B(){}function j(){}function U(t){var e=[],r=new T;function n(){for(var r,n=e,i=-1,a=n.length;++i<a;)(r=n[i].on)&&r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function H(){a.event.preventDefault()}function V(){for(var t,e=a.event;t=e.sourceEvent;)e=t;return e}function Y(t){for(var e=new j,r=0,n=arguments.length;++r<n;)e[arguments[r]]=U(e);return e.of=function(r,n){return function(i){try{var o=i.sourceEvent=a.event;i.target=t,a.event=i,e[i.type].apply(r,n)}finally{a.event=o}}},e}a.dispatch=function(){for(var t=new j,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=U(t);return t},j.prototype.on=function(t,e){var r=t.indexOf("."),n="";if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},a.event=null,a.requote=function(t){return t.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function q(t){return W(t,K),t}var X=function(t,e){return e.querySelector(t)},Z=function(t,e){return e.querySelectorAll(t)},J=function(t,e){var r=t.matches||t[N(t,"matchesSelector")];return J=function(t,e){return r.call(t,e)},J(t,e)};"function"==typeof Sizzle&&(X=function(t,e){return Sizzle(t,e)[0]||null},Z=Sizzle,J=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var K=a.selection.prototype=[];function Q(t){return"function"==typeof t?t:function(){return X(t,this)}}function $(t){return"function"==typeof t?t:function(){return Z(t,this)}}K.select=function(t){var e,r,n,i,a=[];t=Q(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,u=n.length;++l<u;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&"__data__"in i&&(r.__data__=i.__data__)):e.push(null)}return q(a)},K.selectAll=function(t){var e,r,n=[];t=$(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],l=-1,u=o.length;++l<u;)(r=o[l])&&(n.push(e=s(t.call(r,r.__data__,l,i))),e.parentNode=r);return q(n)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rt(t,e){return t=a.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}:function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function nt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+a.requote(t)+"(?:\\s+|$)","g")}function at(t){return(t+"").trim().split(/^|\s+/)}function ot(t,e){var r=(t=at(t).map(st)).length;return"function"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function st(t){var e=it(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute("class")||"";n?(e.lastIndex=0,e.test(i)||r.setAttribute("class",nt(i+" "+t))):r.setAttribute("class",nt(i.replace(e," ")))}}function lt(t,e,r){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function ut(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=a.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(r,t)}}function ft(){var t=this.parentNode;t&&t.removeChild(this)}function ht(t){return{__data__:t}}function dt(t){return function(){return J(this,t)}}function pt(t){return arguments.length||(t=g),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}function vt(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function gt(t){return W(t,mt),t}a.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),r=t;return e>=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(r)?{space:et[r],local:t}:t}},K.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=a.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},K.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=at(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute("class");++i<n;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(ot(e,t[e]));return this}return this.each(ot(t,e))},K.style=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=""),t)this.each(lt(r,t[r],e));return this}if(n<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}r=""}return this.each(lt(t,e,r))},K.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(ut(e,t[e]));return this}return this.each(ut(t,e))},K.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},K.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},K.append=function(t){return t=ct(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},K.insert=function(t,e){return t=ct(t),e=Q(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},K.remove=function(){return this.each(ft)},K.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i<a;)(n=r[i])&&(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,c=r.length,f=Math.min(o,c),h=new Array(c),d=new Array(c),p=new Array(o);if(e){var v,g=new T,m=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(g.has(v=e.call(i,i.__data__,n))?p[n]=i:g.set(v,i),m[n]=v);for(n=-1;++n<c;)(i=g.get(v=e.call(r,a=r[n],n)))?!0!==i&&(h[n]=i,i.__data__=a):d[n]=ht(a),g.set(v,!0);for(n=-1;++n<o;)n in m&&!0!==g.get(m[n])&&(p[n]=t[n])}else{for(n=-1;++n<f;)i=t[n],a=r[n],i?(i.__data__=a,h[n]=i):d[n]=ht(a);for(;n<c;++n)d[n]=ht(r[n]);for(;n<o;++n)p[n]=t[n]}d.update=h,d.parentNode=h.parentNode=p.parentNode=t.parentNode,s.push(d),l.push(h),u.push(p)}var s=gt([]),l=q([]),u=q([]);if("function"==typeof t)for(;++i<a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i<a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return u},l},K.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},K.filter=function(t){var e,r,n,i=[];"function"!=typeof t&&(t=dt(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return q(i)},K.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},K.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},K.each=function(t){return vt(this,(function(e,r,n){t.call(e,e.__data__,r,n)}))},K.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},K.empty=function(){return!this.node()},K.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},K.size=function(){var t=0;return vt(this,(function(){++t})),t};var mt=[];function yt(t,e,r){var n="__on"+t,i=t.indexOf("."),o=bt;i>0&&(t=t.slice(0,i));var l=xt.get(t);function u(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,o=_t),i?e?function(){var i=o(e,s(arguments));u.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:u:e?B:function(){var e,r=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}a.selection.enter=gt,a.selection.enter.prototype=mt,mt.append=K.append,mt.empty=K.empty,mt.node=K.node,mt.call=K.call,mt.size=K.size,mt.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(a=i[u])?(e.push(n[u]=r=t.call(i.parentNode,a.__data__,u,s)),r.__data__=a.__data__):e.push(null)}return q(o)},mt.insert=function(t,e){var r,n,i;return arguments.length<2&&(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&&(i=a,n=0),e>=n&&(n=e+1);!(o=s[n])&&++n<l;);return o}),K.insert.call(this,t,e)},a.select=function(t){var e;return"string"==typeof t?(e=[X(t,l)]).parentNode=l.documentElement:(e=[t]).parentNode=u(t),q([e])},a.selectAll=function(t){var e;return"string"==typeof t?(e=s(Z(t,l))).parentNode=l.documentElement:(e=s(t)).parentNode=null,q([e])},K.on=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=!1),t)this.each(yt(r,t[r],e));return this}if(n<2)return(n=this.node()["__on"+t])&&n._;r=!1}return this.each(yt(t,e,r))};var xt=a.map({mouseenter:"mouseover",mouseleave:"mouseout"});function bt(t,e){return function(r){var n=a.event;a.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{a.event=n}}}function _t(t,e){var r=bt(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}l&&xt.forEach((function(t){"on"+t in l&&xt.remove(t)}));var wt,Mt=0;function Tt(t){var e=".dragsuppress-"+ ++Mt,r="click"+e,n=a.select(c(t)).on("touchmove"+e,H).on("dragstart"+e,H).on("selectstart"+e,H);if(null==wt&&(wt=!("onselectstart"in t)&&N(t.style,"userSelect")),wt){var i=u(t).style,o=i[wt];i[wt]="none"}return function(t){if(n.on(e,null),wt&&(i[wt]=o),t){var a=function(){n.on(r,null)};n.on(r,(function(){H(),a()}),!0),setTimeout(a,0)}}}a.mouse=function(t){return kt(t,V())};var At=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function kt(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();if(At<0){var i=c(t);if(i.scrollX||i.scrollY){var o=(r=a.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();At=!(o.f||o.e),r.remove()}}return At?(n.x=e.pageX,n.y=e.pageY):(n.x=e.clientX,n.y=e.clientY),[(n=n.matrixTransform(t.getScreenCTM().inverse())).x,n.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function Lt(){return a.event.changedTouches[0].identifier}a.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=V().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return kt(t,n)},a.behavior.drag=function(){var t=Y(i,"drag","dragstart","dragend"),e=null,r=o(B,a.mouse,c,"mousemove","mouseup"),n=o(Lt,a.touch,I,"touchmove","touchend");function i(){this.on("mousedown.drag",r).on("touchstart.drag",n)}function o(r,n,i,o,s){return function(){var l,u=this,c=a.event.target.correspondingElement||a.event.target,f=u.parentNode,h=t.of(u,arguments),d=0,p=r(),v=".drag"+(null==p?"":"-"+p),g=a.select(i(c)).on(o+v,(function(){var t,e,r=n(f,p);r&&(t=r[0]-y[0],e=r[1]-y[1],d|=t|e,y=r,h({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e}))})).on(s+v,(function(){n(f,p)&&(g.on(o+v,null).on(s+v,null),m(d),h({type:"dragend"}))})),m=Tt(c),y=n(f,p);l=e?[(l=e.apply(u,arguments)).x-y[0],l.y-y[1]]:[0,0],h({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},a.rebind(i,t,"on")},a.touches=function(t,e){return arguments.length<2&&(e=V().touches),e?s(e).map((function(e){var r=kt(t,e);return r.identifier=e.identifier,r})):[]};var St=1e-6,Et=St*St,Ct=Math.PI,Ot=2*Ct,Rt=Ot-St,Pt=Ct/2,Dt=Ct/180,It=180/Ct;function zt(t){return t>1?Pt:t<-1?-Pt:Math.asin(t)}function Nt(t){return((t=Math.exp(t))+1/t)/2}var Ft=Math.SQRT2;a.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],c=s-i,f=l-a,h=c*c+f*f;if(h<Et)n=Math.log(u/o)/Ft,r=function(t){return[i+t*c,a+t*f,o*Math.exp(Ft*t*n)]};else{var d=Math.sqrt(h),p=(u*u-o*o+4*h)/(2*o*2*d),v=(u*u-o*o-4*h)/(2*u*2*d),g=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(v*v+1)-v);n=(m-g)/Ft,r=function(t){var e,r=t*n,s=Nt(g),l=o/(2*d)*(s*(e=Ft*r+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+l*c,a+l*f,o*s/Nt(Ft*r+g)]}}return r.duration=1e3*n,r},a.behavior.zoom=function(){var t,e,r,n,i,o,s,u,f,h={x:0,y:0,k:1},d=[960,500],p=Ut,v=250,g=0,m="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=Y(w,"zoomstart","zoom","zoomend");function w(t){t.on(m,O).on(jt+".zoom",P).on("dblclick.zoom",D).on(b,R)}function M(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function T(t){h.k=Math.max(p[0],Math.min(p[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function k(t,r,n,i){t.__chart__={x:h.x,y:h.y,k:h.k},T(Math.pow(2,i)),A(e=r,n),t=a.select(t),v>0&&(t=t.transition().duration(v)),t.call(w.event)}function L(){s&&s.domain(o.range().map((function(t){return(t-h.x)/h.k})).map(o.invert)),f&&f.domain(u.range().map((function(t){return(t-h.y)/h.k})).map(u.invert))}function S(t){g++||t({type:"zoomstart"})}function E(t){L(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function C(t){--g||(t({type:"zoomend"}),e=null)}function O(){var t=this,e=_.of(t,arguments),r=0,n=a.select(c(t)).on(y,(function(){r=1,A(a.mouse(t),i),E(e)})).on(x,(function(){n.on(y,null).on(x,null),o(r),C(e)})),i=M(a.mouse(t)),o=Tt(t);Ji.call(t),S(e)}function R(){var t,e=this,r=_.of(e,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],f=a.select(e),d=Tt(e);function p(){var r=a.touches(e);return t=h.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=M(t))})),r}function v(){var t=a.event.target;a.select(t).on(l,g).on(u,y),c.push(t);for(var r=a.event.changedTouches,s=0,f=r.length;s<f;++s)n[r[s].identifier]=null;var d=p(),v=Date.now();if(1===d.length){if(v-i<500){var m=d[0];k(e,m,n[m.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),H()}i=v}else if(d.length>1){m=d[0];var x=d[1],b=m[0]-x[0],_=m[1]-x[1];o=b*b+_*_}}function g(){var s,l,u,c,f=a.touches(e);Ji.call(e);for(var h=0,d=f.length;h<d;++h,c=null)if(u=f[h],c=n[u.identifier]){if(l)break;s=u,l=c}if(c){var p=(p=u[0]-s[0])*p+(p=u[1]-s[1])*p,v=o&&Math.sqrt(p/o);s=[(s[0]+u[0])/2,(s[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],T(v*t)}i=null,A(s,l),E(r)}function y(){if(a.event.touches.length){for(var t=a.event.changedTouches,e=0,i=t.length;e<i;++e)delete n[t[e].identifier];for(var o in n)return void p()}a.selectAll(c).on(s,null),f.on(m,O).on(b,R),d(),C(r)}v(),S(r),f.on(m,null).on(b,v)}function P(){var i=_.of(this,arguments);n?clearTimeout(n):(Ji.call(this),t=M(e=r||a.mouse(this)),S(i)),n=setTimeout((function(){n=null,C(i)}),50),H(),T(Math.pow(2,.002*Bt())*h.k),A(e,t),E(i)}function D(){var t=a.mouse(this),e=Math.log(h.k)/Math.LN2;k(this,t,M(t),a.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return jt||(jt="onwheel"in l?(Bt=function(){return-a.event.deltaY*(a.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Bt=function(){return a.event.wheelDelta},"mousewheel"):(Bt=function(){return-a.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each((function(){var t=_.of(this,arguments),r=h;$i?a.select(this).transition().each("start.zoom",(function(){h=this.__chart__||{x:0,y:0,k:1},S(t)})).tween("zoom:zoom",(function(){var n=d[0],i=d[1],o=e?e[0]:n/2,s=e?e[1]:i/2,l=a.interpolateZoom([(o-h.x)/h.k,(s-h.y)/h.k,n/h.k],[(o-r.x)/r.k,(s-r.y)/r.k,n/r.k]);return function(e){var r=l(e),i=n/r[2];this.__chart__=h={x:o-r[0]*i,y:s-r[1]*i,k:i},E(t)}})).each("interrupt.zoom",(function(){C(t)})).each("end.zoom",(function(){C(t)})):(this.__chart__=h,S(t),E(t),C(t))}))},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},L(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},T(+t),L(),w):h.k},w.scaleExtent=function(t){return arguments.length?(p=null==t?Ut:[+t[0],+t[1]],w):p},w.center=function(t){return arguments.length?(r=t&&[+t[0],+t[1]],w):r},w.size=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],w):d},w.duration=function(t){return arguments.length?(v=+t,w):v},w.x=function(t){return arguments.length?(s=t,o=t.copy(),h={x:0,y:0,k:1},w):s},w.y=function(t){return arguments.length?(f=t,u=t.copy(),h={x:0,y:0,k:1},w):f},a.rebind(w,_,"on")};var Bt,jt,Ut=[0,1/0];function Ht(){}function Vt(t,e,r){return this instanceof Vt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof Vt?new Vt(t.h,t.s,t.l):ce(""+t,fe,Vt):new Vt(t,e,r)}a.color=Ht,Ht.prototype.toString=function(){return this.rgb()+""},a.hsl=Vt;var Yt=Vt.prototype=new Ht;function Gt(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Wt(t,e,r){return this instanceof Wt?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Wt?new Wt(t.h,t.c,t.l):function(t,e,r){return t>0?new Wt(Math.atan2(r,e)*It,Math.sqrt(e*e+r*r),t):new Wt(NaN,NaN,t)}(t instanceof Zt?t.l:(t=he((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Wt(t,e,r)}Yt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},Yt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},Yt.rgb=function(){return Gt(this.h,this.s,this.l)},a.hcl=Wt;var qt=Wt.prototype=new Ht;function Xt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Zt(r,Math.cos(t*=Dt)*e,Math.sin(t)*e)}function Zt(t,e,r){return this instanceof Zt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Zt?new Zt(t.l,t.a,t.b):t instanceof Wt?Xt(t.h,t.c,t.l):he((t=ae(t)).r,t.g,t.b):new Zt(t,e,r)}qt.brighter=function(t){return new Wt(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?t:1)))},qt.darker=function(t){return new Wt(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?t:1)))},qt.rgb=function(){return Xt(this.h,this.c,this.l).rgb()},a.lab=Zt;var Jt=18,Kt=.95047,Qt=1,$t=1.08883,te=Zt.prototype=new Ht;function ee(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*Kt)-1.5371385*(n=re(n)*Qt)-.4985314*(a=re(a)*$t)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ce(""+t,ae,Gt):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}te.brighter=function(t){return new Zt(Math.min(100,this.l+Jt*(arguments.length?t:1)),this.a,this.b)},te.darker=function(t){return new Zt(Math.max(0,this.l-Jt*(arguments.length?t:1)),this.a,this.b)},te.rgb=function(){return ee(this.l,this.a,this.b)},a.rgb=ae;var le=ae.prototype=new Ht;function ue(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ce(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(pe(i[0]),pe(i[1]),pe(i[2]))}return(a=ve.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function fe(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new Vt(n,i,l)}function he(t,e,r){var n=ne((.4124564*(t=de(t))+.3575761*(e=de(e))+.1804375*(r=de(r)))/Kt),i=ne((.2126729*t+.7151522*e+.072175*r)/Qt);return Zt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/$t)))}function de(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e<i&&(e=i),r&&r<i&&(r=i),n&&n<i&&(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return fe(this.r,this.g,this.b)},le.toString=function(){return"#"+ue(this.r)+ue(this.g)+ue(this.b)};var ve=a.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function ge(t){return"function"==typeof t?t:function(){return t}}function me(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),ye(e,r,t,n)}}function ye(t,e,r,n){var i={},o=a.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function f(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(u)||e>=200&&e<300||304===e){try{t=r.call(i,u)}catch(t){return void o.error.call(i,t)}o.load.call(i,t)}else o.error.call(i,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(t){var e=a.event;a.event=t;try{o.progress.call(i,u)}finally{a.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),u.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=c&&(u.responseType=c),null!=a&&i.on("error",a).on("load",(function(t){a(null,t)})),o.beforesend.call(i,u),u.send(null==n?null:n),i},i.abort=function(){return u.abort(),i},a.rebind(i,o,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}ve.forEach((function(t,e){ve.set(t,oe(e))})),a.functor=ge,a.xhr=me(I),a.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i<n;++i)r[t[i]]=e[i];return r};r=e?function(t,r){return e(i(t),r)}:i}))},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,u=0,c=0;function f(){if(u>=l)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return u=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++u):10===s&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;u<l;){var s,c=1;if(10===(s=t.charCodeAt(u++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(u)&&(++u,++c);else if(s!==n)continue;return t.slice(e,u-c)}return t.slice(e)}for(;(r=f())!==o;){for(var h=[];r!==a&&r!==o;)h.push(r),r=f();e&&null==(h=e(h,c++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new D,n=[];return e.forEach((function(t){for(var e in t)r.has(e)||n.push(r.add(e))})),[n.map(l).join(t)].concat(e.map((function(e){return n.map((function(t){return l(e[t])})).join(t)}))).join("\n")},i.formatRows=function(t){return t.map(s).join("\n")},i},a.csv=a.dsv(",","text/csv"),a.tsv=a.dsv("\t","text/tab-separated-values");var xe,be,_e,we,Me=this[N(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Te(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return be?be.n=i:xe=i,be=i,_e||(we=clearTimeout(we),_e=1,Me(Ae)),i}function Ae(){var t=ke(),e=Le()-t;e>24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Ae,e)),_e=0):(_e=1,Me(Ae))}function ke(){for(var t=Date.now(),e=xe;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Le(){for(var t,e=xe,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:xe=e.n;return be=t,r}function Se(t){return t[0]}function Ee(t){return t[1]}function Ce(t){for(var e,r,n,i=t.length,a=[0,1],o=2,s=2;s<i;s++){for(;o>1&&(e=t[a[o-2]],r=t[a[o-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Oe(t,e){return t[0]-e[0]||t[1]-e[1]}a.timer=function(){Te.apply(this,arguments)},a.timer.flush=function(){ke(),Le()},a.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},a.geom={},a.geom.hull=function(t){var e=Se,r=Ee;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ge(e),a=ge(r),o=t.length,s=[],l=[];for(n=0;n<o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(Oe),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var u=Ce(s),c=Ce(l),f=c[0]===u[0],h=c[c.length-1]===u[u.length-1],d=[];for(n=u.length-1;n>=0;--n)d.push(t[s[u[n]][2]]);for(n=+f;n<c.length-h;++n)d.push(t[s[c[n]][2]]);return d}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},a.geom.polygon=function(t){return W(t,Re),t};var Re=a.geom.polygon.prototype=[];function Pe(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function De(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,f=n[1]-u,h=(s*(l-u)-f*(i-a))/(f*o-s*c);return[i+h*o,l+h*c]}function Ie(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}Re.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},Re.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},Re.clip=function(t){for(var e,r,n,i,a,o,s=Ie(t),l=-1,u=this.length-Ie(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)Pe(o=e[r],c,i)?(Pe(a,c,i)||t.push(De(a,o,c,i)),t.push(o)):Pe(a,c,i)&&t.push(De(a,o,c,i)),a=o;s&&t.push(t[0]),c=i}return t};var ze,Ne,Fe,Be,je,Ue=[],He=[];function Ve(){sr(this),this.edge=this.site=this.circle=null}function Ye(t){var e=Ue.pop()||new Ve;return e.site=t,e}function Ge(t){tr(t),Fe.remove(t),Ue.push(t),sr(t)}function We(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Ge(t);for(var l=a;l.circle&&w(r-l.circle.x)<St&&w(n-l.circle.cy)<St;)a=l.P,s.unshift(l),Ge(l),l=a;s.unshift(l),tr(l);for(var u=o;u.circle&&w(r-u.circle.x)<St&&w(n-u.circle.cy)<St;)o=u.N,s.push(u),Ge(u),u=o;s.push(u),tr(u);var c,f=s.length;for(c=1;c<f;++c)u=s[c],l=s[c-1],ir(u.edge,l.site,u.site,i);l=s[0],(u=s[f-1]).edge=nr(l.site,u.site,null,i),$e(l),$e(u)}function qe(t){for(var e,r,n,i,a=t.x,o=t.y,s=Fe._;s;)if((n=Xe(s,o)-a)>St)s=s.L;else{if(!((i=a-Ze(s,o))>St)){n>-St?(e=s.P,r=s):i>-St?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Ye(t);if(Fe.insert(e,l),e||r){if(e===r)return tr(e),r=Ye(e.site),Fe.insert(l,r),l.edge=r.edge=nr(e.site,l.site),$e(e),void $e(r);if(r){tr(e),tr(r);var u=e.site,c=u.x,f=u.y,h=t.x-c,d=t.y-f,p=r.site,v=p.x-c,g=p.y-f,m=2*(h*g-d*v),y=h*h+d*d,x=v*v+g*g,b={x:(g*y-d*x)/m+c,y:(h*x-v*y)/m+f};ir(r.edge,u,p,b),l.edge=nr(u,t,null,b),r.edge=nr(t,p,null,b),$e(e),$e(r)}else l.edge=nr(e.site,l.site)}}function Xe(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-e;if(!u)return s;var c=s-n,f=1/a-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+n:(n+s)/2}function Ze(t,e){var r=t.N;if(r)return Xe(r,e);var n=t.site;return n.y===e?n.x:1/0}function Je(t){this.site=t,this.edges=[]}function Ke(t,e){return e.angle-t.angle}function Qe(){sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,f=2*(l*(g=a.y-s)-u*c);if(!(f>=-Et)){var h=l*l+u*u,d=c*c+g*g,p=(g*h-u*d)/f,v=(l*d-c*h)/f,g=v+s,m=He.pop()||new Qe;m.arc=t,m.site=i,m.x=p+o,m.y=g+Math.sqrt(p*p+v*v),m.cy=g,t.circle=m;for(var y=null,x=je._;x;)if(m.y<x.y||m.y===x.y&&m.x<=x.x){if(!x.L){y=x.P;break}x=x.L}else{if(!x.R){y=x;break}x=x.R}je.insert(y,m),y||(Be=m)}}}}function tr(t){var e=t.circle;e&&(e.P||(Be=e.N),je.remove(e),He.push(e),sr(e),t.circle=null)}function er(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],u=e[1][1],c=t.l,f=t.r,h=c.x,d=c.y,p=f.x,v=f.y,g=(h+p)/2,m=(d+v)/2;if(v===d){if(g<o||g>=s)return;if(h>p){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y<l)return}else a={x:g,y:u};r={x:g,y:l}}}else if(i=m-(n=(h-p)/(v-d))*g,n<-1||n>1)if(h>p){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y<l)return}else a={x:(u-i)/n,y:u};r={x:(l-i)/n,y:l}}else if(d<v){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function rr(t,e){this.l=t,this.r=e,this.a=this.b=null}function nr(t,e,r,n){var i=new rr(t,e);return ze.push(i),r&&ir(i,t,e,r),n&&ir(i,e,t,n),Ne[t.i].edges.push(new ar(i,t,e)),Ne[e.i].edges.push(new ar(i,e,t)),i}function ir(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function ar(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function or(){this._=null}function sr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function lr(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function ur(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function cr(t){for(;t.L;)t=t.L;return t}function fr(t,e){var r,n,i,a=t.sort(hr).pop();for(ze=[],Ne=new Array(t.length),Fe=new or,je=new or;;)if(i=Be,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(Ne[a.i]=new Je(a),qe(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;We(i.arc)}e&&(function(t){for(var e,r,n,i,a,o=ze,s=(r=t[0][0],n=t[0][1],i=t[1][0],a=t[1][1],function(t){var e,o=t.a,s=t.b,l=o.x,u=o.y,c=0,f=1,h=s.x-l,d=s.y-u;if(e=r-l,h||!(e>0)){if(e/=h,h<0){if(e<c)return;e<f&&(f=e)}else if(h>0){if(e>f)return;e>c&&(c=e)}if(e=i-l,h||!(e<0)){if(e/=h,h<0){if(e>f)return;e>c&&(c=e)}else if(h>0){if(e<c)return;e<f&&(f=e)}if(e=n-u,d||!(e>0)){if(e/=d,d<0){if(e<c)return;e<f&&(f=e)}else if(d>0){if(e>f)return;e>c&&(c=e)}if(e=a-u,d||!(e<0)){if(e/=d,d<0){if(e>f)return;e>c&&(c=e)}else if(d>0){if(e<c)return;e<f&&(f=e)}return c>0&&(t.a={x:l+c*h,y:u+c*d}),f<1&&(t.b={x:l+f*h,y:u+f*d}),t}}}}}),l=o.length;l--;)(!er(e=o[l],t)||!s(e)||w(e.a.x-e.b.x)<St&&w(e.a.y-e.b.y)<St)&&(e.a=e.b=null,o.splice(l,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,u,c,f=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],v=Ne,g=v.length;g--;)if((a=v[g])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(c=s[o].end()).x,i=c.y,e=(u=s[++o%l].start()).x,r=u.y,(w(n-e)>St||w(i-r)>St)&&(s.splice(o,0,new ar((m=a.site,y=c,x=w(n-f)<St&&p-i>St?{x:f,y:w(e-f)<St?r:p}:w(i-p)<St&&h-n>St?{x:w(r-p)<St?e:h,y:p}:w(n-h)<St&&i-d>St?{x:h,y:w(e-h)<St?r:d}:w(i-d)<St&&n-f>St?{x:w(r-d)<St?e:f,y:d}:null,b=void 0,(b=new rr(m,null)).a=y,b.b=x,ze.push(b),b),a.site,null)),++l);var m,y,x,b}(e));var o={cells:Ne,edges:ze};return Fe=je=ze=Ne=null,o}function hr(t,e){return e.y-t.y||e.x-t.x}Je.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(Ke),e.length},ar.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},or.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=cr(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(lr(this,r),r=(t=r).U),r.C=!1,n.C=!0,ur(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(ur(this,r),r=(t=r).U),r.C=!1,n.C=!0,lr(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?cr(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,lr(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,ur(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,lr(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,ur(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,lr(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,ur(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},a.geom.voronoi=function(t){var e=Se,r=Ee,n=e,i=r,a=dr;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return fr(s(t),a).cells.forEach((function(a,s){var l=a.edges,u=a.site;(e[s]=l.length?l.map((function(t){var e=t.start();return[e.x,e.y]})):u.x>=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/St)*St,y:Math.round(i(t,e)/St)*St,i:e}}))}return o.links=function(t){return fr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return fr(s(t)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,u=r.edges.sort(Ke),c=-1,f=u.length,h=u[f-1].edge,d=h.l===l?h.r:h.l;++c<f;)i=d,d=(h=u[c].edge).l===l?h.r:h.l,n<i.i&&n<d.i&&(o=i,s=d,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)<0)&&e.push([t[n],t[i.i],t[d.i]])})),e},o.x=function(t){return arguments.length?(n=ge(e=t),o):e},o.y=function(t){return arguments.length?(i=ge(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?dr:t,o):a===dr?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===dr?null:a&&a[1]},o};var dr=[[-1e6,-1e6],[1e6,1e6]];function pr(t){return t.x}function vr(t){return t.y}function gr(t,e,r,n,i,a){if(!t(e,r,n,i,a)){var o=.5*(r+i),s=.5*(n+a),l=e.nodes;l[0]&&gr(t,l[0],r,n,o,s),l[1]&&gr(t,l[1],o,n,i,s),l[2]&&gr(t,l[2],r,s,o,a),l[3]&&gr(t,l[3],o,s,i,a)}}function mr(t,e){t=a.rgb(t),e=a.rgb(e);var r=t.r,n=t.g,i=t.b,o=e.r-r,s=e.g-n,l=e.b-i;return function(t){return"#"+ue(Math.round(r+o*t))+ue(Math.round(n+s*t))+ue(Math.round(i+l*t))}}function yr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Mr(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function xr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function br(t,e){var r,n,i,a=_r.lastIndex=wr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=_r.exec(t))&&(n=wr.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:xr(r,n)})),a=wr.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join("")})}a.geom.delaunay=function(t){return a.geom.voronoi().triangles(t)},a.geom.quadtree=function(t,e,r,n,i){var a,o=Se,s=Ee;if(a=arguments.length)return o=pr,s=vr,3===a&&(i=r,n=e,r=e=0),l(t);function l(t){var l,u,c,f,h,d,p,v,g,m=ge(o),y=ge(s);if(null!=e)d=e,p=r,v=n,g=i;else if(v=g=-(d=p=1/0),u=[],c=[],h=t.length,a)for(f=0;f<h;++f)(l=t[f]).x<d&&(d=l.x),l.y<p&&(p=l.y),l.x>v&&(v=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(f=0;f<h;++f){var x=+m(l=t[f],f),b=+y(l,f);x<d&&(d=x),b<p&&(p=b),x>v&&(v=x),b>g&&(g=b),u.push(x),c.push(b)}var _=v-d,M=g-p;function T(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(w(l-r)+w(u-n)<.01)A(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,A(t,c,l,u,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,f=n>=u,h=f<<1|c;t.leaf=!1,c?i=l:o=l,f?a=u:s=u,T(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}_>M?g=p+_:v=d+M;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){T(k,t,+m(t,++f),+y(t,f),d,p,v,g)}};if(k.visit=function(t){gr(t,k,d,p,v,g)},k.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(u,c,f,h,d){if(!(c>a||f>o||h<n||d<i)){if(p=u.point){var p,v=e-u.x,g=r-u.y,m=v*v+g*g;if(m<l){var y=Math.sqrt(l=m);n=e-y,i=r-y,a=e+y,o=r+y,s=p}}for(var x=u.nodes,b=.5*(c+h),_=.5*(f+d),w=(r>=_)<<1|e>=b,M=w+4;w<M;++w)if(u=x[3&w])switch(3&w){case 0:t(u,c,f,b,_);break;case 1:t(u,b,f,h,_);break;case 2:t(u,c,_,b,d);break;case 3:t(u,b,_,h,d)}}}(t,n,i,a,o),s}(k,t[0],t[1],d,p,v,g)},f=-1,null==e){for(;++f<h;)T(k,t[f],u[f],c[f],d,p,v,g);--f}else t.forEach(k.add);return u=c=t=l=null,k}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},a.interpolateRgb=mr,a.interpolateObject=yr,a.interpolateNumber=xr,a.interpolateString=br;var _r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wr=new RegExp(_r.source,"g");function Mr(t,e){for(var r,n=a.interpolators.length;--n>=0&&!(r=a.interpolators[n](t,e)););return r}function Tr(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Mr(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}a.interpolate=Mr,a.interpolators=[function(t,e){var r=typeof e;return("string"===r?ve.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?mr:br:e instanceof Ht?mr:Array.isArray(e)?Tr:"object"===r&&isNaN(e)?yr:xr)(t,e)}],a.interpolateArray=Tr;var Ar=function(){return I},kr=a.map({linear:Ar,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Cr},cubic:function(){return Or},sin:function(){return Pr},exp:function(){return Dr},circle:function(){return Ir},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Ot*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Ot/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return zr}}),Lr=a.map({in:I,out:Sr,"in-out":Er,"out-in":function(t){return Er(Sr(t))}});function Sr(t){return function(e){return 1-t(1-e)}}function Er(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Cr(t){return t*t}function Or(t){return t*t*t}function Rr(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Pr(t){return 1-Math.cos(t*Pt)}function Dr(t){return Math.pow(2,10*(t-1))}function Ir(t){return 1-Math.sqrt(1-t*t)}function zr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Nr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Fr(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=jr(i),s=Br(i,a),l=jr(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]<a[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*It,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*It:0}function Br(t,e){return t[0]*e[0]+t[1]*e[1]}function jr(t){var e=Math.sqrt(Br(t,t));return e&&(t[0]/=e,t[1]/=e),e}a.ease=function(t){var e,r=t.indexOf("-"),n=r>=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=kr.get(n)||Ar,i=Lr.get(i)||I,e=i(n.apply(null,o.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},a.interpolateHcl=function(t,e){t=a.hcl(t),e=a.hcl(e);var r=t.h,n=t.c,i=t.l,o=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return Xt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateHsl=function(t,e){t=a.hsl(t),e=a.hsl(e);var r=t.h,n=t.s,i=t.l,o=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return Gt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateLab=function(t,e){t=a.lab(t),e=a.lab(e);var r=t.l,n=t.a,i=t.b,o=e.l-r,s=e.a-n,l=e.b-i;return function(t){return ee(r+o*t,n+s*t,i+l*t)+""}},a.interpolateRound=Nr,a.transform=function(t){var e=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Fr(r?r.matrix:Ur)})(t)},Fr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Ur={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(t){return t.length?t.pop()+",":""}function Vr(t,e){var r=[],n=[];return t=a.transform(t),e=a.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:xr(t[0],e[0])},{i:i-2,x:xr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:xr(t,e)})):e&&r.push(Hr(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:xr(t,e)}):e&&r.push(Hr(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:xr(t[0],e[0])},{i:i-2,x:xr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Hr(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i<a;)r[(e=n[i]).i]=e.x(t);return r.join("")}}function Yr(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function Gr(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function Wr(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;for(var r=qr(t),n=qr(e),i=r.pop(),a=n.pop(),o=null;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function qr(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function Xr(t){t.fixed|=2}function Zr(t){t.fixed&=-7}function Jr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Kr(t){t.fixed&=-5}function Qr(t,e,r){var n=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)null!=(a=o[l])&&(Qr(a,e,r),t.charge+=a.charge,n+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*r[t.point.index];t.charge+=t.pointCharge=u,n+=u*t.point.x,i+=u*t.point.y}t.cx=n/t.charge,t.cy=i/t.charge}a.interpolateTransform=Vr,a.layout={},a.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(Wr(t[r]));return e}},a.layout.chord=function(){var t,e,r,n,i,o,s,l={},u=0;function c(){var l,c,h,d,p,v={},g=[],m=a.range(n),y=[];for(t=[],e=[],l=0,d=-1;++d<n;){for(c=0,p=-1;++p<n;)c+=r[d][p];g.push(c),y.push(a.range(n)),l+=c}for(i&&m.sort((function(t,e){return i(g[t],g[e])})),o&&y.forEach((function(t,e){t.sort((function(t,n){return o(r[e][t],r[e][n])}))})),l=(Ot-u*n)/l,c=0,d=-1;++d<n;){for(h=c,p=-1;++p<n;){var x=m[d],b=y[x][p],_=r[x][b],w=c,M=c+=_*l;v[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:M,value:_}}e[x]={index:x,startAngle:h,endAngle:c,value:g[x]},c+=u}for(d=-1;++d<n;)for(p=d-1;++p<n;){var T=v[d+"-"+p],A=v[p+"-"+d];(T.value||A.value)&&t.push(T.value<A.value?{source:A,target:T}:{source:T,target:A})}s&&f()}function f(){t.sort((function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(n=(r=i)&&r.length,t=e=null,l):r},l.padding=function(r){return arguments.length?(u=r,t=e=null,l):u},l.sortGroups=function(r){return arguments.length?(i=r,t=e=null,l):i},l.sortSubgroups=function(e){return arguments.length?(o=e,t=null,l):o},l.sortChords=function(e){return arguments.length?(s=e,t&&f(),l):s},l.chords=function(){return t||c(),t},l.groups=function(){return e||c(),e},l},a.layout.force=function(){var t,e,r,n,i,o,s={},l=a.dispatch("start","tick","end"),u=[1,1],c=.9,f=$r,h=tn,d=-30,p=en,v=.1,g=.64,m=[],y=[];function x(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/g<l){if(l<p){var u=e.charge/l;t.px-=a*u,t.py-=o*u}return!0}e.point&&l&&l<p&&(u=e.pointCharge/l,t.px-=a*u,t.py-=o*u)}return!e.charge}}function b(t){t.px=a.event.x,t.py=a.event.y,s.resume()}return s.tick=function(){if((r*=.99)<.005)return t=null,l.end({type:"end",alpha:r=0}),!0;var e,s,f,h,p,g,b,_,w,M=m.length,T=y.length;for(s=0;s<T;++s)h=(f=y[s]).source,(g=(_=(p=f.target).x-h.x)*_+(w=p.y-h.y)*w)&&(_*=g=r*i[s]*((g=Math.sqrt(g))-n[s])/g,w*=g,p.x-=_*(b=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=w*b,h.x+=_*(b=1-b),h.y+=w*b);if((b=r*v)&&(_=u[0]/2,w=u[1]/2,s=-1,b))for(;++s<M;)(f=m[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(d)for(Qr(e=a.geom.quadtree(m),r,o),s=-1;++s<M;)(f=m[s]).fixed||e.visit(x(f));for(s=-1;++s<M;)(f=m[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*c,f.y-=(f.py-(f.py=f.y))*c);l.tick({type:"tick",alpha:r})},s.nodes=function(t){return arguments.length?(m=t,s):m},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(u=t,s):u},s.linkDistance=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(p=t*t,s):Math.sqrt(p)},s.gravity=function(t){return arguments.length?(v=+t,s):v},s.theta=function(t){return arguments.length?(g=t*t,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,r?e>0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=Te(s.tick)),s):r},s.start=function(){var t,e,r,a=m.length,l=y.length,c=u[0],p=u[1];for(t=0;t<a;++t)(r=m[t]).index=t,r.weight=0;for(t=0;t<l;++t)"number"==typeof(r=y[t]).source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<a;++t)r=m[t],isNaN(r.x)&&(r.x=v("x",c)),isNaN(r.y)&&(r.y=v("y",p)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(n=[],"function"==typeof f)for(t=0;t<l;++t)n[t]=+f.call(this,y[t],t);else for(t=0;t<l;++t)n[t]=f;if(i=[],"function"==typeof h)for(t=0;t<l;++t)i[t]=+h.call(this,y[t],t);else for(t=0;t<l;++t)i[t]=h;if(o=[],"function"==typeof d)for(t=0;t<a;++t)o[t]=+d.call(this,m[t],t);else for(t=0;t<a;++t)o[t]=d;function v(r,n){if(!e){for(e=new Array(a),u=0;u<a;++u)e[u]=[];for(u=0;u<l;++u){var i=y[u];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var o,s=e[t],u=-1,c=s.length;++u<c;)if(!isNaN(o=s[u][r]))return o;return Math.random()*n}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=a.behavior.drag().origin(I).on("dragstart.force",Xr).on("drag.force",b).on("dragend.force",Zr)),!arguments.length)return e;this.on("mouseover.force",Jr).on("mouseout.force",Kr).call(e)},a.rebind(s,l,"on")};var $r=20,tn=1,en=1/0;function rn(t,e){return a.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=un,t}function nn(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function an(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function on(t){return t.children}function sn(t){return t.value}function ln(t,e){return e.value-t.value}function un(t){return a.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}a.layout.hierarchy=function(){var t=ln,e=on,r=sn;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(u=e.call(n,a,a.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return an(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(nn(t,(function(t){t.children&&(t.value=0)})),an(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},a.layout.partition=function(){var t=a.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var a=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=t.value?n/t.value:0;++u<o;)r(s=a[u],e,l=s.value*n,i),e+=l}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,a=-1;++a<i;)r=Math.max(r,n(e[a]));return 1+r}function i(i,a){var o=t.call(this,i,a);return r(o[0],0,e[0],e[1]/n(o[0])),o}return i.size=function(t){return arguments.length?(e=t,i):e},rn(i,t)},a.layout.pie=function(){var t=Number,e=cn,r=0,n=Ot,i=0;function o(s){var l,u=s.length,c=s.map((function(e,r){return+t.call(o,e,r)})),f=+("function"==typeof r?r.apply(this,arguments):r),h=("function"==typeof n?n.apply(this,arguments):n)-f,d=Math.min(Math.abs(h)/u,+("function"==typeof i?i.apply(this,arguments):i)),p=d*(h<0?-1:1),v=a.sum(c),g=v?(h-u*p)/v:0,m=a.range(u),y=[];return null!=e&&m.sort(e===cn?function(t,e){return c[e]-c[t]}:function(t,r){return e(s[t],s[r])}),m.forEach((function(t){y[t]={data:s[t],value:l=c[t],startAngle:f,endAngle:f+=l*g+p,padAngle:d}})),y}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(t){return arguments.length?(e=t,o):e},o.startAngle=function(t){return arguments.length?(r=t,o):r},o.endAngle=function(t){return arguments.length?(n=t,o):n},o.padAngle=function(t){return arguments.length?(i=t,o):i},o};var cn={};function fn(t){return t.x}function hn(t){return t.y}function dn(t,e,r){t.y0=e,t.y=r}a.layout.stack=function(){var t=I,e=gn,r=mn,n=dn,i=fn,o=hn;function s(l,u){if(!(d=l.length))return l;var c=l.map((function(e,r){return t.call(s,e,r)})),f=c.map((function(t){return t.map((function(t,e){return[i.call(s,t,e),o.call(s,t,e)]}))})),h=e.call(s,f,u);c=a.permute(c,h),f=a.permute(f,h);var d,p,v,g,m=r.call(s,f,u),y=c[0].length;for(v=0;v<y;++v)for(n.call(s,c[0][v],g=m[v],f[0][v][1]),p=1;p<d;++p)n.call(s,c[p][v],g+=f[p-1][v][1],f[p][v][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:pn.get(t)||gn,s):e},s.offset=function(t){return arguments.length?(r="function"==typeof t?t:vn.get(t)||mn,s):r},s.x=function(t){return arguments.length?(i=t,s):i},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(n=t,s):n},s};var pn=a.map({"inside-out":function(t){var e,r,n=t.length,i=t.map(yn),o=t.map(xn),s=a.range(n).sort((function(t,e){return i[t]-i[e]})),l=0,u=0,c=[],f=[];for(e=0;e<n;++e)r=s[e],l<u?(l+=o[r],c.push(r)):(u+=o[r],f.push(r));return f.reverse().concat(c)},reverse:function(t){return a.range(t.length).reverse()},default:gn}),vn=a.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,u,c=t.length,f=t[0],h=f.length,d=[];for(d[0]=l=u=0,r=1;r<h;++r){for(e=0,i=0;e<c;++e)i+=t[e][r][1];for(e=0,a=0,s=f[r][0]-f[r-1][0];e<c;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}d[r]=l-=i?a/i*s:0,l<u&&(u=l)}for(r=0;r<h;++r)d[r]-=u;return d},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:mn});function gn(t){return a.range(t.length)}function mn(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function yn(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function xn(t){return t.reduce(bn,0)}function bn(t,e){return t+e[1]}function _n(t,e){return wn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Mn(t){return[a.min(t),a.max(t)]}function Tn(t,e){return t.value-e.value}function An(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function kn(t,e){t._pack_next=e,e._pack_prev=t}function Ln(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Sn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,h=-1/0;if(e.forEach(En),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(Rn(r,n,i=e[2]),x(i),An(r,i),r._pack_prev=i,An(i,n),n=r._pack_next,a=3;a<l;a++){Rn(r,n,i=e[a]);var d=0,p=1,v=1;for(o=n._pack_next;o!==n;o=o._pack_next,p++)if(Ln(o,i)){d=1;break}if(1==d)for(s=r._pack_prev;s!==o._pack_prev&&!Ln(s,i);s=s._pack_prev,v++);d?(p<v||p==v&&n.r<r.r?kn(r,n=o):kn(r=s,n),a--):(An(r,i),n=i,x(i))}var g=(u+c)/2,m=(f+h)/2,y=0;for(a=0;a<l;a++)(i=e[a]).x-=g,i.y-=m,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(Cn)}function x(t){u=Math.min(t.x-t.r,u),c=Math.max(t.x+t.r,c),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function En(t){t._pack_next=t._pack_prev=t}function Cn(t){delete t._pack_next,delete t._pack_prev}function On(t,e,r,n){var i=t.children;if(t.x=e+=n*t.x,t.y=r+=n*t.y,t.r*=n,i)for(var a=-1,o=i.length;++a<o;)On(i[a],e,r,n)}function Rn(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),u=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+u*a,r.y=t.y+l*a-u*i}else r.x=t.x+n,r.y=t.y}function Pn(t,e){return t.parent==e.parent?1:2}function Dn(t){var e=t.children;return e.length?e[0]:t.t}function In(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function zn(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function Nn(t,e,r){return t.a.parent===e.parent?t.a:r}function Fn(t){var e=t.children;return e&&e.length?Fn(e[0]):t}function Bn(t){var e,r=t.children;return r&&(e=r.length)?Bn(r[e-1]):t}function jn(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Un(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Hn(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function Vn(t){return t.rangeExtent?t.rangeExtent():Hn(t.range())}function Yn(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function Gn(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function Wn(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:qn}a.layout.histogram=function(){var t=!0,e=Number,r=Mn,n=_n;function i(i,o){for(var s,l,u=[],c=i.map(e,this),f=r.call(this,c,o),h=n.call(this,f,c,o),d=(o=-1,c.length),p=h.length-1,v=t?1:1/d;++o<p;)(s=u[o]=[]).dx=h[o+1]-(s.x=h[o]),s.y=0;if(p>0)for(o=-1;++o<d;)(l=c[o])>=f[0]&&l<=f[1]&&((s=u[a.bisect(h,l,1,p)-1]).y+=v,s.push(i[o]));return u}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=ge(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return wn(e,t)}:ge(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},a.layout.pack=function(){var t,e=a.layout.hierarchy().sort(Tn),r=0,n=[1,1];function i(i,a){var o=e.call(this,i,a),s=o[0],l=n[0],u=n[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,an(s,(function(t){t.r=+c(t.value)})),an(s,Sn),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;an(s,(function(t){t.r+=f})),an(s,Sn),an(s,(function(t){t.r-=f}))}return On(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},rn(i,e)},a.layout.tree=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Pn,r=[1,1],n=null;function i(i,a){var u=t.call(this,i,a),c=u[0],f=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(c);if(an(f,o),f.parent.m=-f.z,nn(f,s),n)nn(c,l);else{var h=c,d=c,p=c;nn(c,(function(t){t.x<h.x&&(h=t),t.x>d.x&&(d=t),t.depth>p.depth&&(p=t)}));var v=e(h,d)/2-h.x,g=r[0]/(d.x+e(d,h)/2+v),m=r[1]/(p.depth||1);nn(c,(function(t){t.x=(t.x+v)*g,t.y=t.depth*m}))}return u}function o(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,h=l.m;s=In(s),a=Dn(a),s&&a;)l=Dn(l),(o=In(o)).a=t,(i=s.z+f-a.z-u+e(s._,a._))>0&&(zn(Nn(s,t,n),t,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!In(o)&&(o.t=s,o.m+=f-c),a&&!Dn(l)&&(l.t=a,l.m+=u-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},rn(i,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Pn,r=[1,1],n=!1;function i(i,o){var s,l=t.call(this,i,o),u=l[0],c=0;an(u,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(r)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)}));var f=Fn(u),h=Bn(u),d=f.x-e(f,h)/2,p=h.x+e(h,f)/2;return an(u,n?function(t){t.x=(t.x-u.x)*r[0],t.y=(u.y-t.y)*r[1]}:function(t){t.x=(t.x-d)/(p-d)*r[0],t.y=(1-(u.y?t.y/u.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},rn(i,t)},a.layout.treemap=function(){var t,e=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=jn,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function f(t){var e=t.children;if(e&&e.length){var r,n,i,a=o(t),s=[],u=e.slice(),h=1/0,v="slice"===l?a.dx:"dice"===l?a.dy:"slice-dice"===l?1&t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(c(u,a.dx*a.dy/t.value),s.area=0;(i=u.length)>0;)s.push(r=u[i-1]),s.area+=r.area,"squarify"!==l||(n=d(s,v))<=h?(u.pop(),h=n):(s.area-=s.pop().area,p(s,v,a,!1),v=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(p(s,v,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(c(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(p(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function d(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return e*=e,(n*=n)?Math.max(e*i*u/n,n/(e*a*u)):1/0}function p(t,e,n,i){var a,o=-1,s=t.length,l=n.x,u=n.y,c=e?r(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<s;)(a=t[o]).x=l,a.y=u,a.dy=c,l+=a.dx=Math.min(n.x+n.dx-l,c?r(a.area/c):0);a.z=!0,a.dx+=n.x+n.dx-l,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<s;)(a=t[o]).x=l,a.y=u,a.dx=c,u+=a.dy=Math.min(n.y+n.dy-u,c?r(a.area/c):0);a.z=!1,a.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function v(r){var i=t||e(r),a=i[0];return a.x=a.y=0,a.value?(a.dx=n[0],a.dy=n[1]):a.dx=a.dy=0,t&&e.revalue(a),c([a],a.dx*a.dy/a.value),(t?h:f)(a),s&&(t=i),i}return v.size=function(t){return arguments.length?(n=t,v):n},v.padding=function(t){if(!arguments.length)return i;function e(e){return Un(e,t)}var r;return o=null==(i=t)?jn:"function"==(r=typeof t)?function(e){var r=t.call(v,e,e.depth);return null==r?jn(e):Un(e,"number"==typeof r?[r,r,r,r]:r)}:"number"===r?(t=[t,t,t,t],e):e,v},v.round=function(t){return arguments.length?(r=t?Math.round:Number,v):r!=Number},v.sticky=function(e){return arguments.length?(s=e,t=null,v):s},v.ratio=function(t){return arguments.length?(u=t,v):u},v.mode=function(t){return arguments.length?(l=t+"",v):l},rn(v,e)},a.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=a.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},a.scale={};var qn={floor:I,ceil:I};function Xn(t,e,r,n){var i=[],o=[],s=0,l=Math.min(t.length,e.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=l;)i.push(r(t[s-1],t[s])),o.push(n(e[s-1],e[s]));return function(e){var r=a.bisect(t,e,1,l)-1;return o[r](i[r](e))}}function Zn(t,e,r,n){var i,a;function o(){var o=Math.min(t.length,e.length)>2?Xn:Yn,l=n?Gr:Yr;return i=o(t,e,l,r),a=o(e,t,l,Mr),s}function s(t){return i(t)}return s.invert=function(t){return a(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},s.range=function(t){return arguments.length?(e=t,o()):e},s.rangeRound=function(t){return s.range(t).interpolate(Nr)},s.clamp=function(t){return arguments.length?(n=t,o()):n},s.interpolate=function(t){return arguments.length?(r=t,o()):r},s.ticks=function(e){return $n(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Kn(t,e),o()},s.copy=function(){return Zn(t,e,r,n)},o()}function Jn(t,e){return a.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Kn(t,e){return Gn(t,Wn(Qn(t,e)[2])),Gn(t,Wn(Qn(t,e)[2])),t}function Qn(t,e){null==e&&(e=10);var r=Hn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function $n(t,e){return a.range.apply(a,Qn(t,e))}function ti(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Gn(n.map(i),r?Math:ei);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Hn(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(c-u)){if(r){for(;u<c;u++)for(var h=1;h<f;h++)o.push(a(u)*h);o.push(a(u))}else for(o.push(a(u));u++<c;)for(h=f-1;h>0;h--)o.push(a(u)*h);for(u=0;o[u]<s;u++);for(c=o.length;o[c-1]>l;c--);o=o.slice(u,c)}return o},o.copy=function(){return ti(t.copy(),e,r,n)},Jn(o,t)}a.scale.linear=function(){return Zn([0,1],[0,1],Mr,!1)},a.scale.log=function(){return ti(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ei={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ri(t,e,r){var n=ni(e),i=ni(1/e);function a(e){return t(n(e))}return a.invert=function(e){return i(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),a):r},a.ticks=function(t){return $n(r,t)},a.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},a.nice=function(t){return a.domain(Kn(r,t))},a.exponent=function(o){return arguments.length?(n=ni(e=o),i=ni(1/e),t.domain(r.map(n)),a):e},a.copy=function(){return ri(t.copy(),e,r)},Jn(a,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){var r,n,i;function o(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return a.range(t.length).map((function(t){return e+r*t}))}return o.domain=function(n){if(!arguments.length)return t;t=[],r=new T;for(var i,a=-1,s=n.length;++a<s;)r.has(i=n[a])||r.set(i,t.push(i));return o[e.t].apply(o,e.a)},o.range=function(t){return arguments.length?(n=t,i=0,e={t:"range",a:arguments},o):n},o.rangePoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],c=t.length<2?(l=(l+u)/2,0):(u-l)/(t.length-1+a);return n=s(l+c*a/2,c),i=0,e={t:"rangePoints",a:arguments},o},o.rangeRoundPoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],c=t.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(t.length-1+a)|0;return n=s(l+Math.round(c*a/2+(u-l-(t.length-1+a)*c)/2),c),i=0,e={t:"rangeRoundPoints",a:arguments},o},o.rangeBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],c=r[u-0],f=(r[1-u]-c)/(t.length-a+2*l);return n=s(c+f*l,f),u&&n.reverse(),i=f*(1-a),e={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],c=r[u-0],f=r[1-u],h=Math.floor((f-c)/(t.length-a+2*l));return n=s(c+Math.round((f-c-(t.length-a)*h)/2),h),u&&n.reverse(),i=Math.round(h*(1-a)),e={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return i},o.rangeExtent=function(){return Hn(e.a[0])},o.copy=function(){return ii(t,e)},o.domain(t)}a.scale.pow=function(){return ri(a.scale.linear(),1,[0,1])},a.scale.sqrt=function(){return a.scale.pow().exponent(.5)},a.scale.ordinal=function(){return ii([],{t:"range",a:[[]]})},a.scale.category10=function(){return a.scale.ordinal().range(ai)},a.scale.category20=function(){return a.scale.ordinal().range(oi)},a.scale.category20b=function(){return a.scale.ordinal().range(si)},a.scale.category20c=function(){return a.scale.ordinal().range(li)};var ai=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),oi=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),si=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),li=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function ui(t,e){var r;function n(){var n=0,o=e.length;for(r=[];++n<o;)r[n-1]=a.quantile(t,n/o);return i}function i(t){if(!isNaN(t=+t))return e[a.bisect(r,t)]}return i.domain=function(e){return arguments.length?(t=e.map(m).filter(y).sort(g),n()):t},i.range=function(t){return arguments.length?(e=t,n()):e},i.quantiles=function(){return r},i.invertExtent=function(n){return(n=e.indexOf(n))<0?[NaN,NaN]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},i.copy=function(){return ui(t,e)},n()}function ci(t,e,r){var n,i;function a(e){return r[Math.max(0,Math.min(i,Math.floor(n*(e-t))))]}function o(){return n=r.length/(e-t),i=r.length-1,a}return a.domain=function(r){return arguments.length?(t=+r[0],e=+r[r.length-1],o()):[t,e]},a.range=function(t){return arguments.length?(r=t,o()):r},a.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/n+t,e+1/n]},a.copy=function(){return ci(t,e,r)},o()}function fi(t,e){function r(r){if(r<=r)return e[a.bisect(t,r)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(t){return arguments.length?(e=t,r):e},r.invertExtent=function(r){return r=e.indexOf(r),[t[r-1],t[r]]},r.copy=function(){return fi(t,e)},r}function hi(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=r.map(e),e):t},e.ticks=function(e){return $n(t,e)},e.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},e.copy=function(){return hi(t)},e}function di(){return 0}a.scale.quantile=function(){return ui([],[])},a.scale.quantize=function(){return ci(0,1,[0,1])},a.scale.threshold=function(){return fi([.5],[0,1])},a.scale.identity=function(){return hi([0,1])},a.svg={},a.svg.arc=function(){var t=vi,e=gi,r=di,n=pi,i=mi,a=yi,o=xi;function s(){var s=Math.max(0,+t.apply(this,arguments)),u=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Pt,f=a.apply(this,arguments)-Pt,h=Math.abs(f-c),d=c>f?0:1;if(u<s&&(p=u,u=s,s=p),h>=Rt)return l(u,d)+(s?l(s,1-d):"")+"Z";var p,v,g,m,y,x,b,_,w,M,T,A,k=0,L=0,S=[];if((m=(+o.apply(this,arguments)||0)/2)&&(g=n===pi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),d||(L*=-1),u&&(L=zt(g/u*Math.sin(m))),s&&(k=zt(g/s*Math.sin(m)))),u){y=u*Math.cos(c+L),x=u*Math.sin(c+L),b=u*Math.cos(f-L),_=u*Math.sin(f-L);var E=Math.abs(f-c-2*L)<=Ct?0:1;if(L&&bi(y,x,b,_)===d^E){var C=(c+f)/2;y=u*Math.cos(C),x=u*Math.sin(C),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-k),M=s*Math.sin(f-k),T=s*Math.cos(c+k),A=s*Math.sin(c+k);var O=Math.abs(c-f+2*k)<=Ct?0:1;if(k&&bi(w,M,T,A)===1-d^O){var R=(c+f)/2;w=s*Math.cos(R),M=s*Math.sin(R),T=A=null}}else w=M=0;if(h>St&&(p=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s<u^d?0:1;var P=p,D=p;if(h<Ct){var I=null==T?[w,M]:null==b?[y,x]:De([y,x],[T,A],[b,_],[w,M]),z=y-I[0],N=x-I[1],F=b-I[0],B=_-I[1],j=1/Math.sin(Math.acos((z*F+N*B)/(Math.sqrt(z*z+N*N)*Math.sqrt(F*F+B*B)))/2),U=Math.sqrt(I[0]*I[0]+I[1]*I[1]);D=Math.min(p,(s-U)/(j-1)),P=Math.min(p,(u-U)/(j+1))}if(null!=b){var H=_i(null==T?[w,M]:[T,A],[y,x],u,P,d),V=_i([b,_],[w,M],u,P,d);p===P?S.push("M",H[0],"A",P,",",P," 0 0,",v," ",H[1],"A",u,",",u," 0 ",1-d^bi(H[1][0],H[1][1],V[1][0],V[1][1]),",",d," ",V[1],"A",P,",",P," 0 0,",v," ",V[0]):S.push("M",H[0],"A",P,",",P," 0 1,",v," ",V[0])}else S.push("M",y,",",x);if(null!=T){var Y=_i([y,x],[T,A],s,-D,d),G=_i([w,M],null==b?[y,x]:[b,_],s,-D,d);p===D?S.push("L",G[0],"A",D,",",D," 0 0,",v," ",G[1],"A",s,",",s," 0 ",d^bi(G[1][0],G[1][1],Y[1][0],Y[1][1]),",",1-d," ",Y[1],"A",D,",",D," 0 0,",v," ",Y[0]):S.push("L",G[0],"A",D,",",D," 0 0,",v," ",Y[0])}else S.push("L",w,",",M)}else S.push("M",y,",",x),null!=b&&S.push("A",u,",",u," 0 ",E,",",d," ",b,",",_),S.push("L",w,",",M),null!=T&&S.push("A",s,",",s," 0 ",O,",",1-d," ",T,",",A);return S.push("Z"),S.join("")}function l(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=ge(e),s):t},s.outerRadius=function(t){return arguments.length?(e=ge(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=ge(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==pi?pi:ge(t),s):n},s.startAngle=function(t){return arguments.length?(i=ge(t),s):i},s.endAngle=function(t){return arguments.length?(a=ge(t),s):a},s.padAngle=function(t){return arguments.length?(o=ge(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Pt;return[Math.cos(n)*r,Math.sin(n)*r]},s};var pi="auto";function vi(t){return t.innerRadius}function gi(t){return t.outerRadius}function mi(t){return t.startAngle}function yi(t){return t.endAngle}function xi(t){return t&&t.padAngle}function bi(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function _i(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,f=t[1]+u,h=e[0]+l,d=e[1]+u,p=(c+h)/2,v=(f+d)/2,g=h-c,m=d-f,y=g*g+m*m,x=r-n,b=c*d-h*f,_=(m<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*m-g*_)/y,M=(-b*g-m*_)/y,T=(b*m+g*_)/y,A=(-b*g+m*_)/y,k=w-p,L=M-v,S=T-p,E=A-v;return k*k+L*L>S*S+E*E&&(w=T,M=A),[[w-l,M-u],[w*r/x,M*r/x]]}function wi(){return!0}function Mi(t){var e=Se,r=Ee,n=wi,i=Ai,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,h=ge(e),d=ge(r);function p(){l.push("M",i(t(u),o))}for(;++c<f;)n.call(this,s=a[c],c)?u.push([+h.call(this,s,c),+d.call(this,s,c)]):u.length&&(p(),u=[]);return u.length&&p(),l.length?l.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a="function"==typeof t?i=t:(i=Ti.get(t)||Ai).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}a.svg.line=function(){return Mi(I)};var Ti=a.map({linear:Ai,"linear-closed":ki,step:function(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("H",(n[0]+(n=t[e])[0])/2,"V",n[1]);return r>1&&i.push("H",n[0]),i.join("")},"step-before":Li,"step-after":Si,basis:Oi,"basis-open":function(t){if(t.length<4)return Ai(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ri(Ii,a)+","+Ri(Ii,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),zi(r,a,o);return r.join("")},"basis-closed":function(t){for(var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);for(e=[Ri(Ii,o),",",Ri(Ii,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),zi(e,o,s);return e.join("")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,u=-1;++u<=r;)i=u/r,(n=t[u])[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Oi(t)},cardinal:function(t,e){return t.length<3?Ai(t):t[0]+Ei(t,Ci(t,e))},"cardinal-open":function(t,e){return t.length<4?Ai(t):t[1]+Ei(t.slice(1,-1),Ci(t,e))},"cardinal-closed":function(t,e){return t.length<3?ki(t):t[0]+Ei((t.push(t[0]),t),Ci([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Ai(t):t[0]+Ei(t,function(t){for(var e,r,n,i,a=[],o=function(t){for(var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=Ni(i,a);++e<r;)n[e]=(o+(o=Ni(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;++s<l;)e=Ni(t[s],t[s+1]),w(e)<St?o[s]=o[s+1]=0:(i=(r=o[s]/e)*r+(n=o[s+1]/e)*n)>9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Ai(t){return t.length>1?t.join("L"):t+"Z"}function ki(t){return t.join("L")+"Z"}function Li(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("V",(n=t[e])[1],"H",n[0]);return i.join("")}function Si(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("H",(n=t[e])[0],"V",n[1]);return i.join("")}function Ei(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ai(t);var r=t.length!=e.length,n="",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+="Q"+(a[0]-2*o[0]/3)+","+(a[1]-2*o[1]/3)+","+a[0]+","+a[1],i=t[1],l=2),e.length>1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u<e.length;u++,l++)a=t[l],s=e[u],n+="S"+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1]}if(r){var c=t[l];n+="Q"+(a[0]+2*s[0]/3)+","+(a[1]+2*s[1]/3)+","+c[0]+","+c[1]}return n}function Ci(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Oi(t){if(t.length<3)return Ai(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,",",a,"L",Ri(Ii,o),",",Ri(Ii,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),zi(l,o,s);return t.pop(),l.push("L",n),l.join("")}function Ri(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Ti.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var Pi=[0,2/3,1/3,0],Di=[0,1/3,2/3,0],Ii=[0,1/6,2/3,1/6];function zi(t,e,r){t.push("C",Ri(Pi,e),",",Ri(Pi,r),",",Ri(Di,e),",",Ri(Di,r),",",Ri(Ii,e),",",Ri(Ii,r))}function Ni(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Fi(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Pt,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function Bi(t){var e=Se,r=Se,n=0,i=Ee,a=wi,o=Ai,s=o.key,l=o,u="L",c=.7;function f(s){var f,h,d,p=[],v=[],g=[],m=-1,y=s.length,x=ge(e),b=ge(n),_=e===r?function(){return h}:ge(r),w=n===i?function(){return d}:ge(i);function M(){p.push("M",o(t(g),c),u,l(t(v.reverse()),c),"Z")}for(;++m<y;)a.call(this,f=s[m],m)?(v.push([h=+x.call(this,f,m),d=+b.call(this,f,m)]),g.push([+_.call(this,f,m),+w.call(this,f,m)])):v.length&&(M(),v=[],g=[]);return v.length&&M(),p.length?p.join(""):null}return f.x=function(t){return arguments.length?(e=r=t,f):r},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(r=t,f):r},f.y=function(t){return arguments.length?(n=i=t,f):i},f.y0=function(t){return arguments.length?(n=t,f):n},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(a=t,f):a},f.interpolate=function(t){return arguments.length?(s="function"==typeof t?o=t:(o=Ti.get(t)||Ai).key,l=o.reverse||o,u=o.closed?"M":"L",f):s},f.tension=function(t){return arguments.length?(c=t,f):c},f}function ji(t){return t.source}function Ui(t){return t.target}function Hi(t){return t.radius}function Vi(t){return[t.x,t.y]}function Yi(){return 64}function Gi(){return"circle"}function Wi(t){var e=Math.sqrt(t/Ct);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}a.svg.line.radial=function(){var t=Mi(Fi);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Li.reverse=Si,Si.reverse=Li,a.svg.area=function(){return Bi(I)},a.svg.area.radial=function(){var t=Bi(Fi);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},a.svg.chord=function(){var t=ji,e=Ui,r=Hi,n=mi,i=yi;function a(r,n){var i,a,u=o(this,t,r,n),c=o(this,e,r,n);return"M"+u.p0+s(u.r,u.p1,u.a1-u.a0)+(a=c,((i=u).a0==a.a0&&i.a1==a.a1?l(u.r,u.p1,u.r,u.p0):l(u.r,u.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,u.r,u.p0))+"Z")}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),u=n.call(t,s,o)-Pt,c=i.call(t,s,o)-Pt;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(t,e,r){return"A"+t+","+t+" 0 "+ +(r>Ct)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ge(t),a):r},a.source=function(e){return arguments.length?(t=ge(e),a):t},a.target=function(t){return arguments.length?(e=ge(t),a):e},a.startAngle=function(t){return arguments.length?(n=ge(t),a):n},a.endAngle=function(t){return arguments.length?(i=ge(t),a):i},a},a.svg.diagonal=function(){var t=ji,e=Ui,r=Vi;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ge(e),n):t},n.target=function(t){return arguments.length?(e=ge(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),e=Vi,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Pt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},a.svg.symbol=function(){var t=Gi,e=Yi;function r(r,n){return(qi.get(t.call(this,r,n))||Wi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ge(e),r):t},r.size=function(t){return arguments.length?(e=ge(t),r):e},r};var qi=a.map({circle:Wi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Zi)),r=e*Zi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Xi),r=e*Xi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Xi),r=e*Xi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});a.svg.symbolTypes=qi.keys();var Xi=Math.sqrt(3),Zi=Math.tan(30*Dt);K.transition=function(t){for(var e,r,n=$i||++ra,i=aa(t),a=[],o=ta||{time:Date.now(),ease:Rr,delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(r=u[c])&&oa(r,c,i,n,o),e.push(r)}return Qi(a,i,n)},K.interrupt=function(t){return this.each(null==t?Ji:Ki(aa(t)))};var Ji=Ki(aa());function Ki(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Qi(t,e,r){return W(t,ea),t.namespace=e,t.id=r,t}var $i,ta,ea=[],ra=0;function na(t,e,r,n){var i=t.id,a=t.namespace;return vt(t,"function"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function ia(t){return null==t&&(t=""),function(){this.textContent=t}}function aa(t){return null==t?"__transition__":"__transition_"+t+"__"}function oa(t,e,r,n,i){var a,o,s,l,u,c=t[r]||(t[r]={active:0,count:0}),f=c[n];function h(r){var i=c.active,h=c[i];for(var p in h&&(h.timer.c=null,h.timer.t=NaN,--c.count,delete c[i],h.event&&h.event.interrupt.call(t,t.__data__,h.index)),c)if(+p<n){var v=c[p];v.timer.c=null,v.timer.t=NaN,--c.count,delete c[p]}o.c=d,Te((function(){return o.c&&d(r||1)&&(o.c=null,o.t=NaN),1}),0,a),c.active=n,f.event&&f.event.start.call(t,t.__data__,e),u=[],f.tween.forEach((function(r,n){(n=n.call(t,t.__data__,e))&&u.push(n)})),l=f.ease,s=f.duration}function d(i){for(var a=i/s,o=l(a),h=u.length;h>0;)u[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--c.count?delete c[n]:delete t[r],1}f||(a=i.time,o=Te((function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h}),0,a),f=c[n]={tween:new T,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}ea.call=K.call,ea.empty=K.empty,ea.node=K.node,ea.size=K.size,a.transition=function(t,e){return t&&t.transition?$i?t.transition(e):t:a.selection().transition(t)},a.transition.prototype=ea,ea.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=Q(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var u=this[s],c=-1,f=u.length;++c<f;)(n=u[c])&&(r=t.call(n,n.__data__,c,s))?("__data__"in n&&(r.__data__=n.__data__),oa(r,c,a,i,n[a][i]),e.push(r)):e.push(null)}return Qi(o,a,i)},ea.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=$(t);for(var u=-1,c=this.length;++u<c;)for(var f=this[u],h=-1,d=f.length;++h<d;)if(n=f[h]){a=n[s][o],r=t.call(n,n.__data__,h,u),l.push(e=[]);for(var p=-1,v=r.length;++p<v;)(i=r[p])&&oa(i,p,s,o,a),e.push(i)}return Qi(l,s,o)},ea.filter=function(t){var e,r,n=[];"function"!=typeof t&&(t=dt(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return Qi(n,this.namespace,this.id)},ea.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):vt(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},ea.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var r="transform"==t?Vr:Mr,n=a.ns.qualify(t);function i(){this.removeAttribute(n)}function o(){this.removeAttributeNS(n.space,n.local)}return na(this,"attr."+t,e,n.local?function(t){return null==t?o:(t+="",function(){var e,i=this.getAttributeNS(n.space,n.local);return i!==t&&(e=r(i,t),function(t){this.setAttributeNS(n.space,n.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(n);return i!==t&&(e=r(i,t),function(t){this.setAttribute(n,e(t))})})})},ea.attrTween=function(t,e){var r=a.ns.qualify(t);return this.tween("attr."+t,r.local?function(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}:function(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}})},ea.style=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=""),t)this.style(r,t[r],e);return this}r=""}function i(){this.style.removeProperty(t)}return na(this,"style."+t,e,(function(e){return null==e?i:(e+="",function(){var n,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(n=Mr(i,e),function(e){this.style.setProperty(t,n(e),r)})})}))},ea.styleTween=function(t,e,r){return arguments.length<3&&(r=""),this.tween("style."+t,(function(n,i){var a=e.call(this,n,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}}))},ea.text=function(t){return na(this,"text",t,ia)},ea.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},ea.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:("function"!=typeof t&&(t=a.ease.apply(a,arguments)),vt(this,(function(n){n[r][e].ease=t})))},ea.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:vt(this,"function"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},ea.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:vt(this,"function"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},ea.each=function(t,e){var r=this.id,n=this.namespace;if(arguments.length<2){var i=ta,o=$i;try{$i=r,vt(this,(function(e,i,a){ta=e[n][r],t.call(e,e.__data__,i,a)}))}finally{ta=i,$i=o}}else vt(this,(function(i){var o=i[n][r];(o.event||(o.event=a.dispatch("start","end","interrupt"))).on(t,e)}));return this},ea.transition=function(){for(var t,e,r,n=this.id,i=++ra,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var u,c=0,f=(u=this[s]).length;c<f;c++)(e=u[c])&&oa(e,c,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return Qi(o,a,i)},a.svg.axis=function(){var t,e=a.scale.linear(),r=sa,n=6,i=6,o=3,l=[10],u=null;function c(s){s.each((function(){var s,c=a.select(this),f=this.__chart__||e,h=this.__chart__=e.copy(),d=null==u?h.ticks?h.ticks.apply(h,l):h.domain():u,p=null==t?h.tickFormat?h.tickFormat.apply(h,l):I:t,v=c.selectAll(".tick").data(d,h),g=v.enter().insert("g",".domain").attr("class","tick").style("opacity",St),m=a.transition(v.exit()).style("opacity",St).remove(),y=a.transition(v.order()).style("opacity",1),x=Math.max(n,0)+o,b=Vn(h),_=c.selectAll(".domain").data([0]),w=(_.enter().append("path").attr("class","domain"),a.transition(_));g.append("line"),g.append("text");var M,T,A,k,L=g.select("line"),S=y.select("line"),E=v.select("text").text(p),C=g.select("text"),O=y.select("text"),R="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(s=ua,M="x",A="y",T="x2",k="y2",E.attr("dy",R<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+R*i+"V0H"+b[1]+"V"+R*i)):(s=ca,M="y",A="x",T="y2",k="x2",E.attr("dy",".32em").style("text-anchor",R<0?"end":"start"),w.attr("d","M"+R*i+","+b[0]+"H0V"+b[1]+"H"+R*i)),L.attr(k,R*n),C.attr(A,R*x),S.attr(T,0).attr(k,R*n),O.attr(M,0).attr(A,R*x),h.rangeBand){var P=h,D=P.rangeBand()/2;f=h=function(t){return P(t)+D}}else f.rangeBand?f=h:m.call(s,h,f);g.call(s,f,h),y.call(s,h,h)}))}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(r=t in la?t+"":sa,c):r},c.ticks=function(){return arguments.length?(l=s(arguments),c):l},c.tickValues=function(t){return arguments.length?(u=t,c):u},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(n=+t,i=+arguments[e-1],c):n},c.innerTickSize=function(t){return arguments.length?(n=+t,c):n},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(o=+t,c):o},c.tickSubdivide=function(){return arguments.length&&c},c};var sa="bottom",la={top:1,right:1,bottom:1,left:1};function ua(t,e,r){t.attr("transform",(function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"}))}function ca(t,e,r){t.attr("transform",(function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"}))}a.svg.brush=function(){var t,e,r=Y(h,"brushstart","brush","brushend"),n=null,i=null,o=[0,0],s=[0,0],l=!0,u=!0,f=ha[0];function h(t){t.each((function(){var t=a.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var r=t.selectAll(".resize").data(f,I);r.exit().remove(),r.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return fa[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),r.style("display",h.empty()?"none":null);var o,s=a.transition(t),l=a.transition(e);n&&(o=Vn(n),l.attr("x",o[0]).attr("width",o[1]-o[0]),p(s)),i&&(o=Vn(i),l.attr("y",o[0]).attr("height",o[1]-o[0]),v(s)),d(s)}))}function d(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+o[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"}))}function p(t){t.select(".extent").attr("x",o[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1]-o[0])}function v(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var f,g,m=this,y=a.select(a.event.target),x=r.of(m,arguments),b=a.select(m),_=y.datum(),w=!/^(n|s)$/.test(_)&&n,M=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),A=Tt(m),k=a.mouse(m),L=a.select(c(m)).on("keydown.brush",(function(){32==a.event.keyCode&&(T||(f=null,k[0]-=o[1],k[1]-=s[1],T=2),H())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==T&&(k[0]+=o[1],k[1]+=s[1],T=0,H())}));if(a.event.changedTouches?L.on("touchmove.brush",C).on("touchend.brush",R):L.on("mousemove.brush",C).on("mouseup.brush",R),b.interrupt().selectAll("*").interrupt(),T)k[0]=o[0]-k[0],k[1]=s[0]-k[1];else if(_){var S=+/w$/.test(_),E=+/^n/.test(_);g=[o[1-S]-k[0],s[1-E]-k[1]],k[0]=o[S],k[1]=s[E]}else a.event.altKey&&(f=k.slice());function C(){var t=a.mouse(m),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),T||(a.event.altKey?(f||(f=[(o[0]+o[1])/2,(s[0]+s[1])/2]),k[0]=o[+(t[0]<f[0])],k[1]=s[+(t[1]<f[1])]):f=null),w&&O(t,n,0)&&(p(b),e=!0),M&&O(t,i,1)&&(v(b),e=!0),e&&(d(b),x({type:"brush",mode:T?"move":"resize"}))}function O(r,n,i){var a,c,h=Vn(n),d=h[0],p=h[1],v=k[i],g=i?s:o,m=g[1]-g[0];if(T&&(d-=v,p-=m+v),a=(i?u:l)?Math.max(d,Math.min(p,r[i])):r[i],T?c=(a+=v)+m:(f&&(v=Math.max(d,Math.min(p,2*f[i]-a))),v<a?(c=a,a=v):c=v),g[0]!=a||g[1]!=c)return i?e=null:t=null,g[0]=a,g[1]=c,!0}function R(){C(),b.style("pointer-events","all").selectAll(".resize").style("display",h.empty()?"none":null),a.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),a.select("body").style("cursor",y.style("cursor")),x({type:"brushstart"}),C()}return h.event=function(n){n.each((function(){var n=r.of(this,arguments),i={x:o,y:s,i:t,j:e},l=this.__chart__||i;this.__chart__=i,$i?a.select(this).transition().each("start.brush",(function(){t=l.i,e=l.j,o=l.x,s=l.y,n({type:"brushstart"})})).tween("brush:brush",(function(){var r=Tr(o,i.x),a=Tr(s,i.y);return t=e=null,function(t){o=i.x=r(t),s=i.y=a(t),n({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,e=i.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})})):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))}))},h.x=function(t){return arguments.length?(f=ha[!(n=t)<<1|!i],h):n},h.y=function(t){return arguments.length?(f=ha[!n<<1|!(i=t)],h):i},h.clamp=function(t){return arguments.length?(n&&i?(l=!!t[0],u=!!t[1]):n?l=!!t:i&&(u=!!t),h):n&&i?[l,u]:n?l:i?u:null},h.extent=function(r){var a,l,u,c,f;return arguments.length?(n&&(a=r[0],l=r[1],i&&(a=a[0],l=l[0]),t=[a,l],n.invert&&(a=n(a),l=n(l)),l<a&&(f=a,a=l,l=f),a==o[0]&&l==o[1]||(o=[a,l])),i&&(u=r[0],c=r[1],n&&(u=u[1],c=c[1]),e=[u,c],i.invert&&(u=i(u),c=i(c)),c<u&&(f=u,u=c,c=f),u==s[0]&&c==s[1]||(s=[u,c])),h):(n&&(t?(a=t[0],l=t[1]):(a=o[0],l=o[1],n.invert&&(a=n.invert(a),l=n.invert(l)),l<a&&(f=a,a=l,l=f))),i&&(e?(u=e[0],c=e[1]):(u=s[0],c=s[1],i.invert&&(u=i.invert(u),c=i.invert(c)),c<u&&(f=u,u=c,c=f))),n&&i?[[a,u],[l,c]]:n?[a,l]:i&&[u,c])},h.clear=function(){return h.empty()||(o=[0,0],s=[0,0],t=e=null),h},h.empty=function(){return!!n&&o[0]==o[1]||!!i&&s[0]==s[1]},a.rebind(h,r,"on")};var fa={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ha=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function da(t){return JSON.parse(t.responseText)}function pa(t){var e=l.createRange();return e.selectNode(l.body),e.createContextualFragment(t.responseText)}a.text=me((function(t){return t.responseText})),a.json=function(t,e){return ye(t,"application/json",da,e)},a.html=function(t,e){return ye(t,"text/html",pa,e)},a.xml=me((function(t){return t.responseXML})),void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)}).apply(self)},3160:function(t,e,r){"use strict";r.r(e),r.d(e,{decode:function(){return s},encode:function(){return o}});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)i[n.charCodeAt(a)]=a;var o=function(t){var e,r=new Uint8Array(t),i=r.length,a="";for(e=0;e<i;e+=3)a+=n[r[e]>>2],a+=n[(3&r[e])<<4|r[e+1]>>4],a+=n[(15&r[e+1])<<2|r[e+2]>>6],a+=n[63&r[e+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},s=function(t){var e,r,n,a,o,s=.75*t.length,l=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),f=new Uint8Array(c);for(e=0;e<l;e+=4)r=i[t.charCodeAt(e)],n=i[t.charCodeAt(e+1)],a=i[t.charCodeAt(e+2)],o=i[t.charCodeAt(e+3)],f[u++]=r<<2|n>>4,f[u++]=(15&n)<<4|a>>2,f[u++]=(3&a)<<6|63&o;return c}},2420:function(t){t.exports=function(t,e,r){return e<r?t<e?e:t>r?r:t:t<r?r:t>e?e:t}},7592:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},2160:function(t,e,r){"use strict";var n=r(6824),i=r(2420),a=r(2512);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(a(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},6824:function(t,e,r){"use strict";var n=r(5532),i=r(3576),a=r(2420);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},5532:function(t,e,r){"use strict";var n=r(7592);t.exports=function(t){var e,r,a=[],o=1;if("string"==typeof t)if(t=t.toLowerCase(),n[t])a=n[t].slice(),r="rgb";else if("transparent"===t)o=0,r="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1);o=1,(c=s.length)<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===c&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===c&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var l=e[1],u="rgb"===l;r=s=l.replace(/a$/,"");var c="cmyk"===s?4:"gray"===s?1:3;a=e[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(t,e){if(/%$/.test(t))return e===c?parseFloat(t)/100:"rgb"===s?255*parseFloat(t)/100:parseFloat(t);if("h"===s[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==i[t])return i[t]}return parseFloat(t)})),l===s&&a.push(1),o=u||void 0===a[c]?1:a[c],a=a.slice(0,c)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(a=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),r=t.match(/([a-z])/gi).join("").toLowerCase());else isNaN(t)?Array.isArray(t)||t.length?(a=[t[0],t[1],t[2]],r="rgb",o=4===t.length?t[3]:1):t instanceof Object&&(null!=t.r||null!=t.red||null!=t.R?(r="rgb",a=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(r="hsl",a=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),o=t.a||t.alpha||t.opacity||1,null!=t.opacity&&(o/=100)):(r="rgb",a=[t>>>16,(65280&t)>>>8,255&t]);return{space:r,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},3576:function(t,e,r){"use strict";var n=r(9336);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},9336:function(t){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},7624:function(t,e,r){"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{E9:function(){return h},SO:function(){return v}});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(e=a.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var a=r[0],o=r[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var f,h,d=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(t){var e,r,a=void 0===t.grouping||void 0===t.thousands?c:(e=d.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",f=void 0===t.decimal?".":t.decimal+"",h=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(d.call(t.numerals,String)),v=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",m=void 0===t.nan?"NaN":t.nan+"";function y(t){var e=(t=o(t)).fill,r=t.align,n=t.sign,c=t.symbol,d=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),_=!0,w="g"),(d||"0"===e&&"="===r)&&(d=!0,e="0",r="=");var M="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===c?l:/[%p]/.test(w)?v:"",A=u[w],k=/[defgprs%]/.test(w);function L(t){var o,s,l,u=M,c=T;if("c"===w)c=A(t)+c,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?m:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case".":i=e=n;break;case"0":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),v&&0==+t&&"+"!==n&&(v=!1),u=(v?"("===n?n:g:"-"===n||"("===n?"":n)+u,c=("s"===w?p[8+i/3]:"")+c+(v&&"("===n?")":""),k)for(o=-1,s=t.length;++o<s;)if(48>(l=t.charCodeAt(o))||l>57){c=(46===l?f+t.slice(o+1):t.slice(o))+c,t=t.slice(0,o);break}}x&&!d&&(t=a(t,1/0));var L=u.length+t.length+c.length,S=L<y?new Array(y-L+1).join(e):"";switch(x&&d&&(t=a(S+t,S.length?y-c.length:1/0),S=""),r){case"<":t=u+t+c+S;break;case"=":t=u+S+t+c;break;case"^":t=S.slice(0,L=S.length>>1)+u+t+c+S.slice(L);break;default:t=S+u+t+c}return h(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),L.toString=function(){return t+""},L}return{format:y,formatPrefix:function(t,e){var r,i=y(((t=o(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-a),l=p[8+a/3];return function(t){return i(s*t)+l}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),h=f.format,f.formatPrefix},4336:function(t,e,r){"use strict";r.d(e,{Yn:function(){return p},m_:function(){return h},E9:function(){return v}});var n=r(8208),i=r(8931),a=r(6192),o=r(8936),s=r(2171),l=r(3528);function u(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function c(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function f(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function h(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,h=t.days,d=t.shortDays,p=t.months,v=t.shortMonths,m=w(l),y=M(l),x=w(h),b=M(h),_=w(d),Lt=M(d),St=w(p),Et=M(p),Ct=w(v),Ot=M(v),Rt={a:function(t){return d[t.getDay()]},A:function(t){return h[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return p[t.getMonth()]},c:null,d:Y,e:Y,f:Z,H:G,I:W,j:q,L:X,m:J,M:K,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:At,s:kt,S:Q,u:$,U:tt,V:et,w:rt,W:nt,x:null,X:null,y:it,Y:at,Z:ot,"%":Tt},Pt={a:function(t){return d[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return v[t.getUTCMonth()]},B:function(t){return p[t.getUTCMonth()]},c:null,d:st,e:st,f:ht,H:lt,I:ut,j:ct,L:ft,m:dt,M:pt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:At,s:kt,S:vt,u:gt,U:mt,V:yt,w:xt,W:bt,x:null,X:null,y:_t,Y:wt,Z:Mt,"%":Tt},Dt={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=Lt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=x.exec(e.slice(r));return n?(t.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=Ct.exec(e.slice(r));return n?(t.m=Ot[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Nt(t,e,r,n)},d:D,e:D,f:j,H:z,I:z,j:I,L:B,m:P,M:N,p:function(t,e,r){var n=m.exec(e.slice(r));return n?(t.p=y[n[0].toLowerCase()],r+n[0].length):-1},q:R,Q:H,s:V,S:F,u:A,U:k,V:L,w:T,W:S,x:function(t,e,n){return Nt(t,r,e,n)},X:function(t,e,r){return Nt(t,s,e,r)},y:C,Y:E,Z:O,"%":U};function It(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=g[n=t.charAt(++s)])?n=t.charAt(++s):i="e"===n?" ":"0",(a=e[n])&&(n=a(r,i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function zt(t,e){return function(r){var s,l,h=f(1900,void 0,1);if(Nt(h,t,r+="",0)!=r.length)return null;if("Q"in h)return new Date(h.Q);if("s"in h)return new Date(1e3*h.s+("L"in h?h.L:0));if(e&&!("Z"in h)&&(h.Z=0),"p"in h&&(h.H=h.H%12+12*h.p),void 0===h.m&&(h.m="q"in h?h.q:0),"V"in h){if(h.V<1||h.V>53)return null;"w"in h||(h.w=1),"Z"in h?(l=(s=c(f(h.y,0,1))).getUTCDay(),s=l>4||0===l?n.ot.ceil(s):(0,n.ot)(s),s=i.c.offset(s,7*(h.V-1)),h.y=s.getUTCFullYear(),h.m=s.getUTCMonth(),h.d=s.getUTCDate()+(h.w+6)%7):(l=(s=u(f(h.y,0,1))).getDay(),s=l>4||0===l?a.qT.ceil(s):(0,a.qT)(s),s=o.c.offset(s,7*(h.V-1)),h.y=s.getFullYear(),h.m=s.getMonth(),h.d=s.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),l="Z"in h?c(f(h.y,0,1)).getUTCDay():u(f(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(l+5)%7:h.w+7*h.U-(l+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,c(h)):u(h)}}function Nt(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o<s;){if(n>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Dt[i in g?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Rt.x=It(r,Rt),Rt.X=It(s,Rt),Rt.c=It(e,Rt),Pt.x=It(r,Pt),Pt.X=It(s,Pt),Pt.c=It(e,Pt),{format:function(t){var e=It(t+="",Rt);return e.toString=function(){return t},e},parse:function(t){var e=zt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+="",Pt);return e.toString=function(){return t},e},utcParse:function(t){var e=zt(t+="",!0);return e.toString=function(){return t},e}}}var d,p,v,g={"-":"",_:" ",0:"0"},m=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function _(t){return t.replace(x,"\\$&")}function w(t){return new RegExp("^(?:"+t.map(_).join("|")+")","i")}function M(t){for(var e={},r=-1,n=t.length;++r<n;)e[t[r].toLowerCase()]=r;return e}function T(t,e,r){var n=m.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function A(t,e,r){var n=m.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function k(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function L(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function S(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function E(t,e,r){var n=m.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function C(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function O(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function R(t,e,r){var n=m.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function P(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function D(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function I(t,e,r){var n=m.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function z(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function N(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function F(t,e,r){var n=m.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function B(t,e,r){var n=m.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function j(t,e,r){var n=m.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=y.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function H(t,e,r){var n=m.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=m.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function Y(t,e){return b(t.getDate(),e,2)}function G(t,e){return b(t.getHours(),e,2)}function W(t,e){return b(t.getHours()%12||12,e,2)}function q(t,e){return b(1+o.c.count((0,s.c)(t),t),e,3)}function X(t,e){return b(t.getMilliseconds(),e,3)}function Z(t,e){return X(t,e)+"000"}function J(t,e){return b(t.getMonth()+1,e,2)}function K(t,e){return b(t.getMinutes(),e,2)}function Q(t,e){return b(t.getSeconds(),e,2)}function $(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return b(a.uU.count((0,s.c)(t)-1,t),e,2)}function et(t,e){var r=t.getDay();return t=r>=4||0===r?(0,a.kD)(t):a.kD.ceil(t),b(a.kD.count((0,s.c)(t),t)+(4===(0,s.c)(t).getDay()),e,2)}function rt(t){return t.getDay()}function nt(t,e){return b(a.qT.count((0,s.c)(t)-1,t),e,2)}function it(t,e){return b(t.getFullYear()%100,e,2)}function at(t,e){return b(t.getFullYear()%1e4,e,4)}function ot(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+b(e/60|0,"0",2)+b(e%60,"0",2)}function st(t,e){return b(t.getUTCDate(),e,2)}function lt(t,e){return b(t.getUTCHours(),e,2)}function ut(t,e){return b(t.getUTCHours()%12||12,e,2)}function ct(t,e){return b(1+i.c.count((0,l.c)(t),t),e,3)}function ft(t,e){return b(t.getUTCMilliseconds(),e,3)}function ht(t,e){return ft(t,e)+"000"}function dt(t,e){return b(t.getUTCMonth()+1,e,2)}function pt(t,e){return b(t.getUTCMinutes(),e,2)}function vt(t,e){return b(t.getUTCSeconds(),e,2)}function gt(t){var e=t.getUTCDay();return 0===e?7:e}function mt(t,e){return b(n.EV.count((0,l.c)(t)-1,t),e,2)}function yt(t,e){var r=t.getUTCDay();return t=r>=4||0===r?(0,n.yA)(t):n.yA.ceil(t),b(n.yA.count((0,l.c)(t),t)+(4===(0,l.c)(t).getUTCDay()),e,2)}function xt(t){return t.getUTCDay()}function bt(t,e){return b(n.ot.count((0,l.c)(t)-1,t),e,2)}function _t(t,e){return b(t.getUTCFullYear()%100,e,2)}function wt(t,e){return b(t.getUTCFullYear()%1e4,e,4)}function Mt(){return"+0000"}function Tt(){return"%"}function At(t){return+t}function kt(t){return Math.floor(+t/1e3)}d=h({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),p=d.format,d.parse,v=d.utcFormat,d.utcParse},8936:function(t,e,r){"use strict";r.d(e,{m:function(){return o}});var n=r(1628),i=r(9792),a=(0,n.c)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.iy)/i.SK}),(function(t){return t.getDate()-1}));e.c=a;var o=a.range},9792:function(t,e,r){"use strict";r.d(e,{KK:function(){return s},SK:function(){return o},cg:function(){return a},iy:function(){return i},yc:function(){return n}});var n=1e3,i=6e4,a=36e5,o=864e5,s=6048e5},3220:function(t,e,r){"use strict";r.r(e),r.d(e,{timeDay:function(){return m.c},timeDays:function(){return m.m},timeFriday:function(){return y.iB},timeFridays:function(){return y.sJ},timeHour:function(){return v},timeHours:function(){return g},timeInterval:function(){return n.c},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return h},timeMinutes:function(){return d},timeMonday:function(){return y.qT},timeMondays:function(){return y.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return y.Wc},timeSaturdays:function(){return y.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return y.uU},timeSundays:function(){return y.Ab},timeThursday:function(){return y.kD},timeThursdays:function(){return y.eC},timeTuesday:function(){return y.Mf},timeTuesdays:function(){return y.Oc},timeWednesday:function(){return y.eg},timeWednesdays:function(){return y.sn},timeWeek:function(){return y.uU},timeWeeks:function(){return y.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return E.c},utcDays:function(){return E.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return L},utcHours:function(){return S},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return T},utcMinutes:function(){return A},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return R},utcMonths:function(){return P},utcSaturday:function(){return C.Ad},utcSaturdays:function(){return C.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return C.EV},utcSundays:function(){return C.Wq},utcThursday:function(){return C.yA},utcThursdays:function(){return C.ob},utcTuesday:function(){return C.sG},utcTuesdays:function(){return C.kl},utcWednesday:function(){return C._6},utcWednesdays:function(){return C.W_},utcWeek:function(){return C.EV},utcWeeks:function(){return C.Wq},utcYear:function(){return D.c},utcYears:function(){return D.i}});var n=r(1628),i=(0,n.c)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.c)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i,o=i.range,s=r(9792),l=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.yc)}),(function(t,e){return(e-t)/s.yc}),(function(t){return t.getUTCSeconds()})),u=l,c=l.range,f=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.yc)}),(function(t,e){t.setTime(+t+e*s.iy)}),(function(t,e){return(e-t)/s.iy}),(function(t){return t.getMinutes()})),h=f,d=f.range,p=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.yc-t.getMinutes()*s.iy)}),(function(t,e){t.setTime(+t+e*s.cg)}),(function(t,e){return(e-t)/s.cg}),(function(t){return t.getHours()})),v=p,g=p.range,m=r(8936),y=r(6192),x=(0,n.c)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),b=x,_=x.range,w=r(2171),M=(0,n.c)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.iy)}),(function(t,e){return(e-t)/s.iy}),(function(t){return t.getUTCMinutes()})),T=M,A=M.range,k=(0,n.c)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.cg)}),(function(t,e){return(e-t)/s.cg}),(function(t){return t.getUTCHours()})),L=k,S=k.range,E=r(8931),C=r(8208),O=(0,n.c)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),R=O,P=O.range,D=r(3528)},1628:function(t,e,r){"use strict";r.d(e,{c:function(){return a}});var n=new Date,i=new Date;function a(t,e,r,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e<r-t?e:r},s.offset=function(t,r){return e(t=new Date(+t),null==r?1:Math.floor(r)),t},s.range=function(r,n,i){var a,o=[];if(r=s.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return o;do{o.push(a=new Date(+r)),e(r,i),t(r)}while(a<r&&r<n);return o},s.filter=function(r){return a((function(e){if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,a){return n.setTime(+e),i.setTime(+a),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},8931:function(t,e,r){"use strict";r.d(e,{o:function(){return o}});var n=r(1628),i=r(9792),a=(0,n.c)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.SK}),(function(t){return t.getUTCDate()-1}));e.c=a;var o=a.range},8208:function(t,e,r){"use strict";r.d(e,{Ad:function(){return h},EV:function(){return o},K8:function(){return x},W_:function(){return g},Wq:function(){return d},_6:function(){return u},iG:function(){return y},iO:function(){return p},kl:function(){return v},ob:function(){return m},od:function(){return f},ot:function(){return s},sG:function(){return l},yA:function(){return c}});var n=r(1628),i=r(9792);function a(t){return(0,n.c)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),h=a(6),d=o.range,p=s.range,v=l.range,g=u.range,m=c.range,y=f.range,x=h.range},3528:function(t,e,r){"use strict";r.d(e,{i:function(){return a}});var n=r(1628),i=(0,n.c)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.c)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null},e.c=i;var a=i.range},6192:function(t,e,r){"use strict";r.d(e,{Ab:function(){return d},Mf:function(){return l},Oc:function(){return v},QP:function(){return p},Wc:function(){return h},aI:function(){return x},eC:function(){return m},eg:function(){return u},iB:function(){return f},kD:function(){return c},qT:function(){return s},sJ:function(){return y},sn:function(){return g},uU:function(){return o}});var n=r(1628),i=r(9792);function a(t){return(0,n.c)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.iy)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),h=a(6),d=o.range,p=s.range,v=l.range,g=u.range,m=c.range,y=f.range,x=h.range},2171:function(t,e,r){"use strict";r.d(e,{Q:function(){return a}});var n=r(1628),i=(0,n.c)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.c)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null},e.c=i;var a=i.range},2512:function(t){t.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},1252:function(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,a),n(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}v(t,e,a,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&v(t,"error",e,{once:!0})}(t,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,a,o,u;if(s(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),o=a[e]),void 0===o)o=a[e]=r,++t._eventsCount;else if("function"==typeof o?o=a[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(t))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function v(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(a){n.once&&t.removeEventListener(e,i),r(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var u=l.length,c=p(l,u);for(r=0;r<u;++r)n(c[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return s(e),this.on(t,f(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,f(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,a,o;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},8248:function(t,e,r){"use strict";var n=r(4576);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},3380:function(t){t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width),"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf("webgl")&&a.push("experimental-"+t);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i))return n}catch(t){n=null}return n||null}},2408:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],v=e[13],g=e[14],m=e[15];return t[0]=s*(h*m-d*g)-f*(l*m-u*g)+v*(l*d-u*h),t[1]=-(n*(h*m-d*g)-f*(i*m-a*g)+v*(i*d-a*h)),t[2]=n*(l*m-u*g)-s*(i*m-a*g)+v*(i*u-a*l),t[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),t[4]=-(o*(h*m-d*g)-c*(l*m-u*g)+p*(l*d-u*h)),t[5]=r*(h*m-d*g)-c*(i*m-a*g)+p*(i*d-a*h),t[6]=-(r*(l*m-u*g)-o*(i*m-a*g)+p*(i*u-a*l)),t[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),t[8]=o*(f*m-d*v)-c*(s*m-u*v)+p*(s*d-u*f),t[9]=-(r*(f*m-d*v)-c*(n*m-a*v)+p*(n*d-a*f)),t[10]=r*(s*m-u*v)-o*(n*m-a*v)+p*(n*u-a*s),t[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),t[12]=-(o*(f*g-h*v)-c*(s*g-l*v)+p*(s*h-l*f)),t[13]=r*(f*g-h*v)-c*(n*g-i*v)+p*(n*h-i*f),t[14]=-(r*(s*g-l*v)-o*(n*g-i*v)+p*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),t}},6860:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4492:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},4212:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},800:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return(e*o-r*a)*(f*g-h*v)-(e*s-n*a)*(c*g-h*p)+(e*l-i*a)*(c*v-f*p)+(r*s-n*o)*(u*g-h*d)-(r*l-i*o)*(u*v-f*d)+(n*l-i*s)*(u*p-c*d)}},1784:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,p=i*l,v=a*o,g=a*s,m=a*l;return t[0]=1-f-p,t[1]=c+m,t[2]=h-g,t[3]=0,t[4]=c-m,t[5]=1-u-p,t[6]=d+v,t[7]=0,t[8]=h+g,t[9]=d-v,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},1616:function(t){t.exports=function(t,e,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(o*=u=1/u,s*=u,l*=u,n=Math.sin(e),a=1-(i=Math.cos(e)),t[0]=o*o*a+i,t[1]=s*o*a+l*n,t[2]=l*o*a-s*n,t[3]=0,t[4]=o*s*a-l*n,t[5]=s*s*a+i,t[6]=l*s*a+o*n,t[7]=0,t[8]=o*l*a+s*n,t[9]=s*l*a-o*n,t[10]=l*l*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},1944:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,p=i*u,v=a*u,g=o*s,m=o*l,y=o*u;return t[0]=1-(d+v),t[1]=f+y,t[2]=h-m,t[3]=0,t[4]=f-y,t[5]=1-(c+v),t[6]=p+g,t[7]=0,t[8]=h+m,t[9]=p-g,t[10]=1-(c+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},9444:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8268:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1856:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},9216:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7736:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8848:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t}},6635:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6524:function(t,e,r){t.exports={create:r(4212),clone:r(6860),copy:r(4492),identity:r(6635),transpose:r(6520),invert:r(4308),adjoint:r(2408),determinant:r(800),multiply:r(944),translate:r(5176),scale:r(8152),rotate:r(16),rotateX:r(5456),rotateY:r(4840),rotateZ:r(4192),fromRotation:r(1616),fromRotationTranslation:r(1944),fromScaling:r(9444),fromTranslation:r(8268),fromXRotation:r(1856),fromYRotation:r(9216),fromZRotation:r(7736),fromQuat:r(1784),frustum:r(8848),perspective:r(1296),perspectiveFromFieldOfView:r(3688),ortho:r(7688),lookAt:r(6508),str:r(9412)}},4308:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,M=i*u-a*l,T=c*v-f*p,A=c*g-h*p,k=c*m-d*p,L=f*g-h*v,S=f*m-d*v,E=h*m-d*g,C=y*E-x*S+b*L+_*k-w*A+M*T;return C?(C=1/C,t[0]=(s*E-l*S+u*L)*C,t[1]=(i*S-n*E-a*L)*C,t[2]=(v*M-g*w+m*_)*C,t[3]=(h*w-f*M-d*_)*C,t[4]=(l*k-o*E-u*A)*C,t[5]=(r*E-i*k+a*A)*C,t[6]=(g*b-p*M-m*x)*C,t[7]=(c*M-h*b+d*x)*C,t[8]=(o*S-s*k+u*T)*C,t[9]=(n*k-r*S-a*T)*C,t[10]=(p*w-v*b+m*y)*C,t[11]=(f*b-c*w-d*y)*C,t[12]=(s*A-o*L-l*T)*C,t[13]=(r*L-n*A+i*T)*C,t[14]=(v*x-p*_-g*y)*C,t[15]=(c*_-f*x+h*y)*C,t):null}},6508:function(t,e,r){var n=r(6635);t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,d,p,v=e[0],g=e[1],m=e[2],y=i[0],x=i[1],b=i[2],_=r[0],w=r[1],M=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(m-M)<1e-6?n(t):(f=v-_,h=g-w,d=m-M,a=x*(d*=p=1/Math.sqrt(f*f+h*h+d*d))-b*(h*=p),o=b*(f*=p)-y*d,s=y*h-x*f,(p=Math.sqrt(a*a+o*o+s*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),l=h*s-d*o,u=d*a-f*s,c=f*o-h*a,(p=Math.sqrt(l*l+u*u+c*c))?(l*=p=1/p,u*=p,c*=p):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=d,t[11]=0,t[12]=-(a*v+o*g+s*m),t[13]=-(l*v+u*g+c*m),t[14]=-(f*v+h*g+d*m),t[15]=1,t)}},944:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*d+w*m,t[3]=x*o+b*c+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*d+w*m,t[7]=x*o+b*c+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*d+w*m,t[11]=x*o+b*c+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*d+w*m,t[15]=x*o+b*c+_*p+w*y,t}},7688:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},1296:function(t){t.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},3688:function(t){t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},16:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,d,p,v,g,m,y,x,b,_,w,M,T,A,k,L,S=n[0],E=n[1],C=n[2],O=Math.sqrt(S*S+E*E+C*C);return Math.abs(O)<1e-6?null:(S*=O=1/O,E*=O,C*=O,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],d=e[6],p=e[7],v=e[8],g=e[9],m=e[10],y=e[11],x=S*S*o+a,b=E*S*o+C*i,_=C*S*o-E*i,w=S*E*o-C*i,M=E*E*o+a,T=C*E*o+S*i,A=S*C*o+E*i,k=E*C*o-S*i,L=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+d*b+m*_,t[3]=c*x+p*b+y*_,t[4]=s*w+f*M+v*T,t[5]=l*w+h*M+g*T,t[6]=u*w+d*M+m*T,t[7]=c*w+p*M+y*T,t[8]=s*A+f*k+v*L,t[9]=l*A+h*k+g*L,t[10]=u*A+d*k+m*L,t[11]=c*A+p*k+y*L,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},5456:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},4840:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},4192:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},8152:function(t){t.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},9412:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},5176:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,d,p,v=r[0],g=r[1],m=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*m+e[12],t[13]=e[1]*v+e[5]*g+e[9]*m+e[13],t[14]=e[2]*v+e[6]*g+e[10]*m+e[14],t[15]=e[3]*v+e[7]*g+e[11]*m+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=n*v+s*g+f*m+e[12],t[13]=i*v+l*g+h*m+e[13],t[14]=a*v+u*g+d*m+e[14],t[15]=o*v+c*g+p*m+e[15]),t}},6520:function(t){t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},2264:function(t,e,r){"use strict";var n,i=r(1820);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},9184:function(t,e,r){"use strict";var n=r(1820);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},1820:function(t){t.exports=!0},4576:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},9128:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},8324:function(t,e,r){var n;!function(i,a,o){a[i]=a[i]||function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function a(t,n){r.add(t,n),e||(e=i(r.drain))}function o(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t<this.chain.length;t++)l(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function l(t,e,r){var n,i;try{!1===e?r.reject(t.msg):(n=!0===e?t.msg:e.call(void 0,t.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(i=o(n))?i.call(n,r.resolve,r.reject):r.resolve(n)}catch(t){r.reject(t)}}function u(t){var e,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(e=o(t))?a((function(){var n=new h(r);try{e.call(t,(function(){u.apply(n,arguments)}),(function(){c.apply(n,arguments)}))}catch(t){c.call(n,t)}})):(r.msg=t,r.state=1,r.chain.length>0&&a(s,r))}catch(t){c.call(new h(r),t)}}}function c(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&a(s,e))}function f(t,e,r,n){for(var i=0;i<e.length;i++)!function(i){t.resolve(e[i]).then((function(t){r(i,t)}),n)}(i)}function h(t){this.def=t,this.triggered=!1}function d(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var e=new d(this);this.then=function(t,r){var n={success:"function"!=typeof t||t,failure:"function"==typeof r&&r};return n.promise=new this.constructor((function(t,e){if("function"!=typeof t||"function"!=typeof e)throw TypeError("Not a function");n.resolve=t,n.reject=e})),e.chain.push(n),0!==e.state&&a(s,e),n.promise},this.catch=function(t){return this.then(void 0,t)};try{t.call(void 0,(function(t){u.call(e,t)}),(function(t){c.call(e,t)}))}catch(t){c.call(e,t)}}r=function(){var t,r,n;function i(t,e){this.fn=t,this.self=e,this.next=void 0}return{add:function(e,a){n=new i(e,a),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var n=t;for(t=r=e=void 0;n;)n.fn.call(n.self),n=n.next}}}();var v=t({},"constructor",p,!1);return p.prototype=v,t(v,"__NPO__",0,!1),t(p,"resolve",(function(t){return t&&"object"==typeof t&&1===t.__NPO__?t:new this((function(e,r){if("function"!=typeof e||"function"!=typeof r)throw TypeError("Not a function");e(t)}))})),t(p,"reject",(function(t){return new this((function(e,r){if("function"!=typeof e||"function"!=typeof r)throw TypeError("Not a function");r(t)}))})),t(p,"all",(function(t){var e=this;return"[object Array]"!=n.call(t)?e.reject(TypeError("Not an array")):0===t.length?e.resolve([]):new e((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var i=t.length,a=Array(i),o=0;f(e,t,(function(t,e){a[t]=e,++o===i&&r(a)}),n)}))})),t(p,"race",(function(t){var e=this;return"[object Array]"!=n.call(t)?e.reject(TypeError("Not an array")):new e((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");f(e,t,(function(t,e){r(e)}),n)}))})),p}(),t.exports?t.exports=a[i]:void 0===(n=function(){return a[i]}.call(e,r,e,t))||(t.exports=n)}("Promise",void 0!==r.g?r.g:this)},896:function(t){"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))r.call(a,u)&&(s[u]=a[u]);if(e){o=e(a);for(var c=0;c<o.length;c++)n.call(a,o[c])&&(s[o[c]]=a[o[c]])}}return s}},9604:function(t){t.exports=function(t){var i=[];return t.replace(r,(function(t,r,a){var o=r.toLowerCase();for(a=function(t){var e=t.match(n);return e?e.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==e[o])return a.unshift(r),i.push(a);if(a.length<e[o])throw new Error("malformed path data");i.push([r].concat(a.splice(0,e[o])))}})),i};var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi,n=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},1456:function(t){t.exports=function(t,e,r,n){var i=t[0],a=t[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,u=s-1;l<s;u=l++){var c=e[l+r][0],f=e[l+r][1],h=e[u+r][0],d=e[u+r][1];f>a!=d>a&&i<(h-c)*(a-f)/(d-f)+c&&(o=!o)}return o}},4756:function(t,e,r){var n,i=r(2928),a=r(8648),o=r(9819),s=r(1403),l=r(2368),u=r(7792),c=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?c=i():!1===t&&(c=!1),!1!==c&&c.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,c);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,c).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,c),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,c),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,c),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,c),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,c),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,c),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(n,t)},polygonToGeoJSON:function(t){return u.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},2928:function(t){t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},8648:function(t){t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t||l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],u=a*l-o*s;if(Math.abs(u)<t)return!1;var c=e[0]-n[0],f=e[1]-n[1],h=(s*f-l*c)/u,d=(a*f-o*c)/u,p={alongA:0,alongB:0,pt:[e[0]+h*a,e[1]+h*o]};return p.alongA=h<=-t?-2:h<t?-1:h-1<=-t?0:h-1<t?1:2,p.alongB=d<=-t?-2:d<t?-1:d-1<=-t?0:d-1<t?1:2,p},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var u=r[l][0],c=r[l][1];c-i>t!=o-i>t&&(a-u)*(i-c)/(o-c)+u-n>t&&(s=!s),a=u,o=c}return s}};return e}},7792:function(t){var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if("Polygon"===e.type)return t.polygon(r(e.coordinates));if("MultiPolygon"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r<t.children.length;r++)if(n(e,(s=t.children[r]).region))return void o(s,e);var a=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}var c=[];function f(t){var e=[u(t.region,!1)];c.push(e);for(var r=0;r<t.children.length;r++)e.push(h(t.children[r]))}function h(t){for(var e=0;e<t.children.length;e++)f(t.children[e]);return u(t.region,!0)}for(s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:"Polygon",coordinates:[]}:1==c.length?{type:"Polygon",coordinates:c[0]}:{type:"MultiPolygon",coordinates:c}}};t.exports=e},9819:function(t,e,r){var n=r(8088);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,(function(n){return i=t.isStart,a=t.pt,o=r,s=n.isStart,l=n.pt,u=n.other.pt,(0!==(c=e.pointsCompare(a,l))?c:e.pointsSame(o,u)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(o,s?l:u,s?u:l)?1:-1)<0;var i,a,o,s,l,u,c}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function u(i,o){var s=n.create();function u(t){return s.findTransition((function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)||e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)>0}))}function c(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,u,c);if(!1===f){if(!e.pointsCollinear(o,s,u))return!1;if(e.pointsSame(o,c)||e.pointsSame(s,u))return!1;var h=e.pointsSame(o,u),d=e.pointsSame(s,c);if(h&&d)return n;var p=!h&&e.pointBetween(o,u,c),v=!d&&e.pointBetween(s,u,c);if(h)return v?l(n,s):l(t,c),n;p&&(d||(v?l(n,s):l(t,c)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,u):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,c)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var d=u(h),p=d.before?d.before.ev:null,v=d.after?d.after.ev:null;function g(){if(p){var t=c(h,p);if(t)return t}return!!v&&c(h,v)}r&&r.tempStatus(h.seg,!!p&&p.seg,!!v&&v.seg);var m,y,x=g();if(x)t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&&r.rewind(h.seg);continue}t?(y=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=v?v.seg.myFill.above:i,h.seg.myFill.above=y?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(m=v?h.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:m,below:m}),r&&r.status(h.seg,!!p&&p.seg,!!v&&v.seg),h.other.status=d.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l<t.length;l++){n=o,o=t[l];var u=e.pointsCompare(n,o);0!==u&&s((i=u<0?n:o,a=u<0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return u(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach((function(t){s(i(t.start,t.end,t),!0)})),r.forEach((function(t){s(i(t.start,t.end,t),!1)})),u(e,n)}}}},8088:function(t){t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},1403:function(t){t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},u=s,c=0;c<n.length;c++){var f=(g=n[c])[0],h=(g[1],g[g.length-1]);if(g[g.length-2],e.pointsSame(f,a)){if(T(c,!0,!0))break}else if(e.pointsSame(f,o)){if(T(c,!0,!1))break}else if(e.pointsSame(h,a)){if(T(c,!1,!0))break}else if(e.pointsSame(h,o)&&T(c,!1,!1))break}if(u===s)return n.push([a,o]),void(r&&r.chainNew(a,o));if(u===l){r&&r.chainMatch(s.index);var d=s.index,p=s.matches_pt1?o:a,v=s.matches_head,g=n[d],m=v?g[0]:g[g.length-1],y=v?g[1]:g[g.length-2],x=v?g[g.length-1]:g[0],b=v?g[g.length-2]:g[1];return e.pointsCollinear(y,m,p)&&(v?(r&&r.chainRemoveHead(s.index,p),g.shift()):(r&&r.chainRemoveTail(s.index,p),g.pop()),m=y),e.pointsSame(x,p)?(n.splice(d,1),e.pointsCollinear(b,x,m)&&(v?(r&&r.chainRemoveTail(s.index,m),g.pop()):(r&&r.chainRemoveHead(s.index,m),g.shift())),r&&r.chainClose(s.index),void i.push(g)):void(v?(r&&r.chainAddHead(s.index,p),g.unshift(p)):(r&&r.chainAddTail(s.index,p),g.push(p)))}var _=s.index,w=l.index;r&&r.chainConnect(_,w);var M=n[_].length<n[w].length;s.matches_head?l.matches_head?M?(A(_),k(_,w)):(A(w),k(w,_)):k(w,_):l.matches_head?k(_,w):M?(A(_),k(w,_)):(A(w),k(_,w))}function T(t,e,r){return u.index=t,u.matches_head=e,u.matches_pt1=r,u===s?(u=l,!1):(u=null,!0)}function A(t){r&&r.chainReverse(t),n[t].reverse()}function k(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],u=o[0],c=o[1];e.pointsCollinear(l,s,u)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,u,c)&&(r&&r.chainRemoveHead(i,u),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}})),i}},2368:function(t){function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},4168:function(t){var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,l=[],u=!1,c=-1;function f(){u&&s&&(u=!1,s.length?l=s.concat(l):c=-1,l.length&&h())}function h(){if(!u){var t=o(f);u=!0;for(var e=l.length;e;){for(s=l,l=[];++c<e;)s&&s[c].run();c=-1,e=l.length}s=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new d(t,e)),1!==l.length||u||o(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},9760:function(t,e,r){var n;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,u=i.min,c=i.max,f=i.random;function h(t,e){if(e=e||{},(t=t||"")instanceof h)return t;if(!(this instanceof h))return new h(t,e);var r=function(t){var e,r,n,s={r:0,g:0,b:0},l=1,f=null,h=null,d=null,p=!1,v=!1;return"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(o,"").toLowerCase();var e,r=!1;if(C[t])t=C[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=V.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=V.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=V.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=V.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=V.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=V.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=V.hex8.exec(t))?{r:I(e[1]),g:I(e[2]),b:I(e[3]),a:B(e[4]),format:r?"name":"hex8"}:(e=V.hex6.exec(t))?{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:r?"name":"hex"}:(e=V.hex4.exec(t))?{r:I(e[1]+""+e[1]),g:I(e[2]+""+e[2]),b:I(e[3]+""+e[3]),a:B(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=V.hex3.exec(t))&&{r:I(e[1]+""+e[1]),g:I(e[2]+""+e[2]),b:I(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(Y(t.r)&&Y(t.g)&&Y(t.b)?(e=t.r,r=t.g,n=t.b,s={r:255*P(e,255),g:255*P(r,255),b:255*P(n,255)},p=!0,v="%"===String(t.r).substr(-1)?"prgb":"rgb"):Y(t.h)&&Y(t.s)&&Y(t.v)?(f=N(t.s),h=N(t.v),s=function(t,e,r){t=6*P(t,360),e=P(e,100),r=P(r,100);var n=i.floor(t),a=t-n,o=r*(1-e),s=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6;return{r:255*[r,s,o,o,l,r][u],g:255*[l,r,r,s,o,o][u],b:255*[o,o,l,r,r,s][u]}}(t.h,f,h),p=!0,v="hsv"):Y(t.h)&&Y(t.s)&&Y(t.l)&&(f=N(t.s),d=N(t.l),s=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=P(t,360),e=P(e,100),r=P(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,f,d),p=!0,v="hsl"),t.hasOwnProperty("a")&&(l=t.a)),l=R(l),{ok:p,format:t.format||v,r:u(255,c(s.r,0)),g:u(255,c(s.g,0)),b:u(255,c(s.b,0)),a:l}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=s++}function d(t,e,r){t=P(t,255),e=P(e,255),r=P(r,255);var n,i,a=c(t,e,r),o=u(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,l:s}}function p(t,e,r){t=P(t,255),e=P(e,255),r=P(r,255);var n,i,a=c(t,e,r),o=u(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,v:s}}function v(t,e,r,n){var i=[z(l(t).toString(16)),z(l(e).toString(16)),z(l(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(t,e,r,n){return[z(F(n)),z(l(t).toString(16)),z(l(e).toString(16)),z(l(r).toString(16))].join("")}function m(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s-=e/100,r.s=D(r.s),h(r)}function y(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s+=e/100,r.s=D(r.s),h(r)}function x(t){return h(t).desaturate(100)}function b(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l+=e/100,r.l=D(r.l),h(r)}function _(t,e){e=0===e?0:e||10;var r=h(t).toRgb();return r.r=c(0,u(255,r.r-l(-e/100*255))),r.g=c(0,u(255,r.g-l(-e/100*255))),r.b=c(0,u(255,r.b-l(-e/100*255))),h(r)}function w(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l-=e/100,r.l=D(r.l),h(r)}function M(t,e){var r=h(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,h(r)}function T(t){var e=h(t).toHsl();return e.h=(e.h+180)%360,h(e)}function A(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+120)%360,s:e.s,l:e.l}),h({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+90)%360,s:e.s,l:e.l}),h({h:(r+180)%360,s:e.s,l:e.l}),h({h:(r+270)%360,s:e.s,l:e.l})]}function L(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+72)%360,s:e.s,l:e.l}),h({h:(r+216)%360,s:e.s,l:e.l})]}function S(t,e,r){e=e||6,r=r||30;var n=h(t).toHsl(),i=360/r,a=[h(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(h(n));return a}function E(t,e){e=e||6;for(var r=h(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(h({h:n,s:i,v:a})),a=(a+s)%1;return o}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=R(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return v(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[z(l(t).toString(16)),z(l(e).toString(16)),z(l(r).toString(16)),z(F(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*P(this._r,255))+"%",g:l(100*P(this._g,255))+"%",b:l(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*P(this._r,255))+"%, "+l(100*P(this._g,255))+"%, "+l(100*P(this._b,255))+"%)":"rgba("+l(100*P(this._r,255))+"%, "+l(100*P(this._g,255))+"%, "+l(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+g(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=h(t);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(T,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},h.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:N(t[n]));t=r}return h(t,e)},h.equals=function(t,e){return!(!t||!e)&&h(t).toRgbString()==h(e).toRgbString()},h.random=function(){return h.fromRatio({r:f(),g:f(),b:f()})},h.mix=function(t,e,r){r=0===r?0:r||50;var n=h(t).toRgb(),i=h(e).toRgb(),a=r/100;return h({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},h.readability=function(t,e){var r=h(t),n=h(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},h.isReadable=function(t,e,r){var n,i,a,o,s,l=h.readability(t,e);switch(i=!1,(a=r,"AA"!==(o=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},h.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=h.readability(t,e[u]))>l&&(l=n,s=h(e[u]));return h.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],r))};var C=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=h.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(C);function R(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function P(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,c(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function D(t){return u(1,c(0,t))}function I(t){return parseInt(t,16)}function z(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}function F(t){return i.round(255*parseFloat(t)).toString(16)}function B(t){return I(t)/255}var j,U,H,V=(U="[\\s|\\(]+("+(j="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",H="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(t){return!!V.CSS_UNIT.exec(t)}t.exports?t.exports=h:void 0===(n=function(){return h}.call(e,r,e,t))||(t.exports=n)}(Math)},5408:function(t,e,r){var n=r(3380);t.exports=function(t){return n("webgl",t)}},7020:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"闰"===e[0]&&(r=!0,e=e.substring(1)),"月"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),f[t-f[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(i=a.newDate(l,u,c)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a={}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var u,c=f[o.year-f[0]],d=c>>13;u=d&&(o.month>d||o.isIntercalary)?o.month:o.month-1;for(var p=0;p<u;p++)s+=c&1<<12-p?30:29;var v=h[o.year-h[0]],g=new Date(v>>9&4095,(v>>5&15)-1,(31&v)+s);return a.year=g.getFullYear(),a.month=1+g.getMonth(),a.day=g.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a={}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(i.year,i.month-1,i.day);l=Math.round((c-u)/864e5);var d,p=f[a.year-f[0]];for(d=0;d<13;d++){var v=p&1<<12-d?30:29;if(l<v)break;l-=v}var g=p>>13;return!g||d<g?(a.isIntercalary=!1,a.month=1+d):d===g?(a.isIntercalary=!0,a.month=d):(a.isIntercalary=!1,a.month=d),a.day=1+l,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),f=this.isIntercalaryMonth(u,s),h=a&&f?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);h!==c&&l.month(h)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,l=/^\d?\d[iI]?/m,u=/^闰?十?[一二三四五六七八九]?月/m,c=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],h=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},7411:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},3288:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},2787:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},2084:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},6368:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},4747:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},5616:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},632:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s<i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},5420:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},1104:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=t-this.toJD(l,c,1)+1;return this.newDate(l,c,f)}}),n.calendars.persian=a,n.calendars.jalali=a},9075:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},4592:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},5348:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā","Yawm al-Arbaā","Yawm al-Khamīs","Yawm al-Juma","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a<o.length;a++){if(o[a]>r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},8700:function(t,e,r){var n=r(896);function i(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(i.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);i=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(t){for(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return u.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(u.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\{0\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=1524+(r=e+1+r-Math.floor(r/4)),i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=t.exports=new i;u.cdate=a,u.baseCalendar=s,u.calendars.gregorian=l},5168:function(t,e,r){var n=r(896),i=r(8700);n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s=(r=r||{}).dayNamesShort||this.local.dayNamesShort,l=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;_+n<t.length&&t.charAt(_+n)===e;)n++;return _+=n-1,Math.floor(n/(r||1))>1}),d=function(t,e,r,n){var i=""+e;if(h(t,n))for(;i.length<r;)i="0"+i;return i},p=this,v=function(t){return"function"==typeof u?u.call(p,t,h("m")):y(d("m",t.month(),2))},g=function(t,e){return e?"function"==typeof f?f.call(p,t):f[t.month()-p.minMonth]:"function"==typeof c?c.call(p,t):c[t.month()-p.minMonth]},m=this.local.digits,y=function(t){return r.localNumbers&&m?m(t):t},x="",b=!1,_=0;_<t.length;_++)if(b)"'"!==t.charAt(_)||h("'")?x+=t.charAt(_):b=!1;else switch(t.charAt(_)){case"d":x+=y(d("d",e.day(),2));break;case"D":x+=("D",n=e.dayOfWeek(),a=s,o=l,h("D")?o[n]:a[n]);break;case"o":x+=d("o",e.dayOfYear(),3);break;case"w":x+=d("w",e.weekOfYear(),2);break;case"m":x+=v(e);break;case"M":x+=g(e,h("M"));break;case"y":x+=h("y",2)?e.year():(e.year()%100<10?"0":"")+e.year()%100;break;case"Y":h("Y",2),x+=e.formatYear();break;case"J":x+=e.toJD();break;case"@":x+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":x+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":h("'")?x+="'":b=!0;break;default:x+=t.charAt(_)}return x},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[""].invalidArguments;if(""===(e="object"==typeof e?e.toString():e+""))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n="string"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,u=r.monthNamesShort||this.local.monthNamesShort,c=r.monthNames||this.local.monthNames,f=-1,h=-1,d=-1,p=-1,v=-1,g=!1,m=!1,y=function(e,r){for(var n=1;k+n<t.length&&t.charAt(k+n)===e;)n++;return k+=n-1,Math.floor(n/(r||1))>1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){y("m");var t=l.call(b,e.substring(A));return A+=t.length,t}return x("m")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(A,o[s].length).toLowerCase()===o[s].toLowerCase())return A+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[""].unknownNameAt).replace(/\{0\}/,A)},M=function(){if("function"==typeof c){var t=y("M")?c.call(b,e.substring(A)):u.call(b,e.substring(A));return A+=t.length,t}return w("M",u,c)},T=function(){if(e.charAt(A)!==t.charAt(k))throw(i.local.unexpectedLiteralAt||i.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,A);A++},A=0,k=0;k<t.length;k++)if(m)"'"!==t.charAt(k)||y("'")?T():m=!1;else switch(t.charAt(k)){case"d":p=x("d");break;case"D":w("D",a,o);break;case"o":v=x("o");break;case"w":x("w");break;case"m":d=_();break;case"M":d=M();break;case"y":var L=k;g=!y("y",2),k=L,h=x("y",2);break;case"Y":h=x("Y",2);break;case"J":f=x("J")+.5,"."===e.charAt(A)&&(A++,x("J"));break;case"@":f=x("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":f=x("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":A=e.length;break;case"'":y("'")?T():m=!0;break;default:T()}if(A<e.length)throw i.local.unexpectedText||i.regionalOptions[""].unexpectedText;if(-1===h?h=this.today().year():h<100&&g&&(h+=-1===n?1900:this.today().year()-this.today().year()%100-(h<=n?0:100)),"string"==typeof d&&(d=s.call(this,h,d)),v>-1){d=1,p=v;for(var S=this.daysInMonth(h,d);p>S;S=this.daysInMonth(h,d))d++,p-=S}return f>-1?this.fromJD(f):this.newDate(h,d,p)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}return r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(7988)}()}));