mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-16 01:35:41 +00:00
8 lines
1.9 MiB
8 lines
1.9 MiB
/**
|
||
* plotly.js (gl2d - minified) v2.31.0
|
||
* Copyright 2012-2024, Plotly, Inc.
|
||
* All rights reserved.
|
||
* Licensed under the MIT license
|
||
*/
|
||
/*! For license information please see plotly-gl2d.min.js.LICENSE.txt */
|
||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Plotly=e():t.Plotly=e()}(self,(function(){return function(){var t={79288:function(t,e,r){"use strict";var n=r(3400),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},86712:function(t,e,r){"use strict";t.exports=r(84224)},96144:function(t,e,r){"use strict";t.exports=r(97776)},32016:function(t,e,r){"use strict";t.exports=r(64884)},75556:function(t,e,r){"use strict";t.exports=r(76744)},16489:function(t,e,r){"use strict";t.exports=r(32028)},77280:function(t,e,r){"use strict";t.exports=r(45536)},9464:function(t,e,r){"use strict";var n=r(32016);n.register([r(86636),r(42192),r(32140),r(77280),r(89296),r(86712),r(75556),r(16489),r(97312),r(96144)]),t.exports=n},89296:function(t,e,r){"use strict";t.exports=r(29928)},32140:function(t,e,r){"use strict";t.exports=r(156)},86636:function(t,e,r){"use strict";t.exports=r(38983)},97312:function(t,e,r){"use strict";t.exports=r(76272)},42192:function(t,e,r){"use strict";t.exports=r(97924)},72196:function(t){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(t,e,r){"use strict";var n=r(72196),i=r(25376),a=r(33816),o=r(31780).templatedArray;r(36208),t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(23816).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],u=t["a"+a+"ref"],c=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],d=3*t.arrowsize*t.arrowwidth||0,p=d+h,v=d-h,g=3*t.startarrowsize*t.arrowwidth||0,y=g+h,m=g-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:p,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=s?y+s:y,m=s?m-s:m,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,p,y),ppadminus:Math.max(f,v,m)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},42300:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(31780).arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,f=[],h=[],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)}}}},87192:function(t,e,r){"use strict";var n=r(3400),i=r(76308);t.exports=function(t,e,r,a){a("opacity");var o=a("bgcolor"),s=a("bordercolor"),l=i.opacity(s);a("borderpad");var u=a("borderwidth"),c=a("showarrow");if(a("text",c?" ":r._dfltTitle.annotation),a("textangle"),n.coerceFont(a,"font",r.font),a("width"),a("align"),a("height")&&a("valign"),c){var f,h,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)),y=a("hoverlabel.bordercolor",v.bordercolor||i.contrast(g));n.coerceFont(a,"hoverlabel.font",{family:v.font.family,size:v.font.size,color:v.font.color||y})}a("captureevents",!!p)}},26828:function(t,e,r){"use strict";var n=r(38248),i=r(36896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.annotations,f=e._id.charAt(0),h=0;h<c.length;h++)l=c[h],u="annotations["+h+"].",l[f+"ref"]===e._id&&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)}}},45216:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(87192),s=r(13916);function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a("visible"),u=a("clicktoshow");if(l||u){o(t,e,r,a);for(var c=e.showarrow,f=["x","y"],h=[-10,-30],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 y="a"+v,m=i.coerceRef(t,e,d,y,"pixel",["pixel","paper"]);"pixel"!==m&&m!==g&&(m=e[y]="pixel");var x="pixel"===m?h[p]:.4;i.coercePosition(e,d,a,m,y,x)}a(v+"anchor"),a(v+"shift")}if(n.noneOrAll(t,e,["x","y"]),c&&n.noneOrAll(t,e,["ax","ay"]),u){var b=a("xclick"),_=a("yclick");e._xclick=void 0===b?e.x:i.cleanPosition(b,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})}},23816:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(54460),u=r(76308),c=r(43616),f=r(93024),h=r(72736),d=r(93972),p=r(86476),v=r(31780).arrayEditor,g=r(33652);function y(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),x(t,r,e,!1,n,i)}function m(t,e,r,n,i){var a=i[r],o=i[r+"ref"],s=-1!==r.indexOf("y"),u="domain"===l.getRefType(o),c=s?n.h:n.w;return t?u?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/c}function x(t,e,r,a,y,x){var b,_,w=t._fullLayout,A=t._fullLayout._size,M=t._context.edits;a?(b="annotation-"+a,_=a+".annotations"):(b="annotation",_="annotations");var T=v(t.layout,_,e),k=T.modifyBase,S=T.modifyItem,E=T.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var O="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var C={x:{},y:{}},L=+e.textangle||0,R=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=R.append("g").classed("annotation-text-g",!0),I=M[e.showarrow?"annotationTail":"annotationPosition"],P=e.captureevents||M.annotationText||I,F=D.append("g").style("pointer-events",P?"all":null).call(d,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",W(n.event))}));e.hovertext&&F.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,B=e.borderpad,z=N+B,j=F.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("#"+O).data(U?[0]:[]);H.enter().append("clipPath").classed("annclip",!0).attr("id",O).append("rect"),H.exit().remove();var V=e.font,G=w._meta?o.templateString(e.text,w._meta):e.text,Y=F.append("text").classed("annotation-text",!0).text(G);M.annotationText?Y.call(h.makeEditable,{delegate:F,gd:t}).call(q).on("edit",(function(r){e.text=r,this.call(q),S("text",r),y&&y.autorange&&k(y._name+".autorange",!0),x&&x.autorange&&k(x._name+".autorange",!0),i.call("_guiRelayout",t,E())})):Y.call(q)}else n.selectAll("#"+O).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=Y.selectAll("a");1===r.size()&&r.text()===Y.text()&&F.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=F.select(".annotation-text-math-group"),f=!n.empty(),v=c.bBox((f?n:Y).node()),b=v.width,_=v.height,T=e.width||b,P=e.height||_,B=Math.round(T+2*z),V=Math.round(P+2*z);function G(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:y,y:x}[et],at=(L+("x"===et?0:-90))*Math.PI/180,ot=B*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=A.l+A.w*Q):(Q=1-e[et],J=pt?it._offset+it._length*Q:J=A.t+A.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var vt=e["a"+et];if(tt=ot*G(.5,e.xanchor)-st*G(.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=A.t+A.h*vt):ft.tail=A.l+A.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 yt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,yt-1)),"pixel"===nt){var mt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-yt;mt>0?(ft.tail+=mt,ft.text+=mt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ct,ft.head+=ct}else K=tt=lt*G($,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)F.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(T-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(P-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:z+bt-1,y:z+_t}).call(c.setClipUrl,U?O:null,t);else{var wt=z+_t-v.top,At=z+bt-v.left;Y.call(h.positionText,At,wt).call(c.setClipUrl,U?O:null,t)}H.select("rect").call(c.setRect,z,z,T,P),j.call(c.setRect,N/2,N/2,B-N,V-N),F.call(c.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-V/2)),D.attr({transform:"rotate("+L+","+C.x.text+","+C.y.text+")"});var Mt,Tt=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(L,v,b),w=o.apply2DTransform(_),T=o.apply2DTransform2(_),O=+j.attr("width"),I=+j.attr("height"),P=v-.5*O,N=P+O,B=b-.5*I,z=B+I,U=[[P,B,P,z],[P,z,N,z],[N,z,N,B],[N,B,P,B]].map(T);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,G=e.arrowside,Y=R.append("g").style({opacity:u.opacity(V)}).classed("annotation-arrow-g",!0),W=Y.append("path").attr("d","M"+h+","+d+"L"+l+","+f).style("stroke-width",H+"px").call(u.stroke,u.rgb(V));if(g(W,G,e),M.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=Y.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(F);J=t.x,K=t.y,y&&y.autorange&&k(y._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;F.call(c.setTranslate,i,a),S("x",m(y,t,"x",A,e)),S("y",m(x,r,"y",A,e)),e.axref===e.xref&&S("ax",m(y,t,"ax",A,e)),e.ayref===e.yref&&S("ay",m(x,r,"ay",A,e)),Y.attr("transform",s(t,r)),D.attr({transform:"rotate("+L+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Tt(0,0),I&&p.init({element:F.node(),gd:t,prepFn:function(){Mt=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",m(y,t,"ax",A,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",m(x,r,"ay",A.w,e)):S("ay",e.ay+r),Tt(t,r);else{if(a)return;var i,o;if(y)i=m(y,t,"x",A,e);else{var l=e._xsize/A.w,u=e.x+(e._xshift-e.xshift)/A.w-l/2;i=p.align(u+t/A.w,l,0,1,e.xanchor)}if(x)o=m(x,r,"y",A,e);else{var c=e._ysize/A.h,f=e.y-(e._yshift+e.yshift)/A.h-c/2;o=p.align(f-r/A.h,c,0,1,e.yanchor)}S("x",i),S("y",o),y&&x||(n=p.getCursor(y?.5:i,x?.5:o,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+Mt}),d(F,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",W(n))},doneFn:function(){d(F),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&y(t,r);return a.previousPromises(t)},drawOne:y,drawRaw:x}},33652:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(72196),o=r(3400),s=o.strScale,l=o.strRotate,u=o.strTranslate;t.exports=function(t,e,r){var o,c,f,h,d=t.node(),p=a[r.arrowhead||0],v=a[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),y=(r.arrowwidth||1)*(r.startarrowsize||1),m=e.indexOf("start")>=0,x=e.indexOf("end")>=0,b=p.backoff*g+r.standoff,_=v.backoff*y+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,A=o.y-c.y;if(h=(f=Math.atan2(A,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+A*A))return void I();if(b){if(b*b>w*w+A*A)return void I();var M=b*Math.cos(f),T=b*Math.sin(f);c.x+=M,c.y+=T,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+A*A)return void I();var k=_*Math.cos(f),S=_*Math.sin(f);o.x-=k,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===d.nodeName){var E=d.getTotalLength(),O="";if(E<b+_)return void I();var C=d.getPointAtLength(0),L=d.getPointAtLength(.1);f=Math.atan2(C.y-L.y,C.x-L.x),o=d.getPointAtLength(Math.min(_,E)),O="0px,"+_+"px,";var R=d.getPointAtLength(E),D=d.getPointAtLength(E-.1);h=Math.atan2(R.y-D.y,R.x-D.x),c=d.getPointAtLength(Math.max(0,E-b)),O+=E-(O?_+b:b)+"px,"+E+"px",t.style("stroke-dasharray",O)}function I(){t.style("stroke-dasharray","0px,100px")}function P(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}))}m&&P(v,o,f,y),x&&P(p,c,h,g)}},79180:function(t,e,r){"use strict";var n=r(23816),i=r(42300);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(13916),supplyLayoutDefaults:r(45216),includeBasePlot:r(36632)("annotations"),calcAutorange:r(90272),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(26828)}},45899:function(t,e,r){"use strict";var n=r(13916),i=r(67824).overrideAll,a=r(31780).templatedArray;t.exports=i(a("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},42456:function(t,e,r){"use strict";var n=r(3400),i=r(54460);function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()}},52808:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(87192),s=r(45899);function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function u(t){var n=t+"axis",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l("visible")&&(o(t,e,a.fullLayout,l),u("x"),u("y"),u("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){a(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},71836:function(t,e,r){"use strict";var n=r(23816).drawRaw,i=r(94424),a=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],u=!1,c=0;c<3;c++){var f=a[c],h=l[f],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))}}},56864:function(t,e,r){"use strict";var n=r(24040),i=r(3400);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(45899)}}},layoutAttributes:r(45899),handleDefaults:r(52808),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:r(42456),draw:r(71836)}},54976:function(t,e,r){"use strict";t.exports=r(38700),r(15168),r(67020),r(89792),r(55668),r(65168),r(2084),r(26368),r(24747),r(65616),r(30632),r(73040),r(1104),r(51456),r(4592),r(45348)},97776:function(t,e,r){"use strict";var n=r(54976),i=r(3400),a=r(39032),o=a.EPOCHJD,s=a.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},u=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},c="##",f={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},h={};function 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"))},y=i.extendFlat({},g,{ycalendar:p(v("y"))}),m=i.extendFlat({},y,{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:y,bar:y,box:y,heatmap:y,contour:y,histogram:y,histogram2d:y,histogram2dcontour:y,scatter3d:m,surface:m,mesh3d:m,scattergl:y,ohlc:g,candlestick:g},layout:{calendar: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}}},22548:function(t,e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},76308:function(t,e,r){"use strict";var n=r(49760),i=r(38248),a=r(38116).isTypedArray,o=t.exports={},s=r(22548);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},42996:function(t,e,r){"use strict";var n=r(94724),i=r(25376),a=r(92880).extendFlat,o=r(67824).overrideAll;t.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(t){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(26332),o=r(25404),s=r(95936),l=r(42568),u=r(42996);t.exports=function(t,e,r){var c=i.newContainer(e,"colorbar"),f=t.colorbar||{};function h(t,e){return n.coerce(f,c,u,t,e)}var 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"),y=h("thicknessmode");h("thickness","fraction"===y?30/(g?p:v):30);var m=h("lenmode");h("len","fraction"===m?1:g?v:p);var x,b,_,w="paper"===h("yref"),A="paper"===h("xref"),M="left";g?(_="middle",M=A?"left":"right",x=A?1.02:1,b=.5):(_=w?"bottom":"top",M="center",x=.5,b=w?1.02:1),n.coerce(f,c,{x:{valType:"number",min:A?-2:0,max:A?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",M),h("xpad"),h("yanchor",_),h("ypad"),n.noneOrAll(f,c,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var T=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!==T.indexOf("inside")?"hide past domain":"hide past div"),a(f,c,h,"linear");var k=r.font,S={noAutotickangles:!0,outerTicks:!1,font:k};-1!==T.indexOf("inside")&&(S.bgColor="black"),l(f,c,h,"linear",S),s(f,c,h,"linear",S),o(f,c,h,"linear",S),h("title.text",r._dfltTitle.colorbar);var E=c.showticklabels?c.tickfont:k,O=n.extendFlat({},E,{color:k.color,size:n.bigFont(E.size)});n.coerceFont(h,"title.font",O),h("title.side",g?"top":"right")}},37848:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(7316),o=r(24040),s=r(54460),l=r(86476),u=r(3400),c=u.strTranslate,f=r(92880).extendFlat,h=r(93972),d=r(43616),p=r(76308),v=r(81668),g=r(72736),y=r(94288).flipScale,m=r(28336),x=r(37668),b=r(94724),_=r(84284),w=_.LINE_SPACING,A=_.FROM_TL,M=_.FROM_BR,T=r(63964).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(t){var e,r,n,i,a=t._fullLayout,o=t.calcdata,s=[];function l(t){return f(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?y(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var c=0;c<o.length;c++){var h=o[c];if((n=h[0].trace)._module){var 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 m=(i=v[g]).container;(r=m?n[m]:n)&&r.showscale&&((e=l(r.colorbar))._id="cb"+n.uid+(p&&m?"-"+m:""),e._traceIndex=n.index,e._propPrefix=(m?m+".":"")+"colorbar.",e._meta=n._meta,u(),s.push(e))}}}for(var x in a._colorAxes)if((r=a[x]).showscale){var b=a._colorAxes[x];(e=l(r.colorbar))._id="cb"+x,e._propPrefix=x+".colorbar.",e._meta=a._meta,i={min:"cmin",max:"cmax"},"heatmap"!==b[0]&&(n=b[1],i.calc=n._module.colorbar.calc),u(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append("g").attr("class",(function(t){return t._id})).classed(T.colorbar,!0),e.each((function(e){var r=n.select(this);u.ensureSingle(r,"rect",T.cbbg),u.ensureSingle(r,"g",T.cbfills),u.ensureSingle(r,"g",T.cblines),u.ensureSingle(r,"g",T.cbaxis,(function(t){t.classed(T.crisp,!0)})),u.ensureSingle(r,"g",T.cbtitleunshift,(function(t){t.append("g").classed(T.cbtitle,!0)})),u.ensureSingle(r,"rect",T.cboutline);var y=function(t,e,r){var o="v"===e.orientation,l=e.len,h=e.lenmode,y=e.thickness,_=e.thicknessmode,k=e.outlinewidth,S=e.borderwidth,E=e.bgcolor,O=e.xanchor,C=e.yanchor,L=e.xpad,R=e.ypad,D=e.x,I=o?e.y:1-e.y,P="paper"===e.yref,F="paper"===e.xref,N=r._fullLayout,B=N._size,z=e._fillcolor,j=e._line,U=e.title,H=U.side,V=e._zrange||n.extent(("function"==typeof z?z:j.color).domain()),G="function"==typeof j.color?j.color:function(){return j.color},Y="function"==typeof z?z:function(){return z},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(y*("fraction"===_?o?B.w:B.h:1)),K=J/(o?B.w:B.h),Q=Math.round(l*("fraction"===h?o?B.h:B.w:1)),$=Q/(o?B.h:B.w),tt=F?B.w:r._fullLayout.width,et=P?B.h:r._fullLayout.height,rt=Math.round(o?D*tt+L:I*et+R),nt={center:.5,right:1}[O]||0,it={top:1,middle:.5}[C]||0,at=o?D-nt*K:I-it*K,ot=o?I-it*$:D-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 m(a,s,c,l,n),x(a,s,c,l),s}(r,e,V);lt.position=K+(o?D+L/B.w:I+R/B.h);var ut=-1!==["top","bottom"].indexOf(H);if(o&&ut&&(lt.title.side=H,lt.titlex=D+L/B.w,lt.titley=ot+("top"===U.side?$-R/B.h:R/B.h)),o||ut||(lt.title.side=H,lt.titley=I+R/B.h,lt.titlex=ot+L/B.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/B.h,ot+$-R/B.h]:[ot+L/B.w,ot+$-L/B.w],lt.setScale(),t.attr("transform",c(Math.round(B.l),Math.round(B.t)));var pt,vt=t.select("."+T.cbtitleunshift).attr("transform",c(-Math.round(B.l),-Math.round(B.t))),gt=lt.ticklabelposition,yt=lt.title.font.size,mt=t.select("."+T.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("."+T.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=L+B.l+tt*D,e=R+B.t+et*(1-ot-$)+3+.75*yt),"bottom"===H&&(t=L+B.l+tt*D,e=R+B.t+et*(1-ot)-3-.25*yt),"right"===H&&(e=R+B.t+et*I+3+.75*yt,t=L+B.l+tt*ot),_t(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ut||o&&ut){var a,l=t.select("."+T.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(T.jsPlaceholder)&&(a=d.bBox(f.node()),bt=a.width,xt=a.height),o){if(xt){if(xt+=5,"top"===H)lt.domain[1]-=xt/B.h,h[1]*=-1;else{lt.domain[0]+=xt/B.h;var y=g.lineCount(f);h[1]+=(1-y)*v}l.attr("transform",c(h[0],h[1])),lt.setScale()}}else bt&&("right"===H&&(lt.domain[0]+=(bt+yt/2)/B.w),l.attr("transform",c(h[0],h[1])),lt.setScale())}t.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",o?c(0,Math.round(B.h*(1-lt.domain[1]))):c(Math.round(B.w*lt.domain[0]),0)),mt.attr("transform",o?c(0,Math.round(-B.t)):c(Math.round(-B.l),0));var m=t.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(X);m.enter().append("rect").classed(T.cbfill,!0).attr("style",""),m.exit().remove();var x=V.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));m.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=Y(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=t.select("."+T.cblines).selectAll("path."+T.cbline).data(j.color&&j.width?Z:[]);b.enter().append("path").classed(T.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,G(t),j.dash)})),mt.selectAll("g."+lt._id+"tick,path").remove();var _=rt+J+(k||0)/2-("outside"===e.ticks?1:0),A=s.calcTicks(lt),M=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,A):A,layer:mt,path:s.makeTickPath(lt,_,M),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:A,layer:mt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,_)})},function(){if(o&&!ut||!o&&ut){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===H)i=s,t=B.l+tt*a+10+yt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===H&&(i=B.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=B.t+et*a+10-J-w*yt*l}_t((o?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:H,offsetTop:o?0:B.t,offsetLeft:o?B.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(mt.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(T.jsPlaceholder)){var m,x=vt.select(".h"+lt._id+"title-math-group").node();x&&(o&&ut||!o&&!ut)?(u=(n=d.bBox(x)).width,m=n.height):(u=(n=d.bBox(vt.node())).right-B.l-(o?rt:st),m=n.bottom-B.t-(o?st:rt),o||"top"!==H||(s+=n.height,g=n.height)),v&&(pt.attr("transform",c(u/2+yt/2,0)),u*=2),s=Math.max(s,o?u:m)}var b=2*(o?L:R)+s+S+k/2,w=0;!o&&U.text&&"bottom"===C&&I<=0&&(b+=w=b/2,g+=w),N._hColorbarMoveTitle=w,N._hColorbarMoveCBTitle=g;var z=S+k,j=(o?rt:st)-z/2-(o?L:0),V=(o?st:rt)-(o?Q:R+g-w);t.select("."+T.cbbg).attr("x",j).attr("y",V).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(Q+z,2)).call(p.fill,E).call(p.stroke,e.bordercolor).style("stroke-width",S);var G=v?Math.max(u-10,0):0;t.selectAll("."+T.cboutline).attr("x",(o?rt:st+L)+G).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*L+G),2)).call(p.stroke,e.outlinecolor).style({fill:"none","stroke-width":k});var Y=o?nt*b:0,W=o?0:(1-it)*b-g;if(Y=F?B.l-Y:-Y,W=P?B.t-W:-W,t.attr("transform",c(Y,W)),!o&&(S||i(E).getAlpha()&&!i.equals(N.paper_bgcolor,E))){var q=mt.selectAll("text"),X=q[0].length,Z=t.select("."+T.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-S-2+D-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=K.left+$.x+st+S+2-s)<0&&(n=0)}n&&(X<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=A[O],at=M[O],ot=A[C],ct=M[C],ft=b-J;o?("pixels"===h?(tt.y=I,tt.t=Q*ot,tt.b=Q*ct):(tt.t=tt.b=0,tt.yt=I+l*ot,tt.yb=I-l*ct),"pixels"===_?(tt.x=D,tt.l=b*et,tt.r=b*at):(tt.l=ft*et,tt.r=ft*at,tt.xl=D-y*et,tt.xr=D+y*at)):("pixels"===h?(tt.x=D,tt.l=Q*et,tt.r=Q*at):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*at),"pixels"===_?(tt.y=1-I,tt.t=b*ot,tt.b=b*ct):(tt.t=ft*ot,tt.b=ft*ct,tt.yt=I-y*ot,tt.yb=I+y*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-Y,l:j+tt.r,b:N.height-V-W,t:V+tt.b};F&&P?a.autoMargin(r,e._id,tt):F?r._fullLayout._reservedMargin[e._id][ht]=bt[ht]:P||o?r._fullLayout._reservedMargin[e._id][dt]=bt[dt]:r._fullLayout._reservedMargin[e._id][ht]=bt[ht]}],r)}(r,e,t);y&&y.then&&(t._promises||[]).push(y),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},90553:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t){return n.isPlainObject(t.colorbar)}},55080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(42996),supplyDefaults:r(64013),draw:r(37848).draw,hasColorbar:r(90553)}},49084:function(t,e,r){"use strict";var n=r(42996),i=r(53756).counter,a=r(95376),o=r(88304).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),u="showScaleDflt"in e?e.showScaleDflt:"z"===a,c="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:"z",c:"color"}[a]));var d=a+"auto",p=a+"min",v=a+"max",g=a+"mid",y=(s(h+d),s(h+p),s(h+v),{});y[p]=y[v]=void 0;var m={};m[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:y},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},47128:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(94288).extractOpts;t.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(e,u).get():e,f=a(c),h=!1!==f.auto,d=f.min,p=f.max,v=f.mid,g=function(){return i.aggNums(Math.min,null,l)},y=function(){return i.aggNums(Math.max,null,l)};void 0===d?d=g():h&&(d=c._colorAx&&n(d)?Math.min(d,g()):g()),void 0===p?p=y():h&&(p=c._colorAx&&n(p)?Math.max(p,y()):y()),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))}},95504:function(t,e,r){"use strict";var n=r(3400),i=r(94288).hasColorscale,a=r(94288).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s<t.length;s++){var l=t[s],u=l._module.colorbar;if(u)if(Array.isArray(u))for(var c=0;c<u.length;c++)o(l,u[c]);else o(l,u);i(l,"marker.line")&&o(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in e._colorAxes)o(e[f],{min:"cmin",max:"cmax"})}},27260:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(90553),o=r(64013),s=r(88304).isValid,l=r(24040).traceIs;function u(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,c,f,h){var d=h.prefix,p=h.cLetter,v="_module"in r,g=u(e,d),y=u(r,d),m=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",A=b[_];return void(A?(A[2].push(x),A[0]!==w&&(A[0]=!1,i.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var M=g[p+"min"],T=g[p+"max"],k=n(M)&&n(T)&&M<T;f(d+p+"auto",!k)?f(d+p+"mid"):(f(d+p+"min"),f(d+p+"max"));var S,E,O=g.colorscale,C=m.colorscale;void 0!==O&&(S=!s(O)),void 0!==C&&(S=!s(C)),f(d+"autocolorscale",S),f(d+"colorscale"),f(d+"reversescale"),"marker.line."!==d&&(d&&v&&(E=a(g)),f(d+"showscale",E)&&(d&&m&&(y._template=m),o(g,y,c)))}},94288:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(38248),o=r(3400),s=r(76308),l=r(88304).isValid,u=["showscale","autocolorscale","colorscale","reversescale","colorbar"],c=["min","max","mid","auto"];function f(t){var e,r,n,i=t._colorAx,a=i||t,o={};for(r=0;r<u.length;r++)o[n=u[r]]=a[n];if(i)for(e="c",r=0;r<c.length;r++)o[n=c[r]]=a["c"+n];else{var s;for(r=0;r<c.length;r++)((s="c"+(n=c[r]))in a||(s="z"+n)in a)&&(o[n]=a[s]);e=s.charAt(0)}return o._sync=function(t,r){var n=-1!==c.indexOf(t)?e+t:t;a[n]=a["_"+n]=r},o}function h(t){for(var e=f(t),r=e.min,n=e.max,i=e.reversescale?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(88304),i=r(94288);t.exports={moduleType:"component",name:"colorscale",attributes:r(49084),layoutAttributes:r(92332),supplyLayoutDefaults:r(51608),handleDefaults:r(27260),crossTraceDefaults:r(95504),calc:r(47128),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},92332:function(t,e,r){"use strict";var n=r(92880).extendFlat,i=r(49084),a=r(88304).scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},51608:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(92332),o=r(27260);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,u=e._colorAxes;function c(t,e){return n.coerce(s,l,a.coloraxis,t,e)}for(var f in u){var h=u[f];if(h[0])s=t[f]||{},(l=i.newContainer(e,f,"coloraxis"))._name=f,o(s,l,e,c,{prefix:"",cLetter:"c"});else{for(var d=0;d<h[2].length;d++)h[2][d]();delete e._colorAxes[f]}}}},88304:function(t,e,r){"use strict";var n=r(49760),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=i.RdBu;function o(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}t.exports={scales:i,defaultScale:a,get:function(t,e){if(e||(e=a),!t)return e;function r(){try{t=i[t]||JSON.parse(t)}catch(r){t=e}}return"string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e},isValid:function(t){return void 0!==i[t]||o(t)}}},78316:function(t){"use strict";t.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return"left"===i||"bottom"===i?a:"center"===i||"middle"===i?s:"right"===i||"top"===i?o:a<2/3-s?a:o>4/3-s?o:s}},67416:function(t,e,r){"use strict";var n=r(3400),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},72760:function(t,e){"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},86476:function(t,e,r){"use strict";var n=r(29128),i=r(52264),a=r(89184),o=r(3400).removeElement,s=r(33816),l=t.exports={};l.align=r(78316),l.getCursor=r(67416);var u=r(2616);function c(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,h,d,p,v,g=t.gd,y=1,m=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function _(a){g._dragged=!1,g._dragging=!0;var o=f(a);e=o[0],r=o[1],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<m?y+=1:(y=1,g._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!v?(h=c()).style.cursor=window.getComputedStyle(x).cursor:i||(h=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",A),document.addEventListener("touchend",A),!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 A(e){if(delete g._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),i?o(h):u&&(h.documentElement.style.cursor=u,u=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>m&&(y=Math.max(y-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(y,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(95924),i=r(91200),a=r(52200).getGraphDiv,o=r(92456),s=t.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},98192:function(t,e){"use strict";e.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(38248),s=r(49760),l=r(24040),u=r(76308),c=r(8932),f=i.strTranslate,h=r(72736),d=r(9616),p=r(84284).LINE_SPACING,v=r(13448).DESELECTDIM,g=r(43028),y=r(7152),m=r(10624).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,y="scatterfill-"+e.uid;n&&(y="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===g&&(g+="reversed"),t.call(x.gradient,r,y,g,a.colorscale,"fill")):("horizontal"===g?(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,y,"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(71984);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 A(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var M=a("~f"),T={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),y=0;y<v;y++)p.reversed?g[v-1-y]=[M(100*(1-o[y][0])),o[y][1]]:g[y]=[M(100*o[y][0]),o[y][1]];var m=e._fullLayout,x="g"+m._uid+"-"+r,b=m._defs.select(".gradients").selectAll("#"+x).data([a+g.join(";")],i.identity);b.exit().remove(),b.enter().append(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=T[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 y,m,x,b,_,w,A,M,T,k=r._fullLayout,S="p"+k._uid+"-"+a,E={},O=s(p),C=u.tinyRGB(O),L=v*O.getAlpha();switch(o){case"/":y=l*Math.sqrt(2),m=l*Math.sqrt(2),w="path",E={d:x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2,opacity:L,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"\\":y=l*Math.sqrt(2),m=l*Math.sqrt(2),w="path",E={d:x="M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,opacity:L,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"x":y=l*Math.sqrt(2),m=l*Math.sqrt(2),x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2+"M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,b=l-l*Math.sqrt(1-c),w="path",E={d:x,opacity:L,stroke:C,"stroke-width":b+"px"};break;case"|":w="path",w="path",E={d:x="M"+(y=l)/2+",0L"+y/2+","+(m=l),opacity:L,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"-":w="path",w="path",E={d:x="M0,"+(m=l)/2+"L"+(y=l)+","+m/2,opacity:L,stroke:C,"stroke-width":(b=c*l)+"px"};break;case"+":w="path",x="M"+(y=l)/2+",0L"+y/2+","+(m=l)+"M0,"+m/2+"L"+y+","+m/2,b=l-l*Math.sqrt(1-c),w="path",E={d:x,opacity:L,stroke:C,"stroke-width":b+"px"};break;case".":y=l,m=l,c<Math.PI/4?_=Math.sqrt(c*l*l/Math.PI):(A=c,M=Math.PI/4,1,_=(T=l/2)+(l/Math.sqrt(2)-T)*(A-M)/(1-M)),w="circle",E={cx:y/2,cy:m/2,r:_,opacity:L,fill:C}}var R=[o||"noSh",d||"noBg",p||"noFg",l,c].join(";"),D=k._defs.select(".patterns").selectAll("#"+S).data([R],i.identity);D.exit().remove(),D.enter().append("pattern").each((function(){var t=n.select(this);if(t.attr({id:S,width:y+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),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:y+"px",height:m+"px",fill:r,"fill-opacity":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(E)})),t.style("fill",U(S,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","patterns").selectAll("pattern").remove(),n.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},x.pointStyle=function(t,e,r,i){if(t.size()){var a=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,a,r,i)}))}},x.singlePointStyle=function(t,e,r,n,a,o){var s=r.marker,l=s.line;if(o&&o.i>=0&&void 0===t.i&&(t.i=o.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var c;c="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=c,n.selectedSizeFn&&(c=t.mrc=n.selectedSizeFn(t));var f=x.symbolNumber(t.mx||s.symbol)||0;t.om=f%200>=100;var h=et(t,r),d=G(t,r);e.attr("d",A(f,c,h,d))}var p,v,g,y=!1;if(t.so)g=l.outlierwidth,v=l.outliercolor,p=s.outliercolor;else{var m=(l||{}).width;g=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(p=u.defaultLine,y=!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;_?y=!0:_=b&&b.type,i.isArrayOrTypedArray(_)&&(_=_[0],T[_]||(_=0));var w=s.pattern,M=w&&x.getPatternAttr(w.shape,t.i,"");if(_&&"none"!==_){var k=t.mgc;k?y=!0:k=b.color;var S=r.uid;y&&(S+="-"+t.i),x.gradient(e,a,S,_,[[0,k],[1,p]],"fill")}else if(M){var E=!1,O=w.fgcolor;!O&&o&&o.color&&(O=o.color,E=!0);var C=x.getPatternAttr(O,t.i,o&&o.color||null),L=x.getPatternAttr(w.bgcolor,t.i,null),R=w.fgopacity,D=x.getPatternAttr(w.size,t.i,8),I=x.getPatternAttr(w.solidity,t.i,.3);E=E||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var P=r.uid;E&&(P+="-"+t.i),x.pattern(e,"point",a,P,M,D,I,t.mcc,w.fillmode,L,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)?y(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,h=void 0!==c,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,y=s.color;(g||y)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?g||e:y||e});var m=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||m/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.addOpacity(e,v))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){u.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",A(x.symbolNumber(a),o,et(n,e),G(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)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 S,E,O={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=O[l]*u,v=.75*r+O[s]*u+(O[s]-1)*c*r/2;t.attr("text-anchor",l),a||o.attr("transform",f(d,v))}function L(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function R(t,e,r){return r&&(t=B(t)),e?I(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return S=e,e}function I(t){var e=n.round(t,2);return E=e,e}function P(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[[D(e[0]+(h&&c/h)),I(e[1]+(h&&f/h))],[D(e[0]-(d&&c/d)),I(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={};m(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=L(t,e),y=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,g,y).text(u).call(h.convertToTspans,r).call(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=L(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(P(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=[P(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(P(t[r-1],t[r],t[r+1],e));for(a.push(P(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+="C"+a[r-1][1]+" "+a[r][0]+" "+t[r];return n+"C"+a[i][1]+" "+a[0][0]+" "+t[0]+"Z"};var F={hv:function(t,e,r){return"H"+D(e[0])+"V"+R(e,1,r)},vh:function(t,e,r){return"V"+I(e[1])+"H"+R(e,0,r)},hvh:function(t,e,r){return"H"+D((t[0]+e[0])/2)+"V"+I(e[1])+"H"+R(e,0,r)},vhv:function(t,e,r){return"V"+I((t[1]+e[1])/2)+"H"+D(e[0])+"V"+R(e,1,r)}},N=function(t,e,r){return"L"+R(e,0,r)+","+R(e,1,r)};function B(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]:S||0,c=e?e[1]:E||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 y=l.i;"scatter"===n.type&&y--;var m=l.marker,b=m.symbol;i.isArrayOrTypedArray(b)&&(b=b[y]);var _=m.size;i.isArrayOrTypedArray(_)&&(_=_[y]),g=m?x.symbolBackOffs[x.symbolNumber(b)]*_:0,g+=x.getMarkerStandoff(a[y],n)||0}var w=f-g*Math.cos(v),A=h-g*Math.sin(v);(w<=f&&w>=u||w>=f&&w<=u)&&(A<=h&&A>=c||A>=h&&A<=c)&&(t=[w,A])}return t}x.steps=function(t){var e=F[t]||N;return function(t){for(var r="M"+D(t[0][0])+","+I(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=B,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 z=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 z>=1e4&&(x.savedBBoxes={},z=0),r&&(x.savedBBoxes[r]=g),z++,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 G(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(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=G;var Y,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),y=K(p[1]-n,p[0]-r);if("north"===s)f=a/180*Math.PI;else if("previous"===s){var m=h/180*Math.PI,x=d/180*Math.PI,b=Y/180*Math.PI,_=W/180*Math.PI,w=b-m,A=Q(_)*$(w),M=$(_)*Q(x)-Q(_)*$(x)*Q(w);f=-K(A,M)-Math.PI,Y=h,W=d}var T=tt(g,[Q(f),0]),k=tt(y,[$(f),0]);a=K(T[1]+k[1],T[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 S=r-q,E=n-X,O=e.line&&e.line.shape||"",C=O.slice(O.length-1);"h"===C&&(E=0),"v"===C&&(S=0),a+=K(E,S)/Math.PI*180+90}else a=null}return q=r,X=n,Z=t.i,J=e.uid,a}x.getMarkerAngle=et},71984:function(t,e,r){"use strict";var n,i,a,o,s=r(21984),l=r(33428).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,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="",y=0;y<v.length;y++){var m=v[y],x=m[0],b=c,_=f;if("M"===x||"L"===x)c=+m[1],f=+m[2];else if("m"===x||"l"===x)c+=+m[1],f+=+m[2];else if("H"===x)c=+m[1];else if("h"===x)c+=+m[1];else if("V"===x)f=+m[1];else if("v"===x)f+=+m[1];else if("A"===x){c=+m[1],f=+m[2];var w=l(u,[+m[6],+m[7]]);m[6]=w[0],m[7]=w[1],m[3]=+m[3]+t}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(c-=b,f-=_);var A=l(u,[c,f]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(m[1]=A[0],m[2]=A[1]),m[0]=x,g+=m[0]+m.slice(1).join(",")}return i=g,g}t.exports={circle:{n:0,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?g(e,r,i):i}},square:{n:1,f:function(t,e,r){if(v(e))return u;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(t,e,r){if(v(e))return u;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(t,e,r){if(v(e))return u;var n=l(.4*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(t,e,r){if(v(e))return u;var n=l(.8*t/c,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return g(e,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+","+l(t/2,2)+"H"+n+"L0,-"+l(t,2)+"Z")}},"triangle-down":{n:6,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+n+",-"+l(t/2,2)+"H"+n+"L0,"+l(t,2)+"Z")}},"triangle-left":{n:7,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M"+l(t/2,2)+",-"+n+"V"+n+"L-"+l(t,2)+",0Z")}},"triangle-right":{n:8,f:function(t,e,r){if(v(e))return u;var n=l(2*t/f,2);return g(e,r,"M-"+l(t/2,2)+",-"+n+"V"+n+"L"+l(t,2)+",0Z")}},"triangle-ne":{n:9,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(t,e,r){if(v(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(t,e,r){if(v(e))return u;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return g(e,r,"M"+n+","+o+"L"+i+","+l(.809*t,2)+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(t,e,r){if(v(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*f/2,2);return g(e,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(t,e,r){if(v(e))return u;var n=l(.924*t,2),i=l(.383*t,2);return g(e,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(t,e,r){if(v(e))return u;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),c=l(-n,2),f=l(-.309*n,2),h=l(.118*n,2),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}}},97644:function(t){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},14880:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(54460),o=r(3400),s=r(93792);function l(t,e,r,i){var l=e["error_"+i]||{},u=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var c=s(l),f=0;f<t.length;f++){var h=t[f],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],y=h[i+"h"]=p+v[1];u.push(g,y)}}}var m=r._id,x=e._extremes[m],b=a.findExtremes(r,u,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}t.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,"errorBarsOK")){var s=a.getFromId(t,o.xaxis),u=a.getFromId(t,o.yaxis);l(n,o,s,"x"),l(n,o,u,"y")}}}},93792:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},65200:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(3400),o=r(31780),s=r(97644);t.exports=function(t,e,r,l){var u="error_"+l.axis,c=o.newContainer(e,u),f=t[u]||{};function h(t,e){return a.coerce(f,c,s,t,e)}if(!1!==h("visible",void 0!==f.array||void 0!==f.value||"sqrt"===f.type)){var 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))}}},64968:function(t,e,r){"use strict";var n=r(3400),i=r(67824).overrideAll,a=r(97644),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,"calc","nested"),scattergl:i(o,"calc","nested")}},supplyDefaults:r(65200),calc:r(14880),makeComputeError:r(93792),plot:r(78512),style:r(92036),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},78512:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(43616),o=r(43028);t.exports=function(t,e,r,s){var l=r.xaxis,u=r.yaxis,c=s&&s.duration>0,f=t._context.staticPlot;e.each((function(e){var h,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 y=n.select(this).selectAll("g.errorbar").data(e,h);if(y.exit().remove(),e.length){p.visible||y.selectAll("path.xerror").remove(),v.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var m=y.enter().append("g").classed("errorbar",!0);c&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(y,r.layerClipId,t),y.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!g||t.vis){var a,o=e.select("path.yerror");if(v.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var h=v.width;a="M"+(r.x-h)+","+r.yh+"h"+2*h+"m-"+h+",0V"+r.ys,r.noYS||(a+="m-"+h+",0h"+2*h),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var d=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var y=(p.copy_ystyle?v:p).width;a="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(a+="m0,-"+y+"v"+2*y),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()}}))}}))}},92036:function(t,e,r){"use strict";var n=r(33428),i=r(76308);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},55756:function(t,e,r){"use strict";var n=r(25376),i=r(65460).hoverlabel,a=r(92880).extendFlat;t.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(t,e,r){"use strict";var n=r(3400),i=r(24040);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],u=l[0].trace;if(!i.traceIs(u,"pie-like")){var c=i.traceIs(u,"2dMap")?a:n.fillArray;c(u.hoverinfo,l,"hi",o(u)),u.hovertemplate&&c(u.hovertemplate,l,"ht"),u.hoverlabel&&(c(u.hoverlabel.bgcolor,l,"hbg"),c(u.hoverlabel.bordercolor,l,"hbc"),c(u.hoverlabel.font.size,l,"hts"),c(u.hoverlabel.font.color,l,"htc"),c(u.hoverlabel.font.family,l,"htf"),c(u.hoverlabel.namelength,l,"hnl"),c(u.hoverlabel.align,l,"hta"))}}}},62376:function(t,e,r){"use strict";var n=r(24040),i=r(83292).hover;t.exports=function(t,e,r){var a=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function o(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},92456:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},95448:function(t,e,r){"use strict";var n=r(3400),i=r(55756),a=r(16132);t.exports=function(t,e,r,o){var s=n.extendFlat({},o.hoverlabel);e.hovertemplate&&(s.namelength=-1),a(t,e,(function(r,a){return n.coerce(t,e,i,r,a)}),s)}},10624:function(t,e,r){"use strict";var n=r(3400);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==r.indexOf(n[a]+i[o]))return!0;return!1}return-1!==r.indexOf(e.getSubplot(t))},e.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},e.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},e.getDistanceFunction=function(t,r,n,i){return"closest"===t?i||e.quadrature(r,n):"x"===t.charAt(0)?r:n},e.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},e.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},e.makeEventData=function(t,r,n){var i="index"in t?t.index:t.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:i};if(r._indexToPoints){var o=r._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return r._module.eventData?a=r._module.eventData(a,t,r,n,i):("xVal"in t?a.x=t.xVal:"x"in t&&(a.x=t.x),"yVal"in t?a.y=t.yVal:"y"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),e.appendArrayPointValue(a,r,i),a},e.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){var c=o(n.nestedProperty(e,l).get(),r);void 0!==c&&(t[u]=c)}}},e.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){for(var c=n.nestedProperty(e,l).get(),f=new Array(r.length),h=0;h<r.length;h++)f[h]=o(c,r[h]);t[u]=f}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};e.isUnifiedHover=function(t){return"string"==typeof t&&!!l[t]},e.isXYhover=function(t){return"string"==typeof t&&!!s[t]}},83292:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(49760),o=r(3400),s=o.pushUnique,l=o.strTranslate,u=o.strRotate,c=r(95924),f=r(72736),h=r(72213),d=r(43616),p=r(76308),v=r(86476),g=r(54460),y=r(24040),m=r(10624),x=r(92456),b=r(77864),_=r(31140),w=x.YANGLE,A=Math.PI*w/180,M=1/Math.sin(A),T=Math.cos(A),k=Math.sin(A),S=x.HOVERARROWSIZE,E=x.HOVERTEXTPAD,O={box:!0,ohlc:!0,violin:!0,candlestick:!0},C={scatter:!0,scattergl:!0,splom:!0};function L(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"),A=e.hovermode||d.hovermode,T="x"===(A||"").charAt(0),k="y"===(A||"").charAt(0);if(w&&(T||k)&&"axis"===x)for(var E=f.length,R=0;R<E;R++)if(b[u=f[R]]){var I=g.getFromId(t,u,T?"x":"y")._subplotsWith;if(I&&I.length)for(var j=0;j<I.length;j++)s(f,I[j])}if(_&&"single"!==x){var G=_.overlays.map((function(t){return t.id}));f=f.concat(G)}for(var Y=f.length,W=new Array(Y),q=new Array(Y),X=!1,Z=0;Z<Y;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(A&&!X&&(A="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(A)||!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(A="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,yt,mt=t.calcdata.slice();for(mt.sort((function(t,e){return(t[0].trace.zorder||0)-(e[0].trace.zorder||0)})),rt=0;rt<mt.length;rt++)nt=mt[rt],"skip"!==(it=nt[0].trace).hoverinfo&&m.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,yt=e.clientY-xt.top,d._calcInverseTransform(t);var bt=o.apply3DTransform(d._invTransform)(gt,yt);if(gt=bt[0],yt=bt[1],gt<0||gt>W[0]._length||yt<0||yt>q[0]._length)return v.unhoverRaw(t,e)}else gt="xpx"in e?e.xpx:W[0]._length/2,yt="ypx"in e?e.ypx:q[0]._length/2;if(e.pointerX=gt+W[0]._offset,e.pointerY=yt+q[0]._offset,$="xval"in e?m.flat(f,e.xval):m.p2c(W,gt),tt="yval"in e?m.flat(f,e.yval):m.p2c(q,yt),!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=A,m.isUnifiedHover(st)&&(st=st.charAt(0)),"splom"===it.type?at=f[ot=0]:(at=m.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,A))}else o.log("Unrecognized trace type in hover:",it);if("closest"===A&&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=Mt(g),(!pt.vLinePoint||pt.vLinePoint.spikeDistance>h.spikeDistance)&&(pt.vLinePoint=h))}var y=c.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(y.length){var b=y[0];i(b.x0)&&i(b.y0)&&(h=Mt(b),(!pt.hLinePoint||pt.hLinePoint.spikeDistance>h.spikeDistance)&&(pt.hLinePoint=h))}}}}}function At(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 Mt(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 Tt={fullLayout:d,container:d._hoverlayer,event:e},kt=t._spikepoints,St={vLinePoint:pt.vLinePoint,hLinePoint:pt.hLinePoint};t._spikepoints=St;var Et=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];y.traceIs(s.trace,"bar-like")||y.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,A)};Et();var Ot=A.charAt(0),Ct=("x"===Ot||"y"===Ot)&&ht[0]&&C[ht[0].trace.type];if(w&&0!==Q&&0!==ht.length){var Lt=At(ht.filter((function(t){return t.ya.showspikes})),Q,Ct);pt.hLinePoint=Mt(Lt);var Rt=At(ht.filter((function(t){return t.xa.showspikes})),Q,Ct);pt.vLinePoint=Mt(Rt)}if(0===ht.length){var Dt=v.unhoverRaw(t,e);return!w||null===pt.hLinePoint&&null===pt.vLinePoint||z(kt)&&B(t,pt,Tt),Dt}if(w&&z(kt)&&B(t,pt,Tt),m.isXYhover(st)&&0!==ht[0].length&&"splom"!==ht[0].trace.type){var It=ht[0],Pt=(ht=O[It.trace.type]?ht.filter((function(t){return t.trace.index===It.trace.index})):[It]).length;wt(U("x",It,d),U("y",It,d));var Ft,Nt=[],Bt={},zt=0,jt=function(t){var e=O[t.trace.type]?L(t):t.trace.index;if(Bt[e]){var r=Bt[e]-1,n=Nt[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Nt[r]=t)}else zt++,Bt[e]=zt,Nt.push(t)};for(Ft=0;Ft<Pt;Ft++)jt(ht[Ft]);for(Ft=ht.length-1;Ft>Pt-1;Ft--)jt(ht[Ft]);ht=Nt,Et()}var Ut=t._hoverdata,Ht=[],Vt=H(t),Gt=V(t);for(et=0;et<ht.length;et++){var Yt=ht[et],Wt=m.makeEventData(Yt,Yt.trace,Yt.cd);if(!1!==Yt.hovertemplate){var qt=!1;Yt.cd[Yt.index]&&Yt.cd[Yt.index].ht&&(qt=Yt.cd[Yt.index].ht),Yt.hovertemplate=qt||Yt.trace.hovertemplate||!1}if(Yt.xa&&Yt.ya){var Xt=Yt.x0+Yt.xa._offset,Zt=Yt.x1+Yt.xa._offset,Jt=Yt.y0+Yt.ya._offset,Kt=Yt.y1+Yt.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+Gt,x1:$t+Gt,y0:te+Vt,y1:ee+Vt}}Yt.eventData=[Wt],Ht.push(Wt)}t._hoverdata=Ht;var re="y"===A&&(dt.length>1||ht.length>1)||"closest"===A&&vt&&ht.length>1,ne=p.combine(d.plot_bgcolor||p.background,d.paper_bgcolor),ie=D(ht,{gd:t,hovermode:A,rotateLabels:re,bgColor:ne,container:d._hoverlayer,outerContainer:d._paper.node(),commonLabelOpts:d.hoverlabel,hoverdistance:d.hoverdistance}),ae=ie.hoverLabels;if(m.isUnifiedHover(A)||(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),y=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},A=function(t){return t*r._invScaleY};function T(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(u=t[s]).pos+u.dp+u.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos>e.pmax-1&&(u.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((u=t[s]).pos<e.pmin+1)for(u.del=!0,n--,o=2*u.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos+u.dp+u.size>e.pmax&&(u.del=!0,n--)}}}for(t.each((function(t){var n=t[f],i=t[h],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,d=P(t,e),v=t.anchor,T="end"===v?-1:1;if("middle"===v)c=(u=t.crossPos+(a?A(d.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?A(t.by):w(t.bx));else if(a)c=(u=t.crossPos+A(S+d.y)-A(t.by/2-S))+A(t.by);else{var k=w(T*S+d.x),E=k+w(T*t.bx);u=t.crossPos+Math.min(k,E),c=t.crossPos+Math.max(k,E)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(c,x)-Math.max(u,m)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?M: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],E=g[s+1],O=k[k.length-1],C=E[0];if((a=O.pos+O.dp+O.size-C.pos-C.dp+C.size)>.01&&O.pmin===C.pmin&&O.pmax===C.pmax){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(k.push.apply(k,E),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(T)}for(s=g.length-1;s>=0;s--){var L=g[s];for(l=L.length-1;l>=0;l--){var R=L[l],D=R.datum;D.offset=R.dp,D.del=R.del}}}(ae,re,d,ie.commonLabelBoundingBox),F(ae,re,d._invScaleX,d._invScaleY)),l&&l.tagName){var oe=y.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=D(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,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(y.traceIs(v,"gl3d")){var g=i._fullLayout[v.scene]._scene.container,m=g.offsetLeft,x=g.offsetTop;c+=m,f+=m,h+=x,d+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).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})),F(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var R=/<extra>([\s\S]*)<\/extra>/;function D(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 A=e.fontFamily||x.HOVERFONT,M=e.fontSize||x.HOVERFONTSIZE,T=t[0],k=T.xa,O=T.ya,C=a.charAt(0),R=C+"Label",D=T[R];if(void 0===D&&"multicategory"===k.type)for(var P=0;P<t.length&&void 0===(D=t[P][R]);P++);var F=G(r,v),N=F.top,B=F.width,z=F.height,j=void 0!==D&&T.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 Y=Array.isArray(H)?H:H.split("+");if(-1===Y.indexOf("all")&&-1===Y.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||A,size:g.font.size||M,color:g.font.color||h};e.style({fill:u,stroke:c}),s.text(D).call(d.font,v).call(f.positionText,0,0).call(f.convertToTspans,r),t.attr("transform","");var y,m,x=G(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-S-E:N-x.top+S+E),y=k._offset+(T.x0+T.x1)/2,m=O._offset+("top"===k.side?0:O._length);var _=x.width/2+E,w=y;y<_?w=_:y>i.width-_&&(w=i.width-_),e.attr("d","M"+(y-w)+",0L"+(y-w+S)+","+b+S+"H"+_+"v"+b+(2*E+x.height)+"H"+-_+"V"+b+S+"H"+(y-w-S)+"Z"),y=w,q.minX=y-_,q.maxX=y+_,"top"===k.side?(q.minY=m-(2*E+x.height),q.maxY=m-E):(q.minY=m+E,q.maxY=m+(2*E+x.height))}else{var C,L,R;"right"===O.side?(C="start",L=1,R="",y=k._offset+k._length):(C="end",L=-1,R="-",y=k._offset),m=O._offset+(T.y0+T.y1)/2,s.attr("text-anchor",C),e.attr("d","M0,0L"+R+S+","+S+"V"+(E+x.height/2)+"h"+R+(2*E+x.width)+"V-"+(E+x.height/2)+"H"+R+S+"V-"+S+"Z"),q.minY=m-(E+x.height/2),q.maxY=m+(E+x.height/2),"right"===O.side?(q.minX=y+S,q.maxX=y+S+(2*E+x.width)):(q.minX=y-S-(2*E+x.width),q.maxX=y-S);var I,P=x.height/2,F=N-x.top-P,B="clip"+i._uid+"commonlabel"+O._id;if(y<x.width+2*E+S){I="M-"+(S+E)+"-"+P+"h-"+(x.width-E)+"V"+P+"h"+(x.width-E)+"Z";var z=x.width-y+E;f.positionText(s,z,F),"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=G(r,e.node());Math.round(i.width)<Math.round(x.width)&&t.attr("x",z-i.width),e.remove()}))}else f.positionText(s,L*(E+S),F),I=null;var j=i._topclips.selectAll("#"+B).data(I?[0]:[]);j.enter().append("clipPath").attr("id",B).append("path"),j.exit().remove(),j.select("path").attr("d",I),d.setClipUrl(s,I?B:null,r)}t.attr("transform",l(y,m))})),m.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:D,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=I(et,!0,a,i,D),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=G(r,ct.node()),ht=ft.width+2*E,dt=ft.height+2*E,pt=X[0],vt=(pt.x0+pt.x1)/2,gt=(pt.y0+pt.y1)/2,yt=!(y.traceIs(pt.trace,"bar-like")||y.traceIs(pt.trace,"box-violin"));"y"===C?yt?(st=gt-E,ot=gt+E):(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?yt?(lt=vt+E,ut=vt-E):(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 mt,xt,bt=k._offset,_t=O._offset;return ut+=bt-ht,st+=_t-dt,mt=(lt+=bt)+ht<B&<>=0?lt:ut+ht<B&&ut>=0?ut:bt+ht<B?bt:lt-vt<vt-ut+ht?B-ht:0,mt+=E,xt=(ot+=_t)+dt<z&&ot>=0?ot:st+dt<z&&st>=0?st:_t+dt<z?_t:ot-gt<gt-st+dt?z-dt:0,xt+=E,ct.attr("transform",l(mt-1,xt-1)),ct}var wt=h.selectAll("g.hovertext").data(t,(function(t){return L(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,A,M)})),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),y=t.borderColor||p.contrast(v),m=I(t,j,a,i,D,e),x=m[0],b=m[1],_=e.select("text.nums").call(d.font,t.fontFamily||A,t.fontSize||M,t.fontColor||y).text(x).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r),T=e.select("text.name"),k=0,O=0;if(b&&b!==x){T.call(d.font,t.fontFamily||A,t.fontSize||M,g).text(b).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r);var C=G(r,T.node());k=C.width+2*E,O=C.height+2*E}else T.remove(),e.select("rect").remove();e.select("path").style({fill:v,stroke:y});var L=t.xa._offset+(t.x0+t.x1)/2,R=t.ya._offset+(t.y0+t.y1)/2,P=Math.abs(t.x1-t.x0),F=Math.abs(t.y1-t.y0),U=G(r,_.node()),H=U.width/i._invScaleX,V=U.height/i._invScaleY;t.ty0=(N-U.top)/i._invScaleY,t.bx=H+2*E,t.by=Math.max(V+2*E,O),t.anchor="start",t.txwidth=H,t.tx2width=k,t.offset=0;var Y,W,q=(H+S+E+k)*i._invScaleX;if(s)t.pos=L,Y=R+F/2+q<=z,W=R-F/2-q>=0,"top"!==t.idealAlign&&Y||!W?Y?(R+=F/2,t.anchor="start"):t.anchor="middle":(R-=F/2,t.anchor="end"),t.crossPos=R;else{if(t.pos=R,Y=L+P/2+q<=B,W=L-P/2-q>=0,"left"!==t.idealAlign&&Y||!W)if(Y)L+=P/2,t.anchor="start";else{t.anchor="middle";var X=q/2,Z=L+X-B,J=L-X;Z>0&&(L-=Z),J<0&&(L+=-J)}else L-=P/2,t.anchor="end";t.crossPos=L}_.attr("text-anchor",t.anchor),k&&T.attr("text-anchor",t.anchor),e.attr("transform",l(L,R)+(s?u(w):""))})),{hoverLabels:wt,commonLabelBoundingBox:q}}function I(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=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 P(t,e){var r=0,n=t.offset;return e&&(n*=-k,r=t.offset*T),{x:r,y:n}}function F(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])*(S+E))+s*(i.txwidth+E),"middle"===i.anchor&&(l-=i.tx2width/2,u+=i.txwidth/2+E),{alignShift:s,textShiftX:l,text2ShiftX:u}),g=P(t,e),y=g.x,m=g.y,x="middle"===h;r.select("path").attr("d",x?"M-"+a(t.bx/2+t.tx2width/2)+","+o(m-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(p*S+y)+","+o(S+m)+"v"+o(t.by/2-S)+"h"+a(p*t.bx)+"v-"+o(t.by)+"H"+a(p*S+y)+"V"+o(m-S)+"Z");var b=y+v.textShiftX,_=m+t.ty0-t.by/2+E,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==h?(c.attr("text-anchor","start"),b=x?-t.bx/2-t.tx2width/2+E:-t.bx-E):"right"===w&&"end"!==h&&(c.attr("text-anchor","end"),b=x?t.bx/2-t.tx2width/2-E:t.bx+E)),c.call(f.positionText,a(b),o(_)),t.tx2width&&(r.select("text.name").call(f.positionText,a(v.text2ShiftX+v.alignShift*E+y),o(m+t.ty0-t.by/2+E)),r.select("rect").call(d.setRect,a(v.text2ShiftX+(v.alignShift-1)*t.tx2width/2+y),o(m-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("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 B(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,y,m=e.hLinePoint;n=m&&m.xa,"cursor"===(i=m&&m.ya).spikesnap?(v=u.pointerX,y=u.pointerY):(v=n._offset+m.x,y=i._offset+m.y);var x,b,_=a.readability(m.color,h)<1.5?p.contrast(h):m.color,w=i.spikemode,A=i.spikethickness,M=i.spikecolor||_,T=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=T,b=v),-1!==w.indexOf("across")){var k=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(k=Math.min(k,i.position),S=Math.max(S,i.position)),x=l.l+k*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":A,stroke:M,"stroke-dasharray":d.dashStyle(i.spikedash,A)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":A+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:T+("right"!==i.side?A:-A),cy:y,r:A,fill:M}).classed("spikeline",!0)}if(f){var E,O,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(E=u.pointerX,O=u.pointerY):(E=n._offset+C.x,O=i._offset+C.y);var L,R,D=a.readability(C.color,h)<1.5?p.contrast(h):C.color,I=n.spikemode,P=n.spikethickness,F=n.spikecolor||D,N=g.getPxPosition(t,n);if(-1!==I.indexOf("toaxis")||-1!==I.indexOf("across")){if(-1!==I.indexOf("toaxis")&&(L=N,R=O),-1!==I.indexOf("across")){var B=n._counterDomainMin,z=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),z=Math.max(z,n.position)),L=l.t+(1-z)*l.h,R=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:R,"stroke-width":P,stroke:F,"stroke-dasharray":d.dashStyle(n.spikedash,P)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:R,"stroke-width":P+2,stroke:h}).classed("spikeline",!0).classed("crisp",!0)}-1!==I.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:N-("top"!==n.side?P:-P),r:P,fill:F}).classed("spikeline",!0)}}}function z(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 G(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)}}},16132:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},41008:function(t,e,r){"use strict";var n=r(3400),i=r(65460);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},93024:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(86476),o=r(10624),s=r(65460),l=r(83292);t.exports={moduleType:"component",name:"fx",constants:r(92456),schema:{layout:s},attributes:r(55756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(81976),supplyDefaults:r(95448),supplyLayoutDefaults:r(88336),calc:r(55056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(62376)}},65460:function(t,e,r){"use strict";var n=r(92456),i=r(25376),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},88336:function(t,e,r){"use strict";var n=r(3400),i=r(65460),a=r(41008),o=r(16132);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},81976:function(t,e,r){"use strict";var n=r(3400),i=r(16132),a=r(65460);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},12704:function(t,e,r){"use strict";var n=r(3400),i=r(53756).counter,a=r(86968).u,o=r(33816).idRegex,s=r(31780),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function u(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h<i;h++){var 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"),y=M("rows",o),m=M("columns",f);if(y*m>1){h||d||p||"independent"===M("pattern")&&(h=!0),g._hasSubplotGrid=h;var x,b,_="top to bottom"===M("roworder"),w=h?.2:.1,A=h?.3:.1;v&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),g._domains={x:c("x",M,w,x,m),y:c("y",M,A,b,y,_)}}else delete e.grid}function M(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,y="independent"===r.pattern,m=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(y?(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!==m[a]&&m[a]!==i||void 0!==m[o]&&m[o]!==n)continue;_[i]=s,m[a]=i,m[o]=n}}}else{var A=u(e,h,"x"),M=u(e,h,"y");r.xaxes=f(A,d.xaxis,g,m,"x"),r.yaxes=f(M,d.yaxis,v,m,"y")}var T=r._anchors={},k="top to bottom"===r.roworder;for(var S in m){var E,O,C,L=S.charAt(0),R=r[L+"side"];if(R.length<8)T[S]="free";else if("x"===L){if("t"===R.charAt(0)===k?(E=0,O=1,C=v):(E=v-1,O=-1,C=-1),p){var D=m[S];for(n=E;n!==C;n+=O)if((s=l[n][D])&&(c=s.indexOf("y"),s.slice(0,c)===S)){T[S]=s.slice(c);break}}else for(n=E;n!==C;n+=O)if(o=r.yaxes[n],-1!==d.cartesian.indexOf(S+o)){T[S]=o;break}}else if("l"===R.charAt(0)?(E=0,O=1,C=g):(E=g-1,O=-1,C=-1),p){var I=m[S];for(n=E;n!==C;n+=O)if((s=l[I][n])&&(c=s.indexOf("y"),s.slice(c)===S)){T[S]=s.slice(0,c);break}}else for(n=E;n!==C;n+=O)if(a=r.xaxes[n],-1!==d.cartesian.indexOf(a+S)){T[S]=a;break}}}}}},65760:function(t,e,r){"use strict";var n=r(33816),i=r(31780).templatedArray;r(36208),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},63556:function(t,e,r){"use strict";var n=r(38248),i=r(36896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,f=e._id.charAt(0),h=0;h<c.length;h++)if(u="images["+h+"].",(l=c[h])[f+"ref"]===e._id){var d=l[f],p=l["size"+f],v=null,g=null;if(o){v=i(d,e.range);var y=p/Math.pow(10,v)/2;g=2*Math.log(y+Math.sqrt(1+y*y))/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)}}},25024:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(65760);function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a("source");if(!a("visible",!!s))return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:r},u=["x","y"],c=0;c<2;c++){var f=u[c],h=i.coerceRef(t,e,l,f,"paper",void 0);"paper"!==h&&i.getFromId(l,h)._imgIndices.push(e._index),i.coercePosition(e,l,a,h,f,0)}return e}t.exports=function(t,e){a(t,e,{name:"images",handleItemDefaults:s})}},60963:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(54460),o=r(79811),s=r(9616);t.exports=function(t){var e,r,l=t._fullLayout,u=[],c={},f=[];for(r=0;r<l.images.length;r++){var h=l.images[r];if(h.visible)if("below"===h.layer&&"paper"!==h.xref&&"paper"!==h.yref){e=o.ref2id(h.xref)+o.ref2id(h.yref);var 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 y(e){var r,o,s=n.select(this),u=a.getFromId(t,e.xref),c=a.getFromId(t,e.yref),f="domain"===a.getRefType(e.xref),h="domain"===a.getRefType(e.yref),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,y,m=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+=m,y=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,y+=x,e.sizing){case"fill":b+=" slice";break;case"stretch":b="none"}s.attr({x:g,y:y,width:r,height:o,preserveAspectRatio:b,opacity:e.opacity});var _=(u&&"domain"!==a.getRefType(e.xref)?u._id:"")+(c&&"domain"!==a.getRefType(e.yref)?c._id:"");i.setClipUrl(s,_?"clip"+l._uid+_:null,t)}var m=l._imageLowerLayer.selectAll("image").data(f),x=l._imageUpperLayer.selectAll("image").data(u);m.enter().append("image"),x.enter().append("image"),m.exit().remove(),x.exit().remove(),m.each((function(t){g.bind(this)(t),y.bind(this)(t)})),x.each((function(t){g.bind(this)(t),y.bind(this)(t)}));var b=Object.keys(l._plots);for(r=0;r<b.length;r++){e=b[r];var _=l._plots[e];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(c[e]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(t){g.bind(this)(t),y.bind(this)(t)}))}}}},7402:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(65760),supplyLayoutDefaults:r(25024),includeBasePlot:r(36632)("images"),draw:r(60963),convertCoords:r(63556)}},3800:function(t,e,r){"use strict";var n=r(25376),i=r(22548);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},65196:function(t){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},77864:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(31780),o=r(45464),s=r(3800),l=r(64859),u=r(42451);function c(t,e,r,c){var f=e[t]||{},h=a.newContainer(r,t);function 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)},y=r.font||{},m=i.coerceFont(d,"grouptitlefont",i.extendFlat({},y,{size:Math.round(1.1*y.size)})),x=0,b=!1,_="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),A=c.concat(w).filter((function(e){return t===(e.legend||"legend")})),M=0;M<A.length;M++)if((v=A[M]).visible){var T=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,(!T&&n.traceIs(v,"pie-like")||!0===v._input.showlegend)&&x++),i.coerceFont(g,"legendgrouptitle.font",m)),(!T&&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 S,E,O,C="h"===d("orientation"),L="paper"===d("yref"),R="paper"===d("xref"),D="left";if(C?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?L?(E=1.1,O="bottom"):(E=1,O="top"):L?(E=-.1,O="top"):(E=0,O="bottom")):(E=1,O="auto",R?S=1.02:(S=1,D="right")),i.coerce(f,h,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:S}},"x"),i.coerce(f,h,{y:{valType:"number",editType:"legend",min:L?-2:0,max:L?3:1,dflt:E}},"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",D),d("yanchor",O),d("valign"),i.noneOrAll(f,h,["x","y"]),d("title.text")){d("title.side",C?"left":"top");var I=i.extendFlat({},p,{size:i.bigFont(p.size)});i.coerceFont(d,"title.font",I)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(n=0;n<a.length;n++)i.pushUnique(u,a[n].legend);for(e._legends=[],n=0;n<u.length;n++){var f=u[n];c(f,t,e,a),e[f]&&e[f].visible&&(e[f]._id=f),e._legends.push(f)}}},31140:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(7316),o=r(24040),s=r(95924),l=r(86476),u=r(43616),c=r(76308),f=r(72736),h=r(33048),d=r(65196),p=r(84284),v=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,m=r(35456),x=r(2012),b=r(42451),_=1,w=/^legend[0-9]*$/;function A(t,e){var r,s,h=e||{},p=t._fullLayout,w=R(h),A=h._inHover;if(A?(s=h.layer,r="hover"):(s=p._infolayer,r=w),s){var S;if(r+=p._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),A){if(!h.entries)return;S=m(h.entries,h)}else{for(var D=(t.calcdata||[]).slice(),I=p.shapes,P=0;P<I.length;P++){var F=I[P];if(F.showlegend){var N={_isShape:!0,_fullInput:F,index:F._index,name:F.name||F.label.text||"shape "+F._index,legend:F.legend,legendgroup:F.legendgroup,legendgrouptitle:F.legendgrouptitle,legendrank:F.legendrank,legendwidth:F.legendwidth,showlegend:F.showlegend,visible:F.visible,opacity:F.opacity,mode:"line"===F.type?"lines":"markers",line:F.line,marker:{line:F.line,color:F.fillcolor,size:12,symbol:"rect"===F.type?"square":"circle"===F.type?"circle":"hexagon2"}};D.push([{trace:N}])}}S=p.showlegend&&m(D,h,p._legends.length>1)}var B=p.hiddenlabels||[];if(!(A||p.showlegend&&S.length))return s.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),a.autoMargin(t,w);var z=i.ensureSingle(s,"g",w,(function(t){A||t.attr("pointer-events","all")})),j=i.ensureSingleById(p._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(z,"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(z,"g","scrollbox"),G=h.title;h._titleWidth=0,h._titleHeight=0,G.text?((H=i.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(u.font,G.font).text(G.text),O(H,V,t,h,_)):V.selectAll("."+w+"titletext").remove();var Y=i.ensureSingle(z,"rect","scrollbar",(function(t){t.attr(d.scrollBarEnterAttrs).call(c.fill,d.scrollBarColor)})),W=V.selectAll("g.groups").data(S);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!==B.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(){A||n.select(this).call(E,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,y=2*(h+v),m=L(i),x=i.y<0||0===i.y&&"top"===m,_=i.y>1||1===i.y&&"bottom"===m,w=i.tracegroupgap,A={};i._maxHeight=Math.max(x||_?a.height/2:s.h,30);var T=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)})),T=g+i._width,i._width+=v+g+p,i._height+=y,c&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=C(i),E=i.x<0||0===i.x&&"right"===S,O=i.x>1||1===i.x&&"left"===S,D=_||x,I=a.width/2;i._maxWidth=Math.max(E?D&&"left"===S?s.l+s.w:I:O?D&&"right"===S?s.r+s.w:I:s.w,2*g);var P=0,F=0;r.each((function(t){var e=M(t,i,g);P=Math.max(P,e),F+=e})),T=null;var N=0;if(c){var B=0,z=0,j=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=M(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),A[r[0].trace.legendgroup]=t}));var r=t+v;z>0&&r+h+z>i._maxWidth?(N=Math.max(N,z),z=0,j+=B+w,B=e):B=Math.max(B,e),u.setTranslate(this,z,j),z+=r})),i._width=Math.max(N,z)+h,i._height=j+B+y}else{var U=r.size(),H=F+p+(U-1)*v<i._maxWidth,V=0,G=0,Y=0,W=0;r.each((function(t){var e=t[0].height,r=M(t,i,g),n=H?r:P;f||(n+=v),n+h+G-v>=i._maxWidth&&(N=Math.max(N,W),G=0,Y+=V,i._height+=V,V=0),u.setTranslate(this,k[0]+h+G,k[1]+h+Y+e/2+v),W=G+r+v,G+=n,V=Math.max(V,e)})),H?(i._width=G+p,i._height=V+y):(i._width=Math.max(N,W)+p,i._height+=V+y)}}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=M(t,i,g);c&&""!==a&&(s=A[a]);var h=X?g:T||s;l||f||(h+=v/2),u.setRect(e,0,-r/2,h,r)}))}(t,W,q,h)},function(){var e,c,m,x,b=p._size,_=h.borderwidth,M="paper"===h.xref,k="paper"===h.yref;if(G.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,_),!A){var S,E;S=M?b.l+b.w*h.x-g[C(h)]*h._width:p.width*h.x-g[C(h)]*h._width,E=k?b.t+b.h*(1-h.y)-g[L(h)]*h._effHeight:p.height*(1-h.y)-g[L(h)]*h._effHeight;var O=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=C(o),l=L(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*y[s],b:o._effHeight*y[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,S,E);if(O)return;if(p.margin.autoexpand){var R=S,D=E;S=M?i.constrain(S,0,p.width-h._width):R,E=k?i.constrain(E,0,p.height-h._effHeight):D,S!==R&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==D&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(z,S,E)}if(Y.on(".drag",null),z.on("wheel",null),A||h._height<=h._maxHeight||t._context.staticPlot){var I=h._effHeight;A&&(I=h._height),U.attr({width:h._width-_,height:I-_,x:_/2,y:_/2}),u.setTranslate(V,0,0),j.select("rect").attr({width:h._width-2*_,height:I-2*_,x:_,y:_}),u.setClipUrl(V,r,t),u.setRect(Y,0,0,0,0),delete h._scrollY}else{var P,F,N,B=Math.max(d.scrollBarMinHeight,h._effHeight*h._effHeight/h._height),W=h._effHeight-B-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,B,X),z.on("wheel",(function(){Q(Z=i.constrain(h._scrollY+n.event.deltaY/W*q,0,q),B,X),0!==Z&&Z!==q&&n.event.preventDefault()}));var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;P="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,N=Z})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(F="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,P,F),Q(Z,B,X))}));Y.call(J);var K=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(P=t.changedTouches[0].clientY,N=Z)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(F=t.changedTouches[0].clientY,Z=function(t,e,r){var n=(e-r)/X+t;return i.constrain(n,0,q)}(N,P,F),Q(Z,B,X))}));V.call(K)}function Q(e,r,n){h._scrollY=t._fullLayout[w]._scrollY=e,u.setTranslate(V,0,-e),u.setRect(Y,h._width,d.scrollBarMargin+e*n,d.scrollBarWidth,r),j.select("rect").attr("y",_+e)}t._context.edits.legendPosition&&(z.classed("cursor-move",!0),l.init({element:z.node(),gd:t,prepFn:function(){var t=u.getTranslate(z);m=t.x,x=t.y},moveFn:function(t,r){var n=m+t,i=x+r;u.setTranslate(z,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&&T(t,z,n,e,r)}}))}],t)}}function M(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 T(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?S(n,v):n);var y=r.indentation+r.itemwidth+2*d.itemGap;f.positionText(g,y,0),p?g.call(f.makeEditable,{gd:e,text:n}).call(O,t,e,r).on("edit",(function(n){this.text(S(n,v)).call(O,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)})):O(g,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function E(t,e,r){var a,o=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTime<o?s+=1:(s=1,e._legendMouseDownTime=a)})),l.on("mouseup",(function(){if(!e._dragged&&!e._editing){var i=e._fullLayout[r];(new Date).getTime()-e._legendMouseDownTime>o&&(s=Math.max(s-1,1)),T(e,i,t,s,n.event)}})))}function O(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 y="."+s+(n===_?"title":"")+"text",m=t.select(y),x=f.lineCount(m),b=m.node();if(l=p*x,c=b?u.bBox(b).width:0,n===_)"left"===r.title.side&&(c+=2*d.itemGap),f.positionText(m,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(m,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 L(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)A(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var a=0;a<i.length;a++){var o=i[a];A(t,t._fullLayout[o])}}}},35456:function(t,e,r){"use strict";var n=r(24040),i=r(42451);t.exports=function(t,e,r){var a,o,s=e._inHover,l=i.isGrouped(e),u=i.isReversed(e),c={},f=[],h=!1,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 y=t[a],m=y[0],x=m.trace,b=x.legend,_=x.legendgroup;if(s||x.visible&&x.showlegend)if(n.traceIs(x,"pie-like"))for(d[_]||(d[_]={}),o=0;o<y.length;o++){var w=y[o].label;d[_][w]||(g(b,_,{label:w,color:y[o].color,i:y[o].i,trace:x,pts:y[o].pts}),d[_][w]=!0,v=Math.max(v,(w||"").length))}else g(b,_,m),v=Math.max(v,(x.name||"").length)}if(!f.length)return[];var A=!h||!l,M=[];for(a=0;a<f.length;a++){var T=c[f[a]];A?M.push(T[0]):M.push(T)}for(A&&(M=[M]),a=0;a<M.length;a++){var k=1/0;for(o=0;o<M[a].length;o++){var S=M[a][o].trace.legendrank;k>S&&(k=S)}M[a][0]._groupMinRank=k,M[a][0]._preGroupSort=a}var E=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(M.forEach((function(t,e){t[0]._preGroupSort=e})),M.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;a<M.length;a++){M[a].forEach((function(t,e){t._preSort=e})),M[a].sort(E);var O=M[a][0].trace,C=null;for(o=0;o<M[a].length;o++){var L=M[a][o].trace.legendgrouptitle;if(L&&L.text){C=L,s&&(L.font=e._groupTitleFont);break}}if(u&&M[a].reverse(),C){var R=!1;for(o=0;o<M[a].length;o++)if(n.traceIs(M[a][o].trace,"pie-like")){R=!0;break}M[a].unshift({i:-1,groupTitle:C,noClick:R,trace:{showlegend:O.showlegend,legendgroup:O.legendgroup,visible:"toggleitem"===e.groupclick||O.visible}})}for(o=0;o<M[a].length;o++)M[a][o]=[M[a][o]]}return e._lgroupsLength=M.length,e._maxNameLength=v,M}},33048:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=i.pushUnique,o=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,u=s.legend.itemclick,c=s.legend.itemdoubleclick,f=s.legend.groupclick;if(1===r&&"toggle"===u&&"toggleothers"===c&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=u:2===r&&(l=c),l){var h="togglegroup"===f,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})),y=v.concat(g),m=p.trace;m._isShape&&(m=m._fullInput);var x,b,_,w,A,M=m.legendgroup,T={},k=[],S=[],E=[],O=(s.shapes||[]).map((function(t){return t._input})),C=!1,L=m.legend,R=m._fullInput;if(R&&R._isShape||!n.traceIs(m,"pie-like")){var D,I=M&&M.length,P=[];if(I)for(x=0;x<y.length;x++)(D=y[x]).visible&&D.legendgroup===M&&P.push(x);if("toggle"===l){var F;switch(m.visible){case!0:F="legendonly";break;case!1:F=!1;break;case"legendonly":F=!0}if(I)if(h)for(x=0;x<y.length;x++){var N=y[x];!1!==N.visible&&N.legendgroup===M&&tt(N,F)}else tt(m,F);else tt(m,F)}else if("toggleothers"===l){var B,z,j,U,H=!0;for(x=0;x<y.length;x++)if(B=(U=y[x])===m,z=!0!==U.showlegend,!(B||z||I&&U.legendgroup===M||U.legend!==L||!0!==U.visible||n.traceIs(U,"notLegendIsolatable"))){H=!1;break}for(x=0;x<y.length;x++)if(!1!==(U=y[x]).visible&&U.legend===L&&!n.traceIs(U,"notLegendIsolatable"))switch(m.visible){case"legendonly":tt(U,!0);break;case!0:j=!!H||"legendonly",B=U===m,z=!0!==U.showlegend&&!U.legendgroup,tt(U,!!(B||I&&U.legendgroup===M||z)||j)}}for(x=0;x<S.length;x++)if(_=S[x]){var V=_.constructUpdate(),G=Object.keys(V);for(b=0;b<G.length;b++)w=G[b],(T[w]=T[w]||[])[E[x]]=V[w]}for(A=Object.keys(T),x=0;x<A.length;x++)for(w=A[x],b=0;b<k.length;b++)T[w].hasOwnProperty(b)||(T[w][b]=void 0);C?n.call("_guiUpdate",e,T,{shapes:O},k):n.call("_guiRestyle",e,T,k)}else{var Y=p.label,W=d.indexOf(Y);if("toggle"===l)-1===W?d.push(Y):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;L===Z[0].trace.legend&&Y!==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=T.visible;return n||(n=T.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=S[s];if(!l){var u=n.getTransformIndices(a,"groupby"),c=u[u.length-1];l=i.keyedContainer(a,"transforms["+c+"].styles","target","value.visible"),S[s]=l}var f=l.get(t._group);void 0===f&&(f=!0),!1!==f&&l.set(t._group,e),E[s]=$(s,!1!==a.visible)}else{var d=!1!==a.visible&&e;o?(r=d,O[s].visible=r,C=!0):$(s,d)}}}}},42451:function(t,e){"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},2780:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(3800),supplyLayoutDefaults:r(77864),draw:r(31140),style:r(2012)}},2012:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=a.strTranslate,s=r(43616),l=r(76308),u=r(94288).extractOpts,c=r(43028),f=r(10528),h=r(69656).castOption,d=r(65196);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 y=e._fullLayout;r||(r=y.legend);var m="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 m?n:Math.min(i,r)};function A(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 y=d||a.mc||f.color,m=f.pattern,x=m&&s.getPatternAttr(m.shape,0,"");if(x){var b=s.getPatternAttr(m.bgcolor,0,null),_=s.getPatternAttr(m.fgcolor,0,null),A=m.fgopacity,M=g(m.size,8,10),T=g(m.solidity,.5,1),k="legend-"+c.uid;i.call(s.pattern,"legend",e,k,x,M,T,d,m.fillmode,b,_,A)}else i.call(l.fill,y);o&&l.stroke(i,a.mlc||h.color)}))}function M(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),y=a.minExtend(s,{trace:g},v);f(c,y,g,e)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,u=t[0].lineHeight,c=t[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var f={top:1,bottom:-1}[l]*(.5*(u-c+3))||0,h=r.indentation;i.attr("transform",o(h,f))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var 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 y=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",t[0]),c?f.call(l.fill,c):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,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,A(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){A(t,this,"funnel")})).each((function(t){A(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){M(t,this,"funnelarea")})).each((function(t){M(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,y=o.anyLine,m=t[0],b=m.trace,_=u(b),A=_.colorscale,M=_.reversescale,T=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",k=n.select(this),S=k.select(".legendfill").selectAll("path").data(l||d?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",T+"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(M),A,"fill")}})),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(m,{trace:i})]}var O=k.select(".legendlines").selectAll("path").data(f||h?[r]:[]);O.enter().append("path").classed("js-line",!0),O.exit().remove(),O.attr("d",T+(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(M),A,"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 y(t,e,r,n){var i=a.nestedProperty(p,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(m&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(t){return d._distinct&&d.index&&t[d.index]?t[d.index]:t[0]}if(h||g||f){var b={},w={};if(h){b.mc=y("marker.color",x),b.mx=y("marker.symbol",x),b.mo=y("marker.opacity",a.mean,[.2,1]),b.mlc=y("marker.line.color",x),b.mlw=y("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var A=y("marker.size",a.mean,[2,16],12);b.ms=A,w.marker.size=A}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=y("textposition",x),b.ts=10,b.tc=y("textfont.color",x),b.tf=y("textfont.family",x)),r=[a.minExtend(d,b)],(i=a.minExtend(p,w)).selectedpoints=null,i.texttemplate=null}var M=n.select(this).select("g.legendpoints"),T=M.selectAll("path.scatterpts").data(h?r:[]);T.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),T.exit().remove(),T.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var k=M.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)}))}))}},66540:function(t,e,r){"use strict";r(76052),t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(t,e,r){"use strict";var n=r(24040),i=r(7316),a=r(79811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),u=l._,c=t.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=t._fullLayout,c={},f=a.list(t,null,!0),h=u._cartesianSpikesEnabled;if("zoom"===s){var 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 y=[r.r2l(r.range[0]),r.r2l(r.range[1])],m=[v*y[0]+g*y[1],v*y[1]+g*y[0]];c[d+".range[0]"]=r.l2r(m[0]),c[d+".range[1]"]=r.l2r(m[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=u._isHoriz?"y":"x",o.setAttribute("data-val",l)),c[s]=l;u._cartesianSpikesEnabled=h,n.call("_guiRelayout",t,c)}function h(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split("."),u=0;u<o.length;u++)s[o[u]+"."+l[1]]=a;var c="pan"===a?a:"zoom";s.dragmode=c,n.call("_guiRelayout",t,s)}function 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 y(t){var e=g(t);n.call("_guiRelayout",t,"hovermode",e)}function m(t,e){for(var r=e.currentTarget.getAttribute("data-val"),i=t._fullLayout,a=i._subplots.mapbox||[],o={},s=0;s<a.length;s++){var l=a[s],u=i[l].zoom,c="in"===r?1.05*u:u/1.05;o[l+".zoom"]=c}n.call("_guiRelayout",t,o)}function x(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];a[s+"."+f]=l[f]}n.call("_guiRelayout",t,a)}c.toImage={name:"toImage",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||"png";return u(t,"png"===e?"Download plot as a png":"Download plot")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};l.notifier(u(t,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&l.isIE()&&(l.notifier(u(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call("downloadImage",t,r).then((function(e){l.notifier(u(t,"Snapshot succeeded")+" - "+e,"long")})).catch((function(){l.notifier(u(t,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},c.sendDataToCloud={name:"sendDataToCloud",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},c.editInChartStudio={name:"editInChartStudio",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},c.pan2d={name:"pan2d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},c.select2d={name:"select2d",_cat:"select",title:function(t){return u(t,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return u(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},c.drawclosedpath={name:"drawclosedpath",title:function(t){return u(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},c.drawopenpath={name:"drawopenpath",title:function(t){return u(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},c.drawline={name:"drawline",title:function(t){return u(t,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},c.drawrect={name:"drawrect",title:function(t){return u(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},c.drawcircle={name:"drawcircle",title:function(t){return u(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},c.eraseshape={name:"eraseshape",title:function(t){return u(t,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return u(t,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return u(t,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return u(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return u(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f},c.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:h},c.pan3d={name:"pan3d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:h},c.orbitRotation={name:"orbitRotation",title:function(t){return u(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:h},c.tableRotation={name:"tableRotation",title:function(t){return u(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:h},c.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return u(t,"Reset camera to default")},attr:"resetDefault",icon:o.home,click: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:y},c.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},c.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:y},c.resetViewSankey={name:"resetSankeyGroup",title:function(t){return u(t,"Reset view")},icon:o.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e["node.groups"].push(i.node.groups.slice()),e["node.x"].push(i.node.x.slice()),e["node.y"].push(i.node.y.slice())}n.call("restyle",t,e)}},c.toggleHover={name:"toggleHover",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=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:m},c.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m}},76052:function(t,e,r){"use strict";var n=r(44248),i=Object.keys(n),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),s=[];i.forEach((function(t){!function(t){if(-1===o.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},90824:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(31780),o=r(66540);t.exports=function(t,e){var r=t.modebar||{},s=a.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,o,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var u=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(u,.3)),l("activecolor",i.addOpacity(u,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},45460:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(66540),supplyLayoutDefaults:r(90824),manage:r(18816)}},18816:function(t,e,r){"use strict";var n=r(79811),i=r(43028),a=r(24040),o=r(10624).isUnifiedHover,s=r(66400),l=r(44248),u=r(76052).DRAW_MODES,c=r(3400).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,f=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var h,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"),y=e._has("geo"),m=e._has("pie"),x=e._has("funnelarea"),b=e._has("gl2d"),_=e._has("ternary"),w=e._has("mapbox"),A=e._has("polar"),M=e._has("smith"),T=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),S=o(e.hovermode),E=[];function O(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])}E.push(e)}}var C=["toImage"];s.showEditInChartStudio?C.push("editInChartStudio"):s.showSendToCloud&&C.push("sendDataToCloud"),O(C);var L=[],R=[],D=[],I=[];(v||b||m||x||_)+y+g+w+A+M>1?(R=["toggleHover"],D=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],R=["hoverClosestGeo"],D=["resetGeo"]):g?(R=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(L=["zoomInMapbox","zoomOutMapbox"],R=["toggleHover"],D=["resetViewMapbox"]):b?R=["hoverClosestGl2d"]:m?R=["hoverClosestPie"]:T?(R=["hoverClosestCartesian","hoverCompareCartesian"],D=["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)||S)&&(R=[]),!v&&!b||k||(L=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==D[0]&&(D=["resetScale2d"])),g?I=["zoom3d","pan3d","orbitRotation","tableRotation"]:(v||b)&&!k||_?I=["zoom2d","pan2d"]:w||y?I=["pan2d"]:A&&(I=["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)&&I.push("select2d","lasso2d");var P=[],F=function(t){-1===P.indexOf(t)&&-1!==R.indexOf(t)&&P.push(t)};if(Array.isArray(d)){for(var N=[],B=0;B<d.length;B++){var z=d[B];"string"==typeof z?(z=z.toLowerCase(),-1!==u.indexOf(z)?(e._has("mapbox")||e._has("cartesian"))&&I.push(z):"togglespikelines"===z?F("toggleSpikelines"):"togglehover"===z?F("toggleHover"):"hovercompare"===z?F("hoverCompareCartesian"):"hoverclosest"===z?(F("hoverClosestCartesian"),F("hoverClosestGeo"),F("hoverClosest3d"),F("hoverClosestGl2d"),F("hoverClosestPie")):"v1hovermode"===z&&(F("toggleHover"),F("hoverClosestCartesian"),F("hoverCompareCartesian"),F("hoverClosestGeo"),F("hoverClosest3d"),F("hoverClosestGl2d"),F("hoverClosestPie"))):N.push(z)}d=N}return O(I),O(L.concat(D)),O(P),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(E,d)}(t),f?f.update(t,h):e._modeBar=s(t,h)}else f&&(f.destroy(),delete e._modeBar)}},66400:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(9224),s=r(25788).version,l=new DOMParser;function u(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=u.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+o.bgcolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+o.color),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+o.activecolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(e),u=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(l||u||c)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},c.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},c.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var a=t.val;if(void 0!==a&&("function"==typeof a&&(a=a(this.graphInfo)),r.setAttribute("data-val",a)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",t.path),t.transform?a.setAttribute("transform",t.transform):void 0!==t.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(a)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,o=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)o===r&&l.classed("active",!l.classed("active"));else{var u=null===o?o:a.nestedProperty(e,o).get();l.classed("active",u===i)}}))},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",a._(this.graphInfo,"Produced with Plotly.js")+" (v"+s+")"),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(".modebar")),a.deleteRelatedStyleRule(this._uid)},t.exports=function(t,e){var r=t._fullLayout,i=new u({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},26680:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=(0,r(31780).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:a,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},85984:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},22148:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(31780),o=r(51272),s=r(26680),l=r(85984);function u(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o("visible")){var l=o("step");"all"!==l&&(!a||"gregorian"===a||"month"!==l&&"year"!==l?o("stepmode"):e.stepmode="backward",o("count")),o("label")}}t.exports=function(t,e,r,c,f){var h=t.rangeselector||{},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")}}},50216:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(76308),s=r(43616),l=r(3400),u=l.strTranslate,c=r(72736),f=r(79811),h=r(84284),d=h.LINE_SPACING,p=h.FROM_TL,v=h.FROM_BR,g=r(85984),y=r(48040);function m(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function b(t,e,r,n){var i,a;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,a=n._fullLayout._meta,i.label?a?l.templateString(i.label,a):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){c.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=f.list(t,"x",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),m);e.enter().append("g").classed("rangeselector",!0),e.exit().remove(),e.style({cursor:"pointer","pointer-events":"all"}),e.each((function(e){var r=n.select(this),o=e,f=o.rangeselector,h=r.selectAll("g.button").data(l.filterVisible(f.buttons));h.enter().append("g").classed("button",!0),h.exit().remove(),h.each((function(e){var r=n.select(this),a=y(o,e);e._isActive=function(t,e,r){if("all"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,f,e),r.call(b,f,e,t),r.on("click",(function(){t._dragged||i.call("_guiRelayout",t,a)})),r.on("mouseover",(function(){e._isHovered=!0,r.call(x,f,e)})),r.on("mouseout",(function(){e._isHovered=!1,r.call(x,f,e)}))})),function(t,e,r,i,o){var f=0,h=0,y=r.borderwidth;e.each((function(){var t=n.select(this).select(".selector-text"),e=r.font.size*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(y+f,y)),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 m=t._fullLayout._size,x=m.l+m.w*r.x,b=m.t+m.h*(1-r.y),_="left";l.isRightAnchor(r)&&(x-=f,_="right"),l.isCenterAnchor(r)&&(x-=f/2,_="center");var w="top";l.isBottomAnchor(r)&&(b-=h,w="bottom"),l.isMiddleAnchor(r)&&(b-=h/2,w="middle"),f=Math.ceil(f),h=Math.ceil(h),x=Math.round(x),b=Math.round(b),a.autoMargin(t,i+"-range-selector",{x:r.x,y:r.y,l:f*p[_],r:f*v[_],b:h*v[w],t:h*p[w]}),o.attr("transform",u(x,b))}(t,h,f,o._name,r)}))}},48040:function(t,e,r){"use strict";var n=r(73220),i=r(3400).titleCase;t.exports=function(t,e){var r=t._name,a={};if("all"===e.step)a[r+".autorange"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n["utc"+i(s)],u=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(o,-u));break;case"todate":var c=l.offset(o,-u);r=t.l2r(+l.ceil(c))}return[r,a[1]]}(t,e);a[r+".range[0]"]=o[0],a[r+".range[1]"]=o[1]}return a}},41152:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(26680)}}},layoutAttributes:r(26680),handleDefaults:r(22148),draw:r(50216)}},11200:function(t,e,r){"use strict";var n=r(22548);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},26652:function(t,e,r){"use strict";var n=r(79811).list,i=r(19280).getAutoRange,a=r(74636);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},74636:function(t){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},94040:function(t,e,r){"use strict";var n=r(3400),i=r(31780),a=r(79811),o=r(11200),s=r(10936);t.exports=function(t,e,r){var l=t[r],u=e[r];if(l.rangeslider||e._requestRangeslider[u._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var c,f,h=l.rangeslider,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),y=0;y<g.length;y++){var m=g[y];c=h[m]||{},f=i.newContainer(d,m,"yaxis");var x,b=e[m];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)}}},20060:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(43616),u=r(76308),c=r(81668),f=r(57952),h=r(79811),d=r(86476),p=r(93972),v=r(74636);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function y(t,e,r,n){var i=o.ensureSingle(t,"rect",v.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function m(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(t,e,r,i){var s,u=e.calcdata,c=t.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(t){return v.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each((function(t,o){var l=n.select(this),c=0===o,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 y=g._fullLayout.xaxis,m=g._fullLayout[p];y.clearCalc(),y.setScale(),m.clearCalc(),m.setScale();var x={id:t,plotgroup:l,xaxis:y,yaxis:m,isRangePlot:!0};c?s=x:(x.mainplot="xy",x.mainplotinfo=s),f.rangePlot(e,x,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(u,t))}))}function b(t,e,r,n,i){o.ensureSingle(t,"rect",v.maskMinClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),o.ensureSingle(t,"rect",v.maskMaxClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,v.maskColor),"match"!==i.rangemode&&(o.ensureSingle(t,"rect",v.maskMinOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(u.fill,v.maskOppAxisColor),o.ensureSingle(t,"rect",v.maskMaxOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",v.maskOppBorder).call(u.fill,v.maskOppAxisColor))}function _(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,"rect",v.slideBoxClassName,(function(t){t.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:v.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,"g",v.grabberMinClassName),a=o.ensureSingle(t,"g",v.grabberMaxClassName),s={x:0,width:v.handleWidth,rx:v.handleRadius,fill:u.background,stroke:u.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,"rect",v.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,"rect",v.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var c={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:e._context.staticPlot?void 0:v.grabAreaCursor};o.ensureSingle(i,"rect",v.grabAreaMinClassName,(function(t){t.attr(c)})).attr("height",n._height),o.ensureSingle(a,"rect",v.grabAreaMaxClassName,(function(t){t.attr(c)})).attr("height",n._height)}t.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,a=0;a<r.length;a++){var l=r[a][v.name];l._clipId=l._id+"-"+e._uid}var u=e._infolayer.selectAll("g."+v.containerClassName).data(r,(function(t){return t._name}));u.exit().each((function(t){var r=t[v.name];e._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(u.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),u.each((function(r){var a=n.select(this),l=r[v.name],u=e[h.id2name(r.anchor)],f=l[h.id2name(r.anchor)];if(l.range){var A,M=o.simpleMap(l.range,r.r2l),T=o.simpleMap(r.range,r.r2l);A=T[0]<T[1]?[Math.min(M[0],T[0]),Math.max(M[1],T[1])]:[Math.max(M[0],T[0]),Math.min(M[1],T[1])],l.range=l._input.range=o.simpleMap(A,r.l2r)}r.cleanRange("rangeslider.range");var k=e._size,S=r.domain;l._width=k.w*(S[1]-S[0]);var E=Math.round(k.l+k.w*S[0]),O=Math.round(k.t+k.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+l._offsetShift+v.extraPad);a.attr("transform",s(E,O)),l._rl=o.simpleMap(l.range,r.r2l);var C=l._rl[0],L=l._rl[1],R=L-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 D=r.locateBreaks(C,L);if(D.length){var I,P,F=0;for(I=0;I<D.length;I++)F+=(P=D[I]).max-P.min;var N=l._width/(L-C-F),B=[-N*C];for(I=0;I<D.length;I++)P=D[I],B.push(B[B.length-1]-N*(P.max-P.min));for(l.d2p=function(t){for(var e=B[0],r=0;r<D.length;r++){var n=D[r];if(t>=n.max)e=B[r+1];else if(t<n.min)break}return e+N*t},I=0;I<D.length;I++)(P=D[I]).pmin=l.d2p(P.min),P.pmax=l.d2p(P.max);l.p2d=function(t){for(var e=B[0],r=0;r<D.length;r++){var n=D[r];if(t>=n.pmax)e=B[r+1];else if(t<n.pmin)break}return(t-e)/N}}}if("match"!==f.rangemode){var z=u.r2l(f.range[0]),j=u.r2l(f.range[1])-z;l.d2pOppAxis=function(t){return(t-z)/j*l._height}}a.call(y,t,r,l).call(m,t,r,l).call(x,t,r,l).call(b,t,r,l,f).call(_,t,r,l).call(w,t,r,l),function(t,e,r,a){if(!e._context.staticPlot){var s=t.select("rect."+v.slideBoxClassName).node(),l=t.select("rect."+v.grabAreaMinClassName).node(),u=t.select("rect."+v.grabAreaMaxClassName).node();t.on("mousedown",c),t.on("touchstart",c)}function c(){var c=n.event,f=c.target,h=g(c),v=h-t.node().getBoundingClientRect().left,y=a.d2p(r._rl[0]),m=a.d2p(r._rl[1]),x=d.coverSlip();function b(t){var c,d,b,_=+g(t)-h;switch(f){case s:if(b="ew-resize",y+_>r._length||m+_<0)return;c=y+_,d=m+_;break;case l:if(b="col-resize",y+_>r._length)return;c=y+_,d=m;break;case u:if(b="col-resize",m+_<0)return;c=y,d=m+_;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 y=.5,m=Math.round(f(h-l))-y,x=Math.round(f(d-l))+y;t.select("g."+v.grabberMinClassName).attr("transform",s(m,y)),t.select("g."+v.grabberMaxClassName).attr("transform",s(x,y))}(a,0,r,l,u,f),"bottom"===r.side&&c.draw(t,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:O+l._height+l._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},97944:function(t,e,r){"use strict";var n=r(79811),i=r(72736),a=r(74636),o=r(84284).LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var u=o[s];u._id=s+o._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=i},e.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),u=0,c=0;return"bottom"===e.side&&(u=e._depth,e.title.text!==r._dfltTitle[l]&&(c=1.5*e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2*n._offsetShift}}},49692:function(t,e,r){"use strict";var n=r(3400),i=r(11200),a=r(10936),o=r(97944);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(11200),handleDefaults:r(94040),calcAutorange:r(26652),draw:r(20060),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},10936:function(t){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},93956:function(t,e,r){"use strict";var n=r(13916),i=r(52904).line,a=r(98192).u,o=r(92880).extendFlat,s=r(67824).overrideAll,l=r(31780).templatedArray;r(36208),t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:"dot"})}}),"arraydraw","from-root")},83280:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},74224:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(93956),s=r(65152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var l=a("path"),u="path"!==a("type",l?"path":"rect");u&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var c=["x","y"],f=0;f<2;f++){var h,d,p,v=c[f],g={_fullLayout:r},y=i.coerceRef(t,e,g,v);if((h=i.getFromId(g,y))._selectionIndices.push(e._index),p=s.rangeToShapePosition(h),d=s.shapePositionToRange(h),u){var m=v+"0",x=v+"1",b=t[m],_=t[x];t[m]=d(t[m],!0),t[x]=d(t[x],!0),i.coercePosition(e,g,a,y,m),i.coercePosition(e,g,a,y,x);var w=e[m],A=e[x];void 0!==w&&void 0!==A&&(e[m]=p(w),e[x]=p(A),t[m]=b,t[x]=_)}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){a(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n<r.length;n++){var i=r[n];i&&void 0===i.path&&(void 0!==i.x0&&void 0!==i.x1&&void 0!==i.y0&&void 0!==i.y1||(e.selections[n]=null))}}},23640:function(t,e,r){"use strict";var n=r(9856).readPaths,i=r(55496),a=r(1936).clearOutlineControllers,o=r(76308),s=r(43616),l=r(31780).arrayEditor,u=r(65152),c=u.getPathString;function f(t){var e=t._fullLayout;for(var r in a(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)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},y=a.opacity,m="rgba(0,0,0,0)",x=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),b=a.line.width,_=a.line.dash;b||(b=5,_="solid");var w=h(t)&&t._fullLayout._activeSelectionIndex===e;w&&(m=t._fullLayout.activeselection.fillcolor,y=t._fullLayout.activeselection.opacity);for(var A=[],M=1;M>=0;M--){var T=r.append("path").attr(g).style("opacity",M?.1:y).call(o.stroke,x).call(o.fill,m).call(s.dashLine,M?"solid":_,M?4+b:b);if(p(T,t,a),w){var k=l(t.layout,"selections",a);T.style({cursor:"move"});var S={element:T.node(),plotinfo:d,gd:t,editHelpers:k,isActiveSelection:!0},E=n(u,t);i(E,T,S)}else T.style("pointer-events",M?"all":"none");A[M]=T}var O=A[0];A[1].node().addEventListener("click",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void v(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=v,f(t)}}}(t,O)}))}(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)}}}},34200:function(t,e,r){"use strict";var n=r(98192).u,i=r(92880).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(t,e,r){"use strict";var n=r(72760).selectMode,i=r(1936).clearOutline,a=r(9856),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),u=e.gd,c=u._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,d=f.yaxis,p=e.isActiveSelection,v=e.dragmode,g=(u.layout||{}).selections||[];if(!n(v)&&void 0!==p){var y=u._fullLayout._activeSelectionIndex;if(y<g.length)switch(u._fullLayout.selections[y].type){case"rect":v="select";break;case"path":v="lasso"}}var m,x=o(a,u,f,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&&(m=x[0]),m&&5===m.length&&"select"===v?(b.type="rect",b.x0=m[0][1],b.y0=m[0][2],b.x1=m[2][1],b.y1=m[2][2]):(b.type="path",h&&d&&l(x,h,d),b.path=s(x),m=null),i(u);for(var _=e.editHelpers,w=(_||{}).modifyItem,A=[],M=0;M<g.length;M++){var T=u._fullLayout.selections[M];if(T){if(A[M]=T._input,void 0!==p&&M===u._fullLayout._activeSelectionIndex){var k=b;switch(T.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 A[M]=T}return void 0===p?(A.push(b),A):_?_.getUpdateObj():{}}}}},5840:function(t,e,r){"use strict";var n=r(3400).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},22676:function(t,e,r){"use strict";var n=r(23640),i=r(43156);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(93956),supplyLayoutDefaults:r(74224),supplyDrawNewSelectionDefaults:r(81004),includeBasePlot:r(36632)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},43156:function(t,e,r){"use strict";var n=r(14756),i=r(61456),a=r(24040),o=r(43616).dashStyle,s=r(76308),l=r(93024),u=r(10624).makeEventData,c=r(72760),f=c.freeMode,h=c.rectMode,d=c.drawMode,p=c.openMode,v=c.selectMode,g=r(65152),y=r(85448),m=r(55496),x=r(1936).clearOutline,b=r(9856),_=b.handleEllipse,w=b.readPaths,A=r(93940).newShapes,M=r(5968),T=r(23640).activateLastSelection,k=r(3400),S=k.sorterAsc,E=r(92065),O=r(91200),C=r(79811).getFromId,L=r(73696),R=r(39172).redrawReglTraces,D=r(83280),I=D.MINSELECT,P=E.filter,F=E.tester,N=r(5840),B=N.p2r,z=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,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){W(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(y,s=Z(e,r,n,i));if(_.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,_):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=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=Y(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 A=a.mergedPolygons,M=p(a.dragmode);m(et(A,M),o,a)}x&&ft(e,v)}}}function V(t){return"pointNumber"in t&&"searchInfo"in t}function G(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 Y(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(G(t[o]));else{var s=F(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=A(f,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(t)&&(c=M(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){e&&T(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&&(L(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,y=d(g),m=v(g);if(y||m){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 A=_[0][0].getAttribute("d"),M=w(A,t,a),T=[],k=0;k<M.length;k++){for(var S=M[k],E=[],O=0;O<S.length;O++)E.push([lt(x,S[O][1]),lt(b,S[O][2])]);E.xref=o,E.yref=s,E.subtract=st(E,T),T.push(E)}f=f.concat(T)}}}}var L=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={},D=0;D<L.length;D++){var I=L[D],P=I.indexOf("y"),F=I.slice(0,P),N=I.slice(P),B=o&&s?r:void 0;if(B=at(f,F,N,B)){var z=n;if(!l){var j=C(t,F,"x"),U=C(t,N,"y");z=Z(t,[j],[U],I);for(var H=0;H<z.length;H++){var V=z[H],G=V.cd[0],Y=G.trace;if("scattergl"===V._module.name&&!G.t.xpx){var W=Y.x,q=Y.y,X=Y._length;G.t.xpx=[],G.t.ypx=[];for(var J=0;J<X;J++)G.t.xpx[J]=j.c2p(W[J]),G.t.ypx[J]=U.c2p(q[J])}"splom"===V._module.name&&(R[Y.uid]||(R[Y.uid]=!0))}}var K=rt(B,z);u=u.concat(K),c=c.concat(z)}}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=Y(i=$(i,o,!!o.subtract)):(i=[o],n=F(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"),m=C(t,p,"y");if("rect"===s.type){h=[];var x=lt(v,s.x0),b=lt(v,s.x1),_=lt(m,s.y0),w=lt(m,s.y1);h=[[x,_],[x,w],[b,w],[b,_]],l=Math.min(x,b),u=Math.max(x,b),c=Math.min(_,w),f=Math.max(_,w),h.xmin=l,h.xmax=u,h.ymin=c,h.ymax=f,h.xref=d,h.yref=p,h.subtract=!1,h.isRect=!0,r.push(h)}else if("path"===s.type)for(var A=s.path.split("Z"),M=[],T=0;T<A.length;T++){var k=A[T];if(k){k+="Z";var S=g.extractPathCoords(k,y.paramIsX,"raw"),E=g.extractPathCoords(k,y.paramIsY,"raw");l=1/0,u=-1/0,c=1/0,f=-1/0,h=[];for(var O=0;O<S.length;O++){var L=lt(v,S[O]),R=lt(m,E[O]);h.push([L,R]),l=Math.min(L,l),u=Math.max(L,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,M),M.push(h),r.push(h)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return"date"===t.type&&(e=e.replace("_"," ")),"log"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ut(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ct(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+"min"],c=r[l+"max"];void 0!==u&&void 0!==c&&(n[s]=[B(o,u),B(o,c)].sort(S))}else i||(i={}),i[s]=r.map(z(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ft(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function ht(t){t.emit("plotly_deselect",null)}t.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var u=!U(n),c=f(i),g=h(i),y=p(i),x=d(i),b=v(i),w="drawcircle"===i,A="drawline"===i||w,M=n.gd,T=M._fullLayout,S=b&&"immediate"===T.newselection.mode&&u,E=T._zoomlayer,C=n.element.getBoundingClientRect(),L=n.plotinfo,R=j(L),N=e-C.left,B=r-C.top;T._calcInverseTransform(M);var z=k.apply3DTransform(T._invTransform)(N,B);N=z[0],B=z[1];var V,G,X,J,K,tt,at,ot=T._invScaleX,st=T._invScaleY,lt=N,dt=B,pt="M"+N+","+B,vt=n.xaxes[0],gt=n.yaxes[0],yt=vt._length,mt=gt._length,xt=t.altKey&&!(d(i)&&y);W(t,M,n),c&&(V=P([[N,B]],D.BENDPX));var bt=E.selectAll("path.select-outline-"+L.id).data([1]),_t=x?T.newshape:T.newselection;x&&(n.hasText=_t.label.text||_t.label.texttemplate);var wt=x&&!y?_t.fillcolor:"rgba(0,0,0,0)",At=_t.line.color||(u?s.contrast(M._fullLayout.plot_bgcolor):"#7f7f7f");bt.enter().append("path").attr("class","select-outline select-outline-"+L.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,At).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",R).attr("d",pt+"Z");var Mt=E.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 Tt=E.select(".label-temp");Tt.empty()&&(Tt=E.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var kt=T._uid+D.SELECTID,St=[],Et=Z(M,n.xaxes,n.yaxes,n.subplot);S&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(u){var t=vt._id,e=gt._id;it(M,t,e,Et);for(var r=(M.layout||{}).selections||[],n=[],i=!1,o=0;o<r.length;o++){var s=T.selections[o];s.xref!==t||s.yref!==e?n.push(r[o]):i=!0}i&&(M._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",M,{selections:n}))}});var Ot=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(yt,ot*t+N)),dt=Math.max(0,Math.min(mt,st*e+B));var r=Math.abs(lt-N),i=Math.abs(dt-B);if(g){var a,o,s;if(b){var l=T.selectdirection;switch(a="any"===l?i<Math.min(.6*r,I)?"h":r<Math.min(.6*i,I)?"v":"d":l){case"h":o=w?mt/2:0,s=mt;break;case"v":o=w?yt/2:0,s=yt}}if(x)switch(T.newshape.drawdirection){case"vertical":a="h",o=w?mt/2:0,s=mt;break;case"horizontal":a="v",o=w?yt/2:0,s=yt;break;case"ortho":r<i?(a="h",o=B,s=dt):(a="v",o=N,s=lt);break;default:a="d"}"h"===a?((J=A?_(w,[lt,o],[lt,s]):[[N,o],[N,s],[lt,s],[lt,o]]).xmin=A?lt:Math.min(N,lt),J.xmax=A?lt:Math.max(N,lt),J.ymin=Math.min(o,s),J.ymax=Math.max(o,s),Mt.attr("d","M"+J.xmin+","+(B-I)+"h-4v"+2*I+"h4ZM"+(J.xmax-1)+","+(B-I)+"h4v"+2*I+"h-4Z")):"v"===a?((J=A?_(w,[o,dt],[s,dt]):[[o,B],[o,dt],[s,dt],[s,B]]).xmin=Math.min(o,s),J.xmax=Math.max(o,s),J.ymin=A?dt:Math.min(B,dt),J.ymax=A?dt:Math.max(B,dt),Mt.attr("d","M"+(N-I)+","+J.ymin+"v-4h"+2*I+"v4ZM"+(N-I)+","+(J.ymax-1)+"v4h"+2*I+"v-4Z")):"d"===a&&((J=A?_(w,[N,B],[lt,dt]):[[N,B],[N,dt],[lt,dt],[lt,B]]).xmin=Math.min(N,lt),J.xmax=Math.max(N,lt),J.ymin=Math.min(B,dt),J.ymax=Math.max(B,dt),Mt.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,G=Y(n.selectionDefs.concat([J]))):(X=[J],G=F(J)),m(et(X,y),bt,n),b){var u,f=nt(M,!1),h=f.eventData?f.eventData.points.slice():[];f=nt(M,!1,G,Et,n),G=f.selectionTesters,at=f.eventData,u=V?V.filtered:ut(X),O.throttle(kt,D.SELECTDELAY,(function(){for(var t=(St=rt(G,Et)).slice(),e=0;e<h.length;e++){for(var r=h[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Ot(at,u),function(t,e){t.emit("plotly_selecting",e)}(M,at)}))}},n.clickFn=function(t,e){if(Mt.remove(),M._fullLayout._activeShapeIndex>=0)M._fullLayout._deactivateShape(M);else if(!x){var r=T.clickmode;O.done(kt).then((function(){if(O.clear(kt),2===t){for(bt.remove(),K=0;K<Et.length;K++)(tt=Et[K])._module.selectPoints(tt,!1);if(Q(M,Et),q(n),ht(M),Et.length){var i=Et[0].xaxis,o=Et[0].yaxis;if(i&&o){for(var s=[],u=M._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&&(M._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",M,{selections:s}))}}}else r.indexOf("select")>-1&&H(e,M,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(M,void 0);l.click(M,e,L.id)})).catch(k.error)}},n.doneFn=function(){Mt.remove(),O.done(kt).then((function(){O.clear(kt),!S&&J&&n.selectionDefs&&(J.subtract=xt,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,X)),(S||x)&&q(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),b&&ft(M,at)})).catch(k.error)}},clearOutline:x,clearSelectionsCache:q,selectOnClick:H}},46056:function(t,e,r){"use strict";var n=r(13916),i=r(25376),a=r(52904).line,o=r(98192).u,s=r(92880).extendFlat,l=r(31780).templatedArray,u=(r(36208),r(45464)),c=r(21776).ye,f=r(97728);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},u.legend,{editType:"calc+arraydraw"}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:s({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},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"})},96084:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(85448),o=r(65152);function s(t){return u(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return u(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function u(t,e,r,i,s,l){var u=t/2,c=l;if("pixel"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),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 y="pixel"===h.ysizemode?h.yanchor:h.y0,m="pixel"===h.ysizemode?h.yanchor:h.y1;(f=c(u=i.getFromId(t,h.yref),y,m,h.path,a.paramIsY))&&(h._extremes[u._id]=i.findExtremes(u,f,l(h)))}}}},85448:function(t){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(51272),o=r(46056),s=r(65152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(e._isShape=!0,a("visible")){a("showlegend")&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),n.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),u=a("type",l?"path":"rect"),c="path"!==u;c&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),h=a("ysizemode"),d=["x","y"],p=0;p<2;p++){var v,g,y,m=d[p],x=m+"anchor",b="x"===m?f:h,_={_fullLayout:r},w=i.coerceRef(t,e,_,m,void 0,"paper");if("range"===i.getRefType(w)?((v=i.getFromId(_,w))._shapeIndices.push(e._index),y=s.rangeToShapePosition(v),g=s.shapePositionToRange(v)):g=y=n.identity,c){var A=m+"0",M=m+"1",T=t[A],k=t[M];t[A]=g(t[A],!0),t[M]=g(t[M],!0),"pixel"===b?(a(A,0),a(M,10)):(i.coercePosition(e,_,a,w,A,.25),i.coercePosition(e,_,a,w,M,.75)),e[A]=y(e[A]),e[M]=y(e[M]),t[A]=T,t[M]=k}if("pixel"===b){var S=t[x];t[x]=g(t[x],!0),i.coercePosition(e,_,a,w,x,.25),e[x]=y(e[x]),t[x]=S}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var E,O,C="line"===u;if(c&&(E=a("label.texttemplate")),E||(O=a("label.text")),O||E){a("label.textangle");var L=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,L)),a("label.padding"),n.coerceFont(a,"label.font",r.font)}}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},60728:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(72736),o=r(43616),s=r(9856).readPaths,l=r(65152),u=l.getPathString,c=r(97728),f=r(84284).FROM_TL;t.exports=function(t,e,r,h){if(h.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var 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 y in c){var m=c[y](r,v,g);void 0!==m&&(p[y]=m)}}d=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,p)}else d=r.label.text;var x,b,_,w,A={"data-index":e},M=r.label.font,T=h.append("g").attr(A).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),S=s(k,t);x=1/0,_=1/0,b=-1/0,w=-1/0;for(var E=0;E<S.length;E++)for(var O=0;O<S[E].length;O++)for(var C=S[E][O],L=1;L<C.length;L+=2){var R=C[L],D=C[L+1];x=Math.min(x,R),b=Math.max(b,R),_=Math.min(_,D),w=Math.max(w,D)}}else{var I=i.getFromId(t,r.xref),P=i.getRefType(r.xref),F=i.getFromId(t,r.yref),N=i.getRefType(r.yref),B=l.getDataToPixel(t,I,!1,P),z=l.getDataToPixel(t,F,!0,N);x=B(r.x0),b=B(r.x1),_=z(r.y0),w=z(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),T.call((function(e){return e.call(o.font,M).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,y=Math.sin(g),m=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===x&&(x="start"===h?"auto"===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*y*w,c=p*m*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 A=f[b],M=i.label.font.size,T=o.height;return{textx:s+(T*A-M)*y,texty:l+-(T*A-M)*m,xanchor:x}}(x,_,b,w,r,j,o.bBox(T.node())),H=U.textx,V=U.texty,G=U.xanchor;T.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[G],y:V,x:H,transform:"rotate("+j+","+H+","+V+")"}).call(a.positionText,H,V)}}},55496:function(t,e,r){"use strict";var n=r(3400).strTranslate,i=r(86476),a=r(72760),o=a.drawMode,s=a.selectMode,l=r(24040),u=r(76308),c=r(7e3),f=c.i000,h=c.i090,d=c.i180,p=c.i270,v=r(1936).clearOutlineControllers,g=r(9856),y=g.pointsOnRectangle,m=g.pointsOnEllipse,x=g.writePaths,b=r(93940).newShapes,_=r(93940).createShapeObj,w=r(5968),A=r(60728);function M(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,c){c||(c=0);var g=a.gd;function T(){t(e,r,a,c++),(m(e[0])||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 S,E,O,C,L,R=g._fullLayout._zoomlayer,D=a.dragmode,I=o(D),P=s(D);if((I||P)&&(g._fullLayout._outlining=!0),v(g),r.attr("d",x(e)),c||!a.isActiveShape&&!a.isActiveSelection||(L=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){S=[];for(var r=0;r<e.length;r++){var o=e[r],s=y(o),l=!s&&m(o);S[r]=[];for(var c=o.length,v=0;v<c;v++)if("Z"!==o[v][0]&&(!l||v===f||v===h||v===d||v===p)){var x,b=s&&a.isActiveSelection;b&&(x=M(o,v));var _=o[v][1],w=o[v][2],A=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 T=x[1]-_,k=x[2]-w,E=k?5:Math.max(Math.min(25,Math.abs(T)-5),5),O=T?5:Math.max(Math.min(25,Math.abs(k)-5),5);A.classed(k?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",E).attr("height",O).attr("x",_-E/2).attr("y",w-O/2).attr("transform",n(T/2,k/2))}else A.classed("cursor-grab",!0).attr("r",5).attr("cx",_).attr("cy",w);S[r][v]={element:A.node(),gd:g,prepFn:B,doneFn:j,clickFn:U},i.init(S[r][v])}}}(R.append("g").attr("class","outline-controllers")),function(){if(E=[],e.length){E[0]={element:r[0][0],gd:g,prepFn:V,doneFn:G,clickFn:Y},i.init(E[0])}}()),I&&a.hasText){var F=R.select(".label-temp"),N=_(r,a,a.dragmode);A(g,"label-temp",N,F)}function B(t){O=+t.srcElement.getAttribute("data-i"),C=+t.srcElement.getAttribute("data-j"),S[O][C].moveFn=z}function z(t,r){if(e.length){var n=L[O][C][1],i=L[O][C][2],o=e[O],s=o.length;if(y(o)){var l=t,u=r;a.isActiveSelection&&(M(o,C)[1]===o[C][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==C){var f=o[c];f[1]===o[C][1]&&(f[1]=n+l),f[2]===o[C][2]&&(f[2]=i+u)}if(o[C][1]=n+l,o[C][2]=i+u,!y(o))for(var h=0;h<s;h++)for(var d=0;d<o[h].length;d++)o[h][d]=L[O][h][d]}else o[C][1]=n+t,o[C][2]=i+r;T()}}function j(){k()}function U(t,r){if(2===t){O=+r.srcElement.getAttribute("data-i"),C=+r.srcElement.getAttribute("data-j");var n=e[O];y(n)||m(n)||function(){if(e.length&&e[O]&&e[O].length){for(var t=[],r=0;r<e[O].length;r++)r!==C&&t.push(e[O][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===C&&(t[0][0]="M"),e[O]=t,T(),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]=L[n][i][a+1]+t,e[n][i][a+2]=L[n][i][a+2]+r}(t,r),T()}function V(t){(O=+t.srcElement.getAttribute("data-i"))||(O=0),E[O].moveFn=H}function G(){k()}function Y(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){v(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call("_guiRelayout",t,{selections:n})}}}(g)}}},4016:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(54460),s=r(9856).readPaths,l=r(55496),u=r(60728),c=r(1936).clearOutlineControllers,f=r(76308),h=r(43616),d=r(31780).arrayEditor,p=r(86476),v=r(93972),g=r(85448),y=r(65152),m=y.getPathString;function x(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)!0===e.shapes[i].visible&&w(t,i)}function b(t){return!!t._fullLayout._outlining}function _(t){return!t._context.edits.shapePosition}function w(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=y.makeShapesOptionsAndPlotinfo(t,e),c=r.options,w=r.plotinfo;function k(r){var k=m(t,c),S={"data-index":e,"fill-rule":c.fillrule,d:k},E=c.opacity,O=c.fillcolor,C=c.line.width?c.line.color:"rgba(0,0,0,0)",L=c.line.width,R=c.line.dash;L||!0!==c.editable||(L=5,R="solid");var D="Z"!==k[k.length-1],I=_(t)&&c.editable&&t._fullLayout._activeShapeIndex===e;I&&(O=D?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,E=t._fullLayout.activeshape.opacity);var P,F=r.append("g").classed("shape-group",!0).attr({"data-index":e}),N=F.append("path").attr(S).style("opacity",E).call(f.stroke,C).call(f.fill,O).call(h.dashLine,R,L);if(A(F,t,c),u(t,e,c,F),(I||t._context.edits.shapePosition)&&(P=d(t.layout,"shapes",c)),I){N.style({cursor:"move"});var B={element:N.node(),plotinfo:w,gd:t,editHelpers:P,hasText:c.label.text||c.label.texttemplate,isActiveShape:!0},z=s(k,t);l(z,N,B)}else t._context.edits.shapePosition?function(t,e,r,s,l,c){var f,d,x,_,w,T,k,S,E,O,C,L,R,D,I,P,F=10,N=10,B="pixel"===r.xsizemode,z="pixel"===r.ysizemode,j="line"===r.type,U="path"===r.type,H=c.modifyItem,V=n.select(e.node().parentNode),G=o.getFromId(t,r.xref),Y=o.getRefType(r.xref),W=o.getFromId(t,r.yref),q=o.getRefType(r.yref),X=y.getDataToPixel(t,G,!1,Y),Z=y.getDataToPixel(t,W,!0,q),J=y.getPixelToData(t,G,!1,Y),K=y.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:B?X(r.xanchor)+r.x0:X(r.x0),cy:z?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:B?X(r.xanchor)+r.x1:X(r.x1),cy:z?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)||(B&&(w=X(r.xanchor)),z&&(T=Z(r.yanchor)),"path"===r.type?I=r.path:(f=B?r.x0:X(r.x0),d=z?r.y0:Z(r.y0),x=B?r.x1:X(r.x1),_=z?r.y1:Z(r.y1)),f<x?(E=f,R="x0",O=x,D="x1"):(E=x,R="x1",O=f,D="x0"),!z&&d<_||z&&d>_?(k=d,C="y0",S=_,L="y1"):(k=_,C="y1",S=d,L="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"===P?et:rt,$.altKey=n.altKey)},doneFn:function(){b(t)||(v(e),it(l),A(e,t,r),i.call("_guiRelayout",t,c.getUpdateObj()))},clickFn:function(){b(t)||it(l)}};function tt(r){if(b(t))P=null;else if(j)P="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>F&&a>N&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";v(e,l),P=l.split("-")[0]}}function et(n,i){if("path"===r.type){var a=function(t){return t},o=a,c=a;B?H("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(X(t)+n)},G&&"date"===G.type&&(o=y.encodeDate(o))),z?H("yanchor",r.yanchor=K(T+i)):(c=function(t){return K(Z(t)+i)},W&&"date"===W.type&&(c=y.encodeDate(c))),H("path",r.path=M(I,o,c))}else B?H("xanchor",r.xanchor=J(w+n)):(H("x0",r.x0=J(f+n)),H("x1",r.x1=J(x+n))),z?H("yanchor",r.yanchor=K(T+i)):(H("y0",r.y0=K(d+i)),H("y1",r.y1=K(_+i)));e.attr("d",m(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;B?H("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(X(t)+n)},G&&"date"===G.type&&(o=y.encodeDate(o))),z?H("yanchor",r.yanchor=K(T+i)):(c=function(t){return K(Z(t)+i)},W&&"date"===W.type&&(c=y.encodeDate(c))),H("path",r.path=M(I,o,c))}else if(j){if("resize-over-start-point"===P){var h=f+n,p=z?d-i:d+i;H("x0",r.x0=B?h:J(h)),H("y0",r.y0=z?p:K(p))}else if("resize-over-end-point"===P){var v=x+n,g=z?_-i:_+i;H("x1",r.x1=B?v:J(v)),H("y1",r.y1=z?g:K(g))}}else{var b=function(t){return-1!==P.indexOf(t)},A=b("n"),Y=b("s"),q=b("w"),Q=b("e"),$=A?k+i:k,tt=Y?S+i:S,et=q?E+n:E,rt=Q?O+n:O;z&&(A&&($=k-i),Y&&(tt=S-i)),(!z&&tt-$>N||z&&$-tt>N)&&(H(C,r[C]=z?$:K($)),H(L,r[L]=z?tt:K(tt))),rt-et>F&&(H(R,r[R]=B?et:J(et)),H(D,r[D]=B?rt:J(rt)))}e.attr("d",m(t,r)),nt(l,r),u(t,s,r,V)}function nt(t,e){(B||z)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=X(B?e.xanchor:a.midRange(r?[e.x0,e.x1]:y.extractPathCoords(e.path,g.paramIsX))),o=Z(z?e.yanchor:a.midRange(r?[e.y0,e.y1]:y.extractPathCoords(e.path,g.paramIsY)));if(i=y.roundPositionForSharpStrokeRendering(i,1),o=y.roundPositionForSharpStrokeRendering(o,1),B&&z){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(B){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function it(t){t.selectAll(".visual-cue").remove()}p.init($),Q.node().onmousemove=tt}(t,N,c,e,r,P):!0===c.editable&&N.style("pointer-events",D||f.opacity(O)*E<=.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 T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,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 A(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function M(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 T(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(c(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(_(t)){c(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var n=[],a=0;a<r.length;a++)a!==e&&n.push(r[a]);return delete t._fullLayout._activeShapeIndex,i.call("_guiRelayout",t,{shapes:n})}}},drawLabel:u}},92872:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(45464),a=r(25376),o=r(98192).u,s=r(92880).extendFlat,l=r(21776).ye,u=r(97728);t.exports=n({newshape:{visible:s({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},i.legend,{}),legendgroup:s({},i.legendgroup,{}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({})},legendrank:s({},i.legendrank,{}),legendwidth:s({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:s({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),font:a({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(t){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},65144:function(t,e,r){"use strict";var n=r(76308),i=r(3400);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}var o="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var u=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(o,u)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},9856:function(t,e,r){"use strict";var n=r(21984),i=r(7e3),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(5840),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function h(t,e){return Math.abs(t-e)<=1e-6}function 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 y=0;y<f.length;y++){var m,x,b,_,w=[],A=f[y][0],M=A;switch(A){case"M":h[++d]=[],p=+f[y][1],v=+f[y][2],w.push([M,p,v]),g();break;case"Q":case"S":m=+f[y][1],b=+f[y][2],p=+f[y][3],v=+f[y][4],w.push([M,p,v,m,b]);break;case"C":m=+f[y][1],b=+f[y][2],x=+f[y][3],_=+f[y][4],p=+f[y][5],v=+f[y][6],w.push([M,p,v,m,b,x,_]);break;case"T":case"L":p=+f[y][1],v=+f[y][2],w.push([M,p,v]);break;case"H":M="L",p=+f[y][1],w.push([M,p,v]);break;case"V":M="L",v=+f[y][1],w.push([M,p,v]);break;case"A":M="L";var T=+f[y][1],k=+f[y][2];+f[y][4]||(T=-T,k=-k);var S=p-T,E=v;for(o=1;o<=a/2;o++){var O=2*Math.PI*o/a;w.push([M,S+T*Math.cos(O),E+k*Math.sin(O)])}break;case"Z":p===s&&v===c||(p=s,v=c,w.push([M,p,v]))}for(var C=(r||{}).domain,L=e._fullLayout._size,R=r&&"pixel"===r.xsizemode,D=r&&"pixel"===r.ysizemode,I=!1===i,P=0;P<w.length;P++){for(o=0;o+2<7;o+=2){var F=w[P][o+1],N=w[P][o+2];void 0!==F&&void 0!==N&&(p=F,v=N,r&&(r.xaxis&&r.xaxis.p2r?(I&&(F-=r.xaxis._offset),F=R?u(r.xaxis,r.xanchor)+F:l(r.xaxis,F)):(I&&(F-=L.l),C?F=C.x[0]+F/L.w:F/=L.w),r.yaxis&&r.yaxis.p2r?(I&&(N-=r.yaxis._offset),N=D?u(r.yaxis,r.yanchor)-N:l(r.yaxis,N)):(I&&(N-=L.t),N=C?C.y[1]-N/L.h:1-N/L.h)),w[P][o+1]=F,w[P][o+2]=N)}h[d].push(w[P].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}},93940:function(t,e,r){"use strict";var n=r(72760),i=n.drawMode,a=n.openMode,o=r(7e3),s=o.i000,l=o.i090,u=o.i180,c=o.i270,f=o.cos45,h=o.sin45,d=r(5840),p=d.p2r,v=d.r2p,g=r(1936).clearOutline,y=r(9856),m=y.readPaths,x=y.writePaths,b=y.ellipseOver,_=y.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],o=e.gd,d=i.getAttribute("d"),g=o._fullLayout.newshape,y=e.plotinfo,w=e.isActiveShape,A=y.xaxis,M=y.yaxis,T=!!y.domain||!y.xaxis,k=!!y.domain||!y.yaxis,S=a(r),E=m(d,o,y,w),O={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:T?"paper":A._id,yref:k?"paper":M._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(O.fillcolor=g.fillcolor,O.fillrule=g.fillrule),1===E.length&&(n=E[0]),n&&5===n.length&&"drawrect"===r)O.type="rect",O.x0=n[0][1],O.y0=n[0][2],O.x1=n[2][1],O.y1=n[2][2];else if(n&&"drawline"===r)O.type="line",O.x0=n[0][1],O.y0=n[0][2],O.x1=n[1][1],O.y1=n[1][2];else if(n&&"drawcircle"===r){O.type="circle";var C=n[s][1],L=n[l][1],R=n[u][1],D=n[c][1],I=n[s][2],P=n[l][2],F=n[u][2],N=n[c][2],B=y.xaxis&&("date"===y.xaxis.type||"log"===y.xaxis.type),z=y.yaxis&&("date"===y.yaxis.type||"log"===y.yaxis.type);B&&(C=v(y.xaxis,C),L=v(y.xaxis,L),R=v(y.xaxis,R),D=v(y.xaxis,D)),z&&(I=v(y.yaxis,I),P=v(y.yaxis,P),F=v(y.yaxis,F),N=v(y.yaxis,N));var j=(L+D)/2,U=(I+F)/2,H=b({x0:j,y0:U,x1:j+(D-L+R-C)/2*f,y1:U+(N-P+F-I)/2*h});B&&(H.x0=p(y.xaxis,H.x0),H.x1=p(y.xaxis,H.x1)),z&&(H.y0=p(y.yaxis,H.y0),H.y1=p(y.yaxis,H.y1)),O.x0=H.x0,O.y0=H.y0,O.x1=H.x1,O.y1=H.y1}else O.type="path",A&&M&&_(E,A,M),O.path=x(E),n=null;return O}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}}},65152:function(t,e,r){"use strict";var n=r(85448),i=r(3400),a=r(54460);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),y=a.getFromId(t,r.xref),m=a.getFromId(t,r.yref),x=t._fullLayout._size;if(y?"domain"===v?s=function(t){return y._offset+y._length*t}:(o=e.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.l+x.w*t},m?"domain"===g?u=function(t){return m._offset+m._length*(1-t)}:(l=e.shapePositionToRange(m),u=function(t){return m._offset+m.r2p(l(t,!0))}):u=function(t){return x.t+x.h*(1-t)},"path"===p)return y&&"date"===y.type&&(s=e.decodeDate(s)),m&&"date"===m.type&&(u=e.decodeDate(u)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,u=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,c=t.charAt(0),f=n.paramIsX[c],h=n.paramIsY[c],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,A=(h+d)/2,M=Math.abs(w-c),T=Math.abs(A-h),k="A"+M+","+T,S=w+M+","+A;return"M"+S+k+" 0 1,1 "+w+","+(A-T)+k+" 0 0,1 "+S+"Z"}},41592:function(t,e,r){"use strict";var n=r(4016);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(46056),supplyLayoutDefaults:r(43712),supplyDrawNewShapeDefaults:r(65144),includeBasePlot:r(36632)("shapes"),calcAutorange:r(96084),draw:n.draw,drawOne:n.drawOne}},97728:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t,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)}}},89861:function(t,e,r){"use strict";var n=r(25376),i=r(66741),a=r(92880).extendDeepAll,o=r(67824).overrideAll,s=r(85656),l=r(31780).templatedArray,u=r(60876),c=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},60876:function(t){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(89861),o=r(60876).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:u}),l=0,c=0;c<s.length;c++)s[c].visible&&l++;if(l<2?e.visible=!1:o("visible")){e._stepCount=l;var f=e._visibleSteps=n.filterVisible(s);(s[o("active")]||{}).visible||(e.active=f[0]._index),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",e.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if("skip"===t.method||Array.isArray(t.args)?r("visible"):e.visible=!1){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},79664:function(t,e,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=s.strTranslate,u=r(72736),c=r(31780).arrayEditor,f=r(60876),h=r(84284),d=h.LINE_SPACING,p=h.FROM_TL,v=h.FROM_BR;function g(t){return f.autoMarginIdRoot+t._index}function y(t){return t._index}function m(t,e){var r=o.tester.selectAll("g."+f.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(f.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=_(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var c=e._dims={};c.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var h=t._fullLayout._size;c.lx=h.l+h.w*e.x,c.ly=h.t+h.h*(1-e.y),"fraction"===e.lenmode?c.outerLength=Math.round(h.w*e.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var d=(c.inputAreaLength-2*f.stepInset)/(e._stepCount-1),y=a+f.labelPadding;if(c.labelStride=Math.max(1,Math.ceil(y/d)),c.labelHeight=l,c.currentValueMaxWidth=0,c.currentValueHeight=0,c.currentValueTotalHeight=0,c.currentValueMaxLines=1,e.currentvalue.visible){var m=o.tester.append("g");r.each((function(t){var r=x(m,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=u.lineCount(r);c.currentValueMaxWidth=Math.max(c.currentValueMaxWidth,Math.ceil(n.width)),c.currentValueHeight=Math.max(c.currentValueHeight,Math.ceil(n.height)),c.currentValueMaxLines=Math.max(c.currentValueMaxLines,i)})),c.currentValueTotalHeight=c.currentValueHeight+e.currentvalue.offset,m.remove()}c.height=c.currentValueTotalHeight+f.tickOffset+e.ticklen+f.labelOffset+c.labelHeight+e.pad.t+e.pad.b;var b="left";s.isRightAnchor(e)&&(c.lx-=c.outerLength,b="right"),s.isCenterAnchor(e)&&(c.lx-=c.outerLength/2,b="center");var w="top";s.isBottomAnchor(e)&&(c.ly-=c.height,w="bottom"),s.isMiddleAnchor(e)&&(c.ly-=c.height/2,w="middle"),c.outerLength=Math.ceil(c.outerLength),c.height=Math.ceil(c.height),c.lx=Math.round(c.lx),c.ly=Math.round(c.ly);var A={y:e.y,b:c.height*v[w],t:c.height*p[w]};"fraction"===e.lenmode?(A.l=0,A.xl=e.x-e.len*p[b],A.r=0,A.xr=e.x+e.len*v[b]):(A.x=e.x,A.l=c.outerLength*p[b],A.r=c.outerLength*v[b]),i.autoMargin(t,g(e),A)}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(T,e,t,r).style("pointer-events","all")})).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(t,e,r){var n=s.ensureSingle(t,"text",f.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,a=r._gd._fullLayout._meta;return a&&(i=s.templateString(i,a)),n.call(o.font,r.font).text(i).call(u.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",f.labelsClass),i=e._dims,a=r.selectAll("g."+f.labelGroupClass).data(i.labelSteps);a.enter().append("g").classed(f.labelGroupClass,!0),a.exit().remove(),a.each((function(t){var r=n.select(this);r.call(_,t,e),o.setTranslate(r,E(e,t.fraction),f.tickOffset+e.ticklen+e.font.size*d+f.labelOffset+i.currentValueTotalHeight)}))}function A(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&M(t,e,r,o,!0,i)}function M(t,e,r,n,a,o){var s=r.active;r.active=n,c(t.layout,f.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function T(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=O(t,n.mouse(i)[0]);function c(){var t=s(),a=O(t,n.mouse(i)[0]);A(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]})}A(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,E(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?f.tickOffset:f.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+f.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=E(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function O(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(T,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 L(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[f.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(r,t),s=r._infolayer.selectAll("g."+f.containerClassName).data(a.length>0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(f.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(l)})).remove(),0!==a.length){var u=s.selectAll("g."+f.groupClassName).data(a,y);u.enter().append("g").classed(f.groupClassName,!0),u.exit().each(l).remove();for(var c=0;c<a.length;c++){var h=a[c];m(t,h)}u.each((function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,(function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||M(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(L,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(S,r,!1),e.call(x,r)}(t,n.select(this),e)}))}}},97544:function(t,e,r){"use strict";var n=r(60876);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(89861),supplyLayoutDefaults:r(8132),draw:r(79664)}},81668:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,u=r(43616),c=r(76308),f=r(72736),h=r(13448),d=r(84284).OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var v,g=r.propContainer,y=r.propName,m=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,A=r.containerGroup,M=t._fullLayout,T=1,k=!1,S=g.title,E=(S&&S.text?S.text:"").trim(),O=S&&S.font?S.font:{},C=O.family,L=O.size,R=O.color;"title.text"===y?v="titleText":-1!==y.indexOf("axis")?v="axisTitleText":y.indexOf(!0)&&(v="colorbarTitleText");var D=t._context.edits[v];""===E?T=0:E.replace(p," % ")===m.replace(p," % ")&&(T=.2,k=!0,D||(E="")),r._meta?E=s.templateString(E,r._meta):M._meta&&(E=s.templateString(E,M._meta));var I,P=E||D;A||(A=s.ensureSingle(M._infolayer,"g","g-"+e),I=M._hColorbarMoveTitle);var F=A.selectAll("text").data(P?[0]:[]);if(F.enter().append("text"),F.text(E).attr("class",e),F.exit().remove(),!P)return A;function N(t){s.syncOrAsync([B,z],t)}function B(e){var r;return!w&&I&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||I)&&(r+=l(0,(w.offset||0)-(I||0)))):r=null,e.attr("transform",r),e.style({"font-family":C,"font-size":n.round(L,2)+"px",fill:c.rgb(R),opacity:T*c.opacity(R),"font-weight":a.fontWeight}).attr(_).call(f.convertToTspans,t),a.previousPromises(t)}function z(e){var r=n.select(e.node().parentNode);if(b&&b.selection&&b.side&&E){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 y in p[v]){var m=p[v][y];h[y]=Math.max(h[y],m)}var x={left:h.l,top:h.t,right:M.width-h.r,bottom:M.height-h.b},_=b.maxShift||o*(x[b.side]-f[b.side]),w=0;if(_<0)w=_;else{var A=b.offsetLeft||0,T=b.offsetTop||0;f.left-=A,f.right-=A,f.top-=T,f.bottom-=T,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 F.call(N),D&&(E?F.on(".opacity",null):(T=0,k=!0,F.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),F.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("_guiRestyle",t,y,e,x):o.call("_guiRelayout",t,y,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(N)})).on("input",(function(t){this.text(t||" ").call(f.positionText,_.x,_.y)}))),F.classed("js-placeholder",k),A}}},88444:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(92880).extendFlat,o=r(67824).overrideAll,s=r(66741),l=r(31780).templatedArray,u=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:u,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(t){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(88444),o=r(73712).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},14420:function(t,e,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=r(72736),u=r(31780).arrayEditor,c=r(84284).LINE_SPACING,f=r(73712),h=r(37400);function 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?y(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||y(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},d={width:l.headerWidth,height:l.headerHeight};a.call(m,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(S,String(p(r,i)?-1:i._index)),y(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(A,i)})),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),h=c.enter().append("g").classed(u,!0),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,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+f.gapButtonHeader:p=y.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-y.openWidth);var b={x:y.lx+p+o.pad.l,y:y.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(m,o,s,t).call(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(A,o),c.call(_,o)}))})),c.call(_,o),x?(M.w=Math.max(y.openWidth,y.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(y.openHeight,y.headerHeight)),M.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,M):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,e||t.disable()}))}(a))}function m(t,e,r,n){t.call(x,e).call(b,e,r,n)}function x(t,e){s.ensureSingle(t,"rect",f.itemRectClassName,(function(t){t.attr({rx:f.rx,ry:f.ry,"shape-rendering":"crispEdges"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function b(t,e,r,n){var i=s.ensureSingle(t,"text",f.itemTextClassName,(function(t){t.attr({"text-anchor":"start","data-notex":1})})),a=r.label,u=n._fullLayout._meta;u&&(a=s.templateString(a,u)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function _(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select("rect."+f.itemRectClassName).call(a.fill,f.activeColor)}))}function w(t){t.select("rect."+f.itemRectClassName).call(a.fill,f.hoverColor)}function A(t,e){t.select("rect."+f.itemRectClassName).call(a.fill,e.bgcolor)}function M(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll("g."+f.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append("g").classed(f.dropdownButtonClassName,!0);var u=-1!==["up","down"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(m,e,i,t);var h=s.select("."+f.itemTextClassName),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),y=Math.max(v*g,f.minHeight)+f.textOffsetY;y=Math.ceil(y),p=Math.ceil(p),r.widths[a]=p,r.heights[a]=y,r.height1=Math.max(r.height1,y),r.width1=Math.max(r.width1,p),u?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=y+f.gapButton,r.openHeight+=y+f.gapButton):(r.totalWidth+=p+f.gapButton,r.openWidth+=p+f.gapButton,r.totalHeight=Math.max(r.totalHeight,y),r.openHeight=r.totalHeight)})),u?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,"dropdown"===e.type&&(u?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),a.remove();var h=r.totalWidth+e.pad.l+e.pad.r,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,T(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 T(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 S(t,e){t.attr(f.menuIndexAttrName,e||"-1").selectAll("g."+f.dropdownButtonClassName).remove()}t.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[f.name]);function a(e){i.autoMargin(t,T(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 m=r[c];M(t,m)}var x="updatemenus"+e._uid,b=new h(t,u,x);l.enter().size()&&(u.node().parentNode.appendChild(u.node()),u.call(S)),l.exit().each((function(t){u.call(S),a(t)})).remove(),l.each((function(e){var r=n.select(this),a="dropdown"===e.type?u:null;i.manageCommandObserver(t,e,e.buttons,(function(n){v(t,e,e.buttons[n.index],r,a,b,n.index,!0)})),"dropdown"===e.type?(g(t,r,u,b,e),p(u,e)&&y(t,r,u,b,e)):y(t,r,null,null,e)}))}}},76908:function(t,e,r){"use strict";var n=r(73712);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(88444),supplyLayoutDefaults:r(91384),draw:r(14420)}},37400:function(t,e,r){"use strict";t.exports=s;var n=r(33428),i=r(76308),a=r(43616),o=r(3400);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,u=o.height;this.position=t;var c,f,h,d,p=this.position.l,v=this.position.w,g=this.position.t,y=this.position.h,m=this.position.direction,x="down"===m,b="left"===m,_="up"===m,w=v,A=y;x||b||"right"===m||_||(this.position.direction="down",x=!0),x||_?(f=(c=p)+w,x?(h=g,A=(d=Math.min(h+A,u))-h):A=(d=g+A)-(h=Math.max(d-A,0))):(d=(h=g)+A,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:A};var M=v>w,T=s.barLength+2*s.barPad,k=s.barWidth+2*s.barPad,S=p,E=g+y;E+k>u&&(E=u-k);var O=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),M?(this.hbar=O.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:T,height:k}),this._hbarXMin=S+T/2,this._hbarTranslateMax=w-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>A,L=s.barWidth+2*s.barPad,R=s.barLength+2*s.barPad,D=p+v,I=g;D+L>l&&(D=l-L);var P=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);P.exit().on(".drag",null).remove(),P.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),C?(this.vbar=P.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:I,width:L,height:R}),this._vbarYMin=I+R/2,this._vbarTranslateMax=A-R):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,N=c-.5,B=C?f+L+.5:f+.5,z=h-.5,j=M?d+k+.5:d+.5,U=o._topdefs.selectAll("#"+F).data(M||C?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",F).append("rect"),M||C?(this._clipRect=U.select("rect").attr({x:Math.floor(N),y:Math.floor(z),width:Math.ceil(B)-Math.floor(N),height:Math.ceil(j)-Math.floor(z)}),this.container.call(a.setClipUrl,F,this.gd),this.bg.attr({x:p,y:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),M||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));M&&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)}}},84284:function(t){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(t){"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},26880:function(t){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},13448:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(t){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,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}},64884:function(t,e,r){"use strict";e.version=r(25788).version,r(88324),r(79288);for(var n=r(24040),i=e.register=n.register,a=r(22448),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];"_"!==l.charAt(0)&&(e[l]=a[l]),i({moduleType:"apiMethod",name:l,fn:a[l]})}i(r(65875)),i([r(79180),r(56864),r(22676),r(41592),r(7402),r(76908),r(97544),r(49692),r(41152),r(12704),r(64968),r(8932),r(55080),r(2780),r(93024),r(45460)]),i([r(6580),r(11680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(9224);var u=r(93024),c=r(7316);e.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},e.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},e.Snapshot=r(78904),e.PlotSchema=r(73060)},9224:function(t){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},98308:function(t,e){"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},11864:function(t,e,r){"use strict";var n=r(20435),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,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 y,m=Math.abs(h-c)<=o?0:1;function x(t,e,r){return"A"+[t,t]+" "+[0,m,r]+" "+g(t,e)}return v?y=null===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?(y="M"+g(p,c)+x(p,h,0),u&&(y+="L0,0Z")):y="M"+g(d,c)+"L"+g(p,c)+x(p,h,0)+"L"+g(d,h)+x(d,c,1)+"Z",y}t.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:u,angleDist:function(t,e){return Math.abs(u(t,e))},isFullCircle:l,isAngleInsideSector:c,isPtInsideSector:function(t,e,r,n){return!!c(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},38116:function(t,e,r){"use strict";var n=r(83160).decode,i=r(63620),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(t){return o.isView(t)&&!(t instanceof s)}function u(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=u,e.isArray1D=function(t){return!u(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};var c={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function f(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(u(t)){if(u(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}c.uint8c=c.u1c,c.uint8=c.u1,c.int8=c.i1,c.uint16=c.u2,c.int16=c.i2,c.uint32=c.u4,c.int32=c.i4,c.float32=c.f4,c.float64=c.f8,e.isArrayBuffer=f,e.decodeTypedArraySpec=function(t){var e=[],r=function(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}(t),i=r.dtype,a=c[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var o=a.BYTES_PER_ELEMENT,s=r.bdata;f(s)||(s=n(s));var l=void 0===r.shape?[s.byteLength/o]:(""+r.shape).split(",");l.reverse();var u,h,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 y=+l[2],m=0;m<y;m++)for(e[m]=[],h=0;h<u;h++)e[m][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)}},54037:function(t,e,r){"use strict";var n=r(38248),i=r(39032).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},73696:function(t){"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},75352:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},63064:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(45464),o=r(88304),s=r(76308),l=r(13448).DESELECTDIM,u=r(22296),c=r(53756).counter,f=r(20435).modHalf,h=r(38116).isArrayOrTypedArray,d=r(38116).isTypedArraySpec,p=r(38116).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,y=[],m=Array.isArray(g),x=m&&v&&h(g[0]),b=v&&m&&!x,_=m&&!b?g.length:t.length;if(n=Array.isArray(n)?n:[],v)for(o=0;o<_;o++)for(y[o]=[],l=h(t[o])?t[o]:[],c=b?g.length:m?g[o].length:l.length,s=0;s<c;s++)u=b?g[s]:m?g[o][s]:g,void 0!==(f=a(l[s],u,(n[o]||[])[s]))&&(y[o][s]=f);else for(o=0;o<_;o++)void 0!==(f=a(t[o],m?g[o]:g,n[o]))&&(y[o]=f);r.set(y)}else r.set(n)},validateFunction:function(t,e){if(!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 y=l.get();return f&&y===a&&!v(c,o)&&(g(c=u(f,i).get(),l,a,o),y=l.get()),y},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},67555:function(t,e,r){"use strict";var n,i,a=r(94336).Yn,o=r(38248),s=r(24248),l=r(20435).mod,u=r(39032),c=u.BADNUM,f=u.ONEDAY,h=u.ONEHOUR,d=u.ONEMIN,p=u.ONESEC,v=u.EPOCHJD,g=r(24040),y=r(94336).E9,m=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return _(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=f*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return _(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var a=t.getTimezoneOffset()*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),y=t.charAt(0);!u||"G"!==y&&"g"!==y||(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),A=t.match(w?x:m);if(!A)return c;var M=A[1],T=A[3]||"1",k=Number(A[5]||1),S=Number(A[7]||0),E=Number(A[9]||0),O=Number(A[11]||0);if(u){if(2===M.length)return c;var C;M=Number(M);try{var L=g.getComponentMethod("calendars","getCal")(r);if(w){var R="i"===T.charAt(T.length-1);T=parseInt(T,10),C=L.newDate(M,L.toMonthIndex(M,T,R),k)}else C=L.newDate(M,Number(T),k)}catch(t){return c}return C?(C.toJD()-v)*f+S*h+E*d+O*p:c}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),T-=1;var D=new Date(Date.UTC(2e3,T,k,S,E));return D.setUTCFullYear(M),D.getUTCMonth()!==T||D.getUTCDate()!==k?c:D.getTime()+O*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 A=90*f,M=3*h,T=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,m,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(t,f));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=y("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e<A?Math.floor(E/h):0,s=e<A?Math.floor(E%h/d):0,u=e<M?Math.floor(E%d/p):0,m=e<T?E%p*10+b:0}else x=new Date(w),a=y("%Y-%m-%d")(x),o=e<A?x.getUTCHours():0,s=e<A?x.getUTCMinutes():0,u=e<M?x.getUTCSeconds():0,m=e<T?10*x.getUTCMilliseconds()+b:0;return k(a,o,s,u,m)},e.ms2DateTimeLocal=function(t){if(!(t>=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return 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 S=/%\d?f/g,E=/%h/g,O={1:"1",2:"1",3:"2",4:"2"};function C(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return O[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var L=[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),L[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}}},52200:function(t,e,r){"use strict";var n=r(33428),i=r(24248),a=r(52248),o=r(36524);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+"{"+r+"}",0):o.addRule?o.addRule(e,r,0):i.warn("addStyleRule failed")}function u(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function c(t){for(var e=[];f(t);)e.push(t),t=t.parentNode;return e}function f(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=c(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=u(t);if(e){var n=a.convertCssMatrix(e);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:u,getElementAndAncestors:c,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},95924:function(t,e,r){"use strict";var n=r(61252).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};t.exports=i},92880:function(t,e,r){"use strict";var n=r(63620),i=Array.isArray;function a(t,e,r,o){var s,l,u,c,f,h,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)}},68944:function(t){"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},43880:function(t){"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),a=[],o=0;o<t.length;o++){var s=t[o];i(s)&&a.push(s)}return a}},92348:function(t,e,r){"use strict";var n,i,a,o=r(20435).mod;function s(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,f=n-e,h=a-e,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}},33040:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(72160),o=r(8932),s=r(22548).defaultLine,l=r(38116).isArrayOrTypedArray,u=a(s);function c(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return u;var e=a(t);return e.length?e:u}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,d,p,v,g=l(n),y=l(e),m=o.extractOpts(t),x=[];if(i=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):f,s=g?function(t,e){return void 0===t[e]?u:a(i(t[e]))}:f,d=y?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||y)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]}}))}}},71688:function(t,e,r){"use strict";var n=r(35536);function i(t){return[t]}t.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},35536:function(t){"use strict";t.exports=function(t){return t}},1396:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(t,e,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(57624).E9,o=r(38248),s=r(39032),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=t.exports={};f.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=r(22296),f.keyedContainer=r(37804),f.relativeAttr=r(23193),f.isPlainObject=r(63620),f.toLogRange=r(36896),f.relinkPrivateKeys=r(51528);var d=r(38116);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(20435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(63064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var g=r(67555);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(14952);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.findIndexOfMin,f.sortObjectKeys=r(95376);var m=r(63084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(52248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(11864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(98308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(92348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var A=r(92880);f.extendFlat=A.extendFlat,f.extendDeep=A.extendDeep,f.extendDeepAll=A.extendDeepAll,f.extendDeepNoArrays=A.extendDeepNoArrays;var M=r(24248);f.log=M.log,f.warn=M.warn,f.error=M.error;var T=r(53756);f.counterRegex=T.counter;var k=r(91200);f.throttle=k.throttle,f.throttleDone=k.done,f.clearThrottle=k.clear;var S=r(52200);function E(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}f.getGraphDiv=S.getGraphDiv,f.isPlotDiv=S.isPlotDiv,f.removeElement=S.removeElement,f.addStyleRule=S.addStyleRule,f.addRelatedStyleRule=S.addRelatedStyleRule,f.deleteRelatedStyleRule=S.deleteRelatedStyleRule,f.getFullTransformMatrix=S.getFullTransformMatrix,f.getElementTransformMatrix=S.getElementTransformMatrix,f.getElementAndAncestors=S.getElementAndAncestors,f.equalDomRects=S.equalDomRects,f.clearResponsive=r(75352),f.preserveDrawingBuffer=r(34296),f.makeTraceGroups=r(30988),f._=r(98356),f.notifier=r(41792),f.filterUnique=r(68944),f.filterVisible=r(43880),f.pushUnique=r(52416),f.increment=r(1396),f.cleanNumber=r(54037),f.ensureNumber=function(t){return o(t)?(t=Number(t))>l||t<u?c:t:c},f.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&o(t)&&t>=0&&t%1==0},f.noop=r(16628),f.identity=r(35536),f.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},f.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var i=0;i<e.length;i++){var a=e[i],o=f.nestedProperty(t,a.replace("?",r)),s=f.nestedProperty(t,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}},f.raiseToTop=function(t){t.parentNode.appendChild(t)},f.cancelTransition=function(t){return t.transition().duration(0)},f.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},f.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l="";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;u&&(o=Math.pow(n,u),l=Math.floor(Math.random()*o).toString(n)+l);var c=parseInt(l,n);return e&&e[l]||c!==1/0&&c>=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r<l;r++)u[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},f.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(f.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},f.mergeArrayCastPositive=function(t,e,r){return f.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},f.castOption=function(t,e,r,n){n=n||f.identity;var i=f.nestedProperty(t,r).get();return f.isArrayOrTypedArray(i)?Array.isArray(e)&&f.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},f.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=f.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},f.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=E(o));for(var s=0;s<a.length;s++){var l=a[s];if(f.isIndex(l)||f.isArrayOrTypedArray(l)&&f.isIndex(l[0])&&f.isIndex(l[1])){var u=n?n[l]:l,c=r?r[u]:u;void 0!==(i=c)&&i<t.length&&(t[c].selected=1)}}},f.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=E(r),i=[],a=0;a<e.length;a++){var o=e[a];if(f.isIndex(o)){var s=n[o];f.isIndex(s)&&i.push(s)}}return i}return e},f.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=f.nestedProperty(t,r).get();return!!f.isArrayOrTypedArray(n)&&n}return!!f.isArrayOrTypedArray(r)&&r},f.minExtend=function t(e,r,n){var i={};"object"!=typeof r&&(r={});var a,o,s,l="pieLike"===n?-1:3,u=Object.keys(e);for(a=0;a<u.length;a++)s=e[o=u[a]],"_"!==o.charAt(0)&&"function"!=typeof s&&("module"===o?i[o]=s:Array.isArray(s)?i[o]="colorscale"===o||-1===l?s.slice():s.slice(0,l):f.isTypedArray(s)?i[o]=-1===l?s.subarray():s.subarray(0,l):i[o]=s&&"object"==typeof s?t(e[o],r[o],n):s);for(u=Object.keys(r),a=0;a<u.length;a++)"object"==typeof(s=r[o=u[a]])&&o in i&&"object"==typeof i[o]||(i[o]=s);return i},f.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},f.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var O=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return O.test(window.navigator.userAgent)};var C=/iPad|iPhone|iPod/;f.isIOS=function(){return C.test(window.navigator.userAgent)};var L=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var t=L.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=/^([^\[\.]+)\.(.+)?/,D=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function I(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],I(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(D)){if(i=t[r],I(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(I(n))continue;t[n][a]=f.expandObjectPaths(i)}}else{if(I(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 P=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return P.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var F={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(F,arguments)};var N={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(N,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,z={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(z,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,y,m=null,x=null;if(n.parseMultDiv){var b=function(t){var e=t.match(B);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(p);p=b.key,m=b.op,x=b.number}if(d){if(void 0===(v=e[p]))return""}else for(y=3;y<a.length;y++)if(g=a[y]){if(g.hasOwnProperty(p)){v=g[p];break}if(P.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&&("*"===m&&(v*=x),"/"===m&&(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 A=p+"Label";e.hasOwnProperty(A)&&(v=e[A])}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(),G=null!==V&&V<86;f.getPositionFromD3Event=function(){return G?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},63620:function(t){"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},37804:function(t,e,r){"use strict";var n=r(22296),i=/^\w*$/;t.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var u={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var c={};if(s)for(o=0;o<s.length;o++)c[s[o][r]]=o;var f=i.test(a),h={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=c[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,c[t]=o}else e!==(f?s[o][a]:n(s[o],a).get())&&(i|=2);var 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}},98356:function(t,e,r){"use strict";var n=r(24040);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var u=r.split("-")[0];if(u===r)break;r=u}return e}},24248:function(t,e,r){"use strict";var n=r(20556).dfltConfig,i=r(41792),a=t.exports={};a.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}}},30988:function(t,e,r){"use strict";var n=r(33428);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},52248:function(t,e,r){"use strict";var n=r(36524);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},e.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},e.dot=function(t,r){if(!t.length||!r.length||t.length!==r.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=e.dot(t[i],r);else if(r[0].length){var o=e.transposeRagged(r);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=e.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*r[i];return n},e.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},e.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},e.rotationXYMatrix=function(t,r,n){return e.dot(e.dot(e.translationMatrix(r,n),e.rotationMatrix(t)),e.translationMatrix(-r,-n))},e.apply3DTransform=function(t){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return e.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},e.apply2DTransform=function(t){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return e.dot(t,[n[0],n[1],1]).slice(0,2)}},e.apply2DTransform2=function(t){var r=e.apply2DTransform(t);return function(t){return r(t.slice(0,2)).concat(r(t.slice(2,4)))}},e.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},20435:function(t){"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},22296:function(t,e,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,u=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<u.length;l++)o[l]=a(u[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!i(u))return;if("object"!=typeof(u=u[r])||null===u)return}if("object"==typeof u&&null!==u&&null!==(o=u[e[s]]))return o}}t.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";var r,i,o,s,u=e.split(".");for(s=0;s<u.length;s++)if("__"===String(u[s]).slice(0,2))throw"bad property string";for(s=0;s<u.length;){if(r=String(u[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw"bad property string";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|\.)args\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,h="",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}},16628:function(t){"use strict";t.exports=function(){}},41792:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=[];t.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=t.split(/<br\s*\/?>/g),l=0;l<o.length;l++)l&&a.append("br"),a.append("span").text(o[l]);"stick"===e?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style("opacity",0).each("end",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},72213:function(t,e,r){"use strict";var n=r(93972),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr("class")||"").split(" "),o=0;o<a.length;o++){var s=a[o];0===s.indexOf("cursor-")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,"!!")}n(t,e)}else r&&(t.attr(i,null),"!!"===r?n(t):n(t,r))}},92065:function(t,e,r){"use strict";var n=r(52248).dot,i=r(39032).BADNUM,a=t.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,l=function(t){return t[1]===r[0][1]}));var c=!0,f=r[0];for(e=1;e<r.length;e++)if(f[0]!==r[e][0]||f[1]!==r[e][1]){c=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:u?function(t,e){var r=t[0],u=t[1];return!(r===i||r<n||r>a||u===i||u<o||u>s||e&&l(t))}:function(t,e){var l=t[0],u=t[1];if(l===i||l<n||l>a||u===i||u<o||u>s)return!1;var c,f,h,d,p,v=r.length,g=r[0][0],y=r[0][1],m=0;for(c=1;c<v;c++)if(f=g,h=y,g=r[c][0],y=r[c][1],!(l<(d=Math.min(f,g))||l>Math.max(f,g)||u>Math.max(h,y)))if(u<Math.min(h,y))l!==d&&m++;else{if(u===(p=g===f?u:h+(l-f)*(y-h)/(g-f)))return 1!==c||!e;u<=p&&l!==d&&m++}return m%2==1},isRect:u,degenerate:c}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],u=[t[r][0]-l[0],t[r][1]-l[1]],c=n(u,u),f=Math.sqrt(c),h=[-u[1]/f,u[0]/f];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,u))<0||s>c||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u<t.length;u++)(u===t.length-1||a.isSegmentBent(t,l,u+1,e))&&(r.push(t[u]),r.length<s-2&&(n=u,i=r.length-1),l=u)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},5048:function(t,e,r){"use strict";var n=r(16576),i=r(28624);t.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}},34296:function(t,e,r){"use strict";var n=r(38248),i=r(25928);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o<a.length;o++)if(-1!==a[o].indexOf("Safari"))for(var s=o-1;s>-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},52416:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===r)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},94552:function(t,e,r){"use strict";var n=r(3400),i=r(20556).dfltConfig,a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},plotDo:function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)}};t.exports=a},53756:function(t,e){"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),a=!1===n?"":"^";return"xy"===t?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+t+"([2-9]|[1-9][0-9]+)?"+i)}},23193:function(t){"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},51528:function(t,e,r){"use strict";var n=r(38116).isArrayOrTypedArray,i=r(63620);t.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),u=0;u<l;u++)s[u]!==o[u]&&i(o[u])&&i(s[u])&&t(s[u],o[u])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},14952:function(t,e,r){"use strict";var n=r(38248),i=r(24248),a=r(35536),o=r(39032).BADNUM,s=1e-9;function l(t,e){return t<e}function u(t,e){return t<=e}function c(t,e){return t>e}function f(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,h=0,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}},93972:function(t){"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},16576:function(t,e,r){"use strict";var n=r(76308),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",r.appendChild(a),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},95376:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},63084:function(t,e,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;e.aggNums=function(t,r,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=e.aggNums(t,r,a[s]);a=l}for(s=0;s<o;s++)n(r)?n(a[s])&&(r=t(+r,+a[s])):r=a[s];return r},e.len=function(t){return e.aggNums((function(t){return t+1}),0,t)},e.mean=function(t,r){return r||(r=e.len(t)),e.aggNums((function(t,e){return t+e}),0,t)/r},e.midRange=function(t){if(void 0!==t&&0!==t.length)return(e.aggNums(Math.max,null,t)+e.aggNums(Math.min,null,t))/2},e.variance=function(t,r,i){return r||(r=e.len(t)),n(i)||(i=e.mean(t,r)),e.aggNums((function(t,e){return t+Math.pow(e-i,2)}),0,t)/r},e.stdev=function(t,r,n){return Math.sqrt(e.variance(t,r,n))},e.median=function(t){var r=t.slice().sort();return e.interp(r,.5)},e.interp=function(t,e){if(!n(e))throw"n should be a finite number";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},43080:function(t,e,r){"use strict";var n=r(72160);t.exports=function(t){return t?n(t):[0,0,0,1]}},72736:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(84284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),E=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),L=n.select(t.node().parentNode);if(!L.empty()){var R=t.attr("class")?t.attr("class").split(" ")[0]:"text";return R+="-math",L.selectAll("svg."+R).remove(),L.selectAll("g."+R+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2===h||3===h){var 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)}(E[2],o,(function(n,i,o){L.selectAll("svg."+R).remove(),L.selectAll("g."+R+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=L.append("g").classed(R+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class: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 y=+t.attr("x"),m=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===R[0])l.attr({transform:"rotate("+[-90,y,m]+")"+a(-p/2,x-v/2)});else if("l"===R[0])m=x-v/2;else if("a"===R[0]&&0!==R.indexOf("atitle"))y=0,m=x;else{var b=t.attr("text-anchor");y-=p*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}s.attr({x:y,y:m}),g&&g.call(t,l),e(l)}))}))):D(),t}function D(){L.empty()||(R=t.attr("class")+"-math",L.select("svg."+R).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(y," ");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:u*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)f(i[a])}function f(t){var e,i=t.type,a={};if("a"===i){e="a";var s=t.target,u=t.href,c=t.popup;u&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":u},c&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+c+'");return false;'))}else e="tspan";t.style&&(a.style=t.style);var f=document.createElementNS(o.svg,e);if("sup"===i||"sub"===i){g(r,v),r.appendChild(f);var h=document.createElementNS(o.svg,"tspan");g(h,v),n.select(h).attr("dy",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 S(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log("Start tag <"+n.type+"> doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag </"+t+">.",e)}b.test(e)?c():(r=t,l=[{node:t}]);for(var E=e.split(m),L=0;L<E.length;L++){var R=E[L],D=R.match(x),I=D&&D[2].toLowerCase(),P=h[I];if("br"===I)c();else if(void 0===P)g(r,O(R));else if(D[1])S(I);else{var F=D[4],N={type:I},B=T(F,_);if(B?(B=B.replace(k,"$1 fill:"),P&&(B+=";"+P)):P&&(B=P),B&&(N.style=B),"a"===I){a=!0;var z=T(F,w);if(z){var j=C(z);j&&(N.href=j,N.target=T(F,A)||"_blank",N.popup=T(F,M))}}f(N)}}return a}(t.node(),S);r&&t.style("pointer-events","all"),e.positionText(t),g&&g.call(t)}};var u=/(<|<|<)/g,c=/(>|>|>)/g,f=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="",g=["http:","https:","mailto:","",void 0,":"],y=e.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;e.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,M=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function T(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&O(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(m),a=[],o="",s=0,l=0;l<i.length;l++){var u=i[l],c=u.match(x),f=c&&c[2].toLowerCase();if(f)-1!==n.indexOf(f)&&(a.push(u),o=f);else{var h=u.length;if(s+h<r)a.push(u),s+=h;else if(s<r){var 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 S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function O(t){return t.replace(E,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function C(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function L(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=O,e.sanitizeHTML=function(t){t=t.replace(y," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(m),o=0;o<a.length;o++){var s=a[o],l=s.match(x),u=l&&l[2].toLowerCase();if(u in h)if(l[1])i.length&&(r=i.pop());else{var c=l[4],f=T(c,_),d=f?{style:f}:{};if("a"===u){var p=T(c,w);if(p){var v=C(p);if(v){d.href=v;var g=T(c,A);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(O(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(L(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(L(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")}},91200:function(t,e){"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var a=r[t],o=Date.now();if(!a){for(var s in r)r[s].ts<o-6e4&&delete r[s];a=r[t]={ts:0,timer:null}}function l(){i(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}n(a),o>a.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},36896:function(t,e,r){"use strict";var n=r(38248);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},11680:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(t){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(t,e,r){"use strict";var n=r(24040);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||""}:{array:e,index:"",property:""}}},67824:function(t,e,r){"use strict";var n=r(92880).extendFlat,i=r(63620),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function c(t,e,r){var a=n({},t);for(var o in a){var s=a[o];i(s)&&(a[o]=f(s,e,0,o))}return"from-root"===r&&(a.editType=e),a}function f(t,e,r,i){if(t.valType){var a=n({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=f(t.items[o],e)}return a}return c(t,e,"_"===i.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:o,traceFlags:function(){return u(s)},layoutFlags:function(){return u(l)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:c}},93404:function(t,e,r){"use strict";var n=r(38248),i=r(61784),a=r(24040),o=r(3400),s=r(7316),l=r(79811),u=r(76308),c=l.cleanId,f=l.getFromTrace,h=a.traceIs;function 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 y(t){var e="middle",r="center";return"string"==typeof t&&(-1!==t.indexOf("top")?e="top":-1!==t.indexOf("bottom")&&(e="bottom"),-1!==t.indexOf("left")?r="left":-1!==t.indexOf("right")&&(r="right")),e+" "+r}function m(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}e.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(t);for(r=0;r<v.length;r++){var g=v[r];if(a&&a.test(g)){var y=t[g];y.anchor&&"free"!==y.anchor&&(y.anchor=c(y.anchor)),y.overlaying&&(y.overlaying=c(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":!1===y.isdate&&!1===y.islog&&(y.type="linear")),"withzero"!==y.autorange&&"tozero"!==y.autorange||(y.autorange=!0,y.rangemode="tozero"),y.insiderange&&delete y.range,delete y.islog,delete y.isdate,delete y.categories,m(y,"domain")&&delete y.domain,void 0!==y.autotick&&(void 0===y.tickmode&&(y.tickmode=y.autotick?"auto":"linear"),delete y.autotick),p(y)}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],A=_[1],M=_[2],T=i([],w),k=[];for(n=0;n<3;++n)k[n]=A[n]+M*T[2+4*n];b.camera={eye:{x:k[0],y:k[1],z:k[2]},center:{x:A[0],y:A[1],z:A[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}p(b.xaxis),p(b.yaxis),p(b.zaxis)}}var S=Array.isArray(t.annotations)?t.annotations.length:0;for(r=0;r<S;r++){var E=t.annotations[r];o.isPlainObject(E)&&(E.ref&&("paper"===E.ref?(E.xref="paper",E.yref="paper"):"data"===E.ref&&(E.xref="x",E.yref="y"),delete E.ref),d(E,"xref"),d(E,"yref"))}var O=Array.isArray(t.shapes)?t.shapes.length:0;for(r=0;r<O;r++){var C=t.shapes[r];o.isPlainObject(C)&&(d(C,"xref"),d(C,"yref"))}var L=Array.isArray(t.images)?t.images.length:0;for(r=0;r<L;r++){var R=t.images[r];o.isPlainObject(R)&&(d(R,"xref"),d(R,"yref"))}var D=t.legend;return D&&(D.x>3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.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]=y(i.textposition[n]);else i.textposition&&(i.textposition=y(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 A=!1!==(i.increasing||{}).showlegend,M=!1!==(i.decreasing||{}).showlegend,T=v(i.increasing),k=v(i.decreasing);if(!1!==T&&!1!==k){var S=g(T,k,A,M);S&&(i.name=S)}else!T&&!k||i.name||(i.name=T||k)}if(Array.isArray(i.transforms)){var E=i.transforms;for(n=0;n<E.length;n++){var O=E[n];if(o.isPlainObject(O))switch(O.type){case"filter":O.filtersrc&&(O.target=O.filtersrc,delete O.filtersrc),O.calendar&&(O.valuecalendar||(O.valuecalendar=O.calendar),delete O.calendar);break;case"groupby":if(O.styles=O.styles||O.style,O.styles&&!Array.isArray(O.styles)){var C=O.styles,L=Object.keys(C);O.styles=[];for(var R=0;R<L.length;R++)O.styles.push({target:L[R],value:C[L[R]]})}}}}m(i,"line")&&delete i.line,"marker"in i&&(m(i.marker,"line")&&delete i.marker.line,m(i,"marker")&&delete i.marker),u.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),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)}}}},22448:function(t,e,r){"use strict";var n=r(36424);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(52200).getGraphDiv,a=r(4016).eraseActiveShape;e.deleteActiveShape=function(t){return a(i(t))},e.toImage=r(67024),e.validate=r(21480),e.downloadImage=r(39792);var o=r(94828);e.makeTemplate=o.makeTemplate,e.validateTemplate=o.validateTemplate},17680:function(t,e,r){"use strict";var n=r(63620),i=r(16628),a=r(24248),o=r(14952).sorterAsc,s=r(24040);e.containerArrayMatch=r(69820);var l=e.isAddVal=function(t){return"add"===t||n(t)},u=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,c){var f=e.astr,h=s.getComponentMethod(f,"supplyLayoutDefaults"),d=s.getComponentMethod(f,"draw"),p=s.getComponentMethod(f,"drawOne"),v=n.replot||n.recalc||h===i||d===i,g=t.layout,y=t._fullLayout;if(r[""]){Object.keys(r).length>1&&a.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(u(m))e.set(null);else{if(!Array.isArray(m))return a.warn("Unrecognized full array edit value",f,m),!0;e.set(m)}return!v&&(h(g,y),d(t),!0)}var x,b,_,w,A,M,T,k,S=Object.keys(r).map(Number).sort(o),E=e.get(),O=E||[],C=c(y,f).get(),L=[],R=-1,D=O.length;for(x=0;x<S.length;x++)if(w=r[_=S[x]],A=Object.keys(w),M=w[""],T=l(M),_<0||_>O.length-(T?0:1))a.warn("index out of range",f,_);else if(void 0!==M)A.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(M)?L.push(_):T?("add"===M&&(M={}),O.splice(_,0,M),C&&C.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,M),-1===R&&(R=_);else for(b=0;b<A.length;b++)k=f+"["+_+"].",c(O[_],A[b],k).set(w[A[b]]);for(x=L.length-1;x>=0;x--)O.splice(L[x],1),C&&C.splice(L[x],1);if(O.length?E||e.set(O):e.set(null),v)return!1;if(h(g,y),p!==i){var I;if(-1===R)I=S;else{for(D=Math.max(O.length,D),I=[],x=0;x<S.length&&!((_=S[x])>=R);x++)I.push(_);for(x=R;x<D;x++)I.push(x)}for(x=0;x<I.length;x++)p(t,I[x])}else d(t);return!0}},36424:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(52264),o=r(3400),s=o.nestedProperty,l=r(95924),u=r(94552),c=r(24040),f=r(73060),h=r(7316),d=r(54460),p=r(96312),v=r(94724),g=r(43616),y=r(76308),m=r(42464).initInteractions,x=r(9616),b=r(22676).clearOutline,_=r(20556).dfltConfig,w=r(17680),A=r(93404),M=r(39172),T=r(67824),k=r(33816).AX_NAME_PATTERN,S=0;function E(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function O(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function C(t,e){O(t,y.combine(e,"white"))}function L(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=O),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 D(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 I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function P(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 D(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 F(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),A.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=A.coerceTraceIndices(t,i),l=U(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&A.clearAxisTypes(t,s,{});var f=[];c.fullReplot?f.push(e._doPlot):(f.push(h.previousPromises),h.supplyDefaults(t),c.markerSize&&(h.doCalcdata(t),Y(f)),c.style&&f.push(M.doTraceStyle),c.colorbars&&f.push(M.doColorBars),f.push(E)),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 B(t){return void 0===t?null:t}function z(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){j((n||"")+r,i.get(),e,t),a(e)},i}:s}function j(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)j(t+"["+l+"]",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var u=o.isPlainObject(e)?e:{},c=o.isPlainObject(r)?r:{},f=o.extendFlat({},u,c);for(var h in f)j(t+"."+h,u[h],c[h],n)}else void 0===n[t]&&(n[t]=B(e))}function U(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,p=z(i._preGUI,u),v=o.extendDeepAll({},e);H(e);var g,y=T.traceFlags(),m={},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 M(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 S(n,a,o){if(Array.isArray(n))n.forEach((function(t){S(t,a,o)}));else if(!(n in e)&&!A.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=p(t.layout,n.replace("LAYOUT",""));else{var c=r[o];s=z(i._tracePreGUI[k(c)._fullInput.uid],u)(l[c],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=B(s.get())),void 0!==a&&s.set(a)}}function E(t){return function(e){return a[e][t]}}function O(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var C in e){if(A.hasParent(e,C))throw new Error("cannot set "+C+" and a parent attribute simultaneously");var L,R,D,I,P,F,N=e[C];if("autobinx"!==C&&"autobiny"!==C||(C=C.charAt(C.length-1)+"bins",N=Array.isArray(N)?N.map(O(C)):!1===N?r.map(E(C)):null),m[C]=N,"LAYOUT"!==C.substr(0,6)){for(x[C]=b(),n=0;n<r.length;n++)if(L=l[r[n]],R=k(r[n]),I=(D=z(i._tracePreGUI[R._fullInput.uid],u)(L,C)).get(),void 0!==(P=Array.isArray(N)?N[n%N.length]:N)){var j=D.parts[D.parts.length-1],U=C.substr(0,C.length-j.length-1),V=U?U+".":"",G=U?s(R,U).get():R;if((F=f.getTraceValObject(R,D.parts))&&F.impliedEdits&&null!==P)for(var Y in F.impliedEdits)S(o.relativeAttr(C,Y),F.impliedEdits[Y],n);else if("thicknessmode"!==j&&"lenmode"!==j||I===P||"fraction"!==P&&"pixels"!==P||!G){if("type"===C&&("pie"===P!=("pie"===I)||"funnelarea"===P!=("funnelarea"===I))){var W="x",q="y";"bar"!==P&&"bar"!==I||"h"!==L.orientation||(W="y",q="x"),o.swapAttrs(L,["?","?src"],"labels",W),o.swapAttrs(L,["d?","?0"],"label",W),o.swapAttrs(L,["?","?src"],"values",q),"pie"===I||"funnelarea"===I?(s(L,"marker.color").set(s(L,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):c.traceIs(L,"cartesian")&&s(L,"marker.colors").set(s(L,"marker.color").get())}}else{var X=i._size,Z=G.orient,J="top"===Z||"bottom"===Z;if("thicknessmode"===j){var K=J?X.h:X.w;S(V+"thickness",G.thickness*("fraction"===P?1/K:K),n)}else{var Q=J?X.w:X.h;S(V+"len",G.len*("fraction"===P?1/Q:Q),n)}}if(x[C][n]=B(I),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(C)){if("orientation"===C){D.set(P);var $=L.x&&!L.y?"h":"v";if((D.get()||$)===R.orientation)continue}else"orientationaxes"===C&&(L.orientation={v:"h",h:"v"}[R.orientation]);A.swapXYData(L),y.calc=y.clearAxisTypes=!0}else-1!==h.dataArrayContainers.indexOf(D.parts[0])?(A.manageArrayContainers(D,P,x),y.calc=!0):(F?F.arrayOk&&!c.traceIs(R,"regl")&&(o.isArrayOrTypedArray(P)||o.isArrayOrTypedArray(I))?y.calc=!0:T.update(y,F):y.calc=!0,D.set(P))}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"))}S(g.map(w),!0,0),S(g.map(M),[0,1],0)}}else D=p(t.layout,C.replace("LAYOUT","")),x[C]=[B(D.get())],D.set(Array.isArray(N)?N[0]:N),y.calc=!0}return(y.calc||y.plot)&&(y.fullReplot=!0),{flags:y,undoit:x,redoit:m,traces:r,eventData:o.extendDeepNoArrays([],[v,r])}}function 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),A.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(M.layoutReplot):Object.keys(n).length&&(G(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(M.doLegend),a.layoutstyle&&s.push(M.layoutStyles),a.axrange&&Y(s,i.rangesAltered),a.ticks&&s.push(M.doTicksRelayout),a.modebar&&s.push(M.doModeBar),a.camera&&s.push(M.doCamera),a.colorbars&&s.push(M.doColorBars),s.push(E)),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 G(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 Y(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,M.doAutoRangeAndConstraints,r,M.drawData,M.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=z(l._preGUI,u),p=Object.keys(e),v=d.list(t),g=o.extendDeepAll({},e),y={};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 m=v[i]._id.substr(1),x=-1!==m.indexOf("scene")?m+".":"",b=p[n].replace("allaxes",x+v[i]._name);e[b]||(e[b]=e[p[n]])}delete e[p[n]]}var _=T.layoutFlags(),M={},S={};function E(t,r){if(Array.isArray(t))t.forEach((function(t){E(t,r)}));else if(!(t in e)&&!A.hasParent(e,t)){var n=h(a,t);t in S||(S[t]=B(n.get())),void 0!==r&&n.set(r)}}var O,C={};function L(t){var e=d.name2id(t.split(".")[0]);return C[e]=1,e}for(var R in e){if(A.hasParent(e,R))throw new Error("cannot set "+R+" and a parent attribute simultaneously");for(var D=h(a,R),I=e[R],P=D.parts.length-1;P>0&&"string"!=typeof D.parts[P];)P--;var F=D.parts[P],N=D.parts[P-1]+"."+F,j=D.parts.slice(0,P).join("."),U=s(t.layout,j).get(),V=s(l,j).get(),G=D.get();if(void 0!==I){M[R]=I,S[R]="reverse"===F?I:B(G);var Y=f.getLayoutValObject(l,D.parts);if(Y&&Y.impliedEdits&&null!==I)for(var Z in Y.impliedEdits)E(o.relativeAttr(R,Z),Y.impliedEdits[Z]);if(-1!==["width","height"].indexOf(R))if(I){E("autosize",null);var K="height"===R?"width":"height";E(K,l[K])}else l[R]=t._initialAutoSize[R];else if("autosize"===R)E("width",I?null:l.width),E("height",I?null:l.height);else if(N.match(W))L(N),s(l,j+"._inputRange").set(null);else if(N.match(q)){L(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"===F){O=U;var $="linear"===V.type&&"log"===I,tt="log"===V.type&&"linear"===I;if($||tt){if(O&&O.range)if(V.autorange)$&&(O.range=O.range[1]>O.range[0]?[1,2]:[2,1]);else{var et=O.range[0],rt=O.range[1];$?(et<=0&&rt<=0&&E(j+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(j+".range[0]",Math.log(et)/Math.LN10),E(j+".range[1]",Math.log(rt)/Math.LN10)):(E(j+".range[0]",Math.pow(10,et)),E(j+".range[1]",Math.pow(10,rt)))}else E(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,V,I,E),c.getComponentMethod("images","convertCoords")(t,V,I,E)}else E(j+".autorange",!0),E(j+".range",null);s(l,j+"._inputRange").set(null)}else if(F.match(k)){var nt=s(l,R).get(),it=(I||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,E),c.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=w.containerArrayMatch(R);if(at){r=at.array,n=at.index;var ot=at.property,st=Y||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(I)?S[R]=null:w.isRemoveVal(I)?S[R]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),T.update(_,st),y[r]||(y[r]={});var lt=y[r][n];lt||(lt=y[r][n]={}),lt[ot]=I,delete e[R]}else"reverse"===F?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===R&&(!1===I&&!1!==G||!1!==I&&!1===G)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===R&&("lasso"===I||"select"===I)&&"lasso"!==G&&"select"!==G||l._has("gl2d")?_.plot=!0:Y?T.update(_,Y):_.calc=!0,D.set(I))}}for(r in y)w.applyContainerArrayChanges(t,h(a,r),y[r],_,h)||(_.plot=!0);for(var ut in C){var ct=(O=d.getFromId(t,ut))&&O._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:S,redoit:M,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),A.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=A.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&&A.clearAxisTypes(t,a,n);var d=[];f.layoutReplot?d.push(M.layoutReplot):l.fullReplot?d.push(e._doPlot):(d.push(h.previousPromises),G(t,f,c)||h.supplyDefaults(t),l.style&&d.push(M.doTraceStyle),(l.colorbars||f.colorbars)&&d.push(M.doColorBars),f.legend&&d.push(M.doLegend),f.layoutstyle&&d.push(M.layoutStyles),f.axrange&&Y(d,c.rangesAltered),f.ticks&&d.push(M.doTicksRelayout),f.modebar&&d.push(M.doModeBar),f.camera&&d.push(M.doCamera),d.push(E)),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):(T.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],y=e[a],m=r.concat(a);if(l=m.join("."),"_"!==a.charAt(0)&&"function"!=typeof g&&g!==y){if(("tick0"===a||"dtick"===a)&&"geo"!==r[0]){var x=e.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==a||!e.autorange)&&("zmin"!==a&&"zmax"!==a||"contourcarpet"!==e.type)&&(i=u(m))&&(!i._compareAsJSON||JSON.stringify(g)!==JSON.stringify(y))){var b,_=i.valType,w=v(i),A=Array.isArray(g),M=Array.isArray(y);if(A&&M){var k="_input_"+a,S=t[k],E=e[k];if(Array.isArray(S)&&S===E)continue}if(void 0===y)w&&A?c.calc=!0:p();else if(i._isLinkedToArray){var O=[],C=!1;h||(c.arrays[a]=O);var L=Math.min(g.length,y.length),R=Math.max(g.length,y.length);if(L!==R){if("arraydraw"!==i.editType){p();continue}C=!0}for(b=0;b<L;b++)ot(g[b],y[b],m.concat(b),o.extendFlat({inArray:a,arrayIndex:b},n));if(C)for(b=L;b<R;b++)O.push(b)}else!_&&o.isPlainObject(g)?ot(g,y,m,n):w?A&&M?(f&&(c.calc=!0),(f||n.newDataRevision)&&p()):A!==M?c.calc=!0:p():A&&M&&g.length===y.length&&String(g)===String(y)||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,A.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var 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 y=[],m=null==e,x=Array.isArray(e);if(m||x||!o.isPlainObject(e)){if(m||-1!==["string","number"].indexOf(typeof e))for(d=0;d<n._frames.length;d++)(p=n._frames[d])&&(m||String(p.group)===String(e))&&y.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),y.push({type:"byname",name:b,data:g({name:b})})):o.isPlainObject(b)&&y.push({type:"object",data:g(o.extendFlat({},b))})}}else y.push({type:"object",data:g(o.extendFlat({},e))});for(d=0;d<y.length;d++)if("byname"===(p=y[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&&y.reverse();var _=t._fullLayout._currentFrame;if(_&&r.fromcurrent){var w=-1;for(d=0;d<y.length;d++)if("byname"===(p=y[d]).type&&p.name===_){w=d;break}if(w>0&&w<y.length-1){var M=[];for(d=0;d<y.length;d++)p=y[d],("byname"!==y[d].type||d>w)&&M.push(p);y=M}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o="byname"===e[i].type?h.computeFrame(t,e[i].name):e[i].data;var 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()}}(y):(t.emit("plotly_animated"),a())}))},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var f=l.length+2*e.length,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,y=e[n].name,m=c[g]||p[g];g&&y&&"number"==typeof y&&m&&S<5&&(S++,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===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),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,A=h.modifyFrames,M=[t,b],T=[t,x];return u&&u.add(t,w,M,A,T),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)})),A.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{I(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]),D(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=P(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=F(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(I(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=P(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=F(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),L(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)&&(A.cleanData(r),f?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!f||(t.layout=A.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 y=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;y&&h.doCalcdata(t);for(var b=0;b<t.calcdata.length;b++)t.calcdata[b][0].trace=t._fullData[b];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||h.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var _=o.extendFlat({},p._size),w=0;function T(){if(h.clearAutoMarginIds(t),M.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||(M.doAutoRangeAndConstraints(t),f&&d.saveRangeInitial(t),c.getComponentMethod("rangeslider","calcAutorange")(t))}var S=[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)},T,function(){if(h.didMarginChange(_,p._size))return o.syncOrAsync([T,M.layoutStyles],t)}];v&&S.push((function(){if(y)return o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),k],t);k()})),S.push(M.layoutStyles),v&&S.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)}))})),S.push(M.drawData,M.finalDraw,m,h.addLinks,h.rehover,h.redrag,h.reselect,h.doAutoMargin,h.previousPromises);var O=o.syncOrAsync(S,t);return O&&O.then||(O=Promise.resolve()),O.then((function(){return E(t),t}))},e.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return h.cleanPlot([],{},r,e),h.purge(t),l.purge(t),e._container&&e._container.remove(),delete t._context,t},e.react=function(t,r,n,i){var a,l;t=o.getGraphDiv(t),A.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,L(t,i),v=st(g,t._context)}t.data=r||[],A.cleanData(t.data),t.layout=n||{},A.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,u,c,f,h,d,p,v,g=n._preGUI,y=[],m={},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&&y.push(p),h.set(B(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 m)){var A=s(e,p).get();m[p]=A&&(A.autorange||!1!==A.autorange&&(!A.range||2!==A.range.length))}if(m[p]){h.set(B(s(n,i).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+i);delete g[i],c&&"range["===c.tail.substr(0,6)&&(x[c.head]=1)}for(var M=0;M<y.length;M++){var T=y[M];if(x[T]){var k=s(e,T).get();k&&delete k.autorange}}var S=n._tracePreGUI;for(var E in S){var O,C=S[E],L=null;for(i in C){if(!L){var R=nt(E,r);if(R<0){delete S[E];break}var D=it(E,t,(O=r[R]._fullInput).index);if(D<0){delete S[E];break}L=t[D]}if(c=et(i,tt)){if(c.attr?u=(l=s(n,c.attr).get())&&rt(c.attr,e):(l=O.uirevision,void 0===(u=L.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(f=C[i])&&(f=void 0),at(d=(h=s(L,i)).get(),f))){h.set(B(s(O,i).get()));continue}}else o.warn("unrecognized GUI edit: "+i+" in trace uid "+E);delete C[i]}}}(t.data,t.layout,u,d),h.supplyDefaults(t,{skipUpdateCalc:!0});var y=t._fullData,m=t._fullLayout,x=void 0===m.datarevision,b=m.transition,_=function(t,e,r,n,i){var a=T.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,m,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=T.traceFlags();u.arrays={},u.nChanges=0,u.nChangesAnim=0;var c={getValObject:function(t){var e=f.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e},flags:u,immutable:n,transition:i,newDataRevision:a,gd:t},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,y,x,b,w);if(J(t)&&(_.layoutReplot=!0),k.calc||_.calc){t.calcdata=void 0;for(var S=Object.getOwnPropertyNames(m),O=0;O<S.length;O++){var C=S[O],R=C.substring(0,5);if("xaxis"===R||"yaxis"===R){var D=m[C]._emptyCategories;D&&D()}}}else h.supplyDefaultsUpdateCalc(t.calcdata,y);var I=[];if(a&&(t._transitionData={},h.createTransitionData(t),I.push((function(){return e.addFrames(t,a)}))),m.transition&&!v&&(k.anim||_.anim))_.ticks&&I.push(M.doTicksRelayout),h.doCalcdata(t),M.doAutoRangeAndConstraints(t),I.push((function(){return h.transitionFromReact(t,k,_,d)}));else if(k.fullReplot||_.layoutReplot||v)t._fullLayout._skipDefaults=!0,I.push(e._doPlot);else{for(var P in _.arrays){var F=_.arrays[P];if(F.length){var N=c.getComponentMethod(P,"drawOne");if(N!==o.noop)for(var z=0;z<F.length;z++)N(t,F[z]);else{var j=c.getComponentMethod(P,"draw");if(j===o.noop)throw new Error("cannot draw components: "+P);j(t)}}}I.push(h.previousPromises),k.style&&I.push(M.doTraceStyle),(k.colorbars||_.colorbars)&&I.push(M.doColorBars),_.legend&&I.push(M.doLegend),_.layoutstyle&&I.push(M.layoutStyles),_.axrange&&Y(I),_.ticks&&I.push(M.doTicksRelayout),_.modebar&&I.push(M.doModeBar),_.camera&&I.push(M.doCamera),I.push(E)}I.push(h.rehover,h.redrag,h.reselect),(l=o.syncOrAsync(I,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 A.cleanData(t.data),A.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)}},20556:function(t){"use strict";var e={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},73060:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(45464),o=r(64859),s=r(16672),l=r(85656),u=r(20556).configAttributes,c=r(67824),f=i.extendDeepAll,h=i.isPlainObject,d=i.isArrayOrTypedArray,p=i.nestedProperty,v=i.valObjectMeta,g="_isSubplotObj",y="_isLinkedToArray",m="_deprecated",x=[g,y,"_arrayAttrRegexps",m];function b(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(_(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!h(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!_(e[++r]))return!1}else if("info_array"===t.valType){var i=e[++r];if(!_(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)M(r,e,e.attr[i]);else M(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&&T(r,e.layoutAttributes,e.name)}return{layoutAttributes:A(r)}}function A(t){return function(t){e.crawl(t,(function(t,r,n){e.isValObject(t)?!0!==t.arrayOk&&"data_array"!==t.valType||(n[r+"src"]={valType:"string",editType:"none"}):h(t)&&(t.role="object")}))}(t),function(t){e.crawl(t,(function(t,e,r){if(t){var n=t[y];n&&(delete t[y],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}))}(t),function(t){!function t(e){for(var r in e)if(h(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function M(t,e,r){var n=p(t,r),i=f({},e.layoutAttributes);i[g]=!0,n.set(i)}function T(t,e,r){var n=p(t,r);n.set(f(n.get()||{},e))}e.IS_SUBPLOT_OBJ=g,e.IS_LINKED_TO_ARRAY=y,e.DEPRECATED=m,e.UNDERSCORE_ATTRS=x,e.get=function(){var t={};n.allTypes.forEach((function(r){t[r]=function(t){var r,i;i=(r=n.modules[t]._module).basePlotModule;var o={type:null},s=f({},a),l=f({},r.attributes);e.crawl(l,(function(t,e,r,n,i){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:A(o)};if(r.layoutAttributes){var c={};f(c,r.layoutAttributes),u.layoutAttributes=A(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){T(r,i.schema.transforms[t][e],e)}))})),{attributes:A(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)},A(r),r.frames),animation:A(l),config:A(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)}},31780:function(t,e,r){"use strict";var n=r(3400),i=r(45464),a="templateitemname",o={name:{valType:"string",editType:"none"}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}o[a]={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},e.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,"type"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var u={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var c=o[l];if(c.name===n)return u[n]=1,e._template=c,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!u[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),u[n]=1}}return t}}},e.arrayDefaultKey=l,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=e+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function f(t,e){s?n.nestedProperty(l[u],t).set(e):l[u+"."+t]=e}function h(){var t=l;return c(),t}return c(),{modifyBase:function(t,e){l[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},39172:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=r(72736),l=r(73696),u=r(76308),c=r(43616),f=r(81668),h=r(45460),d=r(54460),p=r(84284),v=r(71888),g=v.enforce,y=v.clean,m=r(19280).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,y=g._size,m=y.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-m-n:e._offset+e._length+m+n:y.t+y.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:y.l+y.w*(t.position||0)+n%1}for(r=0;r<x.length;r++){var A=(l=x[r])._anchorAxis;l._linepositions={},l._lw=c.crispRound(t,l.linewidth,1),l._mainLinePosition=_(l,A,l.side),l._mainMirrorPosition=l.mirror&&A?_(l,A,p.OPPOSITE_SIDE[l.side]):null}var T=[],k=[],S=[],E=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 O=s.xaxis.domain,C=s.yaxis.domain,L=s.plotgroup;if(b(O,C,S)){var R=L.node(),D=s.bg=o.ensureSingle(L,"rect","bg");R.insertBefore(D.node(),R.childNodes[0]),k.push(i)}else L.select("rect.bg").remove(),S.push([O,C]),E||(T.push(i),k.push(i))}var I,P,F,N,B,z,j,U,H,V,G,Y,W,q=g._bgLayer.selectAll(".bg").data(T);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-m,v._offset-m,f._length+2*m,v._length+2*m).call(u.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(i in g._plots){s=g._plots[i],f=s.xaxis,v=s.yaxis;var 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"+I+","+t+"H"+P}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)&&(B=M(f,"left",v,x),I=f._offset-(B?m+B:0),z=M(f,"right",v,x),P=f._offset+f._length+(z?m+z:0),F=_(f,v,"bottom"),N=_(f,v,"top"),!(W=!f._anchorAxis||i!==f._mainSubplot)||"allticks"!==f.mirror&&"all"!==f.mirror||(f._linepositions[i]=[F,N]),nt=rt(f,Q,$),W&&f.showline&&("all"===f.mirror||"allticks"===f.mirror)&&(nt+=Q(F)+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)&&(G=M(v,"bottom",f,x),j=v._offset+v._length+(G?m:0),Y=M(v,"top",f,x),U=v._offset-(Y?m: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 A(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 M(t,e,r,n){if(A(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&A(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,y=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(y>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,y,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 m=(r.text.match(s.BR_TAG_ALL)||[]).length;if(m){var b=p.LINE_SPACING*m+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,y(t,e),m(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=d.getFromId(t,o);m(t,s,e.range),n[o]=1}}g(t)},e.finalDraw=function(t){i.getComponentMethod("rangeslider","draw")(t),i.getComponentMethod("rangeselector","draw")(t)},e.drawMarginPushers=function(t){i.getComponentMethod("legend","draw")(t),i.getComponentMethod("rangeselector","draw")(t),i.getComponentMethod("sliders","draw")(t),i.getComponentMethod("updatemenus","draw")(t),i.getComponentMethod("colorbar","draw")(t)}},94828:function(t,e,r){"use strict";var n=r(3400),i=n.isPlainObject,a=r(73060),o=r(7316),s=r(45464),l=r(31780),u=r(20556).dfltConfig;function c(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))c(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],u=o.newItem(s)._template;u&&c(u,s)}var f=o.defaultItems();for(a=0;a<f.length;a++)r.push(f[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var u=o[r],h=t[u];if(u in e?s(h,e[u],u):e[u]=h,f(u)===u)for(var 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 y=f(u);y!==u&&(g=r(p=v(t,y,o)))}if(!(s&&s===g||!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(c)))if(!g.valType&&i(c))h(c,e,r,d,p);else if(g._isLinkedToArray&&Array.isArray(c))for(var m=!1,x=0,b={},_=0;_<c.length;_++){var w=c[_];if(i(w)){var A=w.name;if(A)b[A]||(h(w,e,r,v(c,x,d),v(c,x,p)),x++,b[A]=1);else if(!m){var M=v(t,l.arrayDefaultKey(u),a),T=v(c,x,d);h(w,e,r,T,v(c,x,p));var k=n.nestedProperty(e,T);n.nestedProperty(e,M).set(k.get()),k.set(null),m=!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 y(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":e=t.path?"There are no templates for item "+t.path+" with name "+t.templateitemname:"There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":e=t.path?"The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?"Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":"The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type."}return t.msg=e,t}e.makeTemplate=function(t){t=n.isPlainObject(t)?t:n.getGraphDiv(t),t=n.extendDeep({_context:u},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach((function(t){var e={};h(t,e,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,y,m,x,b=l.layout;i(b)&&c(b,a.layout);var _=l.data;if(i(_)){for(v in a.data)if(g=_[v],Array.isArray(g)){for(x=(m=a.data[v]).length,y=g.length,f=0;f<x;f++)c(g[f%y],m[f]);for(f=x;f<y;f++)m.push(n.extendDeep({},g[f]))}for(v in _)v in a.data||(a.data[v]=n.extendDeep([],_[v]))}}return a},e.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:u,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,c=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var h=r._fullLayout,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 m,x={},b=0;b<d.length;b++){var _=d[b];x[m=_.type]=(x[m]||0)+1,_._fullInput._template||c.push({code:"missing",index:_._fullInput.index,traceType:m})}for(m in l){var w=l[m].length,A=x[m]||0;w>A?c.push({code:"unused",traceType:m,templateCount:w,dataCount:A}):A>w&&c.push({code:"reused",traceType:m,templateCount:w,dataCount:A})}}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(y)}},67024:function(t,e,r){"use strict";var n=r(38248),i=r(36424),a=r(7316),o=r(3400),s=r(81792),l=r(37164),u=r(63268),c=r(25788).version,f={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(t,e){var r,h,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 y(t,r){return o.coerce(e,g,f,t,r)}var m=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),A=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var T=o.extendFlat({},h);x?T.width=x:null===e.width&&n(p.width)&&(T.width=p.width),b?T.height=b:null===e.height&&n(p.height)&&(T.height=p.height);var k=o.extendFlat({},d,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(M);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(M._fullLayout))}))}function O(){return new Promise((function(t,e){var r=l(M,m,_),n=M._fullLayout.width,f=M._fullLayout.height;function h(){i.purge(M),document.body.removeChild(M)}if("full-json"===m){var d=a.graphJson(M,!1,"keepdata","object",!0,!0);return d.version=c,d=JSON.stringify(d),h(),t(A?d:s.encodeJSON(d))}if(h(),"svg"===m)return t(A?r:s.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),u({format:m,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(M,r,T,k).then(S).then(E).then(O).then((function(e){t(function(t){return A?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},21480:function(t,e,r){"use strict";var n=r(3400),i=r(7316),a=r(73060),o=r(20556).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;h<f.length;h++){var g=f[h];if("transforms"!==g){var y=o.slice();y.push(g);var m=t[g],x=e[g],b=v(r,g),_=(b||{}).valType,w="info_array"===_,A="colorscale"===_,M=(b||{}).items;if(p(r,g))if(s(m)&&s(x)&&"any"!==_)c(m,x,b,i,a,y);else if(w&&l(m)){m.length>x.length&&i.push(d("unused",a,y.concat(x.length)));var T,k,S,E,O,C=x.length,L=Array.isArray(M);if(L&&(C=Math.min(C,M.length)),2===b.dimensions)for(k=0;k<C;k++)if(l(m[k])){m[k].length>x[k].length&&i.push(d("unused",a,y.concat(k,x[k].length)));var R=x[k].length;for(T=0;T<(L?Math.min(R,M[k].length):R);T++)S=L?M[k][T]:M,E=m[k][T],O=x[k][T],n.validate(E,S)?O!==E&&O!==+E&&i.push(d("dynamic",a,y.concat(k,T),E,O)):i.push(d("value",a,y.concat(k,T),E))}else i.push(d("array",a,y.concat(k),m[k]));else for(k=0;k<C;k++)S=L?M[k]:M,E=m[k],O=x[k],n.validate(E,S)?O!==E&&O!==+E&&i.push(d("dynamic",a,y.concat(k),E,O)):i.push(d("value",a,y.concat(k),E))}else if(b.items&&!w&&l(m)){var D,I,P=M[Object.keys(M)[0]],F=[];for(D=0;D<x.length;D++){var N=x[D]._index||D;if((I=y.slice()).push(N),s(m[N])&&s(x[D])){F.push(N);var B=m[N],z=x[D];s(B)&&!1!==B.visible&&!1===z.visible?i.push(d("invisible",a,I)):c(B,z,P,i,a,I)}}for(D=0;D<m.length;D++)(I=y.slice()).push(D),s(m[D])?-1===F.indexOf(D)&&i.push(d("unused",a,I)):i.push(d("object",a,I,m[D]))}else!s(m)&&s(x)?i.push(d("object",a,y,m)):u(m)||!u(x)||w||A?g in e?n.validate(m,b)?"enumerated"===b.valType&&(b.coerceNumber&&m!==+x||m!==x)&&i.push(d("dynamic",a,y,m,x)):i.push(d("value",a,y,m)):i.push(d("unused",a,y,m)):i.push(d("array",a,y,m));else i.push(d("schema",a,y))}}return i}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,y=0;y<g;y++){var m=r[y],x=["data",y];if(s(m)){var b=v[y],_=b.type,w=f.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==m.visible&&h.push(d("invisible",x)),c(m,b,w,h,x);var A=m.transforms,M=b.transforms;if(A){l(A)||h.push(d("array",x,["transforms"])),x.push("transforms");for(var T=0;T<A.length;T++){var k=["transforms",T],S=A[T].type;if(s(A[T])){var E=f.transforms[S]?f.transforms[S].attributes:{};E.type={valType:"enumerated",values:Object.keys(f.transforms)},c(A[T],M[T],E,h,x,k)}else h.push(d("object",x,k))}}}else h.push(d("object",x))}var O=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,O,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=y(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function v(t,e){return e in t?t[e]:t[y(e).keyMinusId]}var g=n.counterRegex("([a-z]+)");function y(t){var e=t.match(g);return{keyMinusId:e&&e[1],id:e&&e[2]}}},85656:function(t){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},51272:function(t,e,r){"use strict";var n=r(3400),i=r(31780);t.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||"visible",u=e[s],c=n.isArrayOrTypedArray(t[s])?t[s]:[],f=e[s]=[],h=i.arrayTemplater(e,s,l);for(a=0;a<c.length;a++){var 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}},45464:function(t,e,r){"use strict";var n=r(25376),i=r(55756);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},1220:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=i.dateTime2ms,o=i.incrementMonth,s=r(39032).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var u,c=t[r+"period"];if(n(c)){if((c=+c)<=0)return{vals:i}}else if("string"==typeof c&&"M"===c.charAt(0)){var f=+c.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:i};u=f}for(var h=e.calendar,d="start"===l,p="end"===l,v=t[r+"period0"],g=a(v,h)||0,y=[],m=[],x=[],b=i.length,_=0;_<b;_++){var w,A,M,T=i[_];if(u){for(w=Math.round((T-g)/(u*s)),M=o(g,u*w,h);M>T;)M=o(M,-u,h);for(;M<=T;)M=o(M,u,h);A=o(M,-u,h)}else{for(M=g+(w=Math.round((T-g)/c))*c;M>T;)M-=c;for(;M<=T;)M+=c;A=M-c}y[_]=d?A:p?M:(A+M)/2,m[_]=A,x[_]=M}return{vals:y,starts:m,ends:x}}},26720:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(39032).FP_SAFE,s=r(24040),l=r(43616),u=r(79811),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=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 y=e.autorange,m="reversed"===y||"min reversed"===y||"max reversed"===y;if(!m&&e.range){var x=a.simpleMap(e.range,e.r2l);m=x[1]<x[0]}"reversed"===e.autorange&&(e.autorange=!0);var b,_,w,A,T,k,S=e.rangemode,E="tozero"===S,O="nonnegative"===S,C=e._length,L=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&&((T=C-s(b)-l(_))>L?k/T>R&&(w=b,A=_,R=k/T):k/C>R&&(w={val:b.val,nopad:1},A={val:_.val,nopad:1},R=k/C));if(h===v){var D=h-1,I=h+1;if(E)if(0===h)i=[0,1];else{var P=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),F=h/(1-Math.min(.5,P/C));i=h>0?[0,F]:[F,0]}else i=O?[Math.max(0,D),Math.max(1,I)]:[D,I]}else E?(w.val>=0&&(w={val:0,nopad:1}),A.val<=0&&(A={val:0,nopad:1})):O&&(w.val-R*s(w)<0&&(w={val:0,nopad:1}),A.val<=0&&(A={val:1,nopad:1})),R=(A.val-w.val-d(e,b.val,_.val))/(C-s(w)-l(A)),i=[w.val-R*s(w),A.val+R*l(A)];return i=M(i,e),e.limitRange&&e.limitRange(),m&&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 y=c._vals[g].bb;if(y){var m=2*v+y.width,x=2*v+y.height;i=Math.max(i,o?Math.max(m*h,x*d):Math.max(x*h,m*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:M,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,A=!1,M=r.vpadLinearized||!1;function T(t){if(Array.isArray(t))return A=!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=T((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=T((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=T(r.vpadplus||r.vpad),O=T(r.vpadminus||r.vpad);if(!A){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 L(r){s=e[r],i(s)&&(c=k(r),f=S(r),M?(l=t.c2l(s)-O(r),u=t.c2l(s)+E(r)):(h=s-O(r),d=s+E(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)&&y(p,l,f,C),b(u)&&m(v,u,c,C))}var R=Math.min(6,g);for(n=0;n<R;n++)L(n);for(n=g-1;n>=R;n--)L(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],y(u,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],m(f,a.val,a.pad,{extrapad:a.extrapad})}}}if(h(s,e._traceIndices),h(l.annotations||[],e._annIndices||[]),h(l.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r)for(var 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],y(u,a.val,a.pad*x,{extrapad:a.extrapad});for(i=0;i<v.max.length;i++)a=v.max[i],m(f,a.val,a.pad*x,{extrapad:a.extrapad})}return{min:u,max:f}}function y(t,e,r,n){x(t,e,r,n,_)}function m(t,e,r,n){x(t,e,r,n,w)}function x(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function b(t){return i(t)&&Math.abs(t)<o}function _(t,e){return t<=e}function w(t,e){return t>=e}function A(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<t.d2l(r)}function M(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&&A(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&A(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&A(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&A(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},76808:function(t){"use strict";t.exports=function(t,e,r){var n,i;if(r){var a="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[a?1:0],i=r[a?0:1]}var o=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},54460:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,u=r(72736),c=r(81668),f=r(76308),h=r(43616),d=r(94724),p=r(98728),v=r(39032),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,A=v.ONEAVGMONTH,M=v.ONEMINMONTH,T=v.ONEWEEK,k=v.ONEDAY,S=k/2,E=v.ONEHOUR,O=v.ONEMIN,C=v.ONESEC,L=v.MINUS_SIGN,R=v.BADNUM,D={K:"zeroline"},I={K:"gridline",L:"path"},P={K:"minor-gridline",L:"path"},F={K:"tick",L:"path"},N={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},z=r(84284),j=z.MID_SHIFT,U=z.CAP_SHIFT,H=z.LINE_SPACING,V=z.OPPOSITE_SIDE,G=t.exports={};G.setConvert=r(78344);var Y=r(52976),W=r(79811),q=W.idSort,X=W.isLinked;G.id2name=W.id2name,G.name2id=W.name2id,G.cleanId=W.cleanId,G.list=W.list,G.listIds=W.listIds,G.getFromId=W.getFromId,G.getFromTrace=W.getFromTrace;var Z=r(19280);G.getAutoRange=Z.getAutoRange,G.findExtremes=Z.findExtremes;var J=1e-4;function K(t){var e=(t[1]-t[0])*J;return[t[0]-e,t[1]+e]}G.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)},G.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},G.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==G.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=G.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},G.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:G.getFromId(e,r).cleanPos)(t)},G.redrawComponents=function(t,e){e=e||G.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[G.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=G.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(s.isArrayOrTypedArray(a)){if(i={type:Y(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},G.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=G.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=G.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=G.tickText(t,h,!1,String(c[f]));l&&(d.minor=!0,d.text=""),o.push(d)}}}}return it(t,o)}G.getDataToCoordFunc=function(t,e,r,n){return Q(t,e,r,n).d2c},G.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},G.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},G.saveRangeInitial=function(t,e){for(var r=G.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},G.saveShowSpikeInitial=function(t,e){for(var r=G.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},G.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},G.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)}G.autoTicks(l,f)}var g,y=l.dtick,m=G.tickIncrement(G.tickFirst(l),y,"reverse",a);if("number"==typeof y)m=function(t,e,r,n,a){var o=0,s=0,l=0,u=0;function c(e){return(1+100*(e-t)/r.dtick)%100<2}for(var f=0;f<e.length;f++)e[f]%1==0?l++:i(e[f])||u++,c(e[f])&&o++,c(e[f]+r.dtick/2)&&s++;var h=e.length-u;if(l===h&&"date"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*h&&(o>.3*h||c(n)||c(a))){var d=r.dtick/2;t+=t+d<n?d:-d}return t}(m,t,l,u,c),g=m+(1+Math.floor((c-m)/y))*y;else for("M"===l.dtick.charAt(0)&&(m=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=G.tickIncrement(t,"M6","reverse")+1.5*k:a.exactMonths>.8?t=G.tickIncrement(t,"M1","reverse")+15.5*k:t-=S;var l=G.tickIncrement(t,r);if(l<=n)return l}return t}(m,t,y,u,a)),g=m;g<=c;)g=G.tickIncrement(g,y,!1,a);return{start:e.c2r(m,0,a),end:e.c2r(g,0,a),size:y,_dataSpan:c-u}},G.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=G.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,G.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*T&&h===2*k&&(t.dtick=T):f===2*T&&h===3*k?t.dtick=T:f!==T||(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)},G.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,G.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=G.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick<E&&(t.dtick=E)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=k,o&&!n&&t.dtick<k&&(t.dtick=k)):/%[UVW]/.test(a)?(e=T,o&&!n&&t.dtick<T&&(t.dtick=T)):/%[Bbm]/.test(a)?(e=A,o&&(n?nt(t.dtick)<1:t.dtick<M)&&(t.dtick="M1")):/%[q]/.test(a)?(e=b,o&&(n?nt(t.dtick)<3:t.dtick<_)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=y,o&&(n?nt(t.dtick)<12:t.dtick<m)&&(t.dtick="M12")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),vt(t)},G.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=[],O=[],C=[],L=[],D=t.minor&&(t.minor.ticks||t.minor.showgrid),I=1;I>=(D?0:1);I--){var P=!I;I?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var F=I?t:s.extendFlat({},t,t.minor);if(P?G.prepMinorTicks(F,t,e):G.prepTicks(F,e),"array"!==F.tickmode)if("sync"!==F.tickmode){var N=K(c),B=N[0],z=N[1],j=i(F.dtick),U="log"===a&&!(j||"L"===F.dtick.charAt(0)),H=G.tickFirst(F,e);if(I){if(t._tmin=H,H<B!==f)break;"category"!==a&&"multicategory"!==a||(z=f?Math.max(-.5,z):Math.min(t._categories.length-.5,z))}var V,Y,W=null,q=H;I&&(j?Y=t.dtick:"date"===a?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(Y=A*t.dtick.substring(1)):Y=t._roughDTick,V=Math.round((t.r2l(q)-t.r2l(t.tick0))/Y)-1);var X=F.dtick;for(F.rangebreaks&&F._tick0Init!==F.tick0&&(q=Pt(q,t),f||(q=G.tickIncrement(q,X,!f,o))),I&&u&&(q=G.tickIncrement(q,X,!f,o),V--);f?q>=z:q<=z;q=G.tickIncrement(q,X,f,o)){if(I&&V++,F.rangebreaks&&!f){if(q<B)continue;if(F.maskBreaks(q)===R&&Pt(q,F)>=d)break}if(C.length>p||q===W)break;W=q;var Z={value:q};I?(U&&q!==(0|q)&&(Z.simpleLabel=!0),l>1&&V%l&&(Z.skipLabel=!0),C.push(Z)):(Z.minor=!0,L.push(Z))}}else C=[],v=at(t);else I?(C=[],v=ot(t,!P)):(L=[],O=ot(t,!P))}if(D&&!("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;$<L.length;$++){var tt=L[$],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)}}L=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>=m?h=c>=m&&c<=g?c:y:r===b&&f>=_?h=c>=_&&c<=x?c:b:f>=M?h=c>=M&&c<=w?c:A:r===T&&f>=T?h=T:f>=k?h=k:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),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 O=(v+.5)/84;e.maskBreaks(i*(1-O)+O*d)!==R&&p++}(h*=p/84)||(t[n].drop=!0),s&&c>T&&(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=Pt(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}}It(t)&&360===Math.abs(c[1]-c[0])&&C.pop(),t._tmax=(C[C.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var ct,ft,ht=function(e){e.text="",t._prevDateHead=n};for(C=C.concat(L),r=0;r<C.length;r++){var dt=C[r].minor,pt=C[r].value;dt?O.push({x:pt,minor:!0}):(n=t._prevDateHead,ct=G.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(O),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>=O&&a<=16||e>=E)t._tickround="M";else if(e>=C&&a<=19||e>=O)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&&(mt(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}}G.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>y)e/=y,n=a(10),t.dtick="M"+12*pt(e,n,st);else if(o>A)e/=A,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=G.getTickFormat(t),u="period"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=pt(e,E,lt):o>O?t.dtick=pt(e,O,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))):It(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)}},G.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)},G.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,y,m=0,x=f;m<10;){if(((v=G.tickIncrement(x,c,o,t.calendar))-u)*(x-u)<=0)return o?Math.min(x,v):Math.max(x,v);g=(u-(x+v)/2)/(v-x),y=d+(Math.abs(Math.round(g))||1)*p,x=G.tickIncrement(x,y,g<0?!o:o,t.calendar),m++}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)},G.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||G.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=Ft(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||mt(d)&&xt(f)?(e.text=0===f?1:1===f?"10":"10<sup>"+(f>1?"":L)+h+"</sup>",e.fontSize*=1.25):("e"===d||"E"===d)&&h>2?e.text="1"+d+(f>0?"+":L)+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):It(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=L+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 y=t.labelalias[o.text];"string"==typeof y&&(o.text=y)}return("boundaries"===t.tickson||t.showdividers)&&(o.xbnd=[h(o.x-.5),h(o.x+t.dtick-.5)]),o},G.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 G.hoverLabelText(t,n,r)+" - "+G.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=G.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":L+o:o};var yt=["f","p","n","μ","m","","k","M","G","T"];function mt(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=G.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,L);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&&(mt(l)&&xt(u)&&(l="power"),d=u<0?L+-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":mt(l)&&(t+=yt[u/3+5])),a?L+t:t}function _t(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function 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 At(t){return void 0!==t.periodX?t.periodX:t.x}function Mt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function Tt(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 St(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function Et(t){return t._id+".automargin"}function Ot(t){return Et(t)+".mirror"}function Ct(t){return t._id+".rangeslider"}function Lt(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(G.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(G.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,y=!1,m=!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?y=!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?m=!0:o[i][h]!==v&&(g=!1)}g&&(y&&(l[a[0]._name].type="linear"),m&&(l[o[0]._name].type="linear"),Dt(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 Dt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),u=o(t[n[0]._name],e).get();for("title"===e&&(l&&l.text===i.x&&(l.text=i.y),u&&u.text===i.y&&(u.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+"."+e).set(u);for(a=0;a<n.length;a++)o(t,n[a]._name+"."+e).set(l)}function It(t){return"angularaxis"===t._id}function Pt(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 Ft(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Nt(t,e){Ft(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Bt(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}G.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return"string"!=typeof t?t:Number(t.replace("M",""))*A}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},G.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?G.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},G.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},G.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=G.list(t,"x",!0),l=G.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})}))}},G.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:G.listIds(t),a=G.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=G.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=G.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=G.drawOne(t,n,r);return n._shiftPusher&&Bt(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},G.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),y=G.counterLetter(v),m=p._plots[e._mainSubplot];if(m){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),Bt(e,x,u,!0),Bt(e,e.shift||0,u,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,u));var b=m[g+"axislayer"],_=e._mainLinePosition,w=_+=e._shift,A=e._mainMirrorPosition,M=e._vals=G.calcTicks(e),T=[e.mirror,w,A].join("_");for(n=0;n<M.length;n++)M[n].axInfo=T;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var k={};if(e.visible){var S,E,O=G.makeTransTickFn(e),C=G.makeTransTickLabelFn(e),L="inside"===e.ticks,R="outside"===e.ticks;if("boundaries"===e.tickson){var D=function(t,e){var r,n=[],i=function(t,e){var r=t.xbnd[e];null!==r&&n.push(s.extendFlat({},t,{x:r}))};if(e.length){for(r=0;r<e.length;r++)i(e[r],0);i(e[r-1],1)}return n}(0,M);E=G.clipEnds(e,D),S=L?E:D}else E=G.clipEnds(e,M),S=L&&"period"!==e.ticklabelmode?E:M;var I,P=e._gridVals=E,F=function(t,e){var r,n,i=[],a=e.length&&e[e.length-1].x<e[0].x,o=function(t,e){var r=t.xbnd[e];null!==r&&i.push(s.extendFlat({},t,{x:r}))};if(t.showdividers&&e.length){for(r=0;r<e.length;r++){var l=e[r];l.text2!==n&&o(l,a?1:0),n=l.text2}o(e[r-1],a?0:1)}return i}(e,M);if(!p._hasOnlyLargeSploms){var N=e._subplotsWith,B={};for(n=0;n<N.length;n++){i=N[n];var z=(l=p._plots[i])[y+"axis"],j=z._mainAxis._id;if(!B[j]){B[j]=1;var U="x"===g?"M0,"+z._offset+"v"+z._length:"M"+z._offset+",0h"+z._length;G.drawGrid(t,e,{vals:P,counterAxis:z,layer:l.gridlayer.select("."+v),minorLayer:l.minorGridlayer.select("."+v),path:U,transFn:O}),G.drawZeroLine(t,e,{counterAxis:z,layer:l.zerolinelayer,path:U,transFn:O})}}}var Y=G.getTickSigns(e),W=G.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var q,X,Z,J,K=G.makeTickPath(e,w,Y[2]),Q=G.makeTickPath(e,w,W[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(q=G.makeTickPath(e,A,Y[3]),X=G.makeTickPath(e,A,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<F.length;n++)$[F[n].x]=1;I=function(t){return $[t.x]?q:Z}}else I=function(t){return t.minor?J:Z}}if(G.drawTicks(t,e,{vals:S,layer:b,path:I,transFn:O}),"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=G.makeTickPath(e,rt,it?Y[0]:W[0],{minor:it})+G.makeTickPath(e,nt,it?Y[1]:W[1],{minor:it});G.drawTicks(t,e,{vals:S,layer:l[g+"axislayer"],path:at,transFn:O})}}var ot=[];if(ot.push((function(){return G.drawLabels(t,e,{vals:M,layer:b,plotinfo:l,transFn:C,labelFns:G.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 G.drawLabels(t,e,{vals:wt(e,M),layer:b,cls:v+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:O,labelFns:G.makeLabelFns(e,w+n*Y[4])})})),ot.push((function(){return e._depth=Y[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,Mt);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(f.stroke,e.dividercolor).style("stroke-width",h.crispRound(t,e.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}(t,e,{vals:F,layer:b,path:G.makeTickPath(e,w,Y[4],{len:e._depth}),transFn:O})}))}else e.title.hasOwnProperty("standoff")&&ot.push((function(){e._depth=Y[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+Tt(e);else{var s=Ft(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=G.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 y=h.getTranslate(g.node().parentNode);p.offsetLeft=y.x,p.offsetTop=y.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=G.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+=Tt(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],m="number"==typeof e._shift?e._shift:0;if("x"===g){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?c-r.top:0,f),v.reverse()),r.width>0){var x=r.right-(e._offset+e._length);x>0&&(n.xr=1,n.r=x);var b=e._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(e._depth=Math.max(r.height>0?c-r.left:0,f),n[l]=e._depth-m):(e._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=e._depth+m,v.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.b=_);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===e.anchor?e.position:e._anchorAxis.domain[v[0]],e.title.text!==p._dfltTitle[g]&&(n[l]+=Tt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=f),!0===e.mirror||"ticks"===e.mirror?i[y]=e._anchorAxis.domain[v[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[y]=[e._counterDomainMin,e._counterDomainMax][v[1]]))}lt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(_t(n,e.automargin),_t(i,e.automargin)),a.autoMargin(t,Et(e),n),a.autoMargin(t,Ot(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=St(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=G.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]}},G.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},G.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))}},G.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(At(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(At(e)))}},G.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},G.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 y,m,x,b,_,w={labelStandoff:d+=(t.linewidth||1)/2*(f?-1:1),labelShift:p},A=0,M=t.side,T=t._id.charAt(0),k=t.tickangle;if("x"===T)b=(_=!f&&"bottom"===M||f&&"top"===M)?1:-1,f&&(b*=-1),y=p*b,m=e+d*b,x=_?1:-.2,90===Math.abs(k)&&(f?x+=j:x=-90===k&&"bottom"===M?U:90===k&&"top"===M?j:.5,A=j/2*(k/90)),w.xFn=function(t){return t.dx+y+A*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*x},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===T){if(b=(_=!f&&"left"===M||f&&"right"===M)?1:-1,f&&(b*=-1),y=d,m=p*b,x=0,f||90!==Math.abs(k)||(x=-90===k&&"left"===M||90===k&&"right"===M?U:.5),f){var S=i(k)?+k:0;if(0!==S){var E=s.deg2rad(S);A=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(t){return t.dx+e-(y+t.fontSize*x)*b+A*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},G.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Mt);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Nt(e,[F]),o.attr("transform",r.transFn)},G.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&&G.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,y=1;y>=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+i).data(y?s:o,Mt);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?p:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Nt(e,[I,P])}},G.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=G.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,[D])},G.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:[],Mt),y=[];function m(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 y=o.select("text");y.attr({transform:f,"text-anchor":c}),y.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var m=h.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(m,0))}}))}g.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,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]?y.push(t._promises.pop().then((function(){m(r,p)}))):m(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,y=-1/0;for(var m in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>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,y="top"===p||"left"===p?Math.max(y,o?a.bottom:a.right):1/0)}})),a._plots){var x=a._plots[m];if(e._id===x.xaxis._id||e._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b["_visibleLabelMin_"+e._id]=v,b["_visibleLabelMax_"+e._id]=y)}}}},e._hideCounterAxisInsideTickLabels=function(t){var r="x"===e._id.charAt(0),i=[];for(var o in a._plots){var s=a._plots[o];e._id!==s.xaxis._id&&e._id!==s.yaxis._id||i.push(r?s.yaxis:s.xaxis)}i.forEach((function(r,i){r&&Ft(r)&&(t||[D,P,I,F,N]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===D.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===P.K?s.minorGridlayer.selectAll("."+e._id):t.K===I.K?s.gridlayer.selectAll("."+e._id):s[e._id.charAt(0)+"axislayer"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?At(a):a.x)+e._offset,l=n.select(this);s<e["_visibleLabelMax_"+r._id]&&s>e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},m(g,v+1?v:p);var x=null;e._selections&&(e._selections[c]=g);var b=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(g,v)}))):b.push((function(){if(m(g,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=St(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"),y=d("left"),b=d("right"),_=d("bottom")||y||v||b?(e.tickwidth||0)+6:0,w=l,A=1.25*n*a,M=w/Math.sqrt(Math.pow(w,2)+Math.pow(A,2)),T=e.autotickangles.map((function(t){return t*Math.PI/180})),k=T.find((function(t){return Math.abs(Math.cos(t))<=M}));void 0===k&&(k=T.reduce((function(t,e){return Math.abs(Math.cos(t))<Math.abs(Math.cos(e))?t:e}),T[0]));var S=k*(180/Math.PI);for(t=0;t<i.length-1;t++)if(s.bBoxIntersect(i[t],i[t+1],_)){x=S;break}}else{var E=2;for(e.ticks&&(E+=e.tickwidth/2),t=0;t<i.length;t++){var O=f[t].xbnd,C=i[t];if(null!==O[0]&&C.left-e.l2p(O[0])<E||null!==O[1]&&e.l2p(O[1])-C.right<E){x=90;break}}}x&&m(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=St(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)&&Ft(e)&&!X(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),w.autorange&&(a._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,b.push(_)),w.insiderange)){var A=_(),M="y"===e._id.charAt(0)?A.labelsMaxW:A.labelsMaxH;M+=6,"inside"===e.ticklabelposition&&(M+=e.ticklen||0);var T="right"===e.side||"top"===e.side?1:-1,k=1===T?1:0,S=1===T?0:1,E=[];E[S]=w.range[S];var O=w.range,C=w.r2p(O[k]),L=w.r2p(O[S]),R=a._insideTickLabelsUpdaterange[w._name+".range"];if(R){var B=w.r2p(R[k]),z=w.r2p(R[S]),j=T*("y"===e._id.charAt(0)?1:-1);j*C<j*B&&(C=B,E[k]=O[k]=R[k]),j*L>j*z&&(L=z,E[S]=O[S]=R[S])}var U=Math.abs(L-C);U-M>0?M*=1+M/(U-=M):M=0,"y"!==e._id.charAt(0)&&(M=-M),E[k]=w.p2r(w.r2p(O[k])+T*M),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var V=s.syncOrAsync(b);return V&&V.then&&t._promises.push(V),V},G.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},G.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=G.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=G.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))},G.clipEnds=function(t,e){return e.filter((function(e){return kt(t,e.x)}))},G.allowAutoMargin=function(t){for(var e=G.list(t,"",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,Et(n)),n.mirror&&a.allowAutoMargin(t,Ot(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&a.allowAutoMargin(t,Ct(n))}},G.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]],Lt(u.x,l.x),Lt(u.y,l.y);Lt(u.x,[o]),Lt(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)}},52976:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(39032).BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,u=Math.round;function c(t,e){return e?n(t):"number"==typeof t}function f(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,h=r.noMultiCategory;if(o(i)&&!i.length)return"-";if(!h&&function(t){return o(t[0])&&o(t[1])}(i))return"multicategory";if(h&&Array.isArray(i[0])){for(var 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":"-"}},28336:function(t,e,r){"use strict";var n=r(38248),i=r(24040),a=r(3400),o=r(31780),s=r(51272),l=r(94724),u=r(26332),c=r(25404),f=r(95936),h=r(42568),d=r(22416),p=r(42136),v=r(96312),g=r(78344),y=r(33816).WEEKDAY_PATTERN,m=r(33816).HOUR_PATTERN;function x(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=_(o[s])){c=y;break}var f=i("pattern",c);if(f===y)for(s=0;s<2;s++)(u=_(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case y:if(!n(u))return void(e.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=u;break;case m:if(!n(u))return void(e.enabled=!1);if((u=+u)<0||u>24)return void(e.enabled=!1);e.bounds[s]=o[s]=u}if(!1===r.autorange){var h=r.range;if(h[0]<h[1]){if(o[0]<h[0]&&o[1]>h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]<h[1])return void(e.enabled=!1)}}else{var d=i("values");if(!d||!d.length)return void(e.enabled=!1);i("dvalue")}}}t.exports=function(t,e,r,n,m){var b,_=n.letter,w=n.font||{},A=n.splomStash||{},M=r("visible",!n.visibleDflt),T=e._template||{},k=e.type||T.type||"-";"date"===k&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(b=r("ticklabelmode")));var S="";n.noTicklabelposition&&"multicategory"!==k||(S=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===b?["outside","inside"]:"x"===_?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==S.indexOf("inside")?"hide past domain":"category"===k||"multicategory"===k?"allow":"hide past div"),g(e,m),v(t,e,r,n),d(t,e,r,n),"category"===k||n.noHover||r("hoverformat");var E=r("color"),O=E!==l.color.dflt?E:w.color,C=A.label||m._dfltTitle[_];if(h(t,e,r,k,n),!M)return e;r("title.text",C),a.coerceFont(r,"title.font",{family:w.family,size:a.bigFont(w.size),color:O}),u(t,e,r,k);var L=n.hasMinor;if(L&&(o.newContainer(e,"minor"),u(t,e,r,k,{isMinor:!0})),f(t,e,r,k,n),c(t,e,r,n),L){var R=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=R}p(t,e,r,{dfltColor:E,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:L,attributes:l}),!L||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var D,I="multicategory"===k;if(n.noTickson||"category"!==k&&!I||!e.ticks&&!e.showgrid||(I&&(D="boundaries"),"boundaries"===r("tickson",D)&&delete e.ticklabelposition),I&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===k)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:x}),e.rangebreaks.length){for(var P=0;P<e.rangebreaks.length;P++)if(e.rangebreaks[P].pattern===y){e._hasDayOfWeekBreaks=!0;break}if(g(e,m),m._has("scattergl")||m._has("splom"))for(var F=0;F<n.data.length;F++){var N=n.data[F];"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()]}},29736:function(t,e,r){"use strict";var n=r(26880),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return o(t,e)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?o:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},79811:function(t,e,r){"use strict";var n=r(24040),i=r(33816);function a(t,e){if(e&&e.length)for(var r=0;r<e.length;r++)if(e[r][t])return!0;return!1}e.id2name=function(t){if("string"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.split(" ")[0].substr(1);return"1"===e&&(e=""),t.charAt(0)+"axis"+e}},e.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return"1"===e&&(e=""),t.charAt(0)+e}},e.cleanId=function(t,e,r){var n=/( domain)$/.test(t);if("string"==typeof t&&t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)&&(!n||r)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===a&&(a=""),t.charAt(0)+a+(n&&r?" domain":"")}},e.list=function(t,r,n){var i=t._fullLayout;if(!i)return[];var a,o=e.listIds(t,r),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var u=i._subplots.gl3d||[];for(a=0;a<u.length;a++){var c=i[u[a]];r?s.push(c[r+"axis"]):s.push(c.xaxis,c.yaxis,c.zaxis)}}return s},e.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+"axis"]:n.xaxis.concat(n.yaxis)},e.getFromId=function(t,r,n){var i=t._fullLayout;return r=void 0===r||"string"!=typeof r?r:r.replace(" domain",""),"x"===n?r=r.replace(/y[0-9]*/,""):"y"===n&&(r=r.replace(/x[0-9]*/,"")),i[e.id2name(r)]},e.getFromTrace=function(t,r,i){var a=t._fullLayout,o=null;if(n.traceIs(r,"gl3d")){var s=r.scene;"scene"===s.substr(0,5)&&(o=a[s][i+"axis"])}else o=e.getFromId(t,r[i+"axis"]||i);return o},e.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},22416:function(t,e,r){"use strict";var n=r(38116).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o=t.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=e.categoryorder="trace"),"trace"===u?e._initialCategories=[]:"array"===u?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,i).sort(),"category ascending"===u?e._initialCategories=l:"category descending"===u&&(e._initialCategories=l.reverse()))}}},98728:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(39032),o=a.ONEDAY,s=a.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,a="category"===e,s=i?o:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:a?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),u=t.substr(1);return(u=n(u)?Number(u):0)<=0||!(i&&"M"===l&&u===Math.round(u)||r&&"L"===l||r&&"D"===l&&(1===u||2===u))?s:t},e.tick0=function(t,e,r,a){return"date"===e?i.cleanDate(t,i.dateTick0(r,a%s==0?1:0)):"D1"!==a&&"D2"!==a?n(t)?Number(t):0:void 0}},33816:function(t,e,r){"use strict";var n=r(53756).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(t,e,r){"use strict";var n=r(3400),i=r(19280),a=r(79811).id2name,o=r(94724),s=r(21160),l=r(78344),u=r(39032).ALMOST_EQUAL,c=r(84284).FROM_BL;function f(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,u=s._axisConstraintGroups,c=s._axisMatchGroups,f=e._id,v=f.charAt(0),g=((s._splomAxes||{})[v]||{})[f]||{},y=e._id,m="x"===y.charAt(0);function x(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:m?["left","center","right"]:["bottom","middle","top"],dflt:m?"center":"middle"}},"constraintoward");var b,_,w=e.type,A=[];for(b=0;b<i.length;b++)(_=i[b])!==y&&s[a(_)].type===w&&A.push(_);var M=d(u,y);if(M){var T=[];for(b=0;b<A.length;b++)M[_=A[b]]||T.push(_);A=T}var k,S,E=A.length;E&&(t.matches||g.matches)&&(k=n.coerce(t,e,{matches:{valType:"enumerated",values:A,dflt:-1!==A.indexOf(g.matches)?g.matches:void 0}},"matches"));var O=l&&!m?e.anchor:void 0;if(E&&!k&&(t.scaleanchor||O)&&(S=n.coerce(t,e,{scaleanchor:{valType:"enumerated",values:A.concat([!1])}},"scaleanchor",O)),k){e._matchGroup=p(c,y,k,1);var C=s[a(k)],L=h(s,e)/h(s,C);m!==("x"===k.charAt(0))&&(L=(m?"x":"y")+L),p(u,y,k,L)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(S){var R=x("scaleratio");R||(R=e.scaleratio=1),p(u,y,S,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 y(t,e){var r=t._inputDomain,n=c[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}e.handleDefaults=function(t,e,r){var i,o,s,u,c,h,d,p,v=r.axIds,g=r.axHasImage,y=e._axisConstraintGroups=[],m=e._axisMatchGroups=[];for(i=0;i<v.length;i++)f(c=t[u=a(v[i])],h=e[u],{axIds:v,layoutOut:e,hasImage:g[u]});function x(t,r){for(i=0;i<t.length;i++)for(s in o=t[i])e[a(s)][r]=o}for(x(m,"_matchGroup"),i=0;i<y.length;i++)for(s in o=y[i])if((h=e[a(s)]).fixedrange){for(var b in o){var _=a(b);!1===(t[_]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}for(i=0;i<y.length;){for(s in o=y[i]){(h=e[a(s)])._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(o).length&&(y.splice(i,1),i--);break}i++}x(y,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],A=!1,M=!1;function T(){p=h[d],"rangebreaks"===d&&(M=h._hasDayOfWeekBreaks)}for(i=0;i<m.length;i++){o=m[i];for(var k=0;k<w.length;k++){var S;for(s in d=w[k],p=null,o)if(c=t[u=a(s)],h=e[u],d in h){if(!h.matches&&(S=h,d in c)){T();break}null===p&&d in c&&T()}if("range"===d&&p&&c.range&&2===c.range.length&&null!==c.range[0]&&null!==c.range[1]&&(A=!0),"autorange"===d&&null===p&&A&&(p=!1),null===p&&d in S&&(p=S[d]),null!==p)for(s in o)(h=e[a(s)])[d]="range"===d?p.slice():p,"rangebreaks"===d&&(h._hasDayOfWeekBreaks=M,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),m=1/0,x=0,b=1/0,_={},w={},A=!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],m=Math.min(m,c),"domain"!==l.constrain&&l._constraintShrinkable||(b=Math.min(b,c)),delete l._constraintShrinkable,x=Math.max(x,c),"domain"===l.constrain&&(A=!0);if(!(m>u*x)||A)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 M=l._inputDomain,T=(l.domain[1]-l.domain[0])/(M[1]-M[0]),k=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((h/=T)*k<1){l.domain=l._input.domain=M.slice(),s(l,h);continue}if(k<1&&(l.range=l._input.range=l._inputRange.slice(),h*=k),l.autorange){var S=l.r2l(l.range[0]),E=l.r2l(l.range[1]),O=(S+E)/2,C=O,L=O,R=Math.abs(E-O),D=O-R*h*1.0001,I=O+R*h*1.0001,P=i.makePadFn(d,l,0),F=i.makePadFn(d,l,1);y(l,h);var N,B,z=Math.abs(l._m),j=i.concatExtremes(t,l),U=j.min,H=j.max;for(B=0;B<U.length;B++)(N=U[B].val-P(U[B])/z)>D&&N<C&&(C=N);for(B=0;B<H.length;B++)(N=H[B].val+F(H[B])/z)<I&&N>L&&(L=N);h/=(L-C)/(2*R),C=l.l2r(C),L=l.l2r(L),l.range=l._input.range=S<E?[C,L]:[L,C]}y(l,h)}}},e.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n<r.length;n++)if(r[n][e])return"g"+n;return e},e.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&"domain"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},51184:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(49760),s=r(89184),l=r(24040),u=i.strTranslate,c=r(72736),f=r(76308),h=r(43616),d=r(93024),p=r(54460),v=r(93972),g=r(86476),y=r(72760),m=y.selectingOrDrawing,x=y.freeMode,b=r(84284).FROM_TL,_=r(73696),w=r(39172).redrawReglTraces,A=r(7316),M=r(79811).getFromId,T=r(22676).prepSelect,k=r(22676).clearOutline,S=r(22676).selectOnClick,E=r(21160),O=r(33816),C=O.MINDRAG,L=O.MINZOOM,R=!0;function D(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 I(t,e,r,i,a,o,s){var l=D(t,"rect",e,r);return n.select(l).call(h.setRect,i,a,o,s),l}function P(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function F(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;F(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 B(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function z(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 G(t){R&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),R=!1)}function Y(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,L)/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 y={},m=[];for(l in f){var x=M(t,l);m.push(x),y[x._id]=x}var b={},_=[];for(u in h){var w=M(t,u);_.push(w),b[w._id]=w}return{xaHash:y,yaHash:b,xaxes:m,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,y){var R,D,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+y==="nsew",yt=1===(v+y).length;function mt(){if(R=e.xaxis,D=e.yaxis,tt=R._length,et=D._length,Q=R._offset,$=D._offset,(H={})[R._id]=R,(Z={})[D._id]=D,v&&y)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=P(J,y),at=P(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=y||o,lt=v||o;var s=t._fullLayout;ut=s._has("scattergl"),ct=s._has("splom"),ft=s._has("svg")}r+=e.yaxis._shift,mt();var xt=function(t,e,r){return t?"nsew"===t?r?"":"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}(at+it,t._fullLayout.dragmode,gt),bt=I(e,v+y+"drag",xt,r,s,u,f);if(ot&&!gt)return bt.onmousedown=null,bt.style.pointerEvents="none",bt;var _t,wt,At,Mt,Tt,kt,St,Et,Ot,Ct,Lt={element:bt,gd:t,plotinfo:e};function Rt(){Lt.plotinfo.selection=!1,k(t)}function Dt(t,r){var i=Lt.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(V(i),2!==t||yt||Gt(),gt)o.indexOf("select")>-1&&S(r,i,J,K,e.id,Lt),o.indexOf("event")>-1&&d.click(i,r,e.id);else if(1===t&&yt){var s=v?D:R,u="s"===v||"w"===y?0:1,f=s._name+".range["+u+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),p="left",g="middle";if(s.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===s.side&&(p="right")):"e"===y&&(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 It(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(){St="",At.r=At.l,At.t=At.b,Ot.attr("d","M0,0Z")}if(At.l=Math.min(_t,n),At.r=Math.max(_t,n),At.t=Math.min(wt,i),At.b=Math.max(wt,i),rt.isSubplotConstrained)a>L||o>L?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?At.t=wt-o:At.b=wt+o):(a=o*tt/et,_t>n?At.l=_t-a:At.r=_t+a),Ot.attr("d",Y(At))):s();else if(nt.isSubplotConstrained)if(a>L||o>L){St="xy";var l=Math.min(At.l/tt,(et-At.b)/et),u=Math.max(At.r/tt,(et-At.t)/et);At.l=l*tt,At.r=u*tt,At.b=(1-l)*et,At.t=(1-u)*et,Ot.attr("d",Y(At))}else s();else!at||o<Math.min(Math.max(.6*a,C),L)?a<C||!it?s():(At.t=0,At.b=et,St="x",Ot.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-L-.5)+"h-3v"+(2*L+1)+"h3ZM"+(t.r+.5)+","+(e-L-.5)+"h3v"+(2*L+1)+"h-3Z"}(At,wt))):!it||a<Math.min(.6*o,L)?(At.l=0,At.r=tt,St="y",Ot.attr("d",function(t,e){return"M"+(e-L-.5)+","+(t.t-.5)+"v-3h"+(2*L+1)+"v3ZM"+(e-L-.5)+","+(t.b+.5)+"v3h"+(2*L+1)+"v-3Z"}(At,_t))):(St="xy",Ot.attr("d",Y(At)));At.w=At.r-At.l,At.h=At.b-At.t,St&&(Ct=!0),t._dragged=Ct,U(Et,Ot,At,Tt,kt,Mt),Pt(),t.emit("plotly_relayouting",ht),kt=!0}function Pt(){ht={},"xy"!==St&&"x"!==St||(F(J,At.l/tt,At.r/tt,ht,rt.xaxes),Ht("x",ht)),"xy"!==St&&"y"!==St||(F(K,(et-At.b)/et,(et-At.t)/et,ht,rt.yaxes),Ht("y",ht))}function Ft(){Pt(),V(t),Yt(),G(t)}Lt.prepFn=function(e,r,n){var a=Lt.dragmode,s=t._fullLayout.dragmode;s!==a&&(Lt.dragmode=s),mt(),dt=t._fullLayout._invScaleX,pt=t._fullLayout._invScaleY,ot||(gt?e.shiftKey?"pan"===s?s="zoom":m(s)||(s="pan"):e.ctrlKey&&(s="pan"):s="pan"),x(s)?Lt.minDrag=1:Lt.minDrag=void 0,m(s)?(Lt.xaxes=J,Lt.yaxes=K,T(e,r,n,Lt,s)):(Lt.clickFn=Dt,m(a)&&Rt(),ot||("zoom"===s?(Lt.moveFn=It,Lt.doneFn=Ft,Lt.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],At={l:_t,r:_t,w:0,t:wt,b:wt,h:0},Mt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),kt=!1,St="xy",Ct=!1,Et=z(vt,Mt,Q,$,Tt="M0,0H"+tt+"V"+et+"H0V0"),Ot=j(vt,Q,$)}(0,r,n)):"pan"===s&&(Lt.moveFn=Ut,Lt.doneFn=Yt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===bt){var r=t._fullLayout.dragmode;m(r)||(mt(),Wt([0,0,tt,et]),Lt.moveFn(e.dx,e.dy))}}},g.init(Lt);var Nt=[0,0,tt,et],Bt=null,zt=O.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(),E(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(),E(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])/B(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function 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=M(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 Gt(){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 Yt(){Wt([0,0,tt,et]),i.syncOrAsync([A.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]/D._length;for(r=0;r<c.length;r++){a=(n=u[c[r]]).xaxis,o=n.yaxis;var m,x,b,A,M=(st||nt.isSubplotConstrained)&&!a.fixedrange&&H[a._id],T=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&Z[o._id];if(M?(m=p,b=y||nt.isSubplotConstrained?e[0]:Zt(a,m)):nt.xaHash[a._id]?(m=p,b=e[0]*a._length/R._length):nt.yaHash[a._id]?(m=g,b="ns"===at?-e[1]*a._length/D._length:Zt(a,m,{n:"top",s:"bottom"}[at])):b=Xt(a,m=qt(a,p,g)),m>1&&(void 0!==a.maxallowed&&st===(a.range[0]<a.range[1]?"e":"w")||void 0!==a.minallowed&&st===(a.range[0]<a.range[1]?"w":"e"))&&(m=1,b=0),T?(x=g,A=v||nt.isSubplotConstrained?e[1]:Zt(o,x)):nt.yaHash[o._id]?(x=g,A=e[1]*o._length/D._length):nt.xaHash[o._id]?(x=p,A="ew"===it?-e[0]*o._length/R._length:Zt(o,x,{e:"right",w:"left"}[it])):A=Xt(o,x=qt(o,p,g)),x>1&&(void 0!==o.maxallowed&<===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&<===(o.range[0]<o.range[1]?"s":"n"))&&(x=1,A=0),m||x){m||(m=1),x||(x=1);var k=a._offset-b/m,S=o._offset-A/x;n.clipRect.call(h.setTranslate,b,A).call(h.setScale,m,x),n.plot.call(h.setTranslate,k,S).call(h.setScale,1/m,1/x),m===n.xScaleFactor&&x===n.yScaleFactor||(h.setPointGroupScale(n.zoomScalePts,m,x),h.setTextPointsScale(n.zoomScaleTxt,m,x)),h.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=m,n.yScaleFactor=x}}}}function 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(),E(t,e),Zt(t,e)):0}function Zt(t,e,r){return t._length*(1-e)*b[r||t.constraintoward||"middle"]}return v.length*y.length!=1&&q(bt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Rt(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();mt(),clearTimeout(Bt);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=jt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(y||(s=.5),n=0;n<J.length;n++)u(J[n],s,a);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),Bt=setTimeout((function(){t._fullLayout&&(Nt=[0,0,tt,et],Yt())}),zt),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:D,makeRectDragger:I,makeZoombox:z,makeCorners:j,updateZoombox:U,xyCorners:Y,transitionZoombox:H,removeZoombox:V,showDoubleClickNotifier:G,attachWheelEventHandler:q}},42464:function(t,e,r){"use strict";var n=r(33428),i=r(93024),a=r(86476),o=r(93972),s=r(51184).makeDragBox,l=r(33816).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(t,n,o._offset,u._offset,o._length,u._length,"ns","ew");c.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=c,t._fullLayout._hoversubplot=e},c.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,u._offset-l,l,l,"n","w"),s(t,n,o._offset+o._length,u._offset-l,l,l,"n","e"),s(t,n,o._offset-l,u._offset+u._length,l,l,"s","w"),s(t,n,o._offset+o._length,u._offset+u._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===o._mainSubplot){var f=o._mainLinePosition;"top"===o.side&&(f-=l),s(t,n,o._offset+.1*o._length,f,.8*o._length,l,"","ew"),s(t,n,o._offset,f,.1*o._length,l,"","w"),s(t,n,o._offset+.9*o._length,f,.1*o._length,l,"","e")}if(e===u._mainSubplot){var h=u._mainLinePosition;"right"!==u.side&&(h-=l),s(t,n,h,u._offset+.1*u._length,l,.8*u._length,"ns",""),s(t,n,h,u._offset+.9*u._length,l,.1*u._length,"s",""),s(t,n,h,u._offset,l,.1*u._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";o(e._draggers,r)}},36632:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(79811);t.exports=function(t){return function(e,r){var o=e[t];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,u=r._subplots,c=u.xaxis,f=u.yaxis,h=u.cartesian,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),y=a.cleanId(v.yref,"y",!1),m=l.x.test(g),x=l.y.test(y);if(m||x){d||i.pushUnique(r._basePlotModules,s);var b=!1;m&&-1===c.indexOf(g)&&(c.push(g),b=!0),x&&-1===f.indexOf(y)&&(f.push(y),b=!0),b&&m&&x&&h.push(g+y)}}}}}},57952:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(7316),s=r(43616),l=r(84888)._M,u=r(79811),c=r(33816),f=r(9616),h=a.ensureSingle;function 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,y={},m=0;m<r.length;m++){var x=r[m][0].trace.zorder||0;y[x]||(y[x]=[]),y[x].push(r[m])}for(var b=[],_=[],w=Object.keys(y).map(Number).sort(a.sorterAsc),A=0;A<w.length;A++)for(var M=w[A],T=0;T<g.length;T++){var k=(f=g[T]).name,S=i.modules[k].categories;if(S.svg){var E=(f.layerName||k+"layer")+(A?Number(A)+1:""),O=f.plot;d=(h=l(r,O,M))[0],r=h[1],d.length&&b.push({i:p.indexOf(E),zorder:A,className:E,plotMethod:O,cdModule:d}),S.zoomScale&&_.push("."+E)}}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 L=e.plot.selectAll(_.join(",")).selectAll(".trace");e.zoomScalePts=L.selectAll("path.point"),e.zoomScaleTxt=L.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(),y(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function y(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=c.idRegex,e.attrRegex=c.attrRegex,e.attributes=r(26720),e.layoutAttributes=r(94724),e.supplyLayoutDefaults=r(67352),e.transitionAxes=r(73736),e.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,f=o.cartesian,h=f.concat(o.gl2d||[]),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"),m=e._has&&e._has("cartesian");if(v&&!m)g(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(c.cartesian)for(a=0;a<c.cartesian.length;a++){var x=c.cartesian[a];if(!l[x]){var b="."+x+",."+x+"-x,."+x+"-y";n._cartesianlayer.selectAll(b).remove(),y(x,n)}}},e.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,u=l.length,c=[],f=[];for(e=0;e<u;e++){n=l[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var h=a._mainAxis,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),y=new Array(u);for(e=0;e<u;e++){n=g[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var m=[n,a.layer,o.layer,a.overlaying||"",o.overlaying||""];for(r=0;r<i.overlays.length;r++)m.push(i.overlays[r].id);y[e]=m}return y}(t),i=e._cartesianlayer.selectAll(".subplot").data(r,String);i.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),i.order(),i.exit().call(g,e),i.each((function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),v(t,a),a.draglayer=h(e._draggers,"g",i)}))},e.rangePlot=function(t,e,r){v(t,e),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(42464).updateFx},94724:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(98192).u,o=r(92880).extendFlat,s=r(31780).templatedArray,l=r(29736).descriptionWithDates,u=r(39032).ONEDAY,c=r(33816),f=c.HOUR_PATTERN,h=c.WEEKDAY_PATTERN,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"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},m={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function b(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=5),e}function _(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks"},A={valType:"color",dflt:i.lightLine,editType:"ticks"};function M(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var T=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:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:m,ticktext:{valType:"data_array",editType:"ticks"},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:b(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},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:A,gridwidth:M(),griddash:T,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:y,tickvals:m,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:A,gridwidth:M("minor"),griddash:T,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"})}}},67352:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover,o=r(41008),s=r(31780),l=r(64859),u=r(94724),c=r(14944),f=r(28336),h=r(71888),d=r(37668),p=r(79811),v=p.id2name,g=p.name2id,y=r(33816).AX_ID_PATTERN,m=r(24040),x=m.traceIs,b=m.getComponentMethod;function _(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var m,w,A=e.autotypenumbers,M={},T={},k={},S={},E={},O={},C={},L={},R={},D={};for(m=0;m<r.length;m++){var I=r[m];if(x(I,"cartesian")||x(I,"gl2d")){var P,F;if(I.xaxis)P=v(I.xaxis),_(M,P,I);else if(I.xaxes)for(w=0;w<I.xaxes.length;w++)_(M,v(I.xaxes[w]),I);if(I.yaxis)F=v(I.yaxis),_(M,F,I);else if(I.yaxes)for(w=0;w<I.yaxes.length;w++)_(M,v(I.yaxes[w]),I);"funnel"===I.type?"h"===I.orientation?(P&&(T[P]=!0),F&&(C[F]=!0)):F&&(k[F]=!0):"image"===I.type?(F&&(L[F]=!0),P&&(L[P]=!0)):(F&&(E[F]=!0,O[F]=!0),x(I,"carpet")&&("carpet"!==I.type||I._cheater)||P&&(S[P]=!0)),"carpet"===I.type&&I._cheater&&P&&(T[P]=!0),x(I,"2dMap")&&(R[P]=!0,R[F]=!0),x(I,"oriented")&&(D["h"===I.orientation?F:P]=!0)}}var N=e._subplots,B=N.xaxis,z=N.yaxis,j=n.simpleMap(B,v),U=n.simpleMap(z,v),H=j.concat(U),V=i.background;B.length&&z.length&&(V=n.coerce(t,e,l,"plot_bgcolor"));var G,Y,W,q,X,Z=i.combine(V,e.paper_bgcolor);function J(){var t=M[G]||[];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=G,X._id=Y}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?z:B}function tt(e,r){for(var n="x"===e?j:U,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(g(o))}return i}var et={x:$("x"),y:$("y")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=q.matches;y.test(t)&&-1===rt.indexOf(t)&&(nt[t]=q.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(m=0;m<H.length;m++){G=H[m],Y=g(G),W=G.charAt(0),n.isPlainObject(t[G])||(t[G]={}),q=t[G],X=s.newContainer(e,G,W+"axis"),J();var lt="x"===W&&!S[G]&&T[G]||"y"===W&&!E[G]&&k[G],ut="y"===W&&(!O[G]&&C[G]||L[G]),ct={hasMinor:!0,letter:W,font:e.font,outerTicks:R[G],showGrid:!D[G],data:M[G]||[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:A,splomStash:((e._splomAxes||{})[W]||{})[Y],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 yt=v(q.overlaying),mt=[0,1];if(void 0!==e[yt]){var xt=v(e[yt].anchor);void 0!==e[xt]&&(mt=e[xt].domain)}d(q,X,K,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,G),grid:e.grid,overlayingDomain:mt}),K("title.standoff"),at(),X._input=q}for(m=0;m<it.length;){Y=it[m++],W=(G=v(Y)).charAt(0),n.isPlainObject(t[G])||(t[G]={}),q=t[G],X=s.newContainer(e,G,W+"axis"),J();var bt={letter:W,font:e.font,outerTicks:R[G],showGrid:!D[G],data:[],bgColor:Z,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:A,splomStash:((e._splomAxes||{})[W]||{})[Y]};K("uirevision",e.uirevision),X.type=nt[Y]||"linear",f(q,X,K,bt,e),d(q,X,K,{letter:W,counterAxes:et[W],overlayableAxes:tt(W,G),grid:e.grid}),K("fixedrange"),at(),X._input=q}var _t=b("rangeslider","handleDefaults"),wt=b("rangeselector","handleDefaults");for(m=0;m<j.length;m++)G=j[m],q=t[G],X=e[G],_t(t,e,G),"date"===X.type&&wt(q,X,e,U,X.calendar),K("fixedrange");for(m=0;m<U.length;m++){G=U[m],q=t[G],X=e[G];var At=e[v(X.anchor)];K("fixedrange",b("rangeslider","isVisible")(At))}h.handleDefaults(t,e,{axIds:rt.concat(it).sort(p.idSort),axHasImage:L})}},42136:function(t,e,r){"use strict";var n=r(49760).mix,i=r(22548),a=r(3400);t.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var u=l("linecolor",s),c=l("linewidth");r("showline",o.showLine||!!u||!!c)||(delete e.linecolor,delete e.linewidth);var f=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),h=l("gridwidth"),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 y=l("zerolinecolor",s),m=l("zerolinewidth");r("zeroline",o.showGrid||!!y||!!m)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},37668:function(t,e,r){"use strict";var n=r(38248),i=r(3400);t.exports=function(t,e,r,a){var o,s,l,u,c,f,h=a.counterAxes||[],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 y=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(h),dflt:o}},"anchor"),m=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===y&&("y"===p&&(r("autoshift")&&(u="left"===m?g[0]:g[1],f=!e.automargin||e.automargin,c="left"===m?-3:3),r("shift",c)),r("position",u)),r("automargin",f);var x=!1;if(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}},42568:function(t,e,r){"use strict";var n=r(85024);t.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},96312:function(t,e,r){"use strict";var n=r(76808);t.exports=function(t,e,r,i){var a=e._template||{},o=e.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var u,c=e.getAutorangeDflt(l,i),f=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==f&&!0!==f)&&(null===l[0]||"min"!==f&&"max reversed"!==f)&&(null===l[1]||"max"!==f&&"min reversed"!==f)||(l=void 0,delete e.range,e.autorange=!0,u=!0),u||(f=r("autorange",c=e.getAutorangeDflt(l,i))),f&&(n(r,f,l),"linear"!==o&&"-"!==o||r("rangemode")),e.cleanRange()}},21160:function(t,e,r){"use strict";var n=r(84284).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},78344:function(t,e,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(3400),o=a.numberFormat,s=r(38248),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,d=r(39032),p=d.FP_SAFE,v=d.BADNUM,g=d.LOG_CLIP,y=d.ONEWEEK,m=d.ONEDAY,x=d.ONEHOUR,b=d.ONEMIN,_=d.ONESEC,w=r(79811),A=r(33816),M=A.HOUR_PATTERN,T=A.WEEKDAY_PATTERN;function k(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",d=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return v}function O(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 L(e){return t._categories[Math.round(e)]}function R(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return v}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function P(t){return s(t)?+t:D(t)}function F(t,e,r){return n.round(r+e*t,2)}function N(t,e,r){return(t-r)/e}var B=function(e){return s(e)?F(e,t._m,t._b):v},z=function(e){return N(e,t._m,t._b)};if(t.rangebreaks){var j="y"===d;B=function(e){if(!s(e))return v;var r=t._rangebreaks.length;if(!r)return F(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)?F(e,t._m2,f):0},z=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?E:f,t.l2c="log"===t.type?k:f,t.l2p=B,t.p2l=z,t.c2p="log"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c="log"===t.type?function(t){return k(z(t))}:z,-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=z,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return k(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=k,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return k(z(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=z,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=O,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(O(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(z(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=L,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=P(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=P,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(z(t))},t.r2p=t.d2p,t.p2r=z,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=L,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=f,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(z(t))},t.r2p=t.d2p,t.p2r=z,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],y=v._length||a.minRowLength(g);if(h(g[0])&&h(g[1]))for(o=0;o<y;o++){var m=g[0][o],x=g[1][o];S(m)&&S(x)&&(p.push([m,x]),m in f[0][1]||(f[0][1][m]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(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?A.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||A.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],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=B(l.min),l.pmax=B(l.max)}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.maskBreaks=function(e){var r,n,i,o,s,u=t.rangebreaks||[];u._cachedPatterns||(u._cachedPatterns=u.map((function(e){return e.enabled&&e.bounds?a.simpleMap(e.bounds,e.pattern?l:t.d2c):null}))),u._cachedValues||(u._cachedValues=u.map((function(e){return e.enabled&&e.values?a.simpleMap(e.values,t.d2c).sort(a.sorterAsc):null})));for(var c=0;c<u.length;c++){var f=u[c];if(f.enabled)if(f.bounds){var h=f.pattern;switch(n=(r=u._cachedPatterns[c])[0],i=r[1],h){case T:o=(s=new Date(e)).getUTCDay(),n>i&&(i+=7,o<n&&(o+=7));break;case M: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===T&&e.pattern===M?-1:e.pattern===T&&t.pattern===M?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 T:g=y,v=(s-o+(s<o?7:0))*m,d+=o*m-(w.getUTCDay()*m+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case M:g=m,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 A=d;A<p;A+=g)f(A,A+v)}else for(var k=a.simpleMap(h.values,t.d2c),S=0;S<k.length;S++)f(o=k[S],s=o+h.dvalue)}return u.sort((function(t,e){return t.min-e.min})),u},t.makeCalcdata=function(e,r,n){var i,o,s,l,u=t.type,c="date"===u&&e[r+"calendar"];if(r in e){if(i=e[r],l=e._length||a.minRowLength(i),a.isTypedArray(i)&&("linear"===u||"log"===u)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if("multicategory"===u)return function(t,e){for(var r=new Array(e),n=0;n<e;n++){var i=(t[0]||[])[n],a=(t[1]||[])[n];r[n]=D([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}},85024:function(t){"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},95936:function(t,e,r){"use strict";var n=r(3400),i=r(76308).contrast,a=r(94724),o=r(85024),s=r(51272);function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,u,c){c||(c={});var f=r("labelalias");n.isPlainObject(f)||delete e.labelalias;var h=o(t);if(r("showticklabels")){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 y=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||y||"date"===u||(r("showexponent",h),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},25404:function(t,e,r){"use strict";var n=r(3400),i=r(94724);t.exports=function(t,e,r,a){var o=a.isMinor,s=o?t.minor||{}:t,l=o?e.minor:e,u=o?i.minor:i,c=o?"minor.":"",f=n.coerce2(s,l,u,"ticklen",o?.6*(e.ticklen||5):void 0),h=n.coerce2(s,l,u,"tickwidth",o?e.tickwidth||1:void 0),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)}},26332:function(t,e,r){"use strict";var n=r(98728),i=r(3400).isArrayOrTypedArray,a=r(38116).isTypedArraySpec,o=r(38116).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var u=l.isMinor,c=u?t.minor||{}:t,f=u?e.minor:e,h=u?"minor.":"";function 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"),y=r(h+"tickmode",i(g)?"array":v?"linear":"auto");if("auto"===y||"sync"===y)r(h+"nticks");else if("linear"===y){var m=f.dtick=n.dtick(v,s);f.tick0=n.tick0(p,s,e.calendar,m)}else"multicategory"!==s&&(void 0===r(h+"tickvals")?f.tickmode="auto":u||r("ticktext"))}},73736:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=r(43616),s=r(54460);t.exports=function(t,e,r,l){var u=t._fullLayout;if(0!==e.length){var c,f,h,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],y=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*y/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 m=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=m[1]-m[0],_=x[1]-x[0];d[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*c,d[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(m[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(m[1]*(1-r)+r*x[1])}else 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,A=h?c/d[3]:1,M=f?d[0]:0,T=h?d[1]:0,k=f?d[0]/d[2]*u:0,S=h?d[1]/d[3]*c:0,E=i._offset-k,O=l._offset-S;n.clipRect.call(o.setTranslate,M,T).call(o.setScale,1/w,1/A),n.plot.call(o.setTranslate,E,O).call(o.setScale,w,A),o.setPointGroupScale(n.zoomScalePts,1/w,1/A),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/A)}s.redrawComponents(t)}},14944:function(t,e,r){"use strict";var n=r(24040).traceIs,i=r(52976);function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var 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)}},62460:function(t,e,r){"use strict";var n=r(24040),i=r(3400);function a(t,e,r){var n,a,o,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if("string"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},"string"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u<l;u++)a[u]=r?r[u]:u}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var c=o;o=[];for(var f=0;f<a.length;f++)o[f]=c}o.length=Math.min(a.length,o.length)}s.push({type:"data",prop:e,traces:a,value:o})}),"",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if("_"!==a[0]){var s=r+(n>0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f<c.length;f++)t._internalOn(c[f],s.check);s.remove=function(){for(var e=0;e<c.length;e++)t._removeInternalListener(c[e],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},r&&(r._commandObserver=s),s},e.hasSimpleAPICommandBindings=function(t,r,n){var i,a,o=r.length;for(i=0;i<o;i++){var s,l=r[i],u=l.method,c=l.args;if(Array.isArray(c)||(c=[]),!u)return!1;var f=e.computeAPICommandBindings(t,u,c);if(1!==f.length)return!1;if(a){if((s=f[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var h=0;h<a.traces.length;h++)if(a.traces[h]!==s.traces[h])return!1}else if(s.prop!==a.prop)return!1}else a=f[0],Array.isArray(a.traces)&&a.traces.sort();var 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}},86968:function(t,e,r){"use strict";var n=r(92880).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:t.editType},i.column={valType:"integer",min:0,dflt:0,editType:t.editType}),i},e.Q=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var u=r("domain.x",i),c=r("domain.y",a);u[0]<u[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=a.slice())}},25376:function(t){"use strict";t.exports=function(t){var e=t.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}},16672:function(t){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},84888:function(t,e,r){"use strict";var n=r(24040),i=r(33816).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}},2428:function(t,e,r){"use strict";var n=r(62644),i=r(97264),a=r(29128),o=r(33816),s=r(89184);function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}t.exports=function(t){var e=t.mouseContainer,r=t.glplot,u=new l(e,r);function c(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function f(e,n,i){var a,s,l=t.calcDataBox(),f=r.viewBox,h=u.lastPos[0],d=u.lastPos[1],p=o.MINDRAG*r.pixelRatio,v=o.MINZOOM*r.pixelRatio;function g(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,u.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=f[3]-f[1]-i,t.fullLayout.dragmode){case"zoom":if(e){var y=n/(f[2]-f[0])*(l[2]-l[0])+l[0],m=i/(f[3]-f[1])*(l[3]-l[1])+l[1];u.boxInited||(u.boxStart[0]=y,u.boxStart[1]=m,u.dragStart[0]=n,u.dragStart[1]=i),u.boxEnd[0]=y,u.boxEnd[1]=m,u.boxInited=!0,u.boxEnabled||u.boxStart[0]===u.boxEnd[0]&&u.boxStart[1]===u.boxEnd[1]||(u.boxEnabled=!0);var x=Math.abs(u.dragStart[0]-n)<v,b=Math.abs(u.dragStart[1]-i)<v;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&b)x&&(u.boxEnd[0]=u.boxStart[0]),b&&(u.boxEnd[1]=u.boxStart[1]);else{a=u.boxEnd[0]-u.boxStart[0],s=u.boxEnd[1]-u.boxStart[1];var _=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*_)>Math.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]<l[1]?(u.boxEnd[1]=l[1],u.boxEnd[0]=u.boxStart[0]+(l[1]-u.boxStart[1])/Math.abs(_)):u.boxEnd[1]>l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]<l[0]?(u.boxEnd[0]=l[0],u.boxEnd[1]=u.boxStart[1]+(l[0]-u.boxStart[0])*Math.abs(_)):u.boxEnd[0]>l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(g(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,e?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n)<p&&(n=u.dragStart[0]),Math.abs(u.dragStart[1]-i)<p&&(i=u.dragStart[1]),a=(h-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(d-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),u.panning=!0,u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations()):u.panning&&(u.panning=!1,t.relayoutCallback())}u.lastPos[0]=n,u.lastPos[1]=i}return u.mouseListener=n(e,f),e.addEventListener("touchstart",(function(t){var r=a(t.changedTouches[0],e);f(0,r[0],r[1]),f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchmove",(function(t){t.preventDefault();var r=a(t.changedTouches[0],e);f(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchend",(function(t){f(0,u.lastPos[0],u.lastPos[1]),t.preventDefault()}),!!s&&{passive:!1}),u.wheelListener=i(e,(function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=u.lastPos[0],s=u.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),f=o/(a[2]-a[0])*(i[2]-i[0])+i[0],h=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-f)*l+f,i[2]=(i[2]-f)*l+f,i[1]=(i[1]-h)*l+h,i[3]=(i[3]-h)*l+h,t.setRanges(i),u.lastInputTime=Date.now(),c(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),!0),u}},92568:function(t,e,r){"use strict";var n=r(54460),i=r(43080);function a(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var o=a.prototype,s=["xaxis","yaxis"];o.merge=function(t){var e,r,n,a,o,l,u,c,f,h,d;for(this.titleEnable=!1,this.backgroundColor=i(t.plot_bgcolor),h=0;h<2;++h){var p=(e=s[h]).charAt(0);for(n=(r=t[this.scene[e]._name]).title.text===this.scene.fullLayout._dfltTitle[p]?"":r.title.text,d=0;d<=2;d+=2)this.labelEnable[h+d]=!1,this.labels[h+d]=n,this.labelColor[h+d]=i(r.title.font.color),this.labelFont[h+d]=r.title.font.family,this.labelSize[h+d]=r.title.font.size,this.labelPad[h+d]=this.getLabelPad(e,r),this.tickEnable[h+d]=!1,this.tickColor[h+d]=i((r.tickfont||{}).color),this.tickAngle[h+d]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[h+d]=this.getTickPad(r),this.tickMarkLength[h+d]=0,this.tickMarkWidth[h+d]=r.tickwidth||0,this.tickMarkColor[h+d]=i(r.tickcolor),this.borderLineEnable[h+d]=!1,this.borderLineColor[h+d]=i(r.linecolor),this.borderLineWidth[h+d]=r.linewidth||0;u=this.hasSharedAxis(r),o=this.hasAxisInDfltPos(e,r)&&!u,l=this.hasAxisInAltrPos(e,r)&&!u,a=r.mirror||!1,c=u?-1!==String(a).indexOf("all"):!!a,f=u?"allticks"===a:-1!==String(a).indexOf("ticks"),o?this.labelEnable[h]=!0:l&&(this.labelEnable[h+2]=!0),o?this.tickEnable[h]=r.showticklabels:l&&(this.tickEnable[h+2]=r.showticklabels),(o||c)&&(this.borderLineEnable[h]=r.showline),(l||c)&&(this.borderLineEnable[h+2]=r.showline),(o||f)&&(this.tickMarkLength[h]=this.getTickMarkLength(r)),(l||f)&&(this.tickMarkLength[h+2]=this.getTickMarkLength(r)),this.gridLineEnable[h]=r.showgrid,this.gridLineColor[h]=i(r.gridcolor),this.gridLineWidth[h]=r.gridwidth,this.zeroLineEnable[h]=r.zeroline,this.zeroLineColor[h]=i(r.zerolinecolor),this.zeroLineWidth[h]=r.zerolinewidth}},o.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},o.hasAxisInDfltPos=function(t,e){var r=e.side;return"xaxis"===t?"bottom"===r:"yaxis"===t?"left"===r:void 0},o.hasAxisInAltrPos=function(t,e){var r=e.side;return"xaxis"===t?"top"===r:"yaxis"===t?"right"===r:void 0},o.getLabelPad=function(t,e){var r=1.5,n=e.title.font.size,i=e.showticklabels;return"xaxis"===t?"top"===e.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:"yaxis"===t?"right"===e.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},o.getTickPad=function(t){return"outside"===t.ticks?10+t.ticklen:15},o.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return"inside"===t.ticks?-e:e},t.exports=function(t){return new a(t)}},39952:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(17188),a=r(64859),o=r(9616),s=r(33816),l=r(57952),u=r(65460),c=r(84888).op;e.name="gl2d",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=s.idRegex,e.attrRegex=s.attrRegex,e.attributes=r(26720),e.supplyLayoutDefaults=function(t,e,r){e._has("cartesian")||l.supplyLayoutDefaults(t,e,r)},e.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),e.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:u.hoverlabel},"plot","nested"),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=c(r,"gl2d",o),u=s._scene2d;void 0===u&&(u=new i({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=u),u.plot(l,t.calcdata,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];s._scene2d&&0===c(t,"gl2d",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},e.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage("png");e._glimages.append("svg:image").attr({xmlns:o.svg,"xlink:href":a,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),i.destroy()}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++)e._plots[r[n]]._scene2d.updateFx(e.dragmode)}},17188:function(t,e,r){"use strict";var n,i,a=r(24040),o=r(54460),s=r(93024),l=r(67792).gl_plot2d,u=r(67792).gl_spikes2d,c=r(67792).gl_select_box,f=r(5408),h=r(92568),d=r(2428),p=r(16576),v=r(71888),g=v.enforce,y=v.clean,m=r(19280).doAutoRange,x=r(72760),b=x.drawMode,_=x.selectMode,w=["xaxis","yaxis"],A=r(33816).SUBPLOT_PATTERN;function M(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=h(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=d(this),this.traces={},this.spikes=u(this.glplot),this.selectBox=c(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}t.exports=M;var T=M.prototype;T.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement("canvas"),i=f({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(".gl-canvas-focus"),e=f({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return p(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style["pointer-events"]="none",this.updateSize(r);var a=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none";var o=this.mouseContainer=document.createElement("div");o.style.position="absolute",o.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),o.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},T.toImage=function(t){t||(t="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var u=0;u<4;++u){var c=a[4*(r*o+l)+u];a[4*(r*o+l)+u]=a[4*(r*s+l)+u],a[4*(r*s+l)+u]=c}var f=document.createElement("canvas");f.width=r,f.height=i;var h,d=f.getContext("2d",{willReadFrequently:!0}),p=d.createImageData(r,i);switch(p.data.set(a),d.putImageData(p,0,0),t){case"jpeg":h=f.toDataURL("image/jpeg");break;case"webp":h=f.toDataURL("image/webp");break;default:h=f.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(n),h},T.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},T.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=t[e][r].text+"";return t},T.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(A),r="xaxis"+e[1],n="yaxis"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},T.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout,i={},o=i[e._name+".range"]=e.range.slice(),s=i[r._name+".range"]=r.range.slice();i[e._name+".autorange"]=e.autorange,i[r._name+".autorange"]=r.autorange,a.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i);var l=n[e._name];l.range=o,l.autorange=e.autorange;var u=n[r._name];u.range=s,u.autorange=r.autorange,i.lastInputTime=this.camera.lastInputTime,t.emit("plotly_relayout",i)},T.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},T.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod("annotations","drawOne")(t,r)}},T.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map((function(e){t[e].dispose(),delete t[e]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},T.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:r._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:r._size}};y(s,this.xaxis),y(s,this.yaxis);var l,u,c=r._size,f=this.xaxis.domain,h=this.yaxis.domain;for(o.viewBox=[c.l+f[0]*c.w,c.b+h[0]*c.h,i-c.r-(1-f[1])*c.w,a-c.t-(1-h[1])*c.h],this.mouseContainer.style.width=c.w*(f[1]-f[0])+"px",this.mouseContainer.style.height=c.h*(h[1]-h[0])+"px",this.mouseContainer.height=c.h*(h[1]-h[0]),this.mouseContainer.style.left=c.l+f[0]*c.w+"px",this.mouseContainer.style.top=c.t+(1-h[1])*c.h+"px",u=0;u<2;++u)(l=this[w[u]])._length=o.viewBox[u+2]-o.viewBox[u],m(this.graphDiv,l),l.setScale();g(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},T.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},T.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},T.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],u=this.traces[i.uid];u?u.update(i,l):(u=i._module.plot(this,i,l),this.traces[i.uid]=u)}this.glplot.objects.sort((function(t,e){return t._trace.index-e._trace.index}))},T.updateFx=function(t){_(t)||b(t)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor="pan"===t?"move":"zoom"===t?"crosshair":null},T.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},T.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&"zoom"===i.dragmode){this.selectBox.enabled=!0;for(var u=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],c=0;c<2;c++)e.boxStart[c]===e.boxEnd[c]&&(u[c]=t.dataBox[c],u[c+2]=t.dataBox[c+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var f=i._size,h=this.xaxis.domain,d=this.yaxis.domain,p=(a=t.pick(o/t.pixelRatio+f.l+h[0]*f.w,l/t.pixelRatio-(f.t+(1-d[1])*f.h)))&&a.object._trace.handlePick(a);if(p&&n&&this.emitPointAction(p,"plotly_click"),a&&"skip"!==a.object._trace.hoverinfo&&i.hovermode&&p&&(!this.lastPickResult||this.lastPickResult.traceUid!==p.trace.uid||this.lastPickResult.dataCoord[0]!==p.dataCoord[0]||this.lastPickResult.dataCoord[1]!==p.dataCoord[1])){var v=p;this.lastPickResult={traceUid:p.trace?p.trace.uid:null,dataCoord:p.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),v.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(p,"plotly_hover");var g=this.fullData[v.trace.index]||{},y=v.pointIndex,m=s.castHoverinfo(g,i,y);if(m&&"all"!==m){var x=m.split("+");-1===x.indexOf("x")&&(v.traceCoord[0]=void 0),-1===x.indexOf("y")&&(v.traceCoord[1]=void 0),-1===x.indexOf("z")&&(v.traceCoord[2]=void 0),-1===x.indexOf("text")&&(v.textLabel=void 0),-1===x.indexOf("name")&&(v.name=void 0)}s.loneHover({x:v.screenCoord[0],y:v.screenCoord[1],xLabel:this.hoverFormatter("xaxis",v.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",v.traceCoord[1]),zLabel:v.traceCoord[2],text:v.textLabel,name:v.name,color:s.castHoverOption(g,y,"bgcolor")||v.color,borderColor:s.castHoverOption(g,y,"bordercolor"),fontFamily:s.castHoverOption(g,y,"font.family"),fontSize:s.castHoverOption(g,y,"font.size"),fontColor:s.castHoverOption(g,y,"font.color"),nameLength:s.castHoverOption(g,y,"namelength"),textAlign:s.castHoverOption(g,y,"align")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},T.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),s.loneUnhover(this.svgContainer))},T.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),"hover").text}}},94424:function(t){"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},64859:function(t,e,r){"use strict";var n=r(25376),i=r(85656),a=r(22548),o=r(92872),s=r(34200),l=r(66741),u=r(92880).extendFlat,c=n({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),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"})}}},66741:function(t){"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},7316:function(t,e,r){"use strict";var n=r(33428),i=r(94336).m_,a=r(57624).SO,o=r(38248),s=r(83160),l=r(24040),u=r(73060),c=r(31780),f=r(3400),h=r(76308),d=r(39032).BADNUM,p=r(79811),v=r(1936).clearOutline,g=r(55308),y=r(85656),m=r(16672),x=r(84888)._M,b=f.relinkPrivateKeys,_=f._,w=t.exports={};f.extendFlat(w,l),w.attributes=r(45464),w.attributes.type.values=w.allTypes,w.fontAttrs=r(25376),w.layoutAttributes=r(64859),w.fontWeight="normal";var A=w.transformsRegistry,M=r(62460);w.executeAPICommand=M.executeAPICommand,w.computeAPICommandBindings=M.computeAPICommandBindings,w.manageCommandObserver=M.manageCommandObserver,w.hasSimpleAPICommandBindings=M.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 T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=t._context.locales,u=0;u<2;u++){var c=(s[r]||{}).format;if(c&&(a(c),n))break;s=l.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||a(l.localeRegistry.en.format),i}function E(t,e){var r={_fullLayout:e},n="x"===t._id.charAt(0),i=t._mainAxis._anchorAxis,a="",o="",s="";if(i&&(s=i._mainAxis._id,a=n?t._id+s:s+t._id),!a||!e._plots[a]){a="";for(var l=t._counterAxes,u=0;u<l.length;u++){var c=l[u],f=n?t._id+c:c+t._id;o||(o=f);var h=p.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}function O(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||A[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=A[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function L(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 y=S(t,T);if(s._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var m=n.width,x=n.height;w.supplyLayoutGlobalDefaults(u,s,y),u.width||(s.width=m),u.height||(s.height=x),w.sanitizeMargins(s)}else{w.supplyLayoutGlobalDefaults(u,s,y);var A=!u.width||!u.height,M=s.autosize,E=g.autosizable;A&&(M||E)?w.plotAutoSize(t,u,s):A&&w.sanitizeMargins(s),!M&&A&&(u.width=s.width,u.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return e},timeFormat:i(t).utcFormat}}(y,s.separators),s._extraFormat=S(t,k),s._initialAutoSizeIsDone=!0,s._dataLength=d.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var O=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:{}},L=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 D=Object.keys(C.x),I=Object.keys(C.y);if(D.length>1&&I.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o<D.length;o++)f.pushUnique(O.xaxis,D[o]);for(o=0;o<I.length;o++)f.pushUnique(O.yaxis,I[o]);for(var P in L)f.pushUnique(O.cartesian,P)}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 F=s._visibleModules,N=[];for(o=0;o<F.length;o++){var B=F[o].crossTraceDefaults;B&&f.pushUnique(N,B)}for(o=0;o<N.length;o++)N[o](h,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&D.length>15&&I.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(h,s,c,n),w.cleanPlot(h,s,c,n);var z=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||z,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,G=s._tracePreGUI,Y={};for(V in G)Y[V]="old";for(o=0;o<h.length;o++)Y[V=h[o]._fullInput.uid]||(G[V]={}),Y[V]="new";for(V in Y)"old"===Y[V]&&delete G[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],y=p.getFromId(c,v,"x"),m=p.getFromId(c,v,"y");for(g?d=s[v]=g:(d=s[v]={}).id=v,y._counterAxes.push(m._id),m._counterAxes.push(y._id),y._subplotsWith.push(v),m._subplotsWith.push(v),d.xaxis=y,d.yaxis=m,d._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===d.xaxis._id&&x.yaxis===d.yaxis._id&&!1===x.cliponaxis){d._hasClipOnAxisFalse=!0;break}}}var b,_=p.list(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=E(b,e),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||l.getComponentMethod("rangeslider","isVisible")(b))){var A=1,M=0;for(a=0;a<b._counterAxes.length;a++){var T=p.getFromId(c,b._counterAxes[a]);A=Math.min(A,T.domain[0]),M=Math.max(M,T.domain[1])}A<M&&(b._counterDomainMin=A,b._counterDomainMax=M)}},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={},y=[],m=(r.template||{}).data||{},x=c.traceTemplater(m);for(i=0;i<t.length;i++){if(o=t[i],(a=x.newTrace(o)).uid=n._traceUids[i],w.supplyTraceDefaults(o,a,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,A=C(a,e,r,n),M=0;M<A.length;M++){var T=A[M],k={_template:a._template,type:a.type,uid:a.uid+M};_&&!1===T.visible&&delete T.visible,w.supplyTraceDefaults(T,k,d,n,i),b(k,T),k.index=i,k._input=o,k._fullInput=a,k._expandedIndex=d,k._expandedInput=T,v(k)}else a._fullInput=a,a._expandedInput=a,v(a);l.traceIs(a,"carpetAxis")&&(g[a.carpet]=a),l.traceIs(a,"carpetDependent")&&y.push(i)}for(i=0;i<y.length;i++)if((a=e[y[i]]).visible){var S=g[a.carpet];a._carpet=S,S&&S.visible?(a.xaxis=S.xaxis,a.yaxis=S.yaxis):a.visible=!1}},w.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return f.coerce(t||{},r,y,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=w.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=w.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=w.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=w.supplyAnimationTransitionDefaults(t.transition||{});return r},w.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,y.frame,r,n)}return r("duration"),r("redraw"),e},w.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return f.coerce(t||{},e,y.transition,r,n)}return r("duration"),r("easing"),e},w.supplyFrameDefaults=function(t){var e={};function r(r,n){return f.coerce(t,e,m,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},w.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||h.defaults,s=o[r%o.length];function u(r,n){return f.coerce(t,e,w.attributes,r,n)}var c=u("visible");u("type"),u("name",n._traceWord+" "+i),u("uirevision",n.uirevision);var d=w.getModule(e);if(e._module=d,d){var p=d.basePlotModule,v=p.attr,g=p.attributes;if(v&&g){var y=n._subplots,m="";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);y[x]&&f.pushUnique(y[x],b),m+=b}else m=f.coerce(t,e,g,v);y[p.name]&&f.pushUnique(y[p.name],m)}}}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=O,w.supplyTransformDefaults=function(t,e,r){if(e._length||O(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=A[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=L(u.width)||L(u.maxWidth)||r.width,i=L(u.height)||L(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 y=(r.l+r.r)/h;y>1&&(r.l/=y,r.r/=y)}if(d){var m=(r.t+r.b)/d;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,A=void 0!==r.yb?r.yb:r.y;p[e]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:A,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,y=e._pushmarginIds,m=e.minreducedwidth,x=e.minreducedheight;if(!1!==a.autoexpand){for(var b in g)y[b]||delete g[b];var _=t._fullLayout._reservedMargin;for(var A in _)for(var M in _[A]){var T=_[A][M];s[M]=Math.max(s[M],T)}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 S=0;for(var E in g)"base"!==E&&o(g[E][k].size)&&(S=g[E][k].size>S?g[E][k].size:S);var O=Math.max(0,a[k]-S);s[k]=Math.max(0,s[k]-O)}for(var C in g){var L=g[C].l||{},D=g[C].b||{},I=L.val,P=L.size,F=D.val,N=D.size,B=r-s.r-s.l,z=n-s.t-s.b;for(var j in g){if(o(P)&&g[j].r){var U=g[j].r.val,H=g[j].r.size;if(U>I){var V=(P*U+(H-B)*I)/(U-I),G=(H*(1-I)+(P-B)*(1-U))/(U-I);V+G>c+h&&(c=V,h=G)}}if(o(N)&&g[j].t){var Y=g[j].t.val,W=g[j].t.size;if(Y>F){var q=(N*Y+(W-z)*F)/(Y-F),X=(W*(1-F)+(N-z)*(1-Y))/(Y-F);q+X>v+d&&(v=q,d=X)}}}}}var Z=f.constrain(r-a.l-a.r,2,m),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(y).length);if(e._redrawFromAutoMarginCount<et)return l.call("_doPlot",t);e._size=u,f.warn("Too many auto-margin redraws.")}!function(t){var e=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 D=["l","r","t","b","p","w","h"];function I(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<D.length;r++){var n=D[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 y=t._fullLayout._plots;for(var m in y){var x=y[m],b=x.xaxis,_=x.yaxis,A=b.range.slice(),M=_.range.slice(),T=null,k=null,S=null,E=null;Array.isArray(g[b._name+".range"])?T=g[b._name+".range"].slice():Array.isArray((g[b._name]||{}).range)&&(T=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()),A&&T&&(b.r2l(A[0])!==b.r2l(T[0])||b.r2l(A[1])!==b.r2l(T[1]))&&(S={xr0:A,xr1:T}),M&&k&&(_.r2l(M[0])!==_.r2l(k[0])||_.r2l(M[1])!==_.r2l(k[1]))&&(E={yr0:M,yr1:k}),(S||E)&&l.push(f.extendFlat({plotinfo:x},S,E))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var c in u?((n=f.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var h=s[c];t._fullData[h[0]]._module.basePlotModule.plot(t,h,n,e)}},I(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,y=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])||(y={yr0:d,yr1:v}),(g||y)&&s.push(f.extendFlat({plotinfo:l},g,y))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,u=t._fullLayout._basePlotModules,c=[],h=0;h<l.length;h++)c.push(h);function 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())},I(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 y in c._colorAxes){var m=c[y];!1!==m.cauto&&(delete m.cmin,delete m.cmax)}var x=!1;function b(e){if(r=s[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=A[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(F(o,s,c),i=0;i<s.length;i++)_(i,!0);for(i=0;i<s.length;i++)b(i);for(x&&F(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(P);if(g){var y=g[1],m=g[2],x=v._id.charAt(0),b="x"===x,_=[];for(n=0;n<v._categories.length;n++)_.push([v._categories[n],[]]);for(n=0;n<v._traceIndices.length;n++){var w=v._traceIndices[n],A=e._fullData[w];if(!0===A.visible){var M=A.type;l.traceIs(A,"histogram")&&(delete A._xautoBinFinished,delete A._yautoBinFinished);var T="splom"===M,k="scattergl"===M,S=e.calcdata[w];for(i=0;i<S.length;i++){var E,O,C=S[i];if(T){var L=A._axesDim[v._id];if(!b){var R=A._diag[L][0];R&&(v=e._fullLayout[p.id2name(R)])}var D=C.trace.dimensions[L].values;for(a=0;a<D.length;a++)for(E=v._categoriesMap[D[a]],o=0;o<C.trace.dimensions.length;o++)if(o!==L){var I=C.trace.dimensions[o];_[E][1].push(I.values[a])}}else if(k){for(a=0;a<C.t.x.length;a++)b?(E=C.t.x[a],O=C.t.y[a]):(E=C.t.y[a],O=C.t.x[a]),_[E][1].push(O);C.t&&C.t._scene&&delete C.t._scene.dirty}else if(C.hasOwnProperty("z")){O=C.z;var F=u(A.type,v,O);for(a=0;a<O.length;a++)for(o=0;o<O[a].length;o++)(E=F(o,a))+1&&_[E][1].push(O[a][o])}else for(void 0===(E=C.p)&&(E=C[x]),void 0===(O=C.s)&&(O=C.v),void 0===O&&(O=b?C.y:C.x),Array.isArray(O)||(O=void 0===O?[]:[O]),a=0;a<O.length;a++)_[E][1].push(O[a])}}}v._categoriesValue=_;var N=[];for(n=0;n<_.length;n++)N.push([_[n][0],c[y](_[n][1])]);N.sort("descending"===m?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 P=/(total|sum|min|max|mean|median) (ascending|descending)/;function F(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()}},21776:function(t,e,r){"use strict";var n=r(26880);function i(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]="`"+r[i]+"`";e+="Finally, the template string has access to ",e=1===r.length?e+"variable "+n[0]:e+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return e}n.FORMAT_LINK,n.DATE_FORMAT_LINK,e.Ks=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"none"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.Gw=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"calc"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.ye=function(t,e){return e=e||{},(t=t||{}).newshape,i(e),{valType:"string",dflt:"",editType:t.editType||"arraydraw"}}},24040:function(t,e,r){"use strict";var n=r(24248),i=r(16628),a=r(52416),o=r(63620),s=r(52200).addStyleRule,l=r(92880),u=r(45464),c=r(64859),f=l.extendFlat,h=l.extendDeepAll;function 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 y(t),e.subplotsRegistry[r]=t,e.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l<i.length;l++)o[i[l]]=!0,e.allCategories[i[l]]=!0;for(var u in e.modules[r]={_module:t,categories:o},a&&Object.keys(a).length&&(e.modules[r].meta=a),e.allTypes.push(r),e.componentsRegistry)m(u,r);t.layoutAttributes&&f(e.traceLayoutAttributes,t.layoutAttributes);var c=t.basePlotModule,h=c.name;if("mapbox"===h){var 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),y(t)),e.modules)m(r,n);for(var i in e.subplotsRegistry)b(r,i);for(var o in e.transformsRegistry)x(r,o);t.schema&&t.schema.layout&&h(c,t.schema.layout)}function v(t){if("string"!=typeof t.name)throw new Error("Transform module *name* must be a string.");var r="Transform module "+t.name,i="function"==typeof t.transform,a="function"==typeof t.calcTransform;if(!i&&!a)throw new Error(r+" is missing a *transform* or *calcTransform* method.");for(var s in i&&a&&n.log([r+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(t.attributes)||n.log(r+" registered without an *attributes* object."),"function"!=typeof t.supplyDefaults&&n.log(r+" registered without a *supplyDefaults* method."),e.transformsRegistry[t.name]=t,e.componentsRegistry)x(s,t.name)}function g(t){var r=t.name,n=r.split("-")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=e.localeRegistry,u=l[r];if(u||(l[r]=u={}),n!==r){var c=l[n];c||(l[n]=c={}),o&&c.dictionary===u.dictionary&&(c.dictionary=i),s&&c.format===u.format&&(c.format=a)}o&&(u.dictionary=i),s&&(u.format=a)}function y(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n<r.length;n++)a(e.layoutArrayRegexes,r[n])}}function m(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[r];i&&h(e.modules[r]._module.attributes,i)}}function x(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[r];i&&h(e.transformsRegistry[r].attributes,i)}}function b(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.subplots){var i=e.subplotsRegistry[r],a=i.layoutAttributes,o="subplot"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&h(a,s)}}function _(t){return"object"==typeof t&&(t=t.type),t}e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.transformsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(t){if(e.collectableSubplotTypes=null,!t)throw new Error("No argument passed to Plotly.register.");t&&!Array.isArray(t)&&(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":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)}},91536:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=i.extendFlat,o=i.extendDeep;function s(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}t.exports=function(t,e){var r,i,l=t.data,u=t.layout,c=o([],l),f=o({},u,s(e.tileClass)),h=t._context||{};if(e.width&&(f.width=e.width),e.height&&(f.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){f.annotations=[];var 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 y=f[v[r]];y.xaxis||(y.xaxis={}),y.yaxis||(y.yaxis={}),y.zaxis||(y.zaxis={}),a(y.xaxis,g),a(y.yaxis,g),a(y.zaxis,g),y._scene=null}}var m=document.createElement("div");e.tileClass&&(m.className=e.tileClass);var x={gd:m,td:m,layout:f,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:h.mapboxAccessToken}};return"transparent"!==e.setBackground&&(x.config.setBackground=e.setBackground||"opaque"),x.gd.defaultLayout=s(e.tileClass),x}},39792:function(t,e,r){"use strict";var n=r(3400),i=r(67024),a=r(48616),o=r(81792);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var u=i(t,e),c=e.filename||t.fn||"newplot";c+="."+e.format.replace("-","."),u.then((function(t){return r&&(r._snapshotInProgress=!1),a(t,c,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},48616:function(t,e,r){"use strict";var n=r(3400),i=r(81792);t.exports=function(t,e,r){var a=document.createElement("a"),o="download"in a;return new Promise((function(s,l){var u,c;if(n.isIE())return u=i.createBlob(t,"svg"),window.navigator.msSaveBlob(u,e),u=null,s(e);if(o)return u=i.createBlob(t,r),c=i.createObjectURL(u),a.href=c,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),i.revokeObjectURL(c),u=null,s(e);if(n.isSafari()){var f="svg"===r?",":";base64,";return i.octetStream(f+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},81792:function(t,e,r){"use strict";var n=r(24040);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i<e;i++)n[i]=t.charCodeAt(i);return r}(window.atob(t));return new window.Blob([r],{type:"image/"+e})},e.octetStream=function(t){document.location.href="data:application/octet-stream"+t},e.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,e.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},78904:function(t,e,r){"use strict";var n=r(81792),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(91536),toSVG:r(37164),svgToImg:r(63268),toImage:r(61808),downloadImage:r(39792)};t.exports=i},63268:function(t,e,r){"use strict";var n=r(3400),i=r(61252).EventEmitter,a=r(81792);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,o){var s=window.Image,l=t.svg,u=t.format||"png";if(n.isIE()&&"svg"!==u){var c=new Error(a.MSG_IE_BAD_FORMAT);return o(c),t.promise?r:e.emit("error",c)}var f,h,d=t.canvas,p=t.scale||1,v=t.width||300,g=t.height||150,y=p*v,m=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=y,d.height=m,b.onload=function(){var r;switch(f=null,a.revokeObjectURL(h),"svg"!==u&&x.drawImage(b,0,0,y,m),u){case"jpeg":r=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}},61808:function(t,e,r){"use strict";var n=r(61252).EventEmitter,i=r(24040),a=r(3400),o=r(81792),s=r(91536),l=r(37164),u=r(63268);t.exports=function(t,e){var r=new n,c=s(t,{format:"png"}),f=c.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var h=o.getRedrawFunc(f);return i.call("_doPlot",f,c.data,c.layout,c.config).then(h).then((function(){var t=o.getDelay(f._fullLayout);setTimeout((function(){var t=l(f),n=document.createElement("canvas");n.id=a.randstr(),(r=u({format:e.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){f&&document.body.removeChild(f)}}),t)})).catch((function(t){r.emit("error",t)})),r}},37164:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(76308),s=r(9616),l=/"/g,u="TOBESTRIPPED",c=new RegExp('("'+u+")|("+u+'")',"g");t.exports=function(t,e,r){var f,h=t._fullLayout,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 y=h._basePlotModules||[];for(f=0;f<y.length;f++){var m=y[f];m.toSVG&&m.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"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},84664:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,"tx"),n.mergeArray(e.hovertext,t,"htx");var i=e.marker;if(i){n.mergeArray(i.opacity,t,"mo",!0),n.mergeArray(i.color,t,"mc");var a=i.line;a&&(n.mergeArray(a.color,t,"mlc"),n.mergeArrayCastPositive(a.width,t,"mlw"))}}},96376:function(t,e,r){"use strict";var n=r(38248),i=r(3400).isArrayOrTypedArray,a=r(39032).BADNUM,o=r(24040),s=r(54460),l=r(71888).getAxisGroup,u=r(72592);function c(t,e,r,o,c){if(o.length){var b,_,w,A;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===(A=o[w])[0].trace.offset?_.push(A):b.push(A);_.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});(function(t,e,r,n){for(var i=t._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,c=u.length,f=a.length!==o.length,h=s*(1-n.gap),g=l(i,e._id)+u[0][0].trace.orientation,y=i._alignmentOpts[g]||{},m=0;m<c;m++){var x,b,_=u[m],w=_[0].trace,A=y[w.alignmentgroup]||{},M=Object.keys(A.offsetGroups||{}).length,T=(x=M?h/M:f?h/c:h)*(1-(n.groupgap||0));b=M?((2*w._offsetIndex+1-M)*x-T)/2:f?((2*m+1-c)*x-T)/2:-T/2;var k=_[0].t;k.barwidth=T,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?(y(o),m(r,o,i)):g(r,o)}(t,e,r,_,c),b.length&&f(e,r,b,c);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(A=o[w])[0].trace.base?_.push(A):b.push(A);!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&&m(r,o,i)}(0,e,r,_,c),b.length&&f(e,r,b,c)}!function(t){var e,r,i,a,o,s,l;for(e=0;e<t.length;e++)i=(r=t[e])[0].trace,void 0===(a=r[0].t).cornerradiusvalue&&void 0!==(o=i.marker?i.marker.cornerradius:void 0)&&(s=n(o)?+o:+o.slice(0,-1),l=n(o)?"px":"%",a.cornerradiusvalue=s,a.cornerradiusform=l)}(o),function(t,e){var r,a,o,s=x(e),l={},u=1/0,c=-1/0;for(r=0;r<t.length;r++)for(o=t[r],a=0;a<o.length;a++){var f=o[a].p;n(f)&&(u=Math.min(u,f),c=Math.max(c,f))}var h=1e4/(c-u),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 y=o[0].t.poffset,m=i(y);for(a=0;a<o.length;a++){var b=o[a],_=b[s]-b.w/2;if(n(_)){var w=b[s]+b.w/2,A=d(b.p);l[A]?l[A]=[Math.min(_,l[A][0]),Math.max(w,l[A][1])]:l[A]=[_,w]}if(b.p0=b.p+(m?y[a]:y),b.p1=b.p0+b.w,b.s0=b.b,b.s1=b.s0+b.s,g){var M=Math.min(b.s0,b.s1)||0,T=Math.max(b.s0,b.s1)||0,k=b[s];p[k]=k in p?Math.min(p[k],M):M,v[k]=k in v?Math.max(v[k],T):T}}}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?(y(o),m(e,o,n)):g(e,o)}}function h(t,e,r){for(var n=e.minDiff,i=e.traces,a=n*(1-r.gap),o=a*(1-(r.groupgap||0)),s=-o/2,l=0;l<i.length;l++){var u=i[l][0].t;u.barwidth=o,u.poffset=s,u.bargroupwidth=a,u.bardelta=n}e.binWidth=i[0][0].t.barwidth/100,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,y=g.poffset,m=g.barwidth,x=i(y),b=i(m);for(f=0;f<h.length;f++){l=h[f];var _=x?y[f]:y,w=b?m[f]:m;c=(u=l.p+_)+w,v.push(u,c)}}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 y(t){for(var e=t.traces,r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var o=n[i];o.s!==a&&t.put(o.p,o.b+o.s)}}function m(t,e,r){var i=e.traces,o=x(t),l="fraction"===r.norm?1:100,u=l/1e9,c=t.l2c(t.c2l(0)),f="stack"===r.mode?l:c;function h(e){return n(t.c2l(e))&&(e<c-u||e>f+u||!n(c))}for(var d=0;d<i.length;d++){for(var p=i[d],v=p[0].trace,g=[],y=!1,m=!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 A=_.b,M=A+_.s;_[o]=M,g.push(M),m=m||h(M),_.hasB&&(g.push(A),m=m||h(A)),_.hasB&&_.b||(y=!0)}}v._extremes[t._id]=s.findExtremes(t,g,{tozero:y,padded:m})}}function x(t){return t._id.charAt(0)}t.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],u=[],f=0;f<a.length;f++){var h=a[f];if(!0===h.visible&&o.traceIs(h,"bar")&&h.xaxis===r._id&&h.yaxis===n._id&&("h"===h.orientation?l.push(s[f]):u.push(s[f]),h._computePh))for(var 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}},72592:function(t,e,r){"use strict";t.exports=i;var n=r(3400).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),a=[],o=0;o<t.length;o++){for(var s=t[o],l=0;l<s.length;l++){var u=s[l],c=u.p;void 0===c&&(c=u[i]),void 0!==c&&a.push(c)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=a;var f=n(a);this.distinctPositions=f.vals,1===f.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(f.minDiff,r);var h=(e.posAxis||{}).type;"category"!==h&&"multicategory"!==h||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},i.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},i.prototype.getLabel=function(t,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?t:Math.round(t/this.binWidth))}},83328:function(t,e,r){"use strict";var n=r(52904),i=r(45464),a=r(25376),o=r(29736).axisHoverFormat,s=r(21776).Ks,l=r(21776).Gw,u=r(49084),c=r(92880).extendFlat;t.exports=c({z:{valType:"data_array",editType:"calc"},x:c({},n.x,{impliedEdits:{xtype:"array"}}),x0:c({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:c({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:c({},n.y,{impliedEdits:{ytype:"array"}}),y0:c({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:c({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:c({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:c({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:c({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:c({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:c({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:c({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:c({},i.showlegend,{dflt:!1}),zorder:n.zorder},{transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},19512:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(54460),o=r(1220),s=r(55480),l=r(47128),u=r(2872),c=r(26136),f=r(70448),h=r(11240),d=r(35744),p=r(39032).BADNUM;function v(t){for(var e=[],r=t.length,n=0;n<r;n++){var i=t[n];i!==p&&e.push(i)}return e}t.exports=function(t,e){var r,g,y,m,x,b,_,w,A,M,T,k=a.getFromId(t,e.xaxis||"x"),S=a.getFromId(t,e.yaxis||"y"),E=n.traceIs(e,"contour"),O=n.traceIs(e,"histogram"),C=n.traceIs(e,"gl2d"),L=E?"best":e.zsmooth;if(k._minDtick=0,S._minDtick=0,O)m=(T=s(t,e)).orig_x,r=T.x,g=T.x0,y=T.dx,w=T.orig_y,x=T.y,b=T.y0,_=T.dy,A=T.z;else{var R=e.z;i.isArray1D(R)?(u(e,k,S,"x","y",["z"]),r=e._x,x=e._y,R=e._z):(m=e.x?k.makeCalcdata(e,"x"):[],w=e.y?S.makeCalcdata(e,"y"):[],r=o(e,k,"x",m).vals,x=o(e,S,"y",w).vals,e._x=r,e._y=x),g=e.x0,y=e.dx,b=e.y0,_=e.dy,A=c(R,e,k,S)}function D(t){L=e._input.zsmooth=e.zsmooth=!1,i.warn('cannot use zsmooth: "fast": '+t)}function I(t){if(t.length>1){var e=(t[t.length-1]-t[0])/(t.length-1),r=Math.abs(e/100);for(M=0;M<t.length-1;M++)if(Math.abs(t[M+1]-t[M]-e)>r)return!1}return!0}(k.rangebreaks||S.rangebreaks)&&(A=function(t,e,r){for(var n=[],i=-1,a=0;a<r.length;a++)if(e[a]!==p){n[++i]=[];for(var o=0;o<r[a].length;o++)t[o]!==p&&n[i].push(r[a][o])}return n}(r,x,A),O||(r=v(r),x=v(x),e._x=r,e._y=x)),O||!E&&!e.connectgaps||(e._emptypoints=h(A),f(A,e._emptypoints)),e._islinear=!1,"log"===k.type||"log"===S.type?"fast"===L&&D("log axis found"):I(r)?I(x)?e._islinear=!0:"fast"===L&&D("y scale is not linear"):"fast"===L&&D("x scale is not linear");var P=i.maxRowLength(A),F="scaled"===e.xtype?"":r,N=d(e,F,g,y,P,k),B="scaled"===e.ytype?"":x,z=d(e,B,b,_,A.length,S);C||(e._extremes[k._id]=a.findExtremes(k,N),e._extremes[S._id]=a.findExtremes(S,z));var j={x:N,y:z,z:A,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&m&&(j.orig_x=m),e.yperiodalignment&&w&&(j.orig_y=w),F&&F.length===N.length-1&&(j.xCenter=F),B&&B.length===z.length-1&&(j.yCenter=B),O&&(j.xRanges=T.xRanges,j.yRanges=T.yRanges,j.pts=T.pts),E||l(t,e,{vals:A,cLetter:"z"}),E&&e.contours&&"heatmap"===e.contours.coloring){var U={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};j.xfill=d(U,F,g,y,P,k),j.yfill=d(U,B,b,_,A.length,S)}return[j]}},26136:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(39032).BADNUM;t.exports=function(t,e,r,o){var s,l,u,c,f,h;function d(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f<t.length;f++)s=Math.max(s,t[f].length);if(0===s)return!1;u=function(t){return t.length},c=function(t,e,r){return(t[r]||[])[e]}}else s=t.length,u=function(t,e){return t[e].length},c=function(t,e,r){return(t[e]||[])[r]};var p=function(t,e,r){return e===a||r===a?a:c(t,e,r)};function v(t){if(e&&"carpet"!==e.type&&"contourcarpet"!==e.type&&t&&"category"===t.type&&e["_"+t._id.charAt(0)].length){var r=t._id.charAt(0),n={},o=e["_"+r+"CategoryMap"]||e[r];for(f=0;f<o.length;f++)n[o[f]]=f;return function(e){var r=n[t._categories[e]];return r+1?r:a}}return i.identity}var g=v(r),y=v(o);o&&"category"===o.type&&(s=o._categories.length);var m=new Array(s);for(f=0;f<s;f++)for(l=r&&"category"===r.type?r._categories.length:u(t,f),m[f]=new Array(l),h=0;h<l;h++)m[f][h]=d(p(t,y(f),g(h)));return m}},96288:function(t){"use strict";t.exports={min:"zmin",max:"zmax"}},2872:function(t,e,r){"use strict";var n=r(3400),i=r(39032).BADNUM,a=r(1220);t.exports=function(t,e,r,o,s,l){var u=t._length,c=e.makeCalcdata(t,o),f=r.makeCalcdata(t,s);c=a(t,e,o,c).vals,f=a(t,r,s,f).vals;var h,d,p,v,g=t.text,y=void 0!==g&&n.isArray1D(g),m=t.hovertext,x=void 0!==m&&n.isArray1D(m),b=n.distinctVals(c),_=b.vals,w=n.distinctVals(f),A=w.vals,M=[],T=A.length,k=_.length;for(h=0;h<l.length;h++)M[h]=n.init2dArray(T,k);y&&(p=n.init2dArray(T,k)),x&&(v=n.init2dArray(T,k));var S=n.init2dArray(T,k);for(h=0;h<u;h++)if(c[h]!==i&&f[h]!==i){var E=n.findBin(c[h]+b.minDiff/2,_),O=n.findBin(f[h]+w.minDiff/2,A);for(d=0;d<l.length;d++){var C=t[l[d]];M[d][O][E]=C[h],S[O][E]=h}y&&(p[O][E]=g[h]),x&&(v[O][E]=m[h])}for(t["_"+o]=_,t["_"+s]=A,d=0;d<l.length;d++)t["_"+l[d]]=M[d];y&&(t._text=p),x&&(t._hovertext=v),e&&"category"===e.type&&(t["_"+o+"CategoryMap"]=_.map((function(t){return e._categories[t]}))),r&&"category"===r.type&&(t["_"+s+"CategoryMap"]=A.map((function(t){return r._categories[t]}))),t._after2before=S}},11240: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]}))}},70448: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,y=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&&(y=1):(t[a][o]=(1+r)*t[a][o]-r*p,g>v&&(y=Math.max(y,Math.abs(t[a][o]-p)/(g-v))))}return y}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}},35744:function(t,e,r){"use strict";var n=r(24040),i=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r,a,o,s){var l,u,c,f=[],h=n.traceIs(t,"contour"),d=n.traceIs(t,"histogram"),p=n.traceIs(t,"gl2d");if(i(e)&&e.length>1&&!d&&"category"!==s.type){var v=e.length;if(!(v<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||p)f=Array.from(e).slice(0,o);else if(1===o)f="log"===s.type?[.5*e[0],2*e[0]]:[e[0]-.5,e[0]+.5];else if("log"===s.type){for(f=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],c=1;c<v;c++)f.push(Math.sqrt(e[c-1]*e[c]));f.push(Math.pow(e[v-1],1.5)/Math.pow(e[v-2],.5))}else{for(f=[1.5*e[0]-.5*e[1]],c=1;c<v;c++)f.push(.5*(e[c-1]+e[c]));f.push(1.5*e[v-1]-.5*e[v-2])}if(v<o){var g,y=f[f.length-1];if("log"===s.type)for(g=y/f[f.length-2],c=v;c<o;c++)y*=g,f.push(y);else for(g=y-f[f.length-2],c=v;c<o;c++)y+=g,f.push(y)}}else{var m=t[s._id.charAt(0)+"calendar"];for(l=d?s.r2c(r,0,m):i(e)&&1===e.length?e[0]:void 0===r?0:("log"===s.type?s.d2c:s.r2c)(r,0,m),u=a||1,c=h||p?0:-.5;c<o;c++)f.push(l+u*c)}return f}},51264:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(24040);function o(t,e){var r=e(t);return"scaled"===(r?e(t+"type","array"):"scaled")&&(e(t+"0"),e("d"+t)),r}t.exports=function(t,e,r,s,l,u){var c,f,h=r("z");if(l=l||"x",u=u||"y",void 0===h||!h.length)return 0;if(i.isArray1D(h)){c=r(l),f=r(u);var d=i.minRowLength(c),p=i.minRowLength(f);if(0===d||0===p)return 0;e._length=Math.min(d,p,h.length)}else{if(c=o(l,r),f=o(u,r),!function(t){for(var e,r=!0,a=!1,o=!1,s=0;s<t.length;s++){if(e=t[s],!i.isArrayOrTypedArray(e)){r=!1;break}e.length>0&&(a=!0);for(var l=0;l<e.length;l++)if(n(e[l])){o=!0;break}}return r&&a&&o}(h))return 0;r("transpose"),e._length=null}return"heatmapgl"===t.type||a.getComponentMethod("calendars","handleTraceDefaults")(t,e,[l,u],s),!0}},74512:function(t,e,r){"use strict";for(var n=r(83328),i=r(49084),a=r(92880).extendFlat,o=r(67824).overrideAll,s=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],l={},u=0;u<s.length;u++){var c=s[u];l[c]=n[c]}l.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},a(l,i("",{cLetter:"z",autoColorDflt:!1})),t.exports=o(l,"calc","nested")},84656:function(t,e,r){"use strict";var n=r(67792).gl_heatmap2d,i=r(54460),a=r(43080);function o(t,e){this.scene=t,this.uid=e,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={zsmooth:"fast",z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(t.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(t){var e=this.options,r=e.shape,n=t.pointId,i=n%r[0],a=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:t.dataCoord,traceCoord:[e.x[i],e.y[a],e.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[a,i],hoverinfo:this.hoverinfo}},s.update=function(t,e){var r=e[0];this.index=t.index,this.name=t.name,this.hoverinfo=t.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y,this.options.zsmooth=t.zsmooth;var l=function(t){for(var e=t.colorscale,r=t.zmin,n=t.zmax,i=e.length,o=new Array(i),s=new Array(4*i),l=0;l<i;l++){var u=e[l],c=a(u[1]);o[l]=r+u[0]*(n-r);for(var f=0;f<4;f++)s[4*l+f]=c[f]}return{colorLevels:o,colorValues:s}}(t);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],t.text),this.heatmap.update(this.options);var u,c,f=this.scene.xaxis,h=this.scene.yaxis;!1===t.zsmooth&&(u={ppad:r.x[1]-r.x[0]},c={ppad:r.y[1]-r.y[0]}),t._extremes[f._id]=i.findExtremes(f,r.x,u),t._extremes[h._id]=i.findExtremes(h,r.y,c)},s.dispose=function(){this.heatmap.dispose()},t.exports=function(t,e,r){var n=new o(t,e.uid);return n.update(e,r),n}},86464:function(t,e,r){"use strict";var n=r(3400),i=r(51264),a=r(27260),o=r(74512);t.exports=function(t,e,r,s){function l(r,i){return n.coerce(t,e,o,r,i)}i(t,e,l,s)?(l("text"),l("zsmooth"),a(t,e,s,l,{prefix:"",cLetter:"z"})):e.visible=!1}},45536:function(t,e,r){"use strict";["*heatmapgl* trace is deprecated!","Please consider switching to the *heatmap* or *image* trace types.","Alternatively you could contribute/sponsor rewriting this trace type","based on cartesian features and using regl framework."].join(" "),t.exports={attributes:r(74512),supplyDefaults:r(86464),colorbar:r(96288),calc:r(19512),plot:r(84656),moduleType:"trace",name:"heatmapgl",basePlotModule:r(39952),categories:["gl","gl2d","2dMap"],meta:{}}},2e3:function(t){"use strict";t.exports=function(t,e){for(var r=t.length,n=0,i=0;i<r;i++)e[i]?(t[i]/=e[i],n+=t[i]):t[i]=null;return n}},16964:function(t,e,r){"use strict";var n=r(38248);t.exports={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,i){var a=i[e];return n(a)?(a=Number(a),r[t]+=a,a):0},avg:function(t,e,r,i,a){var o=i[e];return n(o)&&(o=Number(o),r[t]+=o,a[t]++),0},min:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]>a){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]<a){var o=a-r[t];return r[t]=a,o}}return 0}}},67712:function(t,e,r){"use strict";var n=r(39032),i=n.ONEAVGYEAR,a=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,u=n.ONESEC,c=r(54460).tickIncrement;function f(t,e,r,n){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),a="date"===r.type,o=h(i,a),s=0;s<10;s++){var l=h(80*o,a);if(o===l)break;if(!d(l,t,e,a,r,n))break;o=l}return o}function h(t,e){return e&&t>u?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:u:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function d(t,e,r,n,a,s){if(n&&t>o){var l=p(e,a,s),u=p(r,a,s),c=t===i?0:1;return l[c]!==u[c]}return Math.floor(r/t)-Math.floor(e/t)>.1}function p(t,e,r){var n=e.c2d(t,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(t,e,r,n,a){var s,l,u=-1.1*e,h=-.1*e,d=t-h,p=r[0],v=r[1],g=Math.min(f(p+h,p+d,n,a),f(v+h,v+d,n,a)),y=Math.min(f(p+u,p+h,n,a),f(v+u,v+h,n,a));if(g>y&&y<Math.abs(v-p)/4e3?(s=g,l=!1):(s=Math.min(g,y),l=!0),"date"===n.type&&s>o){var m=s===i?1:6,x=s===i?"M12":"M1";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf("-",m);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,a);if(u<e){var f=c(u,x,!1,a);(u+f)/2<e+t&&(u=f)}return r&&l?c(u,x,!0,a):u}}return function(e,r){var n=s*Math.round(e/s);return n+s/10<e&&n+.9*s<e+t&&(n+=s),r&&l&&(n-=s),n}}},35852:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(24040),o=r(54460),s=r(84664),l=r(16964),u=r(10648),c=r(2e3),f=r(67712);function h(t,e,r,s,l){var u,c,f,d,p,v,g,y=s+"bins",m=t._fullLayout,x=e["_"+s+"bingroup"],b=m._histogramBinOpts[x],_="overlay"===m.barmode,w=function(t){return r.r2c(t,0,d)},A=function(t){return r.c2r(t,0,d)},M="date"===r.type?function(t){return t||0===t?i.cleanDate(t,null,d):null}:function(t){return n(t)?Number(t):null};function T(t,e,r){e[t+"Found"]?(e[t]=M(e[t]),null===e[t]&&(e[t]=r[t])):(v[t]=e[t]=r[t],i.nestedProperty(c[0],y+"."+t).set(r[t]))}if(e["_"+s+"autoBinFinished"])delete e["_"+s+"autoBinFinished"];else{c=b.traces;var k=[],S=!0,E=!1,O=!1;for(u=0;u<c.length;u++)if((f=c[u]).visible){var C=b.dirs[u];p=f["_"+C+"pos0"]=r.makeCalcdata(f,C),k=i.concat(k,p),delete f["_"+s+"autoBinFinished"],!0===e.visible&&(S?S=!1:(delete f._autoBin,f["_"+s+"autoBinFinished"]=1),a.traceIs(f,"2dMap")&&(E=!0),"histogram2dcontour"===f.type&&(O=!0))}d=c[0][s+"calendar"];var L=o.autoBin(k,r,b.nbins,E,d,b.sizeFound&&b.size),R=c[0]._autoBin={};if(v=R[b.dirs[0]]={},O&&(b.size||(L.start=A(o.tickIncrement(w(L.start),L.size,!0,d))),void 0===b.end&&(L.end=A(o.tickIncrement(w(L.end),L.size,!1,d)))),_&&!a.traceIs(e,"2dMap")&&0===L._dataSpan&&"category"!==r.type&&"multicategory"!==r.type&&""===e.bingroup&&void 0===e.xbins){if(l)return[L,p,!0];L=function(t,e,r,n,a){var o,s,l,u=t._fullLayout,c=function(t,e){for(var r=e.xaxis,n=e.yaxis,i=e.orientation,a=[],o=t._fullData,s=0;s<o.length;s++){var l=o[s];"histogram"===l.type&&!0===l.visible&&l.orientation===i&&l.xaxis===r&&l.yaxis===n&&a.push(l)}return a}(t,e),f=!1,d=1/0,p=[e];for(o=0;o<c.length;o++)if((s=c[o])===e)f=!0;else if(f){var v=h(t,s,r,n,!0),g=v[0],y=v[2];s["_"+n+"autoBinFinished"]=1,s["_"+n+"pos0"]=v[1],y?p.push(s):d=Math.min(d,g.size)}else l=u._histogramBinOpts[s["_"+n+"bingroup"]],d=Math.min(d,l.size||s[a].size);var m=new Array(p.length);for(o=0;o<p.length;o++)for(var x=p[o]["_"+n+"pos0"],b=0;b<x.length;b++)if(void 0!==x[b]){m[o]=x[b];break}for(isFinite(d)||(d=i.distinctVals(m).minDiff),o=0;o<p.length;o++){var _=(s=p[o])[n+"calendar"],w={start:r.c2r(m[o]-d/2,0,_),end:r.c2r(m[o]+d/2,0,_),size:d};s._input[a]=s[a]=w,(l=u._histogramBinOpts[s["_"+n+"bingroup"]])&&i.extendFlat(l,w)}return e[a]}(t,e,r,s,y)}(g=f.cumulative||{}).enabled&&"include"!==g.currentbin&&("decreasing"===g.direction?L.start=A(o.tickIncrement(w(L.start),L.size,!0,d)):L.end=A(o.tickIncrement(w(L.end),L.size,!1,d))),b.size=L.size,b.sizeFound||(v.size=L.size,i.nestedProperty(c[0],y+".size").set(L.size)),T("start",b,L),T("end",b,L)}p=e["_"+s+"pos0"],delete e["_"+s+"pos0"];var D=e._input[y]||{},I=i.extendFlat({},b),P=b.start,F=r.r2l(D.start),N=void 0!==F;if((b.startFound||N)&&F!==r.r2l(P)){var B=N?F:i.aggNums(Math.min,null,p),z={type:"category"===r.type||"multicategory"===r.type?"linear":r.type,r2l:r.r2l,dtick:b.size,tick0:P,calendar:d,range:[B,o.tickIncrement(B,b.size,!1,d)].map(r.l2r)},j=o.tickFirst(z);j>r.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,d)),I.start=r.l2r(j),N||i.nestedProperty(e,y+".start").set(I.start)}var U=b.end,H=r.r2l(D.end),V=void 0!==H;if((b.endFound||V)&&H!==r.r2l(U)){var G=V?H:i.aggNums(Math.max,null,p);I.end=r.l2r(G),V||i.nestedProperty(e,y+".start").set(I.end)}var Y="autobin"+s;return!1===e._input[Y]&&(e._input[y]=i.extendFlat({},e[y]||{}),delete e._input[Y],delete e[Y]),[I,p]}t.exports={calc:function(t,e){var r,a,d,p,v=[],g=[],y="h"===e.orientation,m=o.getFromId(t,y?e.yaxis:e.xaxis),x=y?"y":"x",b={x:"y",y:"x"}[x],_=e[x+"calendar"],w=e.cumulative,A=h(t,e,m,x),M=A[0],T=A[1],k="string"==typeof M.size,S=[],E=k?S:M,O=[],C=[],L=[],R=0,D=e.histnorm,I=e.histfunc,P=-1!==D.indexOf("density");w.enabled&&P&&(D=D.replace(/ ?density$/,""),P=!1);var F,N="max"===I||"min"===I?null:0,B=l.count,z=u[D],j=!1,U=function(t){return m.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&"count"!==I&&(F=e[b],j="avg"===I,B=l[I]),r=U(M.start),d=U(M.end)+(r-o.tickIncrement(r,M.size,!1,_))/1e6;r<d&&v.length<1e6&&(a=o.tickIncrement(r,M.size,!1,_),v.push((r+a)/2),g.push(N),L.push([]),S.push(r),P&&O.push(1/(a-r)),j&&C.push(0),!(a<=r));)r=a;S.push(r),k||"date"!==m.type||(E={start:U(E.start),end:U(E.end),size:E.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var H=e["_"+x+"bingroup"],V={leftGap:1/0,rightGap:1/0};H&&(t._fullLayout._roundFnOpts[H]||(t._fullLayout._roundFnOpts[H]=V),V=t._fullLayout._roundFnOpts[H]);var G,Y=g.length,W=!0,q=V.leftGap,X=V.rightGap,Z={};for(r=0;r<T.length;r++){var J=T[r];(p=i.findBin(J,E))>=0&&p<Y&&(R+=B(p,r,g,F,C),W&&L[p].length&&J!==T[L[p][0]]&&(W=!1),L[p].push(r),Z[r]=p,q=Math.min(q,J-S[p]),X=Math.min(X,S[p+1]-J))}V.leftGap=q,V.rightGap=X,W||(G=function(e,r){return function(){var n=t._fullLayout._roundFnOpts[H];return f(n.leftGap,n.rightGap,S,m,_)(e,r)}}),j&&(R=c(g,C)),z&&z(g,R,O),w.enabled&&function(t,e,r){var n,i,a;function o(e){a=t[e],t[e]/=2}function s(e){i=t[e],t[e]=a+i/2,a+=i}if("half"===r)if("increasing"===e)for(o(0),n=1;n<t.length;n++)s(n);else for(o(t.length-1),n=t.length-2;n>=0;n--)s(n);else if("increasing"===e){for(n=1;n<t.length;n++)t[n]+=t[n-1];"exclude"===r&&(t.unshift(0),t.pop())}else{for(n=t.length-2;n>=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(g,w.direction,w.currentbin);var K=Math.min(v.length,g.length),Q=[],$=0,tt=K-1;for(r=0;r<K;r++)if(g[r]){$=r;break}for(r=K-1;r>=$;r--)if(g[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(v[r])&&n(g[r])){var et={p:v[r],s:g[r],b:0};w.enabled||(et.pts=L[r],W?et.ph0=et.ph1=L[r].length?T[L[r][0]]:v[r]:(e._computePh=!0,et.ph0=G(S[r]),et.ph1=G(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,M.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,Z),Q},calcAllAutoBins:h}},10648:function(t){"use strict";t.exports={percent:function(t,e){for(var r=t.length,n=100/e,i=0;i<r;i++)t[i]*=n},probability:function(t,e){for(var r=t.length,n=0;n<r;n++)t[n]/=e},density:function(t,e,r,n){var i=t.length;n=n||1;for(var a=0;a<i;a++)t[a]*=r[a]*n},"probability density":function(t,e,r,n){var i=t.length;n&&(e/=n);for(var a=0;a<i;a++)t[a]*=r[a]/e}}},55480:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(16964),o=r(10648),s=r(2e3),l=r(67712),u=r(35852).calcAllAutoBins;function c(t,e,r,n){var i,a=new Array(t);if(n)for(i=0;i<t;i++)a[i]=1/(e[i+1]-e[i]);else{var o=1/r;for(i=0;i<t;i++)a[i]=o}return a}function f(t,e){return{start:t(e.start),end:t(e.end),size:e.size}}function h(t,e,r,n,i,a){var o,s=t.length-1,u=new Array(s),c=l(r,n,t,i,a);for(o=0;o<s;o++){var f=(e||[])[o];u[o]=void 0===f?[c(t[o]),c(t[o+1],!0)]:[f,f]}return u}t.exports=function(t,e){var r,l,d,p,v=i.getFromId(t,e.xaxis),g=i.getFromId(t,e.yaxis),y=e.xcalendar,m=e.ycalendar,x=function(t){return v.r2c(t,0,y)},b=function(t){return g.r2c(t,0,m)},_=u(t,e,v,"x"),w=_[0],A=_[1],M=u(t,e,g,"y"),T=M[0],k=M[1],S=e._length;A.length>S&&A.splice(S,A.length-S),k.length>S&&k.splice(S,k.length-S);var E=[],O=[],C=[],L="string"==typeof w.size,R="string"==typeof T.size,D=[],I=[],P=L?D:w,F=R?I:T,N=0,B=[],z=[],j=e.histnorm,U=e.histfunc,H=-1!==j.indexOf("density"),V="max"===U||"min"===U?null:0,G=a.count,Y=o[j],W=!1,q=[],X=[],Z="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Z&&"count"!==U&&(W="avg"===U,G=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,y))/1e6;for(r=K;r<Q;r=i.tickIncrement(r,J,!1,y))O.push(V),D.push(r),W&&C.push(0);D.push(r);var $,tt=O.length,et=(r-K)/tt,rt=($=K+et/2,v.c2r($,0,y)),nt=T.size,it=b(T.start),at=b(T.end)+(it-i.tickIncrement(it,nt,!1,m))/1e6;for(r=it;r<at;r=i.tickIncrement(r,nt,!1,m)){E.push(O.slice()),I.push(r);var ot=new Array(tt);for(l=0;l<tt;l++)ot[l]=[];z.push(ot),W&&B.push(C.slice())}I.push(r);var st=E.length,lt=(r-it)/st,ut=function(t){return g.c2r(t,0,m)}(it+lt/2);H&&(q=c(O.length,P,et,L),X=c(E.length,F,lt,R)),L||"date"!==v.type||(P=f(x,P)),R||"date"!==g.type||(F=f(b,F));var ct=!0,ft=!0,ht=new Array(tt),dt=new Array(st),pt=1/0,vt=1/0,gt=1/0,yt=1/0;for(r=0;r<S;r++){var mt=A[r],xt=k[r];d=n.findBin(mt,P),p=n.findBin(xt,F),d>=0&&d<tt&&p>=0&&p<st&&(N+=G(d,r,E[p],Z,B[p]),z[p][d].push(r),ct&&(void 0===ht[d]?ht[d]=mt:ht[d]!==mt&&(ct=!1)),ft&&(void 0===dt[p]?dt[p]=xt:dt[p]!==xt&&(ft=!1)),pt=Math.min(pt,mt-D[d]),vt=Math.min(vt,D[d+1]-mt),gt=Math.min(gt,xt-I[p]),yt=Math.min(yt,I[p+1]-xt))}if(W)for(p=0;p<st;p++)N+=s(E[p],B[p]);if(Y)for(p=0;p<st;p++)Y(E[p],N,q,X[p]);return{x:A,xRanges:h(D,ct&&ht,pt,vt,v,y),x0:rt,dx:et,y:k,yRanges:h(I,ft&&dt,gt,yt,g,m),y0:ut,dy:lt,z:E,pts:z}}},82296:function(t,e,r){"use strict";var n=r(49084),i=r(94724),a=r(25376),o=r(86968).u,s=r(92880).extendFlat,l=r(31780).templatedArray;t.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(t,e,r){"use strict";var n=r(30140),i=r(33428),a=r(71688).keyFun,o=r(71688).repeat,s=r(3400).sorterAsc,l=r(3400).strTranslate,u=n.bar.snapRatio;function c(t,e){return t*(1-u)+e*u}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function d(t,e,r,n){if(function(t,e){for(var r=0;r<e.length;r++)if(t>=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],u=l,f=a;i*f<i*o;f+=i){var d=f+i,p=e[d];if(i*r<i*h(l,p))return c(l,u);if(i*r<i*p||d===o)return c(p,l);u=l,l=p}}function p(t){t.attr("x",-n.bar.captureWidth/2).attr("width",n.bar.captureWidth)}function v(t){t.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function g(t){if(!t.brush.filterSpecified)return"0,"+t.height;for(var e,r,n,i=y(t.brush.filter.getConsolidated(),t.height),a=[0],o=i.length?i[0][0]:null,s=0;s<i.length;s++)r=(e=i[s])[1]-e[0],a.push(o),a.push(r),(n=s+1)<i.length&&(o=i[n][0]-e[1]);return a.push(t.height),a}function y(t,e){return t.map((function(t){return t.map((function(t){return Math.max(0,t*e)})).sort(s)}))}function m(){i.select(document.body).style("cursor",null)}function x(t){t.attr("stroke-dasharray",g)}function b(t,e){var r=i.select(t).selectAll(".highlight, .highlight-shadow");x(e?r.transition().duration(n.bar.snapDuration).each("end",e):r)}function _(t,e){var r,i=t.brush,a=NaN,o={};if(i.filterSpecified){var s=t.height,l=i.filter.getConsolidated(),u=y(l,s),c=NaN,f=NaN,h=NaN;for(r=0;r<=u.length;r++){var d=u[r];if(d&&d[0]<=e&&e<=d[1]){c=r;break}if(f=r?r-1:NaN,d&&d[0]>e){h=r;break}}if(a=c,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-u[f][1]<u[h][0]-e?f:h),!isNaN(a)){var p=u[a],v=function(t,e){var r=n.bar.handleHeight;if(!(e>t[1]+r||e<t[0]-r))return e>=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(p,e);v&&(o.interval=l[a],o.intervalPix=p,o.region=v)}}if(t.ordinal&&!o.region){var g=t.unitTickvals,m=t.unitToPaddedPx.invert(e);for(r=0;r<g.length;r++){var x=[.25*g[Math.max(r-1,0)]+.75*g[r],.25*g[Math.min(r+1,g.length-1)]+.75*g[r]];if(m>=x[0]&&m<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function A(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a="crosshair";r.clickableOrdinalRange?a="pointer":r.region&&(a=r.region+"-resize"),i.select(document.body).style("cursor",a)}function M(t){t.on("mousemove",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||A(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||m()})).call(i.behavior.drag().on("dragstart",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar="ns"===s.region,u.grabbingBar){var c=l.map(e.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),u.startExtent=s.region?l["s"===s.region?1:0]:a,e.parent.inBrushDrag=!0,u.brushStartCallback()}(this,t)})).on("drag",(function(t){w(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(A(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&k(r)):k(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),a.newExtent=[d(0,l,a.newExtent[0],a.stayingIntervals),d(1,l,a.newExtent[1],a.stayingIntervals)];var u=a.newExtent[1]>a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||k(r),a.brushCallback(e),u?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function T(t,e){return t[0]-e[0]}function k(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(T)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e),n=r.slice();e.filter.set(n),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t,e,r){var i=t.selectAll("."+n.cn.axisBrush).data(o,a);i.enter().append("g").classed(n.cn.axisBrush,!0),function(t,e,r){var i=r._context.staticPlot,a=t.selectAll(".background").data(o);a.enter().append("rect").classed("background",!0).call(p).call(v).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),a.call(M).attr("height",(function(t){return t.height-n.verticalPadding}));var s=t.selectAll(".highlight-shadow").data(o);s.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",e).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(t){return t.height})).call(x);var u=t.selectAll(".highlight").data(o);u.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",(function(t){return t.height})).call(x)}(i,e,r)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[d(0,r,t[0],[]),d(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},61664:function(t,e,r){"use strict";t.exports={attributes:r(82296),supplyDefaults:r(60664),calc:r(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(t,e,r){"use strict";var n=r(33428),i=r(84888)._M,a=r(24196),o=r(9616);e.name="parcoords",e.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},e.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},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:o.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},95044:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(8932),a=r(71688).wrap;t.exports=function(t,e){var r,o;return i.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=.5;return e}(e._length),o=[[0,e.line.color],[1,e.line.color]]),a({lineColor:r,cscale:o})}},30140:function(t){"use strict";t.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},60664:function(t,e,r){"use strict";var n=r(3400),i=r(94288).hasColorscale,a=r(27260),o=r(86968).Q,s=r(51272),l=r(54460),u=r(82296),c=r(71864),f=r(30140).maxDimensionCount,h=r(26284);function d(t,e,r,i){function a(r,i){return n.coerce(t,e,u.dimensions,r,i)}var o=a("values"),s=a("visible");if(o&&o.length||(s=e.visible=!1),s){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var f=a("range");e._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:f},l.setConvert(e._ax,i.layout),a("multiselect");var h=a("constraintrange");h&&(e.constraintrange=c.cleanRanges(h,e))}}t.exports=function(t,e,r,l){function c(r,i){return n.coerce(t,e,u,r,i)}var p=t.dimensions;Array.isArray(p)&&p.length>f&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),p.splice(f));var v=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:d}),g=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,c);o(e,l,c),Array.isArray(v)&&v.length||(e.visible=!1),h(e,v,"values",g);var y={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(c,"labelfont",y),n.coerceFont(c,"tickfont",y),n.coerceFont(c,"rangefont",y),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},95724:function(t,e,r){"use strict";var n=r(3400).isTypedArray;e.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},e.isOrdinal=function(t){return!!t.tickvals},e.isVisible=function(t){return t.visible||!("visible"in t)}},29928:function(t,e,r){"use strict";var n=r(61664);n.plot=r(24196),t.exports=n},51352:function(t,e,r){"use strict";var n=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),i=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),a=r(30140).maxDimensionCount,o=r(3400),s=1e-6,l=new Uint8Array(4),u=new Uint8Array(4),c={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function h(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var u=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*u,a.offset=2*l*n,e(a),l*n+u<i&&(r.currentRafs[o]=window.requestAnimationFrame((function(){s(l+1)}))),r.drawCompleted=!1)}(0)}function d(t,e){for(var r=new Array(256),n=0;n<256;n++)r[n]=t(n/255).concat(e);return r}function p(t,e){return(t>>>8*e)%256/255}function v(t,e,r){for(var n=new Array(8*e),i=0,a=0;a<e;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=4*t+s,u=r[64*a+l];63===l&&0===o&&(u*=-1),n[i++]=u}return n}function g(t){var e="0"+t;return e.substr(e.length-2)}function y(t){return t<a?"p"+g(t+1)+"_"+g(t+4):"colors"}function m(t,e,r,n,i,a,s,l,u,c,f,h,d,p){for(var v=[[],[]],g=0;g<64;g++)v[0][g]=g===i?1:0,v[1][g]=g===a?1:0;s*=p,l*=p,u*=p,c*=p;var y=t.lines.canvasOverdrag*p,m=t.domain,x=t.canvasWidth*p,b=t.canvasHeight*p,_=t.pad.l*p,w=t.pad.b*p,A=t.layoutHeight*p,M=t.layoutWidth*p,T=t.deselectedLines.color,k=t.deselectedLines.opacity;return o.extendFlat({key:f,resolution:[x,b],viewBoxPos:[s+y,l],viewBoxSize:[u,c],i0:i,i1:a,dim0A:v[0].slice(0,16),dim0B:v[0].slice(16,32),dim0C:v[0].slice(32,48),dim0D:v[0].slice(48,64),dim1A:v[1].slice(0,16),dim1B:v[1].slice(16,32),dim1C:v[1].slice(32,48),dim1D:v[1].slice(48,64),drwLayer:h,contextColor:[T[0]/255,T[1]/255,T[2]/255,"auto"!==k?T[3]*k:Math.max(1/255,Math.pow(1/t.lines.color.length,1/3))],scissorX:(n===e?0:s+y)+(_-y)+M*m.x[0],scissorWidth:(n===r?x-s+y:u+.5)+(n===e?s+y:0),scissorY:l+w+A*m.y[0],scissorHeight:c,viewportX:_-y+M*m.x[0],viewportY:w+A*m.y[0],viewportWidth:x,viewportHeight:b},d)}function x(t){var e=2047,r=Math.max(0,Math.floor(t[0]*e),0),n=Math.min(e,Math.ceil(t[1]*e),e);return[Math.min(r,n),Math.max(r,n)]}t.exports=function(t,e){var r,l,g,b,_,w=e.context,A=e.pick,M=e.regl,T=M._gl,k=T.getParameter(T.ALIASED_LINE_WIDTH_RANGE),S=Math.max(k[0],Math.min(k[1],e.viewModel.plotGlPixelRatio)),E={currentRafs:{},drawCompleted:!0,clearOnly:!1},O=function(t){for(var e={},r=0;r<=a;r+=4)e[y(r)]=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return e}(M),C=M.texture(c),L=[];D(e);var R=M({profile:!1,blend:{enable:w,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!w,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:M.prop("scissorX"),y:M.prop("scissorY"),width:M.prop("scissorWidth"),height:M.prop("scissorHeight")}},viewport:{x:M.prop("viewportX"),y:M.prop("viewportY"),width:M.prop("viewportWidth"),height:M.prop("viewportHeight")},dither:!1,vert:n,frag:i,primitive:"lines",lineWidth:S,attributes:O,uniforms:{resolution:M.prop("resolution"),viewBoxPos:M.prop("viewBoxPos"),viewBoxSize:M.prop("viewBoxSize"),dim0A:M.prop("dim0A"),dim1A:M.prop("dim1A"),dim0B:M.prop("dim0B"),dim1B:M.prop("dim1B"),dim0C:M.prop("dim0C"),dim1C:M.prop("dim1C"),dim0D:M.prop("dim0D"),dim1D:M.prop("dim1D"),loA:M.prop("loA"),hiA:M.prop("hiA"),loB:M.prop("loB"),hiB:M.prop("hiB"),loC:M.prop("loC"),hiC:M.prop("hiC"),loD:M.prop("loD"),hiD:M.prop("hiD"),palette:C,contextColor:M.prop("contextColor"),maskTexture:M.prop("maskTexture"),drwLayer:M.prop("drwLayer"),maskHeight:M.prop("maskHeight")},offset:M.prop("offset"),count:M.prop("count")});function D(t){r=t.model,l=t.viewModel,g=l.dimensions.slice(),b=g[0]?g[0].values.length:0;var e=r.lines,n=A?e.color.map((function(t,r){return r/e.color.length})):e.color,i=function(t,e,r){for(var n,i=new Array(t*(a+4)),o=0,l=0;l<t;l++){for(var u=0;u<a;u++)i[o++]=u<e.length?e[u].paddedUnitValues[l]:.5;i[o++]=p(l,2),i[o++]=p(l,1),i[o++]=p(l,0),i[o++]=(n=r[l],Math.max(s,Math.min(.999999,n)))}return i}(b,g,n);!function(t,e,r){for(var n=0;n<=a;n+=4)t[y(n)](v(n/4,e,r))}(O,b,i),w||A||(C=M.texture(o.extendFlat({data:d(r.unitToColor,255)},c)))}return{render:function(t,e,n){var i,a,o,s=t.length,l=1/0,u=-1/0;for(i=0;i<s;i++)t[i].dim0.canvasX<l&&(l=t[i].dim0.canvasX,a=i),t[i].dim1.canvasX>u&&(u=t[i].dim1.canvasX,o=i);0===s&&f(M,0,0,r.canvasWidth,r.canvasHeight);var c=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&n<g.length?g[n].brush.filter.getBounds():[-1/0,1/0];i[0][n]=a[0],i[1][n]=a[1]}var o=new Array(16384);for(e=0;e<16384;e++)o[e]=255;if(!t)for(e=0;e<g.length;e++){var s=e%8,l=(e-s)/8,u=Math.pow(2,s),c=g[e].brush.filter.get();if(!(c.length<2)){var f=x(c[0])[1];for(r=1;r<c.length;r++){var h=x(c[r]);for(n=f+1;n<h[0];n++)o[8*n+l]&=~u;f=Math.max(f,h[1])}}}var d={shape:[8,2048],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:o};return _?_(d):_=M.texture(d),{maskTexture:_,maskHeight:2048,loA:i[0].slice(0,16),loB:i[0].slice(16,32),loC:i[0].slice(32,48),loD:i[0].slice(48,64),hiA:i[1].slice(0,16),hiB:i[1].slice(16,32),hiC:i[1].slice(32,48),hiD:i[1].slice(48,64)}}(w);for(i=0;i<s;i++){var d=t[i],p=d.dim0.crossfilterDimensionIndex,v=d.dim1.crossfilterDimensionIndex,y=d.canvasX,T=d.canvasY,k=y+d.panelSizeX,S=d.plotGlPixelRatio;if(e||!L[p]||L[p][0]!==y||L[p][1]!==k){L[p]=[y,k];var O=m(r,a,o,i,p,v,y,T,d.panelSizeX,d.panelSizeY,d.dim0.crossfilterDimensionIndex,w?0:A?2:1,c,S);E.clearOnly=n;var C=e?r.lines.blockLineCount:b;h(M,R,E,C,b,O)}}},readPixel:function(t,e){return M.read({x:t,y:e,width:1,height:1,data:u}),u},readPixels:function(t,e,r,n){var i=new Uint8Array(4*r*n);return M.read({x:t,y:e,width:r,height:n,data:i}),i},destroy:function(){for(var e in t.style["pointer-events"]="none",C.destroy(),_&&_.destroy(),O)O[e].destroy()},update:D}}},26284:function(t){"use strict";t.exports=function(t,e,r,n){var i,a;for(n||(n=1/0),i=0;i<e.length;i++)(a=e[i]).visible&&(n=Math.min(n,a[r].length));for(n===1/0&&(n=0),t._length=n,i=0;i<e.length;i++)(a=e[i]).visible&&(a._length=n);return n}},36336:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.isArrayOrTypedArray,o=i.numberFormat,s=r(96824),l=r(54460),u=i.strRotate,c=i.strTranslate,f=r(72736),h=r(43616),d=r(8932),p=r(71688),v=p.keyFun,g=p.repeat,y=p.unwrap,m=r(95724),x=r(30140),b=r(71864),_=r(51352);function w(t,e,r){return i.aggNums(t,null,e,r)}function A(t,e){return T(w(Math.min,t,e),w(Math.max,t,e))}function M(t){var e=t.range;return e?T(e[0],e[1]):A(t.values,t._length)}function T(t,e){return!isNaN(t)&&isFinite(t)||(t=0),!isNaN(e)&&isFinite(e)||(e=0),t===e&&(0===t?(t-=1,e+=1):(t*=.9,e*=1.1)),[t,e]}function k(t,e,r,i,a){var s,l,u=M(r);return i?n.scale.ordinal().domain(i.map((s=o(r.tickformat),l=a,l?function(t,e){var r=l[e];return null==r?s(t):r}:s))).range(i.map((function(r){var n=(r-u[0])/(u[1]-u[0]);return t-e+n*(2*e-t)}))):n.scale.linear().domain(u).range([t-e,e])}function S(t){if(t.tickvals){var e=M(t);return n.scale.ordinal().domain(t.tickvals).range(t.tickvals.map((function(t){return(t-e[0])/(e[1]-e[0])})))}}function E(t){var e=t.map((function(t){return t[0]})),r=t.map((function(t){var e=s(t[1]);return n.rgb("rgb("+e[0]+","+e[1]+","+e[2]+")")})),i="rgb".split("").map((function(t){return n.scale.linear().clamp(!0).domain(e).range(r.map((i=t,function(t){return t[i]})));var i}));return function(t){return i.map((function(e){return e(t)}))}}function O(t){return t.dimensions.some((function(t){return t.brush.filterSpecified}))}function C(t,e,r){var a=y(e),o=a.trace,l=m.convertTypedArray(a.lineColor),u=o.line,c={color:s(o.unselected.line.color),opacity:o.unselected.line.opacity},f=d.extractOpts(u),h=f.reversescale?d.flipScale(a.cscale):a.cscale,p=o.domain,v=o.dimensions,g=t.width,b=o.labelangle,_=o.labelside,w=o.labelfont,A=o.tickfont,T=o.rangefont,k=i.extendDeepNoArrays({},u,{color:l.map(n.scale.linear().domain(M({values:l,range:[f.min,f.max],_length:o._length}))),blockLineCount:x.blockLineCount,canvasOverdrag:x.overdrag*x.canvasPixelRatio}),S=Math.floor(g*(p.x[1]-p.x[0])),O=Math.floor(t.height*(p.y[1]-p.y[0])),C=t.margin||{l:80,r:80,t:100,b:80},L=S,R=O;return{key:r,colCount:v.filter(m.isVisible).length,dimensions:v,tickDistance:x.tickDistance,unitToColor:E(h),lines:k,deselectedLines:c,labelAngle:b,labelSide:_,labelFont:w,tickFont:A,rangeFont:T,layoutWidth:g,layoutHeight:t.height,domain:p,translateX:p.x[0]*g,translateY:t.height-p.y[1]*t.height,pad:C,canvasWidth:L*x.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:R*x.canvasPixelRatio,width:L,height:R,canvasPixelRatio:x.canvasPixelRatio}}function L(t,e,r){var s=r.width,l=r.height,u=r.dimensions,c=r.canvasPixelRatio,f=function(t){return s*t/Math.max(1,r.colCount-1)},h=x.verticalPadding/l,d=function(t,e){return n.scale.linear().range([e,t-e])}(l,x.verticalPadding),p={key:r.key,xScale:f,model:r,inBrushDrag:!1},v={};return p.dimensions=u.filter(m.isVisible).map((function(s,u){var g=function(t,e){return n.scale.linear().domain(M(t)).range([e,1-e])}(s,h),y=v[s.label];v[s.label]=(y||0)+1;var _=s.label+(y?"__"+y:""),w=s.constraintrange,A=w&&w.length;A&&!a(w[0])&&(w=[w]);var T=A?w.map((function(t){return t.map(g)})):[[-1/0,1/0]],E=s.values;E.length>s._length&&(E=E.slice(0,s._length));var C,L=s.tickvals;function R(t,e){return{val:t,text:C[e]}}function D(t,e){return t.val-e.val}if(a(L)&&L.length){i.isTypedArray(L)&&(L=Array.from(L)),C=s.ticktext,a(C)&&C.length?C.length>L.length?C=C.slice(0,L.length):L.length>C.length&&(L=L.slice(0,C.length)):C=L.map(o(s.tickformat));for(var I=1;I<L.length;I++)if(L[I]<L[I-1]){for(var P=L.map(R).sort(D),F=0;F<L.length;F++)L[F]=P[F].val,C[F]=P[F].text;break}}else L=void 0;return E=m.convertTypedArray(E),{key:_,label:s.label,tickFormat:s.tickformat,tickvals:L,ticktext:C,ordinal:m.isOrdinal(s),multiselect:s.multiselect,xIndex:u,crossfilterDimensionIndex:u,visibleIndex:s._index,height:l,values:E,paddedUnitValues:E.map(g),unitTickvals:L&&L.map(g),xScale:f,x:f(u),canvasX:f(u)*c,unitToPaddedPx:d,domainScale:k(l,x.verticalPadding,s,L,C),ordinalScale:S(s),parent:p,model:r,brush:b.makeBrush(t,A,T,(function(){t.linePickActive(!1)}),(function(){var e=p;e.focusLayer&&e.focusLayer.render(e.panels,!0);var r=O(e);!t.contextShown()&&r?(e.contextLayer&&e.contextLayer.render(e.panels,!0),t.contextShown(!0)):t.contextShown()&&!r&&(e.contextLayer&&e.contextLayer.render(e.panels,!0,!0),t.contextShown(!1))}),(function(r){if(p.focusLayer.render(p.panels,!0),p.pickLayer&&p.pickLayer.render(p.panels,!0),t.linePickActive(!0),e&&e.filterChanged){var n=g.invert,a=r.map((function(t){return t.map(n).sort(i.sorterAsc)})).sort((function(t,e){return t[0]-e[0]}));e.filterChanged(p.key,s._index,a)}}))}})),p}function R(t){t.classed(x.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function D(t,e){var r="top"===e?1:-1,n=t*Math.PI/180;return{dir:r,dx:Math.sin(n),dy:Math.cos(n),degrees:t}}function I(t,e,r){for(var n=e.panels||(e.panels=[]),i=t.data(),a=0;a<i.length-1;a++){var o=n[a]||(n[a]={}),s=i[a],l=i[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=e.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function P(t,e){return l.tickText(t._ax,e,!1).text}function F(t,e){if(t.ordinal)return"";var r=t.domainScale.domain(),n=r[e?r.length-1:0];return P(t.model.dimensions[t.visibleIndex],n)}t.exports=function(t,e,r,a){var o=t._context.staticPlot,s=t._fullLayout,d=s._toppaper,p=s._glcontainer,w=t._context.plotGlPixelRatio,M=t._fullLayout.paper_bgcolor;!function(t){for(var e=0;e<t.length;e++)for(var r=0;r<t[e].length;r++)for(var n=t[e][r].trace,i=n.dimensions,a=0;a<i.length;a++){var o=i[a].values,s=i[a]._ax;s&&(s.range?s.range=T(s.range[0],s.range[1]):s.range=A(o,n._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=i[a].tickformat,l.calcTicks(s),s.cleanRange())}}(e);var k,S,E=(k=!0,S=!1,{linePickActive:function(t){return arguments.length?k=!!t:k},contextShown:function(t){return arguments.length?S=!!t:S}}),N=e.filter((function(t){return y(t).trace.visible})).map(C.bind(0,r)).map(L.bind(0,E,a));p.each((function(t,e){return i.extendFlat(t,N[e])}));var B=p.selectAll(".gl-canvas").each((function(t){t.viewModel=N[0],t.viewModel.plotGlPixelRatio=w,t.viewModel.paperColor=M,t.model=t.viewModel?t.viewModel.model:null})),z=null;B.filter((function(t){return t.pick})).style("pointer-events",o?"none":"auto").on("mousemove",(function(t){if(E.linePickActive()&&t.lineLayer&&a&&a.hover){var e=n.event,r=this.width,i=this.height,o=n.mouse(this),s=o[0],l=o[1];if(s<0||l<0||s>=r||l>=i)return;var u=t.lineLayer.readPixel(s,i-1-l),c=0!==u[3],f=c?u[2]+256*(u[1]+256*u[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==z&&(c?a.hover(h):a.unhover&&a.unhover(h),z=f)}})),B.style("opacity",(function(t){return t.pick?0:1})),d.style("background","rgba(255, 255, 255, 0)");var j=d.selectAll("."+x.cn.parcoords).data(N,v);j.exit().remove(),j.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),j.attr("transform",(function(t){return c(t.model.translateX,t.model.translateY)}));var U=j.selectAll("."+x.cn.parcoordsControlView).data(g,v);U.enter().append("g").classed(x.cn.parcoordsControlView,!0),U.attr("transform",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var H=U.selectAll("."+x.cn.yAxis).data((function(t){return t.dimensions}),v);H.enter().append("g").classed(x.cn.yAxis,!0),U.each((function(t){I(H,t,w)})),B.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=_(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),H.attr("transform",(function(t){return c(t.xScale(t.xIndex),0)})),H.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;E.linePickActive(!1),t.x=Math.max(-x.overdrag,Math.min(t.model.width+x.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,H.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),I(H,e,w),H.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr("transform",c(t.x,0)),H.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!O(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,I(H,e,w),n.select(this).attr("transform",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!O(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),E.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),H.exit().remove();var V=H.selectAll("."+x.cn.axisOverlays).data(g,v);V.enter().append("g").classed(x.cn.axisOverlays,!0),V.selectAll("."+x.cn.axis).remove();var G=V.selectAll("."+x.cn.axis).data(g,v);G.enter().append("g").classed(x.cn.axis,!0),G.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return m.isOrdinal(t)?e:P(t.model.dimensions[t.visibleIndex],e)})).scale(r)),h.font(G.selectAll("text"),t.model.tickFont)})),G.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),G.selectAll("text").style("text-shadow",f.makeTextShadow(M)).style("cursor","default");var Y=V.selectAll("."+x.cn.axisHeading).data(g,v);Y.enter().append("g").classed(x.cn.axisHeading,!0);var W=Y.selectAll("."+x.cn.axisTitle).data(g,v);W.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),W.text((function(t){return t.label})).each((function(e){var r=n.select(this);h.font(r,e.model.labelFont),f.convertToTspans(r,t)})).attr("transform",(function(t){var e=D(t.model.labelAngle,t.model.labelSide),r=x.axisTitleOffset;return(e.dir>0?"":c(0,2*r+t.model.height))+u(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr("text-anchor",(function(t){var e=D(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var q=V.selectAll("."+x.cn.axisExtent).data(g,v);q.enter().append("g").classed(x.cn.axisExtent,!0);var X=q.selectAll("."+x.cn.axisExtentTop).data(g,v);X.enter().append("g").classed(x.cn.axisExtentTop,!0),X.attr("transform",c(0,-x.axisExtentOffset));var Z=X.selectAll("."+x.cn.axisExtentTopText).data(g,v);Z.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(R),Z.text((function(t){return F(t,!0)})).each((function(t){h.font(n.select(this),t.model.rangeFont)}));var J=q.selectAll("."+x.cn.axisExtentBottom).data(g,v);J.enter().append("g").classed(x.cn.axisExtentBottom,!0),J.attr("transform",(function(t){return c(0,t.model.height+x.axisExtentOffset)}));var K=J.selectAll("."+x.cn.axisExtentBottomText).data(g,v);K.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(R),K.text((function(t){return F(t,!1)})).each((function(t){h.font(n.select(this),t.model.rangeFont)})),b.ensureAxisBrush(V,M,t)}},24196:function(t,e,r){"use strict";var n=r(36336),i=r(5048),a=r(95724).isVisible,o={};function s(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}(t.exports=function(t,e){var r=t._fullLayout;if(i(t,[],o)){var l={},u={},c={},f={},h=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=t.data[i].dimensions,u[r]=t.data[i].dimensions.slice()})),n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=u[e][n],o=i.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var d=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,d.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete d.constraintrange,o=null);var p={};p[s]=o,t.emit("plotly_restyle",[p,[f[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return s(t,e,r)-s(t,e,n)}}(r,u[e].filter(a));l[e].sort(n),u[e].filter((function(t){return!a(t)})).sort((function(t){return u[e].indexOf(t)})).forEach((function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(u[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[l[e]]},[f[e]]])}})}}).reglPrecompiled=o},21552:function(t,e,r){"use strict";var n=r(43616),i=r(76308);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)}},69656: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}},10528:function(t,e,r){"use strict";var n=r(76308),i=r(69656).castOption,a=r(21552);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)}},35484:function(t,e,r){"use strict";var n=r(52904);t.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(t,e,r){"use strict";var n=r(67792).gl_pointcloud2d,i=r(3400).isArrayOrTypedArray,a=r(43080),o=r(19280).findExtremes,s=r(44928);function l(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var u=l.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:i(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,s,l,u=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,d=t.indices,p=this.bounds;if(f){if(n=f,e=f.length>>>1,h)p[0]=t.xbounds[0],p[2]=t.xbounds[1],p[1]=t.ybounds[0],p[3]=t.ybounds[1];else for(l=0;l<e;l++)i=n[2*l],s=n[2*l+1],i<p[0]&&(p[0]=i),i>p[2]&&(p[2]=i),s<p[1]&&(p[1]=s),s>p[3]&&(p[3]=s);if(d)r=d;else for(r=new Int32Array(e),l=0;l<e;l++)r[l]=l}else for(e=u.length,n=new Float32Array(2*e),r=new Int32Array(e),l=0;l<e;l++)i=u[l],s=c[l],r[l]=l,n[2*l]=i,n[2*l+1]=s,i<p[0]&&(p[0]=i),i>p[2]&&(p[2]=i),s<p[1]&&(p[1]=s),s>p[3]&&(p[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var v=a(t.marker.color),g=a(t.marker.border.color),y=t.opacity*t.marker.opacity;v[3]*=y,this.pointcloudOptions.color=v;var m=t.marker.blend;null===m&&(m=u.length<100||c.length<100),this.pointcloudOptions.blend=m,g[3]*=y,this.pointcloudOptions.borderColor=g;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,A=b/2||.5;t._extremes[_._id]=o(_,[p[0],p[2]],{ppad:A}),t._extremes[w._id]=o(w,[p[1],p[3]],{ppad:A})},u.dispose=function(){this.pointcloud.dispose()},t.exports=function(t,e){var r=new l(t,e.uid);return r.update(e),r}},41904:function(t,e,r){"use strict";var n=r(3400),i=r(35484);t.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),e._length=null}},156:function(t,e,r){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),t.exports={attributes:r(35484),supplyDefaults:r(41904),calc:r(41484),plot:r(11072),moduleType:"trace",name:"pointcloud",basePlotModule:r(39952),categories:["gl","gl2d","showLegend"],meta:{}}},20148: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"))}}},52904:function(t,e,r){"use strict";var n=r(29736).axisHoverFormat,i=r(21776).Gw,a=r(21776).Ks,o=r(49084),s=r(25376),l=r(98192).u,u=r(98192).c,c=r(43616),f=r(88200),h=r(92880).extendFlat,d=r(98304);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"}}},16356:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(54460),o=r(1220),s=r(39032).BADNUM,l=r(43028),u=r(90136),c=r(20148),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,y=e.fill;r._minDtick=0,n._minDtick=0;var m={padded:!0},x={padded:!0};s&&(m.ppad=x.ppad=s);var b=u<2||i[0]!==i[u-1]||o[0]!==o[u-1];b&&("tozerox"===y||"tonextx"===y&&(d||"h"===p))?m.tozero=!0:(e.error_y||{}).visible||"tonexty"!==y&&"tozeroy"!==y&&(l.hasMarkers(e)||l.hasText(e))||(m.padded=!1,m.ppad=0),b&&("tozeroy"===y||"tonexty"===y&&(d||"v"===p))?x.tozero=!0:"tonextx"!==y&&"tozerox"!==y||(x.padded=!1),f&&(e._extremes[f]=a.findExtremes(r,i,m)),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,y,m,x,b=t._fullLayout,_=e._xA=a.getFromId(t,e.xaxis||"x","x"),w=e._yA=a.getFromId(t,e.yaxis||"y","y"),A=_.makeCalcdata(e,"x"),M=w.makeCalcdata(e,"y"),T=o(e,_,"x",A),k=o(e,w,"y",M),S=T.vals,E=k.vals,O=e._length,C=new Array(O),L=e.ids,R=g(e,b,_,w),D=!1;p(b,e);var I,P="x",F="y";R?(i.pushUnique(R.traceIndices,e._expandedIndex),(r="v"===R.orientation)?(F="s",I="x"):(P="s",I="y"),m="interpolate"===R.stackgaps):h(t,e,_,w,S,E,d(e,O));var N=!!e.xperiodalignment,B=!!e.yperiodalignment;for(l=0;l<O;l++){var z=C[l]={},j=n(S[l]),U=n(E[l]);j&&U?(z[P]=S[l],z[F]=E[l],N&&(z.orig_x=A[l],z.xEnd=T.ends[l],z.xStart=T.starts[l]),B&&(z.orig_y=M[l],z.yEnd=k.ends[l],z.yStart=k.starts[l])):R&&(r?j:U)?(z[I]=r?S[l]:E[l],z.gap=!0,m?(z.s=s,D=!0):z.s=0):z[P]=z[F]=s,L&&(z.id=String(L[l]))}if(c(C,e),u(t,e),f(C,e),R){for(l=0;l<C.length;)C[l][I]===s?C.splice(l,1):l++;if(i.sort(C,(function(t,e){return t[I]-e[I]||t.i-e.i})),D){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(y=C.length-1;y>l&&C[y].gap;)y--;for(x=C[y].s,v=C.length-1;v>y;v--)C[v].s=x;for(;l<y;)if(C[++l].gap){for(v=l+1;C[v].gap;)v++;for(var H=C[l-1][I],V=C[l-1].s,G=(C[v].s-V)/(C[v][I]-H);l<v;)C[l].s=V+(C[l][I]-H)*G,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)}},90136:function(t,e,r){"use strict";var n=r(94288).hasColorscale,i=r(47128),a=r(43028);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"}))}},88200:function(t){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},96664:function(t,e,r){"use strict";var n=r(16356),i=r(96376).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,y,m,x,b,_,w,A,M=t.calcdata;for(var T in l){var k=(m=l[T]).traceIndices;if(k.length){for(x="interpolate"===m.stackgaps,b=m.groupnorm,"v"===m.orientation?(_="x",w="y"):(_="y",w="x"),A=new Array(k.length),u=0;u<A.length;u++)A[u]=!1;p=M[k[0]];var S=new Array(p.length);for(u=0;u<p.length;u++)S[u]=p[u][_];for(u=1;u<k.length;u++){for(d=M[k[u]],c=f=0;c<d.length;c++){for(v=d[c][_];v>S[f]&&f<S.length;f++)a(d,c,S[f],u,A,x,_),c++;if(v!==S[f]){for(h=0;h<u;h++)a(M[k[h]],f,v,h,A,x,_);S.splice(f,0,v)}f++}for(;f<S.length;f++)a(d,c,S[f],u,A,x,_),c++}var E=S.length;for(c=0;c<p.length;c++){for(g=p[c][w]=p[c].s,u=1;u<k.length;u++)(d=M[k[u]])[0].trace._rawLength=d[0].trace._length,d[0].trace._length=E,g+=d[c].s,d[c][w]=g;if(b)for(y=("fraction"===b?g:g/100)||1,u=0;u<k.length;u++){var O=M[k[u]][c];O[w]/=y,O.sNorm=O.s/y}}for(u=0;u<k.length;u++){var C=(d=M[k[u]])[0].trace,L=n.calcMarkerSize(C,C._rawLength),R=Array.isArray(L);if(L&&A[u]||R){var D=L;for(L=new Array(E),c=0;c<E;c++)L[c]=d[c].gap?0:R?D[d[c].i]:D}var I=new Array(E),P=new Array(E);for(c=0;c<E;c++)I[c]=d[c].x,P[c]=d[c].y;n.calcAxisExpansion(t,C,r,o,I,P,L),d[0].t.orientation=m.orientation}}}}}},35036:function(t,e,r){"use strict";var n=r(3400),i=r(20011),a=r(52904);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}}}}}},18800:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(52904),o=r(88200),s=r(43028),l=r(43980),u=r(31147),c=r(43912),f=r(74428),h=r(66828),d=r(11731),p=r(124),v=r(70840),g=r(3400).coercePattern;t.exports=function(t,e,r,y){function m(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,y,m);if(x||(e.visible=!1),e.visible){u(t,e,y,m),m("xhoverformat"),m("yhoverformat"),m("zorder");var b=c(t,e,y,m);"group"===y.scattermode&&void 0===e.orientation&&m("orientation","v");var _=!b&&x<o.PTS_LINESONLY?"lines+markers":"lines";m("text"),m("hovertext"),m("mode",_),s.hasMarkers(e)&&f(t,e,r,y,m,{gradient:!0}),s.hasLines(e)&&(h(t,e,r,y,m,{backoff:!0}),d(t,e,m),m("connectgaps"),m("line.simplify")),s.hasText(e)&&(m("texttemplate"),p(t,e,y,m));var w=[];(s.hasMarkers(e)||s.hasText(e))&&(m("cliponaxis"),m("marker.maxdisplayed"),w.push("points")),m("fill",b?b.fillDflt:"none"),"none"!==e.fill&&(v(t,e,r,m,{moduleHasFillgradient:!0}),s.hasLines(e)||d(t,e,m),g(m,"fillpattern",e.fillcolor,!1));var A=(e.line||{}).color,M=(e.marker||{}).color;"tonext"!==e.fill&&"toself"!==e.fill||w.push("fills"),m("hoveron",w.join("+")||"points"),"fills"!==e.hoveron&&m("hovertemplate");var T=i.getComponentMethod("errorbars","supplyDefaults");T(t,e,A||M||r,{axis:"y"}),T(t,e,A||M||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(e,m)}}},98304:function(t){"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0}}},70840:function(t,e,r){"use strict";var n=r(76308),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))}},76688:function(t,e,r){"use strict";var n=r(54460);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}},44928:function(t,e,r){"use strict";var n=r(76308),i=r(43028);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}},20011:function(t,e,r){"use strict";var n=r(71888).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)}},98723:function(t,e,r){"use strict";var n=r(3400),i=r(93024),a=r(24040),o=r(44928),s=r(76308),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],y=f.hoveron||"",m=-1!==f.mode.indexOf("markers")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(t){var e=Math.max(m,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-m/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 A=c[t.index],M=h.c2p(A.x,!0),T=d.c2p(A.y,!0),k=A.mrc||1;t.index=A.i;var S=c[0].t.orientation,E=S&&(A.sNorm||A.s),O="h"===S?E:void 0!==A.orig_x?A.orig_x:A.x,C="v"===S?E:void 0!==A.orig_y?A.orig_y:A.y;return n.extendFlat(t,{color:o(f,A),x0:M-k,x1:M+k,xLabelVal:O,y0:T-k,y1:T+k,yLabelVal:C,spikeDistance:_(A),hovertemplate:f.hovertemplate}),l(A,f,t),a.getComponentMethod("errorbars","hoverInfo")(A,f,t),[t]}}function L(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!==y.indexOf("fills")&&f._fillElement&&L(f._fillElement)&&!L(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,y=-1/0;for(e=0;e<t.length;e++){var m=t[e];m.contains(g)&&(c.push(m),v=Math.min(v,m.ymin),y=Math.max(y,m.ymax))}if(0===c.length)return null;for(r=((v=Math.max(v,0))+(y=Math.min(y,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 D=s.defaultLine;return s.opacity(f.fillcolor)?D=f.fillcolor:s.opacity((f.line||{}).color)&&(D=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:R.x0,x1:R.x1,y0:R.y0,y1:R.y1,color:D,hovertemplate:!1}),delete t.index,f.text&&!n.isArrayOrTypedArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}},65875:function(t,e,r){"use strict";var n=r(43028);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(52904),layoutAttributes:r(55308),supplyDefaults:r(18800),crossTraceDefaults:r(35036),supplyLayoutDefaults:r(59748),calc:r(16356).calc,crossTraceCalc:r(96664),arraysToCalcdata:r(20148),plot:r(96504),colorbar:r(5528),formatLabels:r(76688),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(98723),selectPoints:r(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308: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"}}},59748:function(t,e,r){"use strict";var n=r(3400),i=r(55308);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))}},66828:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(94288).hasColorscale,a=r(27260);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")}},52340:function(t,e,r){"use strict";var n=r(43616),i=r(39032),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(3400),c=u.segmentsIntersect,f=u.constrain,h=r(88200);t.exports=function(t,e){var r,i,o,d,p,v,g,y,m,x,b,_,w,A,M,T,k,S,E=e.trace||{},O=e.xaxis,C=e.yaxis,L="log"===O.type,R="log"===C.type,D=O._length,I=C._length,P=e.backoff,F=E.marker,N=e.connectGaps,B=e.baseTolerance,z=e.shape,j="linear"===z,U=E.fill&&"none"!==E.fill,H=[],V=h.minTolerance,G=t.length,Y=new Array(G),W=0;function q(r){var n=t[r];if(!n)return!1;var i=e.linearized?O.l2p(n.x):O.c2p(n.x),o=e.linearized?C.l2p(n.y):C.c2p(n.y);if(i===a){if(L&&(i=O.c2p(n.x,!0)),i===a)return!1;R&&o===a&&(i*=Math.abs(O._m*I*(O._m>0?s:l)/(C._m*D*(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]/D,n=t[1]/I,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==k&&X(r,n,k,S)&&(i=0),i&&e&&X(r,n,e[0]/D,e[1]/I)&&(i=0),(1+h.toleranceGrowth*i)*B}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=-D*it,ot=D*(1+it),st=-I*it,lt=I*(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===Y[W-1][0],i=r===Y[W-1][1];if(!n||!i)if(W>1){var a=e===Y[W-2][0],o=r===Y[W-2][1];n&&(e===at||e===ot)&&a?o?W--:Y[W-1]=t:i&&(r===st||r===lt)&&o?a?W--:Y[W-1]=t:Y[W++]=t}else Y[W++]=t}function pt(t){Y[W-1][0]!==t[0]&&Y[W-1][1]!==t[1]&&dt([$,tt]),dt(t),et=null,$=tt=0}"linear"===z||"spline"===z?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"===z||"vh"===z?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"===z?nt=ht(0,at,ot):"vhv"===z&&(nt=ht(1,st,lt));var vt=u.isArrayOrTypedArray(F);function gt(e){if(e&&P&&(e.i=r,e.d=t,e.trace=E,e.marker=vt?F[e.i]:F,e.backoff=P),k=e[0]/D,S=e[1]/I,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]),Y[W++]=n[1])}else rt=nt(Y[W-1],e)[0],Y[W++]=rt;else Y[W++]=[K||e[0],Q||e[1]];var i=Y[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]),Y[W++]=e;var a,o,s,l}for(r=0;r<G;r++)if(i=q(r)){for(W=0,et=null,gt(i),r++;r<G;r++){if(!(d=q(r))){if(N)continue;break}if(j&&e.simplify){var yt=q(r+1);if(x=J(d,i),U&&(0===W||W===G-1)||!(x<Z(d,yt)*V)){for(y=[(d[0]-i[0])/x,(d[1]-i[1])/x],p=i,b=x,_=A=M=0,g=!1,o=d,r++;r<t.length;r++){if(v=yt,yt=q(r+1),!v){if(N)continue;break}if(T=(m=[v[0]-i[0],v[1]-i[1]])[0]*y[1]-m[1]*y[0],A=Math.min(A,T),(M=Math.max(M,T))-A>Z(v,yt))break;o=v,(w=m[0]*y[0]+m[1]*y[1])>b?(b=w,d=v,g=!1):w<_&&(_=w,p=v,g=!0)}if(g?(gt(d),o!==p&>(p)):(p!==i&>(p),o!==d&>(d)),gt(o),r>=t.length||!v)break;gt(v),i=v}}else gt(d)}et&&dt([$||et[0],tt||et[1]]),H.push(Y.slice(0,W))}var mt=z.slice(z.length-1);if(P&&"h"!==mt&&"v"!==mt){for(var xt=!1,bt=-1,_t=[],wt=0;wt<H.length;wt++)for(var At=0;At<H[wt].length-1;At++){var Mt=H[wt][At],Tt=H[wt][At+1],kt=n.applyBackoff(Tt,Mt);kt[0]===Tt[0]&&kt[1]===Tt[1]||(xt=!0),_t[bt+1]||(_t[++bt]=[Mt,[kt[0],kt[1]]])}return xt?_t:H}return H}},11731:function(t){"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},14328: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(38248);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"}},74428:function(t,e,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(43028);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")}},31147:function(t,e,r){"use strict";var n=r(3400).dateTick0,i=r(39032).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"))}}},96504:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=a.ensureSingle,s=a.identity,l=r(43616),u=r(43028),c=r(52340),f=r(14328),h=r(92065).tester;function d(t,e,r,f,d,p,v){var g,y=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 y=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+y)%v)&&(t.vis=!0)}))}}}(0,e,r,f,d);var m=!!v&&v.duration>0;function x(t){return m?t.transition():t}var b=r.xaxis,_=r.yaxis,w=f[0].trace,A=w.line,M=n.select(p),T=o(M,"g","errorbars"),k=o(M,"g","lines"),S=o(M,"g","points"),E=o(M,"g","text");if(i.getComponentMethod("errorbars","plot")(t,T,r,v),!0===w.visible){var O,C;x(M).style("opacity",w.opacity);var L,R,D=w.fill.charAt(w.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(L=1,R=_.c2p(0,!0)):"x"===D&&(L=0,R=b.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=M;var I,P,F="",N=[],B=w._prevtrace,z=null,j=null;B&&(F=B._prevRevpath||"",C=B._nextFill,N=B._ownPolygons,z=B._fillsegments,j=B._fillElement);var U,H,V,G,Y,W,q="",X="",Z=[];w._polygons=[];var J=[],K=[],Q=a.noop;if(O=w._ownFill,u.hasLines(w)||"none"!==w.fill){C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(A.shape)?(U=l.steps(A.shape),H=l.steps(A.shape.split("").reverse().join(""))):U=H="spline"===A.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),A.smoothing):l.smoothopen(t,A.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(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:w.fill}),J=new Array(K.length);var $=0;for(g=0;g<K.length;g++){var tt,et=K[g];tt&&D?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&&(G=K[0][0].slice(),W=(Y=K[K.length-1])[Y.length-1].slice()),Q=function(t){return function(e){if(I=U(e),P=V(e),q?D?(q+="L"+I.substr(1),X=P+"L"+X.substr(1)):(q+="Z"+I,X=P+"Z"+X):(q=I,X=P),u.hasLines(w)){var r=n.select(this);if(r.datum(f),t)x(r.style("opacity",0).attr("d",I).call(l.lineGroupStyle)).style("opacity",1);else{var i=x(r);i.attr("d",I),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",y?"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[L]=a[L]=R;var o=[a,i].concat(J[r]);e[r]=h(o)}return e};K.length?(O?(O.datum(f),G&&W&&(D?(G[L]=W[L]=R,x(O).attr("d","M"+W+"L"+G+"L"+q.substr(1)).call(l.singleFillStyle,t),Z=it(null)):(x(O).attr("d",q+"Z").call(l.singleFillStyle,t),Z=nt())),w._polygons=Z,w._fillElement=O):C&&("tonext"===w.fill.substr(0,6)&&q&&F?("tonext"===w.fill?(x(C).attr("d",q+"Z"+F+"Z").call(l.singleFillStyle,t),Z=nt(),w._polygons=Z.concat(N)):(x(C).attr("d",q+"L"+F.substr(1)+"Z").call(l.singleFillStyle,t),Z=it(z),w._polygons=Z),w._fillElement=C):ot(C)),w._prevRevpath=X):(O?ot(O):C&&ot(C),w._prevRevpath=null),w._ownPolygons=Z,S.datum(f),E.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,y=c.stackgroup,w=y&&"infer zero"===t._fullLayout._scatterStackOpts[b._id+_._id][y].stackgaps;c.marker.maxdisplayed||c._needsCull?g=w?lt:st:y&&!w&&(g=ut),f&&(p=g),h&&(v=g)}var A,M=(o=e.selectAll("path.point").data(p,d)).enter().append("path").classed("point",!0);m&&M.call(l.pointStyle,c,t).call(l.translatePoints,b,_).style("opacity",0).transition().style("opacity",1),o.order(),f&&(A=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,A,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()})),m?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()}(S,E,f);var at=!1===w.cliponaxis?null:r.layerClipId;l.setClipUrl(S,at,t),l.setClipUrl(E,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()}},91560:function(t,e,r){"use strict";var n=r(43028);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}},43912: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 y=0;y<u.traces.length-1;y++){var m=u.traces[y];m._input.fill!==m.fill&&(m.fill=u.fillDflt)}}}return u}}},49224:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(24040);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))}}},43028:function(t,e,r){"use strict";var n=r(3400),i=r(38116).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"))}},43980:function(t,e,r){"use strict";var n=r(3400),i=r(24040);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}},41484:function(t,e,r){"use strict";var n=r(20148),i=r(90136);t.exports=function(t,e){var r=[{x:!1,y:!1,trace:e,t:{}}];return n(r,e),i(t,e),r}},2876:function(t,e,r){"use strict";var n=r(45464),i=r(98304),a=r(52904),o=r(29736).axisHoverFormat,s=r(49084),l=r(95376),u=r(92880).extendFlat,c=r(67824).overrideAll,f=r(67072).DASHES,h=a.line,d=a.marker,p=d.line,v=t.exports=c({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("y"),text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:a.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:h.color,width:h.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:l(f),dflt:"solid"}},marker:u({},s("marker"),{symbol:d.symbol,angle:d.angle,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,opacity:d.opacity,colorbar:d.colorbar,line:u({},s("marker.line"),{width:p.width})}),connectgaps:a.connectgaps,fill:u({},a.fill,{dflt:"none"}),fillcolor:i(),selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");v.x.editType=v.y.editType=v.x0.editType=v.y0.editType="calc+clearAxisTypes",v.hovertemplate=a.hovertemplate,v.texttemplate=a.texttemplate},64628:function(t,e,r){"use strict";var n=r(41272);t.exports={moduleType:"trace",name:"scattergl",basePlotModule:r(57952),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:r(2876),supplyDefaults:r(80220),crossTraceDefaults:r(35036),colorbar:r(5528),formatLabels:r(99396),calc:r(24856),hoverPoints:n.hoverPoints,selectPoints:r(73224),meta:{}}},24856:function(t,e,r){"use strict";var n=r(3108),i=r(3400),a=r(79811),o=r(19280).findExtremes,s=r(1220),l=r(16356),u=l.calcMarkerSize,c=l.calcAxisExpansion,f=l.setFirstScatter,h=r(90136),d=r(6616),p=r(74588),v=r(39032).BADNUM,g=r(67072).TOO_MANY_POINTS;function y(t,e,r){var n=t._extremes[e._id],i=o(e,r._bnds,{padded:!0});n.min=n.min.concat(i.min),n.max=n.max.concat(i.max)}t.exports=function(t,e){var r,o=t._fullLayout,l=e._xA=a.getFromId(t,e.xaxis,"x"),m=e._yA=a.getFromId(t,e.yaxis,"y"),x=o._plots[e.xaxis+e.yaxis],b=e._length,_=b>=g,w=2*b,A={},M=l.makeCalcdata(e,"x"),T=m.makeCalcdata(e,"y"),k=s(e,l,"x",M),S=s(e,m,"y",T),E=k.vals,O=S.vals;e._x=E,e._y=O,e.xperiodalignment&&(e._origX=M,e._xStarts=k.starts,e._xEnds=k.ends),e.yperiodalignment&&(e._origY=T,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),L=new Array(b);for(r=0;r<b;r++)C[2*r]=E[r]===v?NaN:E[r],C[2*r+1]=O[r]===v?NaN:O[r],L[r]=r;if("log"===l.type)for(r=0;r<w;r+=2)C[r]=l.c2l(C[r]);if("log"===m.type)for(r=1;r<w;r+=2)C[r]=m.c2l(C[r]);_&&"log"!==l.type&&"log"!==m.type?A.tree=n(C):A.ids=L,h(t,e);var R,D=function(t,e,r,n,a,o){var s=d.style(t,r);if(s.marker&&(s.marker.positions=n),s.line&&n.length>1&&i.extendFlat(s.line,d.linePositions(t,r,n)),s.errorX||s.errorY){var l=d.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},d.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},d.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},d.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,C,E,O),I=p(t,x);return f(o,e),_?D.marker&&(R=D.marker.sizeAvg||Math.max(D.marker.size,3)):R=u(e,b),c(t,e,l,m,E,O,R),D.errorX&&y(e,l,D.errorX),D.errorY&&y(e,m,D.errorY),D.fill&&!I.fill2d&&(I.fill2d=!0),D.marker&&!I.scatter2d&&(I.scatter2d=!0),D.line&&!I.line2d&&(I.line2d=!0),!D.errorX&&!D.errorY||I.error2d||(I.error2d=!0),D.text&&!I.glText&&(I.glText=!0),D.marker&&(D.marker.snap=b),I.lineOptions.push(D.line),I.errorXOptions.push(D.errorX),I.errorYOptions.push(D.errorY),I.fillOptions.push(D.fill),I.markerOptions.push(D.marker),I.markerSelectedOptions.push(D.markerSel),I.markerUnselectedOptions.push(D.markerUnsel),I.textOptions.push(D.text),I.textSelectedOptions.push(D.textSel),I.textUnselectedOptions.push(D.textUnsel),I.selectBatch.push([]),I.unselectBatch.push([]),A._scene=I,A.index=I.count,A.x=E,A.y=O,A.positions=C,I.count++,[{x:!1,y:!1,t:A,trace:e}]}},67072:function(t){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},6616:function(t,e,r){"use strict";var n=r(38248),i=r(20472),a=r(72160),o=r(24040),s=r(3400),l=s.isArrayOrTypedArray,u=r(43616),c=r(79811),f=r(33040).formatColor,h=r(43028),d=r(7152),p=r(80088),v=r(67072),g=r(13448).DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=r(10624).appendArrayPointValue;function x(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,u=e.textposition,c=l(u)?u:[u],f=o.color,h=o.size,d=o.family,p={},v=t._context.plotGlPixelRatio,g=e.texttemplate;if(g){p.text=[];var y=i._d3locale,x=Array.isArray(g),b=x?Math.min(g.length,a):a,_=x?function(t){return g[t]}:function(){return g};for(r=0;r<b;r++){var w={i:r},A=e._module.formatLabels(w,e,i),M={};m(M,e,r);var T=e._meta||{};p.text.push(s.texttemplateString(_(r),A,y,M,w,T))}}else l(e.text)&&e.text.length<a?p.text=e.text.slice():p.text=e.text;if(l(p.text))for(r=p.text.length;r<a;r++)p.text[r]="";for(p.opacity=e.opacity,p.font={},p.align=[],p.baseline=[],r=0;r<c.length;r++){var k=c[r].split(/\s+/);switch(k[1]){case"left":p.align.push("right");break;case"right":p.align.push("left");break;default:p.align.push(k[1])}switch(k[0]){case"top":p.baseline.push("bottom");break;case"bottom":p.baseline.push("top");break;default:p.baseline.push(k[0])}}if(l(f))for(p.color=new Array(a),r=0;r<a;r++)p.color[r]=f[r];else p.color=f;if(l(h)||l(d))for(p.font=new Array(a),r=0;r<a;r++){var S=p.font[r]={};S.size=(s.isTypedArray(h)?h[r]:l(h)?n(h[r])?h[r]:0:h)*v,S.family=l(d)?d[r]:d}else p.font={size:h*v,family:d};return p}function b(t,e){var r,n,i=e._length,o=e.marker,s={},u=l(o.symbol),c=l(o.angle),h=l(o.color),v=l(o.line.color),g=l(o.opacity),y=l(o.size),m=l(o.line.width);if(u||(n=p.isOpenSymbol(o.symbol)),u||h||v||g||c){s.symbols=new Array(i),s.angles=new Array(i),s.colors=new Array(i),s.borderColors=new Array(i);var x=o.symbol,b=o.angle,_=f(o,o.opacity,i),w=f(o.line,o.opacity,i);if(!l(w[0])){var A=w;for(w=Array(i),r=0;r<i;r++)w[r]=A}if(!l(_[0])){var M=_;for(_=Array(i),r=0;r<i;r++)_[r]=M}if(!l(x)){var T=x;for(x=Array(i),r=0;r<i;r++)x[r]=T}if(!l(b)){var k=b;for(b=Array(i),r=0;r<i;r++)b[r]=k}for(s.symbols=x,s.angles=b,s.colors=_,s.borderColors=w,r=0;r<i;r++)u&&(n=p.isOpenSymbol(o.symbol[r])),n&&(w[r]=_[r].slice(),_[r]=_[r].slice(),_[r][3]=0);for(s.opacity=e.opacity,s.markers=new Array(i),r=0;r<i;r++)s.markers[r]=O({mx:s.symbols[r],ma:s.angles[r]},e)}else n?(s.color=a(o.color,"uint8"),s.color[3]=0,s.borderColor=a(o.color,"uint8")):(s.color=a(o.color,"uint8"),s.borderColor=a(o.line.color,"uint8")),s.opacity=e.opacity*o.opacity,s.marker=O({mx:o.symbol,ma:o.angle},e);var S,E=d(e,1);if(y||m){var C,L=s.sizes=new Array(i),R=s.borderSizes=new Array(i),D=0;if(y){for(r=0;r<i;r++)L[r]=E(o.size[r]),D+=L[r];C=D/i}else for(S=E(o.size),r=0;r<i;r++)L[r]=S;if(m)for(r=0;r<i;r++)R[r]=o.line.width[r];else for(S=o.line.width,r=0;r<i;r++)R[r]=S;s.sizeAvg=C}else s.size=E(o&&o.size||10),s.borderSizes=E(o.line.width);return s}function _(t,e,r){var n=e.marker,i={};return r?(r.marker&&r.marker.symbol?i=b(0,s.extendFlat({},n,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),void 0!==r.marker.opacity&&(i.opacity=r.marker.opacity)),i):i}function w(t,e,r){var n={};if(!r)return n;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:s.extendFlat({},e.textfont)};r.textfont&&s.extendFlat(i.textfont,r.textfont),n=x(t,i)}return n}function A(t,e,r){var n={capSize:2*e.width*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(n=t.error_y),n}var M=v.SYMBOL_SDF_SIZE,T=v.SYMBOL_SIZE,k=v.SYMBOL_STROKE,S={},E=u.symbolFuncs[0](.05*T);function O(t,e){var r,n,a=t.mx;if("circle"===a)return null;var o=u.symbolNumber(a),s=u.symbolFuncs[o%100],l=!!u.symbolNoDot[o%100],c=!!u.symbolNoFill[o%100],f=p.isDotSymbol(a);if(t.ma&&(a+="_"+t.ma),S[a])return S[a];var h=u.getMarkerAngle(t,e);return r=f&&!l?s(1.1*T,h)+E:s(T,h),n=i(r,{w:M,h:M,viewBox:[-T,-T,T,T],stroke:c?k:-k}),S[a]=n,n||null}t.exports={style:function(t,e){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(!0!==e.visible)return n;if(h.hasText(e)&&(n.text=x(t,e),n.textSel=w(t,e,e.selected),n.textUnsel=w(t,e,e.unselected)),h.hasMarkers(e)&&(n.marker=b(0,e),n.markerSel=_(0,e,e.selected),n.markerUnsel=_(0,e,e.unselected),!e.unselected&&l(e.marker.opacity))){var a=e.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=g*a[r]}if(h.hasLines(e)){n.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(v.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;n.line.dashes=o}return e.error_x&&e.error_x.visible&&(n.errorX=A(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(n.errorY=A(e,e.error_y,i)),e.fill&&"none"!==e.fill&&(n.fill={closed:!0,fill:e.fillcolor,thickness:0}),n},markerStyle:b,markerSelection:_,linePositions:function(t,e,r){var n,i,a=r.length,o=a/2;if(h.hasLines(e)&&o)if("hv"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i+2],r[2*i+1]));n.push(r[a-2],r[a-1])}else if("hvh"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var s=(r[2*i]+r[2*i+2])/2;n.push(r[2*i],r[2*i+1],s,r[2*i+1],s,r[2*i+3])}n.push(r[a-2],r[a-1])}else if("vhv"===e.line.shape){for(n=[],i=0;i<o-1;i++)if(isNaN(r[2*i])||isNaN(r[2*i+1])||isNaN(r[2*i+2])||isNaN(r[2*i+3]))isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+1]),n.push(NaN,NaN);else{var l=(r[2*i+1]+r[2*i+3])/2;n.push(r[2*i],r[2*i+1],r[2*i],l,r[2*i+2],l)}n.push(r[a-2],r[a-1])}else if("vh"===e.line.shape){for(n=[],i=0;i<o-1;i++)isNaN(r[2*i])||isNaN(r[2*i+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*i],r[2*i+1]),isNaN(r[2*i+2])||isNaN(r[2*i+3])?n.push(NaN,NaN):n.push(r[2*i],r[2*i+3]));n.push(r[a-2],r[a-1])}else n=r;var u=!1;for(i=0;i<n.length;i++)if(isNaN(n[i])){u=!0;break}var c=u||n.length>v.TOO_MANY_POINTS||h.hasMarkers(e)?"rect":"round";if(u&&e.connectgaps){var f=n[0],d=n[1];for(i=0;i<n.length;i+=2)isNaN(n[i])||isNaN(n[i+1])?(n[i]=f,n[i+1]=d):(f=n[i],d=n[i+1])}return{join:c,positions:n}},errorBarPositions:function(t,e,r,i,a){var s=o.getComponentMethod("errorbars","makeComputeError"),l=c.getFromId(t,e.xaxis,"x"),u=c.getFromId(t,e.yaxis,"y"),f=r.length/2,h={};function d(t,i){var a=i._id.charAt(0),o=e["error_"+a];if(o&&o.visible&&("linear"===i.type||"log"===i.type)){for(var l=s(o),u={x:0,y:1}[a],c={x:[0,1,2,3],y:[2,3,0,1]}[a],d=new Float64Array(4*f),p=1/0,v=-1/0,g=0,y=0;g<f;g++,y+=4){var m=t[g];if(n(m)){var x=r[2*g+u],b=l(m,g),_=b[0],w=b[1];if(n(_)&&n(w)){var A=m-_,M=m+w;d[y+c[0]]=x-i.c2l(A),d[y+c[1]]=i.c2l(M)-x,d[y+c[2]]=0,d[y+c[3]]=0,p=Math.min(p,m-_),v=Math.max(v,m+w)}}}h[a]={positions:r,errors:d,_bnds:[p,v]}}}return d(i,l),d(a,u),h},textPosition:function(t,e,r,n){var i,a=e._length,o={};if(h.hasMarkers(e)){var s=r.font,u=r.align,c=r.baseline;for(o.offset=new Array(a),i=0;i<a;i++){var f=n.sizes?n.sizes[i]:n.size,d=l(s)?s[i].size:s.size,p=l(u)?u.length>1?u[i]:u[0]:u,v=l(c)?c.length>1?c[i]:c[0]:c,g=y[p],m=y[v],x=f?f/.8+1:0,b=-m*x-.5*m;o.offset[i]=[g*x/d,b/d]}}return o}}},80220:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(80088),o=r(2876),s=r(88200),l=r(43028),u=r(43980),c=r(31147),f=r(74428),h=r(66828),d=r(70840),p=r(124);t.exports=function(t,e,r,v){function g(r,i){return n.coerce(t,e,o,r,i)}var y=!!t.marker&&a.isOpenSymbol(t.marker.symbol),m=l.isBubble(t),x=u(t,e,v,g);if(x){c(t,e,v,g),g("xhoverformat"),g("yhoverformat");var b=x<s.PTS_LINESONLY?"lines+markers":"lines";g("text"),g("hovertext"),g("hovertemplate"),g("mode",b),l.hasMarkers(e)&&(f(t,e,r,v,g,{noAngleRef:!0,noStandOff:!0}),g("marker.line.width",y||m?1:0)),l.hasLines(e)&&(g("connectgaps"),h(t,e,r,v,g),g("line.shape")),l.hasText(e)&&(g("texttemplate"),p(t,e,v,g));var _=(e.line||{}).color,w=(e.marker||{}).color;g("fill"),"none"!==e.fill&&d(t,e,r,g);var A=i.getComponentMethod("errorbars","supplyDefaults");A(t,e,_||w||r,{axis:"y"}),A(t,e,_||w||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(e,g)}else e.visible=!1}},26768:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(13448).DESELECTDIM;t.exports={styleTextSelection:function(t){var e,r,o=t[0],s=o.trace,l=o.t,u=l._scene,c=l.index,f=u.selectBatch[c],h=u.unselectBatch[c],d=u.textOptions[c],p=u.textSelectedOptions[c]||{},v=u.textUnselectedOptions[c]||{},g=n.extendFlat({},d);if(f.length||h.length){var y=p.color,m=v.color,x=d.color,b=n.isArrayOrTypedArray(x);for(g.color=new Array(s._length),e=0;e<f.length;e++)r=f[e],g.color[r]=y||(b?x[r]:x);for(e=0;e<h.length;e++){r=h[e];var _=b?x[r]:x;g.color[r]=m||(y?_:i.addOpacity(_,a))}}u.glText[c].update(g)}}},99396:function(t,e,r){"use strict";var n=r(76688);t.exports=function(t,e,r){var i=t.i;return"x"in t||(t.x=e._x[i]),"y"in t||(t.y=e._y[i]),n(t,e,r)}},80088:function(t,e,r){"use strict";var n=r(67072);e.isOpenSymbol=function(t){return"string"==typeof t?n.OPEN_RE.test(t):t%200>100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},41272:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(44928);function o(t,e,r,o){var s=t.xa,l=t.ya,u=t.distance,c=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=i.isArrayOrTypedArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var d=o.textfont;d&&(h.ts=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.tc=Array.isArray(d.color)?d.color[f]:d.color,h.tf=Array.isArray(d.family)?d.family[f]:d.family);var p=o.marker;p&&(h.ms=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.mo=i.isArrayOrTypedArray(p.opacity)?p.opacity[f]:p.opacity,h.mx=i.isArrayOrTypedArray(p.symbol)?p.symbol[f]:p.symbol,h.ma=i.isArrayOrTypedArray(p.angle)?p.angle[f]:p.angle,h.mc=i.isArrayOrTypedArray(p.color)?p.color[f]:p.color);var v=p&&p.line;v&&(h.mlc=Array.isArray(v.color)?v.color[f]:v.color,h.mlw=i.isArrayOrTypedArray(v.width)?v.width[f]:v.width);var g=p&&p.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[f]:g.type,h.mgc=Array.isArray(g.color)?g.color[f]:g.color);var y=s.c2p(h.x,!0),m=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var A={};A[t.index]=h;var M=o._origX,T=o._origY,k=i.extendFlat({},t,{color:a(o,h),x0:y-x,x1:y+x,xLabelVal:M?M[f]:h.x,y0:m-x,y1:m+x,yLabelVal:T?T[f]:h.y,cd:A,distance:u,spikeDistance:c,hovertemplate:h.ht});return h.htx?k.text=h.htx:h.tx?k.text=h.tx:o.text&&(k.text=o.text),i.fillText(h,o,k),n.getComponentMethod("errorbars","hoverInfo")(h,o,k),k}t.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,u,c,f,h,d,p,v=t.cd,g=v[0].t,y=v[0].trace,m=t.xa,x=t.ya,b=g.x,_=g.y,w=m.c2p(e),A=x.c2p(r),M=t.distance;if(g.tree){var T=m.p2c(w-M),k=m.p2c(w+M),S=x.p2c(A-M),E=x.p2c(A+M);i="x"===n?g.tree.range(Math.min(T,k),Math.min(x._rl[0],x._rl[1]),Math.max(T,k),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(T,k),Math.min(S,E),Math.max(T,k),Math.max(S,E))}else i=g.ids;var O=M;if("x"===n){var C=!!y.xperiodalignment,L=!!y.yperiodalignment;for(c=0;c<i.length;c++){if(l=b[a=i[c]],f=Math.abs(m.c2p(l)-w),C){var R=m.c2p(y._xStarts[a]),D=m.c2p(y._xEnds[a]);f=w>=Math.min(R,D)&&w<=Math.max(R,D)?0:1/0}if(f<O){if(O=f,u=_[a],h=x.c2p(u)-A,L){var I=x.c2p(y._yStarts[a]),P=x.c2p(y._yEnds[a]);h=A>=Math.min(I,P)&&A<=Math.max(I,P)?0:1/0}p=Math.sqrt(f*f+h*h),s=i[c]}}}else for(c=i.length-1;c>-1;c--)l=b[a=i[c]],u=_[a],f=m.c2p(l)-w,h=x.c2p(u)-A,(d=Math.sqrt(f*f+h*h))<O&&(O=p=d,s=a);return t.index=s,t.distance=O,t.dxy=p,void 0===s?[t]:[o(t,b,_,y)]},calcHover:o}},38983:function(t,e,r){"use strict";var n=r(64628);n.plot=r(89876),t.exports=n},89876:function(t,e,r){"use strict";var n=r(38540),i=r(13472),a=r(24544),o=r(23352),s=r(3400),l=r(72760).selectMode,u=r(5048),c=r(43028),f=r(14328),h=r(26768).styleTextSelection,d={};function p(t,e,r,n){var i=t._size,a=t.width*n,o=t.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+e.domain[0]*f,l+r.domain[0]*h,a-u-(1-e.domain[1])*f,o-c-(1-r.domain[1])*h]}(t.exports=function(t,e,r){if(r.length){var v,g,y=t._fullLayout,m=e._scene,x=e.xaxis,b=e.yaxis;if(m)if(u(t,["ANGLE_instanced_arrays","OES_element_index_uint"],d)){var _=m.count,w=y._glcanvas.data()[0].regl;if(f(t,e,r),m.dirty){if(!m.line2d&&!m.error2d||m.scatter2d||m.fill2d||m.glText||w.clear({}),!0===m.error2d&&(m.error2d=a(w)),!0===m.line2d&&(m.line2d=i(w)),!0===m.scatter2d&&(m.scatter2d=n(w)),!0===m.fill2d&&(m.fill2d=i(w)),!0===m.glText)for(m.glText=new Array(_),v=0;v<_;v++)m.glText[v]=new o(w);if(m.glText){if(_>m.glText.length){var A=_-m.glText.length;for(v=0;v<A;v++)m.glText.push(new o(w))}else if(_<m.glText.length){var M=m.glText.length-_;m.glText.splice(_,M).forEach((function(t){t.destroy()}))}for(v=0;v<_;v++)m.glText[v].update(m.textOptions[v])}if(m.line2d&&(m.line2d.update(m.lineOptions),m.lineOptions=m.lineOptions.map((function(t){if(t&&t.positions){for(var e=t.positions,r=0;r<e.length&&(isNaN(e[r])||isNaN(e[r+1]));)r+=2;for(var n=e.length-2;n>r&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),m.line2d.update(m.lineOptions)),m.error2d){var T=(m.errorXOptions||[]).concat(m.errorYOptions||[]);m.error2d.update(T)}m.scatter2d&&m.scatter2d.update(m.markerOptions),m.fillOrder=s.repeat(null,_),m.fill2d&&(m.fillOptions=m.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,u=m.lineOptions[e],c=[];s._ownfill&&c.push(e),s._nexttrace&&c.push(e+1),c.length&&(m.fillOrder[e]=c);var f,h,d=[],p=u&&u.positions||l.positions;if("tozeroy"===s.fill){for(f=0;f<p.length&&isNaN(p[f+1]);)f+=2;for(h=p.length-2;h>f&&isNaN(p[h+1]);)h-=2;0!==p[f+1]&&(d=[p[f],0]),d=d.concat(p.slice(f,h+2)),0!==p[h+1]&&(d=d.concat([p[h],0]))}else if("tozerox"===s.fill){for(f=0;f<p.length&&isNaN(p[f]);)f+=2;for(h=p.length-2;h>f&&isNaN(p[h]);)h-=2;0!==p[f]&&(d=[0,p[f+1]]),d=d.concat(p.slice(f,h+2)),0!==p[h]&&(d=d.concat([0,p[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(d=[],i=0,t.splitNull=!0,a=0;a<p.length;a+=2)(isNaN(p[a])||isNaN(p[a+1]))&&((d=d.concat(p.slice(i,a))).push(p[i],p[i+1]),d.push(null,null),i=a+2);d=d.concat(p.slice(i)),i&&d.push(p[i],p[i+1])}else{var v=s._nexttrace;if(v){var g=m.lineOptions[e+1];if(g){var y=g.positions;if("tonexty"===s.fill){for(d=p.slice(),e=Math.floor(y.length/2);e--;){var x=y[2*e],b=y[2*e+1];isNaN(x)||isNaN(b)||d.push(x,b)}t.fill=v.fillcolor}}}}if(s._prevtrace&&"tonext"===s._prevtrace.fill){var _=m.lineOptions[e-1].positions,w=d.length/2,A=[i=w];for(a=0;a<_.length;a+=2)(isNaN(_[a])||isNaN(_[a+1]))&&(A.push(a/2+w+1),i=a+2);d=d.concat(_),t.hole=A}return t.fillmode=s.fill,t.opacity=s.opacity,t.positions=d,t}})),m.fill2d.update(m.fillOptions))}var k=y.dragmode,S=l(k),E=y.clickmode.indexOf("select")>-1;for(v=0;v<_;v++){var O=r[v][0],C=O.trace,L=O.t,R=L.index,D=C._length,I=L.x,P=L.y;if(C.selectedpoints||S||E){if(S||(S=!0),C.selectedpoints){var F=m.selectBatch[R]=s.selIndices2selPoints(C),N={};for(g=0;g<F.length;g++)N[F[g]]=1;var B=[];for(g=0;g<D;g++)N[g]||B.push(g);m.unselectBatch[R]=B}var z=L.xpx=new Array(D),j=L.ypx=new Array(D);for(g=0;g<D;g++)z[g]=x.c2p(I[g]),j[g]=b.c2p(P[g])}else L.xpx=L.ypx=null}if(S){if(m.select2d||(m.select2d=n(y._glcanvas.data()[1].regl)),m.scatter2d){var U=new Array(_);for(v=0;v<_;v++)U[v]=m.selectBatch[v].length||m.unselectBatch[v].length?m.markerUnselectedOptions[v]:{};m.scatter2d.update(U)}m.select2d&&(m.select2d.update(m.markerOptions),m.select2d.update(m.markerSelectedOptions)),m.glText&&r.forEach((function(t){var e=((t||[])[0]||{}).trace||{};c.hasText(e)&&h(t)}))}else m.scatter2d&&m.scatter2d.update(m.markerOptions);var H={viewport:p(y,x,b,t._context.plotGlPixelRatio),range:[(x._rl||x.range)[0],(b._rl||b.range)[0],(x._rl||x.range)[1],(b._rl||b.range)[1]]},V=s.repeat(H,m.count);m.fill2d&&m.fill2d.update(V),m.line2d&&m.line2d.update(V),m.error2d&&m.error2d.update(V.concat(V)),m.scatter2d&&m.scatter2d.update(V),m.select2d&&m.select2d.update(V),m.glText&&m.glText.forEach((function(t){t.update(H)}))}else m.init()}}).reglPrecompiled=d},74588:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){var r=e._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return e._scene||((r=e._scene={}).init=function(){n.extendFlat(r,a,i)},r.init(),r.update=function(t){var e=n.repeat(t,r.count);if(r.fill2d&&r.fill2d.update(e),r.scatter2d&&r.scatter2d.update(e),r.line2d&&r.line2d.update(e),r.error2d&&r.error2d.update(e.concat(e)),r.select2d&&r.select2d.update(e),r.glText)for(var i=0;i<r.count;i++)r.glText[i].update(t)},r.draw=function(){for(var t=r.count,e=r.fill2d,i=r.error2d,a=r.line2d,o=r.scatter2d,s=r.glText,l=r.select2d,u=r.selectBatch,c=r.unselectBatch,f=0;f<t;f++){if(e&&r.fillOrder[f]&&e.draw(r.fillOrder[f]),a&&r.lineOptions[f]&&a.draw(f),i&&(r.errorXOptions[f]&&i.draw(f),r.errorYOptions[f]&&i.draw(f+t)),o&&r.markerOptions[f])if(c[f].length){var h=n.repeat([],r.count);h[f]=c[f],o.draw(h)}else u[f].length||o.draw(f);s[f]&&r.textOptions[f]&&s[f].render()}l&&l.draw(u),r.dirty=!1},r.destroy=function(){r.fill2d&&r.fill2d.destroy&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy&&r.error2d.destroy(),r.line2d&&r.line2d.destroy&&r.line2d.destroy(),r.select2d&&r.select2d.destroy&&r.select2d.destroy(),r.glText&&r.glText.forEach((function(t){t.destroy&&t.destroy()})),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,e._scene=null}),r.dirty||n.extendFlat(r,i),r}},73224:function(t,e,r){"use strict";var n=r(43028),i=r(26768).styleTextSelection;t.exports=function(t,e){var r=t.cd,a=t.xaxis,o=t.yaxis,s=[],l=r[0].trace,u=r[0].t,c=l._length,f=u.x,h=u.y,d=u._scene,p=u.index;if(!d)return s;var v=n.hasText(l),g=n.hasMarkers(l),y=!g&&!v;if(!0!==l.visible||y)return s;var m=[],x=[];if(!1!==e&&!e.degenerate)for(var b=0;b<c;b++)e.contains([u.xpx[b],u.ypx[b]],!1,b,t)?(m.push(b),s.push({pointNumber:b,x:a.c2d(f[b]),y:o.c2d(h[b])})):x.push(b);if(g){var _=d.scatter2d;if(m.length||x.length){if(!d.selectBatch[p].length&&!d.unselectBatch[p].length){var w=new Array(d.count);w[p]=d.markerUnselectedOptions[p],_.update.apply(_,w)}}else{var A=new Array(d.count);A[p]=d.markerOptions[p],_.update.apply(_,A)}}return d.selectBatch[p]=m,d.unselectBatch[p]=x,v&&i(r),s}},44524:function(t,e,r){"use strict";var n=r(52904),i=r(49084),a=r(29736).axisHoverFormat,o=r(21776).Ks,s=r(2876),l=r(33816).idRegex,u=r(31780).templatedArray,c=r(92880).extendFlat,f=n.marker,h=f.line,d=c(i("marker.line",{editTypeOverride:"calc"}),{width:c({},h.width,{editType:"calc"}),editType:"calc"}),p=c(i("marker"),{symbol:f.symbol,angle:f.angle,size:c({},f.size,{editType:"markerSize"}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:f.opacity,colorbar:f.colorbar,line:d,editType:"calc"});function v(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:l[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",t.exports={dimensions:u("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:c({},s.text,{}),hovertext:c({},s.hovertext,{}),hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),marker:p,xaxes:v("x"),yaxes:v("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:s.selected.marker,editType:"calc"},unselected:{marker:s.unselected.marker,editType:"calc"},opacity:s.opacity}},28888:function(t,e,r){"use strict";var n=r(24040),i=r(12704);t.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:r(44524),supplyDefaults:r(69544),colorbar:r(5528),calc:r(66821),plot:r(54840),hoverPoints:r(72248).hoverPoints,selectPoints:r(84880),editStyle:r(83156),meta:{}},n.register(i)},99332:function(t,e,r){"use strict";var n=r(13472),i=r(24040),a=r(5048),o=r(84888)._M,s=r(57952),l=r(79811).getFromId,u=r(54460).shouldShowZeroLine,c="splom",f={};function h(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;o<i.length;o++){var s=i[o],u=a[o]=new Array(4),c=l(t,e._diag[s][0]);c&&(u[0]=c.r2l(c.range[0]),u[2]=c.r2l(c.range[1]));var f=l(t,e._diag[s][1]);f&&(u[1]=f.r2l(f.range[0]),u[3]=f.r2l(f.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function d(t){var e=t._fullLayout,r=e._glcanvas.data()[0].regl,i=e._splomGrid;i||(i=e._splomGrid=n(r)),i.update(function(t){var e,r=t._context.plotGlPixelRatio,n=t._fullLayout,i=n._size,a=[0,0,n.width*r,n.height*r],o={};function s(t,e,n,i,s,l){n*=r,i*=r,s*=r,l*=r;var u=e[t+"color"],c=e[t+"width"],f=String(u+c);f in o?o[f].data.push(NaN,NaN,n,i,s,l):o[f]={data:[n,i,s,l],join:"rect",thickness:c*r,color:u,viewport:a,range:a,overlay:!1}}for(e in n._splomSubplots){var l,c,f=n._plots[e],h=f.xaxis,d=f.yaxis,p=h._gridVals,v=d._gridVals,g=h._offset,y=h._length,m=d._length,x=i.b+d.domain[0]*i.h,b=-d._m,_=-b*d.r2l(d.range[0],d.calendar);if(h.showgrid)for(e=0;e<p.length;e++)l=g+h.l2p(p[e].x),s("grid",h,l,x,l,x+m);if(d.showgrid)for(e=0;e<v.length;e++)s("grid",d,g,c=x+_+b*v[e].x,g+y,c);u(t,h,d)&&(l=g+h.l2p(0),s("zeroline",h,l,x,l,x+m)),u(t,d,h)&&s("zeroline",d,g,c=x+_+0,g+y,c)}var w=[];for(e in o)w.push(o[e]);return w}(t))}t.exports={name:c,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(t){var e=t._fullLayout,r=i.getModule(c),n=o(t.calcdata,r)[0];a(t,["ANGLE_instanced_arrays","OES_element_index_uint"],f)&&(e._hasOnlyLargeSploms&&d(t),r.plot(t,{},n))},drag:function(t){var e=t.calcdata,r=t._fullLayout;r._hasOnlyLargeSploms&&d(t);for(var n=0;n<e.length;n++){var i=e[n][0].trace,a=r._splomScenes[i.uid];"splom"===i.type&&a&&a.matrix&&h(t,i,a)}},updateGrid:d,clean:function(t,e,r,n){var i,a={};if(n._splomScenes){for(i=0;i<t.length;i++){var o=t[i];"splom"===o.type&&(a[o.uid]=1)}for(i=0;i<r.length;i++){var l=r[i];if(!a[l.uid]){var u=n._splomScenes[l.uid];u&&u.destroy&&u.destroy(),n._splomScenes[l.uid]=null,delete n._splomScenes[l.uid]}}}0===Object.keys(n._splomScenes||{}).length&&delete n._splomScenes,n._splomGrid&&!e._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),s.clean(t,e,r,n)},updateFx:s.updateFx,toSVG:s.toSVG,reglPrecompiled:f}},66821:function(t,e,r){"use strict";var n=r(3400),i=r(79811),a=r(16356).calcMarkerSize,o=r(16356).calcAxisExpansion,s=r(90136),l=r(6616).markerSelection,u=r(6616).markerStyle,c=r(72308),f=r(39032).BADNUM,h=r(67072).TOO_MANY_POINTS;t.exports=function(t,e){var r,d,p,v,g,y,m=e.dimensions,x=e._length,b={},_=b.cdata=[],w=b.data=[],A=e._visibleDims=[];function M(t,r){for(var i=t.makeCalcdata({v:r.values,vcalendar:e.calendar},"v"),a=0;a<i.length;a++)i[a]=i[a]===f?NaN:i[a];_.push(i),w.push("log"===t.type?n.simpleMap(i,t.c2l):i)}for(r=0;r<m.length;r++)if((p=m[r]).visible){if(v=i.getFromId(t,e._diag[r][0]),g=i.getFromId(t,e._diag[r][1]),v&&g&&v.type!==g.type){n.log("Skipping splom dimension "+r+" with conflicting axis types");continue}v?(M(v,p),g&&"category"===g.type&&(g._categories=v._categories.slice())):M(g,p),A.push(r)}for(s(t,e),n.extendFlat(b,u(t,e)),y=_.length*x>h?b.sizeAvg||Math.max(b.size,3):a(e,x),d=0;d<A.length;d++)p=m[r=A[d]],v=i.getFromId(t,e._diag[r][0])||{},g=i.getFromId(t,e._diag[r][1])||{},o(t,e,v,g,_[d],_[d],y);var T=c(t,e);return T.matrix||(T.matrix=!0),T.matrixOptions=b,T.selectedOptions=l(t,e,e.selected),T.unselectedOptions=l(t,e,e.unselected),[{x:!1,y:!1,t:{},trace:e}]}},69544:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(44524),o=r(43028),s=r(74428),l=r(26284),u=r(80088).isOpenSymbol;function c(t,e){function r(r,i){return n.coerce(t,e,a.dimensions,r,i)}r("label");var i=r("values");i&&i.length?r("visible"):e.visible=!1,r("axis.type"),r("axis.matches")}t.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,a,r,i)}var d=i(t,e,{name:"dimensions",handleItemDefaults:c}),p=h("diagonal.visible"),v=h("showupperhalf"),g=h("showlowerhalf");if(l(e,d,"values")&&(p||v||g)){h("text"),h("hovertext"),h("hovertemplate"),h("xhoverformat"),h("yhoverformat"),s(t,e,r,f,h,{noAngleRef:!0,noStandOff:!0});var y=u(e.marker.symbol),m=o.isBubble(e);h("marker.line.width",y||m?1:0),function(t,e,r,n){var i,a,o=e.dimensions,s=o.length,l=e.showupperhalf,u=e.showlowerhalf,c=e.diagonal.visible,f=new Array(s),h=new Array(s);for(i=0;i<s;i++){var d=i?i+1:"";f[i]="x"+d,h[i]="y"+d}var p=n("xaxes",f),v=n("yaxes",h),g=e._diag=new Array(s);e._xaxes={},e._yaxes={};var y=[],m=[];function x(t,n,i,a){if(t){var o=t.charAt(0),s=r._splomAxes[o];if(e["_"+o+"axes"][t]=1,a.push(t),!(t in s)){var l=s[t]={};i&&(l.label=i.label||"",i.visible&&i.axis&&(i.axis.type&&(l.type=i.axis.type),i.axis.matches&&(l.matches=n)))}}}var b=!c&&!u,_=!c&&!l;for(e._axesDim={},i=0;i<s;i++){var w=o[i],A=0===i,M=i===s-1,T=A&&b||M&&_?void 0:p[i],k=A&&_||M&&b?void 0:v[i];x(T,k,w,y),x(k,T,w,m),g[i]=[T,k],e._axesDim[T]=i,e._axesDim[k]=i}for(i=0;i<y.length;i++)for(a=0;a<m.length;a++){var S=y[i]+m[a];i>a&&l||i<a&&u?r._splomSubplots[S]=1:i!==a||!c&&u&&l||(r._splomSubplots[S]=1)}(!u||!c&&l&&u)&&(r._splomGridDflt.xside="bottom",r._splomGridDflt.yside="left")}(0,e,f,h),n.coerceSelectionMarkerOpacity(e,h)}else e.visible=!1}},83156:function(t,e,r){"use strict";var n=r(3400),i=r(90136),a=r(6616).markerStyle;t.exports=function(t,e){var r=e.trace,o=t._fullLayout._splomScenes[r.uid];if(o){i(t,r),n.extendFlat(o.matrixOptions,a(t,r));var s=n.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(s,null)}}},50328:function(t,e){"use strict";e.getDimIndex=function(t,e){for(var r=e._id,n={x:0,y:1}[r.charAt(0)],i=t._visibleDims,a=0;a<i.length;a++){var o=i[a];if(t._diag[o][n]===r)return a}return!1}},72248:function(t,e,r){"use strict";var n=r(50328),i=r(41272).calcHover,a=r(54460).getFromId,o=r(92880).extendFlat;function s(t,e,r,a){var o=t.cd[0].trace,s=t.scene.matrixOptions.cdata,l=t.xa,u=t.ya,c=l.c2p(e),f=u.c2p(r),h=t.distance,d=n.getDimIndex(o,l),p=n.getDimIndex(o,u);if(!1===d||!1===p)return[t];for(var v,g,y=s[d],m=s[p],x=h,b=0;b<y.length;b++)if(!a||b===t.index){var _=y[b],w=m[b],A=l.c2p(_)-c,M=u.c2p(w)-f,T=Math.sqrt(A*A+M*M);(a||T<x)&&(x=g=T,v=b)}return t.index=v,t.distance=x,t.dxy=g,void 0===v?[t]:[i(t,y,m,o)]}t.exports={hoverPoints:function(t,e,r,n,i){i||(i={});var l="x"===(n||"").charAt(0),u="y"===(n||"").charAt(0),c=s(t,e,r);if((l||u)&&"axis"===i.hoversubplots&&c[0])for(var f=(l?t.xa:t.ya)._subplotsWith,h=i.gd,d=o({},t),p=0;p<f.length;p++){var v=f[p];u?d.xa=a(h,v,"x"):d.ya=a(h,v,"y");var g=s(d,e,r,l||u);c=c.concat(g)}return c}}},97924:function(t,e,r){"use strict";var n=r(28888);n.basePlotModule=r(99332),t.exports=n},54840:function(t,e,r){"use strict";var n=r(78176),i=r(3400),a=r(79811),o=r(72760).selectMode;function s(t,e){var r,s,l,u,c,f=t._fullLayout,h=f._size,d=e.trace,p=e.t,v=f._splomScenes[d.uid],g=v.matrixOptions,y=g.cdata,m=f._glcanvas.data()[0].regl,x=f.dragmode;if(0!==y.length){g.lower=d.showupperhalf,g.upper=d.showlowerhalf,g.diagonal=d.diagonal.visible;var b=d._visibleDims,_=y.length,w=v.viewOpts={};for(w.ranges=new Array(_),w.domains=new Array(_),c=0;c<b.length;c++){l=b[c];var A=w.ranges[c]=new Array(4),M=w.domains[c]=new Array(4);(r=a.getFromId(t,d._diag[l][0]))&&(A[0]=r._rl[0],A[2]=r._rl[1],M[0]=r.domain[0],M[2]=r.domain[1]),(s=a.getFromId(t,d._diag[l][1]))&&(A[1]=s._rl[0],A[3]=s._rl[1],M[1]=s.domain[0],M[3]=s.domain[1])}var T=t._context.plotGlPixelRatio,k=h.l*T,S=h.b*T,E=h.w*T,O=h.h*T;w.viewport=[k,S,E+k,O+S],!0===v.matrix&&(v.matrix=n(m));var C=f.clickmode.indexOf("select")>-1,L=!0;if(o(x)||d.selectedpoints||C){var R=d._length;if(d.selectedpoints){v.selectBatch=d.selectedpoints;var D=d.selectedpoints,I={};for(l=0;l<D.length;l++)I[D[l]]=!0;var P=[];for(l=0;l<R;l++)I[l]||P.push(l);v.unselectBatch=P}var F=p.xpx=new Array(_),N=p.ypx=new Array(_);for(c=0;c<b.length;c++){if(l=b[c],r=a.getFromId(t,d._diag[l][0]))for(F[c]=new Array(R),u=0;u<R;u++)F[c][u]=r.c2p(y[c][u]);if(s=a.getFromId(t,d._diag[l][1]))for(N[c]=new Array(R),u=0;u<R;u++)N[c][u]=s.c2p(y[c][u])}if(v.selectBatch.length||v.unselectBatch.length){var B=i.extendFlat({},g,v.unselectedOptions,w),z=i.extendFlat({},g,v.selectedOptions,w);v.matrix.update(B,z),L=!1}}else p.xpx=p.ypx=null;if(L){var j=i.extendFlat({},g,w);v.matrix.update(j,null)}}}t.exports=function(t,e,r){if(r.length)for(var n=0;n<r.length;n++)s(t,r[n][0])}},72308:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){var r=t._fullLayout,i=e.uid,a=r._splomScenes;a||(a=r._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s=a[e.uid];return s||((s=a[i]=n.extendFlat({},o,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||n.extendFlat(s,o),s}},84880:function(t,e,r){"use strict";var n=r(3400),i=n.pushUnique,a=r(43028),o=r(50328);t.exports=function(t,e){var r=t.cd,s=r[0].trace,l=r[0].t,u=t.scene,c=u.matrixOptions.cdata,f=t.xaxis,h=t.yaxis,d=[];if(!u)return d;var p=!a.hasMarkers(s)&&!a.hasText(s);if(!0!==s.visible||p)return d;var v=o.getDimIndex(s,f),g=o.getDimIndex(s,h);if(!1===v||!1===g)return d;var y=l.xpx[v],m=l.ypx[g],x=c[v],b=c[g],_=(t.scene.selectBatch||[]).slice(),w=[];if(!1!==e&&!e.degenerate)for(var A=0;A<x.length;A++)e.contains([y[A],m[A]],null,A,t)?(d.push({pointNumber:A,x:x[A],y:b[A]}),i(_,A)):-1!==_.indexOf(A)?i(_,A):w.push(A);var M=u.matrixOptions;return _.length||w.length?u.selectBatch.length||u.unselectBatch.length||u.matrix.update(u.unselectedOptions,n.extendFlat({},M,u.selectedOptions,u.viewOpts)):u.matrix.update(M,null),u.selectBatch=_,u.unselectBatch=w,d}},84224:function(t,e,r){"use strict";var n=r(54460),i=r(3400),a=r(73060),o=r(60468).W,s=r(39032).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"),y=v("func");v("enabled")&&g&&(c[g]||"count"===y&&void 0===c[g])?("stddev"===y&&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 y=r.aggregations;for(s=0;s<y.length;s++)c(t,e,p,y[s]);"string"==typeof n&&c(t,e,p,{target:n,func:"first",enabled:!0}),e._length=p.length}}}},76744:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(54460),o=r(60468).W,s=r(69104),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,y,m=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))},y=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([])},y=function(t,e){var r=x[t.astr][e];t.get().push(r)}),M(g);for(var w=o(e.transforms,r),A=0;A<f;A++)m(i[A])?(M(y,A),b[_++]=w(A)):p&&_++;r._indexToPoints=b,e._length=_}}function M(t,r){for(var i=0;i<d.length;i++)t(n.nestedProperty(e,d[i]),r)}}},32028:function(t,e,r){"use strict";var n=r(3400),i=r(73060),a=r(7316),o=r(60468).W;function s(t,e){var r,s,l,u,c,f,h,d,p,v,g=e.transform,y=e.transformIndex,m=t.transforms[y].groups,x=o(t.transforms,g);if(!n.isArrayOrTypedArray(m)||0===m.length)return[t];var b=n.filterUnique(m),_=new Array(b.length),w=m.length,A=i.findArrayAttributes(t),M=g.styles||[],T={};for(r=0;r<M.length;r++)T[M[r].target]=M[r].value;g.styles&&(v=n.keyedContainer(g,"styles","target","value.name"));var k={},S={};for(r=0;r<b.length;r++){k[f=b[r]]=r,S[f]=0,(h=_[r]=n.extendDeepNoArrays({},t))._group=f,h.transforms[y]._indexToPoints={};var E=null;for(v&&(E=v.get(f)),h.name=E||""===E?E: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<A.length;s++)n.nestedProperty(h,A[s]).set([])}for(l=0;l<A.length;l++){for(u=A[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[m[s]]].push(c[s])}for(s=0;s<w;s++)(h=_[k[m[s]]]).transforms[y]._indexToPoints[S[m[s]]]=x(s),S[m[s]]++;for(r=0;r<b.length;r++)f=b[r],h=_[r],a.clearExpandedTraceDefaultColors(h),h=n.extendDeepNoArrays(h,T[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}},60468: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}},76272:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(60468).W,o=r(39032).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]),y=g.get(),m=new Array(u);for(f=0;f<u;f++)m[f]=y[d[f]];g.set(m)}for(f=0;f<u;f++)v[f]=p(d[f]);r._indexToPoints=v,e._length=u}}}},25788:function(t,e){"use strict";e.version="2.31.0"},67792: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 y(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 m(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):m(t):"Buffer"===t.type&&Array.isArray(t.data)?m(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 y(t){return g(t),d(t<0?0:0|b(t))}function m(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 F(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return L(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 A(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function M(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:T(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):T(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function T(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 S(t,e,r,n){return tt(Q(e,t.length-r),t,r,n)}function E(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 O(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 L(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<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=D));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 y(t)},p.allocUnsafeSlow=function(t){return y(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)A(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)A(this,e,e+3),A(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)A(this,e,e+7),A(this,e+1,e+6),A(this,e+2,e+5),A(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 M(this,t,e,r,!0)},p.prototype.lastIndexOf=function(t,e,r){return M(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 S(this,t,e,r);case"ascii":case"latin1":case"binary":return E(this,t,e,r);case"base64":return O(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 D=4096;function I(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 P(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 F(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 B(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 z(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 G(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||B(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||B(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||B(t,1,this.length),this[t]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(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||B(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||B(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||B(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||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},p.prototype.readInt16LE=function(t,e){t>>>=0,e||B(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||B(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||B(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||B(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||B(t,4,this.length),c.read(this,t,!0,23,4)},p.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),c.read(this,t,!1,23,4)},p.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),c.read(this,t,!0,52,8)},p.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(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||z(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||z(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||z(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||z(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||z(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||z(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||z(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);z(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);z(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||z(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||z(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||z(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||z(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||z(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 G(this,t,e,!0,r)},p.prototype.writeDoubleBE=function(t,e,r){return G(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 Y={};function W(t,e,r){Y[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 Y.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 Y.ERR_INVALID_ARG_TYPE(e,"number",t)}function J(t,e,r){if(Math.floor(t)!==t)throw Z(t,r),new Y.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new Y.ERR_BUFFER_OUT_OF_BOUNDS;throw new Y.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],y=8191&g,m=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],A=8191&w,M=w>>>13,T=0|o[5],k=8191&T,S=T>>>13,E=0|o[6],O=8191&E,C=E>>>13,L=0|o[7],R=8191&L,D=L>>>13,I=0|o[8],P=8191&I,F=I>>>13,N=0|o[9],B=8191&N,z=N>>>13,j=0|s[0],U=8191&j,H=j>>>13,V=0|s[1],G=8191&V,Y=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 yt=(u+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,G)|0))<<13)|0;u=((a=a+Math.imul(h,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,H))+Math.imul(m,U)|0,a=Math.imul(m,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,G)|0,a=a+Math.imul(v,Y)|0;var mt=(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)+(mt>>>26)|0,mt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,H))+Math.imul(_,U)|0,a=Math.imul(_,H),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(m,G)|0,a=a+Math.imul(m,Y)|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(A,U),i=(i=Math.imul(A,H))+Math.imul(M,U)|0,a=Math.imul(M,H),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,q)|0,a=a+Math.imul(m,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(S,U)|0,a=Math.imul(S,H),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(M,G)|0,a=a+Math.imul(M,Y)|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(y,J)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,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(O,U),i=(i=Math.imul(O,H))+Math.imul(C,U)|0,a=Math.imul(C,H),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(A,q)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(M,q)|0,a=a+Math.imul(M,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(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,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(D,U)|0,a=Math.imul(D,H),n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(C,G)|0,a=a+Math.imul(C,Y)|0,n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,q)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,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(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,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 At=(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)+(At>>>26)|0,At&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(F,U)|0,a=Math.imul(F,H),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,Y)|0,n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,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(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(M,$)|0,a=a+Math.imul(M,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(y,at)|0,i=(i=i+Math.imul(y,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,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 Mt=(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)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,H))+Math.imul(z,U)|0,a=Math.imul(z,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(F,G)|0,a=a+Math.imul(F,Y)|0,n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(D,q)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,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(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(M,rt)|0,a=a+Math.imul(M,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(y,lt)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,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 Tt=(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)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(B,G),i=(i=Math.imul(B,Y))+Math.imul(z,G)|0,a=Math.imul(z,Y),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(F,q)|0,a=a+Math.imul(F,X)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,K)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,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(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(M,at)|0,a=a+Math.imul(M,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(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,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(B,q),i=(i=Math.imul(B,X))+Math.imul(z,q)|0,a=Math.imul(z,X),n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(F,J)|0,a=a+Math.imul(F,K)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,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(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(M,lt)|0,a=a+Math.imul(M,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 St=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,vt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((a=a+Math.imul(m,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(z,J)|0,a=Math.imul(z,K),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(F,$)|0,a=a+Math.imul(F,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,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(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(M,ft)|0,a=a+Math.imul(M,ht)|0;var Et=(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)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,tt))+Math.imul(z,$)|0,a=Math.imul(z,tt),n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(F,rt)|0,a=a+Math.imul(F,nt)|0,n=n+Math.imul(R,at)|0,i=(i=i+Math.imul(R,ot)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,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(S,ft)|0,a=a+Math.imul(S,ht)|0;var Ot=(u+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,vt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((a=a+Math.imul(M,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(z,rt)|0,a=Math.imul(z,nt),n=n+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(F,at)|0,a=a+Math.imul(F,ot)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ut)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,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(S,pt)|0))<<13)|0;u=((a=a+Math.imul(S,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(z,at)|0,a=Math.imul(z,ot),n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ut)|0)+Math.imul(F,lt)|0,a=a+Math.imul(F,ut)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(D,ft)|0,a=a+Math.imul(D,ht)|0;var Lt=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,vt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((a=a+Math.imul(C,vt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ut))+Math.imul(z,lt)|0,a=Math.imul(z,ut),n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(F,ft)|0,a=a+Math.imul(F,ht)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,vt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((a=a+Math.imul(D,vt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(B,ft),i=(i=Math.imul(B,ht))+Math.imul(z,ft)|0,a=Math.imul(z,ht);var Dt=(u+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,vt)|0)+Math.imul(F,pt)|0))<<13)|0;u=((a=a+Math.imul(F,vt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var It=(u+(n=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,vt))+Math.imul(z,pt)|0))<<13)|0;return u=((a=Math.imul(z,vt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=yt,l[2]=mt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=At,l[8]=Mt,l[9]=Tt,l[10]=kt,l[11]=St,l[12]=Et,l[13]=Ot,l[14]=Ct,l[15]=Lt,l[16]=Rt,l[17]=Dt,l[18]=It,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],y=n[c+d+o],m=f*g-h*y;y=f*y+h*g,g=m,r[c+d]=p+g,n[c+d]=v+y,r[c+d+o]=p-g,n[c+d+o]=v-y,d!==s&&(m=l*f-u*h,h=l*h+u*f,f=m)}},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 A(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 y={k256:null,p224:null,p192:null,p25519:null};function m(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(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(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 M(t){A.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)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.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},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(x,m),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,m),i(_,m),i(w,m),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(y[t])return y[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 y[t]=e,e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.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")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.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)},A.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},A.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)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.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 y=this.pow(f,new a(1).iushln(p-g-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=g}return h},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.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},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new M(t)},i(M,A),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.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)},M.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)},M.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 y=s,m=f*s;y<l;++y,m+=f){var x=u[e+m],b=u[e+m+t],_=c[y];if(!(b<p||v<x)){for(var w=e+1;w<t;++w){var A=a[w+d],M=a[w+t+d],T=u[w+m],k=u[w+t+m];if(M<T||k<A)continue t}var S=r(g,_);if(void 0!==S)return S}}}}(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 y=n,m=f*n;y<i;++y,m+=f){var x=a[e+m],b=a[e+m+t],_=o[y];if(!(v<x||b<p)){for(var w=e+1;w<t;++w){var A=a[w+m],M=a[w+t+m],T=u[w+d],k=u[w+t+d];if(M<T||k<A)continue t}var S=r(_,g);if(void 0!==S)return S}}}}(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 y=s,m=f*s;y<l;++y,m+=f){var x=u[e+m],b=c[y];if(!(x<=p||v<x)){for(var _=e+1;_<t;++_){var w=a[_+d],A=a[_+t+d],M=u[_+m],T=u[_+t+m];if(A<M||T<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 y=s,m=f*s;y<l;++y,m+=f){var x=u[e+m],b=c[y];if(!(x<p||v<x)){for(var _=e+1;_<t;++_){var w=a[_+d],A=a[_+t+d],M=u[_+m],T=u[_+t+m];if(A<M||T<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,y=f*n;g<i;++g,y+=f){var m=a[e+y],x=a[e+y+t],b=o[g];if(!(p<=m||x<p)){for(var _=e+1;_<t;++_){var w=a[_+y],A=a[_+t+y],M=u[_+d],T=u[_+t+d];if(A<M||T<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,y=f*n;g<i;++g,y+=f){var m=a[e+y],x=a[e+y+t],b=o[g];if(!(p<m||x<p)){for(var _=e+1;_<t;++_){var w=a[_+y],A=a[_+t+y],M=u[_+d],T=u[_+t+d];if(A<M||T<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,S,E,O,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);A.length<o&&(n.free(A),A=n.mallocDouble(o))}(t,a+E);var L,R=0,D=2*t;for(M(R++,0,0,a,0,E,r?16:0,-1/0,1/0),r||M(R++,0,0,E,0,a,1,-1/0,1/0);R>0;){var I=(R-=1)*b,P=w[I],F=w[I+1],N=w[I+2],B=w[I+3],z=w[I+4],j=w[I+5],U=R*_,H=A[U],V=A[U+1],G=1&j,Y=!!(16&j),W=c,q=S,X=O,Z=C;if(G&&(W=O,q=C,X=c,Z=S),!(2&j&&F>=(N=g(t,P,F,N,W,q,V))||4&j&&(F=y(t,P,F,N,W,q,H))>=N)){var J=N-F,K=z-B;if(Y){if(t*J*(J+K)<d){if(void 0!==(L=l.scanComplete(t,P,e,F,N,W,q,B,z,X,Z)))return L;continue}}else{if(t*Math.min(J,K)<f){if(void 0!==(L=o(t,P,e,G,F,N,W,q,B,z,X,Z)))return L;continue}if(t*J*K<h){if(void 0!==(L=l.scanBipartite(t,P,e,G,F,N,W,q,B,z,X,Z)))return L;continue}}var Q=p(t,P,F,N,W,q,H,V);if(F<Q)if(t*(Q-F)<f){if(void 0!==(L=s(t,P+1,e,F,Q,W,q,B,z,X,Z)))return L}else if(P===t-2){if(void 0!==(L=G?l.sweepBipartite(t,e,B,z,X,Z,F,Q,W,q):l.sweepBipartite(t,e,F,Q,W,q,B,z,X,Z)))return L}else M(R++,P+1,F,Q,B,z,G,-1/0,1/0),M(R++,P+1,B,z,F,Q,1^G,-1/0,1/0);if(Q<N){var $=u(t,P,B,z,X,Z),tt=X[D*$+P],et=v(t,P,$,z,X,Z,tt);if(et<z&&M(R++,P,Q,N,et,z,(4|G)+(Y?16:0),tt,V),B<$&&M(R++,P,Q,N,B,$,(2|G)+(Y?16:0),H,tt),$+1===et){if(void 0!==(L=Y?k(t,P,e,Q,N,W,q,$,X,Z[$]):T(t,P,e,G,Q,N,W,q,$,X,Z[$])))return L}else if($<et){var rt;if(Y){if(Q<(rt=m(t,P,Q,N,W,q,tt))){var nt=v(t,P,Q,rt,W,q,tt);if(P===t-2){if(Q<nt&&void 0!==(L=l.sweepComplete(t,e,Q,nt,W,q,$,et,X,Z)))return L;if(nt<rt&&void 0!==(L=l.sweepBipartite(t,e,nt,rt,W,q,$,et,X,Z)))return L}else Q<nt&&M(R++,P+1,Q,nt,$,et,16,-1/0,1/0),nt<rt&&(M(R++,P+1,nt,rt,$,et,0,-1/0,1/0),M(R++,P+1,$,et,nt,rt,1,-1/0,1/0))}}else Q<(rt=G?x(t,P,Q,N,W,q,tt):m(t,P,Q,N,W,q,tt))&&(P===t-2?L=G?l.sweepBipartite(t,e,$,et,X,Z,Q,rt,W,q):l.sweepBipartite(t,e,Q,rt,W,q,$,et,X,Z):(M(R++,P+1,Q,rt,$,et,G,-1/0,1/0),M(R++,P+1,$,et,Q,rt,1^G,-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"),y=c("hi<=p0"),m=c("lo<=p0&&p0<=hi"),x=c("lo<p0&&p0<=hi"),b=6,_=2,w=n.mallocInt32(1024),A=n.mallocDouble(1024);function M(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;A[c]=s,A[c+1]=l}function T(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],y=o[v+e+t];if(!(d<g||y<d||n&&d===g)){for(var m,x=s[p],b=e+1;b<t;++b){g=o[v+b],y=o[v+b+t];var _=u[h+b],w=u[h+b+t];if(y<_||w<g)continue t}if(void 0!==(m=n?r(c,x):r(x,c)))return m}}}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],y=a[p+e+t];if(!(h<g||y<h)){for(var m=e+1;m<t;++m){g=a[p+m],y=a[p+m+t];var x=l[f+m],b=l[f+m+t];if(y<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,y=s[h*g+e],m=Math.random()*v+u|0,x=s[h*m+e],b=Math.random()*v+u|0,_=s[h*b+e];y<=x?_>=x?(d=m,p=x):y>=_?(d=g,p=y):(d=b,p=_):x>=_?(d=m,p=x):_>=y?(d=g,p=y):(d=b,p=_);for(var w=h*(c-1),A=h*d,M=0;M<h;++M,++w,++A){var T=s[w];s[w]=s[A],s[A]=T}var k=l[c-1];for(l[c-1]=l[d],l[d]=k,w=h*(c-1),A=h*(d=n(t,e,u,c-1,s,l,p)),M=0;M<h;++M,++w,++A)T=s[w],s[w]=s[A],s[A]=T;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 y=i[l+g];i[l+g]=i[u],i[u++]=y}var m=a[d];a[d]=a[c],a[c++]=m}}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 y=i[l+g];i[l+g]=i[u],i[u++]=y}var m=a[d];a[d]=a[c],a[c++]=m}}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 y=0;l>y;++y){var m=i[u+y];i[u+y]=i[c],i[c++]=m}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,y=v+h,m=d,x=g,b=v,_=y,w=p,A=t+1,M=c-1,T=0;s(m,x,f)&&(T=m,m=x,x=T),s(_,w,f)&&(T=_,_=w,w=T),s(m,b,f)&&(T=m,m=b,b=T),s(x,b,f)&&(T=x,x=b,b=T),s(m,_,f)&&(T=m,m=_,_=T),s(b,_,f)&&(T=b,b=_,_=T),s(x,w,f)&&(T=x,x=w,w=T),s(x,b,f)&&(T=x,x=b,b=T),s(_,w,f)&&(T=_,_=w,w=T);for(var k=f[2*x],S=f[2*x+1],E=f[2*_],O=f[2*_+1],C=2*m,L=2*b,R=2*w,D=2*d,I=2*v,P=2*p,F=0;F<2;++F){var N=f[C+F],B=f[L+F],z=f[R+F];f[D+F]=N,f[I+F]=B,f[P+F]=z}i(g,t,f),i(y,c,f);for(var j=A;j<=M;++j)if(l(j,k,S,f))j!==A&&n(j,A,f),++A;else if(!l(j,E,O,f))for(;;){if(l(M,E,O,f)){l(M,k,S,f)?(a(j,A,M,f),++A,--M):(n(j,M,f),--M);break}if(--M<j)break}o(t,A-1,k,S,f),o(c,M+1,E,O,f),A-2-t<=e?r(t,A-2,f):u(t,A-2,f),c-(M+2)<=e?r(M+2,c,f):u(M+2,c,f),M-A<=e?r(A,M,f):u(A,M,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,y,m){for(var x=0,b=2*t,_=t-1,w=b-1,A=r;A<n;++A){var M=s[A],T=b*A;p[x++]=i[T+_],p[x++]=-(M+1),p[x++]=i[T+w],p[x++]=M}for(A=h;A<d;++A){M=m[A]+o;var k=b*A;p[x++]=y[k+_],p[x++]=-M,p[x++]=y[k+w],p[x++]=M}var S=x>>>1;a(p,S);var E=0,O=0;for(A=0;A<S;++A){var C=0|p[2*A+1];if(C>=o)v(c,f,O--,C=C-o|0);else if(C>=0)v(l,u,E--,C);else if(C<=-o){C=-C-o|0;for(var L=0;L<E;++L)if(void 0!==(R=e(l[L],C)))return R;g(c,f,O++,C)}else{for(C=-C-1|0,L=0;L<O;++L){var R;if(void 0!==(R=e(C,c[L])))return R}g(l,u,E++,C)}}},sweepComplete:function(t,e,r,n,i,o,s,y,m,x){for(var b=0,_=2*t,w=t-1,A=_-1,M=r;M<n;++M){var T=o[M]+1<<1,k=_*M;p[b++]=i[k+w],p[b++]=-T,p[b++]=i[k+A],p[b++]=T}for(M=s;M<y;++M){T=x[M]+1<<1;var S=_*M;p[b++]=m[S+w],p[b++]=1|-T,p[b++]=m[S+A],p[b++]=1|T}var E=b>>>1;a(p,E);var O=0,C=0,L=0;for(M=0;M<E;++M){var R=0|p[2*M+1],D=1&R;if(M<E-1&&R>>1==p[2*M+3]>>1&&(D=2,M+=1),R<0){for(var I=-(R>>1)-1,P=0;P<L;++P)if(void 0!==(F=e(h[P],I)))return F;if(0!==D)for(P=0;P<O;++P)if(void 0!==(F=e(l[P],I)))return F;if(1!==D)for(P=0;P<C;++P){var F;if(void 0!==(F=e(c[P],I)))return F}0===D?g(l,u,O++,I):1===D?g(c,f,C++,I):2===D&&g(h,d,L++,I)}else I=(R>>1)-1,0===D?v(l,u,O--,I):1===D?v(c,f,C--,I):2===D&&v(h,d,L--,I)}},scanBipartite:function(t,e,r,n,i,s,c,f,h,d,y,m){var x=0,b=2*t,_=e,w=e+t,A=1,M=1;n?M=o:A=o;for(var T=i;T<s;++T){var k=T+A,S=b*T;p[x++]=c[S+_],p[x++]=-k,p[x++]=c[S+w],p[x++]=k}for(T=h;T<d;++T){k=T+M;var E=b*T;p[x++]=y[E+_],p[x++]=-k}var O=x>>>1;a(p,O);var C=0;for(T=0;T<O;++T){var L=0|p[2*T+1];if(L<0){var R=!1;if((k=-L)>=o?(R=!n,k-=o):(R=!!n,k-=1),R)g(l,u,C++,k);else{var D=m[k],I=b*k,P=y[I+e+1],F=y[I+e+1+t];t:for(var N=0;N<C;++N){var B=l[N],z=b*B;if(!(F<c[z+e+1]||c[z+e+1+t]<P)){for(var j=e+2;j<t;++j)if(y[I+j+t]<c[z+j]||c[z+j+t]<y[I+j])continue t;var U,H=f[B];if(void 0!==(U=n?r(D,H):r(H,D)))return U}}}}else v(l,u,C--,L-A)}},scanComplete:function(t,e,r,n,i,s,u,c,f,h,d){for(var v=0,g=2*t,y=e,m=e+t,x=n;x<i;++x){var b=x+o,_=g*x;p[v++]=s[_+y],p[v++]=-b,p[v++]=s[_+m],p[v++]=b}for(x=c;x<f;++x){b=x+1;var w=g*x;p[v++]=h[w+y],p[v++]=-b}var A=v>>>1;a(p,A);var M=0;for(x=0;x<A;++x){var T=0|p[2*x+1];if(T<0)if((b=-T)>=o)l[M++]=b-o;else{var k=d[b-=1],S=g*b,E=h[S+e+1],O=h[S+e+1+t];t:for(var C=0;C<M;++C){var L=l[C],R=u[L];if(R===k)break;var D=g*L;if(!(O<s[D+e+1]||s[D+e+1+t]<E)){for(var I=e+2;I<t;++I)if(h[S+I+t]<s[D+I]||s[D+I+t]<h[S+I])continue t;var P=r(R,k);if(void 0!==P)return P}}}else{for(b=T-o,C=M-1;C>=0;--C)if(l[C]===b){for(I=C+1;I<M;++I)l[I-1]=l[I];break}--M}}}};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 y=p[g];v.addTriangle(y[0],y[1],y[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=(y=r[i])[0],l=y[1],u=y[2];l<u?l<s&&(y[0]=l,y[1]=u,y[2]=s):u<s&&(y[0]=u,y[1]=s,y[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 y=r[i],m=0;m<3;++m){s=y[m],l=y[(m+1)%3];var x=d[3*i+m]=g.locate(l,s,t.opposite(l,s)),b=p[3*i+m]=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 y=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?y.concat(n.boundary):y},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,[],[],[],[])],y=[],m=(l=0,i.length);l<m;++l){var x=i[l],b=x.type;0===b?u(y,g,t,x.a,x.idx):2===b?f(g,0,x):h(g,0,x)}return y}},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 y(e,n,r),!!n}(t,e,!!r);m(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)(y=o.find(l))!==l&&(p=!1,t[y]=[Math.min(t[l][0],t[y][0]),Math.min(t[l][1],t[y][1])]);if(p)return null;var g=0;for(l=0;l<a;++l){var y;(y=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 y(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 m(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],y=f(u(t[v[0]]),u(t[v[1]]),u(t[g[0]]),u(t[g[1]]));if(y){var m=t.length;t.push([l(y[0]),l(y[1])]),h.push(y),n.push([c,m],[p,m])}}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=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],A=t[_];if((w[0]-A[0]||w[1]-A[1])<0){var M=b;b=_,_=M}x[0]=b;var T,k=x[1]=S[1];for(i&&(T=x[2]);a>0&&n[a-1][0]===c;){var S,E=(S=n[--a])[1];i?e.push([k,E,T]):e.push([k,E]),k=E}i?e.push([k,_,T]):e.push([k,_])}return h}(t,e,h,v,r),m=p(t,g);return y(e,m,r),!!m||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})),y=[];for(v=0;v<e.length-1;++v){u=e[v+1]-e[v],r=g[v],l=g[v+1];for(var m=0;m<u;m++){var x=m/u;y.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 y.push(c[c.length-1].rgb.concat(p[1])),"hex"===h?y=y.map(o):"rgbaString"===h?y=y.map(s):"float"===h&&(y=y.map(a)),y}},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],y=n[3];return c+f+h+d-(p+v+g+y)||e(c,f,h,d)-e(p,v,g,y,p)||e(c+f,c+h,c+d,f+h,f+d,h+d)-e(p+v,p+g,p+y,v+g,v+y,g+y)||e(c+f+h,c+f+d,c+h+d,f+h+d)-e(p+v+g,p+v+y,p+g+y,v+g+y);default:for(var m=t.slice().sort(r),x=n.slice().sort(r),b=0;b<i;++b)if(a=m[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),y=new Array(r+s+1),m=(s+1)*(s+1)*u,x=new Array(s+1);for(c=0;c<=s;++c)x[c]=0;for(x[s]=m,g[0]=x.slice(),y[0]=-1,c=0;c<=s;++c)(h=x.slice())[c]=1,g[c+1]=h,y[c+1]=-1;for(c=0;c<r;++c){var b=l[c];g[c+s+1]=b.point,y[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=y[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=y[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,y=this._scratch[1],m=this._scratch[2],x=this._scratch[3],b=this._scratch[4],_=!0;for(d=0;d<c;++d,--h)y[d]=l[h],x[d]=u[h]*g,m[d]=l[h+c],b[d]=u[h+c]*g,_=_&&y[d]===m[d]&&x[d]===b[d]&&0===x[d];if(_)for(d=0;d<c;++d)s[d]=y[d];else n(y,x,m,b,(t-v)/g,s)}var w=f[0],A=f[1];for(d=0;d<c;++d)s[d]=a(w[d],A[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],y=this._scratch[4],m=!0;for(f=0;f<u;++f,--c)p[f]=s[c],g[f]=l[c]*d,v[f]=s[c+u],y[f]=l[c+u]*d,m=m&&p[f]===v[f]&&g[f]===y[f]&&0===g[f];if(m)for(f=0;f<u;++f)o[f]=0;else for(n.derivative(p,g,v,y,(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 y=[0,0,0],m=[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],A=n[15],M=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*A)/e.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=f[T],this.lastCubeProps.axis[T]=h[T];var k=d;for(T=0;T<3;++T)p(d[T],T,this.bounds,f,h);e=this.gl;var S,E,O,C=v;for(T=0;T<3;++T)this.backgroundEnable[T]?C[T]=h[T]:C[T]=0;for(this._background.draw(r,n,i,a,C,this.backgroundColor),this._lines.bind(r,n,i,this),T=0;T<3;++T){var L=[0,0,0];h[T]>0?L[T]=a[1][T]:L[T]=a[0][T];for(var R=0;R<2;++R){var D=(T+1+R)%3,I=(T+1+(1^R))%3;this.gridEnable[D]&&this._lines.drawGrid(D,I,this.bounds,L,this.gridColor[D],this.gridWidth[D]*this.pixelRatio)}for(R=0;R<2;++R)D=(T+1+R)%3,I=(T+1+(1^R))%3,this.zeroEnable[I]&&Math.min(a[0][I],a[1][I])<=0&&Math.max(a[0][I],a[1][I])>=0&&this._lines.drawZero(D,I,this.bounds,L,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,k[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,k[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var P=u(y,k[T].primalMinor),F=u(m,k[T].mirrorMinor),N=this.lineTickLength;for(R=0;R<3;++R){var B=M/r[5*R];P[R]*=N[R]*B,F[R]*=N[R]*B}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,k[T].primalOffset,P,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,k[T].mirrorOffset,F,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function z(t){(O=[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?z(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&z(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),T=0;T<3;++T){var U=k[T].primalMinor,H=k[T].mirrorMinor,V=u(x,k[T].primalOffset);for(R=0;R<3;++R)this.lineTickEnable[T]&&(V[R]+=M*U[R]*Math.max(this.lineTickLength[R],0)/r[5*R]);var G=[0,0,0];if(G[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,E=1,"auto"===(S=[this.tickAlign[T],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=[0,0,0],j(T,U,H),R=0;R<3;++R)V[R]+=M*U[R]*this.tickPad[R]/r[5*R];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],G,O,S)}if(this.labelEnable[T]){for(E=0,O=[0,0,0],this.labels[T].length>4&&(z(T),E=1),"auto"===(S=[this.labelAlign[T],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),R=0;R<3;++R)V[R]+=M*U[R]*this.labelPad[R]/r[5*R];V[T]+=.5*(a[0][T]+a[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],O,S)}}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 y=n(t,new Float32Array(e)),m=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:y,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:t.FLOAT,size:3,offset:12,stride:24}],m),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,y,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 m=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[m],c,s),m+=1}}var w=-1;for(x=0;x<8;++x){for(var A=l[x][3],M=0;M<3;++M)u[x][M]=l[x][M]/A;d&&(u[x][2]*=-1),A<0&&(w<0||u[x][2]<u[w][2])&&(w=x)}if(w<0){w=0;for(var T=0;T<3;++T){for(var k=(T+2)%3,S=(T+1)%3,E=-1,O=-1,C=0;C<2;++C){var L=(D=C<<T)+(C<<k)+(1-C<<S),R=D+(1-C<<k)+(C<<S);o(u[D],u[L],u[R],f)<0||(C?E=1:O=1)}if(E<0||O<0)O>E&&(w|=1<<T);else{for(C=0;C<2;++C){L=(D=C<<T)+(C<<k)+(1-C<<S),R=D+(1-C<<k)+(C<<S);var D,I=p([l[D],l[L],l[R],l[D+(1<<k)+(1<<S)]]);C?E=I:O=I}O>E&&(w|=1<<T)}}}var P=7^w,F=-1;for(x=0;x<8;++x)x!==w&&x!==P&&(F<0||u[F][1]>u[x][1])&&(F=x);var N=-1;for(x=0;x<3;++x)(z=F^1<<x)!==w&&z!==P&&(N<0&&(N=z),(S=u[z])[0]<u[N][0]&&(N=z));var B=-1;for(x=0;x<3;++x){var z;(z=F^1<<x)!==w&&z!==P&&z!==N&&(B<0&&(B=z),(S=u[z])[0]>u[B][0]&&(B=z))}var j=v;j[0]=j[1]=j[2]=0,j[n.log2(N^F)]=F&N,j[n.log2(F^B)]=F&B;var U=7^B;U===w||U===P?(U=7^N,j[n.log2(B^U)]=U&B):j[n.log2(N^U)]=U&N;var H=g,V=w;for(T=0;T<3;++T)H[T]=V&1<<T?-1:1;return y};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],y={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 y=0;y<r[f].length;++y)v=+r[f][y].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 m=n(t,new Float32Array(o)),x=i(t,[{buffer:m,type:t.FLOAT,size:3,stride:0,offset:0}]),b=a(t);return b.attributes.position.location=0,new d(t,m,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],y=2;y>=0;--y){var m=h[g[y]];a.push(f*m[0],-f*m[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,y=e.projection||u,m=e._ortho||!1,x=t.bounds,b=(f=f||a(h,d,y,x,m)).axis;o(c,d,h),o(c,y,c);for(var _=v,w=0;w<3;++w)_[w].lo=1/0,_[w].hi=-1/0,_[w].pixelsPerDataUnit=1/0;var A=n(s(c,c));s(c,c);for(var M=0;M<3;++M){var T=(M+1)%3,k=(M+2)%3,S=g;t:for(w=0;w<2;++w){var E=[];if(b[M]<0!=!!w){S[M]=x[w][M];for(var O=0;O<2;++O){S[T]=x[O^w][T];for(var C=0;C<2;++C)S[k]=x[C^O^w][k],E.push(S.slice())}var L=m?5:4;for(O=L;O===L;++O){if(0===E.length)continue t;E=i.positive(E,A[O])}for(O=0;O<E.length;++O){k=E[O];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!==M&&(_[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,y=!1,m="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&&!m){var w=2*n.distance(d,b)/(n.length(p)+n.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(d=b,p=_),v.push(_)}var A=[s,u,f],M=[l,c,h];e&&(e[0]=A,e[1]=M),0===o&&(o=1);var T=1/o;isFinite(g)||(g=1),a.vectorScale=g;var k=t.coneSize||(m?1:.5);t.absoluteConeSize&&(k=t.absoluteConeSize*T),a.coneScale=k,x=0;for(var S=0;x<r.length;x++)for(var E=(b=r[x])[0],O=b[1],C=b[2],L=v[x],R=n.length(L)*T,D=0;D<8;D++){a.positions.push([E,O,C,S++]),a.positions.push([E,O,C,S++]),a.positions.push([E,O,C,S++]),a.positions.push([E,O,C,S++]),a.positions.push([E,O,C,S++]),a.positions.push([E,O,C,S++]),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vectors.push(L),a.vertexIntensity.push(R,R,R),a.vertexIntensity.push(R,R,R);var I=a.positions.length;a.cells.push([I-6,I-5,I-4],[I-3,I-2,I-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 y=d[g];p=Math.min(p,y),v=Math.max(v,y)}else for(g=0;g<n.length;++g)y=n[g][2],p=Math.min(p,y),v=Math.max(v,y);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 m=n[g],x=0;x<3;++x)!isNaN(m[x])&&isFinite(m[x])&&(this.bounds[0][x]=Math.min(this.bounds[0][x],m[x]),this.bounds[1][x]=Math.max(this.bounds[1][x],m[x]));var b=0;t:for(g=0;g<r.length;++g){var _=r[g];if(3===_.length){for(x=0;x<3;++x){m=n[A=_[x]];for(var w=0;w<3;++w)if(isNaN(m[w])||!isFinite(m[w]))continue t}for(x=0;x<3;++x){var A;m=n[A=_[2-x]],a.push(m[0],m[1],m[2],m[3]);var M=i[A];o.push(M[0],M[1],M[2],M[3]||0);var T,k=h;3===k.length?s.push(k[0],k[1],k[2],1):s.push(k[0],k[1],k[2],k[3]),T=d?[(d[A]-p)/(v-p),0]:[(m[2]-p)/(v-p),0],l.push(T[0],T[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),y=i(t),m=new h(t,f,l,c,d,p,y,v,g,a(t,[{buffer:d,type:t.FLOAT,size:4},{buffer:y,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 m.update(e),m}},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 y=0;y<o;++y)t.color[y]=h(r,i,a,g,r.RGBA,r.COLOR_ATTACHMENT0+y);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 m=r.getExtension("WEBGL_depth_texture");m?p?t.depth=h(r,i,a,m.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),y=0;y<t.color.length;++y)t.color[y].dispose(),t.color[y]=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 y=h[d+1];y=y.substr(y.split(":",3).join(":").length+1).trim(),u+=n("^^^ %s\n\n",y)}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,y=this.bounds;l?(u=y[0]=r[0],c=y[1]=o[0],f=y[2]=r[r.length-1],d=y[3]=o[o.length-1]):(u=y[0]=r[0]+(r[1]-r[0])/2,c=y[1]=o[0]+(o[1]-o[0])/2,f=y[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,d=y[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var m=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 A=a.mallocUint8(4*w),M=a.mallocFloat32(2*w),T=a.mallocUint8(2*w),k=a.mallocUint32(w),S=0,E=l?b-1:b,O=l?_-1:_,C=0;C<O;++C){var L,R;l?(L=x*(o[C]-c),R=x*(o[C+1]-c)):(L=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 D=0;D<E;++D){var I,P;l?(I=m*(r[D]-u),P=m*(r[D+1]-u)):(I=D<b-1?m*(r[D]-(r[D+1]-r[D])/2-u):m*(r[D]-(r[D]-r[D-1])/2-u),P=D<b-1?m*(r[D]+(r[D+1]-r[D])/2-u):m*(r[D]+(r[D]-r[D-1])/2-u));for(var F=0;F<h.length;F+=2){var N,B,z,j,U=h[F],H=h[F+1],V=s[l?(C+H)*b+(D+U):C*b+D],G=n.le(p,V);if(G<0)N=v[0],B=v[1],z=v[2],j=v[3];else if(G===g-1)N=v[4*g-4],B=v[4*g-3],z=v[4*g-2],j=v[4*g-1];else{var Y=(V-p[G])/(p[G+1]-p[G]),W=1-Y,q=4*G,X=4*(G+1);N=W*v[q]+Y*v[X],B=W*v[q+1]+Y*v[X+1],z=W*v[q+2]+Y*v[X+2],j=W*v[q+3]+Y*v[X+3]}A[4*S]=255*N,A[4*S+1]=255*B,A[4*S+2]=255*z,A[4*S+3]=255*j,M[2*S]=.5*I+.5*P,M[2*S+1]=.5*L+.5*R,T[2*S]=U,T[2*S+1]=H,k[S]=C*b+D,S+=1}}}this.positionBuffer.update(M),this.weightBuffer.update(T),this.colorBuffer.update(A),this.idBuffer.update(k),a.free(M),a.free(A),a.free(T),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 y(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 y(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 m=y.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.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()}},m.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()}},m.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 y,m,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])?(y=d.length>e-1?d[e-1]:d.length>0?d[d.length-1]:[0,0,0,1],m=d.length>e?d[e]:d.length>0?d[d.length-1]:[0,0,0,1]):y=m=d,3===y.length&&(y=[y[0],y[1],y[2],1]),3===m.length&&(m=[m[0],m[1],m[2],1]),!this.hasAlpha&&y[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 A=s;if(s+=p(b,_),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],A,x,y[0],y[1],y[2],y[3]);c+=2,g=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],A,x,y[0],y[1],y[2],y[3],b[0],b[1],b[2],_[0],_[1],_[2],A,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,m[0],m[1],m[2],m[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 M=t.dashes.slice();for(M.unshift(0),e=1;e<M.length;++e)M[e]=M[e-1]+M[e];var T=u(new Array(1024),[256,1,4]);for(e=0;e<256;++e){for(r=0;r<4;++r)T.set(e,0,r,0);1&l.le(M,M[M.length-1]*e/255)?T.set(e,0,0,0):T.set(e,0,0,255)}this.texture.setPixels(T)}},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},m.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,y=a*l;return t[0]=1-f-p,t[1]=c+y,t[2]=h-g,t[3]=0,t[4]=c-y,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,y=o*l,m=o*u;return t[0]=1-(d+v),t[1]=f+m,t[2]=h-y,t[3]=0,t[4]=f-m,t[5]=1-(c+v),t[6]=p+g,t[7]=0,t[8]=h+y,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],y=e[15],m=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,A=i*u-a*l,M=c*v-f*p,T=c*g-h*p,k=c*y-d*p,S=f*g-h*v,E=f*y-d*v,O=h*y-d*g,C=m*O-x*E+b*S+_*k-w*T+A*M;return C?(C=1/C,t[0]=(s*O-l*E+u*S)*C,t[1]=(i*E-n*O-a*S)*C,t[2]=(v*A-g*w+y*_)*C,t[3]=(h*w-f*A-d*_)*C,t[4]=(l*k-o*O-u*T)*C,t[5]=(r*O-i*k+a*T)*C,t[6]=(g*b-p*A-y*x)*C,t[7]=(c*A-h*b+d*x)*C,t[8]=(o*E-s*k+u*M)*C,t[9]=(n*k-r*E-a*M)*C,t[10]=(p*w-v*b+y*m)*C,t[11]=(f*b-c*w-d*m)*C,t[12]=(s*T-o*S-l*M)*C,t[13]=(r*S-n*T+i*M)*C,t[14]=(v*x-p*_-g*m)*C,t[15]=(c*_-f*x+h*m)*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],y=e[2],m=i[0],x=i[1],b=i[2],_=r[0],w=r[1],A=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(y-A)<1e-6?n(t):(f=v-_,h=g-w,d=y-A,a=x*(d*=p=1/Math.sqrt(f*f+h*h+d*d))-b*(h*=p),o=b*(f*=p)-m*d,s=m*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*y),t[13]=-(l*v+u*g+c*y),t[14]=-(f*v+h*g+d*y),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],y=e[14],m=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*y,t[3]=x*o+b*c+_*p+w*m,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*y,t[7]=x*o+b*c+_*p+w*m,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*y,t[11]=x*o+b*c+_*p+w*m,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*y,t[15]=x*o+b*c+_*p+w*m,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,y,m,x,b,_,w,A,M,T,k,S,E=n[0],O=n[1],C=n[2],L=Math.sqrt(E*E+O*O+C*C);return Math.abs(L)<1e-6?null:(E*=L=1/L,O*=L,C*=L,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],y=e[10],m=e[11],x=E*E*o+a,b=O*E*o+C*i,_=C*E*o-O*i,w=E*O*o-C*i,A=O*O*o+a,M=C*O*o+E*i,T=E*C*o+O*i,k=O*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+d*b+y*_,t[3]=c*x+p*b+m*_,t[4]=s*w+f*A+v*M,t[5]=l*w+h*A+g*M,t[6]=u*w+d*A+y*M,t[7]=c*w+p*A+m*M,t[8]=s*T+f*k+v*S,t[9]=l*T+h*k+g*S,t[10]=u*T+d*k+y*S,t[11]=c*T+p*k+m*S,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],y=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+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*y+e[12],t[13]=i*v+l*g+h*y+e[13],t[14]=a*v+u*g+d*y+e[14],t[15]=o*v+c*g+p*y+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),y=0;for(f=0;f<3;++f){if(g[f]<-.001||g[f]>1.0001)return null;y+=g[f]}return Math.abs(y-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,y=p.wireShader,m=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 A(t,e,r,n,i,a,o,s,l,u,c,f,h,d,p,v,g,y,m,x,b,_,A,M,T,k,S){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=y,this.edgeIds=v,this.edgeVAO=m,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=A,this.pointSizes=M,this.pointIds=b,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=k,this.contourVAO=S,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 M=A.prototype;function T(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,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function S(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function E(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 O(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(t){this.pickId=t},M.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],y=1-g,m=this.positions[p],x=this.positions[v],b=0;b<3;++b)o[s++]=g*m[b]+y*x[b]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),d.free(o)}else this.contourCount=0},M.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*T(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=[],y=[],m=[],x=[],b=[],_=[];this.cells=r,this.positions=n;var w=t.vertexNormals,A=t.cellNormals,M=void 0===t.vertexNormalsEpsilon?1e-6:t.vertexNormalsEpsilon,k=void 0===t.faceNormalsEpsilon?1e-6:t.faceNormalsEpsilon;t.useFacetNormals&&!A&&(A=s.faceNormals(r,n,k)),A||w||(w=s.vertexNormals(r,n,M));var S=t.vertexColors,E=t.cellColors,O=t.meshColor||[1,1,1,1],C=t.vertexUVs,L=t.vertexIntensity,R=t.cellUVs,D=t.cellIntensity,I=1/0,P=-1/0;if(!C&&!R)if(L)if(t.vertexIntensityBounds)I=+t.vertexIntensityBounds[0],P=+t.vertexIntensityBounds[1];else for(var F=0;F<L.length;++F){var N=L[F];I=Math.min(I,N),P=Math.max(P,N)}else if(D)if(t.cellIntensityBounds)I=+t.cellIntensityBounds[0],P=+t.cellIntensityBounds[1];else for(F=0;F<D.length;++F)N=D[F],I=Math.min(I,N),P=Math.max(P,N);else for(F=0;F<n.length;++F)N=n[F][2],I=Math.min(I,N),P=Math.max(P,N);this.intensity=L||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.pickVertex=!(D||E);var B=t.pointSizes,z=t.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],F=0;F<n.length;++F)for(var j=n[F],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,G=0;t:for(F=0;F<r.length;++F){var Y=r[F];switch(Y.length){case 1:for(j=n[q=Y[0]],U=0;U<3;++U)if(isNaN(j[U])||!isFinite(j[U]))continue t;y.push(j[0],j[1],j[2]),X=S?S[q]:E?E[F]:O,this.opacityscale&&L?a.push(X[0],X[1],X[2],this.opacity*T((L[q]-I)/(P-I),this.opacityscale)):3===X.length?m.push(X[0],X[1],X[2],this.opacity):(m.push(X[0],X[1],X[2],X[3]*this.opacity),X[3]<1&&(this.hasAlpha=!0)),Z=C?C[q]:L?[(L[q]-I)/(P-I),0]:R?R[F]:D?[(D[F]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],x.push(Z[0],Z[1]),B?b.push(B[q]):b.push(z),_.push(F),G+=1;break;case 2:for(U=0;U<2;++U){j=n[q=Y[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=Y[U]],d.push(j[0],j[1],j[2]),X=S?S[q]:E?E[F]:O,this.opacityscale&&L?a.push(X[0],X[1],X[2],this.opacity*T((L[q]-I)/(P-I),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]:L?[(L[q]-I)/(P-I),0]:R?R[F]:D?[(D[F]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],v.push(Z[0],Z[1]),g.push(F);V+=1;break;case 3:for(U=0;U<3;++U)for(j=n[q=Y[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=Y[2-U]],i.push(j[0],j[1],j[2]),(X=S?S[q]:E?E[F]:O)?this.opacityscale&&L?a.push(X[0],X[1],X[2],this.opacity*T((L[q]-I)/(P-I),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]:L?[(L[q]-I)/(P-I),0]:R?R[F]:D?[(D[F]-I)/(P-I),0]:[(j[2]-I)/(P-I),0],u.push(Z[0],Z[1]),J=w?w[q]:A[F],l.push(J[0],J[1],J[2]),h.push(F)}H+=1}}this.pointCount=G,this.edgeCount=V,this.triangleCount=H,this.pointPositions.update(y),this.pointColors.update(m),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))}},M.drawTransparent=M.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())},M.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())},M.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]]]}},M.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,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}(t),l=k(t),u=S(t),f=E(t),h=O(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),m=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:m,type:t.FLOAT,size:2},{buffer:x,type:t.FLOAT,size:3}]),w=i(t),M=i(t),T=i(t),C=i(t),L=a(t,[{buffer:w,type:t.FLOAT,size:3},{buffer:C,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:t.FLOAT,size:4},{buffer:T,type:t.FLOAT,size:2}]),R=i(t),D=i(t),I=i(t),P=i(t),F=i(t),N=a(t,[{buffer:R,type:t.FLOAT,size:3},{buffer:F,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:D,type:t.FLOAT,size:4},{buffer:I,type:t.FLOAT,size:2},{buffer:P,type:t.FLOAT,size:1}]),B=i(t),z=new A(t,d,r,s,l,u,f,h,p,b,v,m,x,_,w,C,M,T,L,R,F,D,I,P,N,B,a(t,[{buffer:B,type:t.FLOAT,size:3}]));return z.update(e),z}},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],y=a[v+2]-g,m=.5*(o[v+2]+o[v]),x=o[v+2]-o[v];c[v]=2*y/x,u[v]=2*(g-m)/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,y=s.screenBox,m=y[2]-y[0],x=y[3]-y[1],b=v[2]-v[0],_=v[3]-v[1],w=0;w<2;++w){var A=d[w],M=d[w+2]-A,T=.5*(p[w+2]+p[w]),k=p[w+2]-p[w];e[w]=2*M/k,t[w]=2*(A-T)/k}e[0]*=b/m,t[0]*=b/m,e[1]*=_/x,t[1]*=_/x,c.bind(),u.bind(),c.attributes.dataCoord.pointer();var S=c.uniforms;S.dataShift=t,S.dataScale=e;var E=s.tickMarkLength,O=s.tickMarkWidth,C=s.tickMarkColor,L=6*f[0].length,R=Math.min(a.ge(f[0],(p[0]-d[0])/(d[2]-d[0]),l),f[0].length),D=Math.min(a.gt(f[0],(p[2]-d[0])/(d[2]-d[0]),l),f[0].length),I=0+6*R,P=6*Math.max(0,D-R),F=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),B=L+6*F,z=6*Math.max(0,N-F);i[0]=2*(v[0]-E[1])/m-1,i[1]=(v[3]+v[1])/x-1,o[0]=E[1]*g/m,o[1]=O[1]*g/x,z&&(S.color=C[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,B,z)),i[0]=(v[2]+v[0])/m-1,i[1]=2*(v[1]-E[0])/x-1,o[0]=O[0]*g/m,o[1]=E[0]*g/x,P&&(S.color=C[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,P)),i[0]=2*(v[2]+E[3])/m-1,i[1]=(v[3]+v[1])/x-1,o[0]=E[3]*g/m,o[1]=O[3]*g/x,z&&(S.color=C[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=i,h.drawArrays(h.TRIANGLES,B,z)),i[0]=(v[2]+v[0])/m-1,i[1]=2*(v[3]+E[2])/x-1,o[0]=O[2]*g/m,o[1]=E[2]*g/x,P&&(S.color=C[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=i,h.drawArrays(h.TRIANGLES,I,P))}}(),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,y=e.tickAngle,m=e.labelEnable,x=e.labelPad,b=e.labelColor,_=e.labelAngle,w=this.labelOffset[t],A=this.labelCount[t],M=o.lt(n,l[t]),T=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],M<T&&i[T]>i[M]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t],r.uniforms.angle=y[t],a.drawArrays(a.TRIANGLES,i[M],i[T]-i[M]))),m[t]&&A&&(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,A)),c[1^t]=k*s[2+(1^t)]-1,p[t+2]&&(c[1^t]+=k*d*v[t+2],M<T&&i[T]>i[M]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t+2],r.uniforms.angle=y[t+2],a.drawArrays(a.TRIANGLES,i[M],i[T]-i[M]))),m[t+2]&&A&&(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,A))}),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],y=i[o+2]-g;d[o]=2*l/c*v/y,h[o]=2*(s-u)/c*v/y}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 y=1/(u[o+2]-u[o]),m=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-m)*y);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,y=this.borderLineWidth,m=this.borderLineColor;for(g[1]&&o.drawLine(r[0],r[1]-.5*y[1]*i,r[0],r[3]+.5*y[3]*i,y[1],m[1]),g[0]&&o.drawLine(r[0]-.5*y[0]*i,r[1],r[2]+.5*y[2]*i,r[1],y[0],m[0]),g[3]&&o.drawLine(r[2],r[1]-.5*y[1]*i,r[2],r[3]+.5*y[3]*i,y[3],m[3]),g[2]&&o.drawLine(r[0]-.5*y[0]*i,r[3],r[2]+.5*y[2]*i,r[3],y[2],m[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),y=!!(2&e),m=!!(4&e),x=1/t.clientHeight,b=x*(r-p._lastX),_=x*(i-p._lastY),w=p.flipX?1:-1,A=p.flipY?1:-1,M=Math.PI*p.rotateSpeed,T=n();if(-1!==p._lastX&&-1!==p._lastY&&((s&&g&&!h&&!d&&!v||g&&!h&&!d&&v)&&u.rotate(T,w*M*b,-A*M*_,0),(l&&g&&!h&&!d&&!v||y||g&&h&&!d&&!v)&&u.pan(T,-p.translateSpeed*b*f,p.translateSpeed*_*f,0),c&&g&&!h&&!d&&!v||m||g&&!h&&d&&!v)){var k=-p.zoomSpeed*_/window.innerHeight*(T-u.lastT())*100;u.pan(T,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 y(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 m=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,A={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},M=t.axes||{},T=i(r,M);T.enable=!M.disable;var k=t.spikes||{},S=o(r,k),E=[],O=[],C=[],L=[],R=!0,D=!0,I={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},P=(D=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),F=t.cameraObject||n(e,A),N={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:F,axes:T,axesPixels:null,spikes:S,bounds:m,objects:E,shape:P,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:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,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,D=!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)}},B=[r.drawingBufferWidth/N.pixelRatio|0,r.drawingBufferHeight/N.pixelRatio|0];function z(){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=E.length,e=L.length,n=0;n<e;++n)C[n]=0;t:for(n=0;n<t;++n){var i=E[n],a=i.pickSlots;if(a){for(var o=0;o<e;++o)if(C[o]+a<255){O[n]=o,i.setPickBase(C[o]+1),C[o]+=a;continue t}var l=s(r,P);O[n]=e,L.push(l),C.push(a),i.setPickBase(1),e+=1}else O[n]=-1}for(;e>0&&0===C[e-1];)C.pop(),L.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&&z(),window.addEventListener("resize",z),N.update=function(t){N._stopped||(t=t||{},R=!0,D=!0)},N.add=function(t){N._stopped||(t.axes=T,E.push(t),O.push(-1),R=!0,D=!0,j())},N.remove=function(t){if(!N._stopped){var e=E.indexOf(t);e<0||(E.splice(e,1),O.pop(),R=!0,D=!0,j())}},N.dispose=function(){if(!N._stopped&&(N._stopped=!0,window.removeEventListener("resize",z),e.removeEventListener("webglcontextlost",U),N.mouseListener.enabled=!1,!N.contextLost)){T.dispose(),S.dispose();for(var t=0;t<E.length;++t)E[t].dispose();for(b.dispose(),t=0;t<L.length;++t)L[t].dispose();_.dispose(),r=null,T=null,S=null,E=[]}},N._mouseRotating=!1,N._prevButtons=0,N.enableMouseListeners=function(){N.mouseListener=c(e,(function(t,e,r){if(!N._stopped){var n=L.length,i=E.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&&(D=!0),N._mouseRotating=!1;for(var s=0;s<n;++s){var l=L[s].query(e,B[1]-r-1,N.pickRadius);if(l){if(l.distance>x.distance)continue;for(var u=0;u<i;++u){var c=E[u];if(O[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 G(){if(!U()){z();var t=N.camera.tick();I.view=N.camera.matrix,R=R||t,D=D||t,T.pixelRatio=N.pixelRatio,S.pixelRatio=N.pixelRatio;var e=E.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=E[o]).pixelRatio=N.pixelRatio,C.axes=N.axes,R=R||!!C.dirty,D=D||!!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 y=!1;for(d=0;d<3;++d)y=y||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(D=D||y,R=R||y){if(y){var m=[0,0,0];for(o=0;o<3;++o)m[o]=g((p[1][o]-p[0][o])/10);T.autoTicks?T.update({bounds:p,tickSpacing:m}):T.update({bounds:p})}var A=r.drawingBufferWidth,M=r.drawingBufferHeight;for(P[0]=A,P[1]=M,B[0]=0|Math.max(A/N.pixelRatio,1),B[1]=0|Math.max(M/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=E[o]).axesBounds=p,N.clipToBounds&&(C.clipBounds=p);x.object&&(N.snapToData?S.position=x.dataCoordinate:S.position=x.dataPosition,S.bounds=p),D&&(D=!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=E.length,e=L.length,n=0;n<e;++n){var i=L[n];i.shape=B,i.begin();for(var a=0;a<t;++a)if(O[a]===n){var o=E[a];o.drawPick&&(o.pixelRatio=1,o.drawPick(I))}i.end()}}}()),N.axesPixels=a(N.axes,I,A,M),N.onrender&&N.onrender(),r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,A,M),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(T.enable&&(k=k||T.isTransparent(),T.draw(I)),S.axes=T,x.object&&S.draw(I),r.disable(r.CULL_FACE),o=0;o<e;++o)(C=E[o]).axes=T,C.pixelRatio=N.pixelRatio,C.isOpaque&&C.isOpaque()&&C.draw(I),C.isTransparent&&C.isTransparent()&&(k=!0);if(k){for(b.shape=P,b.bind(),r.clear(r.DEPTH_BUFFER_BIT),r.colorMask(!1,!1,!1,!1),r.depthMask(!0),r.depthFunc(r.LESS),T.enable&&T.isTransparent()&&T.drawTransparent(I),o=0;o<e;++o)(C=E[o]).isOpaque&&C.isOpaque()&&C.draw(I);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),T.isTransparent()&&T.drawTransparent(I),o=0;o<e;++o){var C;(C=E[o]).isTransparent&&C.isTransparent()&&C.drawTransparent(I)}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)E[o].dirty=!1}}}return N.enableMouseListeners(),function t(){N._stopped||N.contextLost||(G(),requestAnimationFrame(t))}(),N.redraw=function(){N._stopped||(R=!0,G())},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 y(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 y(t,f)},e.createOrtho=function(t){return y(t,h)},e.createProject=function(t){return y(t,d)},e.createPickPerspective=function(t){return y(t,p)},e.createPickOrtho=function(t){return y(t,v)},e.createPickProject=function(t){return y(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 y=g.prototype;y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},y.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 m=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],A=f.slice(),M=[0,0,0],T=[[0,0,0],[0,0,0]];function k(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var O=[[-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=T,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],m[0]=2/o.drawingBufferWidth,m[1]=2/o.drawingBufferHeight,t.bind(),l.view=c,l.projection=h,l.screenSize=m,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 y=A,O=0;O<16;++O)y[O]=0;for(O=0;O<4;++O)y[5*O]=1;y[5*g]=0,i[g]<0?y[12+g]=p[0][g]:y[12+g]=p[1][g],s(y,u,y),l.model=y;var C=(g+1)%3,L=(g+2)%3,R=k(x),D=k(b);R[C]=1,D[L]=1;var I=d(0,0,0,S(_,R)),P=d(0,0,0,S(w,D));if(Math.abs(I[1])>Math.abs(P[1])){var F=I;I=P,P=F,F=R,R=D,D=F;var N=C;C=L,L=N}I[0]<0&&(R[C]=-1),P[1]>0&&(D[L]=-1);var B=0,z=0;for(O=0;O<4;++O)B+=Math.pow(u[4*C+O],2),z+=Math.pow(u[4*L+O],2);R[C]/=Math.sqrt(B),D[L]/=Math.sqrt(z),l.axes[0]=R,l.axes[1]=D,l.fragClipBounds[0]=E(M,v[0],g,-1e8),l.fragClipBounds[1]=E(M,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,m[0]=2/l.drawingBufferWidth,m[1]=2/l.drawingBufferHeight,u.screenSize=m,u.highlightId=r.highlightId,u.highlightScale=r.highlightScale,u.fragClipBounds=O,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 L(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}}y.draw=function(t){C(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!1,!1)},y.drawTransparent=function(t){C(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,t,this.pixelRatio,!0,!1)},y.drawPick=function(t){C(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,t,1,!0,!0)},y.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},y.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]},y.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,y=t.lineColor,m=-1,x=0,b=0,_=0;if(s.length){_=s.length;t:for(n=0;n<_;++n){for(var w=s[n],A=0;A<3;++A)if(isNaN(w[A])||!isFinite(w[A]))continue t;var M=(z=L(h,n,l,this.pixelRatio)).mesh,T=z.lines,k=z.bounds;x+=3*M.cells.length,b+=2*T.edges.length}}var S=x+b,E=o.mallocFloat(3*S),O=o.mallocFloat(4*S),C=o.mallocFloat(2*S),R=o.mallocUint32(S);if(S>0){var D=0,I=x,P=[0,0,0,1],F=[0,0,0,1],N=Array.isArray(d)&&Array.isArray(d[0]),B=Array.isArray(y)&&Array.isArray(y[0]);t:for(n=0;n<_;++n){for(m+=1,w=s[n],A=0;A<3;++A){if(isNaN(w[A])||!isFinite(w[A]))continue t;f[A]=Math.max(f[A],w[A]),c[A]=Math.min(c[A],w[A])}M=(z=L(h,n,l,this.pixelRatio)).mesh,T=z.lines,k=z.bounds;var z,j=z.visible;if(j)if(Array.isArray(d)){if(3===(U=N?n<d.length?d[n]:[0,0,0,0]:d).length){for(A=0;A<3;++A)P[A]=U[A];P[3]=1}else if(4===U.length){for(A=0;A<4;++A)P[A]=U[A];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else P[0]=P[1]=P[2]=0,P[3]=1;else P=[1,1,1,0];if(j)if(Array.isArray(y)){var U;if(3===(U=B?n<y.length?y[n]:[0,0,0,0]:y).length){for(A=0;A<3;++A)F[A]=U[A];F[A]=1}else if(4===U.length){for(A=0;A<4;++A)F[A]=U[A];!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0)}}else F[0]=F[1]=F[2]=0,F[3]=1;else F=[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 G=Math.cos(V),Y=Math.sin(V);for(w=s[n],A=0;A<3;++A)f[A]=Math.max(f[A],w[A]),c[A]=Math.min(c[A],w[A]);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=M.cells||[],J=M.positions||[];for(A=0;A<Z.length;++A)for(var K=Z[A],Q=0;Q<3;++Q){for(var $=0;$<3;++$)E[3*D+$]=w[$];for($=0;$<4;++$)O[4*D+$]=P[$];R[D]=m;var tt=J[K[Q]];C[2*D]=H*(G*tt[0]-Y*tt[1]+X[0]),C[2*D+1]=H*(Y*tt[0]+G*tt[1]+X[1]),D+=1}for(Z=T.edges,J=T.positions,A=0;A<Z.length;++A)for(K=Z[A],Q=0;Q<2;++Q){for($=0;$<3;++$)E[3*I+$]=w[$];for($=0;$<4;++$)O[4*I+$]=F[$];R[I]=m,tt=J[K[Q]],C[2*I]=H*(G*tt[0]-Y*tt[1]+X[0]),C[2*I+1]=H*(Y*tt[0]+G*tt[1]+X[1]),I+=1}}}this.bounds=[c,f],this.points=s,this.pointCount=s.length,this.vertexCount=x,this.lineVertexCount=b,this.pointBuffer.update(E),this.colorBuffer.update(O),this.glyphBuffer.update(C),this.idBuffer.update(R),o.free(E),o.free(O),o.free(C),o.free(R)},y.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 y=r*c;o.drawBox(f-y,h-y,d+y,h+y,a),o.drawBox(f-y,p-y,d+y,p+y,a),o.drawBox(f-y,h-y,f+y,p+y,a),o.drawBox(d-y,h-y,d+y,p+y,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 y=d.getProgramInfoLog(g);throw new l(y,"Error linking program:"+y)}r=r||s.uniforms(d,g),u=u||s.attributes(d,g),d.deleteProgram(g)}(u=u.slice()).sort(f);var m,x=[],b=[],_=[];for(m=0;m<u.length;++m){var w=u[m];if(w.type.indexOf("mat")>=0){for(var A=0|w.type.charAt(w.type.length-1),M=new Array(A),T=0;T<A;++T)M[T]=_.length,b.push(w.name+"["+T+"]"),"number"==typeof w.location?_.push(w.location+T):Array.isArray(w.location)&&w.location.length===A&&"number"==typeof w.location[T]?_.push(0|w.location[T]):_.push(-1);x.push({name:w.name,type:w.type,locations:M})}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(m=0;m<_.length;++m)if(_[m]<0){for(;_.indexOf(k)>=0;)k+=1;_[m]=k}var S=new Array(r.length);function E(){h.program=o.program(d,h._vref,h._fref,b,_);for(var t=0;t<r.length;++t)S[t]=d.getUniformLocation(h.program,r[t].name)}E(),h._relink=E,h.types={uniforms:a(r),attributes:a(u)},h.attributes=i(d,h,x,_),Object.defineProperty(h,"uniforms",n(d,h,r,S))},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 y,m=r[f].type;switch(m){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=m.indexOf("vec");if(!(0<=x&&x<=1&&m.length===4+x)){if(0===m.indexOf("mat")&&4===m.length){if((y=m.charCodeAt(m.length-1)-48)<2||y>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+m);t["uniformMatrix"+y+"fv"](s[f],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+m)}if((y=m.charCodeAt(m.length-1)-48)<2||y>4)throw new i("","Invalid data type");switch(m.charAt(0)){case"b":case"i":t["uniform"+y+"iv"](s[f],h);break;case"v":t["uniform"+y+"fv"](s[f],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+m)}}}}}}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),y=p+1,m=v+1,x=g+1;if(p=s(p,0,f-1),y=s(y,0,f-1),v=s(v,0,h-1),m=s(m,0,h-1),g=s(g,0,d-1),x=s(x,0,d-1),p<0||v<0||g<0||y>f-1||m>h-1||x>d-1)return n.create();var b,_,w,A,M,T,k=a[0][p],S=a[0][y],E=a[1][v],O=a[1][m],C=a[2][g],L=(l-k)/(S-k),R=(u-E)/(O-E),D=(c-C)/(a[2][x]-C);switch(isFinite(L)||(L=.5),isFinite(R)||(R=.5),isFinite(D)||(D=.5),r.reversedX&&(p=f-1-p,y=f-1-y),r.reversedY&&(v=h-1-v,m=h-1-m),r.reversedZ&&(g=d-1-g,x=d-1-x),r.filled){case 5:M=g,T=x,w=v*d,A=m*d,b=p*d*h,_=y*d*h;break;case 4:M=g,T=x,b=p*d,_=y*d,w=v*d*f,A=m*d*f;break;case 3:w=v,A=m,M=g*h,T=x*h,b=p*h*d,_=y*h*d;break;case 2:w=v,A=m,b=p*h,_=y*h,M=g*h*f,T=x*h*f;break;case 1:b=p,_=y,M=g*f,T=x*f,w=v*f*d,A=m*f*d;break;default:b=p,_=y,w=v*f,A=m*f,M=g*f*h,T=x*f*h}var I=i[b+w+M],P=i[b+w+T],F=i[b+A+M],N=i[b+A+T],B=i[_+w+M],z=i[_+w+T],j=i[_+A+M],U=i[_+A+T],H=n.create(),V=n.create(),G=n.create(),Y=n.create();n.lerp(H,I,B,L),n.lerp(V,P,z,L),n.lerp(G,F,j,L),n.lerp(Y,N,U,L);var W=n.create(),q=n.create();n.lerp(W,H,G,R),n.lerp(q,V,Y,R);var X=n.create();return n.lerp(X,W,q,D),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=[],y=e[0][0],m=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],A=function(t){var e=t[0],r=t[1],n=t[2];return!(e<y||e>b||r<m||r>_||n<x||n>w)},M=10*n.distance(e[0],e[1])/u,T=M*M,k=1,S=0,E=r.length;E>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),y=Math.min(p,v,g);return isFinite(y)?y:1}(r));for(var O=0;O<E;O++){var C=n.create();n.copy(C,r[O]);var L=[C],R=[],D=p(C),I=C;R.push(D);var P=[],F=v(C,D),N=n.length(F);isFinite(N)&&N>S&&(S=N),P.push(N),g.push({points:L,velocities:R,divergences:P});for(var B=0;B<100*u&&L.length<u&&A(C);){B++;var z=n.clone(D),j=n.squaredLength(z);if(0===j)break;j>T&&n.scale(z,z,M/Math.sqrt(j)),n.add(z,z,C),D=p(z),n.squaredDistance(I,z)-T>-1e-4*T&&(L.push(z),I=z,R.push(D),F=v(z,D),N=n.length(F),isFinite(N)&&N>S&&(S=N),P.push(N)),C=z}}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,y=i.create(),m=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,y=i.create(),n.copy(y,_),y[3]=w;for(var A=0;A<8;A++)d[A]=[b[0],b[1],b[2],A];if(h.length>0)for(A=0;A<8;A++){var M=(A+1)%8;u.push(h[A],d[A],d[M],d[M],h[M],h[A]),f.push(m,y,y,y,m,m),p.push(v,g,g,g,v,v);var T=u.length;c.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var k=h;h=d,d=k;var S=m;m=y,y=S;var E=v;v=g,g=E}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 y=v.cells[u],m=[];h.push(m);for(var x=0;x<y.length;x++)m.push(y[x]+g)}}return{positions:f,cells:h,vectors:d,vertexIntensity:p,colormap:e}}(g,t.colormap,S,k);return f?U.tubeScale=f:(0===S&&(S=1),U.tubeScale=.5*c*k/S),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=m(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,S,e.RGBA,e.UNSIGNED_BYTE);v.minFilter=e.LINEAR,v.magFilter=e.LINEAR;var g=new E(e,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,v,s,l,f,h,d,p,[0,0,0]),y={levels:[[],[],[]]};for(var A in t)y[A]=t[A];return y.colormap=y.colormap||"jet",g.update(y),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),y=r(990),m=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=40,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function 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=T[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=256;function E(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 O=E.prototype;O.genColormap=function(t,e){var r=!1,n=c([l({colormap:t,nshades:S,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},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(t){this.pickId=t};var C=[0,0,0],L={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.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=L.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=L.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 L.showSurface=o,L.showContour=s,L}var D={model:A,view:A,projection:A,inverseModel:A.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},I=A.slice(),P=[1,0,0,0,1,0,0,0,1];function F(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=D;n.model=t.model||A,n.view=t.view||A,n.projection=t.projection||A,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=P,n.vertexColor=this.vertexColor;var s=I;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=T[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=T[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=T[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()}}O.draw=function(t){return F.call(this,t,!1)},O.drawTransparent=function(t){return F.call(this,t,!0)};var N={model:A,view:A,projection:A,inverseModel:A,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 B(t,e){return Array.isArray(t)?[e(t[0]),e(t[1]),e(t[2])]:[e(t),e(t),e(t)]}function z(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[z(t[0]),z(t[1]),z(t[2])];var e=z(t);return[e.slice(),e.slice(),e.slice()]}}O.drawPick=function(t){t=t||{};var e=this.gl;e.disable(e.CULL_FACE);var r=N;r.model=t.model||A,r.view=t.view||A,r.projection=t.projection||A,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=P;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=T[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=T[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()}},O.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),y=0;y<3;++y)u[y]+=this._field[y].get(d,p)*g;for(var m=this._pickResult.level,x=0;x<3;++x)if(m[x]=v.le(this.contourLevels[x],u[x]),m[x]<0)this.contourLevels[x].length>0&&(m[x]=0);else if(m[x]<this.contourLevels[x].length-1){var b=this.contourLevels[x][m[x]],_=this.contourLevels[x][m[x]+1];Math.abs(b-u[x])>Math.abs(_-u[x])&&(m[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],y=0;y<3;++y)r.dataCoordinate[y]=this._field[y].get(r.index[0],r.index[1]);return r},O.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))},O.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=B(t.contourWidth,Number)),"showContour"in t&&(this.showContour=B(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=B(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=j(t.contourColor)),"contourProject"in t&&(this.contourProject=B(t.contourProject,(function(t){return B(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=j(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=B(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=B(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(y=0;y<2;++y)if(u.shape[y]!==a[y])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 y=0;y<a[0];++y)this._field[0].set(y+1,0,y);for(this._field[0].set(a[0]+1,0,a[0]-1),this._field[1].set(0,0,0),y=0;y<a[1];++y)this._field[1].set(0,y+1,y);this._field[1].set(0,a[1]+1,a[1]-1)}var m=this._field,x=f(s.mallocFloat(3*m[2].size*2),[3,a[0]+2,a[1]+2,2]);for(o=0;o<3;++o)g(x.pick(o),m[o],"mirror");var b=f(s.mallocFloat(3*m[2].size),[a[0]+2,a[1]+2,3]);for(o=0;o<a[0]+2;++o)for(y=0;y<a[1]+2;++y){var _=x.get(0,o,y,0),w=x.get(0,o,y,1),A=x.get(1,o,y,0),T=x.get(1,o,y,1),k=x.get(2,o,y,0),S=x.get(2,o,y,1),E=A*S-T*k,O=k*w-S*_,C=_*T-w*A,L=Math.sqrt(E*E+O*O+C*C);L<1e-8?(L=Math.max(Math.abs(E),Math.abs(O),Math.abs(C)))<1e-8?(C=1,O=E=0,L=1):L=1/L:L=1/Math.sqrt(L),b.set(o,y,0,E*L),b.set(o,y,1,O*L),b.set(o,y,2,C*L)}s.free(x.data);var R=[1/0,1/0,1/0],D=[-1/0,-1/0,-1/0],I=1/0,P=-1/0,F=(a[0]-1)*(a[1]-1)*6,N=s.mallocFloat(n.nextPow2(10*F)),z=0,U=0;for(o=0;o<a[0]-1;++o)t:for(y=0;y<a[1]-1;++y){for(var H=0;H<2;++H)for(var V=0;V<2;++V)for(var G=0;G<3;++G){var Y=this._field[G].get(1+o+H,1+y+V);if(isNaN(Y)||!isFinite(Y))continue t}for(G=0;G<6;++G){var W=o+M[G][0],q=y+M[G][1],X=this._field[0].get(W+1,q+1),Z=this._field[1].get(W+1,q+1);Y=this._field[2].get(W+1,q+1),E=b.get(W+1,q+1,0),O=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):Y+this.objectOffset[2];N[z++]=W,N[z++]=q,N[z++]=X,N[z++]=Z,N[z++]=Y,N[z++]=0,N[z++]=J,N[z++]=E,N[z++]=O,N[z++]=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],Y+this.objectOffset[2]),I=Math.min(I,J),D[0]=Math.max(D[0],X+this.objectOffset[0]),D[1]=Math.max(D[1],Z+this.objectOffset[1]),D[2]=Math.max(D[2],Y+this.objectOffset[2]),P=Math.max(P,J),U+=1}}for(t.intensityBounds&&(I=+t.intensityBounds[0],P=+t.intensityBounds[1]),o=6;o<z;o+=10)N[o]=(N[o]-I)/(P-I);this._vertexCount=U,this._coordinateBuffer.update(N.subarray(0,z)),s.freeFloat(N),s.free(b.data),this.bounds=[R,D],this.intensity=t.intensity||this._field[2],this.intensityBounds[0]===I&&this.intensityBounds[1]===P||(r=!0),this.intensityBounds=[I,P]}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(y=0;y<K[o].length;++y)K[o][y]-=this.objectOffset[o];t:for(o=0;o<3;++o){if(K[o].length!==this.contourLevels[o].length){r=!0;break}for(y=0;y<K[o].length;++y)if(K[o][y]!==this.contourLevels[o][y]){r=!0;break t}}this.contourLevels=K}if(r){m=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(y=0;y<it.cells.length;++y){var at=it.cells[y];for(G=0;G<2;++G){var ot=it.positions[at[G]],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 yt=V?ht:1-ht;if(q=0|Math.min(Math.max(ft+V,0),a[1]),Y=pt<2?this._field[vt].get(W,q):(this.intensity.get(W,q)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Y)||isNaN(Y)){dt=!0;break e}var mt=gt*yt;nt[pt]+=mt*Y}}}if(dt){if(G>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)}},O.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)},O.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 y=v[e],m=0;m<2;++m){var x=g[y[m]],b=+x[0],_=0|b,w=0|Math.min(_+1,i[0]),A=b-_,M=1-A,T=+x[1],k=0|T,S=0|Math.min(k+1,i[1]),E=T-k,O=1-E,C=M*O,L=M*E,R=A*O,D=A*E,I=C*f.get(_,k)+L*f.get(_,S)+R*f.get(w,k)+D*f.get(w,S),P=C*d.get(_,k)+L*d.get(_,S)+R*d.get(w,k)+D*d.get(w,S);if(isNaN(I)||isNaN(P)){m&&(n-=1);break}a[2*n+0]=I,a[2*n+1]=P,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 y=e.size;if(l)f=0===e.offset&&e.data.length===y?e.data:e.data.subarray(e.offset,e.offset+y);else{var m=[o[2],o[2]*o[0],1];d=a.malloc(y,r);var x=n(d,o,m,0);"float32"!==r&&"float64"!==r||u!==t.UNSIGNED_BYTE?i.assign(x,e):c(x,e),f=d.subarray(0,y)}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,y=p(d,f.stride.slice());if("float32"===h?v=t.FLOAT:"float64"===h?(v=t.FLOAT,y=!1,h="float32"):"uint8"===h?v=t.UNSIGNED_BYTE:(v=t.UNSIGNED_BYTE,y=!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 m=f.size,x=u.indexOf(o)<0;if(x&&u.push(o),v===l&&y)0===f.offset&&f.data.length===m?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+m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,d[0],d[1],s,l,f.data.subarray(f.offset,f.offset+m));else{var b;b=l===t.FLOAT?a.mallocFloat32(m):a.mallocUint8(m);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,m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,d[0],d[1],s,l,b.subarray(0,m)),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,A,M=0,T=0,k=l,S=[],E=[],O=1,C=0,L=0,R=!1,D=!1,I="",P=a,F=n;"300 es"===(t=t||{}).version&&(P=s,F=o);var N={},B={};for(M=0;M<P.length;M++)N[P[M]]=!0;for(M=0;M<F.length;M++)B[F[M]]=!0;return function(t){return E=[],null!==t?function(t){var r;for(M=0,t.toString&&(t=t.toString()),I+=t.replace(/\r\n/g,"\n"),A=I.length;e=I[M],M<A;){switch(r=M,k){case c:M=V();break;case f:case h:M=H();break;case d:M=G();break;case p:M=q();break;case _:M=W();break;case v:M=X();break;case u:M=Z();break;case x:M=U();break;case l:M=j()}r!==M&&("\n"===I[r]?(C=0,++O):++C)}return T+=M,I=I.slice(M),E}(t):(S.length&&z(S.join("")),k=b,z("(eof)"),E)};function z(t){t.length&&E.push({type:w[k],data:t,position:L,line:O,column:C})}function j(){return S=S.length?[]:S,"/"===r&&"*"===e?(L=T+M-1,k=c,r=e,M+1):"/"===r&&"/"===e?(L=T+M-1,k=f,r=e,M+1):"#"===e?(k=h,L=T+M,M):/\s/.test(e)?(k=x,L=T+M,M):(R=/\d/.test(e),D=/[^\w_]/.test(e),L=T+M,k=R?p:D?d:u,M)}function U(){return/[^\s]/g.test(e)?(z(S.join("")),k=l,M):(S.push(e),r=e,M+1)}function H(){return"\r"!==e&&"\n"!==e||"\\"===r?(S.push(e),r=e,M+1):(z(S.join("")),k=l,M)}function V(){return"/"===e&&"*"===r?(S.push(e),z(S.join("")),k=l,M+1):(S.push(e),r=e,M+1)}function G(){if("."===r&&/\d/.test(e))return k=v,M;if("/"===r&&"*"===e)return k=c,M;if("/"===r&&"/"===e)return k=f,M;if("."===e&&S.length){for(;Y(S););return k=v,M}if(";"===e||")"===e||"("===e){if(S.length)for(;Y(S););return z(e),k=l,M+1}var t=2===S.length&&"="!==e;if(/[\w_\d\s]/.test(e)||t){for(;Y(S););return k=l,M}return S.push(e),r=e,M+1}function Y(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 z(r),L+=r.length,(S=S.slice(r.length)).length}}function W(){return/[^a-fA-F0-9]/.test(e)?(z(S.join("")),k=l,M):(S.push(e),r=e,M+1)}function q(){return"."===e||/[eE]/.test(e)?(S.push(e),k=v,r=e,M+1):"x"===e&&1===S.length&&"0"===S[0]?(k=_,S.push(e),r=e,M+1):/[^\d]/.test(e)?(z(S.join("")),k=l,M):(S.push(e),r=e,M+1)}function X(){return"f"===e&&(S.push(e),r=e,M+=1),/[eE]/.test(e)?(S.push(e),r=e,M+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(z(S.join("")),k=l,M):(S.push(e),r=e,M+1)}function Z(){if(/[^\d\w_]/.test(e)){var t=S.join("");return k=B[t]?m:N[t]?y:g,z(S.join("")),k=l,M}return S.push(e),r=e,M+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,y=7,m=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 y=new a(p,new Array(i+1),!0);h[c]=y,d[c]=y}for(d[i+1]=f,c=0;c<=i;++c){p=h[c].vertices;var m=h[c].adjacent;for(v=0;v<=i;++v){var x=p[v];if(x<0)m[v]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(m[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 y=p[g];if(y.boundary&&!(y.lastVisited>=r)){var m=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)m[b]<0?(x=b,l[b]=t):l[b]=i[m[b]];if(this.orient()>0){m[x]=r,y.boundary=!1,u.push(y),f.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=d.slice(),A=p.slice(),M=new a(w,A,!0);c.push(M);var T=_.indexOf(e);if(!(T<0))for(_[T]=M,A[v]=y,w[g]=-1,A[g]=e,p[g]=M,M.flip(),b=0;b<=n;++b){var k=w[b];if(!(k<0||k===r)){for(var S=new Array(n-1),E=0,O=0;O<=n;++O){var C=w[O];C<0||O===b||(S[E++]=C)}h.push(new o(S,M,b))}}}}}for(h.sort(s),g=0;g+1<h.length;g+=2){var L=h[g],R=h[g+1],D=L.index,I=R.index;D<0||I<0||(L.cell.adjacent[L.index]=R.cell,R.cell.adjacent[R.index]=L.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 y(g(t)):new y(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 y(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 m=y.prototype;m.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},m.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},m.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},m.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(m,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(m,"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,y){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[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 m,x,b,_,w,A,M,T=c[3],k=c[7],S=c[11],E=c[12],O=c[13],C=c[14],L=c[15];if(0!==T||0!==k||0!==S){if(h[0]=T,h[1]=k,h[2]=S,h[3]=L,!s(f,f))return!1;l(f,f),m=g,b=f,_=(x=h)[0],w=x[1],A=x[2],M=x[3],m[0]=b[0]*_+b[4]*w+b[8]*A+b[12]*M,m[1]=b[1]*_+b[5]*w+b[9]*A+b[13]*M,m[2]=b[2]*_+b[6]*w+b[10]*A+b[14]*M,m[3]=b[3]*_+b[7]*w+b[11]*A+b[15]*M}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=E,e[1]=O,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 y[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(y[0]=-y[0]),d[0][2]>d[2][0]&&(y[1]=-y[1]),d[1][0]>d[0][1]&&(y[2]=-y[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 y=this.computedEye,m=g[15];y[0]=g[12]/m,y[1]=g[13]/m,y[2]=g[14]/m;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)x[u]=y[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 y={element:t};return Object.defineProperties(y,{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}}),y};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,y=0|-p,m=0,x=0|-v,b=0,_=-p-v|0,w=0,A=0|p,M=v-p*c|0,T=0,k=0,S=0,E=2*c|0,O=n(E),C=n(E),L=0,R=0,D=-1,I=-1,P=0,F=0|-c,N=0|c,B=0,z=-c-1|0,j=c-1|0,U=0,H=0,V=0;for(T=0;T<c;++T)O[L++]=r(h[g],o,s,l),g+=A;if(g+=M,f>0){if(k=1,O[L++]=r(h[g],o,s,l),g+=A,c>0)for(T=1,u=h[g],R=O[L]=r(u,o,s,l),P=O[L+D],B=O[L+F],U=O[L+z],R===P&&R===B&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,P,B,U,o,s,l),H=C[L]=S++),L+=1,g+=A,T=2;T<c;++T)u=h[g],R=O[L]=r(u,o,s,l),P=O[L+D],B=O[L+F],U=O[L+z],R===P&&R===B&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,P,B,U,o,s,l),H=C[L]=S++,U!==P&&e(C[L+D],H,w,m,U,P,o,s,l)),L+=1,g+=A;for(g+=M,L=0,V=D,D=I,I=V,V=F,F=N,N=V,V=z,z=j,j=V,k=2;k<f;++k){if(O[L++]=r(h[g],o,s,l),g+=A,c>0)for(T=1,u=h[g],R=O[L]=r(u,o,s,l),P=O[L+D],B=O[L+F],U=O[L+z],R===P&&R===B&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,P,B,U,o,s,l),H=C[L]=S++,U!==B&&e(C[L+F],H,b,w,B,U,o,s,l)),L+=1,g+=A,T=2;T<c;++T)u=h[g],R=O[L]=r(u,o,s,l),P=O[L+D],B=O[L+F],U=O[L+z],R===P&&R===B&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,P,B,U,o,s,l),H=C[L]=S++,U!==B&&e(C[L+F],H,b,w,B,U,o,s,l),U!==P&&e(C[L+D],H,w,m,U,P,o,s,l)),L+=1,g+=A;1&k&&(L=0),V=D,D=I,I=V,V=F,F=N,N=V,V=z,z=j,j=V,g+=M}}i(C),i(O)}},"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,y=0|-p,m=0,x=0|-v,b=0,_=-p-v|0,w=0,A=0|v,M=p-v*f|0,T=0,k=0,S=0,E=2*f|0,O=n(E),C=n(E),L=0,R=0,D=-1,I=-1,P=0,F=0|-f,N=0|f,B=0,z=-f-1|0,j=f-1|0,U=0,H=0,V=0;for(k=0;k<f;++k)O[L++]=r(h[g],o,s,l),g+=A;if(g+=M,c>0){if(T=1,O[L++]=r(h[g],o,s,l),g+=A,f>0)for(k=1,u=h[g],R=O[L]=r(u,o,s,l),B=O[L+F],P=O[L+D],U=O[L+z],R===B&&R===P&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,B,P,U,o,s,l),H=C[L]=S++),L+=1,g+=A,k=2;k<f;++k)u=h[g],R=O[L]=r(u,o,s,l),B=O[L+F],P=O[L+D],U=O[L+z],R===B&&R===P&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,B,P,U,o,s,l),H=C[L]=S++,U!==P&&e(C[L+D],H,b,w,P,U,o,s,l)),L+=1,g+=A;for(g+=M,L=0,V=F,F=N,N=V,V=D,D=I,I=V,V=z,z=j,j=V,T=2;T<c;++T){if(O[L++]=r(h[g],o,s,l),g+=A,f>0)for(k=1,u=h[g],R=O[L]=r(u,o,s,l),B=O[L+F],P=O[L+D],U=O[L+z],R===B&&R===P&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,B,P,U,o,s,l),H=C[L]=S++,U!==B&&e(C[L+F],H,w,m,U,B,o,s,l)),L+=1,g+=A,k=2;k<f;++k)u=h[g],R=O[L]=r(u,o,s,l),B=O[L+F],P=O[L+D],U=O[L+z],R===B&&R===P&&R===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(T,k,u,m,b,w,R,B,P,U,o,s,l),H=C[L]=S++,U!==P&&e(C[L+D],H,b,w,P,U,o,s,l),U!==B&&e(C[L+F],H,w,m,U,B,o,s,l)),L+=1,g+=A;1&T&&(L=0),V=F,F=N,N=V,V=D,D=I,I=V,V=z,z=j,j=V,g+=M}}i(C),i(O)}}}},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],y=l[1],m=-1*h,x=h,b=-1*d,_=d;n|=0,o|=0,u|=0;var w=0,A=0,M=d,T=h-f*d,k=v,S=p-f*v,E=y,O=g-f*y;for(A=0;A<c;++A){for(w=0;w<f;++w)i[o]=.5*(e[n+m]-e[n+x]),s[u]=.5*(e[n+b]-e[n+_]),n+=M,o+=k,u+=E;n+=T,o+=S,u+=O}}},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,y=o&&f&&p?t.get(i,l+1,h):0,m=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*m)+u*((1-a)*y+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],y=n|=0,m=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=y+x*f+b*h,o=m+x*p+b*v;var _=0,w=0,A=0,M=d,T=f-c*d,k=h-l*f,S=g,E=p-c*g,O=v-l*p;for(A=0;A<u;++A){for(w=0;w<l;++w){for(_=0;_<c;++_)e[n]=i[o]*s,n+=M,o+=S;n+=T,o+=E}n+=k,o+=O}}}}},"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,y=h,m=f-l*h;for(p=0;p<s;++p){for(d=0;d<l;++d)e[n]=i[o],n+=v,o+=y;n+=g,o+=m}}},"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 y=0,m=0,x=c,b=u-l*c,_=h,w=f-l*h;for(m=0;m<s;++m){for(y=0;y<l;++y)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,y=o|=0,m=0|t[2];m>0;){m<64?(u=m,m=0):(u=64,m-=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+m*h+x*c+b*f,o=y+m*v+x*d+b*p;var _=0,w=0,A=0,M=h,T=c-u*h,k=f-s*c,S=v,E=d-u*v,O=p-s*d;for(A=0;A<l;++A){for(w=0;w<s;++w){for(_=0;_<u;++_)e[n]=i[o],n+=M,o+=S;n+=T,o+=E}n+=k,o+=O}}}}}},"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,y=0,m=0,x=h,b=c-u*h,_=f-s*c,w=v,A=d-u*v,M=p-s*d;for(m=0;m<l;++m){for(y=0;y<s;++y){for(g=0;g<u;++g)e[n]=i[o],n+=x,o+=w;n+=b,o+=A}n+=_,o+=M}}}},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,y=l-o*u;for(p=0;p<a;++p){for(d=0;d<o;++d){for(h=0;h<s;++h){var m,x=i;for(m=0;m<f.length-1;++m)x=x[f[m]];e[n]=x[f[f.length-1]],n+=v,++f[2]}n+=g,f[2]-=s,++f[1]}n+=y,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,y,m,x,b,_=r*o+a,w=t(u);for(d=r+1;d<=n;++d){for(p=d,v=_+=o,y=0,m=_,g=0;g<u;++g)w[y++]=i[m],m+=c;t:for(;p-- >r;){y=0,m=v-o;e:for(g=0;g<u;++g){if((x=i[m])<(b=w[y]))break t;if(x>b)break e;m+=f,y+=h}for(y=v,m=v-o,g=0;g<u;++g)i[y]=i[m],y+=c,m+=c;v-=o}for(y=v,m=0,g=0;g<u;++g)i[y]=w[m++],y+=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,y,m,x,b,_,w,A,M,T,k,S,E,O,C,L,R,D,I,P,F,N,B,z,j=(a-i+1)/6|0,U=i+j,H=a-j,V=i+a>>1,G=V-j,Y=V+j,W=U,q=G,X=V,Z=Y,J=H,K=i+1,Q=a-1,$=!0,tt=0,et=0,rt=0,nt=f,it=e(nt),at=e(nt);T=l*W,k=l*q,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=W,W=q,q=g;break t}if(rt<0)break t;z+=d}T=l*Z,k=l*J,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=Z,Z=J,J=g;break t}if(rt<0)break t;z+=d}T=l*W,k=l*X,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=W,W=X,X=g;break t}if(rt<0)break t;z+=d}T=l*q,k=l*X,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=q,q=X,X=g;break t}if(rt<0)break t;z+=d}T=l*W,k=l*Z,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=W,W=Z,Z=g;break t}if(rt<0)break t;z+=d}T=l*X,k=l*Z,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=X,X=Z,Z=g;break t}if(rt<0)break t;z+=d}T=l*q,k=l*J,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=q,q=J,J=g;break t}if(rt<0)break t;z+=d}T=l*q,k=l*X,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=q,q=X,X=g;break t}if(rt<0)break t;z+=d}T=l*Z,k=l*J,z=s;t:for(M=0;M<f;++M){if(w=k+z,(rt=o[_=T+z]-o[w])>0){g=Z,Z=J,J=g;break t}if(rt<0)break t;z+=d}for(T=l*W,k=l*q,S=l*X,E=l*Z,O=l*J,C=l*U,L=l*V,R=l*H,B=0,z=s,M=0;M<f;++M)_=T+z,w=k+z,A=S+z,D=E+z,I=O+z,P=C+z,F=L+z,N=R+z,it[B]=o[w],at[B]=o[D],$=$&&it[B]===at[B],y=o[_],m=o[A],x=o[I],o[P]=y,o[F]=m,o[N]=x,++B,z+=h;for(T=l*G,k=l*i,z=s,M=0;M<f;++M)w=k+z,o[_=T+z]=o[w],z+=h;for(T=l*Y,k=l*a,z=s,M=0;M<f;++M)w=k+z,o[_=T+z]=o[w],z+=h;if($)for(b=K;b<=Q;++b){for(_=s+b*l,B=0,M=0;M<f&&0==(rt=o[_]-it[B]);++M)B+=p,_+=d;if(0!==rt)if(rt<0){if(b!==K)for(T=l*b,k=l*K,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=h;++K}else for(;;){for(_=s+Q*l,B=0,M=0;M<f&&0==(rt=o[_]-it[B]);++M)B+=p,_+=d;if(!(rt>0)){if(rt<0){for(T=l*b,k=l*K,S=l*Q,z=s,M=0;M<f;++M)w=k+z,A=S+z,v=o[_=T+z],o[_]=o[w],o[w]=o[A],o[A]=v,z+=h;++K,--Q;break}for(T=l*b,k=l*Q,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=h;--Q;break}Q--}}else for(b=K;b<=Q;++b){for(_=s+b*l,B=0,M=0;M<f&&0==(tt=o[_]-it[B]);++M)B+=p,_+=d;if(tt<0){if(b!==K)for(T=l*b,k=l*K,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=h;++K}else{for(_=s+b*l,B=0,M=0;M<f&&0==(et=o[_]-at[B]);++M)B+=p,_+=d;if(et>0)for(;;){for(_=s+Q*l,B=0,M=0;M<f&&0==(rt=o[_]-at[B]);++M)B+=p,_+=d;if(!(rt>0)){for(_=s+Q*l,B=0,M=0;M<f&&0==(rt=o[_]-it[B]);++M)B+=p,_+=d;if(rt<0){for(T=l*b,k=l*K,S=l*Q,z=s,M=0;M<f;++M)w=k+z,A=S+z,v=o[_=T+z],o[_]=o[w],o[w]=o[A],o[A]=v,z+=h;++K,--Q}else{for(T=l*b,k=l*Q,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=h;--Q}break}if(--Q<b)break}}}for(T=l*i,k=l*(K-1),B=0,z=s,M=0;M<f;++M)w=k+z,o[_=T+z]=o[w],o[w]=it[B],++B,z+=h;for(T=l*a,k=l*(Q+1),B=0,z=s,M=0;M<f;++M)w=k+z,o[_=T+z]=o[w],o[w]=at[B],++B,z+=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,B=0,z=s,M=0;M<f;++M){if(o[_]!==it[B])break t;++B,_+=h}++K}t:for(;;){for(_=s+Q*l,B=0,z=s,M=0;M<f;++M){if(o[_]!==at[B])break t;++B,_+=h}--Q}for(b=K;b<=Q;++b){for(_=s+b*l,B=0,M=0;M<f&&0==(tt=o[_]-it[B]);++M)B+=p,_+=d;if(0===tt){if(b!==K)for(T=l*b,k=l*K,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=h;++K}else{for(_=s+b*l,B=0,M=0;M<f&&0==(et=o[_]-at[B]);++M)B+=p,_+=d;if(0===et)for(;;){for(_=s+Q*l,B=0,M=0;M<f&&0==(rt=o[_]-at[B]);++M)B+=p,_+=d;if(0!==rt){for(_=s+Q*l,B=0,M=0;M<f&&0==(rt=o[_]-it[B]);++M)B+=p,_+=d;if(rt<0){for(T=l*b,k=l*K,S=l*Q,z=s,M=0;M<f;++M)w=k+z,A=S+z,v=o[_=T+z],o[_]=o[w],o[w]=o[A],o[A]=v,z+=h;++K,--Q}else{for(T=l*b,k=l*Q,z=s,M=0;M<f;++M)w=k+z,v=o[_=T+z],o[_]=o[w],o[w]=v,z+=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],y=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+=y*(s=0|a),h-=s),new n(this.data,l,u,c,f,h,d,p,v,g,y,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,y=0,m=Math.ceil;return"number"==typeof t&&((y=0|t)<0?(g+=f*(o-1),o=m(-o/y)):o=m(o/y),f*=y),"number"==typeof e&&((y=0|e)<0?(g+=h*(s-1),s=m(-s/y)):s=m(s/y),h*=y),"number"==typeof r&&((y=0|r)<0?(g+=d*(l-1),l=m(-l/y)):l=m(l/y),d*=y),"number"==typeof i&&((y=0|i)<0?(g+=p*(u-1),u=m(-u/y)):u=m(u/y),p*=y),"number"==typeof a&&((y=0|a)<0?(g+=v*(c-1),c=m(-c/y)):c=m(c/y),v*=y),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,y=new Array(3),m=0,x=0;x<3;++x)v[x]=h[x]-d[x],g+=v[x]*v[x],y[x]=p[x]-d[x],m+=y[x]*y[x];if(g*m>a){var b=i[u],_=1/Math.sqrt(g*m);for(x=0;x<3;++x){var w=(x+1)%3,A=(x+2)%3;b[x]+=_*(y[w]*v[A]-y[A]*v[w])}}}for(o=0;o<n;++o){b=i[o];var M=0;for(x=0;x<3;++x)M+=b[x]*b[x];if(M>a)for(_=1/Math.sqrt(M),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],y=i[10],m=v*a+g*o+y*s,x=v*c+g*f+y*h,b=l(v-=m*a+x*c,g-=m*o+x*f,y-=m*s+x*h);v/=b,g/=b,y/=b;var _=c*e+a*r,w=f*e+o*r,A=h*e+s*r;this.center.move(t,_,w,A);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(t,Math.log(M))},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,y=e*o+r*f,m=e*s+r*h,x=-(p*m-v*y),b=-(v*g-d*m),_=-(d*y-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),A=u(x,b,_,w);A>1e-6?(x/=A,b/=A,_/=A,w/=A):(x=b=_=0,w=1);var M=this.computedRotation,T=M[0],k=M[1],S=M[2],E=M[3],O=T*w+E*x+k*_-S*b,C=k*w+E*b+S*x-T*_,L=S*w+E*_+T*b-k*x,R=E*w-T*x-k*b-S*_;if(n){x=d,b=p,_=v;var D=Math.sin(n)/l(x,b,_);x*=D,b*=D,_*=D,R=R*(w=Math.cos(e))-(O=O*w+R*x+C*_-L*b)*x-(C=C*w+R*b+L*x-O*_)*b-(L=L*w+R*_+O*b-C*x)*_}var I=u(O,C,L,R);I>1e-6?(O/=I,C/=I,L/=I,R/=I):(O=C=L=0,R=1),this.rotation.set(t,O,C,L,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),y=new Array(v);for(d=0;d<v;++d){g[d]=d;var m=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(m[w]=0,d!==w){for(var A=(V=p[w]).length,M=0;M<A;++M){var T=b(e[V[M]]);if(0!==T){T<0&&(m[w]=1,_+=1);continue t}}m[w]=1,_+=1}y[d]=[_,d,m]}for(y.sort((function(t,e){return e[0]-t[0]})),d=0;d<v;++d){var k=(m=y[d])[1],S=m[2];for(w=0;w<v;++w)S[w]&&(g[w]=k)}var E=function(t){for(var e=new Array(t),r=0;r<t;++r)e[r]=[];return e}(v);for(d=0;d<v;++d)E[d].push(g[d]),E[g[d]].push(d);var O={},C=c(f,!1);for(d=0;d<v;++d)for(A=(V=p[d]).length,w=0;w<A;++w){var L=V[w],R=V[(w+1)%A],D=Math.min(L,R)+":"+Math.max(L,R);if(D in O){var I=O[D];E[I].push(d),E[d].push(I),C[L]=C[R]=!0}else O[D]=d}function P(t){for(var e=t.length,r=0;r<e;++r)if(!C[t[r]])return!1;return!0}var F=[],N=c(v,-1);for(d=0;d<v;++d)g[d]!==d||P(p[d])?N[d]=-1:(F.push(d),N[d]=0);for(r=[];F.length>0;){var B=F.pop(),z=E[B];l(z,(function(t,e){return t-e}));var j,U=z.length,H=N[B];for(0===H&&(j=[V=p[B]]),d=0;d<U;++d){var V,G=z[d];N[G]>=0||(N[G]=1^H,F.push(G),0===H&&(P(V=p[G])||(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,y=i(r),m=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}}(y.slabs,y.coordinates);return 0===a.length?m:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),m)};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],y=e[l];u+=v*v,c+=v*g,f+=g*g,h+=y*v,d+=y*g,p+=y*y}var m,x,b,_,w,A=Math.abs(u*f-c*c),M=c*d-f*h,T=c*h-u*d;if(M+T<=A)if(M<0)T<0&&h<0?(T=0,-h>=u?(M=1,m=u+2*h+p):m=h*(M=-h/u)+p):(M=0,d>=0?(T=0,m=p):-d>=f?(T=1,m=f+2*d+p):m=d*(T=-d/f)+p);else if(T<0)T=0,h>=0?(M=0,m=p):-h>=u?(M=1,m=u+2*h+p):m=h*(M=-h/u)+p;else{var k=1/A;m=(M*=k)*(u*M+c*(T*=k)+2*h)+T*(c*M+f*T+2*d)+p}else M<0?(b=f+d)>(x=c+h)?(_=b-x)>=(w=u-2*c+f)?(M=1,T=0,m=u+2*h+p):m=(M=_/w)*(u*M+c*(T=1-M)+2*h)+T*(c*M+f*T+2*d)+p:(M=0,b<=0?(T=1,m=f+2*d+p):d>=0?(T=0,m=p):m=d*(T=-d/f)+p):T<0?(b=u+h)>(x=c+d)?(_=b-x)>=(w=u-2*c+f)?(T=1,M=0,m=f+2*d+p):m=(M=1-(T=_/w))*(u*M+c*T+2*h)+T*(c*M+f*T+2*d)+p:(T=0,b<=0?(M=1,m=u+2*h+p):h>=0?(M=0,m=p):m=h*(M=-h/u)+p):(_=f+d-c-h)<=0?(M=0,T=1,m=f+2*d+p):_>=(w=u-2*c+f)?(M=1,T=0,m=u+2*h+p):m=(M=_/w)*(u*M+c*(T=1-M)+2*h)+T*(c*M+f*T+2*d)+p;var S=1-M-T;for(l=0;l<o.length;++l)s[l]=S*t[l]+M*i[l]+T*a[l];return m<0?0:m}},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)),y=e(p,u),m=e(g,y);return m[m.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])),y=n(g,i[0]),m=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]),A=n(b,o[0]),M=t(t(n(e(A,x),a[1]),t(n(e(w,v),-o[1]),n(e(m,p),s[1]))),t(n(e(w,v),i[1]),t(n(e(_,f),-a[1]),n(e(d,u),s[1])))),T=t(t(n(e(A,x),i[1]),t(n(e(_,f),-o[1]),n(e(y,c),s[1]))),t(n(e(m,p),i[1]),t(n(e(y,c),-a[1]),n(e(d,u),o[1])))),k=e(M,T);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]),y=n(p,s[0]),m=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]),A=n(x,l[0]),M=t(r(s[0],s[0]),t(r(s[1],s[1]),r(s[2],s[2]))),T=n(M,i[0]),k=n(M,a[0]),S=n(M,o[0]),E=n(M,l[0]),O=t(r(l[0],l[0]),t(r(l[1],l[1]),r(l[2],l[2]))),C=n(O,i[0]),L=n(O,a[0]),R=n(O,o[0]),D=n(O,s[0]),I=t(t(t(n(t(n(e(D,E),o[1]),t(n(e(R,A),-s[1]),n(e(S,w),l[1]))),a[2]),t(n(t(n(e(D,E),a[1]),t(n(e(L,m),-s[1]),n(e(k,y),l[1]))),-o[2]),n(t(n(e(R,A),a[1]),t(n(e(L,m),-o[1]),n(e(_,g),l[1]))),s[2]))),t(n(t(n(e(S,w),a[1]),t(n(e(k,y),-o[1]),n(e(_,g),s[1]))),-l[2]),t(n(t(n(e(D,E),a[1]),t(n(e(L,m),-s[1]),n(e(k,y),l[1]))),i[2]),n(t(n(e(D,E),i[1]),t(n(e(C,d),-s[1]),n(e(T,h),l[1]))),-a[2])))),t(t(n(t(n(e(L,m),i[1]),t(n(e(C,d),-a[1]),n(e(v,c),l[1]))),s[2]),t(n(t(n(e(k,y),i[1]),t(n(e(T,h),-a[1]),n(e(v,c),s[1]))),-l[2]),n(t(n(e(S,w),a[1]),t(n(e(k,y),-o[1]),n(e(_,g),s[1]))),i[2]))),t(n(t(n(e(S,w),i[1]),t(n(e(T,h),-o[1]),n(e(b,f),s[1]))),-a[2]),t(n(t(n(e(k,y),i[1]),t(n(e(T,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]))))),P=t(t(t(n(t(n(e(D,E),o[1]),t(n(e(R,A),-s[1]),n(e(S,w),l[1]))),i[2]),n(t(n(e(D,E),i[1]),t(n(e(C,d),-s[1]),n(e(T,h),l[1]))),-o[2])),t(n(t(n(e(R,A),i[1]),t(n(e(C,d),-o[1]),n(e(b,f),l[1]))),s[2]),n(t(n(e(S,w),i[1]),t(n(e(T,h),-o[1]),n(e(b,f),s[1]))),-l[2]))),t(t(n(t(n(e(R,A),a[1]),t(n(e(L,m),-o[1]),n(e(_,g),l[1]))),i[2]),n(t(n(e(R,A),i[1]),t(n(e(C,d),-o[1]),n(e(b,f),l[1]))),-a[2])),t(n(t(n(e(L,m),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])))),F=e(I,P);return F[F.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]))),y=n(g,i[0]),m=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]))),A=n(w,i[0]),M=n(w,a[0]),T=n(w,s[0]),k=n(w,l[0]),S=n(w,u[0]),E=t(t(r(s[0],s[0]),r(s[1],s[1])),t(r(s[2],s[2]),r(s[3],s[3]))),O=n(E,i[0]),C=n(E,a[0]),L=n(E,o[0]),R=n(E,l[0]),D=n(E,u[0]),I=t(t(r(l[0],l[0]),r(l[1],l[1])),t(r(l[2],l[2]),r(l[3],l[3]))),P=n(I,i[0]),F=n(I,a[0]),N=n(I,o[0]),B=n(I,s[0]),z=n(I,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]),G=n(j,s[0]),Y=n(j,l[0]),W=t(t(t(n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),o[2]),n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),-s[2])),t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),l[2]),n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),-u[2]))),a[3]),t(n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),a[2]),n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),-s[2])),t(n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),l[2]),n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),a[2]),n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),-o[2])),t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),l[2]),n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),a[2]),n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),-o[2])),t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),s[2]),n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),a[2]),n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),-o[2])),t(n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),s[2]),n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),a[2]),n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),-s[2])),t(n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),l[2]),n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-s[2])),t(n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),l[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),l[2]),n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),-u[2]))),s[3]),n(t(t(n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),i[2]),n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),i[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-a[2])),t(n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),a[2]),n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),-o[2])),t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),s[2]),n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),-u[2]))),i[3]))),t(t(n(t(t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),i[2]),n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),-o[2])),t(n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),s[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-u[2]))),-a[3]),n(t(t(n(t(n(e(G,D),a[1]),t(n(e(H,_),-s[1]),n(e(C,x),u[1]))),i[2]),n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),-u[2]))),o[3])),t(n(t(t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),i[2]),n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,f),o[1]))),-u[2]))),-s[3]),n(t(t(n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),i[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-a[2])),t(n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,f),o[1]))),-s[2]))),u[3]))))),q=t(t(t(n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),o[2]),n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),-s[2])),t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),l[2]),n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),-u[2]))),i[3]),t(n(t(t(n(t(n(e(Y,z),s[1]),t(n(e(G,D),-l[1]),n(e(B,R),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-s[2])),t(n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),l[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-u[2]))),-o[3]),n(t(t(n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-o[2])),t(n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),l[2]),n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),-u[2]))),s[3]))),t(t(n(t(t(n(t(n(e(G,D),o[1]),t(n(e(V,S),-s[1]),n(e(L,T),u[1]))),i[2]),n(t(n(e(G,D),i[1]),t(n(e(U,v),-s[1]),n(e(O,d),u[1]))),-o[2])),t(n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),s[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-u[2]))),-l[3]),n(t(t(n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),i[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-o[2])),t(n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),s[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-l[2]))),u[3])),t(n(t(t(n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),a[2]),n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),-o[2])),t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),l[2]),n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),-u[2]))),i[3]),n(t(t(n(t(n(e(Y,z),o[1]),t(n(e(V,S),-l[1]),n(e(N,k),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-o[2])),t(n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),l[2]),n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),-u[2]))),-a[3])))),t(t(t(n(t(t(n(t(n(e(Y,z),a[1]),t(n(e(H,_),-l[1]),n(e(F,b),u[1]))),i[2]),n(t(n(e(Y,z),i[1]),t(n(e(U,v),-l[1]),n(e(P,p),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),l[2]),n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),-u[2]))),o[3]),n(t(t(n(t(n(e(V,S),a[1]),t(n(e(H,_),-o[1]),n(e(M,m),u[1]))),i[2]),n(t(n(e(V,S),i[1]),t(n(e(U,v),-o[1]),n(e(A,h),u[1]))),-a[2])),t(n(t(n(e(H,_),i[1]),t(n(e(U,v),-a[1]),n(e(y,f),u[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,f),o[1]))),-u[2]))),-l[3])),t(n(t(t(n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),i[2]),n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),-a[2])),t(n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,f),o[1]))),-l[2]))),u[3]),n(t(t(n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),a[2]),n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),-o[2])),t(n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),s[2]),n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),-l[2]))),i[3]))),t(t(n(t(t(n(t(n(e(B,R),o[1]),t(n(e(N,k),-s[1]),n(e(L,T),l[1]))),i[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-o[2])),t(n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),s[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-l[2]))),-a[3]),n(t(t(n(t(n(e(B,R),a[1]),t(n(e(F,b),-s[1]),n(e(C,x),l[1]))),i[2]),n(t(n(e(B,R),i[1]),t(n(e(P,p),-s[1]),n(e(O,d),l[1]))),-a[2])),t(n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),s[2]),n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),-l[2]))),o[3])),t(n(t(t(n(t(n(e(N,k),a[1]),t(n(e(F,b),-o[1]),n(e(M,m),l[1]))),i[2]),n(t(n(e(N,k),i[1]),t(n(e(P,p),-o[1]),n(e(A,h),l[1]))),-a[2])),t(n(t(n(e(F,b),i[1]),t(n(e(P,p),-a[1]),n(e(y,f),l[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,f),o[1]))),-l[2]))),-s[3]),n(t(t(n(t(n(e(L,T),a[1]),t(n(e(C,x),-o[1]),n(e(M,m),s[1]))),i[2]),n(t(n(e(L,T),i[1]),t(n(e(O,d),-o[1]),n(e(A,h),s[1]))),-a[2])),t(n(t(n(e(C,x),i[1]),t(n(e(O,d),-a[1]),n(e(y,f),s[1]))),o[2]),n(t(n(e(M,m),i[1]),t(n(e(A,h),-a[1]),n(e(y,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,y=i*u,m=i*l,x=a*s,b=c*(p-v)+f*(g-y)+d*(m-x),_=7771561172376103e-31*((Math.abs(p)+Math.abs(v))*Math.abs(c)+(Math.abs(g)+Math.abs(y))*Math.abs(f)+(Math.abs(m)+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,y=i+a,m=y-i,x=a-m,b=x,_=y;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)-(m=(y=i+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-g),_=v;for(;l<r;)(x=(a=b)-(m=(y=(i=f)+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-g),_=v,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(m=(y=(i=d)+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-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,y=i+a,m=y-i,x=a-m,b=x,_=y;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)-(m=(y=i+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-g),_=v;for(;l<r;)(x=(a=b)-(m=(y=(i=f)+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-g),_=v,(l+=1)<r&&(f=t[l]);for(;u<n;)(x=(a=b)-(m=(y=(i=d)+a)-i))&&(o[s++]=x),b=_-((v=_+y)-(g=v-_))+(y-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=M[t],n=M[e];M[t]=n,M[e]=r,T[r]=e,T[n]=t}function y(t){return u[M[t]]}function m(t){return 1&t?t-1>>1:(t>>1)-1}function x(t){for(var e=y(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n<k){var o=y(n);o<r&&(a=n,r=o)}if(i<k&&y(i)<r&&(a=i),a===t)return t;g(t,a),t=a}}function b(t){for(var e=y(t);t>0;){var r=m(t);if(!(r>=0&&e<y(r)))return t;g(t,r),t=r}}function _(){if(k>0){var t=M[0];return g(0,k-1),k-=1,x(0),t}return-1}function w(t,e){var r=M[t];return u[r]===e?t:(u[r]=-1/0,b(t),_(),u[r]=e,b((k+=1)-1))}function A(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),T[e]>=0&&w(T[e],v(e)),T[r]>=0&&w(T[r],v(r))}}var M=[],T=new Array(a);for(f=0;f<a;++f)(u[f]=v(f))<1/0?(T[f]=M.length,M.push(f)):T[f]=-1;var k=M.length;for(f=k>>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||u[S]>r)break;A(S)}var E=[];for(f=0;f<a;++f)c[f]||(T[f]=E.length,E.push(e[f].slice()));function O(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}E.length;var C=[];return t.forEach((function(t){var e=O(s,t[0]),r=O(l,t[1]);if(e>=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,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,y=[];a<r;){var m=n[a];if(m.x!==g)break;a+=1,m.segment[0][0]===m.x&&m.segment[1][0]===m.x?m.create&&(m.segment[0][1]<m.segment[1][1]?(y.push(new c(m.segment[0][1],m.index,!0,!0)),y.push(new c(m.segment[1][1],m.index,!1,!1))):(y.push(new c(m.segment[1][1],m.index,!0,!1)),y.push(new c(m.segment[0][1],m.index,!1,!0)))):h=m.create?h.insert(m.segment,m.index):h.remove(m.segment)}d.push(h.root),p.push(g),v.push(y)}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,y=0;y<g.length;y+=2)d[p++]=g[y]+v,d[p++]=g[y+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),y=Math.sin(p),m=Math.cos(v),x=Math.sin(v),b=this.computedCenter,_=g*m,w=y*m,A=x,M=-g*x,T=-y*x,k=m,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var O=_*r[a]+w*h[a]+A*e[a];E[4*a+1]=M*r[a]+T*h[a]+k*e[a],E[4*a+2]=O,E[4*a+3]=0}var C=E[1],L=E[5],R=E[9],D=E[2],I=E[6],P=E[10],F=L*P-R*I,N=R*D-C*P,B=C*I-L*D,z=u(F,N,B);for(F/=z,N/=z,B/=z,E[0]=F,E[4]=N,E[8]=B,a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*d;for(a=0;a<3;++a){c=0;for(var j=0;j<3;++j)c+=E[a+4*j]*S[j];E[12+a]=-c}E[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,y=(h/=p)*e+s*r;this.center.move(t,v,g,y);var m=Math.exp(this.computedRadius[0]);m=Math.max(1e-4,m+n),this.radius.set(t,Math.log(m))},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 y,m,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,A=u(x-=s*w,b-=l*w,_-=f*w),M=l*(_/=A)-f*(b/=A),T=f*(x/=A)-s*_,k=s*b-l*x,S=u(M,T,k);if(M/=S,T/=S,k/=S,this.center.jump(t,G,Y,W),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],O=e[5],C=e[9],L=E*x+O*b+C*_,R=E*M+O*T+C*k;y=F<0?-Math.PI/2:Math.PI/2,m=Math.atan2(R,L)}else{var D=e[2],I=e[6],P=e[10],F=D*s+I*l+P*f,N=D*x+I*b+P*_,B=D*M+I*T+P*k;y=Math.asin(c(F)),m=Math.atan2(B,N)}this.angle.jump(t,m,y),this.recalcMatrix(t);var z=e[2],j=e[6],U=e[10],H=this.computedMatrix;i(H,e);var V=H[15],G=H[12]/V,Y=H[13]/V,W=H[14]/V,q=Math.exp(this.computedRadius[0]);this.center.jump(t,G-z*q,Y-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],y=p[2],m=i*v+a*g+o*y,x=u(v-=m*i,g-=m*a,y-=m*o);if(!(x<.01&&(x=u(v=a*h-o*f,g=o*l-i*h,y=i*f-a*l))<1e-6)){v/=x,g/=x,y/=x,this.up.set(t,i,a,o),this.right.set(t,v,g,y),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(d));var b=a*y-o*g,_=o*v-i*y,w=i*g-a*v,A=u(b,_,w),M=i*l+a*f+o*h,T=v*l+g*f+y*h,k=(b/=A)*l+(_/=A)*f+(w/=A)*h,S=Math.asin(c(M)),E=Math.atan2(k,T),O=this.angle._state,C=O[O.length-1],L=O[O.length-2];C%=2*Math.PI;var R=Math.abs(C+2*Math.PI-E),D=Math.abs(C-E),I=Math.abs(C-2*Math.PI-E);R<D&&(C+=2*Math.PI),I<D&&(C-=2*Math.PI),this.angle.jump(this.angle.lastT(),C,L),this.angle.set(t,E,S)}}}}},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 y(t){return new Int8Array(d(t),0,t)}function m(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 A(t){return s?new BigUint64Array(d(8*t),0,t):null}function M(t){return l?new BigInt64Array(d(8*t),0,t):null}function T(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 y(t);case"int16":return m(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 M(t);case"biguint64":return A(t);case"buffer":return k(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=d,e.mallocUint8=p,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=A,e.mallocBigInt64=M,e.mallocDataView=T,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(A=0;A<r.length;++A)l[A]=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,m,r,l));var b=[],_="";for(A=0;A<r.length;++A)null!==l[A]&&(_+=r[A],b.push(l[A]));var w,A,M,T,k,S=_.split("\n"),E=S.length,O=Math.round(a*n),C=n,L=2*n,R=0,D=E*O+L;t.height<D&&(t.height=D),e.fillStyle="#000",e.fillRect(0,0,t.width,t.height),e.fillStyle="#fff";var I=0,P="";function F(){if(""!==P){var t=e.measureText(P).width;e.fillText(P,C+M,L+T),M+=t}}function N(){return Math.round(k)+"px "}function B(t,r){var n=""+e.font;if(!0===o.subscripts){var i=t.indexOf(y),a=r.indexOf(y),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())),T+=.25*O*(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())),T-=.25*O*(v-d)}if(!0===o.bolds){var g=t.indexOf(c)>-1,m=r.indexOf(c)>-1;!g&&m&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!m&&(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<E;++w){var z=S[w]+"\n";for(M=0,T=w*O,k=n,P="",A=0;A<z.length;++A){var j=A+I<b.length?b[A+I]:b[b.length-1];s===j?P+=z[A]:(F(),P=z[A],void 0!==j&&(B(s,j),s=j))}F(),I+=z.length;var U=0|Math.round(M+2*C);R<U&&(R=U)}var H=R,V=L+O*E;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",y="-",m="-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]===y,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 y=p[g],m=new Array(y.length),x=0;x<y.length;++x)m[x]=a[y[x]].slice();c&&m.reverse(),v[g]=m}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(y)}}),"getPropertyNames"in Object){var h=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(t){return h(t).filter(y)}})}!function(){var t=Object.freeze;o(Object,"freeze",{value:function(e){return m(e),t(e)}});var e=Object.seal;o(Object,"seal",{value:function(t){return m(t),e(t)}});var r=Object.preventExtensions;o(Object,"preventExtensions",{value:function(t){return m(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=m(n);return o?r in o?o[r]:i:(a=t.indexOf(n))>=0?e[a]:i}))},has___:{value:x((function(e){var n=m(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:x((function(n,i){var a,o=m(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=m(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 y(t){return!(t.substr(0,8)==l&&"___"===t.substr(t.length-3))}function m(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}()},33576: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,(void 0,i=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===s(i)?i:String(i)),n)}var i}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){return s="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},s(t)}var l=r(59968),u=r(35984),c="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Sn=d,e.ZK=50;var f=2147483647;function h(t){if(t>f)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,d.prototype),e}function d(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 g(t)}return p(t,e,r)}function p(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!d.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|b(t,e),n=h(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(tt(t,Uint8Array)){var e=new Uint8Array(t);return m(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 "+s(t));if(tt(t,ArrayBuffer)||t&&tt(t.buffer,ArrayBuffer))return m(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(tt(t,SharedArrayBuffer)||t&&tt(t.buffer,SharedArrayBuffer)))return m(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 d.from(n,e,r);var i=function(t){if(d.isBuffer(t)){var e=0|x(t.length),r=h(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||et(t.length)?h(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 d.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 "+s(t))}function v(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 g(t){return v(t),h(t<0?0:0|x(t))}function y(t){for(var e=t.length<0?0:0|x(t.length),r=h(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function m(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,d.prototype),n}function x(t){if(t>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|t}function b(t,e){if(d.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||tt(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 '+s(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 K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function _(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 P(this,e,r);case"utf8":case"utf-8":return L(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return C(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(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),et(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=d.from(e,n)),d.isBuffer(e))return 0===e.length?-1:M(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):M(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(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 T(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(et(s))return a;t[r+a]=s}return a}function k(t,e,r,n){return $(K(e,t.length-r),t,r,n)}function S(t,e,r,n){return $(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 $(Q(e),t,r,n)}function O(t,e,r,n){return $(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 C(t,e,r){return 0===e&&r===t.length?l.fromByteArray(t):l.fromByteArray(t.slice(e,r))}function L(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<=R)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=R));return r}(n)}d.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}}(),d.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(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(t,e,r){return p(t,e,r)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(t,e,r){return function(t,e,r){return v(t),t<=0?h(t):void 0!==e?"string"==typeof r?h(t).fill(e,r):h(t).fill(e):h(t)}(t,e,r)},d.allocUnsafe=function(t){return g(t)},d.allocUnsafeSlow=function(t){return g(t)},d.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==d.prototype},d.compare=function(t,e){if(tt(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),tt(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(t)||!d.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},d.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}},d.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return d.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=d.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(tt(a,Uint8Array))i+a.length>n.length?(d.isBuffer(a)||(a=d.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!d.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},d.byteLength=b,d.prototype._isBuffer=!0,d.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)w(this,e,e+1);return this},d.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)w(this,e,e+3),w(this,e+1,e+2);return this},d.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)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},d.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?L(this,0,t):_.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(t){if(!d.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===d.compare(this,t)},d.prototype.inspect=function(){var t="",r=e.ZK;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},c&&(d.prototype[c]=d.prototype.inspect),d.prototype.compare=function(t,e,r,n,i){if(tt(t,Uint8Array)&&(t=d.from(t,t.offset,t.byteLength)),!d.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+s(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),l=Math.min(a,o),u=this.slice(n,i),c=t.slice(e,r),f=0;f<l;++f)if(u[f]!==c[f]){a=u[f],o=c[f];break}return a<o?-1:o<a?1:0},d.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},d.prototype.indexOf=function(t,e,r){return A(this,t,e,r,!0)},d.prototype.lastIndexOf=function(t,e,r){return A(this,t,e,r,!1)},d.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 T(this,t,e,r);case"utf8":case"utf-8":return k(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 O(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=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 P(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+=rt[t[a]];return i}function F(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 N(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(!d.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 z(t,e,r,n,i){q(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 j(t,e,r,n,i){q(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 U(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 H(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,4),u.write(t,e,r,n,23,4),r+4}function V(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,0,r,8),u.write(t,e,r,n,52,8),r+8}d.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,d.prototype),n},d.prototype.readUintLE=d.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},d.prototype.readUintBE=d.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},d.prototype.readUint8=d.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},d.prototype.readBigUInt64LE=nt((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(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))})),d.prototype.readBigUInt64BE=nt((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(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)})),d.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||N(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},d.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(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},d.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},d.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},d.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},d.prototype.readBigInt64LE=nt((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(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))})),d.prototype.readBigInt64BE=nt((function(t){X(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(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)})),d.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),u.read(this,t,!0,23,4)},d.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),u.read(this,t,!1,23,4)},d.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),u.read(this,t,!0,52,8)},d.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),u.read(this,t,!1,52,8)},d.prototype.writeUintLE=d.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},d.prototype.writeUintBE=d.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},d.prototype.writeUint8=d.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},d.prototype.writeUint16LE=d.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},d.prototype.writeUint16BE=d.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},d.prototype.writeUint32LE=d.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},d.prototype.writeUint32BE=d.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},d.prototype.writeBigUInt64LE=nt((function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=nt((function(t){return j(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.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},d.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},d.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},d.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},d.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},d.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},d.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},d.prototype.writeBigInt64LE=nt((function(t){return z(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=nt((function(t){return j(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(t,e,r){return H(this,t,e,!0,r)},d.prototype.writeFloatBE=function(t,e,r){return H(this,t,e,!1,r)},d.prototype.writeDoubleLE=function(t,e,r){return V(this,t,e,!0,r)},d.prototype.writeDoubleBE=function(t,e,r){return V(this,t,e,!1,r)},d.prototype.copy=function(t,e,r,n){if(!d.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},d.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&&!d.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=d.isBuffer(t)?t:d.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 Y(t,e,r){G[t]=function(r){function l(){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),r=function(t,e,r){return e=i(e),function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,r||[],i(t).constructor):e.apply(t,r))}(this,l),Object.defineProperty(a(r),"message",{value:e.apply(a(r),arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r}var u,c;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&&o(t,e)}(l,r),u=l,(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}),l}(r)}function W(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 q(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){X(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Z(e,t.length-(r+1))}(n,i,a)}function X(t,e){if("number"!=typeof t)throw new G.ERR_INVALID_ARG_TYPE(e,"number",t)}function Z(t,e,r){if(Math.floor(t)!==t)throw X(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)}Y("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Y("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(s(e))}),TypeError),Y("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=W(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var J=/[^+/0-9A-Za-z-_]/g;function K(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 Q(t){return l.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(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 tt(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function et(t){return t!=t}var rt=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 nt(t){return"undefined"==typeof BigInt?it:t}function it(){throw new Error("BigInt not supported")}},25928: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}},33428: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 y(t){return null===t?NaN:+t}function m(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;)m(r=+t[a])&&(n+=r);else for(;++a<i;)m(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;)m(r=y(t[a]))?n+=r:--o;else for(;++a<i;)m(r=y(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;)m(r=y(t[o]))&&n.push(r);else for(;++o<i;)m(r=y(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;)m(r=y(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)m(r=y(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 A(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function M(){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 M;if(t instanceof M)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 T="__proto__",k="\0";function S(t){return(t+="")===T||t[0]===k?k+t:t}function E(t){return(t+="")[0]===k?t.slice(1):t}function O(t){return S(t)in this._}function C(t){return(t=S(t))in this._&&delete this._[t]}function L(){var t=[];for(var e in this._)t.push(E(e));return t}function R(){var t=0;for(var e in this._)++t;return t}function D(){for(var t in this._)return!1;return!0}function I(){this._=Object.create(null)}function P(t){return t}function F(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=B.length;r<n;++r){var i=B[r]+e;if(i in t)return i}}A(M,{has:O,get:function(t){return this._[S(t)]},set:function(t,e){return this._[S(t)]=e},remove:C,keys:L,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:E(e),value:this._[e]});return t},size:R,empty:D,forEach:function(t){for(var e in this._)t.call(this,E(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 M;++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 I;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},A(I,{has:O,add:function(t){return this._[S(t+="")]=!0,t},remove:C,values:L,size:R,empty:D,forEach:function(t){for(var e in this._)t.call(this,E(e))}}),a.behavior={},a.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=F(t,e,e[r]);return t};var B=["webkit","ms","moz","Moz","o","O"];function z(){}function j(){}function U(t){var e=[],r=new M;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 G(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(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/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,yt),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 M,y=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),y[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 y&&!0!==g.get(y[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 yt=[];function mt(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?z: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=yt,yt.append=K.append,yt.empty=K.empty,yt.node=K.node,yt.call=K.call,yt.size=K.size,yt.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)},yt.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(mt(r,t[r],e));return this}if(n<2)return(n=this.node()["__on"+t])&&n._;r=!1}return this.each(mt(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,At=0;function Mt(t){var e=".dragsuppress-"+ ++At,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 Tt=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(Tt<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();Tt=!(o.f||o.e),r.remove()}}return Tt?(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 St(){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=G(i,"drag","dragstart","dragend"),e=null,r=o(z,a.mouse,c,"mousemove","mouseup"),n=o(St,a.touch,P,"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]-m[0],e=r[1]-m[1],d|=t|e,m=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),y(d),h({type:"dragend"}))})),y=Mt(c),m=n(f,p);l=e?[(l=e.apply(u,arguments)).x-m[0],l.y-m[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 Et=1e-6,Ot=Et*Et,Ct=Math.PI,Lt=2*Ct,Rt=Lt-Et,Dt=Ct/2,It=Ct/180,Pt=180/Ct;function Ft(t){return t>1?Dt:t<-1?-Dt:Math.asin(t)}function Nt(t){return((t=Math.exp(t))+1/t)/2}var Bt=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<Ot)n=Math.log(u/o)/Bt,r=function(t){return[i+t*c,a+t*f,o*Math.exp(Bt*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),y=Math.log(Math.sqrt(v*v+1)-v);n=(y-g)/Bt,r=function(t){var e,r=t*n,s=Nt(g),l=o/(2*d)*(s*(e=Bt*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(Bt*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,y="mousedown.zoom",m="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=G(w,"zoomstart","zoom","zoomend");function w(t){t.on(y,L).on(jt+".zoom",D).on("dblclick.zoom",I).on(b,R)}function A(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(p[0],Math.min(p[1],t))}function T(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},M(Math.pow(2,i)),T(e=r,n),t=a.select(t),v>0&&(t=t.transition().duration(v)),t.call(w.event)}function S(){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 E(t){g++||t({type:"zoomstart"})}function O(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function C(t){--g||(t({type:"zoomend"}),e=null)}function L(){var t=this,e=_.of(t,arguments),r=0,n=a.select(c(t)).on(m,(function(){r=1,T(a.mouse(t),i),O(e)})).on(x,(function(){n.on(m,null).on(x,null),o(r),C(e)})),i=A(a.mouse(t)),o=Mt(t);Ji.call(t),E(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=Mt(e);function p(){var r=a.touches(e);return t=h.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=A(t))})),r}function v(){var t=a.event.target;a.select(t).on(l,g).on(u,m),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 y=d[0];k(e,y,n[y.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),H()}i=v}else if(d.length>1){y=d[0];var x=d[1],b=y[0]-x[0],_=y[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],M(v*t)}i=null,T(s,l),O(r)}function m(){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(y,L).on(b,R),d(),C(r)}v(),E(r),f.on(y,null).on(b,v)}function D(){var i=_.of(this,arguments);n?clearTimeout(n):(Ji.call(this),t=A(e=r||a.mouse(this)),E(i)),n=setTimeout((function(){n=null,C(i)}),50),H(),M(Math.pow(2,.002*zt())*h.k),T(e,t),O(i)}function I(){var t=a.mouse(this),e=Math.log(h.k)/Math.LN2;k(this,t,A(t),a.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return jt||(jt="onwheel"in l?(zt=function(){return-a.event.deltaY*(a.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(zt=function(){return a.event.wheelDelta},"mousewheel"):(zt=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},E(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},O(t)}})).each("interrupt.zoom",(function(){C(t)})).each("end.zoom",(function(){C(t)})):(this.__chart__=h,E(t),O(t),C(t))}))},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},S(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),S(),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 zt,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 Gt=Vt.prototype=new Ht;function Yt(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)*Pt,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)}Gt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},Gt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},Gt.rgb=function(){return Yt(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*=It)*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,Yt):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 ye(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),me(e,r,t,n)}}function me(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=ye(P),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=me(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 I,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,Ae=this[N(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Me(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,Ae(Te)),i}function Te(){var t=ke(),e=Se()-t;e>24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Te,e)),_e=0):(_e=1,Ae(Te))}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 Se(){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 Ee(t){return t[0]}function Oe(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 Le(t,e){return t[0]-e[0]||t[1]-e[1]}a.timer=function(){Me.apply(this,arguments)},a.timer.flush=function(){ke(),Se()},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=Ee,r=Oe;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(Le),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 De(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function Ie(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 Pe(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=Pe(t),l=-1,u=this.length-Pe(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;)De(o=e[r],c,i)?(De(a,c,i)||t.push(Ie(a,o,c,i)),t.push(o)):De(a,c,i)&&t.push(Ie(a,o,c,i)),a=o;s&&t.push(t[0]),c=i}return t};var Fe,Ne,Be,ze,je,Ue=[],He=[];function Ve(){sr(this),this.edge=this.site=this.circle=null}function Ge(t){var e=Ue.pop()||new Ve;return e.site=t,e}function Ye(t){tr(t),Be.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];Ye(t);for(var l=a;l.circle&&w(r-l.circle.x)<Et&&w(n-l.circle.cy)<Et;)a=l.P,s.unshift(l),Ye(l),l=a;s.unshift(l),tr(l);for(var u=o;u.circle&&w(r-u.circle.x)<Et&&w(n-u.circle.cy)<Et;)o=u.N,s.push(u),Ye(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=Be._;s;)if((n=Xe(s,o)-a)>Et)s=s.L;else{if(!((i=a-Ze(s,o))>Et)){n>-Et?(e=s.P,r=s):i>-Et?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Ge(t);if(Be.insert(e,l),e||r){if(e===r)return tr(e),r=Ge(e.site),Be.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,y=2*(h*g-d*v),m=h*h+d*d,x=v*v+g*g,b={x:(g*m-d*x)/y+c,y:(h*x-v*m)/y+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>=-Ot)){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,y=He.pop()||new Qe;y.arc=t,y.site=i,y.x=p+o,y.y=g+Math.sqrt(p*p+v*v),y.cy=g,t.circle=y;for(var m=null,x=je._;x;)if(y.y<x.y||y.y===x.y&&y.x<=x.x){if(!x.L){m=x.P;break}x=x.L}else{if(!x.R){m=x;break}x=x.R}je.insert(m,y),m||(ze=y)}}}}function tr(t){var e=t.circle;e&&(e.P||(ze=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,y=(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=y-(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 Fe.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(Fe=[],Ne=new Array(t.length),Be=new or,je=new or;;)if(i=ze,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=Fe,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)<Et&&w(e.a.y-e.b.y)<Et)&&(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)>Et||w(i-r)>Et)&&(s.splice(o,0,new ar((y=a.site,m=c,x=w(n-f)<Et&&p-i>Et?{x:f,y:w(e-f)<Et?r:p}:w(i-p)<Et&&h-n>Et?{x:w(r-p)<Et?e:h,y:p}:w(n-h)<Et&&i-d>Et?{x:h,y:w(e-h)<Et?r:d}:w(i-d)<Et&&n-f>Et?{x:w(r-d)<Et?e:f,y:d}:null,b=void 0,(b=new rr(y,null)).a=m,b.b=x,Fe.push(b),b),a.site,null)),++l);var y,m,x,b}(e));var o={cells:Ne,edges:Fe};return Be=je=Fe=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=Ee,r=Oe,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)/Et)*Et,y:Math.round(i(t,e)/Et)*Et,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 yr(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 mr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Ar(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=Ee,s=Oe;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,y=ge(o),m=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=+y(l=t[f],f),b=+m(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,A=g-p;function M(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)T(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,T(t,c,l,u,i,a,o,s),T(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else T(t,e,r,n,i,a,o,s)}function T(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,M(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}_>A?g=p+_:v=d+A;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(k,t,+y(t,++f),+m(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,y=v*v+g*g;if(y<l){var m=Math.sqrt(l=y);n=e-m,i=r-m,a=e+m,o=r+m,s=p}}for(var x=u.nodes,b=.5*(c+h),_=.5*(f+d),w=(r>=_)<<1|e>=b,A=w+4;w<A;++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;)M(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=yr,a.interpolateObject=mr,a.interpolateNumber=xr,a.interpolateString=br;var _r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wr=new RegExp(_r.source,"g");function Ar(t,e){for(var r,n=a.interpolators.length;--n>=0&&!(r=a.interpolators[n](t,e)););return r}function Mr(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(Ar(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=Ar,a.interpolators=[function(t,e){var r=typeof e;return("string"===r?ve.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?yr:br:e instanceof Ht?yr:Array.isArray(e)?Mr:"object"===r&&isNaN(e)?mr:xr)(t,e)}],a.interpolateArray=Mr;var Tr=function(){return P},kr=a.map({linear:Tr,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Cr},cubic:function(){return Lr},sin:function(){return Dr},exp:function(){return Ir},circle:function(){return Pr},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/Lt*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*Lt/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return Fr}}),Sr=a.map({in:P,out:Er,"in-out":Or,"out-in":function(t){return Or(Er(t))}});function Er(t){return function(e){return 1-t(1-e)}}function Or(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Cr(t){return t*t}function Lr(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 Dr(t){return 1-Math.cos(t*Dt)}function Ir(t){return Math.pow(2,10*(t-1))}function Pr(t){return 1-Math.sqrt(1-t*t)}function Fr(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 Br(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=jr(i),s=zr(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]))*Pt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Pt:0}function zr(t,e){return t[0]*e[0]+t[1]*e[1]}function jr(t){var e=Math.sqrt(zr(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)||Tr,i=Sr.get(i)||P,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 Yt(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 Br(r?r.matrix:Ur)})(t)},Br.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 Gr(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function Yr(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=[],y=a.range(n),m=[];for(t=[],e=[],l=0,d=-1;++d<n;){for(c=0,p=-1;++p<n;)c+=r[d][p];g.push(c),m.push(a.range(n)),l+=c}for(i&&y.sort((function(t,e){return i(g[t],g[e])})),o&&m.forEach((function(t,e){t.sort((function(t,n){return o(r[e][t],r[e][n])}))})),l=(Lt-u*n)/l,c=0,d=-1;++d<n;){for(h=c,p=-1;++p<n;){var x=y[d],b=m[x][p],_=r[x][b],w=c,A=c+=_*l;v[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:A,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 M=v[d+"-"+p],T=v[p+"-"+d];(M.value||T.value)&&t.push(M.value<T.value?{source:T,target:M}:{source:M,target:T})}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,y=[],m=[];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,A=y.length,M=m.length;for(s=0;s<M;++s)h=(f=m[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<A;)(f=y[s]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(d)for(Qr(e=a.geom.quadtree(y),r,o),s=-1;++s<A;)(f=y[s]).fixed||e.visit(x(f));for(s=-1;++s<A;)(f=y[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?(y=t,s):y},s.links=function(t){return arguments.length?(m=t,s):m},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=Me(s.tick)),s):r},s.start=function(){var t,e,r,a=y.length,l=m.length,c=u[0],p=u[1];for(t=0;t<a;++t)(r=y[t]).index=t,r.weight=0;for(t=0;t<l;++t)"number"==typeof(r=m[t]).source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<a;++t)r=y[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,m[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,m[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,y[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=m[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(P).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=Lt,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,y=a.range(u),m=[];return null!=e&&y.sort(e===cn?function(t,e){return c[e]-c[t]}:function(t,r){return e(s[t],s[r])}),y.forEach((function(t){m[t]={data:s[t],value:l=c[t],startAngle:f,endAngle:f+=l*g+p,padAngle:d}})),m}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=P,e=gn,r=yn,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,y=r.call(s,f,u),m=c[0].length;for(v=0;v<m;++v)for(n.call(s,c[0][v],g=y[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)||yn,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(mn),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:yn});function gn(t){return a.range(t.length)}function yn(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function mn(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 An(t){return[a.min(t),a.max(t)]}function Mn(t,e){return t.value-e.value}function Tn(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 Sn(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 En(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(On),(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),Tn(r,i),r._pack_prev=i,Tn(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(Sn(o,i)){d=1;break}if(1==d)for(s=r._pack_prev;s!==o._pack_prev&&!Sn(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--):(Tn(r,i),n=i,x(i))}var g=(u+c)/2,y=(f+h)/2,m=0;for(a=0;a<l;a++)(i=e[a]).x-=g,i.y-=y,m=Math.max(m,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=m,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 On(t){t._pack_next=t._pack_prev=t}function Cn(t){delete t._pack_next,delete t._pack_prev}function Ln(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;)Ln(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 Dn(t,e){return t.parent==e.parent?1:2}function In(t){var e=t.children;return e.length?e[0]:t.t}function Pn(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function Fn(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 Bn(t){var e=t.children;return e&&e.length?Bn(e[0]):t}function zn(t){var e,r=t.children;return r&&(e=r.length)?zn(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 Gn(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 Yn(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=An,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(Mn),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,En),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,En),an(s,(function(t){t.r-=f}))}return Ln(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=Dn,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),y=r[1]/(p.depth||1);nn(c,(function(t){t.x=(t.x+v)*g,t.y=t.depth*y}))}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=Pn(s),a=In(a),s&&a;)l=In(l),(o=Pn(o)).a=t,(i=s.z+f-a.z-u+e(s._,a._))>0&&(Fn(Nn(s,t,n),t,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!Pn(o)&&(o.t=s,o.m+=f-c),a&&!In(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=Dn,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=Bn(u),h=zn(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:P,ceil:P};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:Gn,l=n?Yr:Gr;return i=o(t,e,l,r),a=o(e,t,l,Ar),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 Yn(t,Wn(Qn(t,e)[2])),Yn(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=Yn(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],Ar,!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 M;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(y).filter(m).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=yi,a=mi,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)-Dt,f=a.apply(this,arguments)-Dt,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,y,m,x,b,_,w,A,M,T,k=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===pi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),d||(S*=-1),u&&(S=Ft(g/u*Math.sin(y))),s&&(k=Ft(g/s*Math.sin(y)))),u){m=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var O=Math.abs(f-c-2*S)<=Ct?0:1;if(S&&bi(m,x,b,_)===d^O){var C=(c+f)/2;m=u*Math.cos(C),x=u*Math.sin(C),b=_=null}}else m=x=0;if(s){w=s*Math.cos(f-k),A=s*Math.sin(f-k),M=s*Math.cos(c+k),T=s*Math.sin(c+k);var L=Math.abs(c-f+2*k)<=Ct?0:1;if(k&&bi(w,A,M,T)===1-d^L){var R=(c+f)/2;w=s*Math.cos(R),A=s*Math.sin(R),M=T=null}}else w=A=0;if(h>Et&&(p=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s<u^d?0:1;var D=p,I=p;if(h<Ct){var P=null==M?[w,A]:null==b?[m,x]:Ie([m,x],[M,T],[b,_],[w,A]),F=m-P[0],N=x-P[1],B=b-P[0],z=_-P[1],j=1/Math.sin(Math.acos((F*B+N*z)/(Math.sqrt(F*F+N*N)*Math.sqrt(B*B+z*z)))/2),U=Math.sqrt(P[0]*P[0]+P[1]*P[1]);I=Math.min(p,(s-U)/(j-1)),D=Math.min(p,(u-U)/(j+1))}if(null!=b){var H=_i(null==M?[w,A]:[M,T],[m,x],u,D,d),V=_i([b,_],[w,A],u,D,d);p===D?E.push("M",H[0],"A",D,",",D," 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",D,",",D," 0 0,",v," ",V[0]):E.push("M",H[0],"A",D,",",D," 0 1,",v," ",V[0])}else E.push("M",m,",",x);if(null!=M){var G=_i([m,x],[M,T],s,-I,d),Y=_i([w,A],null==b?[m,x]:[b,_],s,-I,d);p===I?E.push("L",Y[0],"A",I,",",I," 0 0,",v," ",Y[1],"A",s,",",s," 0 ",d^bi(Y[1][0],Y[1][1],G[1][0],G[1][1]),",",1-d," ",G[1],"A",I,",",I," 0 0,",v," ",G[0]):E.push("L",Y[0],"A",I,",",I," 0 0,",v," ",G[0])}else E.push("L",w,",",A)}else E.push("M",m,",",x),null!=b&&E.push("A",u,",",u," 0 ",O,",",d," ",b,",",_),E.push("L",w,",",A),null!=M&&E.push("A",s,",",s," 0 ",L,",",1-d," ",M,",",T);return E.push("Z"),E.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-Dt;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 yi(t){return t.startAngle}function mi(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,y=d-f,m=g*g+y*y,x=r-n,b=c*d-h*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-b*b)),w=(b*y-g*_)/m,A=(-b*g-y*_)/m,M=(b*y+g*_)/m,T=(-b*g+y*_)/m,k=w-p,S=A-v,E=M-p,O=T-v;return k*k+S*S>E*E+O*O&&(w=M,A=T),[[w-l,A-u],[w*r/x,A*r/x]]}function wi(){return!0}function Ai(t){var e=Ee,r=Oe,n=wi,i=Ti,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=Mi.get(t)||Ti).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}a.svg.line=function(){return Ai(P)};var Mi=a.map({linear:Ti,"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":Si,"step-after":Ei,basis:Li,"basis-open":function(t){if(t.length<4)return Ti(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(Pi,a)+","+Ri(Pi,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Fi(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(Pi,o),",",Ri(Pi,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Fi(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 Li(t)},cardinal:function(t,e){return t.length<3?Ti(t):t[0]+Oi(t,Ci(t,e))},"cardinal-open":function(t,e){return t.length<4?Ti(t):t[1]+Oi(t.slice(1,-1),Ci(t,e))},"cardinal-closed":function(t,e){return t.length<3?ki(t):t[0]+Oi((t.push(t[0]),t),Ci([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Ti(t):t[0]+Oi(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)<Et?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 Ti(t){return t.length>1?t.join("L"):t+"Z"}function ki(t){return t.join("L")+"Z"}function Si(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 Ei(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 Oi(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ti(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 Li(t){if(t.length<3)return Ti(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(Pi,o),",",Ri(Pi,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Fi(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]}Mi.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var Di=[0,2/3,1/3,0],Ii=[0,1/3,2/3,0],Pi=[0,1/6,2/3,1/6];function Fi(t,e,r){t.push("C",Ri(Di,e),",",Ri(Di,r),",",Ri(Ii,e),",",Ri(Ii,r),",",Ri(Pi,e),",",Ri(Pi,r))}function Ni(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Bi(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Dt,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function zi(t){var e=Ee,r=Ee,n=0,i=Oe,a=wi,o=Ti,s=o.key,l=o,u="L",c=.7;function f(s){var f,h,d,p=[],v=[],g=[],y=-1,m=s.length,x=ge(e),b=ge(n),_=e===r?function(){return h}:ge(r),w=n===i?function(){return d}:ge(i);function A(){p.push("M",o(t(g),c),u,l(t(v.reverse()),c),"Z")}for(;++y<m;)a.call(this,f=s[y],y)?(v.push([h=+x.call(this,f,y),d=+b.call(this,f,y)]),g.push([+_.call(this,f,y),+w.call(this,f,y)])):v.length&&(A(),v=[],g=[]);return v.length&&A(),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=Mi.get(t)||Ti).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 Gi(){return 64}function Yi(){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=Ai(Bi);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Si.reverse=Ei,Ei.reverse=Si,a.svg.area=function(){return zi(P)},a.svg.area.radial=function(){var t=zi(Bi);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=yi,i=mi;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)-Dt,c=i.call(t,s,o)-Dt;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]-Dt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},a.svg.symbol=function(){var t=Yi,e=Gi;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*It);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,Me((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=Me((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 M,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:Ar,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=Ar(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):P:t,v=c.selectAll(".tick").data(d,h),g=v.enter().insert("g",".domain").attr("class","tick").style("opacity",Et),y=a.transition(v.exit()).style("opacity",Et).remove(),m=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 A,M,T,k,S=g.select("line"),E=m.select("line"),O=v.select("text").text(p),C=g.select("text"),L=m.select("text"),R="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(s=ua,A="x",T="y",M="x2",k="y2",O.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,A="y",T="x",M="y2",k="x2",O.attr("dy",".32em").style("text-anchor",R<0?"end":"start"),w.attr("d","M"+R*i+","+b[0]+"H0V"+b[1]+"H"+R*i)),S.attr(k,R*n),C.attr(T,R*x),E.attr(M,0).attr(k,R*n),L.attr(A,0).attr(T,R*x),h.rangeBand){var D=h,I=D.rangeBand()/2;f=h=function(t){return D(t)+I}}else f.rangeBand?f=h:y.call(s,h,f);g.call(s,f,h),m.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=G(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,P);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,y=this,m=a.select(a.event.target),x=r.of(y,arguments),b=a.select(y),_=m.datum(),w=!/^(n|s)$/.test(_)&&n,A=!/^(e|w)$/.test(_)&&i,M=m.classed("extent"),T=Mt(y),k=a.mouse(y),S=a.select(c(y)).on("keydown.brush",(function(){32==a.event.keyCode&&(M||(f=null,k[0]-=o[1],k[1]-=s[1],M=2),H())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==M&&(k[0]+=o[1],k[1]+=s[1],M=0,H())}));if(a.event.changedTouches?S.on("touchmove.brush",C).on("touchend.brush",R):S.on("mousemove.brush",C).on("mouseup.brush",R),b.interrupt().selectAll("*").interrupt(),M)k[0]=o[0]-k[0],k[1]=s[0]-k[1];else if(_){var E=+/w$/.test(_),O=+/^n/.test(_);g=[o[1-E]-k[0],s[1-O]-k[1]],k[0]=o[E],k[1]=s[O]}else a.event.altKey&&(f=k.slice());function C(){var t=a.mouse(y),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(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&&L(t,n,0)&&(p(b),e=!0),A&&L(t,i,1)&&(v(b),e=!0),e&&(d(b),x({type:"brush",mode:M?"move":"resize"}))}function L(r,n,i){var a,c,h=Vn(n),d=h[0],p=h[1],v=k[i],g=i?s:o,y=g[1]-g[0];if(M&&(d-=v,p-=y+v),a=(i?u:l)?Math.max(d,Math.min(p,r[i])):r[i],M?c=(a+=v)+y:(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),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),a.select("body").style("cursor",m.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=Mr(o,i.x),a=Mr(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=ye((function(t){return t.responseText})),a.json=function(t,e){return me(t,"application/json",da,e)},a.html=function(t,e){return me(t,"text/html",pa,e)},a.xml=ye((function(t){return t.responseXML})),void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)}).apply(self)},3108:function(t,e,r){"use strict";t.exports=r(26099)},26099:function(t,e,r){"use strict";var n=r(64928),i=r(32420),a=r(51160),o=r(76752),s=r(55616),l=r(31264),u=r(47520),c=r(18400),f=r(72512),h=r(76244);function d(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,u=t.length/2;l<u;l++)s[2*l]=i((t[2*l]-r)*a,0,1),s[2*l+1]=i((t[2*l+1]-n)*o,0,1);return s}t.exports=function(t,e){e||(e={}),t=u(t,"float64"),e=s(e,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var r=l(e.maxDepth,255),i=l(e.bounds,o(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;var p,v=d(t,i),g=t.length>>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?p=new(f(e.dtype))(g):e.dtype&&(p=e.dtype,Array.isArray(p)&&(p.length=g));for(var y=0;y<g;++y)p[y]=y;var m=[],x=[],b=[],_=[];!function t(e,n,i,a,o,s){if(!a.length)return null;var l=m[o]||(m[o]=[]),u=b[o]||(b[o]=[]),c=x[o]||(x[o]=[]),f=l.length;if(++o>r||s>1073741824){for(var h=0;h<a.length;h++)l.push(a[h]),u.push(s),c.push(null,null,null,null);return f}if(l.push(a[0]),u.push(s),a.length<=1)return c.push(null,null,null,null),f;for(var d=.5*i,p=e+d,g=n+d,y=[],_=[],w=[],A=[],M=1,T=a.length;M<T;M++){var k=a[M],S=v[2*k],E=v[2*k+1];S<p?E<g?y.push(k):_.push(k):E<g?w.push(k):A.push(k)}return s<<=2,c.push(t(e,n,d,y,o,s),t(e,g,d,_,o,s+1),t(p,n,d,w,o,s+2),t(p,g,d,A,o,s+3)),f}(0,0,1,p,0,1);for(var w=0,A=0;A<m.length;A++){var M=m[A];if(p.set)p.set(M,w);else for(var T=0,k=M.length;T<k;T++)p[T+w]=M[T];var S=w+m[A].length;_[A]=[w,S],w=S}return p.range=function(){for(var e,r=[],o=arguments.length;o--;)r[o]=arguments[o];if(c(r[r.length-1])){var u=r.pop();r.length||null==u.x&&null==u.l&&null==u.left||(r=[u],e={}),e=s(u,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else e={};r.length||(r=i);var f,p=a.apply(void 0,r),v=[Math.min(p.x,p.x+p.width),Math.min(p.y,p.y+p.height),Math.max(p.x,p.x+p.width),Math.max(p.y,p.y+p.height)],g=v[0],y=v[1],w=v[2],A=v[3],M=d([g,y,w,A],i),T=M[0],k=M[1],S=M[2],O=M[3],C=l(e.level,m.length);null!=e.d&&("number"==typeof e.d?f=[e.d,e.d]:e.d.length&&(f=e.d),C=Math.min(Math.max(Math.ceil(-h(Math.abs(f[0])/(i[2]-i[0]))),Math.ceil(-h(Math.abs(f[1])/(i[3]-i[1])))),C));if(C=Math.min(C,m.length),e.lod)return function(t,e,r,i,a){for(var o=[],s=0;s<a;s++){var l=b[s],u=_[s][0],c=E(t,e,s),f=E(r,i,s),h=n.ge(l,c),d=n.gt(l,f,h,l.length-1);o[s]=[h+u,d+u]}return o}(T,k,S,O,C);var L=[];return function e(r,n,i,a,o,s){if(null!==o&&null!==s&&!(T>r+i||k>n+i||S<r||O<n||a>=C||o===s)){var l=m[a];void 0===s&&(s=l.length);for(var u=o;u<s;u++){var c=l[u],f=t[2*c],h=t[2*c+1];f>=g&&f<=w&&h>=y&&h<=A&&L.push(c)}var d=x[a],p=d[4*o+0],v=d[4*o+1],b=d[4*o+2],_=d[4*o+3],M=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(d,o+1),E=.5*i,R=a+1;e(r,n,E,R,p,v||b||_||M),e(r,n+E,E,R,v,b||_||M),e(r+E,n,E,R,b,_||M),e(r+E,n+E,E,R,_,M)}}(0,0,1,0,0,1),L},p;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s<r;s++)n<<=2,n+=t<i?e<a?0:1:e<a?2:3,o*=.5,i+=t<i?-o:o,a+=e<a?-o:o;return n}}},49972:function(t){t.exports=function(t){var e=0,r=0,n=0,i=0;return t.map((function(t){var a=(t=t.slice())[0],o=a.toUpperCase();if(a!=o)switch(t[0]=o,a){case"a":t[6]+=n,t[7]+=i;break;case"v":t[1]+=i;break;case"h":t[1]+=n;break;default:for(var s=1;s<t.length;)t[s++]+=n,t[s++]+=i}switch(o){case"Z":n=e,i=r;break;case"H":n=t[1];break;case"V":i=t[1];break;case"M":n=e=t[1],i=r=t[2];break;default:n=t[t.length-2],i=t[t.length-1]}return t}))}},76752:function(t){"use strict";t.exports=function(t,e){if(!t||null==t.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var r=Array(2*e),n=0;n<e;n++){for(var i=-1/0,a=1/0,o=n,s=t.length;o<s;o+=e)t[o]>i&&(i=t[o]),t[o]<a&&(a=t[o]);r[n]=a,r[e+n]=i}return r}},10272:function(t){"use strict";t.exports=function(t,e,r){if("function"==typeof Array.prototype.findIndex)return t.findIndex(e,r);if("function"!=typeof e)throw new TypeError("predicate must be a function");var n=Object(t),i=n.length;if(0===i)return-1;for(var a=0;a<i;a++)if(e.call(r,n[a],a,n))return a;return-1}},71152:function(t,e,r){"use strict";var n=r(76752);t.exports=function(t,e,r){if(!t||null==t.length)throw Error("Argument should be an array");null==e&&(e=1),null==r&&(r=n(t,e));for(var i=0;i<e;i++){var a=r[e+i],o=r[i],s=i,l=t.length;if(a===1/0&&o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:t[s]===o?0:.5;else if(a===1/0)for(s=i;s<l;s+=e)t[s]=t[s]===a?1:0;else if(o===-1/0)for(s=i;s<l;s+=e)t[s]=t[s]===o?0:1;else{var u=a-o;for(s=i;s<l;s+=e)isNaN(t[s])||(t[s]=0===u?.5:(t[s]-o)/u)}}return t}},67752:function(t){t.exports=function(t,e){var r="number"==typeof t,n="number"==typeof e;r&&!n?(e=t,t=0):r||n||(t=0,e=0);var i=(e|=0)-(t|=0);if(i<0)throw new Error("array length must be positive");for(var a=new Array(i),o=0,s=t;o<i;o++,s++)a[o]=s;return a}},45408:function(t,e,r){"use strict";var n=r(4168);function i(t){return i="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},i(t)}var a,o,s=r(86832).codes,l=s.ERR_AMBIGUOUS_ARGUMENT,u=s.ERR_INVALID_ARG_TYPE,c=s.ERR_INVALID_ARG_VALUE,f=s.ERR_INVALID_RETURN_VALUE,h=s.ERR_MISSING_ARGS,d=r(26144),p=r(35840).inspect,v=r(35840).types,g=v.isPromise,y=v.isRegExp,m=Object.assign?Object.assign:r(60964).assign,x=Object.is?Object.is:r(39896);function b(){var t=r(25116);a=t.isDeepEqual,o=t.isDeepStrictEqual}new Map;var _=!1,w=t.exports=k,A={};function M(t){if(t.message instanceof Error)throw t.message;throw new d(t)}function T(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var a=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw a.generatedMessage=i,a}}function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];T.apply(void 0,[k,e.length].concat(e))}w.fail=function t(e,r,i,a,o){var s,l=arguments.length;if(0===l?s="Failed":1===l?(i=e,e=void 0):(!1===_&&(_=!0,(n.emitWarning?n.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===l&&(a="!=")),i instanceof Error)throw i;var u={actual:e,expected:r,operator:void 0===a?"fail":a,stackStartFn:o||t};void 0!==i&&(u.message=i);var c=new d(u);throw s&&(c.message=s,c.generatedMessage=!0),c},w.AssertionError=d,w.ok=k,w.equal=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");e!=r&&M({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},w.notEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");e==r&&M({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},w.deepEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===a&&b(),a(e,r)||M({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},w.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===a&&b(),a(e,r)&&M({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},w.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===a&&b(),o(e,r)||M({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},w.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");void 0===a&&b(),o(e,r)&&M({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},w.strictEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");x(e,r)||M({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},w.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new h("actual","expected");x(e,r)&&M({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var S=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&y(e[t])&&e[t].test(n[t])?i[t]=n[t]:i[t]=e[t])}))};function E(t,e,r,n){if("function"!=typeof e){if(y(e))return e.test(t);if(2===arguments.length)throw new u("expected",["Function","RegExp"],e);if("object"!==i(t)||null===t){var s=new d({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:n});throw s.operator=n.name,s}var l=Object.keys(e);if(e instanceof Error)l.push("name","message");else if(0===l.length)throw new c("error",e,"may not be an empty object");return void 0===a&&b(),l.forEach((function(i){"string"==typeof t[i]&&y(e[i])&&e[i].test(t[i])||function(t,e,r,n,i,a){if(!(r in t)||!o(t[r],e[r])){if(!n){var s=new S(t,i),l=new S(e,i,t),u=new d({actual:s,expected:l,operator:"deepStrictEqual",stackStartFn:a});throw u.actual=t,u.expected=e,u.operator=a.name,u}M({actual:t,expected:e,message:n,operator:a.name,stackStartFn:a})}}(t,e,i,r,l,n)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function O(t){if("function"!=typeof t)throw new u("fn","Function",t);try{t()}catch(t){return t}return A}function C(t){return g(t)||null!==t&&"object"===i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function L(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!C(e=t()))throw new f("instance of Promise","promiseFn",e)}else{if(!C(t))throw new u("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return A})).catch((function(t){return t}))}))}function R(t,e,r,n){if("string"==typeof r){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],r);if("object"===i(e)&&null!==e){if(e.message===r)throw new l("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new l("error/message",'The error "'.concat(e,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new u("error",["Object","Error","Function","RegExp"],r);if(e===A){var a="";r&&r.name&&(a+=" (".concat(r.name,")")),a+=n?": ".concat(n):".";var o="rejects"===t.name?"rejection":"exception";M({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(o).concat(a),stackStartFn:t})}if(r&&!E(e,r,n,t))throw e}function D(t,e,r,n){if(e!==A){if("string"==typeof r&&(n=r,r=void 0),!r||E(e,r)){var i=n?": ".concat(n):".",a="doesNotReject"===t.name?"rejection":"exception";M({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(a).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function I(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];T.apply(void 0,[I,e.length].concat(e))}w.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];R.apply(void 0,[t,O(e)].concat(n))},w.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return L(e).then((function(e){return R.apply(void 0,[t,e].concat(n))}))},w.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];D.apply(void 0,[t,O(e)].concat(n))},w.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return L(e).then((function(e){return D.apply(void 0,[t,e].concat(n))}))},w.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===i(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=p(e);var n=new d({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),a=e.stack;if("string"==typeof a){var o=a.split("\n");o.shift();for(var s=n.stack.split("\n"),l=0;l<o.length;l++){var u=s.indexOf(o[l]);if(-1!==u){s=s.slice(0,u);break}}n.stack="".concat(s.join("\n"),"\n").concat(o.join("\n"))}throw n}},w.strict=m(I,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict},26144:function(t,e,r){"use strict";var n=r(4168);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(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,n.key,n)}}function o(t,e){return!e||"object"!==h(e)&&"function"!=typeof e?s(t):e}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){var e="function"==typeof Map?new Map:void 0;return l=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,f(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,t)},l(t)}function u(t,e,r){return u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i},u.apply(null,arguments)}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t){return h="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},h(t)}var d=r(35840).inspect,p=r(86832).codes.ERR_INVALID_ARG_TYPE;function v(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var g="",y="",m="",x="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function w(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var A=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==h(t)||null===t)throw new p("options","Object",t);var i=t.message,a=t.operator,l=t.stackStartFn,u=t.actual,c=t.expected,d=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=o(this,f(e).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(g="[34m",y="[32m",x="[39m",m="[31m"):(g="",y="",x="",m="")),"object"===h(u)&&null!==u&&"object"===h(c)&&null!==c&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=_(u),c=_(c)),"deepStrictEqual"===a||"strictEqual"===a)r=o(this,f(e).call(this,function(t,e,r){var i="",a="",o=0,s="",l=!1,u=w(t),c=u.split("\n"),f=w(e).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===h(t)&&"object"===h(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var _=c[0].length+f[0].length;if(_<=10){if(!("object"===h(t)&&null!==t||"object"===h(e)&&null!==e||0===t&&0===e))return"".concat(b[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&_<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;c[0][d]===f[0][d];)d++;d>2&&(p="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",d),"^"),d=0)}}for(var A=c[c.length-1],M=f[f.length-1];A===M&&(d++<2?s="\n ".concat(A).concat(s):i=A,c.pop(),f.pop(),0!==c.length&&0!==f.length);)A=c[c.length-1],M=f[f.length-1];var T=Math.max(c.length,f.length);if(0===T){var k=u.split("\n");if(k.length>30)for(k[26]="".concat(g,"...").concat(x);k.length>27;)k.pop();return"".concat(b.notIdentical,"\n\n").concat(k.join("\n"),"\n")}d>3&&(s="\n".concat(g,"...").concat(x).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,E=b[r]+"\n".concat(y,"+ actual").concat(x," ").concat(m,"- expected").concat(x),O=" ".concat(g,"...").concat(x," Lines skipped");for(d=0;d<T;d++){var C=d-o;if(c.length<d+1)C>1&&d>2&&(C>4?(a+="\n".concat(g,"...").concat(x),l=!0):C>3&&(a+="\n ".concat(f[d-2]),S++),a+="\n ".concat(f[d-1]),S++),o=d,i+="\n".concat(m,"-").concat(x," ").concat(f[d]),S++;else if(f.length<d+1)C>1&&d>2&&(C>4?(a+="\n".concat(g,"...").concat(x),l=!0):C>3&&(a+="\n ".concat(c[d-2]),S++),a+="\n ".concat(c[d-1]),S++),o=d,a+="\n".concat(y,"+").concat(x," ").concat(c[d]),S++;else{var L=f[d],R=c[d],D=R!==L&&(!v(R,",")||R.slice(0,-1)!==L);D&&v(L,",")&&L.slice(0,-1)===R&&(D=!1,R+=","),D?(C>1&&d>2&&(C>4?(a+="\n".concat(g,"...").concat(x),l=!0):C>3&&(a+="\n ".concat(c[d-2]),S++),a+="\n ".concat(c[d-1]),S++),o=d,a+="\n".concat(y,"+").concat(x," ").concat(R),i+="\n".concat(m,"-").concat(x," ").concat(L),S+=2):(a+=i,i="",1!==C&&0!==d||(a+="\n ".concat(R),S++))}if(S>20&&d<T-2)return"".concat(E).concat(O,"\n").concat(a,"\n").concat(g,"...").concat(x).concat(i,"\n")+"".concat(g,"...").concat(x)}return"".concat(E).concat(l?O:"","\n").concat(a).concat(i).concat(s).concat(p)}(u,c,a)));else if("notDeepStrictEqual"===a||"notStrictEqual"===a){var A=b[a],M=w(u).split("\n");if("notStrictEqual"===a&&"object"===h(u)&&null!==u&&(A=b.notStrictEqualObject),M.length>30)for(M[26]="".concat(g,"...").concat(x);M.length>27;)M.pop();r=1===M.length?o(this,f(e).call(this,"".concat(A," ").concat(M[0]))):o(this,f(e).call(this,"".concat(A,"\n\n").concat(M.join("\n"),"\n")))}else{var T=w(u),k="",S=b[a];"notDeepEqual"===a||"notEqual"===a?(T="".concat(b[a],"\n\n").concat(T)).length>1024&&(T="".concat(T.slice(0,1021),"...")):(k="".concat(w(c)),T.length>512&&(T="".concat(T.slice(0,509),"...")),k.length>512&&(k="".concat(k.slice(0,509),"...")),"deepEqual"===a||"equal"===a?T="".concat(S,"\n\n").concat(T,"\n\nshould equal\n\n"):k=" ".concat(a," ").concat(k)),r=o(this,f(e).call(this,"".concat(T).concat(k)))}return Error.stackTraceLimit=d,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=a,Error.captureStackTrace&&Error.captureStackTrace(s(r),l),r.stack,r.name="AssertionError",o(r)}var r,l;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}}),e&&c(t,e)}(e,t),r=e,l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(t,e){return d(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}({},e,{customInspect:!1,depth:0}))}}],l&&a(r.prototype,l),e}(l(Error));t.exports=A},86832:function(t,e,r){"use strict";function n(t){return n="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},n(t)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var o,s,l={};function u(t,e,r){r||(r=Error);var o=function(r){function o(r,a,s){var l;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),l=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,i(o).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,a,s))),l.code=t,l}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}}),e&&a(t,e)}(o,r),o}(r);l[t]=o}function c(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(t,e,i){var a,s,l,u,f;if(void 0===o&&(o=r(45408)),o("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,4)===s)?(a="must not be",e=e.replace(/^not /,"")):a="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))l="The ".concat(t," ").concat(a," ").concat(c(e,"type"));else{var h=("number"!=typeof f&&(f=0),f+1>(u=t).length||-1===u.indexOf(".",f)?"argument":"property");l='The "'.concat(t,'" ').concat(h," ").concat(a," ").concat(c(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(35840));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===o&&(o=r(45408)),o(e.length>0,"At least one arg needs to be specified");var i="The ",a=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),a){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,a-1).join(", "),i+=", and ".concat(e[a-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},25116:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="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},i(t)}var a=void 0!==/a/g.flags,o=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},l=Object.is?Object.is:r(39896),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:r(1560);function f(t){return t.call.bind(t)}var h=f(Object.prototype.hasOwnProperty),d=f(Object.prototype.propertyIsEnumerable),p=f(Object.prototype.toString),v=r(35840).types,g=v.isAnyArrayBuffer,y=v.isArrayBufferView,m=v.isDate,x=v.isMap,b=v.isRegExp,_=v.isSet,w=v.isNativeError,A=v.isBoxedPrimitive,M=v.isNumberObject,T=v.isStringObject,k=v.isBooleanObject,S=v.isBigIntObject,E=v.isSymbolObject,O=v.isFloat32Array,C=v.isFloat64Array;function L(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function R(t){return Object.keys(t).filter(L).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function D(t,e){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}var I=0,P=1,F=2,N=3;function B(t,e,r,n){if(t===e)return 0!==t||!r||l(t,e);if(r){if("object"!==i(t))return"number"==typeof t&&c(t)&&c(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var o,s,u,f,h=p(t);if(h!==p(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var d=R(t),v=R(e);return d.length===v.length&&j(t,e,r,n,P,d)}if("[object Object]"===h&&(!x(t)&&x(e)||!_(t)&&_(e)))return!1;if(m(t)){if(!m(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(b(t)){if(!b(e)||(u=t,f=e,!(a?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(w(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(y(t)){if(r||!O(t)&&!C(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===D(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var L=R(t),B=R(e);return L.length===B.length&&j(t,e,r,n,I,L)}if(_(t))return!(!_(e)||t.size!==e.size)&&j(t,e,r,n,F);if(x(t))return!(!x(e)||t.size!==e.size)&&j(t,e,r,n,N);if(g(t)){if(s=e,(o=t).byteLength!==s.byteLength||0!==D(new Uint8Array(o),new Uint8Array(s)))return!1}else if(A(t)&&!function(t,e){return M(t)?M(e)&&l(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):T(t)?T(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):k(t)?k(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):S(t)?S(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):E(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return j(t,e,r,n,I)}function z(t,e){return e.filter((function(e){return d(t,e)}))}function j(t,e,r,a,l,c){if(5===arguments.length){c=Object.keys(t);var f=Object.keys(e);if(c.length!==f.length)return!1}for(var p=0;p<c.length;p++)if(!h(e,c[p]))return!1;if(r&&5===arguments.length){var v=u(t);if(0!==v.length){var g=0;for(p=0;p<v.length;p++){var y=v[p];if(d(t,y)){if(!d(e,y))return!1;c.push(y),g++}else if(d(e,y))return!1}var m=u(e);if(v.length!==m.length&&z(e,m).length!==g)return!1}else{var x=u(e);if(0!==x.length&&0!==z(e,x).length)return!1}}if(0===c.length&&(l===I||l===P&&0===t.length||0===t.size))return!0;if(void 0===a)a={val1:new Map,val2:new Map,position:0};else{var b=a.val1.get(t);if(void 0!==b){var _=a.val2.get(e);if(void 0!==_)return b===_}a.position++}a.val1.set(t,a.position),a.val2.set(e,a.position);var w=function(t,e,r,a,l,u){var c=0;if(u===F){if(!function(t,e,r,n){for(var a=null,s=o(t),l=0;l<s.length;l++){var u=s[l];if("object"===i(u)&&null!==u)null===a&&(a=new Set),a.add(u);else if(!e.has(u)){if(r)return!1;if(!V(t,e,u))return!1;null===a&&(a=new Set),a.add(u)}}if(null!==a){for(var c=o(e),f=0;f<c.length;f++){var h=c[f];if("object"===i(h)&&null!==h){if(!U(a,h,r,n))return!1}else if(!r&&!t.has(h)&&!U(a,h,r,n))return!1}return 0===a.size}return!0}(t,e,r,l))return!1}else if(u===N){if(!function(t,e,r,a){for(var o=null,l=s(t),u=0;u<l.length;u++){var c=n(l[u],2),f=c[0],h=c[1];if("object"===i(f)&&null!==f)null===o&&(o=new Set),o.add(f);else{var d=e.get(f);if(void 0===d&&!e.has(f)||!B(h,d,r,a)){if(r)return!1;if(!G(t,e,f,h,a))return!1;null===o&&(o=new Set),o.add(f)}}}if(null!==o){for(var p=s(e),v=0;v<p.length;v++){var g=n(p[v],2),y=(f=g[0],g[1]);if("object"===i(f)&&null!==f){if(!Y(o,t,f,y,r,a))return!1}else if(!(r||t.has(f)&&B(t.get(f),y,!1,a)||Y(o,t,f,y,!1,a)))return!1}return 0===o.size}return!0}(t,e,r,l))return!1}else if(u===P)for(;c<t.length;c++){if(!h(t,c)){if(h(e,c))return!1;for(var f=Object.keys(t);c<f.length;c++){var d=f[c];if(!h(e,d)||!B(t[d],e[d],r,l))return!1}return f.length===Object.keys(e).length}if(!h(e,c)||!B(t[c],e[c],r,l))return!1}for(c=0;c<a.length;c++){var p=a[c];if(!B(t[p],e[p],r,l))return!1}return!0}(t,e,r,c,a,l);return a.val1.delete(t),a.val2.delete(e),w}function U(t,e,r,n){for(var i=o(t),a=0;a<i.length;a++){var s=i[a];if(B(e,s,r,n))return t.delete(s),!0}return!1}function H(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(c(t))return!1}return!0}function V(t,e,r){var n=H(r);return null!=n?n:e.has(n)&&!t.has(n)}function G(t,e,r,n,i){var a=H(r);if(null!=a)return a;var o=e.get(a);return!(void 0===o&&!e.has(a)||!B(n,o,!1,i))&&!t.has(a)&&B(n,o,!1,i)}function Y(t,e,r,n,i,a){for(var s=o(t),l=0;l<s.length;l++){var u=s[l];if(B(r,u,i,a)&&B(n,e.get(u),i,a))return t.delete(u),!0}return!1}t.exports={isDeepEqual:function(t,e){return B(t,e,!1)},isDeepStrictEqual:function(t,e){return B(t,e,!0)}}},83160: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}},59968: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},64928: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)}}},308: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}},29620:function(t,e,r){"use strict";var n=r(32420);t.exports=function(t,e){e||(e={});var r,o,s,l,u,c,f,h,d,p,v,g=null==e.cutoff?.25:e.cutoff,y=null==e.radius?8:e.radius,m=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,c=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext("2d"),r=h.width,o=h.height,l=(d=f.getImageData(0,0,r,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t,r=(h=t.canvas).width,o=h.height,l=(d=f.getImageData(0,0,r,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(d=t,r=t.width,o=t.height,l=d.data,c=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*o),p=0,v=u.length;p<v;p++)l[p]=u[p*c+m]/255;else if(1!==c)throw Error("Raw data can have only 1 value per pixel");var x=Array(r*o),b=Array(r*o),_=Array(s),w=Array(s),A=Array(s+1),M=Array(s);for(p=0,v=r*o;p<v;p++){var T=l[p];x[p]=1===T?0:0===T?i:Math.pow(Math.max(0,.5-T),2),b[p]=1===T?i:0===T?0:Math.pow(Math.max(0,T-.5),2)}a(x,r,o,_,w,M,A),a(b,r,o,_,w,M,A);var k=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(p=0,v=r*o;p<v;p++)k[p]=n(1-((x[p]-b[p])/y+g),0,1);return k};var i=1e20;function a(t,e,r,n,i,a,s){for(var l=0;l<e;l++){for(var u=0;u<r;u++)n[u]=t[u*e+l];for(o(n,i,a,s,r),u=0;u<r;u++)t[u*e+l]=i[u]}for(u=0;u<r;u++){for(l=0;l<e;l++)n[l]=t[u*e+l];for(o(n,i,a,s,e),l=0;l<e;l++)t[u*e+l]=Math.sqrt(i[l])}}function o(t,e,r,n,a){r[0]=0,n[0]=-i,n[1]=+i;for(var o=1,s=0;o<a;o++){for(var l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(t[o]+o*o-(t[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+i}for(o=0,s=0;o<a;o++){for(;n[s+1]<o;)s++;e[o]=(o-r[s])*(o-r[s])+t[r[s]]}}},99676:function(t,e,r){"use strict";var n=r(53664),i=r(57916),a=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&a(t,".prototype.")>-1?i(r):r}},57916:function(t,e,r){"use strict";var n=r(8844),i=r(53664),a=r(14500),o=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(l,s),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){if("function"!=typeof t)throw new o("a function is required");var e=u(n,l,arguments);return a(e,1+f(0,t.length-(arguments.length-1)),!0)};var h=function(){return u(n,s,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},32420: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}},3808:function(t,e,r){"use strict";var n=r(32420);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(255&n(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},17592: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]}},72160:function(t,e,r){"use strict";var n=r(96824),i=r(32420),a=r(72512);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)}},96824:function(t,e,r){"use strict";var n=r(95532),i=r(53576),a=r(32420);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):[]}},95532:function(t,e,r){"use strict";var n=r(17592);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}},53576:function(t,e,r){"use strict";var n=r(19336);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]}},19336:function(t){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},42771:function(t,e,r){"use strict";t.exports={parse:r(46416),stringify:r(49395)}},8744:function(t,e,r){"use strict";var n=r(30584);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},46416:function(t,e,r){"use strict";var n=r(92384),i=r(68194),a=r(3748),o=r(2904),s=r(47916),l=r(7294),u=r(39956),c=r(8744).isSize;t.exports=h;var f=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(f[t])return f[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=u(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),f[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(c(e)){var p=u(e,"/");if(r.size=p[0],null!=p[1]?r.lineHeight=d(p[1]):"/"===h[0]&&(h.shift(),r.lineHeight=d(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=u(h.join(" "),/\s*,\s*/).map(n),f[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function d(t){var e=parseFloat(t);return e.toString()===t?e:t}},49395:function(t,e,r){"use strict";var n=r(55616),i=r(8744).isSize,a=p(r(68194)),o=p(r(3748)),s=p(r(2904)),l=p(r(47916)),u=p(r(7294)),c={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function p(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=1;return e}t.exports=function(t){if((t=n(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"})).system)return t.system&&d(t.system,o),t.system;if(d(t.style,l),d(t.variant,c),d(t.weight,s),d(t.stretch,u),null==t.size&&(t.size="1rem"),"number"==typeof t.size&&(t.size+="px"),!i)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=h),Array.isArray(t.family)&&(t.family.length||(t.family=[h]),t.family=t.family.map((function(t){return f[t]?t:'"'+t+'"'})).join(", "));var e=[];return e.push(t.style),t.variant!==t.style&&e.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&e.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&e.push(t.stretch),e.push(t.size+(null==t.lineHeight||"normal"===t.lineHeight||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),e.push(t.family),e.filter(Boolean).join(" ")}},27940:function(t,e,r){"use strict";var n,i=r(81680),a=r(18496),o=r(87396),s=r(95920),l=r(50868),u=r(84323),c=Function.prototype.bind,f=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,i=a(e)&&o(e.value);return delete(n=s(e)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?i:(e.value=c.call(i,r.resolveContext?r.resolveContext(this):this),f(this,t,e),this[t])},n},t.exports=function(t){var e=l(arguments[1]);return i(e.resolveContext)&&o(e.resolveContext),u(t,(function(t,r){return n(r,t,e)}))}},21092:function(t,e,r){"use strict";var n=r(81680),i=r(85488),a=r(38452),o=r(50868),s=r(71056),l=t.exports=function(t,e){var r,i,l,u,c;return arguments.length<2||"string"!=typeof t?(u=e,e=t,t=null):u=arguments[2],n(t)?(r=s.call(t,"c"),i=s.call(t,"e"),l=s.call(t,"w")):(r=l=!0,i=!1),c={value:e,configurable:r,enumerable:i,writable:l},u?a(o(u),c):c};l.gs=function(t,e,r){var l,u,c,f;return"string"!=typeof t?(c=r,r=e,e=t,t=null):c=arguments[3],n(e)?i(e)?n(r)?i(r)||(c=r,r=void 0):r=void 0:(c=e,e=r=void 0):e=void 0,n(t)?(l=s.call(t,"c"),u=s.call(t,"e")):(l=!0,u=!1),f={get:e,set:r,configurable:l,enumerable:u},c?a(o(c),f):f}},57624: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+"",y=void 0===t.nan?"NaN":t.nan+"";function m(t){var e=(t=o(t)).fill,r=t.align,n=t.sign,c=t.symbol,d=t.zero,m=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 A="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===c?l:/[%p]/.test(w)?v:"",T=u[w],k=/[defgprs%]/.test(w);function S(t){var o,s,l,u=A,c=M;if("c"===w)c=T(t)+c,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?y:T(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 S=u.length+t.length+c.length,E=S<m?new Array(m-S+1).join(e):"";switch(x&&d&&(t=a(E+t,E.length?m-c.length:1/0),E=""),r){case"<":t=u+t+c+E;break;case"=":t=u+E+t+c;break;case"^":t=E.slice(0,S=E.length>>1)+u+t+c+E.slice(S);break;default:t=E+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)),S.toString=function(){return t+""},S}return{format:m,formatPrefix:function(t,e){var r,i=m(((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},94336: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(58931),a=r(46192),o=r(68936),s=r(32171),l=r(53528);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,y=w(l),m=A(l),x=w(h),b=A(h),_=w(d),St=A(d),Et=w(p),Ot=A(p),Ct=w(v),Lt=A(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:G,e:G,f:Z,H:Y,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:Tt,s:kt,S:Q,u:$,U:tt,V:et,w:rt,W:nt,x:null,X:null,y:it,Y:at,Z:ot,"%":Mt},Dt={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:Tt,s:kt,S:vt,u:gt,U:yt,V:mt,w:xt,W:bt,x:null,X:null,y:_t,Y:wt,Z:At,"%":Mt},It={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=St[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=Lt[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=Et.exec(e.slice(r));return n?(t.m=Ot[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Nt(t,e,r,n)},d:I,e:I,f:j,H:F,I:F,j:P,L:z,m:D,M:N,p:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.p=m[n[0].toLowerCase()],r+n[0].length):-1},q:R,Q:H,s:V,S:B,u:T,U:k,V:S,w:M,W:E,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:O,Z:L,"%":U};function Pt(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 Ft(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=It[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=Pt(r,Rt),Rt.X=Pt(s,Rt),Rt.c=Pt(e,Rt),Dt.x=Pt(r,Dt),Dt.X=Pt(s,Dt),Dt.c=Pt(e,Dt),{format:function(t){var e=Pt(t+="",Rt);return e.toString=function(){return t},e},parse:function(t){var e=Ft(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Pt(t+="",Dt);return e.toString=function(){return t},e},utcParse:function(t){var e=Ft(t+="",!0);return e.toString=function(){return t},e}}}var d,p,v,g={"-":"",_:" ",0:"0"},y=/^\s*\d+/,m=/^%/,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 A(t){for(var e={},r=-1,n=t.length;++r<n;)e[t[r].toLowerCase()]=r;return e}function M(t,e,r){var n=y.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function T(t,e,r){var n=y.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function k(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function S(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function E(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function O(t,e,r){var n=y.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function C(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function L(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=y.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function I(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function P(t,e,r){var n=y.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function F(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function N(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function B(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function z(t,e,r){var n=y.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function j(t,e,r){var n=y.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=m.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function H(t,e,r){var n=y.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function V(t,e,r){var n=y.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function G(t,e){return b(t.getDate(),e,2)}function Y(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 yt(t,e){return b(n.EV.count((0,l.c)(t)-1,t),e,2)}function mt(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 At(){return"+0000"}function Mt(){return"%"}function Tt(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},68936:function(t,e,r){"use strict";r.d(e,{m:function(){return o}});var n=r(81628),i=r(69792),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},69792: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},73220:function(t,e,r){"use strict";r.r(e),r.d(e,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return m.iB},timeFridays:function(){return m.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 m.qT},timeMondays:function(){return m.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return m.Wc},timeSaturdays:function(){return m.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return m.uU},timeSundays:function(){return m.Ab},timeThursday:function(){return m.kD},timeThursdays:function(){return m.eC},timeTuesday:function(){return m.Mf},timeTuesdays:function(){return m.Oc},timeWednesday:function(){return m.eg},timeWednesdays:function(){return m.sn},timeWeek:function(){return m.uU},timeWeeks:function(){return m.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return O.c},utcDays:function(){return O.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return S},utcHours:function(){return E},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return M},utcMinutes:function(){return T},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return R},utcMonths:function(){return D},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 I.c},utcYears:function(){return I.i}});var n=r(81628),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(69792),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,y=r(68936),m=r(46192),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(32171),A=(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()})),M=A,T=A.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()})),S=k,E=k.range,O=r(58931),C=r(8208),L=(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=L,D=L.range,I=r(53528)},81628: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}},58931:function(t,e,r){"use strict";r.d(e,{o:function(){return o}});var n=r(81628),i=r(69792),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 m},iO:function(){return p},kl:function(){return v},ob:function(){return y},od:function(){return f},ot:function(){return s},sG:function(){return l},yA:function(){return c}});var n=r(81628),i=r(69792);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,y=c.range,m=f.range,x=h.range},53528:function(t,e,r){"use strict";r.d(e,{i:function(){return a}});var n=r(81628),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},46192: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 y},eg:function(){return u},iB:function(){return f},kD:function(){return c},qT:function(){return s},sJ:function(){return m},sn:function(){return g},uU:function(){return o}});var n=r(81628),i=r(69792);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,y=c.range,m=f.range,x=h.range},32171:function(t,e,r){"use strict";r.d(e,{Q:function(){return a}});var n=r(81628),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},64348:function(t,e,r){"use strict";var n=r(39640)(),i=r(53664),a=n&&i("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(t){a=!1}var o=i("%SyntaxError%"),s=i("%TypeError%"),l=r(2304);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!l&&l(t,e);if(a)a(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===i&&f?f.writable:!i});else{if(!c&&(n||i||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},81288:function(t,e,r){"use strict";var n=r(41820),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=r(39640)(),u=s&&l,c=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==a.call(i)||!n())return;var i;u?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r},f=function(t,e){var r=arguments.length>2?arguments[2]:{},a=n(e);i&&(a=o.call(a,Object.getOwnPropertySymbols(e)));for(var s=0;s<a.length;s+=1)c(t,a[s],e[a[s]],r[a[s]])};f.supportsDescriptors=!!u,t.exports=f},31264:function(t){t.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},63768:function(t){"use strict";t.exports=n;var e=(n.canvas=document.createElement("canvas")).getContext("2d"),r=i([32,126]);function n(t,n){Array.isArray(t)&&(t=t.join(", "));var a,o={},s=16,l=.05;n&&(2===n.length&&"number"==typeof n[0]?a=i(n):Array.isArray(n)?a=n:(n.o?a=i(n.o):n.pairs&&(a=n.pairs),n.fontSize&&(s=n.fontSize),null!=n.threshold&&(l=n.threshold))),a||(a=r),e.font=s+"px "+t;for(var u=0;u<a.length;u++){var c=a[u],f=e.measureText(c[0]).width+e.measureText(c[1]).width,h=e.measureText(c).width;if(Math.abs(f-h)>s*l){var d=(h-f)/s;o[c]=1e3*d}}return o}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i<t[1];i++){var a=n+String.fromCharCode(i);e.push(a)}return e}n.createPairs=i,n.ascii=r},22235:function(t,e,r){var n=r(49972),i=r(48816),a={M:"moveTo",C:"bezierCurveTo"};t.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)})),t.closePath()}},72512: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}}},10352: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[]}},28912:function(t){"use strict";function e(t,e,a){a=a||2;var o,s,l,f,h,p,v,g=e&&e.length,y=g?e[0]*a:t.length,m=r(t,0,y,a,!0),x=[];if(!m||m.next===m.prev)return x;if(g&&(m=function(t,e,i,a){var o,s,l,f=[];for(o=0,s=e.length;o<s;o++)(l=r(t,e[o]*a,o<s-1?e[o+1]*a:t.length,a,!1))===l.next&&(l.steiner=!0),f.push(d(l));for(f.sort(u),o=0;o<f.length;o++)c(f[o],i),i=n(i,i.next);return i}(t,e,m,a)),t.length>80*a){o=l=t[0],s=f=t[1];for(var b=a;b<y;b+=a)(h=t[b])<o&&(o=h),(p=t[b+1])<s&&(s=p),h>l&&(l=h),p>f&&(f=p);v=0!==(v=Math.max(l-o,f-s))?1/v:0}return i(m,x,a,o,s,v),x}function r(t,e,r,n,i){var a,o;if(i===k(t,e,r,n)>0)for(a=e;a<r;a+=n)o=A(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(M(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(M(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,u,c,f,d){if(t){!d&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=h(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,u,c,f);for(var p,v,g=t;t.prev!==t.next;)if(p=t.prev,v=t.next,f?o(t,u,c,f):a(t))e.push(p.i/r),e.push(t.i/r),e.push(v.i/r),M(t),t=v.next,g=v.next;else if((t=v)===g){d?1===d?i(t=s(n(t),e,r),e,r,u,c,f,2):2===d&&l(t,e,r,u,c,f):i(n(t),e,r,u,c,f,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(p(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,r,n){var i=t.prev,a=t,o=t.next;if(g(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,u=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=h(s,l,e,r,n),d=h(u,c,e,r,n),v=t.prevZ,y=t.nextZ;v&&v.z>=f&&y&&y.z<=d;){if(v!==t.prev&&v!==t.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,y!==t.prev&&y!==t.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,y.x,y.y)&&g(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;v&&v.z>=f;){if(v!==t.prev&&v!==t.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;y&&y.z<=d;){if(y!==t.prev&&y!==t.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,y.x,y.y)&&g(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function s(t,e,r){var i=t;do{var a=i.prev,o=i.next.next;!y(a,o)&&m(a,i,i.next,o)&&_(a,o)&&_(o,a)&&(e.push(a.i/r),e.push(i.i/r),e.push(o.i/r),M(i),M(i.next),i=t=o),i=i.next}while(i!==t);return n(i)}function l(t,e,r,a,o,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var c=w(l,u);return l=n(l,l.next),c=n(c,c.next),i(l,e,r,a,o,s),void i(c,e,r,a,o,s)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function c(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r;var l,u=r,c=r.x,h=r.y,d=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&p(a<h?i:o,a,c,h,a<h?o:i,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(i-n.x),_(n,t)&&(l<d||l===d&&(n.x>r.x||n.x===r.x&&f(r,n)))&&(r=n,d=l)),n=n.next}while(n!==u);return r}(t,e),e){var r=w(e,t);n(e,e.next),n(r,r.next)}}function f(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function p(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&m(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||y(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,r,n){var i=b(g(t,e,r)),a=b(g(t,e,n)),o=b(g(r,n,t)),s=b(g(r,n,e));return i!==a&&o!==s||!(0!==i||!x(t,r,e))||!(0!==a||!x(t,n,e))||!(0!==o||!x(r,t,n))||!(0!==s||!x(r,e,n))}function x(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var r=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function A(t,e,r,n){var i=new T(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function k(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}t.exports=e,t.exports.default=e,e.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(k(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;o-=Math.abs(k(t,u,c,r))}var f=0;for(s=0;s<n.length;s+=3){var h=n[s]*r,d=n[s+1]*r,p=n[s+2]*r;f+=Math.abs((t[h]-t[p])*(t[d+1]-t[h+1])-(t[h]-t[d])*(t[p+1]-t[h+1]))}return 0===o&&0===f?0:Math.abs((f-o)/o)},e.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r}},41476:function(t,e,r){"use strict";var n=r(9252);t.exports=function(){return n(this).length=0,this}},74772:function(t,e,r){"use strict";t.exports=r(44716)()?Array.from:r(80816)},44716:function(t){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},80816:function(t,e,r){"use strict";var n=r(92664).iterator,i=r(60948),a=r(17024),o=r(81304),s=r(34044),l=r(9252),u=r(42584),c=r(29768),f=Array.isArray,h=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(t){var e,r,v,g,y,m,x,b,_,w,A=arguments[1],M=arguments[2];if(t=Object(l(t)),u(A)&&s(A),this&&this!==Array&&a(this))e=this;else{if(!A){if(i(t))return 1!==(y=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(f(t)){for(g=new Array(y=t.length),r=0;r<y;++r)g[r]=t[r];return g}}g=[]}if(!f(t))if(void 0!==(_=t[n])){for(x=s(_).call(t),e&&(g=new e),b=x.next(),r=0;!b.done;)w=A?h.call(A,M,b.value,r):b.value,e?(d.value=w,p(g,r,d)):g[r]=w,b=x.next(),++r;y=r}else if(c(t)){for(y=t.length,e&&(g=new e),r=0,v=0;r<y;++r)w=t[r],r+1<y&&(m=w.charCodeAt(0))>=55296&&m<=56319&&(w+=t[++r]),w=A?h.call(A,M,w,v):w,e?(d.value=w,p(g,v,d)):g[v]=w,++v;y=v}if(void 0===y)for(y=o(t.length),e&&(g=new e(y)),r=0;r<y;++r)w=A?h.call(A,M,t[r],r):t[r],e?(d.value=w,p(g,r,d)):g[r]=w;return e&&(d.value=null,g.length=y),g}},60948:function(t){"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},17024:function(t){"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return"function"==typeof t&&r(e.call(t))}},33208:function(t){"use strict";t.exports=function(){}},85608:function(t,e,r){"use strict";t.exports=r(37328)()?Math.sign:r(92928)},37328:function(t){"use strict";t.exports=function(){var t=Math.sign;return"function"==typeof t&&1===t(10)&&-1===t(-20)}},92928:function(t){"use strict";t.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},96936:function(t,e,r){"use strict";var n=r(85608),i=Math.abs,a=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},81304:function(t,e,r){"use strict";var n=r(96936),i=Math.max;t.exports=function(t){return i(0,n(t))}},14428:function(t,e,r){"use strict";var n=r(34044),i=r(9252),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var c,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=s(r),h&&c.sort("function"==typeof h?a.call(h,r):void 0),"function"!=typeof t&&(t=c[t]),o.call(t,c,(function(t,n){return l.call(r,t)?o.call(u,f,r[t],t,r,n):e}))}}},38452:function(t,e,r){"use strict";t.exports=r(96276)()?Object.assign:r(81892)},96276:function(t){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},81892:function(t,e,r){"use strict";var n=r(54768),i=r(9252),a=Math.max;t.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o<l;++o)n(e=arguments[o]).forEach(s);if(void 0!==r)throw r;return t}},95920:function(t,e,r){"use strict";var n=r(74772),i=r(38452),a=r(9252);t.exports=function(t){var e=Object(a(t)),r=arguments[1],o=Object(arguments[2]);if(e!==t&&!r)return e;var s={};return r?n(r,(function(e){(o.ensure||e in t)&&(s[e]=t[e])})):i(s,t),s}},14452:function(t,e,r){"use strict";var n,i,a,o,s=Object.create;r(63092)()||(n=r(8672)),t.exports=n?1!==n.level?s:(i={},a={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){a[t]="__proto__"!==t?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(i,a),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:i}),function(t,e){return s(null===t?i:t,e)}):s},42748:function(t,e,r){"use strict";t.exports=r(14428)("forEach")},69127:function(t,e,r){"use strict";var n=r(42584),i={function:!0,object:!0};t.exports=function(t){return n(t)&&i[typeof t]||!1}},42584:function(t,e,r){"use strict";var n=r(33208)();t.exports=function(t){return t!==n&&null!==t}},54768:function(t,e,r){"use strict";t.exports=r(87888)()?Object.keys:r(89592)},87888:function(t){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},89592:function(t,e,r){"use strict";var n=r(42584),i=Object.keys;t.exports=function(t){return i(n(t)?Object(t):t)}},84323:function(t,e,r){"use strict";var n=r(34044),i=r(42748),a=Function.prototype.call;t.exports=function(t,e){var r={},o=arguments[2];return n(e),i(t,(function(t,n,i,s){r[n]=a.call(e,o,t,n,i,s)})),r}},50868:function(t,e,r){"use strict";var n=r(42584),i=Array.prototype.forEach,a=Object.create;t.exports=function(t){var e=a(null);return i.call(arguments,(function(t){n(t)&&function(t,e){var r;for(r in t)e[r]=t[r]}(Object(t),e)})),e}},69932:function(t,e,r){"use strict";t.exports=r(63092)()?Object.setPrototypeOf:r(8672)},63092:function(t){"use strict";var e=Object.create,r=Object.getPrototypeOf,n={};t.exports=function(){var t=Object.setPrototypeOf;return"function"==typeof t&&r(t((arguments[0]||e)(null),n))===n}},8672:function(t,e,r){"use strict";var n,i,a,o,s=r(69127),l=r(9252),u=Object.prototype.isPrototypeOf,c=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(t,e){if(l(t),null===e||s(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=(i=function(){var t,e=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(t=n.set).call(e,r)}catch(t){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:((e={}).__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}(),i?(2===i.level?i.set?(o=i.set,a=function(t,e){return o.call(n(t,e),e),t}):a=function(t,e){return n(t,e).__proto__=e,t}:a=function t(e,r){var i;return n(e,r),(i=u.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===r&&(r=t.nullPolyfill),e.__proto__=r,i&&c(t.nullPolyfill,"__proto__",f),e},Object.defineProperty(a,"level",{configurable:!1,enumerable:!1,writable:!1,value:i.level})):null),r(14452)},34044:function(t){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},92584:function(t,e,r){"use strict";var n=r(69127);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not an Object");return t}},9252:function(t,e,r){"use strict";var n=r(42584);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},71056:function(t,e,r){"use strict";t.exports=r(42976)()?String.prototype.contains:r(93040)},42976:function(t){"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},93040:function(t){"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},29768:function(t){"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},82252:function(t){"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},52104:function(t,e,r){"use strict";var n,i=r(69932),a=r(71056),o=r(21092),s=r(92664),l=r(85512),u=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",u(this,"__kind__",o("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),u(n.prototype,s.toStringTag,o("c","Array Iterator"))},76024:function(t,e,r){"use strict";var n=r(60948),i=r(34044),a=r(29768),o=r(76252),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;t.exports=function(t,e){var r,c,f,h,d,p,v,g,y=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),f=function(){h=!0},"array"!==r)if("string"!==r)for(c=t.next();!c.done;){if(l.call(e,y,c.value,f),h)return;c=t.next()}else for(p=t.length,d=0;d<p&&(v=t[d],d+1<p&&(g=v.charCodeAt(0))>=55296&&g<=56319&&(v+=t[++d]),l.call(e,y,v,f),!h);++d);else u.call(t,(function(t){return l.call(e,y,t,f),h}))}},76252:function(t,e,r){"use strict";var n=r(60948),i=r(29768),a=r(52104),o=r(80940),s=r(52891),l=r(92664).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},85512:function(t,e,r){"use strict";var n,i=r(41476),a=r(38452),o=r(34044),s=r(9252),l=r(21092),u=r(27940),c=r(92664),f=Object.defineProperty,h=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:l((function(){return this._createResult(this._next())})),_createResult:l((function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}})),_resolve:l((function(t){return this.__list__[t]})),_unBind:l((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:l((function(){return"[object "+(this[c.toStringTag]||"Object")+"]"}))},u({_onAdd:l((function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,c.iterator,l((function(){return this})))},76368:function(t,e,r){"use strict";var n=r(60948),i=r(42584),a=r(29768),o=r(92664).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!a(t)&&!n(t)&&"function"!=typeof t[o])}},80940:function(t,e,r){"use strict";var n,i=r(69932),a=r(21092),o=r(92664),s=r(85512),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",a("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:a((function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0))>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},52891:function(t,e,r){"use strict";var n=r(76368);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},60964:function(t){"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var a=Object.keys(Object(i)),o=0,s=a.length;o<s;o++){var l=a[o],u=Object.getOwnPropertyDescriptor(i,l);void 0!==u&&u.enumerable&&(r[l]=i[l])}}return r}t.exports={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}}},92664:function(t,e,r){"use strict";t.exports=r(43580)()?r(12296).Symbol:r(18376)},43580:function(t,e,r){"use strict";var n=r(12296),i={object:!0,symbol:!0};t.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag]}},53908:function(t){"use strict";t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},96863:function(t,e,r){"use strict";var n=r(21092),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);t.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,a(o,e="@@"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},53540:function(t,e,r){"use strict";var n=r(21092),i=r(12296).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},73852:function(t,e,r){"use strict";var n=r(21092),i=r(63948),a=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},18376:function(t,e,r){"use strict";var n,i,a,o=r(21092),s=r(63948),l=r(12296).Symbol,u=r(96863),c=r(53540),f=r(73852),h=Object.create,d=Object.defineProperties,p=Object.defineProperty;if("function"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},t.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return a?l(e):(r=h(i.prototype),e=void 0===e?"":String(e),d(r,{__description__:o("",e),__name__:o("",u(e))}))},c(n),f(n),d(i.prototype,{constructor:o(n),toString:o("",(function(){return this.__name__}))}),d(n.prototype,{toString:o((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:o((function(){return s(this)}))}),p(n.prototype,n.toPrimitive,o("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),p(n.prototype,n.toStringTag,o("c","Symbol")),p(i.prototype,n.toStringTag,o("c",n.prototype[n.toStringTag])),p(i.prototype,n.toPrimitive,o("c",n.prototype[n.toPrimitive]))},63948:function(t,e,r){"use strict";var n=r(53908);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},60463:function(t,e,r){"use strict";t.exports=r(96979)()?WeakMap:r(64864)},96979:function(t){"use strict";t.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&"function"==typeof t.set&&t.set({},1)===t&&"function"==typeof t.delete&&"function"==typeof t.has&&"one"===t.get(e)}},69876:function(t){"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},64864:function(t,e,r){"use strict";var n,i=r(42584),a=r(69932),o=r(92584),s=r(9252),l=r(82252),u=r(21092),c=r(76252),f=r(76024),h=r(92664).toStringTag,d=r(69876),p=Array.isArray,v=Object.defineProperty,g=Object.prototype.hasOwnProperty,y=Object.getPrototypeOf;t.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=d&&a&&WeakMap!==n?a(new WeakMap,y(this)):this,i(e)&&(p(e)||(e=c(e))),v(t,"__weakMapData__",u("c","$weakMap$"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},d&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:u(n)})),Object.defineProperties(n.prototype,{delete:u((function(t){return!!g.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:u((function(t){if(g.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:u((function(t){return g.call(o(t),this.__weakMapData__)})),set:u((function(t,e){return v(o(t),this.__weakMapData__,u("c",e)),this})),toString:u((function(){return"[object WeakMap]"}))}),v(n.prototype,h,u("c","WeakMap"))},61252: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):[]}},39072:function(t){var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},12296:function(t,e,r){"use strict";t.exports=r(45072)()?globalThis:r(39072)},45072:function(t){"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},38248:function(t,e,r){"use strict";var n=r(94576);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}},47520:function(t,e,r){var n=r(72512);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,a,o,s,l=t[0].length,u=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(u+r));var c=e.length-r;if(u!==c)throw new Error("source length "+u+" ("+l+"x"+t.length+") does not match destination length "+c);for(i=0,o=r;i<t.length;i++)for(a=0;a<l;a++)e[o++]=null===t[i][a]?NaN:t[i][a]}else if(e&&"string"!=typeof e)e.set(t,r);else{var f=n(e||"float32");if(Array.isArray(t)||"array"===e)for(i=0,o=r,s=(e=new f(t.length+r)).length;o<s;o++,i++)e[o]=null===t[i]?NaN:t[i];else 0===r?e=new f(t):(e=new f(t.length+r)).set(t,r)}return e}},33888:function(t,e,r){"use strict";var n=r(49395),i=[32,126];t.exports=function(t){var e=(t=t||{}).shape?t.shape:t.canvas?[t.canvas.width,t.canvas.height]:[512,512],r=t.canvas||document.createElement("canvas"),a=t.font,o="number"==typeof t.step?[t.step,t.step]:t.step||[32,32],s=t.chars||i;if(a&&"string"!=typeof a&&(a=n(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],u=s[0],c=0;u<=s[1];u++)l[c++]=String.fromCharCode(u);s=l}}else s=String(s).split("");e=e.slice(),r.width=e[0],r.height=e[1];var f=r.getContext("2d");f.fillStyle="#000",f.fillRect(0,0,r.width,r.height),f.font=a,f.textAlign="center",f.textBaseline="middle",f.fillStyle="#fff";var h=o[0]/2,d=o[1]/2;for(u=0;u<s.length;u++)f.fillText(s[u],h,d),(h+=o[0])>e[0]-o[0]/2&&(h=o[0]/2,d+=o[1]);return r}},71920:function(t){"use strict";function e(t,a){a||(a={}),("string"==typeof t||Array.isArray(t))&&(a.family=t);var o=Array.isArray(a.family)?a.family.join(", "):a.family;if(!o)throw Error("`family` must be defined");var s=a.size||a.fontSize||a.em||48,l=a.weight||a.fontWeight||"",u=(t=[a.style||a.fontStyle||"",l,s].join(" ")+"px "+o,a.origin||"top");if(e.cache[o]&&s<=e.cache[o].em)return r(e.cache[o],u);var c=a.canvas||e.canvas,f=c.getContext("2d"),h={upper:void 0!==a.upper?a.upper:"H",lower:void 0!==a.lower?a.lower:"x",descent:void 0!==a.descent?a.descent:"p",ascent:void 0!==a.ascent?a.ascent:"h",tittle:void 0!==a.tittle?a.tittle:"i",overshoot:void 0!==a.overshoot?a.overshoot:"O"},d=Math.ceil(1.5*s);c.height=d,c.width=.5*d,f.font=t;var p="H",v={top:0};f.clearRect(0,0,d,d),f.textBaseline="top",f.fillStyle="black",f.fillText(p,0,0);var g=n(f.getImageData(0,0,d,d));f.clearRect(0,0,d,d),f.textBaseline="bottom",f.fillText(p,0,d);var y=n(f.getImageData(0,0,d,d));v.lineHeight=v.bottom=d-y+g,f.clearRect(0,0,d,d),f.textBaseline="alphabetic",f.fillText(p,0,d);var m=d-n(f.getImageData(0,0,d,d))-1+g;v.baseline=v.alphabetic=m,f.clearRect(0,0,d,d),f.textBaseline="middle",f.fillText(p,0,.5*d);var x=n(f.getImageData(0,0,d,d));v.median=v.middle=d-x-1+g-.5*d,f.clearRect(0,0,d,d),f.textBaseline="hanging",f.fillText(p,0,.5*d);var b=n(f.getImageData(0,0,d,d));v.hanging=d-b-1+g-.5*d,f.clearRect(0,0,d,d),f.textBaseline="ideographic",f.fillText(p,0,d);var _=n(f.getImageData(0,0,d,d));if(v.ideographic=d-_-1+g,h.upper&&(f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.upper,0,0),v.upper=n(f.getImageData(0,0,d,d)),v.capHeight=v.baseline-v.upper),h.lower&&(f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.lower,0,0),v.lower=n(f.getImageData(0,0,d,d)),v.xHeight=v.baseline-v.lower),h.tittle&&(f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.tittle,0,0),v.tittle=n(f.getImageData(0,0,d,d))),h.ascent&&(f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.ascent,0,0),v.ascent=n(f.getImageData(0,0,d,d))),h.descent&&(f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.descent,0,0),v.descent=i(f.getImageData(0,0,d,d))),h.overshoot){f.clearRect(0,0,d,d),f.textBaseline="top",f.fillText(h.overshoot,0,0);var w=i(f.getImageData(0,0,d,d));v.overshoot=w-m}for(var A in v)v[A]/=s;return v.em=s,e.cache[o]=v,r(v,u)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n<r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}function i(t){for(var e=t.height,r=t.data,n=r.length-1;n>0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},46492:function(t,e,r){"use strict";var n=r(90720),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,o):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,o):function(t,e,r){for(var n in t)a.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,o)}},74336:function(t){"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,o=function(t,e){for(var r=[],n=1,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments),s=r(0,i.length-o.length),l=[],u=0;u<s;u++)l[u]="$"+u;if(a=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=",");return r}(l)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof a){var e=i.apply(this,n(o,arguments));return Object(e)===e?e:this}return i.apply(t,n(o,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,a.prototype=new c,c.prototype=null}return a}},8844:function(t,e,r){"use strict";var n=r(74336);t.exports=Function.prototype.bind||n},13380: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}},53664:function(t,e,r){"use strict";var n,i=SyntaxError,a=Function,o=TypeError,s=function(t){try{return a('"use strict"; return ('+t+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(t){l=null}var u=function(){throw new o},c=l?function(){try{return u}catch(t){try{return l(arguments,"callee").get}catch(t){return u}}}():u,f=r(71080)(),h=r(69572)(),d=Object.getPrototypeOf||(h?function(t){return t.__proto__}:null),p={},v="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&d?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":v,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(t){var y=d(d(t));g["%Error.prototype%"]=y}var m=function t(e){var r;if("%AsyncFunction%"===e)r=s("async function () {}");else if("%GeneratorFunction%"===e)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=s("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&d&&(r=d(i.prototype))}return g[e]=r,r},x={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8844),_=r(92064),w=b.call(Function.call,Array.prototype.concat),A=b.call(Function.apply,Array.prototype.splice),M=b.call(Function.call,String.prototype.replace),T=b.call(Function.call,String.prototype.slice),k=b.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,O=function(t,e){var r,n=t;if(_(x,n)&&(n="%"+(r=x[n])[0]+"%"),_(g,n)){var a=g[n];if(a===p&&(a=m(n)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:a}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=T(t,0,1),r=T(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return M(t,S,(function(t,e,r,i){n[n.length]=r?M(i,E,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",a=O("%"+n+"%",e),s=a.name,u=a.value,c=!1,f=a.alias;f&&(n=f[0],A(r,w([0,1],f)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],v=T(p,0,1),y=T(p,-1);if(('"'===v||"'"===v||"`"===v||'"'===y||"'"===y||"`"===y)&&v!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(c=!0),_(g,s="%"+(n+="."+p)+"%"))u=g[s];else if(null!=u){if(!(p in u)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(l&&h+1>=r.length){var m=l(u,p);u=(d=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[p]}else d=_(u,p),u=u[p];d&&!c&&(g[s]=u)}}return u}},12408: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],y=e[15];return t[0]=s*(h*y-d*g)-f*(l*y-u*g)+v*(l*d-u*h),t[1]=-(n*(h*y-d*g)-f*(i*y-a*g)+v*(i*d-a*h)),t[2]=n*(l*y-u*g)-s*(i*y-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*y-d*g)-c*(l*y-u*g)+p*(l*d-u*h)),t[5]=r*(h*y-d*g)-c*(i*y-a*g)+p*(i*d-a*h),t[6]=-(r*(l*y-u*g)-o*(i*y-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*y-d*v)-c*(s*y-u*v)+p*(s*d-u*f),t[9]=-(r*(f*y-d*v)-c*(n*y-a*v)+p*(n*d-a*f)),t[10]=r*(s*y-u*v)-o*(n*y-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}},76860: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}},64492: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}},54212: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}},70800: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)}},61784: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,y=a*l;return t[0]=1-f-p,t[1]=c+y,t[2]=h-g,t[3]=0,t[4]=c-y,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}},91616: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)}},51944: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,y=o*l,m=o*u;return t[0]=1-(d+v),t[1]=f+m,t[2]=h-y,t[3]=0,t[4]=f-m,t[5]=1-(c+v),t[6]=p+g,t[7]=0,t[8]=h+y,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}},69444: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}},48268: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}},21856: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}},79216: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}},57736: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}},38848: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}},36635: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}},36524:function(t,e,r){t.exports={create:r(54212),clone:r(76860),copy:r(64492),identity:r(36635),transpose:r(86520),invert:r(4308),adjoint:r(12408),determinant:r(70800),multiply:r(80944),translate:r(35176),scale:r(68152),rotate:r(30016),rotateX:r(15456),rotateY:r(64840),rotateZ:r(4192),fromRotation:r(91616),fromRotationTranslation:r(51944),fromScaling:r(69444),fromTranslation:r(48268),fromXRotation:r(21856),fromYRotation:r(79216),fromZRotation:r(57736),fromQuat:r(61784),frustum:r(38848),perspective:r(51296),perspectiveFromFieldOfView:r(63688),ortho:r(97688),lookAt:r(56508),str:r(89412)}},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],y=e[15],m=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,A=i*u-a*l,M=c*v-f*p,T=c*g-h*p,k=c*y-d*p,S=f*g-h*v,E=f*y-d*v,O=h*y-d*g,C=m*O-x*E+b*S+_*k-w*T+A*M;return C?(C=1/C,t[0]=(s*O-l*E+u*S)*C,t[1]=(i*E-n*O-a*S)*C,t[2]=(v*A-g*w+y*_)*C,t[3]=(h*w-f*A-d*_)*C,t[4]=(l*k-o*O-u*T)*C,t[5]=(r*O-i*k+a*T)*C,t[6]=(g*b-p*A-y*x)*C,t[7]=(c*A-h*b+d*x)*C,t[8]=(o*E-s*k+u*M)*C,t[9]=(n*k-r*E-a*M)*C,t[10]=(p*w-v*b+y*m)*C,t[11]=(f*b-c*w-d*m)*C,t[12]=(s*T-o*S-l*M)*C,t[13]=(r*S-n*T+i*M)*C,t[14]=(v*x-p*_-g*m)*C,t[15]=(c*_-f*x+h*m)*C,t):null}},56508:function(t,e,r){var n=r(36635);t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,d,p,v=e[0],g=e[1],y=e[2],m=i[0],x=i[1],b=i[2],_=r[0],w=r[1],A=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(y-A)<1e-6?n(t):(f=v-_,h=g-w,d=y-A,a=x*(d*=p=1/Math.sqrt(f*f+h*h+d*d))-b*(h*=p),o=b*(f*=p)-m*d,s=m*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*y),t[13]=-(l*v+u*g+c*y),t[14]=-(f*v+h*g+d*y),t[15]=1,t)}},80944: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],y=e[14],m=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*y,t[3]=x*o+b*c+_*p+w*m,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*y,t[7]=x*o+b*c+_*p+w*m,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*y,t[11]=x*o+b*c+_*p+w*m,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*y,t[15]=x*o+b*c+_*p+w*m,t}},97688: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}},51296: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}},63688: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}},30016:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,d,p,v,g,y,m,x,b,_,w,A,M,T,k,S,E=n[0],O=n[1],C=n[2],L=Math.sqrt(E*E+O*O+C*C);return Math.abs(L)<1e-6?null:(E*=L=1/L,O*=L,C*=L,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],y=e[10],m=e[11],x=E*E*o+a,b=O*E*o+C*i,_=C*E*o-O*i,w=E*O*o-C*i,A=O*O*o+a,M=C*O*o+E*i,T=E*C*o+O*i,k=O*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+d*b+y*_,t[3]=c*x+p*b+m*_,t[4]=s*w+f*A+v*M,t[5]=l*w+h*A+g*M,t[6]=u*w+d*A+y*M,t[7]=c*w+p*A+m*M,t[8]=s*T+f*k+v*S,t[9]=l*T+h*k+g*S,t[10]=u*T+d*k+y*S,t[11]=c*T+p*k+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15456: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}},64840: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}},68152: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}},89412: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]+")"}},35176: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],y=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+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*y+e[12],t[13]=i*v+l*g+h*y+e[13],t[14]=a*v+u*g+d*y+e[14],t[15]=o*v+c*g+p*y+e[15]),t}},86520: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}},23352:function(t,e,r){"use strict";var n=r(42771),i=r(55616),a=r(28624),o=r(55212),s=r(60463),l=r(72160),u=r(33888),c=r(14144),f=r(51160),h=r(58908),d=r(65819),p=r(23464),v=r(63768),g=r(50896),y=r(71920),m=r(47520),x=r(308).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var A=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};A.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},A.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=m(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=A.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(A.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:A.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=d(t.size),l=Math.round(s[0]*p(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=A.fonts[i],e.font[r]))){var u=t.family.join(", "),c=[t.style];t.style!=t.variant&&c.push(t.variant),t.variant!=t.weight&&c.push(t.weight),_&&t.weight!=t.stretch&&c.push(t.stretch),e.font[r]={baseString:i,family:u,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:y(u,{origin:"top",fontSize:A.baseFontSize,fontStyle:c.join(" ")})},A.fonts[i]=e.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h<s.length;h++)s[h]=t.text;t.text=s}if(null!=t.text||a){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var b=1;b<t.text.length;b++)this.textOffsets[b]=this.textOffsets[b-1]+t.text[b-1].length,this.count+=t.text[b].length,this.counts.push(t.text[b].length);this.text=t.text.join("")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach((function(t,n){A.atlasContext.font=t.baseString;for(var i=e.fontAtlas[n],a=0;a<e.text.length;a++){var o=e.text.charAt(a);if(null==i.ids[o]&&(i.ids[o]=i.chars.length,i.chars.push(o),r.push(o)),null==t.width[o]&&(t.width[o]=A.atlasContext.measureText(o).width/A.baseFontSize,e.kerning)){var s=[];for(var l in t.width)s.push(l+o,o+l);g(t.kerning,v(t.family,{pairs:s}))}}}))}if(t.position)if(t.position.length>2){for(var w=!t.position[0].length,M=c.mallocFloat(2*this.count),T=0,k=0;T<this.counts.length;T++){var S=this.counts[T];if(w)for(var E=0;E<S;E++)M[k++]=t.position[2*T],M[k++]=t.position[2*T+1];else for(var O=0;O<S;O++)M[k++]=t.position[T][0],M[k++]=t.position[T][1]}this.position.call?this.position({type:"float",data:M}):this.position=this.regl.buffer({type:"float",data:M}),c.freeFloat(M)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||a){var C=c.mallocUint8(this.count),L=c.mallocFloat(2*this.count);this.textWidth=[];for(var R=0,D=0;R<this.counts.length;R++){for(var I=this.counts[R],P=this.font[R]||this.font[0],F=this.fontAtlas[R]||this.fontAtlas[0],N=0;N<I;N++){var B=this.text.charAt(D),z=this.text.charAt(D-1);if(C[D]=F.ids[B],L[2*D]=P.width[B],N){var j=L[2*D-2],U=L[2*D],H=L[2*D-1]+.5*j+.5*U;if(this.kerning){var V=P.kerning[z+B];V&&(H+=.001*V)}L[2*D+1]=H}else L[2*D+1]=.5*L[2*D];D++}this.textWidth.push(L.length?.5*L[2*D-2]+L[2*D-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:C,type:"uint8",usage:"stream"}),this.sizeBuffer({data:L,type:"float",usage:"stream"}),c.freeUint8(C),c.freeFloat(L),r.length&&this.font.forEach((function(t,r){var n=e.fontAtlas[r],i=n.step,a=Math.floor(A.maxAtlasSize/i),o=Math.min(a,n.chars.length),s=Math.ceil(n.chars.length/o),l=x(o*i),c=x(s*i);n.width=l,n.height=c,n.rows=s,n.cols=o,n.em&&n.texture({data:u({canvas:A.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,c],step:[i,i]})})}))}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map((function(t,r){var n=Array.isArray(e.align)?e.align.length>1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var G;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var Y=t.color.length;G=c.mallocUint8(Y);for(var W=(t.color.subarray||t.color.slice).bind(t.color),q=0;q<Y;q+=4)G.set(l(W(q,q+4),"uint8"),q)}else{var X=t.color.length;G=c.mallocUint8(4*X);for(var Z=0;Z<X;Z++)G.set(l(t.color[Z]||0,"uint8"),4*Z)}this.color=G}else this.color=l(t.color,"uint8");if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(J);for(var K=0;K<this.batch.length;K++)this.batch[K]={count:this.counts.length>1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={},t.exports=A},55212:function(t,e,r){"use strict";var n=r(55616);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function o(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=a(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},48824: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("")}},2304:function(t,e,r){"use strict";var n=r(53664)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},52264:function(t,e,r){"use strict";var n,i=r(24200);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},89184:function(t,e,r){"use strict";var n=r(24200);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}()},39640:function(t,e,r){"use strict";var n=r(53664)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},69572:function(t){"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},71080:function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(89320);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},89320:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},46672:function(t,e,r){"use strict";var n=r(89320);t.exports=function(){return n()&&!!Symbol.toStringTag}},92064:function(t,e,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,a=r(8844);t.exports=a.call(n,i)},35984: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}},6768:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},91148:function(t,e,r){"use strict";var n=r(46672)(),i=r(99676)("Object.prototype.toString"),a=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},o=function(t){return!!a(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,t.exports=s?a:o},24200:function(t){t.exports=!0},90720:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,e)}catch(t){t!==r&&(i=null)}else i=null;var a=/^\s*class\b/,o=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},s=function(t){try{return!o(t)&&(n.call(t),!0)}catch(t){return!1}},l=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(f=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!o(t)&&s(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(o(t))return!1;var e=l.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&s(t)}},84420:function(t,e,r){"use strict";var n,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=r(46672)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(o.test(a.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},96604:function(t){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(t){"use strict";t.exports=function(t){return t!=t}},1560:function(t,e,r){"use strict";var n=r(57916),i=r(81288),a=r(85992),o=r(57740),s=r(59736),l=n(o(),Number);i(l,{getPolyfill:o,implementation:a,shim:s}),t.exports=l},57740:function(t,e,r){"use strict";var n=r(85992);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},59736:function(t,e,r){"use strict";var n=r(81288),i=r(57740);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},18400:function(t){"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},58908:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},94576: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}},53520:function(t){"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},7728:function(t,e,r){"use strict";var n=r(46492),i=r(63436),a=r(99676),o=a("Object.prototype.toString"),s=r(46672)(),l=r(2304),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},h=a("String.prototype.slice"),d={},p=Object.getPrototypeOf;s&&l&&p&&n(c,(function(t){var e=new u[t];if(Symbol.toStringTag in e){var r=p(e),n=l(r,Symbol.toStringTag);if(!n){var i=p(r);n=l(i,Symbol.toStringTag)}d[t]=n.get}})),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!s||!(Symbol.toStringTag in t)){var e=h(o(t),8,-1);return f(c,e)>-1}return!!l&&function(t){var e=!1;return n(d,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},76244:function(t){"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},62644: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 y={element:t};return Object.defineProperties(y,{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}}),y};var n=r(93784)},29128: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}},93784: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}},97264:function(t,e,r){"use strict";var n=r(23464);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}},88324: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)},48816:function(t){var e=Math.PI,r=s(120);function n(t,e,r,n){return["C",t,e,r,n,r,n]}function i(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function a(t,n,i,s,l,u,c,f,h,d){if(d)A=d[0],M=d[1],_=d[2],w=d[3];else{var p=o(t,n,-l);t=p.x,n=p.y;var v=(t-(f=(p=o(f,h,-l)).x))/2,g=(n-(h=p.y))/2,y=v*v/(i*i)+g*g/(s*s);y>1&&(i*=y=Math.sqrt(y),s*=y);var m=i*i,x=s*s,b=(u==c?-1:1)*Math.sqrt(Math.abs((m*x-m*g*g-x*v*v)/(m*g*g+x*v*v)));b==1/0&&(b=1);var _=b*i*g/s+(t+f)/2,w=b*-s*v/i+(n+h)/2,A=Math.asin(((n-w)/s).toFixed(9)),M=Math.asin(((h-w)/s).toFixed(9));(A=t<_?e-A:A)<0&&(A=2*e+A),(M=f<_?e-M:M)<0&&(M=2*e+M),c&&A>M&&(A-=2*e),!c&&M>A&&(M-=2*e)}if(Math.abs(M-A)>r){var T=M,k=f,S=h;M=A+r*(c&&M>A?1:-1);var E=a(f=_+i*Math.cos(M),h=w+s*Math.sin(M),i,s,l,0,c,k,S,[M,T,_,w])}var O=Math.tan((M-A)/4),C=4/3*i*O,L=4/3*s*O,R=[2*t-(t+C*Math.sin(A)),2*n-(n-L*Math.cos(A)),f+C*Math.sin(M),h-L*Math.cos(M),f,h];if(d)return R;E&&(R=R.concat(E));for(var D=0;D<R.length;){var I=o(R[D],R[D+1],l);R[D++]=I.x,R[D++]=I.y}return R}function o(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function s(t){return t*(e/180)}t.exports=function(t){for(var e,r=[],o=0,l=0,u=0,c=0,f=null,h=null,d=0,p=0,v=0,g=t.length;v<g;v++){var y=t[v],m=y[0];switch(m){case"M":u=y[1],c=y[2];break;case"A":(y=a(d,p,y[1],y[2],s(y[3]),y[4],y[5],y[6],y[7])).unshift("C"),y.length>7&&(r.push(y.splice(0,7)),y.unshift("C"));break;case"S":var x=d,b=p;"C"!=e&&"S"!=e||(x+=x-o,b+=b-l),y=["C",x,b,y[1],y[2],y[3],y[4]];break;case"T":"Q"==e||"T"==e?(f=2*d-f,h=2*p-h):(f=d,h=p),y=i(d,p,f,h,y[1],y[2]);break;case"Q":f=y[1],h=y[2],y=i(d,p,y[1],y[2],y[3],y[4]);break;case"L":y=n(d,p,y[1],y[2]);break;case"H":y=n(d,p,y[1],p);break;case"V":y=n(d,p,d,y[1]);break;case"Z":y=n(d,p,u,c)}e=m,d=y[y.length-2],p=y[y.length-1],y.length>4?(o=y[y.length-4],l=y[y.length-3]):(o=d,l=p),r.push(y)}return r}},50896: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}},76835:function(t){"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},39896:function(t,e,r){"use strict";var n=r(81288),i=r(57916),a=r(76835),o=r(66148),s=r(16408),l=i(o(),Object);n(l,{getPolyfill:o,implementation:a,shim:s}),t.exports=l},66148:function(t,e,r){"use strict";var n=r(76835);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},16408:function(t,e,r){"use strict";var n=r(66148),i=r(81288);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},32764:function(t,e,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=r(97344),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===a.call(t),n=o(t),s=e&&"[object String]"===a.call(t),h=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=u&&r;if(s&&t.length>0&&!i.call(t,0))for(var v=0;v<t.length;++v)h.push(String(v));if(n&&t.length>0)for(var g=0;g<t.length;++g)h.push(String(g));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||h.push(String(y));if(l)for(var m=function(t){if("undefined"==typeof window||!d)return f(t);try{return f(t)}catch(t){return!1}}(t),x=0;x<c.length;++x)m&&"constructor"===c[x]||!i.call(t,c[x])||h.push(c[x]);return h}}t.exports=n},41820:function(t,e,r){"use strict";var n=Array.prototype.slice,i=r(97344),a=Object.keys,o=a?function(t){return a(t)}:r(32764),s=Object.keys;o.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)})}else Object.keys=o;return Object.keys||o},t.exports=o},97344:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},32868:function(t){"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},51160:function(t,e,r){"use strict";var n=r(55616);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},21984: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},65819: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}},41984:function(t,e,r){var n=r(4168);(function(){var e,r,i,a,o,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=n&&n.hrtime?(t.exports=function(){return(e()-o)/1e6},r=n.hrtime,a=(e=function(){var t;return 1e9*(t=r())[0]+t[1]})(),s=1e9*n.uptime(),o=a-s):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)},55616:function(t){"use strict";t.exports=function(t,e,n){var i,a,o={};if("string"==typeof e&&(e=r(e)),Array.isArray(e)){var s={};for(a=0;a<e.length;a++)s[e[a]]=!0;e=s}for(i in e)e[i]=r(e[i]);var l={};for(i in e){var u=e[i];if(Array.isArray(u))for(a=0;a<u.length;a++){var c=u[a];if(n&&(l[c]=!0),c in t){if(o[i]=t[c],n)for(var f=a;f<u.length;f++)l[u[f]]=!0;break}}else i in t&&(e[i]&&(o[i]=t[i]),n&&(l[i]=!0))}if(n)for(i in t)l[i]||(o[i]=t[i]);return o};var e={};function r(t){return e[t]?e[t]:("string"==typeof t&&(t=e[t]=t.split(/\s*,\s*|\s+/)),t)}},61456: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}},14756:function(t,e,r){var n,i=r(7688),a=r(28648),o=r(72200),s=r(11403),l=r(82368),u=r(17792),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},7688: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")}}}},28648: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}},17792: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},72200:function(t,e,r){var n=r(48088);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 y,m,x=g();if(x)t?(m=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?(m=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=m?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(y=v?h.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:y,below:y}),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)}}}},48088: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}}},11403: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(M(c,!0,!0))break}else if(e.pointsSame(f,o)){if(M(c,!0,!1))break}else if(e.pointsSame(h,a)){if(M(c,!1,!0))break}else if(e.pointsSame(h,o)&&M(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],y=v?g[0]:g[g.length-1],m=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(m,y,p)&&(v?(r&&r.chainRemoveHead(s.index,p),g.shift()):(r&&r.chainRemoveTail(s.index,p),g.pop()),y=m),e.pointsSame(x,p)?(n.splice(d,1),e.pointsCollinear(b,x,y)&&(v?(r&&r.chainRemoveTail(s.index,y),g.pop()):(r&&r.chainRemoveHead(s.index,y),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 A=n[_].length<n[w].length;s.matches_head?l.matches_head?A?(T(_),k(_,w)):(T(w),k(w,_)):k(w,_):l.matches_head?k(_,w):A?(T(_),k(w,_)):(T(w),k(_,w))}function M(t,e,r){return u.index=t,u.matches_head=e,u.matches_pt1=r,u===s?(u=l,!1):(u=null,!0)}function T(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}},82368: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}},3951:function(t,e,r){for(var n=r(41984),i="undefined"==typeof window?r.g:window,a=["moz","webkit"],o="AnimationFrame",s=i["request"+o],l=i["cancel"+o]||i["cancelRequest"+o],u=0;!s&&u<a.length;u++)s=i[a[u]+"Request"+o],l=i[a[u]+"Cancel"+o]||i[a[u]+"CancelRequest"+o];if(!s||!l){var c=0,f=0,h=[];s=function(t){if(0===h.length){var e=n(),r=Math.max(0,16.666666666666668-(e-c));c=r+e,setTimeout((function(){var t=h.slice(0);h.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return h.push({handle:++f,callback:t,cancelled:!1}),f},l=function(t){for(var e=0;e<h.length;e++)h[e].handle===t&&(h[e].cancelled=!0)}}t.exports=function(t){return s.call(i,t)},t.exports.cancel=function(){l.apply(i,arguments)},t.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=s,t.cancelAnimationFrame=l}},24544:function(t,e,r){"use strict";var n=r(76752),i=r(72160),a=r(45223),o=r(55616),s=r(50896),l=r(47520),u=r(37816),c=u.float32,f=u.fract32;t.exports=function(t,e){if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,u,d,p,v,g,y=t._gl,m={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return p=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),u=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),d=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"static",type:"float",data:h}),A(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:p,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:u,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:d,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:v,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:h.length}),s(b,{update:A,draw:_,destroy:M,regl:t,gl:y,canvas:y.canvas,groups:x}),b;function b(t){t?A(t):null===t&&M(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)}))}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function A(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map((function(t,u){var c=x[u];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),c||(x[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},m,t)),a(c,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a<r;a++)t[a]=n}if(t.length<r)throw Error("Not enough colors");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=i(t[s],"uint8");o.set(l,4*s)}return o},range:function(t,e,r){var n=e.bounds;return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=f(e.scale),e.translateFract=f(e.translate),t},viewport:function(t){var e;return Array.isArray(t)?e={x:t[0],y:t[1],width:t[2]-t[0],height:t[3]-t[1]}:t?(e={x:t.x||t.left||0,y:t.y||t.top||0},t.right?e.width=t.right-e.x:e.width=t.w||t.width||0,t.bottom?e.height=t.bottom-e.y:e.height=t.h||t.height||0):e={x:0,y:0,width:y.drawingBufferWidth,height:y.drawingBufferHeight},e}}]),c):c})),e||r){var h=x.reduce((function(t,e,r){return t+(e?e.count:0)}),0),g=new Float64Array(2*h),_=new Uint8Array(4*h),w=new Float32Array(4*h);x.forEach((function(t,e){if(t){var r=t.positions,n=t.count,i=t.offset,a=t.color,o=t.errors;n&&(_.set(a,4*i),w.set(o,4*i),g.set(r,2*i))}}));var A=c(g);u(A);var M=f(g,A);d(M),p(_),v(w)}}}function M(){u.destroy(),d.destroy(),p.destroy(),v.destroy(),g.destroy()}};var h=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},13472:function(t,e,r){"use strict";var n=r(72160),i=r(76752),a=r(50896),o=r(55616),s=r(47520),l=r(28912),u=r(71152),c=r(37816),f=c.float32,h=c.fract32,d=r(60463),p=r(51160),v=r(10272);function g(t,e){if(!(this instanceof g))return new g(t,e);if("function"==typeof t?(e||(e={}),e.regl=t):e=t,e.length&&(e.positions=e),!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=t._gl,this.regl=t,this.passes=[],this.shaders=g.shaders.has(t)?g.shaders.get(t):g.shaders.set(t,g.createShaders(t)).get(t),this.update(e)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new d,g.createShaders=function(t){var e,r=t.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:t.prop("count"),count:4,offset:0,uniforms:{miterMode:function(t,e){return"round"===e.join?2:1},miterLimit:t.prop("miterLimit"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),thickness:t.prop("thickness"),dashTexture:t.prop("dashTexture"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),dashLength:t.prop("dashLength"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]},depth:t.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(t,e){return!e.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport")},i=t(a({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{e=t(a({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,c=this.gl;if(t.forEach((function(t,d){var y=e.passes[d];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=o(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),y||(e.passes[d]=y={id:d,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=a({},g.defaults,t)),null!=t.thickness&&(y.thickness=parseFloat(t.thickness)),null!=t.opacity&&(y.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(y.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(y.overlay=!!t.overlay,d<g.maxLines&&(y.depth=2*(g.maxLines-1-d%g.maxLines)/g.maxLines-1)),null!=t.join&&(y.join=t.join),null!=t.hole&&(y.hole=t.hole),null!=t.fill&&(y.fill=t.fill?n(t.fill,"uint8"):null),null!=t.viewport&&(y.viewport=p(t.viewport)),y.viewport||(y.viewport=p([c.drawingBufferWidth,c.drawingBufferHeight])),null!=t.close&&(y.close=t.close),null===t.positions&&(t.positions=[]),t.positions){var m,x;if(t.positions.x&&t.positions.y){var b=t.positions.x,_=t.positions.y;x=y.count=Math.max(b.length,_.length),m=new Float64Array(2*x);for(var w=0;w<x;w++)m[2*w]=b[w],m[2*w+1]=_[w]}else m=s(t.positions,"float64"),x=y.count=Math.floor(m.length/2);var A=y.bounds=i(m,2);if(y.fill){for(var M=[],T={},k=0,S=0,E=0,O=y.count;S<O;S++){var C=m[2*S],L=m[2*S+1];isNaN(C)||isNaN(L)||null==C||null==L?(C=m[2*k],L=m[2*k+1],T[S]=k):k=S,M[E++]=C,M[E++]=L}if(t.splitNull){y.count-1 in T||(T[y.count]=y.count-1);var R=Object.keys(T).map(Number).sort((function(t,e){return t-e})),D=[],I=0,P=null!=y.hole?y.hole[0]:null;if(null!=P){var F=v(R,(function(t){return t>=P}));(R=R.slice(0,F)).push(P)}for(var N=function(t){var e=M.slice(2*I,2*R[t]).concat(P?M.slice(2*P):[]),r=(y.hole||[]).map((function(e){return e-P+(R[t]-I)})),n=l(e,r);n=n.map((function(e){return e+I+(e+I<R[t]?0:P-R[t])})),D.push.apply(D,n),I=R[t]+1},B=0;B<R.length;B++)N(B);for(var z=0,j=D.length;z<j;z++)null!=T[D[z]]&&(D[z]=T[D[z]]);y.triangles=D}else{for(var U=l(M,y.hole||[]),H=0,V=U.length;H<V;H++)null!=T[U[H]]&&(U[H]=T[U[H]]);y.triangles=U}}var G=new Float64Array(m);u(G,2,A);var Y=new Float64Array(2*x+6);y.close?m[0]===m[2*x-2]&&m[1]===m[2*x-1]?(Y[0]=G[2*x-4],Y[1]=G[2*x-3]):(Y[0]=G[2*x-2],Y[1]=G[2*x-1]):(Y[0]=G[0],Y[1]=G[1]),Y.set(G,2),y.close?m[0]===m[2*x-2]&&m[1]===m[2*x-1]?(Y[2*x+2]=G[2],Y[2*x+3]=G[3],y.count-=1):(Y[2*x+2]=G[0],Y[2*x+3]=G[1],Y[2*x+4]=G[2],Y[2*x+5]=G[3]):(Y[2*x+2]=G[2*x-2],Y[2*x+3]=G[2*x-1],Y[2*x+4]=G[2*x-2],Y[2*x+5]=G[2*x-1]);var W=f(Y);y.positionBuffer(W);var q=h(Y,W);y.positionFractBuffer(q)}if(t.range?y.range=t.range:y.range||(y.range=y.bounds),(t.range||t.positions)&&y.count){var X=y.bounds,Z=X[2]-X[0],J=X[3]-X[1],K=y.range[2]-y.range[0],Q=y.range[3]-y.range[1];y.scale=[Z/K,J/Q],y.translate=[-y.range[0]/K+X[0]/K||0,-y.range[1]/Q+X[1]/Q||0],y.scaleFract=h(y.scale),y.translateFract=h(y.translate)}if(t.dashes){var $,tt=0;if(!t.dashes||t.dashes.length<2)tt=1,$=new Uint8Array([255,255,255,255,255,255,255,255]);else{tt=0;for(var et=0;et<t.dashes.length;++et)tt+=t.dashes[et];$=new Uint8Array(tt*g.dashMult);for(var rt=0,nt=255,it=0;it<2;it++)for(var at=0;at<t.dashes.length;++at){for(var ot=0,st=t.dashes[at]*g.dashMult*.5;ot<st;++ot)$[rt++]=nt;nt^=255}}y.dashLength=tt,y.dashTexture({channels:1,data:$,width:$.length,height:1,mag:"linear",min:"linear"},0,0)}if(t.color){var lt=y.count,ut=t.color;ut||(ut="transparent");var ct=new Uint8Array(4*lt+4);if(Array.isArray(ut)&&"number"!=typeof ut[0]){for(var ft=0;ft<lt;ft++){var ht=n(ut[ft],"uint8");ct.set(ht,4*ft)}ct.set(n(ut[0],"uint8"),4*lt)}else for(var dt=n(ut,"uint8"),pt=0;pt<lt+1;pt++)ct.set(dt,4*pt);y.colorBuffer({usage:"dynamic",type:"uint8",data:ct})}}else e.passes[d]=null})),t.length<this.passes.length){for(var d=t.length;d<this.passes.length;d++){var y=this.passes[d];y&&(y.colorBuffer.destroy(),y.positionBuffer.destroy(),y.dashTexture.destroy())}this.passes.length=t.length}for(var m=[],x=0;x<this.passes.length;x++)null!==this.passes[x]&&m.push(this.passes[x]);return this.passes=m,this}},g.prototype.destroy=function(){return this.passes.forEach((function(t){t.colorBuffer.destroy(),t.positionBuffer.destroy(),t.dashTexture.destroy()})),this.passes.length=0,this}},38540:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var o=r(72160),s=r(76752),l=r(3808),u=r(3108),c=r(50896),f=r(48824),h=r(55616),d=r(45223),p=r(47520),v=r(96604),g=r(37816),y=r(51160),m=x;function x(t,e){var r=this;if(!(this instanceof x))return new x(t,e);"function"==typeof t?(e||(e={}),e.regl=t):(e=t,t=null),e&&e.length&&(e.positions=e);var n,i=(t=e.regl)._gl,a=[];this.tooManyColors=v,n=t.texture({data:new Uint8Array(1020),width:255,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),c(this,{regl:t,gl:i,groups:[],markerCache:[null],markerTextures:[null],palette:a,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:i.canvas}),this.update(e);var o={uniforms:{constPointSize:!!e.constPointSize,opacity:t.prop("opacity"),paletteSize:function(t,e){return[r.tooManyColors?0:255,n.height]},pixelRatio:t.context("pixelRatio"),scale:t.prop("scale"),scaleFract:t.prop("scaleFract"),translate:t.prop("translate"),translateFract:t.prop("translateFract"),markerTexture:t.prop("markerTexture"),paletteTexture:n},attributes:{x:function(t,e){return e.xAttr||{buffer:e.positionBuffer,stride:8,offset:0}},y:function(t,e){return e.yAttr||{buffer:e.positionBuffer,stride:8,offset:4}},xFract:function(t,e){return e.xAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:0}},yFract:function(t,e){return e.yAttr?{constant:[0,0]}:{buffer:e.positionFractBuffer,stride:8,offset:4}},size:function(t,e){return e.size.length?{buffer:e.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*e.size/r.maxSize)]}},borderSize:function(t,e){return e.borderSize.length?{buffer:e.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*e.borderSize/r.maxSize)]}},colorId:function(t,e){return e.color.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?a.slice(4*e.color,4*e.color+4):[e.color]}},borderColorId:function(t,e){return e.borderColor.length?{buffer:e.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?a.slice(4*e.borderColor,4*e.borderColor+4):[e.borderColor]}},isActive:function(t,e){return!0===e.activation?{constant:[1]}:e.activation?e.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:t.prop("elements"),count:t.prop("count"),offset:t.prop("offset"),primitive:"points"},s=c({},o);s.frag=f(["precision highp float;\n#define GLSLIFY 1\n\nuniform float opacity;\nuniform sampler2D markerTexture;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\n\nfloat smoothStep(float x, float y) {\n return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;\n\n // max-distance alpha\n if (dist < 0.003) discard;\n\n // null-border case\n if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n }\n else {\n float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n\n vec4 color = fragBorderColor;\n color.a *= borderColorAmt;\n color = mix(color, fragColor, colorAmt);\n color.a *= opacity;\n\n gl_FragColor = color;\n }\n\n}\n"]),s.vert=f(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\nconst float borderLevel = .5;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = 2. * size * pointSizeScale;\n fragPointSize = size * pixelRatio;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragColor = color;\n fragBorderColor = borderColor;\n fragWidth = 1. / gl_PointSize;\n\n fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n}\n"]),this.drawMarker=t(s);var l=c({},o);l.frag=f(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nuniform float opacity;\n\nfloat smoothStep(float edge0, float edge1, float x) {\n\tfloat t;\n\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n\treturn t * t * (3.0 - 2.0 * t);\n}\n\nvoid main() {\n\tfloat radius, alpha = 1.0, delta = fragWidth;\n\n\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n\n\tif (radius > 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=f(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),v&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}x.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},x.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},x.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=this.groups;if(1===r.length&&Array.isArray(r[0])&&(null===r[0][0]||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var a=0;a<r.length;a++)this.drawItem(a,r[a]);else i.forEach((function(e,r){t.drawItem(r)}));return this},x.prototype.drawItem=function(t,e){var r,n=this.groups,o=n[t];if("number"==typeof e&&(t=e,o=n[e],e=null),o&&o.count&&o.opacity){o.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,o,e));for(var s=[],l=1;l<o.activation.length;l++)o.activation[l]&&(!0===o.activation[l]||o.activation[l].data.length)&&s.push.apply(s,function(t){if(Array.isArray(t))return a(t)}(r=this.getMarkerDrawOptions(l,o,e))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||i(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());s.length&&this.drawMarker(s)}},x.prototype.getMarkerDrawOptions=function(t,e,r){var i=e.range,a=e.tree,o=e.viewport,s=e.activation,l=e.selectionBuffer,u=e.count;if(this.regl,!a)return r?[c({},e,{markerTexture:this.markerTextures[t],activation:s[t],count:r.length,elements:r,offset:0})]:[c({},e,{markerTexture:this.markerTextures[t],activation:s[t],offset:0})];var f=[],h=a.range(i,{lod:!0,px:[(i[2]-i[0])/o.width,(i[3]-i[1])/o.height]});if(r){for(var d=s[t].data,p=new Uint8Array(u),v=0;v<r.length;v++){var g=r[v];p[g]=d?d[g]:1}l.subdata(p)}for(var y=h.length;y--;){var m=n(h[y],2),x=m[0],b=m[1];f.push(c({},e,{markerTexture:this.markerTextures[t],activation:r?l:s[t],offset:x,count:b-x}))}return f},x.prototype.update=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(r.length){1===r.length&&Array.isArray(r[0])&&(r=r[0]);var i=this.groups,a=this.gl,o=this.regl,l=this.maxSize,f=this.maxColors,v=this.palette;this.groups=i=r.map((function(e,r){var n=i[r];if(void 0===e)return n;null===e?e={positions:null}:"function"==typeof e?e={ondraw:e}:"number"==typeof e[0]&&(e={positions:e}),null===(e=h(e,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(e.positions=[]),null!=e.tooManyColors&&(t.tooManyColors=e.tooManyColors),n||(i[r]=n={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:o.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:o.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},e=c({},x.defaults,e)),e.positions&&!("marker"in e)&&(e.marker=n.marker,delete n.marker),e.marker&&!("positions"in e)&&(e.positions=n.positions,delete n.positions);var m=0,b=0;if(d(n,e,[{snap:!0,size:function(t,e){return null==t&&(t=x.defaults.size),m+=t&&t.length?1:0,t},borderSize:function(t,e){return null==t&&(t=x.defaults.borderSize),m+=t&&t.length?1:0,t},opacity:parseFloat,color:function(e,r){return null==e&&(e=x.defaults.color),e=t.updateColor(e),b++,e},borderColor:function(e,r){return null==e&&(e=x.defaults.borderColor),e=t.updateColor(e),b++,e},bounds:function(t,e,r){return"range"in r||(r.range=null),t},positions:function(t,e,r){var n=e.snap,i=e.positionBuffer,a=e.positionFractBuffer,l=e.selectionBuffer;if(t.x||t.y)return t.x.length?e.xAttr={buffer:o.buffer(t.x),offset:0,stride:4,count:t.x.length}:e.xAttr={buffer:t.x.buffer,offset:4*t.x.offset||0,stride:4*(t.x.stride||1),count:t.x.count},t.y.length?e.yAttr={buffer:o.buffer(t.y),offset:0,stride:4,count:t.y.length}:e.yAttr={buffer:t.y.buffer,offset:4*t.y.offset||0,stride:4*(t.y.stride||1),count:t.y.count},e.count=Math.max(e.xAttr.count,e.yAttr.count),t;t=p(t,"float64");var c=e.count=Math.floor(t.length/2),f=e.bounds=c?s(t,2):null;if(r.range||e.range||(delete e.range,r.range=f),r.marker||e.marker||(delete e.marker,r.marker=null),n&&(!0===n||c>n)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=o.elements(h)}var d=g.float32(t);return i({data:d,usage:"dynamic"}),a({data:g.fract32(t,d),usage:"dynamic"}),l({data:new Uint8Array(c),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],s=0,l=Math.min(e.length,r.count);s<l;s++){var u=t.addMarker(e[s]);a[u]||(a[u]=new Uint8Array(r.count)),a[u][s]=1}for(var c=0;c<a.length;c++)if(a[c]){var f={data:a[c],type:"uint8",usage:"static"};i[c]?i[c](f):i[c]=o.buffer(f),i[c].data=a[c]}}else i[t.addMarker(e)]=!0;return e},range:function(t,e,r){var n=e.bounds;if(n)return t||(t=n),e.scale=[1/(t[2]-t[0]),1/(t[3]-t[1])],e.translate=[-t[0],-t[1]],e.scaleFract=g.fract(e.scale),e.translateFract=g.fract(e.translate),t},viewport:function(t){return y(t||[a.drawingBufferWidth,a.drawingBufferHeight])}}]),m){var _=n,w=_.count,A=_.size,M=_.borderSize,T=_.sizeBuffer,k=new Uint8Array(2*w);if(A.length||M.length)for(var S=0;S<w;S++)k[2*S]=Math.round(255*(null==A[S]?A:A[S])/l),k[2*S+1]=Math.round(255*(null==M[S]?M:M[S])/l);T({data:k,usage:"dynamic"})}if(b){var E,O=n,C=O.count,L=O.color,R=O.borderColor,D=O.colorBuffer;if(t.tooManyColors){if(L.length||R.length){E=new Uint8Array(8*C);for(var I=0;I<C;I++){var P=L[I];E[8*I]=v[4*P],E[8*I+1]=v[4*P+1],E[8*I+2]=v[4*P+2],E[8*I+3]=v[4*P+3];var F=R[I];E[8*I+4]=v[4*F],E[8*I+5]=v[4*F+1],E[8*I+6]=v[4*F+2],E[8*I+7]=v[4*F+3]}}}else if(L.length||R.length){E=new Uint8Array(4*C+2);for(var N=0;N<C;N++)null!=L[N]&&(E[4*N]=L[N]%f,E[4*N+1]=Math.floor(L[N]/f)),null!=R[N]&&(E[4*N+2]=R[N]%f,E[4*N+3]=Math.floor(R[N]/f))}D({data:E||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return n}))}},x.prototype.addMarker=function(t){var e,r=this.markerTextures,n=this.regl,i=this.markerCache,a=null==t?0:i.indexOf(t);if(a>=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o<s;o++)e[o]=255*t[o]}var l=Math.floor(Math.sqrt(e.length));return a=r.length,i.push(t),r.push(n.texture({channels:1,data:e,radius:l,mag:"linear",min:"linear"})),a},x.prototype.updateColor=function(t){var e=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(t)||(t=[t]);var i=[];if("number"==typeof t[0]){var a=[];if(Array.isArray(t))for(var s=0;s<t.length;s+=4)a.push(t.slice(s,s+4));else for(var u=0;u<t.length;u+=4)a.push(t.subarray(u,u+4));t=a}for(var c=0;c<t.length;c++){var f=t[c];f=o(f,"uint8");var h=l(f,!1);if(null==e[h]){var d=r.length;e[h]=Math.floor(d/4),r[d]=f[0],r[d+1]=f[1],r[d+2]=f[2],r[d+3]=f[3]}i[c]=e[h]}return!this.tooManyColors&&r.length>4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},x.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i<n*e;i++)t.push(0,0,0,0);r.height<n&&r.resize(e,n),r.subimage({width:Math.min(.25*t.length,e),height:n,data:t},0,0)}},x.prototype.destroy=function(){return this.groups.forEach((function(t){t.sizeBuffer.destroy(),t.positionBuffer.destroy(),t.positionFractBuffer.destroy(),t.colorBuffer.destroy(),t.activation.forEach((function(t){return t&&t.destroy&&t.destroy()})),t.selectionBuffer.destroy(),t.elements&&t.elements.destroy()})),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach((function(t){return t&&t.destroy&&t.destroy()})),this};var b=r(50896);t.exports=function(t,e){var r=new m(t,e),n=r.render.bind(r);return b(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n}},78176:function(t,e,r){"use strict";var n=r(38540),i=r(55616),a=r(76752),o=r(3951),s=r(67752),l=r(51160),u=r(47520);function c(t,e){if(!(this instanceof c))return new c(t,e);this.traces=[],this.passes={},this.regl=t,this.scatter=n(t),this.canvas=this.scatter.canvas}function f(t,e,r){return(null!=t.id?t.id:t)<<16|(255&e)<<8|255&r}function h(t,e,r){var n,i,a,o,s=t[e],l=t[r];return s.length>2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y,l.height),[a,n,o,i]}function d(t){if("number"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}t.exports=c,c.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},c.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;n<e.length;n++)this.updateItem(n,e[n]);this.traces=this.traces.filter(Boolean);for(var i=[],a=0,o=0;o<this.traces.length;o++){for(var s=this.traces[o],l=this.traces[o].passes,u=0;u<l.length;u++)i.push(this.passes[l[u]]);s.passOffset=a,a+=s.passes.length}return(t=this.scatter).update.apply(t,i),this}},c.prototype.updateItem=function(t,e){var r=this.regl;if(null===e)return this.traces[t]=null,this;if(!e)return this;var n,o=i(e,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),s=this.traces[t]||(this.traces[t]={id:t,buffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&&(s.color=o.color),null!=o.size&&(s.size=o.size),null!=o.marker&&(s.marker=o.marker),null!=o.borderColor&&(s.borderColor=o.borderColor),null!=o.borderSize&&(s.borderSize=o.borderSize),null!=o.opacity&&(s.opacity=o.opacity),o.viewport&&(s.viewport=l(o.viewport)),null!=o.diagonal&&(s.diagonal=o.diagonal),null!=o.upper&&(s.upper=o.upper),null!=o.lower&&(s.lower=o.lower),o.data){s.buffer(u(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var c=0;c<s.columns;c++)s.bounds[c]=a(o.data[c],1)}o.range&&(s.range=o.range,n=s.range&&"number"!=typeof s.range[0]),o.domain&&(s.domain=o.domain);var p=!1;null!=o.padding&&(Array.isArray(o.padding)&&o.padding.length===s.columns&&"number"==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(d),p=!0):s.padding=d(o.padding));var v=s.columns,g=s.count,y=s.viewport.width,m=s.viewport.height,x=s.viewport.x,b=s.viewport.y,_=y/v,w=m/v;s.passes=[];for(var A=0;A<v;A++)for(var M=0;M<v;M++)if((s.diagonal||M!==A)&&(s.upper||!(A>M))&&(s.lower||!(A<M))){var T=f(s.id,A,M),k=this.passes[T]||(this.passes[T]={});if(o.data&&(o.transpose?k.positions={x:{buffer:s.buffer,offset:M,count:g,stride:v},y:{buffer:s.buffer,offset:A,count:g,stride:v}}:k.positions={x:{buffer:s.buffer,offset:M*g,count:g},y:{buffer:s.buffer,offset:A*g,count:g}},k.bounds=h(s.bounds,A,M)),o.domain||o.viewport||o.data){var S=p?h(s.padding,A,M):s.padding;if(s.domain){var E=h(s.domain,A,M),O=E[0],C=E[1],L=E[2],R=E[3];k.viewport=[x+O*y+S[0],b+C*m+S[1],x+L*y-S[2],b+R*m-S[3]]}else k.viewport=[x+M*_+_*S[0],b+A*w+w*S[1],x+(M+1)*_-_*S[2],b+(A+1)*w-w*S[3]]}o.color&&(k.color=s.color),o.size&&(k.size=s.size),o.marker&&(k.marker=s.marker),o.borderSize&&(k.borderSize=s.borderSize),o.borderColor&&(k.borderColor=s.borderColor),o.opacity&&(k.opacity=s.opacity),o.range&&(k.range=n?h(s.range,A,M):s.range||k.bounds),s.passes.push(T)}return this},c.prototype.draw=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=[],i=0;i<e.length;i++)if("number"==typeof e[i]){var a=this.traces[e[i]],o=a.passes,l=a.passOffset;n.push.apply(n,s(l,l+o.length))}else if(e[i].length){var u=e[i],c=this.traces[i],f=c.passes,h=c.passOffset;f=f.map((function(t,e){n[h+e]=u}))}(t=this.scatter).draw.apply(t,n)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach((function(t){t.buffer&&t.buffer.destroy&&t.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}},28624:function(t){t.exports=function(){function t(t,e){this.id=W++,this.type=t,this.data=e}function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(1<t.length&&r===n&&('"'===r||"'"===r))return['"'+t.substr(1,t.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(r=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t))return e(t.substr(0,r.index)).concat(e(r[1])).concat(e(t.substr(r.index+r[0].length)));if(1===(r=t.split(".")).length)return['"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(t=[],n=0;n<r.length;++n)t=t.concat(e(r[n]));return t}function r(t){return"["+e(t).join("][")+"]"}function n(t){return"string"==typeof t?t.split():t}function i(t){return"string"==typeof t?document.querySelector(t):t}function a(t){var e,r,a,o,s=t||{};t={};var l=[],u=[],c="undefined"==typeof window?1:window.devicePixelRatio,f=!1,h={},d=function(t){},p=function(){};if("string"==typeof s?e=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?e=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?a=(o=s).canvas:("gl"in s?o=s.gl:"canvas"in s?a=i(s.canvas):"container"in s&&(r=i(s.container)),"attributes"in s&&(t=s.attributes),"extensions"in s&&(l=n(s.extensions)),"optionalExtensions"in s&&(u=n(s.optionalExtensions)),"onDone"in s&&(d=s.onDone),"profile"in s&&(f=!!s.profile),"pixelRatio"in s&&(c=+s.pixelRatio),"cachedCode"in s&&(h=s.cachedCode))),e&&("canvas"===e.nodeName.toLowerCase()?a=e:r=e),!o){if(!a){if(!(e=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(e=(n=a.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),a.width=r*e,a.height=r*n}var i,a=document.createElement("canvas");return Y(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",Y(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(n)}))).observe(t):window.addEventListener("resize",n,!1),n(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",n),t.removeChild(a)}}}(r||document.body,0,c)))return null;a=e.canvas,p=e.onDestroy}void 0===t.premultipliedAlpha&&(t.premultipliedAlpha=!0),o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(a,t)}return o?{gl:o,canvas:a,container:r,extensions:l,optionalExtensions:u,pixelRatio:c,profile:f,cachedCode:h,onDone:d,onDestroy:p}:(p(),d("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function o(t,e){for(var r=Array(t),n=0;n<t;++n)r[n]=e(n);return r}function s(t){var e,r;return e=(65535<t)<<4,e|=r=(255<(t>>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=o(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function u(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||Q(t.data))}function c(t,e,r,n,i,a){for(var o=0;o<e;++o)for(var s=t[o],l=0;l<r;++l)for(var u=s[l],c=0;c<n;++c)i[a++]=u[c]}function f(t,e,r,n,i){for(var a=1,o=r+1;o<e.length;++o)a*=e[o];var s=e[r];if(4==e.length-r){var l=e[r+1],u=e[r+2];for(e=e[r+3],o=0;o<s;++o)c(t[o],l,u,e,n,i),i+=a}else for(o=0;o<s;++o)f(t[o],e,r+1,n,i),i+=a}function h(t){return 0|et[Object.prototype.toString.call(t)]}function d(t,e){for(var r=0;r<e.length;++r)t[r]=e[r]}function p(t,e,r,n,i,a,o){for(var s=0,l=0;l<r;++l)for(var u=0;u<n;++u)t[s++]=e[i*l+a*u+o]}function v(t,e,r,n){function i(e){this.id=l++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function a(e,r,n){e.byteLength=r.byteLength,t.bufferData(e.type,r,n)}function o(t,e,r,n,i,o){if(t.usage=r,Array.isArray(e)){if(t.dtype=n||5126,0<e.length)if(Array.isArray(e[0])){i=at(e);for(var s=n=1;s<i.length;++s)n*=i[s];t.dimension=n,a(t,e=it(e,i,t.dtype),r),o?t.persistentData=e:J.freeType(e)}else"number"==typeof e[0]?(t.dimension=i,d(i=J.allocType(t.dtype,e.length),e),a(t,i,r),o?t.persistentData=i:J.freeType(i)):Q(e[0])&&(t.dimension=e[0].length,t.dtype=n||h(e[0])||5126,a(t,e=it(e,[e.length,e[0].length],t.dtype),r),o?t.persistentData=e:J.freeType(e))}else if(Q(e))t.dtype=n||h(e),t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(u(e)){i=e.shape;var l=e.stride,c=(s=e.offset,0),f=0,v=0,g=0;1===i.length?(c=i[0],f=1,v=l[0],g=0):2===i.length&&(c=i[0],f=i[1],v=l[0],g=l[1]),t.dtype=n||h(e.data)||5126,t.dimension=f,p(i=J.allocType(t.dtype,c*f),e.data,c,f,v,g,s),a(t,i,r),o?t.persistentData=i:J.freeType(i)}else e instanceof ArrayBuffer&&(t.dtype=5121,t.dimension=i,a(t,e,r),o&&(t.persistentData=new Uint8Array(new Uint8Array(e))))}function s(r){e.bufferCount--,n(r),t.deleteBuffer(r.buffer),r.buffer=null,delete c[r.id]}var l=0,c={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var f=[];return r.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(c).forEach((function(e){t+=c[e].stats.size})),t}),{create:function(n,a,l,f){function v(e){var n=35044,i=null,a=0,s=0,l=1;return Array.isArray(e)||Q(e)||u(e)||e instanceof ArrayBuffer?i=e:"number"==typeof e?a=0|e:e&&("data"in e&&(i=e.data),"usage"in e&&(n=nt[e.usage]),"type"in e&&(s=rt[e.type]),"dimension"in e&&(l=0|e.dimension),"length"in e&&(a=0|e.length)),g.bind(),i?o(g,i,n,s,l,f):(a&&t.bufferData(g.type,a,n),g.dtype=s||5121,g.usage=n,g.dimension=l,g.byteLength=a),r.profile&&(g.stats.size=g.byteLength*ot[g.dtype]),v}e.bufferCount++;var g=new i(a);return c[g.id]=g,l||v(n),v._reglType="buffer",v._buffer=g,v.subdata=function(e,r){var n,i=0|(r||0);if(g.bind(),Q(e)||e instanceof ArrayBuffer)t.bufferSubData(g.type,i,e);else if(Array.isArray(e)){if(0<e.length)if("number"==typeof e[0]){var a=J.allocType(g.dtype,e.length);d(a,e),t.bufferSubData(g.type,i,a),J.freeType(a)}else(Array.isArray(e[0])||Q(e[0]))&&(n=at(e),a=it(e,n,g.dtype),t.bufferSubData(g.type,i,a),J.freeType(a))}else if(u(e)){n=e.shape;var o=e.stride,s=a=0,l=0,c=0;1===n.length?(a=n[0],s=1,l=o[0],c=0):2===n.length&&(a=n[0],s=n[1],l=o[0],c=o[1]),n=Array.isArray(e.data)?g.dtype:h(e.data),p(n=J.allocType(n,a*s),e.data,a,s,l,c,e.offset),t.bufferSubData(g.type,i,n),J.freeType(n)}return v},r.profile&&(v.stats=g.stats),v.destroy=function(){s(g)},v},createStream:function(t,e){var r=f.pop();return r||(r=new i(t)),r.bind(),o(r,e,35040,0,1,!1),r},destroyStream:function(t){f.push(t)},clear:function(){$(c).forEach(s),f.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){$(c).forEach((function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)}))},_initBuffer:o}}function g(t,e,r,n){function i(t){this.id=l++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function a(n,i,a,o,s,l,c){var f;if(n.buffer.bind(),i?((f=c)||Q(i)&&(!u(i)||Q(i.data))||(f=e.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,f,3)):(t.bufferData(34963,l,a),n.buffer.dtype=f||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l),f=c,!c){switch(n.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}n.buffer.dtype=f}n.type=f,0>(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,c={uint8:5121,uint16:5123};e.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||Q(t)||u(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=c[t.type]),"length"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else l(),f.primType=4,f.vertCount=0,f.type=5121;return s}var l=r.create(null,34963,!0),f=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=f,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){$(s).forEach(o)}}}function y(t){for(var e=J.allocType(5123,t.length),r=0;r<t.length;++r)if(isNaN(t[r]))e[r]=65535;else if(1/0===t[r])e[r]=31744;else if(-1/0===t[r])e[r]=64512;else{lt[0]=t[r];var n=(a=ut[0])>>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15<i?n+31744:n+(i+15<<10)+a}return e}function m(t){return Array.isArray(t)||Q(t)}function x(t){return"[object "+t+"]"}function b(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function _(t){return!(!Array.isArray(t)||0===t.length||!m(t[0]))}function w(t){return Object.prototype.toString.call(t)}function A(t){if(!t)return!1;var e=w(t);return 0<=xt.indexOf(e)||b(t)||_(t)||u(t)}function M(t,e){36193===t.type?(t.data=y(e),J.freeType(e)):t.data=e}function T(t,e,r,n,i,a){if(t=void 0!==_t[t]?_t[t]:ht[t]*bt[e],a&&(t*=6),i){for(n=0;1<=r;)n+=t*r*r,r/=2;return n}return t*r*n}function k(t,e,r,n,i,a,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function c(t,e){if("object"==typeof e&&e){"premultiplyAlpha"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),"flipY"in e&&(t.flipY=e.flipY),"alignment"in e&&(t.unpackAlignment=e.alignment),"colorSpace"in e&&(t.colorSpace=H[e.colorSpace]),"type"in e&&(t.type=V[e.type]);var r=t.width,n=t.height,i=t.channels,a=!1;"shape"in e?(r=e.shape[0],n=e.shape[1],3===e.shape.length&&(i=e.shape[2],a=!0)):("radius"in e&&(r=n=e.radius),"width"in e&&(r=e.width),"height"in e&&(n=e.height),"channels"in e&&(i=e.channels,a=!0)),t.width=0|r,t.height=0|n,t.channels=0|i,r=!1,"format"in e&&(r=e.format,n=t.internalformat=G[r],t.format=at[n],r in V&&!("type"in e)&&(t.type=V[r]),r in W&&(t.compressed=!0),r=!0),!a&&r?t.channels=ht[t.format]:a&&!r&&t.channels!==ft[t.format]&&(t.format=t.internalformat=ft[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function d(t,e){var r=null;if(A(e)?r=e:e&&(c(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),A(e.data)&&(r=e.data)),e.copy){var n=i.viewportWidth,a=i.viewportHeight;t.width=t.width||n-t.xOffset,t.height=t.height||a-t.yOffset,t.needsCopy=!0}else if(r){if(Q(r))t.channels=t.channels||4,t.data=r,"type"in e||5121!==t.type||(t.type=0|et[Object.prototype.toString.call(r)]);else if(b(r)){switch(t.channels=t.channels||4,a=(n=r).length,t.type){case 5121:case 5123:case 5125:case 5126:(a=J.allocType(t.type,a)).set(n),t.data=a;break;case 36193:t.data=y(n)}t.alignment=1,t.needsFree=!0}else if(u(r)){n=r.data,Array.isArray(n)||5121!==t.type||(t.type=0|et[Object.prototype.toString.call(n)]),a=r.shape;var o,s,l,f,h=r.stride;3===a.length?(l=a[2],f=h[2]):f=l=1,o=a[0],s=a[1],a=h[0],h=h[1],t.alignment=1,t.width=o,t.height=s,t.channels=l,t.format=t.internalformat=ft[l],t.needsFree=!0,o=f,r=r.offset,l=t.width,f=t.height,s=t.channels;for(var d=J.allocType(36193===t.type?5126:t.type,l*f*s),p=0,v=0;v<f;++v)for(var g=0;g<l;++g)for(var x=0;x<s;++x)d[p++]=n[a*g+h*v+o*x+r];M(t,d)}else if(w(r)===dt||w(r)===pt||w(r)===vt)w(r)===dt||w(r)===pt?t.element=r:t.element=r.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(w(r)===gt)t.element=r,t.width=r.width,t.height=r.height,t.channels=4;else if(w(r)===yt)t.element=r,t.width=r.naturalWidth,t.height=r.naturalHeight,t.channels=4;else if(w(r)===mt)t.element=r,t.width=r.videoWidth,t.height=r.videoHeight,t.channels=4;else if(_(r)){for(n=t.width||r[0].length,a=t.height||r.length,h=t.channels,h=m(r[0][0])?h||r[0][0].length:h||1,o=tt.shape(r),l=1,f=0;f<o.length;++f)l*=o[f];l=J.allocType(36193===t.type?5126:t.type,l),tt.flatten(r,o,"",l),M(t,l),t.alignment=1,t.width=n,t.height=a,t.channels=h,t.format=t.internalformat=ft[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function p(e,r,i,a,o){var s=e.element,l=e.data,u=e.internalformat,c=e.format,h=e.type,d=e.width,p=e.height;f(e),s?t.texSubImage2D(r,o,i,a,c,h,s):e.compressed?t.compressedTexSubImage2D(r,o,i,a,u,d,p,l):e.needsCopy?(n(),t.copyTexSubImage2D(r,o,i,a,e.xOffset,e.yOffset,d,p)):t.texSubImage2D(r,o,i,a,d,p,c,h,l)}function v(){return ot.pop()||new h}function g(t){t.needsFree&&J.freeType(t.data),h.call(t),ot.push(t)}function x(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function k(t,e,r){var n=t.images[0]=v();t.mipmask=1,n.width=t.width=e,n.height=t.height=r,n.channels=t.channels=4}function S(t,e){var r=null;if(A(e))l(r=t.images[0]=v(),t),d(r,e),t.mipmask=1;else if(c(t,e),Array.isArray(e.mipmap))for(var n=e.mipmap,i=0;i<n.length;++i)l(r=t.images[i]=v(),t),r.width>>=i,r.height>>=i,d(r,n[i]),t.mipmask|=1<<i;else l(r=t.images[0]=v(),t),d(r,e),t.mipmask=1;l(t,t.images[0])}function E(e,r){for(var i=e.images,a=0;a<i.length&&i[a];++a){var o=i[a],s=r,l=a,u=o.element,c=o.data,h=o.internalformat,d=o.format,p=o.type,v=o.width,g=o.height;f(o),u?t.texImage2D(s,l,d,d,p,u):o.compressed?t.compressedTexImage2D(s,l,h,v,g,0,c):o.needsCopy?(n(),t.copyTexImage2D(s,l,d,o.xOffset,o.yOffset,v,g,0)):t.texImage2D(s,l,d,v,g,0,d,p,c||null)}}function O(){var t=st.pop()||new x;s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;r<e.length;++r)e[r]&&g(e[r]),e[r]=null;st.push(t)}function L(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function R(t,e){"min"in e&&(t.minFilter=U[e.min],0<=ct.indexOf(t.minFilter)&&!("faces"in e)&&(t.genMipmaps=!0)),"mag"in e&&(t.magFilter=j[e.mag]);var r=t.wrapS,n=t.wrapT;if("wrap"in e){var i=e.wrap;"string"==typeof i?r=n=z[i]:Array.isArray(i)&&(r=z[i[0]],n=z[i[1]])}else"wrapS"in e&&(r=z[e.wrapS]),"wrapT"in e&&(n=z[e.wrapT]);if(t.wrapS=r,t.wrapT=n,"anisotropic"in e&&(t.anisotropic=e.anisotropic),"mipmap"in e){switch(r=!1,typeof e.mipmap){case"string":t.mipmapHint=B[e.mipmap],r=t.genMipmaps=!0;break;case"boolean":r=t.genMipmaps=e.mipmap;break;case"object":t.genMipmaps=!1,r=!0}!r||"min"in e||(t.minFilter=9984)}}function D(r,n){t.texParameteri(n,10241,r.minFilter),t.texParameteri(n,10240,r.magFilter),t.texParameteri(n,10242,r.wrapS),t.texParameteri(n,10243,r.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(t.hint(33170,r.mipmapHint),t.generateMipmap(n))}function I(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=lt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new L,o.profile&&(this.stats={size:0})}function P(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function F(){var e=bt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function N(e){var r=e.texture,n=e.unit,i=e.target;0<=n&&(t.activeTexture(33984+n),t.bindTexture(i,null),bt[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete ut[e.id],a.textureCount--}var B={"don't care":4352,"dont care":4352,nice:4354,fast:4353},z={repeat:10497,clamp:33071,mirror:33648},j={nearest:9728,linear:9729},U=Y({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},j),H={none:0,browser:37444},V={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},G={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},W={};e.ext_srgb&&(G.srgb=35904,G.srgba=35906),e.oes_texture_float&&(V.float32=V.float=5126),e.oes_texture_half_float&&(V.float16=V["half float"]=36193),e.webgl_depth_texture&&(Y(G,{depth:6402,"depth stencil":34041}),Y(V,{uint16:5123,uint32:5125,"depth stencil":34042})),e.webgl_compressed_texture_s3tc&&Y(W,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),e.webgl_compressed_texture_atc&&Y(W,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),e.webgl_compressed_texture_pvrtc&&Y(W,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),e.webgl_compressed_texture_etc1&&(W["rgb etc1"]=36196);var q=Array.prototype.slice.call(t.getParameter(34467));Object.keys(W).forEach((function(t){var e=W[t];0<=q.indexOf(e)&&(G[t]=e)}));var X=Object.keys(G);r.textureFormats=X;var Z=[];Object.keys(G).forEach((function(t){Z[G[t]]=t}));var K=[];Object.keys(V).forEach((function(t){K[V[t]]=t}));var rt=[];Object.keys(j).forEach((function(t){rt[j[t]]=t}));var nt=[];Object.keys(U).forEach((function(t){nt[U[t]]=t}));var it=[];Object.keys(z).forEach((function(t){it[z[t]]=t}));var at=X.reduce((function(t,r){var n=G[r];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n||e.ext_srgb&&(35904===n||35906===n)?t[n]=n:32855===n||0<=r.indexOf("rgba")?t[n]=6408:t[n]=6407,t}),{}),ot=[],st=[],lt=0,ut={},xt=r.maxTextureUnits,bt=Array(xt).map((function(){return null}));return Y(I.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var r=0;r<xt;++r){var n=bt[r];if(n){if(0<n.bindCount)continue;n.unit=-1}bt[r]=this,e=r;break}o.profile&&a.maxTextureUnits<e+1&&(a.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&N(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(ut).forEach((function(e){t+=ut[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;L.call(r);var a=O();return"number"==typeof t?k(a,0|t,"number"==typeof e?0|e:0|t):t?(R(r,t),S(a,t)):k(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,l(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,P(i),E(a,3553),D(r,3553),F(),C(a),o.profile&&(i.stats.size=T(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=Z[i.internalformat],n.type=K[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new I(3553);return ut[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return l(o,i),o.width=0,o.height=0,d(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,P(i),p(o,3553,e,r,a),F(),g(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,P(i);for(var l=0;i.mipmask>>l;++l){var u=a>>l,c=s>>l;if(!u||!c)break;t.texImage2D(3553,l,i.format,u,c,0,i.format,i.type,null)}return F(),o.profile&&(i.stats.size=T(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,u){function f(t,e,r,n,i,a){var s,u=h.texInfo;for(L.call(u),s=0;6>s;++s)y[s]=O();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(y[0],t),S(y[1],e),S(y[2],r),S(y[3],n),S(y[4],i),S(y[5],a);else if(R(u,t),c(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(y[s],h),S(y[s],t[s]);else for(s=0;6>s;++s)S(y[s],t)}else for(t=0|t||1,s=0;6>s;++s)k(y[s],t,t);for(l(h,y[0]),h.mipmask=u.genMipmaps?(y[0].width<<1)-1:y[0].mipmask,h.internalformat=y[0].internalformat,f.width=y[0].width,f.height=y[0].height,P(h),s=0;6>s;++s)E(y[s],34069+s);for(D(u,34067),F(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,u.genMipmaps,!0)),f.format=Z[h.internalformat],f.type=K[h.type],f.mag=rt[u.magFilter],f.min=nt[u.minFilter],f.wrapS=it[u.wrapS],f.wrapT=it[u.wrapT],s=0;6>s;++s)C(y[s]);return f}var h=new I(34067);ut[h.id]=h,a.cubeCount++;var y=Array(6);return f(e,r,n,i,s,u),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return l(a,h),a.width=0,a.height=0,d(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,P(h),p(a,34069+t,r,n,i),F(),g(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,P(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return F(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<xt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),bt[e]=null;$(ut).forEach(N),a.cubeCount=0,a.textureCount=0},getTexture:function(t){return null},restore:function(){for(var e=0;e<xt;++e){var r=bt[e];r&&(r.bindCount=0,r.unit=-1,bt[e]=null)}$(ut).forEach((function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var r=0;32>r;++r)if(0!=(e.mipmask&1<<r))if(3553===e.target)t.texImage2D(3553,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);D(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e<xt;++e){var r=bt[e];r&&(r.bindCount=0,r.unit=-1,bt[e]=null),t.activeTexture(33984+e),t.bindTexture(3553,null),t.bindTexture(34067,null)}}}}function S(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function u(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function c(t){var e=3553,r=null,n=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)||"textureCube"===t?r=i:"renderbuffer"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function d(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function p(){this.id=A++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function v(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function g(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete M[e.id]}function y(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;n<i.length;++n)u(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)t.framebufferTexture2D(36160,36064+n,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),u(36096,e.depthAttachment),u(36128,e.stencilAttachment),u(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.isContextLost(),t.bindFramebuffer(36160,x.next?x.next.framebuffer:null),x.cur=x.next,t.getError()}function m(t,e){function r(t,e){var i,a=0,o=0,s=!0,u=!0;i=null;var d=!0,p="rgba",g="uint8",m=1,x=null,w=null,A=null,M=!1;"number"==typeof t?(a=0|t,o=0|e||a):t?("shape"in t?(a=(o=t.shape)[0],o=o[1]):("radius"in t&&(a=o=t.radius),"width"in t&&(a=t.width),"height"in t&&(o=t.height)),("color"in t||"colors"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||("colorCount"in t&&(m=0|t.colorCount),"colorTexture"in t&&(d=!!t.colorTexture,p="rgba4"),"colorType"in t&&(g=t.colorType,!d)&&("half float"===g||"float16"===g?p="rgba16f":"float"!==g&&"float32"!==g||(p="rgba32f")),"colorFormat"in t&&(p=t.colorFormat,0<=b.indexOf(p)?d=!0:0<=_.indexOf(p)&&(d=!1))),("depthTexture"in t||"depthStencilTexture"in t)&&(M=!(!t.depthTexture&&!t.depthStencilTexture)),"depth"in t&&("boolean"==typeof t.depth?s=t.depth:(x=t.depth,u=!1)),"stencil"in t&&("boolean"==typeof t.stencil?u=t.stencil:(w=t.stencil,s=!1)),"depthStencil"in t&&("boolean"==typeof t.depthStencil?s=u=t.depthStencil:(A=t.depthStencil,u=s=!1))):a=o=1;var T=null,k=null,S=null,E=null;if(Array.isArray(i))T=i.map(c);else if(i)T=[c(i)];else for(T=Array(m),i=0;i<m;++i)T[i]=f(a,o,d,p,g);for(a=a||T[0].width,o=o||T[0].height,x?k=c(x):s&&!u&&(k=f(a,o,M,"depth","uint32")),w?S=c(w):u&&!s&&(S=f(a,o,!1,"stencil","uint8")),A?E=c(A):!x&&!w&&u&&s&&(E=f(a,o,M,"depth stencil","depth stencil")),s=null,i=0;i<T.length;++i)l(T[i]),T[i]&&T[i].texture&&(u=Mt[T[i].texture._texture.format]*Tt[T[i].texture._texture.type],null===s&&(s=u));return l(k),l(S),l(E),v(n),n.width=a,n.height=o,n.colorAttachments=T,n.depthAttachment=k,n.stencilAttachment=S,n.depthStencilAttachment=E,r.color=T.map(h),r.depth=h(k),r.stencil=h(S),r.depthStencil=h(E),r.width=n.width,r.height=n.height,y(n),r}var n=new p;return a.framebufferCount++,r(t,e),Y(r,{resize:function(t,e){var i=Math.max(0|t,1),a=Math.max(0|e||i,1);if(i===n.width&&a===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)d(o[s],i,a);return d(n.depthAttachment,i,a),d(n.stencilAttachment,i,a),d(n.depthStencilAttachment,i,a),n.width=r.width=i,n.height=r.height=a,y(n),r},_reglType:"framebuffer",_framebuffer:n,destroy:function(){g(n),v(n)},use:function(t){x.setFBO({framebuffer:r},t)}})}var x={cur:null,next:null,dirty:!1,setFBO:null},b=["rgba"],_=["rgba4","rgb565","rgb5 a1"];e.ext_srgb&&_.push("srgba"),e.ext_color_buffer_half_float&&_.push("rgba16f","rgb16f"),e.webgl_color_buffer_float&&_.push("rgba32f");var w=["uint8"];e.oes_texture_half_float&&w.push("half float","float16"),e.oes_texture_float&&w.push("float","float32");var A=0,M={};return Y(x,{getFramebuffer:function(t){return"function"==typeof t&&"framebuffer"===t._reglType&&(t=t._framebuffer)instanceof p?t:null},create:m,createCube:function(t){function e(t){var i,a={color:null},o=0,s=null;i="rgba";var l="uint8",u=1;if("number"==typeof t?o=0|t:t?("shape"in t?o=t.shape[0]:("radius"in t&&(o=0|t.radius),"width"in t?o=0|t.width:"height"in t&&(o=0|t.height)),("color"in t||"colors"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||("colorCount"in t&&(u=0|t.colorCount),"colorType"in t&&(l=t.colorType),"colorFormat"in t&&(i=t.colorFormat)),"depth"in t&&(a.depth=t.depth),"stencil"in t&&(a.stencil=t.stencil),"depthStencil"in t&&(a.depthStencil=t.depthStencil)):o=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(u),s={radius:o,format:i,type:l},i=0;i<u;++i)t[i]=n.createCube(s);for(a.color=Array(t.length),i=0;i<t.length;++i)u=t[i],o=o||u.width,a.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(u=0;u<t.length;++u)a.color[u].target=34069+i;0<i&&(a.depth=r[0].depth,a.stencil=r[0].stencil,a.depthStencil=r[0].depthStencil),r[i]?r[i](a):r[i]=m(a)}return Y(e,{width:o,height:o,color:t})}var r=Array(6);return e(t),Y(e,{faces:r,resize:function(t){var n=0|t;if(n===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;6>t;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){$(M).forEach(g)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,$(M).forEach((function(e){e.framebuffer=t.createFramebuffer(),y(e)}))}})}function E(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function O(t,e,r,n,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var l=r.maxAttributes,c=Array(l);for(r=0;r<l;++r)c[r]=new E;var f=0,h={},d={Record:E,scope:{},state:c,currentVAO:null,targetVAO:null,restore:e.oes_vertex_array_object?function(){e.oes_vertex_array_object&&$(h).forEach((function(t){t.refresh()}))}:function(){},createVAO:function(t){function e(t){var n;Array.isArray(t)?(n=t,r.elements&&r.ownsElements&&r.elements.destroy(),r.elements=null,r.ownsElements=!1,r.offset=0,r.count=0,r.instances=-1,r.primitive=4):(t.elements?(n=t.elements,r.ownsElements?("function"==typeof n&&"elements"===n._reglType?r.elements.destroy():r.elements(n),r.ownsElements=!1):a.getElements(t.elements)?(r.elements=t.elements,r.ownsElements=!1):(r.elements=a.create(t.elements),r.ownsElements=!0)):(r.elements=null,r.ownsElements=!1),n=t.attributes,r.offset=0,r.count=-1,r.instances=-1,r.primitive=4,r.elements&&(r.count=r.elements._elements.vertCount,r.primitive=r.elements._elements.primType),"offset"in t&&(r.offset=0|t.offset),"count"in t&&(r.count=0|t.count),"instances"in t&&(r.instances=0|t.instances),"primitive"in t&&(r.primitive=st[t.primitive])),t={};var o=r.attributes;o.length=n.length;for(var s=0;s<n.length;++s){var l,c=n[s],f=o[s]=new E,h=c.data||c;Array.isArray(h)||Q(h)||u(h)?(r.buffers[s]&&(l=r.buffers[s],Q(h)&&l._buffer.byteLength>=h.byteLength?l.subdata(h):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(c,34962,!1,!0)),f.buffer=i.getBuffer(l),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1):i.getBuffer(c)?(f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(c.buffer)?(f.buffer=i.getBuffer(c.buffer),f.size=0|(+c.size||f.buffer.dimension),f.normalized=!!c.normalized||!1,f.type="type"in c?rt[c.type]:f.buffer.dtype,f.offset=0|(c.offset||0),f.stride=0|(c.stride||0),f.divisor=0|(c.divisor||0),f.state=1):"x"in c&&(f.x=+c.x||0,f.y=+c.y||0,f.z=+c.z||0,f.w=+c.w||0,f.state=2)}for(l=0;l<r.buffers.length;++l)!t[l]&&r.buffers[l]&&(r.buffers[l].destroy(),r.buffers[l]=null);return r.refresh(),e}var r=new s;return n.vaoCount+=1,e.destroy=function(){for(var t=0;t<r.buffers.length;++t)r.buffers[t]&&r.buffers[t].destroy();r.buffers.length=0,r.ownsElements&&(r.elements.destroy(),r.elements=null,r.ownsElements=!1),r.destroy()},e._vao=r,e._reglType="vao",e(t)},getVAO:function(t){return"function"==typeof t&&t._vao?t._vao:null},destroyBuffer:function(e){for(var r=0;r<c.length;++r){var n=c[r];n.buffer===e&&(t.disableVertexAttribArray(r),n.buffer=null)}},setVAO:e.oes_vertex_array_object?function(t){if(t!==d.currentVAO){var r=e.oes_vertex_array_object;t?r.bindVertexArrayOES(t.vao):r.bindVertexArrayOES(null),d.currentVAO=t}}:function(r){if(r!==d.currentVAO){if(r)r.bindAttrs();else{for(var n=e.angle_instanced_arrays,i=0;i<c.length;++i){var a=c[i];a.buffer?(t.enableVertexAttribArray(i),a.buffer.bind(),t.vertexAttribPointer(i,a.size,a.type,a.normalized,a.stride,a.offfset),n&&a.divisor&&n.vertexAttribDivisorANGLE(i,a.divisor)):(t.disableVertexAttribArray(i),t.vertexAttrib4f(i,a.x,a.y,a.z,a.w))}o.elements?t.bindBuffer(34963,o.elements.buffer.buffer):t.bindBuffer(34963,null)}d.currentVAO=r}},clear:e.oes_vertex_array_object?function(){$(h).forEach((function(t){t.destroy()}))}:function(){}};return s.prototype.bindAttrs=function(){for(var r=e.angle_instanced_arrays,n=this.attributes,i=0;i<n.length;++i){var o=n[i];o.buffer?(t.enableVertexAttribArray(i),t.bindBuffer(34962,o.buffer.buffer),t.vertexAttribPointer(i,o.size,o.type,o.normalized,o.stride,o.offset),r&&o.divisor&&r.vertexAttribDivisorANGLE(i,o.divisor)):(t.disableVertexAttribArray(i),t.vertexAttrib4f(i,o.x,o.y,o.z,o.w))}for(r=n.length;r<l;++r)t.disableVertexAttribArray(r);(r=a.getElements(this.elements))?t.bindBuffer(34963,r.buffer.buffer):t.bindBuffer(34963,null)},s.prototype.refresh=function(){var t=e.oes_vertex_array_object;t&&(t.bindVertexArrayOES(this.vao),this.bindAttrs(),d.currentVAO=null,t.bindVertexArrayOES(null))},s.prototype.destroy=function(){if(this.vao){var t=e.oes_vertex_array_object;this===d.currentVAO&&(d.currentVAO=null,t.bindVertexArrayOES(null)),t.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),h[this.id]&&(delete h[this.id],--n.vaoCount)},d}function C(t,e,r,n){function i(t,e,r,n){this.name=t,this.id=e,this.location=r,this.info=n}function a(t,e){for(var r=0;r<t.length;++r)if(t[r].id===e.id)return void(t[r].location=e.location);t.push(e)}function o(r,n,i){if(!(o=(i=35632===r?u:c)[n])){var a=e.str(n),o=t.createShader(r);t.shaderSource(o,a),t.compileShader(o),i[n]=o}return o}function s(t,e){this.id=d++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s,l){var u;u=o(35632,r.fragId);var c=o(35633,r.vertId);if(s=r.program=t.createProgram(),t.attachShader(s,u),t.attachShader(s,c),l)for(u=0;u<l.length;++u)c=l[u],t.bindAttribLocation(s,c[0],c[1]);t.linkProgram(s),c=t.getProgramParameter(s,35718),n.profile&&(r.stats.uniformsCount=c);var f=r.uniforms;for(u=0;u<c;++u)if(l=t.getActiveUniform(s,u))if(1<l.size)for(var h=0;h<l.size;++h){var d=l.name.replace("[0]","["+h+"]");a(f,new i(d,e.id(d),t.getUniformLocation(s,d),l))}else a(f,new i(l.name,e.id(l.name),t.getUniformLocation(s,l.name),l));for(c=t.getProgramParameter(s,35721),n.profile&&(r.stats.attributesCount=c),r=r.attributes,u=0;u<c;++u)(l=t.getActiveAttrib(s,u))&&a(r,new i(l.name,e.id(l.name),t.getAttribLocation(s,l.name),l))}var u={},c={},f={},h=[],d=0;return n.profile&&(r.getMaxUniformsCount=function(){var t=0;return h.forEach((function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);$(u).forEach(e),u={},$(c).forEach(e),c={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,f={},r.shaderCount=0},program:function(e,n,i,a){var o=f[n];o||(o=f[n]={});var d=o[e];if(d&&(d.refCount++,!a))return d;var p=new s(n,e);return r.shaderCount++,l(p,i,a),d||(o[e]=p),h.push(p),Y(p,{destroy:function(){if(p.refCount--,0>=p.refCount){t.deleteProgram(p.program);var e=h.indexOf(p);h.splice(e,1),r.shaderCount--}0>=o[p.vertId].refCount&&(t.deleteShader(c[p.vertId]),delete c[p.vertId],delete f[p.fragId][p.vertId]),Object.keys(f[p.fragId]).length||(t.deleteShader(u[p.fragId]),delete u[p.fragId],delete f[p.fragId])}})},restore:function(){u={},c={};for(var t=0;t<h.length;++t)l(h[t],null,h[t].attributes.map((function(t){return[t.location,t.name]})))},shader:o,frag:-1,vert:-1}}function L(t,e,r,n,i,a,o){function s(i){var a;a=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,u=n.framebufferHeight,c=null;return Q(i)?c=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),u=0|(i.height||n.framebufferHeight-s),c=i.data||null),r(),i=l*u*4,c||(5121===a?c=new Uint8Array(i):5126===a&&(c=c||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(o,s,l,u,6408,a,c),c}return function(t){return t&&"framebuffer"in t?function(t){var r;return e.setFBO({framebuffer:t.framebuffer},(function(){r=s(t)})),r}(t):s(t)}}function R(t,e){return t>>>e|t<<32-e}function D(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function P(t){return I(t).join("")}function F(t){function e(){var t=[],e=[];return Y((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0<arguments.length&&(t.push(r,"="),t.push.apply(t,I(arguments)),t.push(";")),r},toString:function(){return P([0<e.length?"var "+e.join(",")+";":"",P(t)])}})}function r(){function t(t,e){n(t,e,"=",r.def(t,e),";")}var r=e(),n=e(),i=r.toString,a=n.toString;return Y((function(){r.apply(r,I(arguments))}),{def:r.def,entry:r,exit:n,save:t,set:function(e,n,i){t(e,n),r(e,n,"=",i,";")},toString:function(){return i()+a()}})}var n=t&&t.cache,i=0,a=[],o=[],s=[],l=e(),u={};return{global:l,link:function(t,e){var r=e&&e.stable;if(!r)for(var n=0;n<o.length;++n)if(o[n]===t&&!s[n])return a[n];return n="g"+i++,a.push(n),o.push(t),s.push(r),n},block:e,proc:function(t,e){function n(){var t="a"+i.length;return i.push(t),t}var i=[];e=e||0;for(var a=0;a<e;++a)n();var o=(a=r()).toString;return u[t]=Y(a,{arg:n,toString:function(){return P(["function(",i.join(),"){",o(),"}"])}})},scope:r,cond:function(){var t=P(arguments),e=r(),n=r(),i=e.toString,a=n.toString;return Y(e,{then:function(){return e.apply(e,I(arguments)),this},else:function(){return n.apply(n,I(arguments)),this},toString:function(){var e=a();return e&&(e="else{"+e+"}"),P(["if(",t,"){",i(),"}",e])}})},compile:function(){var t=['"use strict";',l,"return {"];Object.keys(u).forEach((function(e){t.push('"',e,'":',u[e].toString(),",")})),t.push("}");var e,r=P(t).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return n&&(e=function(t){for(var e,r="",n=0;n<t.length;n++)e=t.charCodeAt(n),r+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,a,o,s,l,u,c,f,h,d,p=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[p>>5]|=128<<24-p%32,e[15+(p+64>>9<<4)]=p,c=0;c<e.length;c+=16){for(p=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],f=0;64>f;f++){var v;16>f?r[f]=e[f+c]:(h=f,d=D(d=R(d=r[f-2],17)^R(d,19)^d>>>10,r[f-7]),v=R(v=r[f-15],7)^R(v,18)^v>>>3,r[h]=D(D(d,v),r[f-16])),h=D(D(D(D(u,h=R(h=o,6)^R(h,11)^R(h,25)),o&s^~o&l),kt[f]),r[f]),d=D(u=R(u=p,2)^R(u,13)^R(u,22),p&n^p&i^n&i),u=l,l=s,s=o,o=D(a,h),a=i,i=n,n=p,p=D(h,d)}t[0]=D(p,t[0]),t[1]=D(n,t[1]),t[2]=D(i,t[2]),t[3]=D(a,t[3]),t[4]=D(o,t[4]),t[5]=D(s,t[5]),t[6]=D(l,t[6]),t[7]=D(u,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i<t.length;)e=t.charCodeAt(i),r=i+1<t.length?t.charCodeAt(i+1):0,55296<=e&&56319>=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,o):(r=Function.apply(null,a.concat(r)),n&&(n[e]=r),r.apply(null,o))}}}function N(t){return Array.isArray(t)||Q(t)||u(t)}function B(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t<e?-1:1}))}function z(t,e,r,n){this.thisDep=t,this.contextDep=e,this.propDep=r,this.append=n}function j(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function U(t){return new z(!1,!1,!1,t)}function H(t,e){var r=t.type;if(0===r)return new z(!0,1<=(r=t.data.length),2<=r,e);if(4===r)return new z((r=t.data).thisDep,r.contextDep,r.propDep,e);if(5===r)return new z(!1,!1,!1,e);if(6===r){for(var n=r=!1,i=!1,a=0;a<t.data.length;++a){var o=t.data[a];1===o.type?i=!0:2===o.type?n=!0:3===o.type?r=!0:0===o.type?(r=!0,1<=(o=o.data)&&(n=!0),2<=o&&(i=!0)):4===o.type&&(r=r||o.data.thisDep,n=n||o.data.contextDep,i=i||o.data.propDep)}return new z(r,n,i,e)}return new z(3===r,2===r,1===r,e)}function V(t,e,r,n,i,a,s,l,u,c,f,h,d,p,v,g){function y(t){return t.replace(".","_")}function x(t,e,r){var n=y(t);at.push(t),it[n]=nt[n]=!!r,ot[n]=e}function b(t,e,r){var n=y(t);at.push(t),Array.isArray(r)?(nt[n]=r.slice(),it[n]=r.slice()):nt[n]=it[n]=r,lt[n]=e}function _(){var t=F({cache:v}),r=t.link,n=t.global;t.id=ft++,t.batchId="0";var i=r(ut),a=t.shared={props:"a0"};Object.keys(ut).forEach((function(t){a[t]=n.def(i,".",t)}));var o=t.next={},s=t.current={};Object.keys(lt).forEach((function(t){Array.isArray(nt[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))}));var l=t.constants={};Object.keys(ct).forEach((function(t){l[t]=n.def(JSON.stringify(ct[t]))})),t.invoke=function(e,n){switch(n.type){case 0:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def("this",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map((function(r){return t.invoke(e,r)}))}},t.attribCache={};var u={};return t.scopeAttrib=function(t){if((t=e.id(t))in u)return u[t];var n=c.scope[t];return n||(n=c.scope[t]=new K),u[t]=r(n)},t}function w(t,e){var r=t.static,n=t.dynamic;if("framebuffer"in r){var i=r.framebuffer;return i?(i=l.getFramebuffer(i),U((function(t,e){var r=t.link(i),n=t.shared;return e.set(n.framebuffer,".next",r),n=n.context,e.set(n,".framebufferWidth",r+".width"),e.set(n,".framebufferHeight",r+".height"),r}))):U((function(t,e){var r=t.shared;return e.set(r.framebuffer,".next","null"),r=r.context,e.set(r,".framebufferWidth",r+".drawingBufferWidth"),e.set(r,".framebufferHeight",r+".drawingBufferHeight"),"null"}))}if("framebuffer"in n){var a=n.framebuffer;return H(a,(function(t,e){var r=t.invoke(e,a),n=t.shared,i=n.framebuffer;return r=e.def(i,".getFramebuffer(",r,")"),e.set(i,".next",r),n=n.context,e.set(n,".framebufferWidth",r+"?"+r+".width:"+n+".drawingBufferWidth"),e.set(n,".framebufferHeight",r+"?"+r+".height:"+n+".drawingBufferHeight"),r}))}return null}function A(t,r,n){function i(t){if(t in a){var r=e.id(a[t]);return(t=U((function(){return r}))).id=r,t}if(t in o){var n=o[t];return H(n,(function(t,e){var r=t.invoke(e,n);return e.def(t.shared.strings,".id(",r,")")}))}return null}var a=t.static,o=t.dynamic,s=i("frag"),l=i("vert"),u=null;return j(s)&&j(l)?(u=f.program(l.id,s.id,null,n),t=U((function(t,e){return t.link(u)}))):t=new z(s&&s.thisDep||l&&l.thisDep,s&&s.contextDep||l&&l.contextDep,s&&s.propDep||l&&l.propDep,(function(t,e){var r,n,i=t.shared.shader;return r=s?s.append(t,e):e.def(i,".","frag"),n=l?l.append(t,e):e.def(i,".","vert"),e.def(i+".program("+n+","+r+")")})),{frag:s,vert:l,progVar:t,program:u}}function M(t,e){function r(t,e){if(t in n){var r=0|n[t];return e?o.offset=r:o.instances=r,U((function(t,n){return e&&(t.OFFSET=r),r}))}if(t in i){var a=i[t];return H(a,(function(t,r){var n=t.invoke(r,a);return e&&(t.OFFSET=n),n}))}if(e){if(u)return U((function(t,e){return t.OFFSET=0}));if(s)return new z(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+".currentVAO?"+t.shared.vao+".currentVAO.offset:0")}))}else if(s)return new z(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+".currentVAO?"+t.shared.vao+".currentVAO.instances:-1")}));return null}var n=t.static,i=t.dynamic,o={},s=!1,l=function(){if("vao"in n){var t=n.vao;return null!==t&&null===c.getVAO(t)&&(t=c.createVAO(t)),s=!0,o.vao=t,U((function(e){var r=c.getVAO(t);return r?e.link(r):"null"}))}if("vao"in i){s=!0;var e=i.vao;return H(e,(function(t,r){var n=t.invoke(r,e);return r.def(t.shared.vao+".getVAO("+n+")")}))}return null}(),u=!1,f=function(){if("elements"in n){var t=n.elements;if(o.elements=t,N(t)){var e=o.elements=a.create(t,!0);t=a.getElements(e),u=!0}else t&&(t=a.getElements(t),u=!0);return e=U((function(e,r){if(t){var n=e.link(t);return e.ELEMENTS=n}return e.ELEMENTS=null})),e.value=t,e}if("elements"in i){u=!0;var r=i.elements;return H(r,(function(t,e){var n=(i=t.shared).isBufferArgs,i=i.elements,a=t.invoke(e,r),o=e.def("null");return n=e.def(n,"(",a,")"),a=t.cond(n).then(o,"=",i,".createStream(",a,");").else(o,"=",i,".getElements(",a,");"),e.entry(a),e.exit(t.cond(n).then(i,".destroyStream(",o,");")),t.ELEMENTS=o}))}return s?new z(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+".currentVAO?"+t.shared.elements+".getElements("+t.shared.vao+".currentVAO.elements):null")})):null}(),h=r("offset",!0),d=function(){if("primitive"in n){var t=n.primitive;return o.primitive=t,U((function(e,r){return st[t]}))}if("primitive"in i){var e=i.primitive;return H(e,(function(t,r){var n=t.constants.primTypes,i=t.invoke(r,e);return r.def(n,"[",i,"]")}))}return u?j(f)?f.value?U((function(t,e){return e.def(t.ELEMENTS,".primType")})):U((function(){return 4})):new z(f.thisDep,f.contextDep,f.propDep,(function(t,e){var r=t.ELEMENTS;return e.def(r,"?",r,".primType:",4)})):s?new z(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao+".currentVAO?"+t.shared.vao+".currentVAO.primitive:4")})):null}(),p=function(){if("count"in n){var t=0|n.count;return o.count=t,U((function(){return t}))}if("count"in i){var e=i.count;return H(e,(function(t,r){return t.invoke(r,e)}))}return u?j(f)?f?h?new z(h.thisDep,h.contextDep,h.propDep,(function(t,e){return e.def(t.ELEMENTS,".vertCount-",t.OFFSET)})):U((function(t,e){return e.def(t.ELEMENTS,".vertCount")})):U((function(){return-1})):new z(f.thisDep||h.thisDep,f.contextDep||h.contextDep,f.propDep||h.propDep,(function(t,e){var r=t.ELEMENTS;return t.OFFSET?e.def(r,"?",r,".vertCount-",t.OFFSET,":-1"):e.def(r,"?",r,".vertCount:-1")})):s?new z(l.thisDep,l.contextDep,l.propDep,(function(t,e){return e.def(t.shared.vao,".currentVAO?",t.shared.vao,".currentVAO.count:-1")})):null}(),v=r("instances",!1);return{elements:f,primitive:d,count:p,instances:v,offset:h,vao:l,vaoActive:s,elementsActive:u,static:o}}function T(t,r){var n=t.static,a=t.dynamic,o={};return Object.keys(n).forEach((function(t){var r=n[t],a=e.id(t),s=new K;if(N(r))s.state=1,s.buffer=i.getBuffer(i.create(r,34962,!1,!0)),s.type=0;else if(u=i.getBuffer(r))s.state=1,s.buffer=u,s.type=0;else if("constant"in r){var l=r.constant;s.buffer="null",s.state=2,"number"==typeof l?s.x=l:St.forEach((function(t,e){e<l.length&&(s[t]=l[e])}))}else{var u=N(r.buffer)?i.getBuffer(i.create(r.buffer,34962,!1,!0)):i.getBuffer(r.buffer),c=0|r.offset,f=0|r.stride,h=0|r.size,d=!!r.normalized,p=0;"type"in r&&(p=rt[r.type]),r=0|r.divisor,s.buffer=u,s.state=1,s.size=h,s.normalized=d,s.type=p||u.dtype,s.offset=c,s.stride=f,s.divisor=r}o[t]=U((function(t,e){var r=t.attribCache;if(a in r)return r[a];var n={isStream:!1};return Object.keys(s).forEach((function(t){n[t]=s[t]})),s.buffer&&(n.buffer=t.link(s.buffer),n.type=n.type||n.buffer+".dtype"),r[a]=n}))})),Object.keys(a).forEach((function(t){var e=a[t];o[t]=H(e,(function(t,r){function n(t){r(l[t],"=",i,".",t,"|0;")}var i=t.invoke(r,e),a=t.shared,o=t.constants,s=a.isBufferArgs,l=(a=a.buffer,{isStream:r.def(!1)}),u=new K;u.state=1,Object.keys(u).forEach((function(t){l[t]=r.def(""+u[t])}));var c=l.buffer,f=l.type;return r("if(",s,"(",i,")){",l.isStream,"=true;",c,"=",a,".createStream(",34962,",",i,");",f,"=",c,".dtype;","}else{",c,"=",a,".getBuffer(",i,");","if(",c,"){",f,"=",c,".dtype;",'}else if("constant" in ',i,"){",l.state,"=",2,";","if(typeof "+i+'.constant === "number"){',l[St[0]],"=",i,".constant;",St.slice(1).map((function(t){return l[t]})).join("="),"=0;","}else{",St.map((function(t,e){return l[t]+"="+i+".constant.length>"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",c,"=",a,".createStream(",34962,",",i,".buffer);","}else{",c,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",c,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",c,");","}"),l}))})),o}function k(t,e,n,i,a){function s(t){var e=u[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0<Object.keys(e.dynamic).length)return null;var r=e.static,n=Object.keys(r);if(0<n.length&&"number"==typeof r[n[0]]){for(var i=[],a=0;a<n.length;++a)i.push([0|r[n[a]],n[a]]);return i}}return null}(t,e),u=function(t,e,r){function n(t){if(t in i){var r=i[t];t=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:t=!1,"height"in r?o=0|r.height:t=!1,new z(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,(function(t,e){var i=t.shared.context,a=n;"width"in r||(a=e.def(i,".","framebufferWidth","-",s));var u=o;return"height"in r||(u=e.def(i,".","framebufferHeight","-",l)),[s,l,a,u]}))}if(t in a){var u=a[t];return t=H(u,(function(t,e){var r=t.invoke(e,u),n=t.shared.context,i=e.def(r,".x|0"),a=e.def(r,".y|0");return[i,a,e.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",i,")"),r=e.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",a,")")]})),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new z(e.thisDep,e.contextDep,e.propDep,(function(t,e){var r=t.shared.context;return[0,0,e.def(r,".","framebufferWidth"),e.def(r,".","framebufferHeight")]})):null}var i=t.static,a=t.dynamic;if(t=n("viewport")){var o=t;t=new z(t.thisDep,t.contextDep,t.propDep,(function(t,e){var r=o.append(t,e),n=t.shared.context;return e.set(n,".viewportWidth",r[2]),e.set(n,".viewportHeight",r[3]),r}))}return{viewport:t,scissor_box:n("scissor.box")}}(t,p=w(t)),f=M(t),h=function(t,e){var r=t.static,n=t.dynamic,i={};return at.forEach((function(t){function e(e,o){if(t in r){var s=e(r[t]);i[a]=U((function(){return s}))}else if(t in n){var l=n[t];i[a]=H(l,(function(t,e){return o(t,e,t.invoke(e,l))}))}}var a=y(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":case"lineWidth":return e((function(t){return t}),(function(t,e,r){return r}));case"depth.func":return e((function(t){return Ct[t]}),(function(t,e,r){return e.def(t.constants.compareFuncs,"[",r,"]")}));case"depth.range":return e((function(t){return t}),(function(t,e,r){return[e.def("+",r,"[0]"),e=e.def("+",r,"[1]")]}));case"blend.func":return e((function(t){return[Ot["srcRGB"in t?t.srcRGB:t.src],Ot["dstRGB"in t?t.dstRGB:t.dst],Ot["srcAlpha"in t?t.srcAlpha:t.src],Ot["dstAlpha"in t?t.dstAlpha:t.dst]]}),(function(t,e,r){function n(t,n){return e.def('"',t,n,'" in ',r,"?",r,".",t,n,":",r,".",t)}t=t.constants.blendFuncs;var i=n("src","RGB"),a=n("dst","RGB"),o=(i=e.def(t,"[",i,"]"),e.def(t,"[",n("src","Alpha"),"]"));return[i,a=e.def(t,"[",a,"]"),o,t=e.def(t,"[",n("dst","Alpha"),"]")]}));case"blend.equation":return e((function(t){return"string"==typeof t?[Q[t],Q[t]]:"object"==typeof t?[Q[t.rgb],Q[t.alpha]]:void 0}),(function(t,e,r){var n=t.constants.blendEquations,i=e.def(),a=e.def();return(t=t.cond("typeof ",r,'==="string"')).then(i,"=",a,"=",n,"[",r,"];"),t.else(i,"=",n,"[",r,".rgb];",a,"=",n,"[",r,".alpha];"),e(t),[i,a]}));case"blend.color":return e((function(t){return o(4,(function(e){return+t[e]}))}),(function(t,e,r){return o(4,(function(t){return e.def("+",r,"[",t,"]")}))}));case"stencil.mask":return e((function(t){return 0|t}),(function(t,e,r){return e.def(r,"|0")}));case"stencil.func":return e((function(t){return[Ct[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]}),(function(t,e,r){return[t=e.def('"cmp" in ',r,"?",t.constants.compareFuncs,"[",r,".cmp]",":",7680),e.def(r,".ref|0"),e=e.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case"stencil.opFront":case"stencil.opBack":return e((function(e){return["stencil.opBack"===t?1029:1028,Lt[e.fail||"keep"],Lt[e.zfail||"keep"],Lt[e.zpass||"keep"]]}),(function(e,r,n){function i(t){return r.def('"',t,'" in ',n,"?",a,"[",n,".",t,"]:",7680)}var a=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,i("fail"),i("zfail"),i("zpass")]}));case"polygonOffset.offset":return e((function(t){return[0|t.factor,0|t.units]}),(function(t,e,r){return[e.def(r,".factor|0"),e=e.def(r,".units|0")]}));case"cull.face":return e((function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e}),(function(t,e,r){return e.def(r,'==="front"?',1028,":",1029)}));case"frontFace":return e((function(t){return Rt[t]}),(function(t,e,r){return e.def(r+'==="cw"?2304:2305')}));case"colorMask":return e((function(t){return t.map((function(t){return!!t}))}),(function(t,e,r){return o(4,(function(t){return"!!"+r+"["+t+"]"}))}));case"sample.coverage":return e((function(t){return["value"in t?t.value:1,!!t.invert]}),(function(t,e,r){return[e.def('"value" in ',r,"?+",r,".value:1"),e=e.def("!!",r,".invert")]}))}})),i}(t),d=A(t,0,l);s("viewport"),s(y("scissor.box"));var p,v=0<Object.keys(h).length;if((p={framebuffer:p,draw:f,shader:d,state:h,dirty:v,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(t){var e,r=t.static;if(t=t.dynamic,"profile"in r){var n=!!r.profile;(e=U((function(t,e){return n}))).enable=n}else if("profile"in t){var i=t.profile;e=H(i,(function(t,e){return t.invoke(e,i)}))}return e}(t),p.uniforms=function(t,e){var r=t.static,n=t.dynamic,i={};return Object.keys(r).forEach((function(t){var e,n=r[t];if("number"==typeof n||"boolean"==typeof n)e=U((function(){return n}));else if("function"==typeof n){var a=n._reglType;"texture2d"===a||"textureCube"===a?e=U((function(t){return t.link(n)})):"framebuffer"!==a&&"framebufferCube"!==a||(e=U((function(t){return t.link(n.color[0])})))}else m(n)&&(e=U((function(t){return t.global.def("[",o(n.length,(function(t){return n[t]})),"]")})));e.value=n,i[t]=e})),Object.keys(n).forEach((function(t){var e=n[t];i[t]=H(e,(function(t,r){return t.invoke(r,e)}))})),i}(n),p.drawVAO=p.scopeVAO=f.vao,!p.drawVAO&&d.program&&!l&&r.angle_instanced_arrays&&f.static.elements){var g=!0;if(t=d.program.attributes.map((function(t){return t=e.static[t],g=g&&!!t,t})),g&&0<t.length){var x=c.getVAO(c.createVAO({attributes:t,elements:f.static.elements}));p.drawVAO=new z(null,null,null,(function(t,e){return t.link(x)})),p.useVAO=!0}}return l?p.useVAO=!0:p.attributes=T(e),p.context=function(t){var e=t.static,r=t.dynamic,n={};return Object.keys(e).forEach((function(t){var r=e[t];n[t]=U((function(t,e){return"number"==typeof r||"boolean"==typeof r?""+r:t.link(r)}))})),Object.keys(r).forEach((function(t){var e=r[t];n[t]=H(e,(function(t,r){return t.invoke(r,e)}))})),n}(i),p}function S(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach((function(a){e.save(n,"."+a);var o=r[a].append(t,e);Array.isArray(o)?i(n,".",a,"=[",o.join(),"];"):i(n,".",a,"=",o,";")})),e(i)}function E(t,e,r,n){var i,a=(s=t.shared).gl,o=s.framebuffer;tt&&(i=e.def(s.extensions,".webgl_draw_buffers"));var s=(l=t.constants).drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(o,".next"),n||e("if(",t,"!==",o,".cur){"),e("if(",t,"){",a,".bindFramebuffer(",36160,",",t,".framebuffer);"),tt&&e(i,".drawBuffersWEBGL(",s,"[",t,".colorAttachments.length]);"),e("}else{",a,".bindFramebuffer(",36160,",null);"),tt&&e(i,".drawBuffersWEBGL(",l,");"),e("}",o,".cur=",t,";"),n||e("}")}function O(t,e,r){var n=t.shared,i=n.gl,a=t.current,s=t.next,l=n.current,u=n.next,c=t.cond(l,".dirty");at.forEach((function(e){var n,f;if(!((e=y(e))in r.state))if(e in s){n=s[e],f=a[e];var h=o(nt[e].length,(function(t){return c.def(n,"[",t,"]")}));c(t.cond(h.map((function(t,e){return t+"!=="+f+"["+e+"]"})).join("||")).then(i,".",lt[e],"(",h,");",h.map((function(t,e){return f+"["+e+"]="+t})).join(";"),";"))}else n=c.def(u,".",e),h=t.cond(n,"!==",l,".",e),c(h),e in ot?h(t.cond(n).then(i,".enable(",ot[e],");").else(i,".disable(",ot[e],");"),l,".",e,"=",n,";"):h(i,".",lt[e],"(",n,");",l,".",e,"=",n,";")})),0===Object.keys(r.state).length&&c(l,".dirty=false;"),e(c)}function C(t,e,r,n){var i,a=t.shared,o=t.current,s=a.current,l=a.gl;B(Object.keys(r)).forEach((function(a){var u=r[a];if(!n||n(u)){var c=u.append(t,e);if(ot[a]){var f=ot[a];j(u)?(i=t.link(c,{stable:!0}),e(t.cond(i).then(l,".enable(",f,");").else(l,".disable(",f,");")),e(s,".",a,"=",i,";")):(e(t.cond(c).then(l,".enable(",f,");").else(l,".disable(",f,");")),e(s,".",a,"=",c,";"))}else if(m(c)){var h=o[a];e(l,".",lt[a],"(",c,");",c.map((function(t,e){return h+"["+e+"]="+t})).join(";"),";")}else j(u)?(i=t.link(c,{stable:!0}),e(l,".",lt[a],"(",i,");",s,".",a,"=",i,";")):e(l,".",lt[a],"(",c,");",s,".",a,"=",c,";")}}))}function L(t,e){$&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function R(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){t(u=e.def(),"=",a(),";"),"string"==typeof i?t(h,".count+=",i,";"):t(h,".count++;"),p&&(n?t(c=e.def(),"=",v,".getNumPendingQueries();"):t(v,".beginQuery(",h,");"))}function s(t){t(h,".cpuTime+=",a(),"-",u,";"),p&&(n?t(v,".pushScopeStats(",c,",",v,".getNumPendingQueries(),",h,");"):t(v,".endQuery();"))}function l(t){var r=e.def(d,".profile");e(d,".profile=",t,";"),e.exit(d,".profile=",r,";")}var u,c,f=t.shared,h=t.stats,d=f.current,v=f.timer;if(r=r.profile){if(j(r))return void(r.enable?(o(e),s(e.exit),l("true")):l("false"));l(r=r.append(t,e))}else r=e.def(d,".profile");o(f=t.block()),e("if(",r,"){",f,"}"),s(t=t.block()),e.exit("if(",r,"){",t,"}")}function D(t,e,r,n,i){function a(r,n,i){function a(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",d.map((function(t){return c+"."+t+"!=="+i[t]})).join("||"),"){",l,".bindBuffer(",34962,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",d.map((function(t){return c+"."+t+"="+i[t]+";"})).join(""),"}"),$&&(a=i.divisor,e("if(",c,".divisor!==",a,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,a],");",c,".divisor=",a,";}"))}function s(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");",c,".buffer=null;","}if(",St.map((function(t,e){return c+"."+t+"!=="+h[e]})).join("||"),"){",l,".vertexAttrib4f(",u,",",h,");",St.map((function(t,e){return c+"."+t+"="+h[e]+";"})).join(""),"}")}var l=o.gl,u=e.def(r,".location"),c=e.def(o.attributes,"[",u,"]");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],d=["buffer","normalized","offset","stride"];1===r?a():2===r?s():(e("if(",r,"===",1,"){"),a(),e("}else{"),s(),e("}"))}var o=t.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(Dt))return;var u=t.scopeAttrib(s);o={},Object.keys(new K).forEach((function(t){o[t]=e.def(u,".",t)}))}a(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)}))}function I(t,r,n,i,a,s){for(var l,u=t.shared,c=u.gl,f=0;f<i.length;++f){var h,d=(g=i[f]).name,p=g.info.type,v=n.uniforms[d],g=t.link(g)+".location";if(v){if(!a(v))continue;if(j(v)){if(d=v.value,35678===p||35680===p)r(c,".uniform1i(",g,",",(p=t.link(d._texture||d.color[0]._texture))+".bind());"),r.exit(p,".unbind();");else if(35674===p||35675===p||35676===p)v=2,35675===p?v=3:35676===p&&(v=4),r(c,".uniformMatrix",v,"fv(",g,",false,",d=t.global.def("new Float32Array(["+Array.prototype.slice.call(d)+"])"),");");else{switch(p){case 5126:l="1f";break;case 35664:l="2f";break;case 35665:l="3f";break;case 35666:l="4f";break;case 35670:case 5124:l="1i";break;case 35671:case 35667:l="2i";break;case 35672:case 35668:l="3i";break;case 35673:case 35669:l="4i"}r(c,".uniform",l,"(",g,",",m(d)?Array.prototype.slice.call(d):d,");")}continue}h=v.append(t,r)}else{if(!a(Dt))continue;h=r.def(u.uniforms,"[",e.id(d),"]")}switch(35678===p?r("if(",h,"&&",h,'._reglType==="framebuffer"){',h,"=",h,".color[0];","}"):35680===p&&r("if(",h,"&&",h,'._reglType==="framebufferCube"){',h,"=",h,".color[0];","}"),d=1,p){case 35678:case 35680:p=r.def(h,"._texture"),r(c,".uniform1i(",g,",",p,".bind());"),r.exit(p,".unbind();");continue;case 5124:case 35670:l="1i";break;case 35667:case 35671:l="2i",d=2;break;case 35668:case 35672:l="3i",d=3;break;case 35669:case 35673:l="4i",d=4;break;case 5126:l="1f";break;case 35664:l="2f",d=2;break;case 35665:l="3f",d=3;break;case 35666:l="4f",d=4;break;case 35674:l="Matrix2fv";break;case 35675:l="Matrix3fv";break;case 35676:l="Matrix4fv"}if("M"===l.charAt(0)){r(c,".uniform",l,"(",g,","),g=Math.pow(p-35674+2,2);var y=t.global.def("new Float32Array(",g,")");Array.isArray(h)?r("false,(",o(g,(function(t){return y+"["+t+"]="+h[t]})),",",y,")"):r("false,(Array.isArray(",h,")||",h," instanceof Float32Array)?",h,":(",o(g,(function(t){return y+"["+t+"]="+h+"["+t+"]"})),",",y,")"),r(");")}else{if(1<d){p=[];var x=[];for(v=0;v<d;++v)Array.isArray(h)?x.push(h[v]):x.push(r.def(h+"["+v+"]")),s&&p.push(r.def());s&&r("if(!",t.batchId,"||",p.map((function(t,e){return t+"!=="+x[e]})).join("||"),"){",p.map((function(t,e){return t+"="+x[e]+";"})).join("")),r(c,".uniform",l,"(",g,",",x.join(","),");")}else s&&(p=r.def(),r("if(!",t.batchId,"||",p,"!==",h,"){",p,"=",h,";")),r(c,".uniform",l,"(",g,",",h,");");s&&r("}")}}}function P(t,e,r,n){function i(i){var a=h[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(t,r):a.append(t,e):e.def(f,".",i)}function a(){function t(){r(l,".drawElementsInstancedANGLE(",[p,g,y,v+"<<(("+y+"-5121)>>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[p,v,g,s],");")}d&&"null"!==d?m?t():(r("if(",d,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(c+".drawElements("+[p,g,y,v+"<<(("+y+"-5121)>>1)"]+");")}function e(){r(c+".drawArrays("+[p,v,g]+");")}d&&"null"!==d?m?t():(r("if(",d,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,u=t.shared,c=u.gl,f=u.draw,h=n.draw,d=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a),h.elementsActive&&a("if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=a.def(),a(i,"=",f,".","elements",";","if(",i,"){",c,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",u.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+u.vao,".currentVAO.elements);",et?"":"if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),p=i("primitive"),v=i("offset"),g=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");$&&(s=i("instances"),l=t.instancing);var y=d+".type",m=h.elements&&j(h.elements)&&!h.vaoActive;$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function V(t,e,r,n,i){return i=(e=_()).proc("body",i),$&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function G(t,e,r,n){L(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),D(t,e,r,n.attributes,(function(){return!0}))),I(t,e,r,n.uniforms,(function(){return!0}),!1),P(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId="a1",L(t,e),D(t,e,r,n.attributes,i),I(t,e,r,n.uniforms,i,!1),P(t,e,e,r)}function X(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&S(t,c,r.context),r.needsFramebuffer&&E(t,c,r.framebuffer),C(t,c,r.state,i),r.profile&&i(r.profile)&&R(t,c,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):u(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(u(t.shared.vao,".setVAO(null);"),D(t,u,r,n.attributes,a),D(t,c,r,n.attributes,i)),I(t,u,r,n.uniforms,a,!1),I(t,c,r,n.uniforms,i,!0),P(t,u,c,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,c),l=c.def(n,".id"),u=c.def(e,"[",l,"]"),c(t.shared.gl,".useProgram(",n,".program);","if(!",u,"){",u,"=",e,"[",l,"]=",t.link((function(e){return V(W,t,r,e,2)})),"(",n,");}",u,".call(this,a0[",s,"],",s,");"))}function Z(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.shader,"."+e,n):i.set(a.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),B(Object.keys(r.state)).forEach((function(e){var n=r.state[e],o=n.append(t,i);m(o)?o.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):j(n)?i.set(a.next,"."+e,t.link(o,{stable:!0})):i.set(a.next,"."+e,o)})),R(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.draw,"."+e,n):i.set(a.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o="["+o.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(a.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new K).forEach((function(t){i.set(a,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(a.vao,".targetVAO",s):i.set(a.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0<Object.keys(r.state).length&&(i(o,".dirty=true;"),i.exit(o,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function J(t,e,r){var n=e.static[r];if(n&&function(t){if("object"==typeof t&&!m(t)){for(var e=Object.keys(t),r=0;r<e.length;++r)if(q.isDynamic(t[e[r]]))return!0;return!1}}(n)){var i=t.global,a=Object.keys(n),o=!1,s=!1,l=!1,u=t.global.def("{}");a.forEach((function(e){var r=n[e];if(q.isDynamic(r))"function"==typeof r&&(r=n[e]=q.unbox(r)),e=H(r,null),o=o||e.thisDep,l=l||e.propDep,s=s||e.contextDep;else{switch(i(u,".",e,"="),typeof r){case"number":i(r);break;case"string":i('"',r,'"');break;case"object":Array.isArray(r)&&i("[",r.join(),"]");break;default:i(t.link(r))}i(";")}})),e.dynamic[r]=new q.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:u,append:function(t,e){a.forEach((function(r){var i=n[r];q.isDynamic(i)&&(i=t.invoke(e,i),e(u,".",r,"=",i,";"))}))}}),delete e.static[r]}}var K=c.Record,Q={add:32774,subtract:32778,"reverse subtract":32779};r.ext_blend_minmax&&(Q.min=32775,Q.max=32776);var $=r.angle_instanced_arrays,tt=r.webgl_draw_buffers,et=r.oes_vertex_array_object,nt={dirty:!0,profile:g.profile},it={},at=[],ot={},lt={};x("dither",3024),x("blend.enable",3042),b("blend.color","blendColor",[0,0,0,0]),b("blend.equation","blendEquationSeparate",[32774,32774]),b("blend.func","blendFuncSeparate",[1,0,1,0]),x("depth.enable",2929,!0),b("depth.func","depthFunc",513),b("depth.range","depthRange",[0,1]),b("depth.mask","depthMask",!0),b("colorMask","colorMask",[!0,!0,!0,!0]),x("cull.enable",2884),b("cull.face","cullFace",1029),b("frontFace","frontFace",2305),b("lineWidth","lineWidth",1),x("polygonOffset.enable",32823),b("polygonOffset.offset","polygonOffset",[0,0]),x("sample.alpha",32926),x("sample.enable",32928),b("sample.coverage","sampleCoverage",[1,!1]),x("stencil.enable",2960),b("stencil.mask","stencilMask",-1),b("stencil.func","stencilFunc",[519,0,-1]),b("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),b("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),x("scissor.enable",3089),b("scissor.box","scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),b("viewport","viewport",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var ut={gl:t,context:d,strings:e,next:it,current:nt,draw:h,elements:a,buffer:i,shader:f,attributes:c.state,vao:c,uniforms:u,framebuffer:l,extensions:r,timer:p,isBufferArgs:N},ct={primTypes:st,compareFuncs:Ct,blendFuncs:Ot,blendEquations:Q,stencilOps:Lt,glTypes:rt,orientationType:Rt};tt&&(ct.backBuffer=[1029],ct.drawBuffer=o(n.maxDrawbuffers,(function(t){return 0===t?[0]:o(t,(function(t){return 36064+t}))})));var ft=0;return{next:it,current:nt,procs:function(){var t=_(),e=t.proc("poll"),i=t.proc("refresh"),a=t.block();e(a),i(a);var s,l=(f=t.shared).gl,u=f.next,c=f.current;a(c,".dirty=false;"),E(t,e),E(t,i,null,!0),$&&(s=t.link($)),r.oes_vertex_array_object&&i(t.link(r.oes_vertex_array_object),".bindVertexArrayOES(null);");var f=i.def(f.attributes),h=i.def(0),d=t.cond(h,".buffer");d.then(l,".enableVertexAttribArray(i);",l,".bindBuffer(",34962,",",h,".buffer.buffer);",l,".vertexAttribPointer(i,",h,".size,",h,".type,",h,".normalized,",h,".stride,",h,".offset);").else(l,".disableVertexAttribArray(i);",l,".vertexAttrib4f(i,",h,".x,",h,".y,",h,".z,",h,".w);",h,".buffer=null;");var p=t.link(n.maxAttributes,{stable:!0});return i("for(var i=0;i<",p,";++i){",h,"=",f,"[i];",d,"}"),$&&i("for(var i=0;i<",p,";++i){",s,".vertexAttribDivisorANGLE(i,",f,"[i].divisor);","}"),i(t.shared.vao,".currentVAO=null;",t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"),Object.keys(ot).forEach((function(r){var n=ot[r],o=a.def(u,".",r),s=t.block();s("if(",o,"){",l,".enable(",n,")}else{",l,".disable(",n,")}",c,".",r,"=",o,";"),i(s),e("if(",o,"!==",c,".",r,"){",s,"}")})),Object.keys(lt).forEach((function(r){var n,s,f=lt[r],h=nt[r],d=t.block();d(l,".",f,"("),m(h)?(f=h.length,n=t.global.def(u,".",r),s=t.global.def(c,".",r),d(o(f,(function(t){return n+"["+t+"]"})),");",o(f,(function(t){return s+"["+t+"]="+n+"["+t+"];"})).join("")),e("if(",o(f,(function(t){return n+"["+t+"]!=="+s+"["+t+"]"})).join("||"),"){",d,"}")):(n=a.def(u,".",r),s=a.def(c,".",r),d(n,");",c,".",r,"=",n,";"),e("if(",n,"!==",s,"){",d,"}")),i(d)})),t.compile()}(),compile:function(t,e,r,n,i){var a=_();a.stats=a.link(i),Object.keys(e.static).forEach((function(t){J(a,e,t)})),Et.forEach((function(e){J(a,t,e)}));var o=k(t,e,r,n);return o.shader.program&&(o.shader.program.attributes.sort((function(t,e){return t.name<e.name?-1:1})),o.shader.program.uniforms.sort((function(t,e){return t.name<e.name?-1:1}))),function(t,e){var r=t.proc("draw",1);L(t,r),S(t,r,e.context),E(t,r,e.framebuffer),O(t,r,e),C(t,r,e.state),R(t,r,e,!1,!0);var n=e.shader.progVar.append(t,r);if(r(t.shared.gl,".useProgram(",n,".program);"),e.shader.program)G(t,r,e,e.shader.program);else{r(t.shared.vao,".setVAO(null);");var i=t.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(t.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",t.link((function(r){return V(G,t,e,r,1)})),"(",n,");",o,".call(this,a0);"))}0<Object.keys(e.state).length&&r(t.shared.current,".dirty=true;"),t.shared.vao&&r(t.shared.vao,".setVAO(null);")}(a,o),Z(a,o),function(t,e){function r(t){return t.contextDep&&i||t.propDep}var n=t.proc("batch",2);t.batchId="0",L(t,n);var i=!1,a=!0;Object.keys(e.context).forEach((function(t){i=i||e.context[t].propDep})),i||(S(t,n,e.context),a=!1);var o=!1;if((s=e.framebuffer)?(s.propDep?i=o=!0:s.contextDep&&i&&(o=!0),o||E(t,n,s)):E(t,n,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),O(t,n,e),C(t,n,e.state,(function(t){return!r(t)})),e.profile&&r(e.profile)||R(t,n,e,!1,"a1"),e.contextDep=i,e.needsContext=a,e.needsFramebuffer=o,(a=e.shader.progVar).contextDep&&i||a.propDep)X(t,n,e,null);else if(a=a.append(t,n),n(t.shared.gl,".useProgram(",a,".program);"),e.shader.program)X(t,n,e,e.shader.program);else{n(t.shared.vao,".setVAO(null);");var s=t.global.def("{}"),l=(o=n.def(a,".id"),n.def(s,"[",o,"]"));n(t.cond(l).then(l,".call(this,a0,a1);").else(l,"=",s,"[",o,"]=",t.link((function(r){return V(X,t,e,r,2)})),"(",a,");",l,".call(this,a0,a1);"))}0<Object.keys(e.state).length&&n(t.shared.current,".dirty=true;"),t.shared.vao&&n(t.shared.vao,".setVAO(null);")}(a,o),Y(a.compile(),{destroy:function(){o.shader.program.destroy()}})}}}function G(t,e){for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}var Y=function(t,e){for(var r=Object.keys(e),n=0;n<r.length;++n)t[r[n]]=e[r[n]];return t},W=0,q={DynamicVariable:t,define:function(e,n){return new t(e,r(n+""))},isDynamic:function(e){return"function"==typeof e&&!e._reglType||e instanceof t},unbox:function e(r,n){return"function"==typeof r?new t(0,r):"number"==typeof r||"boolean"==typeof r?new t(5,r):Array.isArray(r)?new t(6,r.map((function(t,r){return e(t,n+"["+r+"]")}))):r instanceof t?r:void 0},accessor:r},X={next:"function"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:"function"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},Z="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},J=l();J.zero=l();var K=function(t,e){var r=1;e.ext_texture_filter_anisotropic&&(r=t.getParameter(34047));var n=1,i=1;e.webgl_draw_buffers&&(n=t.getParameter(34852),i=t.getParameter(36063));var a=!!e.oes_texture_float;if(a){a=t.createTexture(),t.bindTexture(3553,a),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=t.createFramebuffer();if(t.bindFramebuffer(36160,o),t.framebufferTexture2D(36160,36064,3553,a,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))a=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=J.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?a=!1:(t.deleteFramebuffer(o),t.deleteTexture(a),a=1===s[0]),J.freeType(s)}}return s=!0,"undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(s=t.createTexture(),o=J.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,o),J.freeType(o),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError()),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter((function(t){return!!e[t]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:a,npotTextureCube:s}},Q=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},$=function(t){return Object.keys(t).map((function(e){return t[e]}))},tt={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,r,n){var i=1;if(e.length)for(var a=0;a<e.length;++a)i*=e[a];else i=0;switch(r=n||J.allocType(r,i),e.length){case 0:break;case 1:for(n=e[0],e=0;e<n;++e)r[e]=t[e];break;case 2:for(n=e[0],e=e[1],a=i=0;a<n;++a)for(var o=t[a],s=0;s<e;++s)r[i++]=o[s];break;case 3:c(t,e[0],e[1],e[2],r,0);break;default:f(t,e,0,r,0)}return r}},et={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},rt={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},nt={dynamic:35048,stream:35040,static:35044},it=tt.flatten,at=tt.shape,ot=[];ot[5120]=1,ot[5122]=2,ot[5124]=4,ot[5121]=1,ot[5123]=2,ot[5125]=4,ot[5126]=4;var st={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},lt=new Float32Array(1),ut=new Uint32Array(lt.buffer),ct=[9984,9986,9985,9987],ft=[0,6409,6410,6407,6408],ht={};ht[6409]=ht[6406]=ht[6402]=1,ht[34041]=ht[6410]=2,ht[6407]=ht[35904]=3,ht[6408]=ht[35906]=4;var dt=x("HTMLCanvasElement"),pt=x("OffscreenCanvas"),vt=x("CanvasRenderingContext2D"),gt=x("ImageBitmap"),yt=x("HTMLImageElement"),mt=x("HTMLVideoElement"),xt=Object.keys(et).concat([dt,pt,vt,gt,yt,mt]),bt=[];bt[5121]=1,bt[5126]=4,bt[36193]=2,bt[5123]=2,bt[5125]=4;var _t=[];_t[32854]=2,_t[32855]=2,_t[36194]=2,_t[34041]=4,_t[33776]=.5,_t[33777]=.5,_t[33778]=1,_t[33779]=1,_t[35986]=.5,_t[35987]=1,_t[34798]=1,_t[35840]=.5,_t[35841]=.25,_t[35842]=.5,_t[35843]=.25,_t[36196]=.5;var wt=[];wt[32854]=2,wt[32855]=2,wt[36194]=2,wt[33189]=2,wt[36168]=1,wt[34041]=4,wt[35907]=4,wt[34836]=16,wt[34842]=8,wt[34843]=6;var At=function(t,e,r,n,i){function a(t){this.id=u++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function o(e){var r=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(r),e.renderbuffer=null,e.refCount=0,delete c[e.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach((function(t){l[s[t]]=t}));var u=0,c={};return a.prototype.decRef=function(){0>=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(c).forEach((function(e){t+=c[e].stats.size})),t}),{create:function(e,r){function o(e,r){var n=0,a=0,c=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(c=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==u.width||a!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=a,u.format=c,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,c,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new a(t.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===u.width&&a===u.height||(o.width=u.width=n,o.height=u.height=a,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,u.format,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height)),o},o._reglType="renderbuffer",o._renderbuffer=u,i.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){$(c).forEach(o)},restore:function(){$(c).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},Mt=[];Mt[6408]=4,Mt[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var kt=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],St=["x","y","z","w"],Et="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ot={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ct={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Lt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Rt={cw:2304,ccw:2305},Dt=new z(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)A&&A.update(),et=null;else{et=X.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(R,null,0)}p.flush(),A&&A.update()}}function r(){!et&&0<J.length&&(et=X.next(e))}function n(){et&&(X.cancel(e),et=null)}function i(t){t.preventDefault(),n(),Q.forEach((function(t){t()}))}function o(t){p.getError(),m.restore(),N.restore(),I.restore(),B.restore(),z.restore(),j.restore(),F.restore(),A&&A.restore(),U.procs.refresh(),r(),$.forEach((function(t){t()}))}function s(t){function e(t,e){var r={},n={};return Object.keys(t).forEach((function(i){var a=t[i];if(q.isDynamic(a))n[i]=q.unbox(a,i);else{if(e&&Array.isArray(a))for(var o=0;o<a.length;++o)if(q.isDynamic(a[o]))return void(n[i]=q.unbox(a,i));r[i]=a}})),{dynamic:n,static:r}}var r=e(t.context||{},!0),n=e(t.uniforms||{},!0),i=e(t.attributes||{},!1);t=e(function(t){function e(t){if(t in r){var e=r[t];delete r[t],Object.keys(e).forEach((function(n){r[t+"."+n]=e[n]}))}}var r=Y({},t);return delete r.uniforms,delete r.attributes,delete r.context,delete r.vao,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),"vao"in t&&(r.vao=t.vao),r}(t),!1);var a={gpuTime:0,cpuTime:0,count:0},o=U.compile(t,i,n,r,a),s=o.draw,l=o.batch,u=o.scope,c=[];return Y((function(t,e){var r;if("function"==typeof t)return u.call(this,null,t,0);if("function"==typeof e)if("number"==typeof t)for(r=0;r<t;++r)u.call(this,null,e,r);else{if(!Array.isArray(t))return u.call(this,t,e,0);for(r=0;r<t.length;++r)u.call(this,t[r],e,r)}else if("number"==typeof t){if(0<t)return l.call(this,function(t){for(;c.length<t;)c.push(null);return c}(0|t),0|t)}else{if(!Array.isArray(t))return s.call(this,t);if(t.length)return l.call(this,t,t.length)}}),{stats:a,destroy:function(){o.destroy()}})}function l(t,e){var r=0;U.procs.poll();var n=e.color;n&&(p.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),"depth"in e&&(p.clearDepth(+e.depth),r|=256),"stencil"in e&&(p.clearStencil(0|e.stencil),r|=1024),p.clear(r)}function u(t){return J.push(t),r(),{cancel:function(){var e=G(J,t);J[e]=function t(){var e=G(J,t);J[e]=J[J.length-1],--J.length,0>=J.length&&n()}}}}function c(){var t=H.viewport,e=H.scissor_box;t[0]=t[1]=e[0]=e[1]=0,R.viewportWidth=R.framebufferWidth=R.drawingBufferWidth=t[2]=e[2]=p.drawingBufferWidth,R.viewportHeight=R.framebufferHeight=R.drawingBufferHeight=t[3]=e[3]=p.drawingBufferHeight}function f(){R.tick+=1,R.time=d(),c(),U.procs.poll()}function h(){B.refresh(),c(),U.procs.refresh(),A&&A.update()}function d(){return(Z()-M)/1e3}if(!(t=a(t)))return null;var p=t.gl,y=p.getContextAttributes();p.isContextLost();var m=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i<e.extensions.length;++i){var a=e.extensions[i];if(!r(a))return e.onDestroy(),e.onDone('"'+a+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach((function(t){if(n[t]&&!r(t))throw Error("(regl): error restoring extension "+t)}))}}}(p,t);if(!m)return null;var x=function(){var t={"":0},e=[""];return{id:function(r){var n=t[r];return n||(n=t[r]=e.length,e.push(r),n)},str:function(t){return e[t]}}}(),b={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},_=t.cachedCode||{},w=m.extensions,A=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=o.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,s.push(i)}if(!e.ext_disjoint_timer_query)return null;var i=[],a=[],o=[],s=[],l=[],u=[];return{beginQuery:function(t){var r=i.pop()||e.ext_disjoint_timer_query.createQueryEXT();e.ext_disjoint_timer_query.beginQueryEXT(35007,r),a.push(r),n(a.length-1,a.length,t)},endQuery:function(){e.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,r;if(0!==(t=a.length)){u.length=Math.max(u.length,t+1),l.length=Math.max(l.length,t+1),l[0]=0;var n=u[0]=0;for(r=t=0;r<a.length;++r){var c=a[r];e.ext_disjoint_timer_query.getQueryObjectEXT(c,34919)?(n+=e.ext_disjoint_timer_query.getQueryObjectEXT(c,34918),i.push(c)):a[t++]=c,l[r+1]=n,u[r+1]=t}for(a.length=t,r=t=0;r<s.length;++r){var f=(n=s[r]).startQueryIndex;c=n.endQueryIndex,n.sum+=l[c]-l[f],f=u[f],(c=u[c])===f?(n.stats.gpuTime+=n.sum/1e6,o.push(n)):(n.startQueryIndex=f,n.endQueryIndex=c,s[t++]=n)}s.length=t}},getNumPendingQueries:function(){return a.length},clear:function(){i.push.apply(i,a);for(var t=0;t<i.length;t++)e.ext_disjoint_timer_query.deleteQueryEXT(i[t]);a.length=0,i.length=0},restore:function(){a.length=0,i.length=0}}}(0,w),M=Z(),T=p.drawingBufferWidth,E=p.drawingBufferHeight,R={tick:0,time:0,viewportWidth:T,viewportHeight:E,framebufferWidth:T,framebufferHeight:E,drawingBufferWidth:T,drawingBufferHeight:E,pixelRatio:t.pixelRatio},D=(T={elements:null,primitive:4,count:-1,offset:0,instances:-1},K(p,w)),I=v(p,b,t,(function(t){return F.destroyBuffer(t)})),P=g(p,w,I,b),F=O(p,w,D,b,I,P,T),N=C(p,x,b,t),B=k(p,w,D,(function(){U.procs.poll()}),R,b,t),z=At(p,w,0,b,t),j=S(p,w,D,B,z,b),U=V(p,x,w,D,I,P,0,j,{},F,N,T,R,A,_,t),H=(x=L(p,j,U.procs.poll,R),U.next),W=p.canvas,J=[],Q=[],$=[],tt=[t.onDestroy],et=null;W&&(W.addEventListener("webglcontextlost",i,!1),W.addEventListener("webglcontextrestored",o,!1));var rt=j.setFBO=s({framebuffer:q.define.call(null,1,"framebuffer")});return h(),y=Y(s,{clear:function(t){if("framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;6>e;++e)rt(Y({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:q.define.bind(null,1),context:q.define.bind(null,2),this:q.define.bind(null,3),draw:s({}),buffer:function(t){return I.create(t,34962,!1,!1)},elements:function(t){return P.create(t,!1)},texture:B.create2D,cube:B.createCube,renderbuffer:z.create,framebuffer:j.create,framebufferCube:j.createCube,vao:F.createVAO,attributes:y,frame:u,on:function(t,e){var r;switch(t){case"frame":return u(e);case"lost":r=Q;break;case"restore":r=$;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t<r.length;++t)if(r[t]===e){r[t]=r[r.length-1],r.pop();break}}}},limits:D,hasExtension:function(t){return 0<=D.extensions.indexOf(t.toLowerCase())},read:x,destroy:function(){J.length=0,n(),W&&(W.removeEventListener("webglcontextlost",i),W.removeEventListener("webglcontextrestored",o)),N.clear(),j.clear(),z.clear(),F.clear(),B.clear(),P.clear(),I.clear(),A&&A.clear(),tt.forEach((function(t){t()}))},_gl:p,_refresh:h,poll:function(){f(),A&&A.update()},now:d,stats:b,getCachedCode:function(){return _},preloadCachedCode:function(t){Object.entries(t).forEach((function(t){_[t[0]]=t[1]}))}}),t.onDone(null,y),y}}()},14500:function(t,e,r){"use strict";var n=r(53664),i=r(64348),a=r(39640)(),o=r(2304),s=n("%TypeError%"),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&o){var c=o(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(a?i(t,"length",e,!0,!0):i(t,"length",e)),t}},39956:function(t,e,r){"use strict";var n=r(32868);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s<a.length;s++){var l=a[s],u=a[s+1];"\\"===l[l.length-1]&&"\\"!==l[l.length-2]?(o.push(l+e+u),s++):o.push(l)}a=o}for(s=0;s<a.length;s++)i[0]=a[s],a[s]=n.stringify(i,{flat:!0});return a}},92848:function(t,e,r){"use strict";r.r(e);var n=2*Math.PI,i=function(t,e,r,n,i,a,o){var s=t.x,l=t.y;return{x:n*(s*=e)-i*(l*=r)+a,y:i*s+n*l+o}},a=function(t,e){var r=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[{x:n-i*r,y:i+n*r},{x:a+o*r,y:o-a*r},{x:a,y:o}]},o=function(t,e,r,n){var i=t*r+e*n;return i>1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};e.default=function(t){var e=t.px,r=t.py,s=t.cx,l=t.cy,u=t.rx,c=t.ry,f=t.xAxisRotation,h=void 0===f?0:f,d=t.largeArcFlag,p=void 0===d?0:d,v=t.sweepFlag,g=void 0===v?0:v,y=[];if(0===u||0===c)return[];var m=Math.sin(h*n/360),x=Math.cos(h*n/360),b=x*(e-s)/2+m*(r-l)/2,_=-m*(e-s)/2+x*(r-l)/2;if(0===b&&0===_)return[];u=Math.abs(u),c=Math.abs(c);var w=Math.pow(b,2)/Math.pow(u,2)+Math.pow(_,2)/Math.pow(c,2);w>1&&(u*=Math.sqrt(w),c*=Math.sqrt(w));var A=function(t,e,r,i,a,s,l,u,c,f,h,d){var p=Math.pow(a,2),v=Math.pow(s,2),g=Math.pow(h,2),y=Math.pow(d,2),m=p*v-p*y-v*g;m<0&&(m=0),m/=p*y+v*g;var x=(m=Math.sqrt(m)*(l===u?-1:1))*a/s*d,b=m*-s/a*h,_=f*x-c*b+(t+r)/2,w=c*x+f*b+(e+i)/2,A=(h-x)/a,M=(d-b)/s,T=(-h-x)/a,k=(-d-b)/s,S=o(1,0,A,M),E=o(A,M,T,k);return 0===u&&E>0&&(E-=n),1===u&&E<0&&(E+=n),[_,w,S,E]}(e,r,s,l,u,c,p,g,m,x,b,_),M=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(A,4),T=M[0],k=M[1],S=M[2],E=M[3],O=Math.abs(E)/(n/4);Math.abs(1-O)<1e-7&&(O=1);var C=Math.max(Math.ceil(O),1);E/=C;for(var L=0;L<C;L++)y.push(a(S,E)),S+=E;return y.map((function(t){var e=i(t[0],u,c,x,m,T,k),r=e.x,n=e.y,a=i(t[1],u,c,x,m,T,k),o=a.x,s=a.y,l=i(t[2],u,c,x,m,T,k);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}}))}},74840:function(t,e,r){"use strict";var n=r(21984),i=r(49972),a=r(41976),o=r(53520),s=r(45408);t.exports=function(t){if(Array.isArray(t)&&1===t.length&&"string"==typeof t[0]&&(t=t[0]),"string"==typeof t&&(s(o(t),"String is not an SVG path."),t=n(t)),s(Array.isArray(t),"Argument should be a string or an array of path segments."),t=i(t),!(t=a(t)).length)return[0,0,0,0];for(var e=[1/0,1/0,-1/0,-1/0],r=0,l=t.length;r<l;r++)for(var u=t[r].slice(1),c=0;c<u.length;c+=2)u[c+0]<e[0]&&(e[0]=u[c+0]),u[c+1]<e[1]&&(e[1]=u[c+1]),u[c+0]>e[2]&&(e[2]=u[c+0]),u[c+1]>e[3]&&(e[3]=u[c+1]);return e}},41976:function(t,e,r){"use strict";t.exports=function(t){for(var e,r=[],o=0,s=0,l=0,u=0,c=null,f=null,h=0,d=0,p=0,v=t.length;p<v;p++){var g=t[p],y=g[0];switch(y){case"M":l=g[1],u=g[2];break;case"A":var m=n({px:h,py:d,cx:g[6],cy:g[7],rx:g[1],ry:g[2],xAxisRotation:g[3],largeArcFlag:g[4],sweepFlag:g[5]});if(!m.length)continue;for(var x,b=0;b<m.length;b++)g=["C",(x=m[b]).x1,x.y1,x.x2,x.y2,x.x,x.y],b<m.length-1&&r.push(g);break;case"S":var _=h,w=d;"C"!=e&&"S"!=e||(_+=_-o,w+=w-s),g=["C",_,w,g[1],g[2],g[3],g[4]];break;case"T":"Q"==e||"T"==e?(c=2*h-c,f=2*d-f):(c=h,f=d),g=a(h,d,c,f,g[1],g[2]);break;case"Q":c=g[1],f=g[2],g=a(h,d,g[1],g[2],g[3],g[4]);break;case"L":g=i(h,d,g[1],g[2]);break;case"H":g=i(h,d,g[1],d);break;case"V":g=i(h,d,h,g[1]);break;case"Z":g=i(h,d,l,u)}e=y,h=g[g.length-2],d=g[g.length-1],g.length>4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=d),r.push(g)}return r};var n=r(92848);function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},20472:function(t,e,r){"use strict";var n,i=r(74840),a=r(21984),o=r(22235),s=r(53520),l=r(29620),u=document.createElement("canvas"),c=u.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,f;e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=u.width=e.w||e.width||200,f=u.height=e.h||e.height||200);var h=Math.min(r,f),d=e.stroke||0,p=e.viewbox||e.viewBox||i(t),v=[r/(p[2]-p[0]),f/(p[3]-p[1])],g=Math.min(v[0]||0,v[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,r,f),c.fillStyle="white",d&&("number"!=typeof d&&(d=1),c.strokeStyle=d>0?"white":"black",c.lineWidth=Math.abs(d)),c.translate(.5*r,.5*f),c.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var y=new Path2D(t);c.fill(y),d&&c.stroke(y)}else{var m=a(t);o(c,m),c.fill(),d&&c.stroke()}return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},49760: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:P(e[1]),g:P(e[2]),b:P(e[3]),a:z(e[4]),format:r?"name":"hex8"}:(e=V.hex6.exec(t))?{r:P(e[1]),g:P(e[2]),b:P(e[3]),format:r?"name":"hex"}:(e=V.hex4.exec(t))?{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),a:z(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=V.hex3.exec(t))&&{r:P(e[1]+""+e[1]),g:P(e[2]+""+e[2]),b:P(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(G(t.r)&&G(t.g)&&G(t.b)?(e=t.r,r=t.g,n=t.b,s={r:255*D(e,255),g:255*D(r,255),b:255*D(n,255)},p=!0,v="%"===String(t.r).substr(-1)?"prgb":"rgb"):G(t.h)&&G(t.s)&&G(t.v)?(f=N(t.s),h=N(t.v),s=function(t,e,r){t=6*D(t,360),e=D(e,100),r=D(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"):G(t.h)&&G(t.s)&&G(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=D(t,360),e=D(e,100),r=D(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=D(t,255),e=D(e,255),r=D(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=D(t,255),e=D(e,255),r=D(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=[F(l(t).toString(16)),F(l(e).toString(16)),F(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[F(B(n)),F(l(t).toString(16)),F(l(e).toString(16)),F(l(r).toString(16))].join("")}function y(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s-=e/100,r.s=I(r.s),h(r)}function m(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s+=e/100,r.s=I(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=I(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=I(r.l),h(r)}function A(t,e){var r=h(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,h(r)}function M(t){var e=h(t).toHsl();return e.h=(e.h+180)%360,h(e)}function T(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 S(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 E(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 O(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=[F(l(t).toString(16)),F(l(e).toString(16)),F(l(r).toString(16)),F(B(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*D(this._r,255))+"%",g:l(100*D(this._g,255))+"%",b:l(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%)":"rgba("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[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(y,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(T,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"},L=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 D(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 I(t){return u(1,c(0,t))}function P(t){return parseInt(t,16)}function F(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}function B(t){return i.round(255*parseFloat(t)).toString(16)}function z(t){return P(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 G(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)},37816:function(t){"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n<i;n++)e[n]=t[n]-e[n];return e}return r(t-r(t))};var e=new Float32Array(1);function r(t){return t.length?t instanceof Float32Array?t:new Float32Array(t):(e[0]=t,e[0])}},23464:function(t,e,r){"use strict";var n=r(65819);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}},73384:function(t,e,r){"use strict";var n=r(54612);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!n(t)}},57980:function(t,e,r){"use strict";var n=r(81680),i=r(7328),a=r(33940),o=r(18856),s=function(t,e){return t.replace("%v",o(e))};t.exports=function(t,e,r){if(!i(r))throw new TypeError(s(e,t));if(!n(t)){if("default"in r)return r.default;if(r.isOptional)return null}var o=a(r.errorMessage);throw n(o)||(o=e),new TypeError(s(o,t))}},32336:function(t){"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},18856:function(t,e,r){"use strict";var n=r(32336),i=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);return null===e?"<Non-coercible to string value>":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},7328:function(t,e,r){"use strict";var n=r(81680),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},87396:function(t,e,r){"use strict";var n=r(57980),i=r(85488);t.exports=function(t){return i(t)?t:n(t,"%v is not a plain function",arguments[1])}},85488:function(t,e,r){"use strict";var n=r(73384),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},54612:function(t,e,r){"use strict";var n=r(7328);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},33940:function(t,e,r){"use strict";var n=r(81680),i=r(7328),a=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===a)return null}try{return""+t}catch(t){return null}}},18496:function(t,e,r){"use strict";var n=r(57980),i=r(81680);t.exports=function(t){return i(t)?t:n(t,"Cannot use %v",arguments[1])}},81680:function(t){"use strict";t.exports=function(t){return null!=t}},14144:function(t,e,r){"use strict";var n=r(308),i=r(10352),a=r(33576).Sn;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 y(t){return new Int8Array(d(t),0,t)}function m(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 A(t){return s?new BigUint64Array(d(8*t),0,t):null}function M(t){return l?new BigInt64Array(d(8*t),0,t):null}function T(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 y(t);case"int16":return m(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 M(t);case"biguint64":return A(t);case"buffer":return k(t);case"data":case"dataview":return T(t);default:return null}return null},e.mallocArrayBuffer=d,e.mallocUint8=p,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=A,e.mallocBigInt64=M,e.mallocDataView=T,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}},92384:function(t){var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},45223:function(t){"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n<i;n++){var a=r[n];for(var o in a)if((void 0===e[o]||Array.isArray(e[o])||t[o]!==e[o])&&o in e){var s;if(!0===a[o])s=e[o];else{if(!1===a[o])continue;if("function"==typeof a[o]&&void 0===(s=a[o](e[o],t,e)))continue}t[o]=s}}return t}},75272:function(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},41088:function(t,e,r){"use strict";var n=r(91148),i=r(84420),a=r(96632),o=r(7728);function s(t){return t.call.bind(t)}var l="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,c=s(Object.prototype.toString),f=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(u)var v=s(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function y(t){return"[object Map]"===c(t)}function m(t){return"[object Set]"===c(t)}function x(t){return"[object WeakMap]"===c(t)}function b(t){return"[object WeakSet]"===c(t)}function _(t){return"[object ArrayBuffer]"===c(t)}function w(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function A(t){return"[object DataView]"===c(t)}function M(t){return"undefined"!=typeof DataView&&(A.working?A(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=o,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):o(t)||M(t)},e.isUint8Array=function(t){return"Uint8Array"===a(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===a(t)},e.isUint16Array=function(t){return"Uint16Array"===a(t)},e.isUint32Array=function(t){return"Uint32Array"===a(t)},e.isInt8Array=function(t){return"Int8Array"===a(t)},e.isInt16Array=function(t){return"Int16Array"===a(t)},e.isInt32Array=function(t){return"Int32Array"===a(t)},e.isFloat32Array=function(t){return"Float32Array"===a(t)},e.isFloat64Array=function(t){return"Float64Array"===a(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===a(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===a(t)},y.working="undefined"!=typeof Map&&y(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(y.working?y(t):t instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(m.working?m(t):t instanceof Set)},x.working="undefined"!=typeof WeakMap&&x(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(x.working?x(t):t instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(t){return b(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=w,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=M;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function k(t){return"[object SharedArrayBuffer]"===c(t)}function S(t){return void 0!==T&&(void 0===k.working&&(k.working=k(new T)),k.working?k(t):t instanceof T)}function E(t){return g(t,f)}function O(t){return g(t,h)}function C(t){return g(t,d)}function L(t){return l&&g(t,p)}function R(t){return u&&g(t,v)}e.isSharedArrayBuffer=S,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===c(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===c(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===c(t)},e.isGeneratorObject=function(t){return"[object Generator]"===c(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===c(t)},e.isNumberObject=E,e.isStringObject=O,e.isBooleanObject=C,e.isBigIntObject=L,e.isSymbolObject=R,e.isBoxedPrimitive=function(t){return E(t)||O(t)||C(t)||L(t)||R(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(w(t)||S(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},35840:function(t,e,r){var n=r(4168),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},a=/%[sdj%]/g;e.format=function(t){if(!x(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(u(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(t).replace(a,(function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r<i;s=n[++r])y(s)||!w(s)?o+=" "+s:o+=" "+u(s);return o},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var o={},s=/^$/;if(n.env.NODE_DEBUG){var l=n.env.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+l+"$","i")}function u(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function f(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return x(i)||(i=h(t,i,n)),i}var a=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(x(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),M(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(r);if(0===o.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return d(r)}var u,c="",f=!1,w=["{","}"];return v(r)&&(f=!0,w=["[","]"]),T(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(c=" "+RegExp.prototype.toString.call(r)),A(r)&&(c=" "+Date.prototype.toUTCString.call(r)),M(r)&&(c=" "+d(r)),0!==o.length||f&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=f?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)O(e,String(o))?a.push(p(t,e,r,n,String(o),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(p(t,e,r,n,i,!0))})),a}(t,r,n,s,o):o.map((function(e){return p(t,r,n,s,e,f)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(u,c,w)):w[0]+c+w[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),O(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=y(r)?h(t,l.value,null):h(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function v(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function x(t){return"string"==typeof t}function b(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===k(t)}function w(t){return"object"==typeof t&&null!==t}function A(t){return w(t)&&"[object Date]"===k(t)}function M(t){return w(t)&&("[object Error]"===k(t)||t instanceof Error)}function T(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=n.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41088),e.isArray=v,e.isBoolean=g,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=x,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=A,e.types.isDate=A,e.isError=M,e.types.isNativeError=M,e.isFunction=T,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(75272);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),E[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6768),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(C&&t[C]){var e;if("function"!=typeof(e=t[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,C,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),C&&Object.defineProperty(e,C,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,i(t))},e.promisify.custom=C,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var i=e.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return i.apply(a,arguments)};t.apply(this,e).then((function(t){n.nextTick(o.bind(null,null,t))}),(function(t){n.nextTick(L.bind(null,t,o))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,i(t)),e}},5408:function(t,e,r){var n=r(13380);t.exports=function(t){return n("webgl",t)}},96632:function(t,e,r){"use strict";var n=r(46492),i=r(63436),a=r(57916),o=r(99676),s=r(2304),l=o("Object.prototype.toString"),u=r(46672)(),c="undefined"==typeof globalThis?r.g:globalThis,f=i(),h=o("String.prototype.slice"),d=Object.getPrototypeOf,p=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},v={__proto__:null};n(f,u&&s&&d?function(t){var e=new c[t];if(Symbol.toStringTag in e){var r=d(e),n=s(r,Symbol.toStringTag);if(!n){var i=d(r);n=s(i,Symbol.toStringTag)}v["$"+t]=a(n.get)}}:function(t){var e=new c[t],r=e.slice||e.set;r&&(v["$"+t]=a(r))}),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!u){var e=h(l(t),8,-1);return p(f,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(v,(function(r,n){if(!e)try{r(t),e=h(n,1)}catch(t){}})),e}(t)}return s?function(t){var e=!1;return n(v,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=h(n,1))}catch(t){}})),e}(t):null}},67020:function(t,e,r){var n=r(38700),i=r(50896),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]},89792:function(t,e,r){var n=r(38700),i=r(50896);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},55668:function(t,e,r){var n=r(38700),i=r(50896);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},65168:function(t,e,r){var n=r(38700),i=r(50896);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(38700),i=r(50896);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},26368:function(t,e,r){var n=r(38700),i=r(50896);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},24747:function(t,e,r){var n=r(38700),i=r(50896);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},65616:function(t,e,r){var n=r(38700),i=r(50896);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},30632:function(t,e,r){var n=r(38700),i=r(50896);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},73040:function(t,e,r){var n=r(38700),i=r(50896);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(38700),i=r(50896);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},51456:function(t,e,r){var n=r(38700),i=r(50896),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(38700),i=r(50896),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},45348:function(t,e,r){var n=r(38700),i=r(50896);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-Jum‘a","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]},38700:function(t,e,r){var n=r(50896);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},15168:function(t,e,r){var n=r(50896),i=r(38700);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")):m(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]},y=this.local.digits,m=function(t){return r.localNumbers&&y?y(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+=m(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,y=!1,m=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=m(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(T).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){m("m");var t=l.call(b,e.substring(T));return T+=t.length,t}return x("m")},w=function(t,r,n,a){for(var o=m(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(T,o[s].length).toLowerCase()===o[s].toLowerCase())return T+=o[s].length,s+b.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[""].unknownNameAt).replace(/\{0\}/,T)},A=function(){if("function"==typeof c){var t=m("M")?c.call(b,e.substring(T)):u.call(b,e.substring(T));return T+=t.length,t}return w("M",u,c)},M=function(){if(e.charAt(T)!==t.charAt(k))throw(i.local.unexpectedLiteralAt||i.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,T);T++},T=0,k=0;k<t.length;k++)if(y)"'"!==t.charAt(k)||m("'")?M():y=!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=A();break;case"y":var S=k;g=!m("y",2),k=S,h=x("y",2);break;case"Y":h=x("Y",2);break;case"J":f=x("J")+.5,"."===e.charAt(T)&&(T++,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"*":T=e.length;break;case"'":m("'")?M():y=!0;break;default:M()}if(T<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 E=this.daysInMonth(h,d);p>E;E=this.daysInMonth(h,d))d++,p-=E}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)}})},63436:function(t,e,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},30584:function(t){"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},7294:function(t){"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},47916:function(t){"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},2904:function(t){"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},68194:function(t){"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},3748:function(t){"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},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(9464)}()})); |